BGP route filtering

Unanswered Question
May 9th, 2010

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

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
Jon Marshall Sun, 05/09/2010 - 18:10

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

Actions

This Discussion