|
Overview:
In this example, we want to stop routes that originated in AS1 from being advertised to AS3. We are going to do this in AS2.
Our Diagram:

***************************************************************** CHANGE AS-PATH INFORMATION ON R5 ***************************************************************** ================================================ R5 config: =================================================
router bgp 2 no synchronization bgp router-id 5.5.5.5 network 5.5.5.5 mask 255.255.255.255 network 10.1.4.0 mask 255.255.255.0 network 10.1.5.0 mask 255.255.255.0 network 10.1.6.0 mask 255.255.255.0 neighbor 3.3.3.3 remote-as 1 neighbor 3.3.3.3 ebgp-multihop 255 neighbor 3.3.3.3 update-source Loopback0 neighbor 4.4.4.4 remote-as 2 neighbor 4.4.4.4 ebgp-multihop 255 neighbor 4.4.4.4 update-source Loopback0 neighbor 4.4.4.4 route-reflector-client neighbor 4.4.4.4 next-hop-self neighbor 6.6.6.6 remote-as 3 neighbor 6.6.6.6 ebgp-multihop 255 neighbor 6.6.6.6 update-source Loopback0 neighbor 6.6.6.6 filter-list 5 out <====== Filter applied to neighbor no auto-summary ! no ip http server ip classless ip route 3.3.3.3 255.255.255.255 10.1.4.1 ip route 4.4.4.4 255.255.255.255 10.1.5.1 ip route 6.6.6.6 255.255.255.255 10.1.6.2 ip as-path access-list 5 deny ^1$ <====== Deny all routes starting in AS 1 ip as-path access-list 5 permit .* <====== Permit all other routes
================================================ R6 output =================================================
r6#sh ip bgp BGP table version is 28, local router ID is 6.6.6.6 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *> 4.4.4.4/32 5.5.5.5 0 2 i *> 5.5.5.5/32 5.5.5.5 0 0 2 i *> 6.6.6.6/32 0.0.0.0 0 32768 i *> 10.1.2.0/24 5.5.5.5 0 2 i *> 10.1.4.0/24 5.5.5.5 0 0 2 i *> 10.1.5.0/24 5.5.5.5 0 0 2 i * 10.1.6.0/24 5.5.5.5 0 0 2 i *> 0.0.0.0 0 32768 i r6#
Routes from as1 missing like 1.1.1.1
r6#ping 1.1.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds: ..... Success rate is 0 percent (0/5) r6#
|