The BGP MED (Multi-Exit Discriminator) attribute is the primary tool for influencing inbound traffic paths when your data center fabric has multiple connections to an external autonomous system. Without a deterministic policy in place, leaving path selection to BGP’s default tie-breakers often leads to asymmetric routing.
In this guide, we break down the core function and mechanics of the MED attribute. Then we jump straight to the command line for a lab demonstration on Cisco Nexus switches to configure our route maps and verify metric changes in the NX-OS BGP table.
Summary
| Feature | Description |
|---|---|
| Is it a PA? | Yes, optional non-transitive. |
| Purpose | Allows an AS to tell a neighboring AS the best way to forward packets into the first AS. |
| Scope | Advertised by one AS into another, propagated inside the AS, but not sent to any other ASes. |
| Default | not set (Null). |
| Changing the default | Using the bestpath med missing-as-worst BGP subcommand sets it to the maximum value. |
| Range | 0 through 4,294,967,295 (232 – 1) |
| Which is best? | Smaller is better. |
| Configuration | Through the neighbor route-map out command, using the set metric command inside the route map. Or use set metric-type internal to link the MED value to the IGP metric of the route’s next hop. |
Looking for Comprehensive Cisco Data Center Training?
Take your data center skills to the next level with my deep-dive courses, designed for real-world application.
Modern DC Architecture & Automation (Self-paced Courses):
- Cisco Data Centers | ACI Migration (Under Preparation – Join the Waitlist)
- Cisco Data Centers | ACI Core
- Cisco Data Centers | ACI Automation With Ansible
- Cisco Data Centers | VXLAN EVPN
Core Protocols & CCIE Prep (Self-paced Courses):
Live Intensive Training (Cohorts):
Need Personalized Guidance (1:1 Mentorship)?
Additional Resources:
BGP Path Attributes: Your BGP Path Selection Master Guide

