239
Configuration procedure
1.
Configure IP addresses for the tunnel interfaces and related ports on the devices. (Details not
shown.)
2.
Configure Device A (the source device):
# Create a service loopback group 1 and specify the unicast tunnel service for the group.
<DeviceA> system-view
[DeviceA] service-loopback group 1 type tunnel
# Assign GigabitEthernet 1/0/3 to the service loopback group 1.
[DeviceA] interface gigabitethernet 1/0/3
[DeviceA-GigabitEthernet1/0/3] port service-loopback group 1
All configurations on the interface will be lost. Continue?[Y/N]:y
[DeviceA-GigabitEthernet1/0/3] quit
# Create tunnel interface Tunnel 1 that operates in GRE mode, and configure an IP address
and subnet mask for the interface.
[DeviceA] interface tunnel 1 mode gre
[DeviceA-Tunnel1] ip address 50.1.1.1 24
# Configure source and destination IP addresses for Tunnel 1.
[DeviceA-Tunnel1] source 20.1.1.1
[DeviceA-Tunnel1] destination 30.1.1.2
[DeviceA-Tunnel1] quit
# Enable the OSPF protocol.
[DeviceA] ospf 1
[DeviceA-ospf-1] area 0
[DeviceA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[DeviceA-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255
[DeviceA-ospf-1-area-0.0.0.0] quit
[DeviceA-ospf-1] quit
# Create local mirroring group 1.
[DeviceA] mirroring-group 1 local
# Configure GigabitEthernet 1/0/1 as a source port and Tunnel 1 as the monitor port of local
mirroring group 1.
[DeviceA] mirroring-group 1 mirroring-port gigabitethernet 1/0/1 both
[DeviceA] mirroring-group 1 monitor-port tunnel 1
3.
Enable the OSPF protocol on Device B (the intermediate device).
<DeviceB> system-view
[DeviceB] ospf 1
[DeviceB-ospf-1] area 0
[DeviceB-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255
[DeviceB-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255
[DeviceB-ospf-1-area-0.0.0.0] quit
[DeviceB-ospf-1] quit
4.
Configure Device C (the destination device):
# Create a service loopback group 1 and specify the unicast tunnel service for the group.
<DeviceC> system-view
[DeviceC] service-loopback group 1 type tunnel
# Assign GigabitEthernet 1/0/3 to the service loopback group 1.
[DeviceC] interface gigabitethernet 1/0/3