Re: bgp med comparision.

From: Chen Kwong Wai William (kwchen@netvigator.com)
Date: Tue Aug 12 2003 - 20:56:42 GMT-3


Hi,

    Thx,

    My route-map in RouterA is:

    route-map setmed permit 10
    set metric 100
   !
   neighbor 193.16.0.1 route-map setmed out

Best Regards,
William Chen

----- Original Message -----
From: "Surjamukhi Chatterjea" <surchatt@cisco.com>
To: "'Chen Kwong Wai William'" <kwchen@netvigator.com>
Sent: Wednesday, August 13, 2003 3:26 AM
Subject: RE: bgp med comparision.

> Hello Chen,
>
> From the doc CD,
> "The most recent Internet Engineering Task Force (IETF) decision regarding
> BGP MED assigns a value of infinity to the missing MED, making the route
> lacking the MED variable the least preferred. The default behavior of BGP
> routers running Cisco IOS software is to treat routes without the MED
> attribute as having a MED of 0, making the route lacking the MED variable
> the most preferred. To configure the router to conform to the IETF
standard,
> use the bgp bestpath med missing-as-worst router configuration command."
>
> "bgp-always-compare-med" is used to do med comparison for paths from
> neighbors in different ASs, because
> by defulat the med comparison is used for paths from neighbors in same
> systems.
> "bgp deterministic med" is used in a confederation, to choose the best
path
> among several advertised
> by a single sub-autonomous system
>
> What does your route-map look like? Here is an example I had:
>
>
> r5----150.50.100.0/27---r6
> \ /
> \ /
> \ /
> \ /
> \ /
> \ /
> \ /
> \ /
> \ /
> \ /
> r7
>
>
> R5 in AS 5, R6 in AS 6, R7 in AS7. We will manipulate MED for network
> 150.50.100.0/27
>
> R5#c | beg router bgp
> router bgp 5
> no synchronization
> bgp log-neighbor-changes
> network 150.50.100.0 mask 255.255.255.224
> neighbor 150.50.7.7 remote-as 7
> neighbor 150.50.7.7 route-map setmed out
> no auto-summary
> route-map setmed permit 10
> match ip address 10
> set metric 50
> !
> route-map setmed permit 20
> access-list 10 permit 150.50.100.0 0.0.0.255
>
> R6#c | beg router bgp
> router bgp 6
> no synchronization
> bgp log-neighbor-changes
> network 150.50.100.0 mask 255.255.255.224
> neighbor 150.50.7.7 remote-as 7
> no auto-summary
>
> R7#c | beg router bgp
> router bgp 7
> no synchronization
> bgp log-neighbor-changes
> neighbor 150.50.7.5 remote-as 5
> neighbor 150.50.7.6 remote-as 6
> no auto-summary
>
> R7#sh ip bg
> BGP table version is 2, local router ID is 200.0.0.7
> Status codes: s suppressed, d damped, h history, * valid, > best, i -
> internal,
> r RIB-failure, S Stale
> Origin codes: i - IGP, e - EGP, ? - incomplete
>
> Network Next Hop Metric LocPrf Weight Path
> * 150.50.100.0/27 150.50.7.5 50 0 5 i
> *> 150.50.7.6 0 0 6 i
>
> Both routes appear in R7 BGP Table. R7 installs the route through R6 in
the
> IP routing
> table.
>
>
> ---------------------
>
> Same config, just add bgp bestpath med missing-as-worst under R6 BGP
> process, since that is the router
> sending MED value of 0 (default). Now the route through R5 becomes
preferred
> with the ">" sign next to it, and
> gets installed in the RT of R7
>
> R7#sh ip bg
> BGP table version is 2, local router ID is 200.0.0.7
> Status codes: s suppressed, d damped, h history, * valid, > best, i -
> internal,
> r RIB-failure, S Stale
> Origin codes: i - IGP, e - EGP, ? - incomplete
>
> Network Next Hop Metric LocPrf Weight Path
> *> 150.50.100.0/27 150.50.7.5 50 0 5 i
> * 150.50.7.6 0 0 6 i
>
> HTH
> Surja
>
>
>
>
> -----Original Message-----
> From: nobody@groupstudy.com [mailto:nobody@groupstudy.com]On Behalf Of
Chen
> Kwong Wai William
> Sent: Tuesday, August 12, 2003 11:55 AM
> To: ccielab@groupstudy.com
> Subject: bgp med comparision.
>
>
> Dear all,
>
> Can any one explain to me what is the usage of these bgp commands,
>
> bgp deterministic-med
> bgp med missing-as-worst
> bgp always-compare-med
>
> I've try the following lab to test the commands
>
> (Route A) ----- (Router B) ---- (Router C)
>
> Both Router A & C generate a 150.150.150.0/24 router to Router B, and
I
> turn on the above three commands on Router B, and however, I cannot get
the
> "true" result.
>
> RouterB#sh ip bgp
> BGP table version is 3, local router ID is 193.16.0.1
> 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
> *> 150.150.150.0/24 172.16.0.18 0
> 0 65532 i
> * 193.16.0.2 100
> 0 65530 i
>
> RouterB#sh run | begin bgp
> router bgp 65531
> bgp always-compare-med
> bgp log-neighbor-changes
> bgp deterministic-med
> bgp bestpath med missing-as-worst
> neighbor 172.16.0.18 remote-as 65532
> neighbor 193.16.0.2 remote-as 65530
> !
>
> RouterA#sh run | begin bgp
> router bgp 65530
> bgp log-neighbor-changes
> network 150.150.150.0 mask 255.255.255.0
> neighbor 193.16.0.1 remote-as 65531
> neighbor 193.16.0.1 route-map setmed out
> !
>
> RouterC#sh run | begin bgp
> router bgp 65532
> bgp router-id 4.4.4.4
> bgp log-neighbor-changes
> network 150.150.150.0 mask 255.255.255.0
> neighbor 172.16.0.17 remote-as 65531
> !
>
> Best Regards,
> William Chen
>
>
> _______________________________________________________________________
> You are subscribed to the GroupStudy.com CCIE R&S Discussion Group.
>
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html



This archive was generated by hypermail 2.1.4 : Tue Sep 02 2003 - 18:53:58 GMT-3