distinguishing eBGP from show ip BGP
motamedi at cs.uoregon.edu
Wed Mar 11 19:22:46 UTC 2015
Thanks Mark for the reply. Let me try to check what I understood is
correct. Does the 'i' on the left (status code) only shows whether the
prefix belongs to this AS?
What I want to figure out is if this two ASes (the owner of the router and
and the first one on the AS-PATH) connect at the location of the router, or
if packets need to stay for some hops in the local AS.
On Wed, Mar 11, 2015, 2:51 PM Mark Tinka <mark.tinka at seacom.mu> wrote:
> On 11/Mar/15 20:32, Reza Motamedi wrote:
> > Hi Nanog,
> > For a research I want to distinguish the external AS peering from "show
> > BGP". In other words I want to see which entry show a path that
> > sends packets to another AS. My understanding is that *status code* shows
> > if the route is internal, right? Does this mean if the *'i' *is not
> > present, the route is goes out of the AS in the next hop. On the same
> > can I use "Next Hop" to identify such entries?
> > I just included a sample report from a public looking glass in XO.
> > show ip bgp 18.104.22.168/15 longer-prefixes
> > BGP table version is 529230540, local router ID is 22.214.171.124
> > * * *Status codes: s suppressed, d damped, h history, * valid, > best,
> i -
> > internal,
> > r RIB-failure, S Stale, m multipath, b backup-path, x
> > best-external, f RT-Filter, a additional-path
> > Origin codes: i - IGP, e - EGP, ? - incomplete
> > Network Next Hop Metric LocPrf Weight Path
> > * 126.96.36.199/15 188.8.131.52 3 0 2828 209
> > * 184.108.40.206 2 0 2828 209 i
> > * 220.127.116.11 3 0 2828 209 i
> > * 18.104.22.168 3 0 2828 209 i
> > *> 22.214.171.124 2 0 2828 209 i
> > * 126.96.36.199 3 0 2828 209 i
> > * 188.8.131.52 2 0 2828 209 i
> > * 184.108.40.206 2 0 2828 209 i
> > * 220.127.116.11 3 0 2828 209 i
> > * 18.104.22.168 2 0 2828 209 i
> > * 22.214.171.124 2 0 2828 209 i
> There are two uses of the "i" code in IOS:
> 1. "i" for Status codes refers to the route being learned via iBGP.
> 2. "i" for Origin codes refers to the route being learned via a
> locally-generated route at the origin (or more historically, the IGP).
> In IOS "show ip bgp" output, the "i" for Status code (iBGP) is to the
> left of the prefix. On the other hand, the "i" for Origin code
> (IGP-originated route) is to the right of the originating AS in the
> So you need to be more interested in the "i" to the left of the prefix.
> In your output above, no such "i" exists; ergo, these are eBGP-learned
> routes from this router's point of view.
> Use of the NEXT_HOP attribute to identify whether a route is
> eBGP-learned is not reliable, especially if you do not own the network
> you're getting your data from.
More information about the NANOG