I have set up BGP on two routers using qugga. When I down the interface that holds the IP block that I am advertising zerba removes the route from its table but bgpd keeps advertising it. I can see that it is still advertised via the neighboring BGP tables as well as the show ip bgp nei 172.16.14.1 ad
command from the router that is doing the advertising. This interface holds the full route that is being advertised so there is no aggregation.
As anyone run into this before ... it seems to fundamentally break the main functionality of a routing protocol...
Update:
So in the router I have the following for a BGP table.
so-rt1# show ip bgp
BGP table version is 0, local router ID is 172.16.14.1
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
*> 0.0.0.0 12.12.12.12 200 0 5555 i
* 15.15.15.0/24 172.16.14.2 0 100 0 i
*> 0.0.0.0 0 32768 i
Total number of prefixes 2
For the 15.15.15.0/24 network, which I announce, the directly connect route (the last entry) is the route that is preferred. If I shutdown the interface that holds 15.15.15.0/24 not only is the directly connected route not removed from the BGP table, it is still the preferred route. So after shutting down that interface, the BGP table stays exactly the same.
Zebra is aware that the directly connected 15.15.15.0/24 route is no longer there. I see it with show ip route
while the interface is up and the entry is gone when I shut it down. So the problem I think is that the BGP table is somehow not getting the updates I believe it should from zebra.
If I understand the question correctly you have an IGP (or local) route to the network, and you annouce it over BGP. When the route vanishes in the IGP (or local) you want BGP to pull the route.
If that is the case you are doing stuff wrong(TM), and Quagga will not let you easily do this. From the manual for the network command:
This is due to the increased flapping you can easily get if you export IGP information in BGP. We have enough of a route churn on the internet allready, and it's considered bad practice to redistribute routing information from IGP into BGP. BGP is not an IGP, and don't abuse it as one ;)
Also I can't really see any good cases for pulling the route from the Internet (it will cause flapping and you risk getting dampened for hours or days), unless you are ending up in a split-AS situation if this specific route is gone and want to protect yourself from the weird routing issues this can cause. (In this case, you should consider if you want the router to stay online at all. Split-AS situations are nasty!)
The correct solution(TM) is to leave the route up and as stable as possible, regardless of what your IGP is doing. If you lose the connection to the network just drop the traffic locally. Make sure you don't loop it back to your transit provider if the IGP route to the network is down.
The basic rule is "never change your BGP announcements unless it's something the whole Internet has to know about". That your IGP is flapping is not something the rest of the Internet cares about.
Edit:
From what I understand your network looks like this:
And your problem is that if you take down the interface on Router1 towards 15.15.15.0/24 you want it to stop announcing the network so you shift the data over to 172.16.14.2. This type of automatic changes to your peering policy is not something you usually do, and is as far as I know not something supported by Quagga. Instead you are expected to reroute the data over the IGP and keep your peerings static. If you were to do changes to your peerings you would change the MED (MULTI_EXIT_DISC) to steer the traffic to the right router.
Note that if taking down 15.15.15.0/24 splits your AS you have additional failure modes, none of them good.