OcNOS-SP : Layer 3 Guide : Layer 3 Unicast Configuration Guide : BGP IPv4 Additional Paths Configuration : Initial Configuration
Initial Configuration
R1
 
#configure terminal
Enter the Configure mode.
(config)#interface eth3
Enter interface mode for interface eth3
(config-if)#ip address 11.1.1.2/24
Configure IP address for the interface eth3
(config-if)#exit
Exit the interface mode
(config)#interface eth4
Enter interface mode for interface eth4
(config-if)#ip address 12.1.1.2/24
Configure IP address for the interface eth4
(config-if)#exit
Exit the interface mode
(config)#interface eth6
Enter interface mode for interface eth6
(config-if)#ip address 13.1.1.2/24
Configure IP address for the interface eth6
(config-if)#exit
Exit the interface mode
(config)#interface eth7
Enter interface mode for interface eth7
(config-if)#ip address 14.1.1.2/24
Configure IP address for the interface eth7
(config-if)#exit
Exit the interface mode
(config)#interface lo
Enter interface mode for loopback lo
(config-if)#ip address 100.1.1.2/24
Configure IP address for Loopback interface lo
(config-if)#exit
Exit the interface mode
(config)#router bgp 200
Enter the router BGP mode
(config-router)#neighbor 11.1.1.1 remote-as 100
Configure the neighbor address and remote-as for the eBGP peer on R2
(config-router)#neighbor 12.1.1.1 remote-as 100
Configure the neighbor address and remote-as for the eBGP peer on R2
(config-router)#neighbor 13.1.1.1 remote-as 100
Configure the neighbor address and remote-as for the eBGP peer on R2
(config-router)#neighbor 14.1.1.1 remote-as 100
Configure the neighbor address and remote-as for the eBGP peer on R2
(config-router)#address-family ipv4 unicast
Configure the address family ipv4 under router BGP
(config-router)#network 100.1.1.0/24
Specify the network to announce via BGP
(config-router-af)#neighbor 11.1.1.1 activate
Activate the IPv4 iBGP neighbors on RR for the IPv4 address family
(config-router-af)#neighbor 12.1.1.1 activate
Activate the IPv4 iBGP neighbors on RR for the IPv4 address family
(config-router-af)#neighbor 13.1.1.1 activate
Activate the IPv4 iBGP neighbors on RR for the IPv4 address family
(config-router-af)#neighbor 14.1.1.1 activate
Activate the IPv4 iBGP neighbors on RR for the IPv4 address family
(config-router-af)#exit-address-family
Exit Address Family mode and return to Router mode.
(config-router)#exit
Exit the router BGP mode and enter the config mode
(config)#commit
Apply commit
(config)#exit
Exit the config mode
R2
 
#configure terminal
Enter the Configure mode.
(config)#interface eth2
Enter interface mode for interface eth2
(config-if)#ip address 10.1.1.1/24
Configure IP address for the interface eth2
(config-if)#exit
Exit the interface mode
(config)#interface eth3
Enter interface mode for interface eth3
(config-if)#ip address 11.1.1.1/24
Configure IP address for the interface eth3
(config-if)#exit
Exit the interface mode
(config)#interface eth4
Enter interface mode for interface eth4
(config-if)#ip address 12.1.1.1/24
Configure IP address for the interface eth4
(config-if)#exit
Exit the interface mode
(config)#interface eth6
Enter interface mode for interface eth6
(config-if)#ip address 13.1.1.1/24
Configure IP address for the interface eth6
(config-if)#exit
Exit the interface mode
(config)#interface eth7
Enter interface mode for interface eth7
(config-if)#ip address 14.1.1.1/24
Configure IP address for the interface eth7
(config-if)#exit
Exit the interface mode
(config)#interface lo
Enter interface mode for loopback lo
(config-if)#ip address 100.1.1.2/24
Configure IP address for Loopback interface lo
(config-if)#exit
Exit the interface mode
(config)#router bgp 100
Enter the router BGP mode
(config-router)#neighbor 10.1.1.2 remote-as 100
Configure the neighbor address and remote-as for the eBGP peer on R3
(config-router)#neighbor 11.1.1.2 remote-as 200
Configure the neighbor address and remote-as for the eBGP peer on R1
(config-router)#neighbor 12.1.1.2 remote-as 200
Configure the neighbor address and remote-as for the eBGP peer on R1
(config-router)#neighbor 13.1.1.2 remote-as 200
Configure the neighbor address and remote-as for the eBGP peer on R1
(config-router)#neighbor 14.1.1.2 remote-as 200
Configure the neighbor address and remote-as for the eBGP peer on R1
(config-router)#address-family ipv4 unicast
Configure the address family ipv4 under router BGP
(config-router-af)#neighbor 11.1.1.2 activate
Activate the IPv4 iBGP neighbors on RR for the IPv4 address family
(config-router-af)#neighbor 12.1.1.2 activate
Activate the IPv4 iBGP neighbors on RR for the IPv4 address family
(config-router-af)#neighbor 13.1.1.2 activate
Activate the IPv4 iBGP neighbors on RR for the IPv4 address family
(config-router-af)#neighbor 14.1.1.2 activate
Activate the IPv4 iBGP neighbors on RR for the IPv4 address family
(config-router-af)#exit-address-family
Exit Address Family mode and return to Router mode.
(config-router)#exit
Exit the router BGP mode and enter the config mode
(config)#router ospf 100
Configure an OSPF instance 100
(config-router)#network 10.1.1.0/24 area 0
Configure OSPF network for area 0
(config-router)#redistribute connected
Configure Redistribution of Connected networks into OSPF
(config-router)#exit
Exit the router BGP mode and enter the config mode
(config)#commit
Apply commit
(config)#exit
Exit the config mode
R3
 
