Set Metric-type and iBGP routes

From: gladston@br.ibm.com
Date: Wed Aug 25 2004 - 15:21:32 GMT-3


Tests showed that MED represents IGP routes only if locally originated. If the route is learned through iBGP, set metric-type internal does not cause the route to be announced with IGP metric.
Reading Cisco doc I undertood that it would be different, iBGP learned routes also would be affected.
The version I tested is 12.2(1d).
Any Comments Appreciated.

===========
quoted

set metric-type internal

Usage Guidelines
This command will cause BGP to advertise a MED value that corresponds to the IGP metric associated with the next hop of the route. This command applies to generated, internal BGP (iBGP)-, and eBGP-derived routes.

==========

This works:

r2#srb bgp
router bgp 2
 no synchronization
 bgp log-neighbor-changes
 bgp dampening
 network 172.16.1.0 mask 255.255.255.0
 network 172.16.2.0 mask 255.255.255.0
 network 172.16.3.0 mask 255.255.255.0 backdoor
 neighbor 172.16.12.1 remote-as 2
 neighbor 172.16.12.1 next-hop-self
 neighbor 172.16.23.3 remote-as 3
 neighbor 172.16.23.3 route-map Metric out
 no auto-summary

r2#sb
BGP table version is 6, local router ID is 172.16.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network Next Hop Metric LocPrf Weight Path
*> 172.16.1.0/24 172.16.12.1 11 32768 i
*> 172.16.2.0/24 0.0.0.0 0 32768 i
*> 172.16.3.0/24 172.16.23.3 0 0 3 i
r2#

r3#sb
BGP table version is 126, local router ID is 172.16.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network Next Hop Metric LocPrf Weight Path
*> 172.16.1.0/24 172.16.23.2 11 0 2 i
*> 172.16.2.0/24 172.16.23.2 0 0 2 i
*> 172.16.3.0/24 0.0.0.0 0 32768 i

This does not work. The difference is that R2 is learning the route 172.176.1.0 through iBGP from R1

r2#sb
BGP table version is 8, local router ID is 172.16.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network Next Hop Metric LocPrf Weight Path
*>i172.16.1.0/24 172.16.12.1 0 100 0 i
*> 172.16.2.0/24 0.0.0.0 0 32768 i
*> 172.16.3.0/24 172.16.23.3 0 0 3 i

r3#sb
BGP table version is 128, local router ID is 172.16.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network Next Hop Metric LocPrf Weight Path
*> 172.16.1.0/24 172.16.23.2 0 0 2 i
*> 172.16.2.0/24 172.16.23.2 0 0 2 i
*> 172.16.3.0/24 0.0.0.0 0 32768 i



This archive was generated by hypermail 2.1.4 : Fri Sep 03 2004 - 07:02:48 GMT-3