I'm sure this is a FAQ, but I've been unable to find anything posted.
I have two routers (r1 & r2) in a private AS. My ISP provides two routers (pe1 & pe2) in his public AS. R1 has a link (10gb pp ethernet) to pe1, and similarly r2 a link to pe2. I run eBGP on each on each ISP link, and iBGP on my link between r1 and r2. My ISP sends me a default route on each link. This works fine when everything is up.
If one of my links to my ISP is down, I want the traffic on that router to flow to my other router and out that ISP link. Eg, if r1 <-> pe1 is down, use r1 <-> r2 <-> pe2, and vice versa. In essence, I want to do a conditional originate-default on the iBGP link, with the condition being that the originating iBGP in fact is getting a default route from its ISP router. (I am not particularly concerned about load balancing at this point.)
My problem is I have not figured out how to specify the condition. In addition to the default route, I also get some /16s from my ISP. If I use a route-map with a match on one of the /16s, I can't tell whether that /16 is coming from say r1 directly, or r2 over the iBGP link. Is there a way to write a route-map to say match only if the route is from the directly attached ISP router?
I don't want to test just for interface up/down, as it's possible to have an interface up but no BGP link. I thought about just using low-priority static defaults on r1/r2 which would get overridden by the ISP default when the BGP link is operational, but in the case that both pe1 and pe2 are down, then I wind up with dueling static routes (ie, a loop).
Any suggestions appreciated!
Chris Thomas, network engr, UCLA
>> BGP won't redistribute a default route
yes but once a default route is in the BGP table it should be treated as any other prefix and passed to other neighobors
propagation of a received BGP route is not a form of redistribution I'm out of office now but tomorrow I can check in our DMZ.
I remember the most difficult part is to have a router to inject a default route in BGP.
But once it is on the table it is propagated as any other BGP route
As a safe step you could even use
router bgp xx
network 0.0.0.0 backdoor
Hope to help