The peer transit-med-to-ebgp command enables a device to transmit MED attributes to an EBGP EVPN peer.
The undo peer transit-med-to-ebgp command disables a device from transmitting MED attributes to an EBGP EVPN peer.
The peer transit-med-to-ebgp disable command disables a device from transmitting MED attributes to a specified EBGP EVPN peer in an EBGP EVPN peer group.
The undo peer transit-med-to-ebgp disable command enables a device to transmit MED attributes to a specified EBGP EVPN peer in an EBGP EVPN peer group.
By default, a device does not forcibly transmit MED attributes to an EBGP EVPN peer.
Usage Scenario
The MED attribute is optional non-transitive. When an EBGP EVPN peer relationship is established between devices in two data centers in different BGP ASs, the devices do not transmit the MED attributes of EVPN routes to each other by default. The MED attribute needs to be transmitted to an EBGP EVPN peer in a scenario, for example, after you change a cost value to switch service flows between the active and standby gateways within a data center. You can run the peer transit-med-to-ebgp command to configure the local gateway to transmit the MED attributes of the received EVPN routes to the peer EBGP EVPN peer.
Precautions
MED attributes can be transmitted within an AS by default. Therefore, if you set an intra-AS peer address in this command, this command is meaningless.