The MED metric is intended to be used only between two neighboring ASes. It isn’t communicated to ASes beyond the neighboring AS. For this reason, the use of the MED in balancing incoming traffic is limited to the situation where there is more than one connection between two ASes: setting a higher MED for one route will make the traffic flow over the other. This is useful when one of the connections is of a much higher bandwidth, and the second one is a lower-bandwidth backup. Because you don’t know whether the bgp bestpath med missing-as-worst command is in effect on the router terminating your connections at the other end, always set MEDs for the routes over both connections, as is shown in Example 6-11.
Example 6-11. Setting outbound MED values
! router bgp 60055 neighbor 18.104.22.168 remote-as 40077 neighbor 22.214.171.124 route-map ispa-out out neighbor 126.96.36.199 remote-as 50066 neighbor 188.8.131.52 route-map ispb-out out ! route-map ispa-out permit 10 set metric 10 ! route-map ispb-out permit 10 set metric 20 !
We are now trying to influence incoming traffic, so we have to manipulate outgoing routing updates and apply the route maps to the neighbors using the neighbor ... route-map ... out command.
The MED metric you see in the BGP table is never announced to eBGP neighbors. If you want a neighbor to receive a MED, you have to configure an outbound route map to set the MED for this neighbor.
When you bring up your second BGP session, ...