[c-nsp] Finding AS Edge Intefaces
John Osmon
josmon at rigozsaurus.com
Mon Mar 19 23:04:20 EST 2007
On Mon, Mar 19, 2007 at 07:39:32AM -0800, Tony Tauber wrote:
> For a bunch of different purposes, it seems useful to be able to
> detect which interfaces represent the "edges" of an Autonomous System
> and which neighboring ASN lies across the link.
[...]
> Anyone have a programmatic way to derive these relationships either by
> examining the config (preferable) or the state of the router (CLI or
> SNMP) or a combination of the two?
Variations on a theme:
http://www.nanog.org/mtg-0210/ppt/stephen.pdf
One (likely bad) idea that comes to mind is:
- clogin -c 'sh ip bgp sum' | <snarf ASNs and neighbor addresses>
- for each ASN snarfed:
- for each neighbor address
- clogin -c 'sh ip route <IP address>' | <snarf interface(s)>
- spit out interfaces
I'm sure someone will come up with a better idea, rather quickly.
(Nothing seems to bring people out better then putting some trashy
psuedo-code out where others will find it.)
More information about the cisco-nsp
mailing list