#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. |
(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. |
#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. |