[j-nsp] Interpreting output of "show route route protocol bgpdetail"

Luis Ximenez Gomez lxg at luis.geezas.net
Sat Jun 13 07:12:16 EDT 2009


Hi Juaid,

This is an interesting one, and is intentionally disegned like this to help
the encoding of the protocol which surely has an instruction to select BGP
attributes with a lower value always. This works great unless you evaluate
LocalPref (the higher the better). Way around it? Just make Local pref
values negative :)  It's just a trick

>From the manual:

"In every routing metric except for the BGP LocalPref attribute, a lesser
value is preferred. In order to use common comparison routines, JUNOS
software stores the 1's complement of the LocalPref value in the Preference2
field. For example, if the LocalPref value for Route 1 is 100, the
Preference2 value is -101. If the LocalPref value for Route 2 is 155, the
Preference2 value is -156. Route 2 is preferred because it has a higher
LocalPref value and a lower Preference2 value"

Hope it helps,

Luis

> -----Original Message-----
> From: juniper-nsp-bounces at puck.nether.net 
> [mailto:juniper-nsp-bounces at puck.nether.net] On Behalf Of Junaid
> Sent: sábado, 13 de junio de 2009 12:51
> To: Juniper-Nsp
> Subject: [j-nsp] Interpreting output of "show route route 
> protocol bgpdetail"
> 
> Hi, there is something that's bothering me for quite a while; 
> can anyone please explain what does "-101" signify in the 
> following output in the "Preference" field:
> 
> # run show route protocol bgp detail
> 
> inet.0: 20 destinations, 20 routes (20 active, 0 holddown, 0 hidden)
> 192.168.20.0/24 (1 entry, 1 announced)
>         *BGP    Preference: 170/-101
>                 Next hop type: Indirect
>                 Next-hop reference count: 3
>                 Source: 10.0.4.13
>                 Next hop type: Router, Next hop index: 131071
>                 Next hop: 10.0.4.6 via em3.12
>                 Next hop: 10.0.4.13 via em3.13, selected
>                 Protocol next hop: 10.0.4.2
>                 Indirect next hop: 8a2209c 131072
>                 State: <Active Int Ext>
>                 Local AS: 65412 Peer AS: 65412
>                 Age: 3:48       Metric2: 10
>                 Task: BGP_65412.10.0.4.13+179
>                 Announcement bits (2): 0-KRT 5-Resolve tree 2
>                 AS path: I (Originator) Cluster list:  1.1.1.1
>                 AS path:  Originator ID: 10.0.6.2
>                 Localpref: 100
>                 Router ID: 10.0.3.3
> 
> 
> Thank you.
> 
> -- 
> 
> Regards,
> Junaid
> _______________________________________________
> juniper-nsp mailing list juniper-nsp at puck.nether.net 
> https://puck.nether.net/mailman/listinfo/juniper-nsp
> 




More information about the juniper-nsp mailing list