Show BGP peer data when session is down?

Lars-Johan Liman liman at netnod.se
Wed Jun 29 17:08:40 CEST 2011


If you have an established BGP session, you can find out a lot of the
session details using

# birdc show protocols all <bgp_proto_id>

Specifically, you can look at

  BGP state:		...
    Session:		...
    Neighbor AS:	...
    Neighbor ID:	...
    Neighbor address:	...
    Nexthop address:	...
    Source address:	...
    Neighbor caps:	...
    Route limit:	...
    Hold timer:		...
    Keepalive timer:	...

Now, if the session is terminated for one reason or another, the info
disappears.

  BGP state:		Passive
    Last error:		Received: Administrative shutdown

and that's it.

This makes it very hard to create scripts that keep an eye on specific
peering sessions based on the identity (remote IP address) of the
peer, because once the session is down, you can no longer find it,
because the IP address is nowhere in the output. :-P

Is there a birdc command that shows me BGP session info including the
_expected_ peer info, as configured, so I can identify my sessions and
keep an eye on them as they come and go?

I have mentally explored two alternative ways: a) To code the remote IP
into the BGP protocol identifier for that particular session and make my
script match on that, or b) to parse the BIRD config file to establish
the mapping between a certan BGP protocol identifier and the
corresponding remote IP. Both strike me as "suboptimal" ... :-/

If the answer to my question above is "no", please consider this a
feature request ... ;-)

				Cheers,
				  /Liman
#----------------------------------------------------------------------
# Lars-Johan Liman, M.Sc.               !  E-mail: liman at netnod.se
# Senior Systems Specialist             !  Tel: +46 8 - 562 860 12
# Netnod Internet Exchange, Stockholm   !  http://www.netnod.se/
#----------------------------------------------------------------------



More information about the Bird-users mailing list