OcNOS-SP : Layer 3 Guide : Layer 3 Unicast Configuration Guide : BGP : Removing Sent and Received MED values
Removing Sent and Received MED values
The following describes how to remove the received and sent MED values, respectively.
R2 - Remove Received MED Value
 
#configure terminal
Enter configure mode.
(config)#router bgp 200
Define the routing process with AS number 200.
(config-router)#neighbor 1.1.1.1 remote-as 100
Define neighbor R1. 1.1.1.1 is the IP address of R1, and 100 is the AS number.
(config-router)#neighbor 2.2.2.2 remote-as 200
Define neighbor R3. 2.2.2.2 is the IP address of R3, and 200 is the AS number.
(config-router)#bgp bestpath med remove-recv- med
Enable the remove received MED value option.
(config-router)# address-family ipv4 unicast
Enter address-family ipv4 unicast mode
(config-router-af)# neighbor 1.1.1.1 activate
Activate neighbor under address family mode
(config-router-af)# neighbor 2.2.2.2 activate
Activate neighbor under address family mode
(config-router-af)# exit-address-family
Exit address family mode
(config-router)#commit
Commit the candidate configuration to the running configuration.
R1 - Add Static Route
 
(config)#router bgp 100
Enter to router bgp mode
(config)#address-family ipv4 unicast
Config redistribute under address-family
(config-router-af)#redistribute static
Redistribute the static routes
(config-router)#commit
Commit the candidate configuration to the running configuration.
R2 - Remove Send MED Value
 
#configure terminal
Enter configure mode.
(config)#router bgp 200
Define the routing process with AS number 200.
(config-router)#neighbor 1.1.1.1 remote-as 100
Define neighbor R1. 1.1.1.1 is the IP address of R1, and 100 is the AS number.
 
 
(config-router)#neighbor 2.2.2.2 remote-as 200
Define neighbor R3. 2.2.2.2 is the IP address of R3, and 200 is the AS number.
(config-router)#bgp bestpath med remove-send- med
Enable the remove sent MED value option.
(config-router)# address-family ipv4 unicast
Enter address-family ipv4 unicast mode
(config-router-af)# neighbor 1.1.1.1 activate
Activate neighbor under address family mode
(config-router-af)# neighbor 2.2.2.2 activate
Activate neighbor under address family mode
(config-router-af)# exit-address-family
Exit address family mode
(config-router)#commit
Commit the candidate configuration to the running configuration.
Validation
R2#show ip bgp
BGP table version is 2, local router ID is 192.168.52.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
l - labeled, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
Network Next Hop Metric LocPrf Weight Path
*> 100.0.0.0 1.1.1.1 removed 100 0 100 ?
 
Total number of prefixes 1
 
 
R3#show ip bgp
BGP table version is 1, local router ID is 192.168.52.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
l - labeled, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
Network Next Hop Metric LocPrf Weight Path
* i 100.0.0.0 1.1.1.1 400 100 0 100 ?
 
Total number of prefixes 1
 
Last modified date: 10/16/2023