
117
SwitchA(config-if-vlan1)# ip address 10.1.1.1 255.255.255.0
SwitchA(config-if-vlan1)#no shut-down
SwitchA(config-if-vlan1)#exit
Configuration of the IP address for interface vlan2
Configure the IP address of interface vlan2
SwitchA(config)# interface vlan 2
SwitchA(config-if-vlan2)# ip address 100.1.1.1 255.255.255.0
SwitchA (config-if-vlan2)#exit
Enable OSPF protocol, configure the area number for interface vlan1 and vlan2.
SwitchA(config)#router ospf
SwitchA(config-router)#network 10.1.1.0/24 area 0
SwitchA(config-router)#network 100.1.1.0/24 area 0
SwitchA(config-router)#exit
SwitchA(config)#exit
Layer 3 SwitchB
Configure the IP address for interface vlan1 and vlan2Configure the IP address of interface
vlan1 and vlan2
SwitchB#config
SwitchB(config)# interface vlan 1
SwitchB(config-if-vlan1)# ip address 10.1.1.2 255.255.255.0
SwitchB(config-if-vlan1)#no shut-down
SwitchB(config-if-vlan1)#exit
SwitchB(config)# interface vlan 3
SwitchB(config-if-vlan3)# ip address 20.1.1.1 255.255.255.0
SwitchB(config-if-vlan3)#no shut-down
SwitchB(config-if-vlan3)#exit
Enable OSPF protocol, configure the OSPF area interfaces vlan1 and vlan3 in
SwitchB(config)#router ospf
SwitchB(config-router)# network 10.1.1.0/24 area 0
SwitchB(config-router)# network 20.1.1.0/24 area 1
SwitchB(config-router)#exit
SwitchB(config)#exit
SwitchB#
Layer 3 SwitchC
Configuration of the IP address for interface vlan3
SwitchC#config
SwitchC(config)# interface vlan 3
SwitchC(config-if-vlan1)# ip address 20.1.1.2 255.255.255.0