Configure IP Address and OSPF on Routers

Configure the IP addresses and OSPF on the PE1, P1,P2, PE2 and PE3 routers.

PE1

#configure terminal

Enter configure mode.

(config)#interface lo

Specify the loopback interface (lo0) to be configured.

(config-if)#ip address 1.1.1.1/32 secondary

Set the IP address of the loopback interface to 1.1.1.1/ 32.

(config-if)#exit

Exit interface mode.

(config)#interface xe6

Specify the interface (xe6) to be configured.

(config-if)#ip address 40.1.1.1/24

Set the IP address of the interface to 40.1.1.1/24

(config)#interface xe1

Specify the interface (xe1) to be configured.

(config-if)#ip address 20.20.20.1/24

Set the IP address of the interface to 20.20.20.1/24

(config-if)#exit

Exit interface mode.

(config)#router ospf 100

Configure the routing process and specify the Process ID

(100). The Process ID should be a unique positive integer identifying the routing process.

(config-router)#network 40.1.1.0/24 area 0 (config-router)#network 1.1.1.1/32 area 0

(config-router)# network 20.20.20.0/24 area 0

Define the interface on which OSPF runs and associate the area ID (0) with the interface.

P1

#configure terminal

Enter configure mode.

(config)#interface lo

Specify the loopback interface (lo0) to be configured.

(config-if)#ip address 4.4.4.4/32 secondary

Set the IP address of the loopback interface to 9.9.9.9/ 32.

(config-if)#exit

Exit interface mode.

(config)#interface xe1/1

Specify the interface (xe1/1) to be configured.

(config-if)#ip address 40.1.1.2/24

Set the IP address of the interface to 40.1.1.2/24.

(config-if)#exit

Exit interface mode.

(config)#interface xe33

Specify the interface (xe33) to be configured.

(config-if)#ip address 50.1.1.2/24

Set the IP address of the interface to 50.1.1.1/24.

(config-if)#exit

Exit interface mode.

(config)#router ospf 100

Configure the routing process and specify the Process ID

(100). The Process ID should be a unique positive integer identifying the routing process.

(config-router)#network 40.1.1.0/24 area 0 (config-router)#network 50.1.1.0/24 area 0 (config-router)#network 4.4.4.4/32 area 0

Define the interface on which OSPF runs and associate the area ID (0) with the interface.

P2

#configure terminal

Enter configure mode.

(config)#interface lo

Specify the loopback interface (lo0) to be configured.

(config-if)#ip address 5.5.5.5/32 secondary

Set the IP address of the loopback interface to 5.5.5.5/ 32.

(config-if)#exit

Exit interface mode.

(config)#interface xe6

Specify the interface (xe1/1) to be configured.

(config-if)#ip address 70.1.1.1/24

Set the IP address of the interface to 70.1.1.1/24.

(config-if)#exit

Exit interface mode.

(config)#interface xe47

Specify the interface (xe47) to be configured.

(config-if)#ip address 20.20.20.2/24

Set the IP address of the interface to 20.20.20.2/24.

(config-if)#exit

Exit interface mode.

(config)#router ospf 100

Configure the routing process and specify the Process ID

(100). The Process ID should be a unique positive integer identifying the routing process.

(config-router)#network 20.20.20.20/24 area 0

(config-router)#network 70.1.1.0/24 area 0 (config-router)#network 5.5.5.5/32 area 0

Define the interface on which OSPF runs and associate the area ID (0) with the interface.

PE2

#configure terminal

Enter configure mode.

(config)#interface lo

Specify the loopback interface (lo0) to be configured.

(config-if)#ip address 2.2.2.2/32 secondary

Set the IP address of the loopback interface to 2.2.2.2/ 32.

(config-if)#exit

Exit interface mode.

(config)#interface xe33

Specify the interface (xe33) to be configured.

(config-if)#ip address 50.1.1.1/24

Set the IP address of the interface to 50.1.1.1/24

(config-if)#exit

Exit interface mode.

(config)#router ospf 100

Configure the routing process and specify the Process ID

(100). The Process ID should be a unique positive integer identifying the routing process.

(config-router)#network 50.1.1.0/24 area 0 (config-router)#network 2.2.2.2/32 area 0

Define the interface on which OSPF runs, and associate the area ID (0) with the interface.

PE3

#configure terminal

Enter configure mode.

(config)#interface lo

Specify the loopback interface (lo0) to be configured.

(config-if)#ip address 3.3.3.3/32 secondary

Set the IP address of the loopback interface to 3.3.3.3/ 32.

(config-if)#exit

Exit interface mode.

(config)#interface xe6

Specify the interface (xe33) to be configured.

(config-if)#ip address 70.1.1.2/24

Set the IP address of the interface 70.1.1.2/24

(config-if)#exit

Exit interface mode.

(config)#router ospf 100

Configure the routing process and specify the Process ID

(100). The Process ID should be a unique positive integer identifying the routing process.

(config-router)#network 70.1.1.0/24 area 0 (config-router)#network 3.3.3.3/32 area 0

Define the interface on which OSPF runs, and associate the area ID (0) with the interface.