97
# Disable STP, LLDP and NDP on interface GigabitEthernet 1/0/3 of Switch C, and add the
interface to service loopback group 1. GigabitEthernet 1/0/3 does not belong to VLAN 200 or
VLAN 102.
[SwitchC] interface gigabitethernet 1/0/3
[SwitchC-GigabitEthernet1/0/3] undo stp enable
[SwitchC-GigabitEthernet1/0/3] undo ndp enable
[SwitchC-GigabitEthernet1/0/3] undo lldp enable
[SwitchC-GigabitEthernet1/0/3] port service-loopback group 1
[SwitchC-GigabitEthernet1/0/3] quit
# Create interface Tunnel 0 on Switch C, assign the IP address and subnet mask to the interface
Tunnel 0, and reference service loopback group 1 on interface Tunnel 0.
[SwitchC] interface tunnel 0
[SwitchC-Tunnel0] ip address 50.1.1.2 24
[SwitchC-Tunnel0] service-loopback-group 1
# Specify the tunnel encapsulation mode as IPv4 over IPv4 and assign the source and destination
addresses to the interface.
[SwitchC-Tunnel0] tunnel-protocol ipv4-ipv4
[SwitchC-Tunnel0] source 20.1.1.1
[SwitchC-Tunnel0] destination 30.1.1.2
[SwitchC-Tunnel0] quit
3. Configure OSPF:
# Configure OSPF on Switch A.
[SwitchA] ospf 1
[SwitchA-ospf-1] area 0
[SwitchA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] network 50.1.1.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] quit
[SwitchA-ospf-1] quit
# Configure OSPF on Switch B.
<SwitchB> system-view
[SwitchB] ospf 1
[SwitchB-ospf-1] area 0
[SwitchB-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.0] quit
[SwitchB-ospf-1] quit
# Configure OSPF on Switch C.
[SwitchC] ospf 1
[SwitchC-ospf-1] area 0
[SwitchC-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.0] network 40.1.1.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.0] network 50.1.1.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.0] quit
[SwitchC-ospf-1] quit