Cisco Prefix List Won’t Appear in Route Table

bgpciscocisco-iosroute-filterrouting

I have the following prefix-list configured on our router:

ip prefix-list adsvr seq 5 permit 172.30.5.241/32
ip prefix-list adsvr seq 10 permit 134.239.130.143/32
ip prefix-list adsvr seq 15 permit 192.168.151.135/32
ip prefix-list adsvr seq 20 permit 192.168.181.182/32

ip prefix-list networks permit 10.15.0.0/16
ip prefix-list networks permit 10.18.3.0/24
ip prefix-list networks permit 10.18.10.0/24
ip prefix-list networks permit 10.18.48.0/20
ip prefix-list networks permit 10.16.7.0/24
ip prefix-list networks permit 10.16.77.0/24
ip prefix-list networks permit 10.19.0.0/22
ip prefix-list networks permit 10.16.3.0/24
ip prefix-list networks permit 10.16.8.128/25
ip prefix-list networks permit 10.16.1.0/24

I have configured a route-map as follows:

route-map allowed_Alfa_networks permit 10
match ip address prefix-list adsvr networks

I have applied the route-map to our bgp configuration as follows:

router bgp 65230
 bgp log-neighbor-changes
 network 10.9.252.90 mask 255.255.255.255
 network 10.16.76.0 mask 255.255.255.0
 network 10.112.224.0 mask 255.255.254.0
 network 10.112.226.0 mask 255.255.254.0
 network 10.112.228.0 mask 255.255.254.0
 network 10.112.230.0 mask 255.255.254.0
 network 10.112.232.0 mask 255.255.255.0
 network 10.112.233.0 mask 255.255.255.0
 network 192.168.58.0
 redistribute static
 neighbor 10.1.243.17 remote-as 2856
 neighbor 10.1.243.17 ebgp-multihop 3
 neighbor 10.1.243.17 soft-reconfiguration inbound
 neighbor 10.1.242.17 route-map allowed_Alfa_networks in

However, when I do a show ip bgp I only see the prefixes from 'networks' – I don't see prefixes from 'adsvr', see below;

     Network          Next Hop            Metric LocPrf Weight Path
 *>  10.0.0.0         0.0.0.0                  0         32768 ?
 *>  10.9.252.90/32   0.0.0.0                  0         32768 i
 *>  10.16.1.0/24     10.1.243.17                            0 2856 65201 i
 *>  10.16.3.0/24     10.1.243.17                            0 2856 64521 ?
 *>  10.16.7.0/24     10.1.243.17                            0 2856 64521 ?
 *>  10.16.45.0/25    10.1.243.17                            0 2856 65248 i
 *>  10.16.45.128/25  10.1.243.17                            0 2856 65248 i
 *>  10.16.76.0/24    0.0.0.0                  0         32768 i
 *>  10.16.77.0/24    10.1.243.17                            0 2856 64521 ?
 *>  10.19.0.0/22     10.1.243.17                            0 2856 65286 ?
 *>  10.19.8.0/22     10.1.243.17                            0 2856 12641 65289 ?
 *>  10.19.9.0/27     10.1.243.17                            0 2856 12641 65289 i
 *>  10.112.224.0/23  0.0.0.0                  0         32768 i
 *>  10.112.226.0/23  0.0.0.0                  0         32768 i
 *>  10.112.228.0/23  0.0.0.0                  0         32768 i
 *>  10.112.230.0/23  0.0.0.0                  0         32768 i
 *>  10.112.232.0/24  0.0.0.0                  0         32768 i
 *>  10.112.233.0/24  0.0.0.0                  0         32768 i
 *>  134.239.128.0/21 0.0.0.0                  0         32768 ?
 *>  141.247.238.0/24 0.0.0.0                  0         32768 ?
 *>  172.16.0.0/12    0.0.0.0                  0         32768 ?
 *>  172.23.204.0/22  10.1.243.17                            0 2856 65287 ?
 *>  172.50.0.0       0.0.0.0                  0         32768 ?
 *>  192.168.0.0/16   0.0.0.0                  0         32768 ?
 *>  192.168.58.0     0.0.0.0                  0         32768 i
jmeu-heysham01-mpls# 

Can some please tell me why I can't see

172.30.5.241/32
134.239.130.143/32
192.168.151.135/32
192.168.181.182/32

Its driving me crazy

Any help will be greatly appreciated.

Best Answer

It looks like you don't want to get the full route prefix, only the host route prefix, which you want to create out of the full route prefix.

I think you are confused. BGP will only get prefixes which are advertised to it. It appears that you are getting the the 192.168.151.0/24 prefix, but you wan to extract individual host prefixes from it, like 192.168.151.135.32. That's not how it works.

You can filter any prefixes which you receive, but your are not receiving any host prefixes, so you can't filter on them. You neighbor would need to send you the host prefixes before you can filter on them.

If your neighbor is sending you both 192.168.151.0/24 and 192.168.151.135/32, you can filter out one or the other, but if you only receive one of the prefixes, you can't create the other from the one you receive (except for aggregates).