RE: BGP MED

From: Bhisham Bajaj (bhishambajaj@xxxxxxxxx)
Date: Sat Apr 06 2002 - 02:23:39 GMT-3


   
There are two different tables

One is the routing table and the other is a bgp table

Ok with the routing table it works this way

The first thing is that if u have a network with the
same mask learned from different ways then

Then the less admin distance route is put in the
routing table

If booth the routes r learned from the same routing
protocol then the less metric route is put in the
table

With bgp what happens is that

The routes are put in the bgp table first where based
on some things like the med, local p, weight, router
id, origin, etc one route is preferred route and is
marked as > this route is put in the routing table

So that is if a router has a route learned by ebgp and
ibgp and the ibgp route is the preferred route in the
bgp table based on the weight or med or local pref
then the ibgp route though has a adm distance of 200
will be installed in the routing table

So I think that with bgp the ad of 20 or 200 will not
play a role unless there is some other routing
protocol that is also learning the same route

That is if I am learning the route from ebgp & ibgp &
ospf then if in the bgp table the ebgp route is the
preferred route it will get installed in the routing
table
If in the bgp table the ibgp route is the preferred
route then it will try to make it to the routing table
but will not get installed as the ospf route will get
installed.

Can some one PS confirm what I am thinking is the way
that it works or there is some other saga to it

TIA

BB

--- Jason <jgraun@attbi.com> wrote:
> Well iBGP as an Admin distance of 200 while eBGP has
> an admin distance
> of 20
>
> -----Original Message-----
> From: nobody@groupstudy.com
> [mailto:nobody@groupstudy.com] On Behalf Of
> Peter Dostal
> Sent: Friday, April 05, 2002 6:58 PM
> To: ccielab@groupstudy.com
> Subject: BGP MED
>
> I have a problem with BGP path selection process.
> Based on the BGP path
> selection process I would say that router R2 should
> choose iBGP path
> over
> eBGP (because of lower MED). Any suggestions?
> Thanks,
>
> Peter
>
>
> R1----FrameRelay----R2
> | |
> ------Ethernet-------
> |
> R3
>
> *********************************************
> hostname R1
> !
> interface FastEthernet1/1
> ip address 192.168.2.3 255.255.255.0
> !
> interface Serial1/0
> ip address 192.168.1.1 255.255.255.0
> encapsulation frame-relay
> no keepalive
> no fair-queue
> frame-relay interface-dlci 100
> !
> router bgp 2
> bgp log-neighbor-changes
> neighbor 192.168.1.2 remote-as 2
> neighbor 192.168.1.2 next-hop-self
> neighbor 192.168.2.1 remote-as 1
> neighbor 192.168.2.1 route-map BGP_MAP in
> no auto-summary
> !
> route-map BGP_MAP permit 10
> set local-preference 100
>
> *********************************************
> hostname R2
> !
> interface FastEthernet0/0
> ip address 192.168.2.2 255.255.255.0
> !
> interface Serial0/0
> ip address 192.168.1.2 255.255.255.252
> encapsulation frame-relay
> no keepalive
> no fair-queue
> frame-relay interface-dlci 100
> !
> router bgp 2
> bgp log-neighbor-changes
> neighbor 192.168.1.1 remote-as 2
> neighbor 192.168.1.1 next-hop-self
> neighbor 192.168.2.1 remote-as 1
> neighbor 192.168.2.1 route-map BGP_MAP in
> no auto-summary
> !
> route-map BGP_MAP permit 10
> set local-preference 100
> !
> *********************************************
> hostname R3
> !
> interface FastEthernet0/1
> ip address 192.168.2.1 255.255.255.0
> !
> interface Loopback0
> ip address 170.2.1.1 255.255.255.240
> !
> router bgp 1
> bgp log-neighbor-changes
> network 170.2.1.0 mask 255.255.255.240
> neighbor 192.168.2.2 remote-as 2
> neighbor 192.168.2.2 route-map BGP_MAP out
> neighbor 192.168.2.3 remote-as 2
> no auto-summary
> !
> route-map BGP_MAP permit 10
> set metric 20
>
> *********************************************
> R1#sh ip bgp
> BGP table version is 8, local router ID is
> 172.10.1.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
> *> 170.2.1.0/28 192.168.2.1 0
> 100 0 1 i
> * i 192.168.1.2 20
> 100 0 1 i
> *********************************************
> R2#sh ip bgp
> BGP table version is 8, local router ID is
> 192.168.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
> * i170.2.1.0/28 192.168.1.1 0
> 100 0 1 i
> *> 192.168.2.1 20
> 100 0 1 i
> *********************************************
>



This archive was generated by hypermail 2.1.4 : Thu Jun 13 2002 - 10:57:57 GMT-3