Greetings Team,
I have a customer that wants to have routes advertised to an eBGP peer (110.145.156.57) based on the condition that the advertising router does not receive a default route from its iBGP peer (192.168.0.18). I have built the scenario in my lab and am unable to make it work. The Cisco version of the same behavior works fine. Is there something wrong with my logic? - config snapshot below...
Any help you can provide is greatly appreciated..
BGP CONFIGbgp 139700
graceful-restart
timer keepalive 30 hold 90
peer 110.145.156.57 as-number 1221
peer 110.145.156.57 connect-interface Vlan-interface660
peer 192.168.0.18 as-number 139700
peer 192.168.0.18 connect-interface Vlan-interface108
#
address-family ipv4 unicast
filter-policy prefix-list block-NODE-1-subnet import
aggregate 103.143.185.0 255.255.255.0 as-set detail-suppressed
network 103.143.185.0 255.255.255.240 route-policy LOCAL_PREF_Telstra
network 103.143.185.16 255.255.255.252 route-policy LOCAL_PREF_Telstra
network 103.143.185.28 255.255.255.252 route-policy LOCAL_PREF_Telstra
network 103.143.185.32 255.255.255.224 route-policy LOCAL_PREF_Telstra
network 103.143.185.64 255.255.255.224 route-policy LOCAL_PREF_Telstra
network 103.143.185.96 255.255.255.240 route-policy LOCAL_PREF_Telstra
network 103.143.185.128 255.255.255.128 route-policy LOCAL_PREF_Telstra
network 103.168.45.0 255.255.255.0 route-policy LOCAL_PREF_to-MGMT
peer 110.145.156.57 enable
peer 110.145.156.57 advertise-policy AS1221-out non-exist-policy AS137549-in
peer 110.145.156.57 route-policy AS-1221-INCOMING import
peer 192.168.0.18 enable
peer 192.168.0.18 next-hop-local
ROUTE POLICY CONFIGroute-policy AS-1221-INCOMING permit node 10
if-match as-path 1
#
route-policy AS-1221-OUTGOING permit node 10
if-match ip address acl name advertise-mgmt
#
route-policy AS1221-out permit node 10
if-match ip address prefix-list MGMT-prefix
#
route-policy AS137549-in permit node 10
if-match as-path 2
if-match ip address prefix-list AS137549-track
#
route-policy LOCAL_PREF_Telstra permit node 10
apply local-preference 200
#
route-policy LOCAL_PREF_to-MGMT permit node 10
if-match ip address prefix-list to-AGN-W-MGMT
apply local-preference 150
#
IP PREFIX-LIST CONFIGip prefix-list AS137549-track index 5 permit 0.0.0.0 0
ip prefix-list MGMT-prefix index 5 permit 103.168.45.0 24
ip prefix-list advertise-mgmt index 10 permit 103.168.45.0 24
ip prefix-list advertise-prod index 10 permit 103.143.185.0 24
ip prefix-list block-NODE-1-subnet index 5 deny 116.206.187.80 29
ip prefix-list block-NODE-1-subnet index 10 permit 0.0.0.0 0
ip prefix-list to-AGN-W-MGMT index 5 permit 103.168.45.0 24
#
ip as-path 1 permit 1221
ip as-path 1 permit ^$
ip as-path 2 permit 137549
ip as-path 2 permit ^$
BGP ROUTING TABLE (local)]show bgp routing-table ipv4
Total number of routes: 11
BGP local router ID is 172.16.0.1
Status codes: * - valid, > - best, d - dampened, h - history,
s - suppressed, S - stale, i - internal, e - external
Origin: i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
* >e 0.0.0.0 110.145.156.57 0 1221i
* i 192.168.0.18 0 100 0 137549i <---- this route is present hence policy route advertisement should suppress
* > 103.143.185.0/24 127.0.0.1 32768 i
s > 103.143.185.0/28 192.168.0.2 0 200 32768 i
s > 103.143.185.16/30 192.168.0.2 0 200 32768 i
s > 103.143.185.28/30 192.168.0.2 0 200 32768 i
s > 103.143.185.32/27 192.168.0.2 0 200 32768 i
s > 103.143.185.64/27 192.168.0.2 0 200 32768 i
s > 103.143.185.96/28 192.168.0.2 0 200 32768 i
s > 103.143.185.128/25 192.168.0.2 0 200 32768 i
* > 103.168.45.0/24 192.168.0.10 0 150 32768 i
BGP ROUTING TABLE PEER (110.145.156.57 )BGP table version is 43, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 0.0.0.0 192.168.100.2 0 37549 i
0.0.0.0 0 i
*> 103.143.185.0/24 110.145.156.58 0 139700 i
* 103.168.45.0/24 192.168.100.2 0 137549 139700 i
*> 110.145.156.58 0 0 139700 i <--- this route should be suppressed
*> 116.206.187.80/29 192.168.100.2 0 137549 139700 i
* 158.39.0.0/24 192.168.100.2 0 0 137549 i
*> 0.0.0.0 0 32768 i
------------------------------
Con Stathis
------------------------------