Show BGP peer data when session is down?
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@netnod.se # Senior Systems Specialist ! Tel: +46 8 - 562 860 12 # Netnod Internet Exchange, Stockholm ! http://www.netnod.se/ #----------------------------------------------------------------------
On Wed, Jun 29, 2011 at 05:08:40PM +0200, Lars-Johan Liman wrote:
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
Hello Generally, the protocols are supposed to be identified by their names, so we usually do not print 'static' information which is directly from config files. But as it seems that this is requested feature, we could change some of output that is available only when the session is to be available all times. Some of these values can be easily avaliable all times (like Neighbor ASN and address), some are complicated (like Nexthop address and Session) and some are dynamic and unavailable when off (like Neighbor ID or timers) I would prefer to make available just 'Neighbor AS' and 'Neighbor address' fields. Perhaps 'Session' too. Is this sufficient for your purposes? -- 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."
Hello, Ondrej, Sorry for the late reply. I've been on a very long vacation. santiago@crfreenet.org:
On Wed, Jun 29, 2011 at 05:08:40PM +0200, Lars-Johan Liman wrote:
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
Hello
Generally, the protocols are supposed to be identified by their names, so we usually do not print 'static' information which is directly from config files.
But as it seems that this is requested feature, we could change some of output that is available only when the session is to be available all times. Some of these values can be easily avaliable all times (like Neighbor ASN and address), some are complicated (like Nexthop address and Session) and some are dynamic and unavailable when off (like Neighbor ID or timers)
I would prefer to make available just 'Neighbor AS' and 'Neighbor address' fields. Perhaps 'Session' too. Is this sufficient for your purposes?
It is indeed. That way I can trigger my monitoring system on useful input, and keep track of sessions that have "disappeared". It would be very much appreciated if you could make that change in a future release. Best regards, /Liman
On Wed, Aug 17, 2011 at 02:54:38PM +0200, Lars-Johan Liman wrote:
I would prefer to make available just 'Neighbor AS' and 'Neighbor address' fields. Perhaps 'Session' too. Is this sufficient for your purposes?
It is indeed. That way I can trigger my monitoring system on useful input, and keep track of sessions that have "disappeared".
It would be very much appreciated if you could make that change in a future release.
Done in v1.3.3 -- 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."
santiago@crfreenet.org:
On Wed, Aug 17, 2011 at 02:54:38PM +0200, Lars-Johan Liman wrote:
I would prefer to make available just 'Neighbor AS' and 'Neighbor address' fields. Perhaps 'Session' too. Is this sufficient for your purposes?
It is indeed. That way I can trigger my monitoring system on useful input, and keep track of sessions that have "disappeared".
It would be very much appreciated if you could make that change in a future release.
Done in v1.3.3
Warm thanks for fixing this! Much appreciated! I'm rushing to get it the new version. Cheers, /Liman
participants (2)
-
Lars-Johan Liman -
Ondrej Zajicek