[j-nsp] BGP Peer formatting

Ben Dale bdale at comlinx.com.au
Tue Sep 9 21:32:50 EDT 2014


On 10 Sep 2014, at 7:54 am, Scott Harvanek <scott.harvanek at login.com> wrote:

> This is a silly/OCD question;
> 
> I've faced this before and I can't recall how it was "prettied" up...
> 
> If I recall there is a way to pretty up the formatting of show bgp summary;
> 
> Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
> XXX.XXX.XXX.XXX       XXXXX    4463666     120866       0       0 5w3d 9:31:20 Establ
>  inet.0: 272410/510233/510233/0
> 
> To remove the line break / fix the table formatting.  I've tried adjusting screen-width with no joy.
> 
> Halp?

There's a few ways to neaten it, but it's a case of which information you can live without:

show bgp summary | except inet 
show bgp group summary | match l:

Failing that, I just hacked up an op script to only show a summarised version from each peer - output here:

https://github.com/dfex/DFEXjunoscripts/blob/master/show-bgp-neat.md

Code here:

https://github.com/dfex/DFEXjunoscripts/blob/master/show-bgp-neat.slax

The script *should* sum all the prefixes from each RIB into a single summarised number per peer, but I haven't had a chance to test it too thoroughly yet.  Feedback/Pull Requests welcome.

Cheers,

Ben





More information about the juniper-nsp mailing list