Network labs Docs Open simulator →

BGP — MED for egress tiebreak

R1 advertises 192.168.1.0/24 to R2 with MED 50 via outbound route-map. MED is the lowest-priority tiebreak in BGP best-path selection — useful when other attributes (Weight, Local-pref, AS-path, Origin) are equal across two egress paths to the same destination AS.

Open this lab in your browser →

Free · no install · no account

Scenario

MED (Multi-Exit Discriminator) is BGP's "hint to the neighbour AS about which exit to prefer." Lower wins. MED matters when: - Two ASes peer over multiple links to each other. - Both peers receive the same prefix on both links. - Other attributes (Weight, Local-pref, AS-path length, Origin) are all tied. Then MED is the tiebreak: lowest MED wins. Set MED via outbound route-map on the side that wants its peer to prefer one egress over another: `` route-map TO-R2 permit 10 set metric 50 ← writes the MED on outbound advertisements `` In this lab there's only one R1↔R2 path, so MED won't actually influence path selection — but the configuration shape (route-map → set metric → neighbor out) is identical to a multi-homed scenario.

Topology

2 × router · Cisco IOS-style

What you will do

  1. On R1, define route-map MED-OUT permit 10 with set metric 50 and bind outbound to R2.

  2. On R2, run show ip bgp 192.168.1.0. The detail view should report MED 50 on R1's advertisement.

Open this lab in your browser →

More labs on this topic

This lab in other languages

BGP — MED als Egress-TiebreakBGP — MED para desempate de salidaBGP — MED para desempate de saídaBGP — MED pour départager les sortiesBGP — egress tiebreak के लिए MEDBGP — 出方向决胜用的 MEDBGP — MED come tiebreak di egressBGP — エグレスのタイブレイクに使う MEDBGP — egress 타이브레이크용 MEDBGP — MED как тай-брейк egressBGP — egress tiebreak için MEDBGP — MED làm tiebreak cho egress