Dynamic routing protocols: BGP, OSPF, RIP
U
SER
G
UIDE
214
If the LAN cable is disconnected, the result is:
root@IMOLA>
show ip bgp neighbor 88.58.10.245 advertised-routes
BGP table version is 0, local router ID is 172.20.1.221
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Next Hop Metric LocPrf Weight Path
*> 172.20.1.221/32 88.58.10.246 1
32768 ?
Total number of prefixes 1
Where it is possible to notice that that the local network has disappeared from the announcements
and will reappear once the connection is restored.
However, for the working of the mechanism the following command must be specified:
detect-link-state <ifname>
13
where
<ifname>
is the LAN interface.
An interface list can be configured:
detect-link-state eth1.10 eth1.10 eth1.20 eth1.30
Static routes redistribution with BGP
In the same way it is possible to configure BGP in order to announce routes towards which there is a
static route:
set bgp local-as 65201
set bgp neighbor 88.58.10.245 remote-as 3269
set bgp neighbor 88.58.10.245 description eBGP
set bgp redistribute connected route-map ConnBGP
set bgp redistribute static route-map StatBGP
set bgp route-map ConnBGP permit 10 match ip address prefix-list LocNetworks
set bgp ip prefix-list LocalNetwork seq 10 permit 10.45.15.192/27
set bgp route-map StatBGP permit 10 match ip address prefix-list StatRoute
set bgp ip prefix-list StatRoute seq 10 permit 44.44.0.0/16
set bgp ip prefix-list StatRoute seq 20 permit 55.55.0.0/16
Announced routes are:
root@IMOLA>
show ip bgp neighbor 88.58.10.245 advertised-routes
BGP table version is 0, local router ID is 172.20.1.221
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, R Removed
13
-
In order to execute the command after router reboot, the following command must be used:
set autocmd detect-link-state <ifname>