2

I'm playing around with BGP on Quagga.

I have three routers, R1, R2 and R3, connected in sequence and have R2 and R3 send a few routes to R1.

R1 -- R2 -- R3

Configuration of R1:

router bgp 10
router-id 1.1.1.1
network 10.10.10.0 255.255.255.0
network 12.12.12.0 255.255.255.0
network 192.168.2.0 255.255.255.0
neighbor 192.168.2.23 remote-as 10
neighbor 10.10.10.2 remote-as 20
neighbor 10.10.10.2 route-map D1 in
exit

ip as-path access-list 20 permit 30$

route-map D1 deny 90
match as-path 20
exit

Configuration of R2:

router bgp 20
router-id 2.2.2.2
network 10.10.10.0 255.255.255.0
network 20.20.20.0 255.255.255.0
neighbor 10.10.10.1 remote-as 10
neighbor 20.20.20.3 remote-as 30
exit

Configuration of R3:

router bgp 30
router-id 3.0.3.33
network 20.20.20.0 255.255.255.0
network 30.30.30.0 255.255.255.0
neighbor 20.20.20.2 remote-as 20
exit

This setup ended up that route-map on R1 has removed all routes it has received.

I thought I would only remove routes from AS 30?

I have no experience on Cisco routers or else, so I cannot tell if it is an implementation bug or intended.

2

Like access lists, route-maps have an implicit "deny all" at the end. Stanza 90 denies packets it matches, and then everything else is denied by the implicit deny. You need a "permit all" statement at the end like this:

ip as-path access-list 20 permit 30$

route-map D1 deny 90
match as-path 20

route-map D1 permit 100

exit

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.