Re: Set BGP Metic in Routes

From: Chris Lewis (chrlewiscsco@gmail.com)
Date: Wed Jun 14 2006 - 13:02:27 ART


Feras,

The metric value displayed in the show ip bgp output is the MED value, if
sent with the route.
The show ip bgp A.B.C.D display has an extra metric value in parenthesis and
that is the IGP metric to the next hop advertizing the route.

The metric displayed in parentheses will not be shown if the next hop for
the route is a directly connected neighbor.

Interestingly this does not take administrative distance in to account, so
if you learn next hops from RIP and another protocol like EIGRP that uses
bigger numerical values for its metric, the path via RIP will be preferred
by BGP.

Chris

On 6/14/06, Feras Abunamous (fabunamo) <fabunamo@cisco.com> wrote:
>
> On a similar matter, the output of sh ip bgp is always confusing for the
> metric command. Sometimes you see a balnk for the metric value and
> sometimes you see a zero. Is there anyway we can control that?
>
>
>
> -----Original Message-----
> From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
> Victor Cappuccio
> Sent: Wednesday, June 14, 2006 1:55 AM
> To: 'Victor Cappuccio'; 'Petr Lapukhov'
> Cc: ccielab@groupstudy.com
> Subject: RE: Set BGP Metic in Routes
>
> Please sorry I pasted the router output bad
>
>
>
> *Mar 1 13:58:00.383: BGP(0): 145.1.136.6 rcvd UPDATE w/ attr: nexthop
> 145.1.136.6, origin i, localpref 100, me
>
> tric 0
>
> -------------
>
> *Mar 1 13:41:36.790: BGP(0): 145.1.136.1 rcvd UPDATE w/ attr: nexthop
> 145.1.136.1, origin i, localpref
>
>
>
> Thanks
>
> Victor
>
>
>
> _____
>
> De: Victor Cappuccio [mailto:cvictor@protokolgroup.com]
> Enviado el: Miircoles, 14 de Junio de 2006 02:48 a.m.
> Para: 'Petr Lapukhov'
> CC: 'ccielab@groupstudy.com'
> Asunto: RE: Set BGP Metic in Routes
>
>
>
> Petr thanks for your reply, By the Telephone Book: the Multi Exit
> Discriminator (MED) value on prefixes advertised to external BGP (eBGP)
> neighbors to match the Interior Gateway Protocol (IGP) metric of the
> next
> hop, we must use the set metric-type internal command in route-map and
> to
> return to the default, we use the no form of this command, so there is
> no
> default metric for route advertised.
>
> My Question is why attributes like the Metric are not propagated for
> some
> routes but for others
>
> Look at this output
>
> *Mar 1 13:41:36.790: BGP(0): 145.1.136.1 rcvd UPDATE w/ attr: nexthop
> 145.1.136.1, origin i, localpref 100
>
> And the difference with this output
>
> *Mar 1 13:41:36.790: BGP(0): 145.1.136.1 rcvd UPDATE w/ attr: nexthop
> 145.1.136.1, origin i, localpref 100
>
> Im looking for some command on the remote-side, to send the metric
> value of
> 0 (this seems to be contradictory by my interpretation with RFC 4451
> <http://www.ietf.org/rfc/rfc4451.txt>
> http://www.ietf.org/rfc/rfc4451.txt
> For example, earlier versions of the specification called for a missing
> MED
> to be assigned the highest possible MED value (i.e., 2^32-1). ) .. Yes
> we
> have bgp bestpath med missing-as-worst command but Im starting to
> think
> that confusion is part this journey.
>
> Thanks Again
> Victor.
>
>
>
>
>
>
>
>
>
>
> _____
>
> De: Petr Lapukhov [mailto:petrsoft@gmail.com]
> Enviado el: Miircoles, 14 de Junio de 2006 02:19 a.m.
> Para: Victor Cappuccio
> CC: ccielab@groupstudy.com
> Asunto: Re: Set BGP Metic in Routes
>
>
>
> Victor,
>
> Usually, when you originate a prefix into BGP, it make metric attribute
> from IGP metric. It does not matter if this is hop count or OSPF cost,
> or EIGRP composite metric :)
>
> When you do some "internal" prefix generation, like default-originate,
> you may not have metric attribute at all :) It's optional, after all :)
>
> HTH
> Petr
>
> 2006/6/14, Victor Cappuccio <cvictor@protokolgroup.com>:
>
> Hi Guys,
>
>
>
> Why sometimes when checking the BGP Table we can observe routes with a
> metric value set and sometimes not
>
> Like in this case:
>
>
>
> BGP routing table entry for 0.0.0.0/0, version 7
>
> Paths: (2 available, best #1, table Default-IP-Routing-Table)
>
> Multipath: iBGP
>
> Advertised to non peer-group peers:
>
> 145.1.37.7 145.1.53.5 145.1.136.6
>
> Local, (Received from a RR-client)
>
> 145.1.136.1 from 145.1.136.1 (150.1.1.1) <<<<< === See
> there is
> no metric value set
>
> Origin IGP, localpref 100, valid, internal, multipath, best
>
> Local, (Received from a RR-client)
>
> 145.1.136.6 from 145.1.136.6 (150.1.6.6)
>
> Origin IGP, metric 0, localpref 100, valid, internal, multipath
> <<<<<
> === the metric is set to 0
>
>
>
>
>
> R3 is a RR peering with R1 and R6 in the same Ethernet segment
>
>
>
>
>
> And the configuration in R1 and R6 looks like this:
>
>
>
> Rack1R6#show run | be router bgp
>
> router bgp 100
>
> bgp router-id 150.1.6.6
>
> bgp log-neighbor-changes
>
> neighbor 54.1.10.254 <http://54.1.10.254> remote-as 54
>
> neighbor 145.1.136.3 remote-as 100
>
> !
>
> address-family ipv4
>
> neighbor 54.1.10.254 activate
>
> neighbor 54.1.10.254 dmzlink-bw
>
> neighbor 145.1.136.3 activate
>
> neighbor 145.1.136.3 send-community both
>
> neighbor 145.1.136.3 next-hop-self
>
> neighbor 145.1.136.3 default-originate
>
> neighbor 145.1.136.3 route-map DENYALL out
>
> no auto-summary
>
> no synchronization
>
> exit-address-family
>
>
>
>
>
> Rack1R1#show run | b router bgp
>
> router bgp 100
>
> bgp router-id 150.1.1.1
>
> bgp log-neighbor-changes
>
> neighbor 145.1.136.3 remote-as 100
>
> neighbor 204.12.1.254 remote-as 54
>
> !
>
> address-family ipv4
>
> neighbor 145.1.136.3 activate
>
> neighbor 145.1.136.3 next-hop-self
>
> neighbor 145.1.136.3 send-community both
>
> neighbor 145.1.136.3 default-originate
>
> neighbor 145.1.136.3 route-map DENYALL out
>
> neighbor 204.12.1.254 activate
>
> neighbor 204.12.1.254 dmzlink-bw
>
> no auto-summary
>
> no synchronization
>
> bgp dmzlink-bw
>
> exit-address-family
>
>
>
>
>
> Rack1R3#show run | be router bgp
>
> router bgp 100
>
> bgp router-id 150.1.3.3
>
> bgp always-compare-med
>
> bgp log-neighbor-changes
>
> neighbor 145.1.37.7 remote-as 100
>
> neighbor 145.1.53.5 remote-as 200
>
> neighbor 145.1.136.1 remote-as 100
>
> neighbor 145.1.136.6 remote-as 100
>
> maximum-paths ibgp 2
>
> !
>
> address-family ipv4
>
> neighbor 145.1.37.7 activate
>
> neighbor 145.1.37.7 route-map ONLYDEFA out
>
> neighbor 145.1.53.5 activate
>
> neighbor 145.1.53.5 route-map ONLYDEFA out
>
> neighbor 145.1.136.1 activate
>
> neighbor 145.1.136.1 route-reflector-client
>
> neighbor 145.1.136.1 send-community both
>
> neighbor 145.1.136.6 activate
>
> neighbor 145.1.136.6 route-reflector-client
>
> neighbor 145.1.136.6 send-community both
>
> maximum-paths ibgp 2
>
> no auto-summary
>
> no synchronization
>
> bgp dmzlink-bw
>
> network 145.1.136.0 mask 255.255.255.0
>
> aggregate-address 145.1.0.0 255.255.0.0 <http://255.255.0.0>
> summary-only
>
> exit-address-family
>
>
>
> Any opinion here please
>
>
>
> Thanks
>
> Victor.
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html



This archive was generated by hypermail 2.1.4 : Sat Jul 01 2006 - 07:57:32 ART