Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Community Member

BGP route filtering

Hi,

Here is the output before applying distribute-list

BGP table version is 3, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i192.168.2.0      1.1.2.1                  0    100      0 i
*>i192.168.20.0     1.1.2.1                  0    100      0 i

Here is the following configuration for BGP

ip prefix-list fp seq 10 permit 192.168.2.0/24 ------------  matches exact 192.168.2.0 255.255.255.0  sub-net

router bgp 100
no synchronization
bgp log-neighbor-changes
neighbor 1.1.2.1 remote-as 100
neighbor 1.1.2.1 update-source Loopback1
distribute-list prefix fp in Serial1/1   -----------------------> updates are received from ser 1/1
no auto-summary

the subnet 192.168.2.0/24 is not getting blocked.

I am able to block that subnet by route-map but not with distribute-list command.

Please share the experience

Thanks

Subodh

1 REPLY
Hall of Fame Super Blue

Re: BGP route filtering

bapatsubodh wrote:

Hi,

ip prefix-list fp seq 10 permit 192.168.2.0/24 ------------  matches exact 192.168.2.0 255.255.255.0  sub-net

router bgp 100
no synchronization
bgp log-neighbor-changes
neighbor 1.1.2.1 remote-as 100
neighbor 1.1.2.1 update-source Loopback1
distribute-list prefix fp in Serial1/1   -----------------------> updates are received from ser 1/1
no auto-summary

the subnet 192.168.2.0/24 is not getting blocked.

I am able to block that subnet by route-map but not with distribute-list command.

Please share the experience

Thanks

Subodh

Subodh

If you want to filter routes coming from a neighbor with a prefix list then you should do it this way -

ip prefix-list fp seq 10 deny 192.168.2.0/24

ip prefix-list fp seq 20 permit 0.0.0.0/0 le 32

router bgp 100

neighbor 1.1.2.1 prefix-list fp in

Jon

213
Views
0
Helpful
1
Replies
CreatePlease to create content