Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

bgp deterministic-med

I am confused as to why bgp deterministic-med command is needed in the first place. As I understand it, MED is compared (by default) for advertisements coming from same AS.... bgp deterministic-med also says to compare updates from same AS. Then why is the command needed at all? Isn't it the bgp default behavior in the first place? Maybe I am missing something basic. Could any expert please help?

1 ACCEPTED SOLUTION

Accepted Solutions
Silver

bgp deterministic-med

By default the BGP best path algorithm when involving MED is not deterministic.

Assume that you have the following entries in the BGP RIB:

entry1: AS(PATH) 500, med 100, external
entry2: AS(PATH) 100, med 200, external
entry3: AS(PATH) 500, med 150, external

Entries are ordered in BGP RIB according to age. So entry1 is the newest. The key thing here is that the paths are compared in pairs starting with newest path. So entry 1 and entry 2 get compared first, MED is not compared unless always-compare-med is enabled. Everything else equal entry 2 will win because it is older.

Entry2 moves on to face entry3. Everything else equal entry 3 will win because it is the oldest. This is not what AS 500 intended to do, traffic will follow the wrong path. With deterministic-med the paths from same AS are compared first which makes the selection deterministic.

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094925.shtml#examp1

Daniel Dib
CCIE #37149

Please rate helpful posts.

Daniel Dib CCIE #37149 Please rate helpful posts.
3 REPLIES
Silver

bgp deterministic-med

By default the BGP best path algorithm when involving MED is not deterministic.

Assume that you have the following entries in the BGP RIB:

entry1: AS(PATH) 500, med 100, external
entry2: AS(PATH) 100, med 200, external
entry3: AS(PATH) 500, med 150, external

Entries are ordered in BGP RIB according to age. So entry1 is the newest. The key thing here is that the paths are compared in pairs starting with newest path. So entry 1 and entry 2 get compared first, MED is not compared unless always-compare-med is enabled. Everything else equal entry 2 will win because it is older.

Entry2 moves on to face entry3. Everything else equal entry 3 will win because it is the oldest. This is not what AS 500 intended to do, traffic will follow the wrong path. With deterministic-med the paths from same AS are compared first which makes the selection deterministic.

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094925.shtml#examp1

Daniel Dib
CCIE #37149

Please rate helpful posts.

Daniel Dib CCIE #37149 Please rate helpful posts.
New Member

bgp deterministic-med

Daniel,

Thanks...

In above example, if deterministic-med is enabled, then entry 1 and 3 will be compared to each other. MED will be used and based on MED, entry 1 wins...entry 1 will now be compared with entry 2..MED is not compared then...entry 1 will win because it is older...Does that sound right?

Silver

bgp deterministic-med

Hi,

If deterministic MED is enabled then 1 and 3 are compared first, 1 wins. Then 1 and 2 are compared and 2 wins because it's older. We would have to enable always-compare-med to make 1 win over 2.

Daniel Dib
CCIE #37149

Please rate helpful posts.

Daniel Dib CCIE #37149 Please rate helpful posts.
249
Views
0
Helpful
3
Replies