#configure terminal
Enter the Configure mode.
(config)#interface eth1
Enter interface mode for interface eth1
(config-if)#ip address 10.1.1.2/24
Configure IP address for the interface eth1
(config-if)#exit
Exit the interface mode
(config)#interface eth2
Enter interface mode for interface eth2
(config-if)#ip address 21.1.1.1/24
Configure IP address for the interface eth2
(config-if)#exit
Exit the interface mode
(config)#interface eth5
Enter interface mode for interface eth5
(config-if)#ip address 22.1.1.1/24
Configure IP address for the interface eth5
(config-if)#exit
Exit the interface mode
(config)#interface eth6
Enter interface mode for interface eth6
(config-if)#ip address 23.1.1.1/24
Configure IP address for the interface eth6
(config-if)#exit
Exit the interface mode
(config)#interface eth7
Enter interface mode for interface eth7
(config-if)#ip address 24.1.1.1/24
Configure IP address for the interface eth7
(config-if)#exit
Exit the interface mode
(config)#router bgp 100
Enter the router BGP mode
(config-router)#neighbor 21.1.1.2 remote-as 300
Configure the neighbor address and remote-as for the eBGP peer on R4
(config-router)#neighbor 22.1.1.2 remote-as 300
Configure the neighbor address and remote-as for the eBGP peer on R4
(config-router)#neighbor 23.1.1.2 remote-as 300
Configure the neighbor address and remote-as for the eBGP peer on R4
(config-router)#neighbor 24.1.1.2 remote-as 300
Configure the neighbor address and remote-as for the eBGP peer on R4
(config-router)#neighbor 10.1.1.1 remote-as 100
Configure the neighbor address and remote-as for the iBGP peer on R2
(config-router)#address-family ipv4 unicast
Configure the address family ipv4 under router BGP
(config-router-af)#neighbor 21.1.1.2 activate
Activate the IPv4 iBGP neighbors on RR for the IPv4 address family
(config-router-af)#neighbor 22.1.1.2 activate
Activate the IPv4 iBGP neighbors on RR for the IPv4 address family
(config-router-af)#neighbor 23.1.1.2 activate
Activate the IPv4 iBGP neighbors on RR for the IPv4 address family
(config-router-af)#neighbor 24.1.1.2 activate
Activate the IPv4 iBGP neighbors on RR for the IPv4 address family
(config-router-af)#neighbor 10.1.1.1 activate
Activate the IPv4 iBGP neighbors on RR for the IPv4 address family
(config-router-af)#exit-address-family
Exit Address Family mode and return to Router mode.
(config-router)#exit
Exit Router BGP mode
(config)#router ospf 100
Configure an OSPF instance 100
(config-router)#network 10.1.1.0/24 area 0
Configure OSPF network for area 0
(config-router)#redistribute connected
Configure Redistribution of Connected networks into OSPF
(config-router)#exit
Exit the router BGP mode and return to configure mode
(config)#commit
Apply commit
(config)#exit
Exit the configure mode
R4
 
#configure terminal
Enter the Configure mode.
(config)#interface eth2
Enter interface mode for interface eth2
(config-if)#ip address 21.1.1.2/24
Configure IP address for the interface eth2
(config-if)#exit
Exit the interface mode
(config)#interface eth3
Enter interface mode for interface eth3
(config-if)#ip address 22.1.1.2/24
Configure IP address for the interface eth3
(config-if)#exit
Exit the interface mode
(config)#interface eth4
Enter interface mode for interface eth4
(config-if)#ip address 23.1.1.2/24
Configure IP address for the interface eth4
(config-if)#exit
Exit the interface mode
(config)#interface eth5
Enter interface mode for interface eth5
(config-if)#ip address 24.1.1.2/24
Configure IP address for the interface eth5
(config-if)#exit
Exit the interface mode
(config)#interface lo
Enter interface mode for loopback lo
(config-if)#ip address 200.1.1.2/24
Configure IP address for Loopback interface lo
(config-if)#exit
Exit the interface mode
(config)#router bgp 300
Enter the router BGP mode
(config-router)#neighbor 21.1.1.1 remote-as 100
Configure the neighbor address and remote-as for the eBGP peer on R3
(config-router)#neighbor 22.1.1.1 remote-as 100
Configure the neighbor address and remote-as for the eBGP peer on R3
(config-router)#neighbor 23.1.1.1 remote-as 100
Configure the neighbor address and remote-as for the eBGP peer on R3
(config-router)#neighbor 24.1.1.1 remote-as 100
Configure the neighbor address and remote-as for the eBGP peer on R3
(config-router)#address-family ipv4 unicast
Configure the address family ipv4 under router BGP
(config-router)#network 200.1.1.0/24
Specify the network to announce via BGP
(config-router-af)#neighbor 21.1.1.1 activate
Activate the IPv4 iBGP neighbors on RR for the IPv4 address family
(config-router-af)#neighbor 22.1.1.1 activate
Activate the IPv4 iBGP neighbors on RR for the IPv4 address family
(config-router-af)#neighbor 23.1.1.1 activate
Activate the IPv4 iBGP neighbors on RR for the IPv4 address family
(config-router-af)#neighbor 24.1.1.1 activate
Activate the IPv4 iBGP neighbors on RR for the IPv4 address family
(config-router-af)#exit-address-family
Exit Address Family mode and return to Router mode.
(config-router)#exit
Exit the router BGP mode and return to configure mode
(config)#commit
Apply commit
(config)#exit
Exit the configure mode
Last modified date: 10/16/2023