R1#configure terminal | Enter configure mode |
R1(config)#interface xe1 | Enter interface mode for xe1 |
R1(config-if)#ip address 2.2.2.2/24 | Assign an IP address to the interface |
R1(config-if)#commit | Commit the candidate configuration to the running configuration |
R1(config-if)#exit | Exit interface mode. |
R1(config)#interface xe2 | Enter interface mode for xe1 |
R1(config-if)#ip address 1.1.1.2/24 | Assign an IP address to the interface |
R1(config-if)#commit | Commit the candidate configuration to the running configuration |
R1(config-if)#exit | Exit interface mode |
R1(config)#router bgp 2 | Enter BGP router mode |
R1(config-router)#neighbor 2.2.2.3 remote-as 3 | Create static BGP neighbor 2.2.2.3 with remote autonomous system value 3 |
R1(config-router)#redistribute connected | Advertise the connected network into BGP |
R1(config-if)#commit | Commit the candidate configuration to the running configuration |
R1(config-router)#end | Exit BGP router mode |
R2#configure terminal | Enter configure mode |
R2(config)#ip prefix-list p1 | Configure IP prefix list |
R2(config-ip-prefix-list)#seq 5 permit any | Create an access rule to permit any IP packets |
R2(config)#route-map r1 | Enter route-map mode |
R2(config-route-map)#match ip address prefix-list p1 | Configure match ip prefix list p1 |
R2(config-route-map)#set interface null0 | Set the interface to null0 |
R2(config-if)#commit | Commit the candidate configuration to the running configuration |
R2(config-route-map)#exit | Exit route-map mode. |
R2(config)#interface xe1 | Enter interface mode for xe1 |
R2(config-if)#ip address 2.2.2.3/24 | Assign an IP address to the interface |
R2(config-if)#commit | Commit the candidate configuration to the running configuration |
R2(config-if)#exit | Exit interface mode. |
R2(config)#interface xe2 | Enter interface mode for xe2 |
R2(config-if)#ip address 3.3.3.2/24 | Assign an IP address to the interface |
R2(config-if)#commit | Commit the candidate configuration to the running configuration |
R2(config-if)#exit | Exit interface mode |
R2(config)#router bgp 3 | Enter into BGP router mode |
R2(config-router)#neighbor 2.2.2.2 remote-as 2 | Create static BGP neighbor 2.2.2.2 with remote autonomous system value 2 |
R2(config-router)#neighbor 3.3.3.3 remote-as 4 | Create static BGP neighbor 3.3.3.3 with remote autonomous system value 4 |
R2(config-router)#redistribute connected | Advertise the connected network into BGP |
R2(config-router)#neighbor 2.2.2.2 route-map r1 in | Attach the route-map with route discard configured for the neighbor 2.2.2.2 in IN direction |
R2(config-if)#commit | Commit the candidate configuration to the running configuration |
R2(config-router)#end | Exit BGP router mode |
R3#configure terminal | Enter configure mode. |
R3(config)#interface xe2 | Enter interface mode for xe2 |
R3(config-if)#ip address 3.3.3.3/24 | Assign an IP address to the interface |
R3(config-if)#commit | Commit the candidate configuration to the running configuration |
R3(config-if)#exit | Exit interface mode |
R3(config)#interface xe1 | Enter interface mode for xe1 |
R3(config-if)#ip address 4.4.4.2/24 | Assign an IP address to the interface |
R3(config-if)#commit | Commit the candidate configuration to the running configuration |
R3(config-if)#exit | Exit interface mode. |
R3(config)#router bgp 4 | Enter into BGP router mode |
R3(config-router)#neighbor 3.3.3.2 remote-as 3 | Create static BGP neighbor 3.3.3.2 with remote autonomous system value 3 |
R3(config-router)#redistribute connected | Advertise the connected network into BGP |
R3(config-if)#commit | Commit the candidate configuration to the running configuration |
R3(config-router)#end | Exit BGP router. |