Friday, May 12, 2023
HomeNetworkingUnderstanding BGP Deterministic-MED - IP With Ease

Understanding BGP Deterministic-MED – IP With Ease


To grasp using BGP deterministic-MED we should first perceive habits of BGP algorithm when a route is obtained on a router through a number of paths.

Understanding BGP Algorithm

BGP algorithm assigns the primary legitimate path as the present finest path. This primary legitimate path is then in contrast with the following path listed. 1st and a couple ofnd path are in contrast and out them the one chosen as finest is then in contrast with 3rd path and so forth till the top of paths within the listing is reached.

What’s BGP deterministic-MED?

Due to the best way BGP’s finest path algorithm works, it may result in MED being left uncompared between routes utilizing similar AS_PATH’s in direction of a prefix.

As all of us are conscious the BGP at all times compare-MED function ensures the MED will get in contrast when totally different AS are promoting the identical route BGP Deterministic-med function ensures the MED will get in contrast for a route being marketed from totally different paths in identical AS.

How does it work?

Allow us to take the instance of beneath diagram to additional perceive how BGP deterministic MED works.

Within the diagram beneath R5 advertises its loopback 5.5.5.5/32 in direction of R1.

R1 will get this replace from 3 paths R2, R3 & R4 with totally different MED values.

R3 & R4 are inside the identical AS 300 and R2 is inside AS 200.

Routing Desk on R1:

R1(config-router)#do sh ip bgp 5.5.5.5BGP routing desk entry for five.5.5.5/32, model 29

Paths: (3 accessible, finest #3, desk Default-IP-Routing-Desk)

Flag: 0x4842

Marketed to update-groups:

1

300 400

9.9.13.3 from 9.9.13.3

Origin IGP, metric 100, localpref 100, legitimate, exterior

200 400

9.9.12.2 from 9.9.12.2

Origin IGP, metric 150, localpref 100, legitimate, exterior

300 400

9.9.14.4 from 9.9.14.4

Origin IGP, metric 200, localpref 100, legitimate, exterior, finest

Associated: LDP IGP sync in MPLS : What’s the necessity?

In accordance with the BGP finest path algorithm the latest path is evaluated in opposition to the trail beneath it.

Between the Route from R3 and R2 , R2 is chosen as the very best path. That is so as a result of the MED isn’t in contrast for BGP updates from R2 & R3 as they’re a part of totally different AS and as per BGP algorithms working the older route is most well-liked one which right here is from R2.

Now evaluating routes from R2 with route from R4 once more MED isn’t in contrast as they’re each from totally different AS. R4 being the older route right here is most well-liked over the route from R2 and therefore is chosen as the very best. So we see on this situation how the MED working of preferring the decrease MED updates hasn’t taken impact on this situation.

To beat this example we use BGP deterministic-med on R1. Deterministic-med rectifies this drawback by itemizing one route from identical AS_PATH beneath a bunch in BGP desk. Paths inside a bunch are then in contrast in opposition to one another. Then the very best of the group is in contrast in opposition to the following group down.

Associated: BGP AS Prepend Inbound Configuration Instance

Enabling BGP Deterministic-MED

R1(config)#router bgp 100R1(config-router)#bgp deterministic-med

R1(config-router)#finish

Routing Desk on R1 now:

R1(config-router)#do sh ip bgp 5.5.5.5BGP routing desk entry for five.5.5.5/32, model 29

Paths: (3 accessible, finest #3, desk Default-IP-Routing-Desk)

Flag: 0x4842

Marketed to update-groups:

1

200 400

9.9.12.2 from 9.9.12.2

Origin IGP, metric 100, localpref 100, legitimate, exterior

300 400

9.9.13.3 from 9.9.13.3

Origin IGP, metric 150, localpref 100, legitimate, exterior finest

300 400

9.9.14.4 from 9.9.14.4

Origin IGP, metric 200, localpref 100, legitimate, exterior,

Now we see the desk has been restructured and the routes with identical AS path are grouped collectively.

Routes from R3 and R4 are in contrast and since route from R3 has decrease MED it’s best out of the group. Now route from R3 is in contrast with the one route of different group i.e. from R2 and for the reason that route from R3 is older it’s most well-liked and chosen as finest primarily based on BGP’s algorithm default working.

Proceed Studying:

BGP Neighborship Drops when NAT is Enabled

BGP Desk Sorts

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments