On Tue, Nov 23, 2010 at 12:59:00PM +0100, Petr Šťastný wrote:
What is the meaning of word "neighbor" in this context?
protocol static defaultgw { route 0.0.0.0/0 via 192.168.1.20; }
This static route will disappear from routing table when: a) 192.168.1.20 is not reachable (no route to host, no entry in local routing table, router doesn't know how to reach it) b) 192.168.1.20 is not a neighbor in any routing protocol at the moment (for example BGP session with 192.168.1.20 becomes down)
Neighbor means that the IP address is directly reachable by a local network (there is an interface with IP prefix that contains that address). It is irrelevant whether there is a route to that IP address in a routing table.
The goal is to shut down default route when BGP session with the BGP neighbor goes down. So b) would be better behavior for me.
The only way how to do this is to make a shell script that checks the status of BGP sessions a enables/disables static routes?
Yes, that is the only way. -- Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."