cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1200
Views
12
Helpful
7
Replies

bgp bestpath med missing-as-worst

Kevin Dorrell
Level 10
Level 10

I am trying the

1 Accepted Solution

Accepted Solutions

s.arunkumar
Level 3
Level 3

Hi kevin,

Isnt that ur update coming from two different AS,ie 300 n 200,hence the MED is not being compared..

Since ur med is not compared and both are learned via ebgp,next thing is the lowest path towards the next-hop.If both are same then,comes the update which is learned first.If that too ignored then,lowest router id is considered..

View solution in original post

7 Replies 7

s.arunkumar
Level 3
Level 3

Hi kevin,

Isnt that ur update coming from two different AS,ie 300 n 200,hence the MED is not being compared..

Since ur med is not compared and both are learned via ebgp,next thing is the lowest path towards the next-hop.If both are same then,comes the update which is learned first.If that too ignored then,lowest router id is considered..

Hi,

Yes, S.Arunkumar is refering to the NOTE if using MED which states "This comparison only occurs if the first (the neighboring) AS is the same in the two paths."

Regards,

Dandy

Hi Arun,

I think you are right, the MED is not being compared because the updates are from two different AS. I was beginning to think along those lines when I took a coffee break to think about it.

My objective was to see how many different ways I could get this router to prefer the paths through 151.90.45.4 over the ones through 151.90.25.2. What confused me was that I had been playing with the MED, and it did seem to make a difference. But I think my experiment was misleading. This is what I did, and why I was mislead.

First I got 151.90.45.4 to mark MED=100. I then cleared that connection. Sure enough, the route through 151.90.25.2 was preferred, I thought because of the MED. (In fact it was because it was the oldest one!)

I then got 151.90.25.2 to mark MED=200, and cleared both connections. Sure enough, the route through 151.90.45.4 was preferred, I thought because of the MED. (In fact, it was because it was that one that came up first.)

I then took away the marking from 151.90.25.2, and set missing-as-worst on R5, expecting the route from 151.90.45.4 to be preferred. But it wasn't.

All the time I thought I was testing MED, but in fact I was just testing which route was oldest.

Now I shall go away and play with the "always compare MED" parameter.

Thanks again.

Kevin Dorrell

Luxembourg

Danilo Dy
VIP Alumni
VIP Alumni

Hi Kevin,

I don't know the answer for that as everything are the same and in order(according to BGP Best Path Algorithm), only the metric is different. But I just notice the metric for the best path, shouldn't it be 4294967294 and not 4294967295? From what I understand, if the metric learned from the BGP neighbor is 4294967295, it will change it to 4294967294 before injecting it into the routing table. Also, if you enabled "med missing-as-worst", the metric should be 4294967294.

Regards,

Dandy

Hi kevin,

If you use the following command, then it will prefer the one option of the BGP route.

This compare MED , even though there are in 2 different AS number , i.e routes coming from next BGP peer

bgp always-compare-med

Regards

PRakash

Hi Dandy,

Thank you (and thank you everyone else too) for your answers. I shall respond to each posting individually.

Concerning the point about the high metric, this was the metric the local router (R5) invented because of its med missing-as-worst.

I had put a metric of 100 on the outgoing route-map on neighbor RID 151.90.104.1, and no outgoing route-map at all on neighbor RID 151.90.102.1.

Kevin Dorrell

Luxembourg

Dandy, there is an interesting corollary to the discussion about 4294967294 and 4294967295.

If I do med missing-as-worst and the routes are coming in without a MED, then they get inserted with 4294967295, at least in 12.4(2)T:

R5#show ip bgp

BGP table version is 3, local router ID is 151.90.105.1

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

*>i10.10.10.0/24 151.90.50.10 0 100 0 i

*> 192.168.100.64/26

151.90.45.4 4294967295 1000 300 400 i

* 151.90.25.2 4294967295 0 200 400 i

Once they get to an iBGP neighbor, they still have that MED:

CAT1#show ip bgp

BGP table version is 2, local router ID is 151.90.108.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

*> 10.10.10.0/24 0.0.0.0 0 32768 i

* i192.168.100.64/26

151.90.45.4 4294967295 100 0 300 400 i

But notice that the neighbor has chosen not to install the route. This looks like an IOS version inconsistency. If I remove the med missing-as-worst, then the neighbor gets the route and believes it:

CAT1#show ip bgp

BGP table version is 3, local router ID is 151.90.108.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

*> 10.10.10.0/24 0.0.0.0 0 32768 i

*>i192.168.100.64/26

151.90.45.4 0 100 0 300 400 i

Kevin Dorrell

Luxembourg

Note: This posting will look better once they implement the "code" HTML tag.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card