On 2009-01-29, Daniel Ouellet <dan...@presscom.net> wrote:
> The reason I asked is because for example I was testing configuration 
> using loopback interface and when I reboot and I do not run bgpd I can 
> ping the loopback interface no problem, however if I reboot and bgpd run 
> I can still ping it, however it will time out regularly and sometime be 
> dead for as much as a minutes in worst case and go up/down and the bgp 
> sessions with the loopback interface will flap. Not always but sometime 
> it does. I just find out by luck I guess when I work doing constant 
> ping. if I stop bgpd, all goes normal and no lost packets what so ever, 
> if I restart bgpd, then sessions come up, can stay up for a long time no 
> problem, but ping time to time to the same loopback will fail and it 
> will happened that some bgp sessions will flap. I don't recall have seen 
> this on previous version of bgpd and the configuration stayed the same, 
> just upgrade to 4.4. It's been running for a few months, but I see rare 
> flaps and digging in it, that's what I found.
>
> So, I was curious as to if any loopback interface shouldn't be use with 
> bgpd, witch I am pretty darn sure it can be done like any other bgp router.
>
> If I configure the sessions with the interface itself, it's good, if I 
> configure sessions with the loopback, I could see time to time flap and 
> ping fail to the loopback interface.

I'm using a loopback address on lo1 on my routers, but I assign
the loopback a /32 and distribute that into OSPF.

I don't have a route covering the subnet holding those /32, and
I "route add -reject default 127.0.0.1", so if they're withdrawn
from OSPF the route to the address goes away.

I'm explicitly using these addresses as router-id in both bgpd
and ospfd, and of course running the BGP sessions to (neighbour
address) and from (local-address) those addresses.

A loopback on the local router shows up like this in bgpctl sh fib:

...
flags: * = valid, B = BGP, C = Connected, S = Static
       N = BGP Nexthop reachable via this route
       r = reject route, b = blackhole route

flags prio destination          gateway
*        4 195.95.187.1/32      195.95.187.1
...
and another router's loopback like this:
...
*       32 195.95.187.3/32      195.95.187.243

(this is on -current; on 4.4 you won't have the priorities.
prio 4 is connected, 32 is ospf, bgp would be 48).

Reply via email to