Mailing List Archive

advertised route count
Is there an easy way to obtain a count for the number of advertised routes
on a specific peer? By easy I mean, easier than show route adv bgp x.x.x.x |
count and then subtracting out the number of blank and header lines? I
don't see anything in show bgp neighbor, which is the logical place I
would assume this would be (right next to the Active prefixes and Received
prefixes counts).

Also, is there a command I just can't seem to find, or any plans to add a
command under "show route" that matches only the paths selected "best"
and/or are installed for forwarding? "show route whatever | except \*"
works if you're fine with "terse", but not for much else.

--
Richard A Steenbergen <ras@e-gerbil.net> http://www.e-gerbil.net/ras
GPG Key ID: 0xF8B12CBC (7535 7F59 8204 ED1F CC1C 53AF 4C41 5ECA F8B1 2CBC)
advertised route count [ In reply to ]
On Fri, Dec 19, 2003 at 02:28:36PM -0500, Richard A Steenbergen wrote:
> Is there an easy way to obtain a count for the number of advertised routes
> on a specific peer? By easy I mean, easier than show route adv bgp x.x.x.x |
> count and then subtracting out the number of blank and header lines? I
> don't see anything in show bgp neighbor, which is the logical place I
> would assume this would be (right next to the Active prefixes and Received
> prefixes counts).
>
> Also, is there a command I just can't seem to find, or any plans to add a
> command under "show route" that matches only the paths selected "best"
> and/or are installed for forwarding? "show route whatever | except \*"
> works if you're fine with "terse", but not for much else.

enterprises.2636.5.1.1.2.6.2.1

is what you want. You also want recent software such as 6.0/6.1
I seem to recall.

- jared

--
Jared Mauch | pgp key available via finger from jared@puck.nether.net
clue++; | http://puck.nether.net/~jared/ My statements are only mine.
advertised route count [ In reply to ]
If you want to do it from the cli you can use:

show route advertising bgp x.x.x.x extensive | grep Pref | Count

This matches on one line of the output so you can get the number of
routes without any subtraction.

To see installed routes you should use:

run show pfe route summary


IPv4 Route Tables:
Index Routes Size(b)
-------- ---------- ----------
Default 26 1857
1 4 281

MPLS Route Tables:
Index Routes Size(b)
-------- ---------- ----------
Default 10 707

IPV6 Route Tables:
Index Routes Size(b)
-------- ---------- ----------
Default 6 473
1 3 221

If you want to see routes from a particular protocol then the used next
hop is marked with a Active and you can match on that and count.

show route advertising bgp x.x.x.x extensive | grep <Active | Count

Gary


On Dec 19, 2003, at 11:30 AM, Jared Mauch wrote:

> On Fri, Dec 19, 2003 at 02:28:36PM -0500, Richard A Steenbergen wrote:
>> Is there an easy way to obtain a count for the number of advertised
>> routes
>> on a specific peer? By easy I mean, easier than show route adv bgp
>> x.x.x.x |
>> count and then subtracting out the number of blank and header lines? I
>> don't see anything in show bgp neighbor, which is the logical place I
>> would assume this would be (right next to the Active prefixes and
>> Received
>> prefixes counts).
>>
>> Also, is there a command I just can't seem to find, or any plans to
>> add a
>> command under "show route" that matches only the paths selected "best"
>> and/or are installed for forwarding? "show route whatever | except \*"
>> works if you're fine with "terse", but not for much else.
>
> enterprises.2636.5.1.1.2.6.2.1
>
> is what you want. You also want recent software such as 6.0/6.1
> I seem to recall.
>
> - jared
>
> --
> Jared Mauch | pgp key available via finger from jared@puck.nether.net
> clue++; | http://puck.nether.net/~jared/ My statements are only
> mine.
> _______________________________________________
> juniper-nsp mailing list juniper-nsp@puck.nether.net
> http://puck.nether.net/mailman/listinfo/juniper-nsp
>
advertised route count [ In reply to ]
On Fri, Dec 19, 2003 at 12:49:45PM -0800, Gary Tate wrote:
> If you want to do it from the cli you can use:
>
> show route advertising bgp x.x.x.x extensive | grep Pref | Count
>
> This matches on one line of the output so you can get the number of
> routes without any subtraction.

That only works on iBGP sessions where you are passing a localpref. :P

But yes I see your point. A good hack for quickly trying to come to a
conclusion, but very slow and load intensive on the RE. If there were more
characters available on the screen I would suggest the count should be
part of show bgp summary... Actually, I personally find the count, which
is included on Foundry's show ip bgp sum, to be far more useful
information on a default summary output than the InPkt/OutPkt count.

>
> To see installed routes you should use:
>
> run show pfe route summary
>
>
> IPv4 Route Tables:
> Index Routes Size(b)
> -------- ---------- ----------
> Default 26 1857
> 1 4 281
>
> MPLS Route Tables:
> Index Routes Size(b)
> -------- ---------- ----------
> Default 10 707
>
> IPV6 Route Tables:
> Index Routes Size(b)
> -------- ---------- ----------
> Default 6 473
> 1 3 221
>
> If you want to see routes from a particular protocol then the used next
> hop is marked with a Active and you can match on that and count.
>
> show route advertising bgp x.x.x.x extensive | grep <Active | Count

I was thinking more along the lines of a way to SEE the routes selected as
best path (or not best path for that matter). Say I wanted to see them
post local processing (not the raw data that is being sent to me), I could
do show route next-hop x.x.x.x, but I don't have any way to show the
details on the ones which either are or aren't being selected as best. I
would have to do something like "terse | except "[+\*]" | match /" to
actually get just that list, and then manually check those prefixes to see
details.

I know the keyword "best" is already taken to mean show the longest match
only, but wouldn't the show route commands really benefit from a way to
match or exclude based on the selection of best path?

--
Richard A Steenbergen <ras@e-gerbil.net> http://www.e-gerbil.net/ras
GPG Key ID: 0xF8B12CBC (7535 7F59 8204 ED1F CC1C 53AF 4C41 5ECA F8B1 2CBC)
advertised route count [ In reply to ]
Richard A Steenbergen wrote:
> Is there an easy way to obtain a count for the number of advertised routes
> on a specific peer? By easy I mean, easier than show route adv bgp x.x.x.x |
> count and then subtracting out the number of blank and header lines? I
> don't see anything in show bgp neighbor, which is the logical place I
> would assume this would be (right next to the Active prefixes and Received
> prefixes counts).
>

Richard,

This has been implemented and will be available in a future release.
The output of "show bgp neighbor" will have per RIB advertised prefix
counts.

-Nischal.