H3C Technologies H3C S7500E Series Switches User Manual

Page 168

Advertising
background image

9-21

[DeviceA-ospf-1] quit

# Create local mirroring group 1.

[DeviceA] mirroring-group 1 local

# Configure GigabitEthernet 2/0/1 as a mirroring port and Tunnel 0 as the monitor port of local

mirroring group 1.

[DeviceA] mirroring-group 1 mirroring-port gigabitethernet 2/0/1 both

[DeviceA] mirroring-group 1 monitor-port tunnel 0

3) Configure Device B (the intermediate device)

# Enable the OSPF protocol

<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 tunnel interface Tunnel 0, and configure an IP address and subnet mask for it.

<DeviceC> system-view

[DeviceC] interface tunnel 0

[DeviceC-Tunnel0] ip address 50.1.1.2 24

# Configure Tunnel 0 to operate in GRE mode, and configure source and destination IP addresses for

it.

[DeviceC-Tunnel0] tunnel-protocol gre

[DeviceC-Tunnel0] source 30.1.1.2

[DeviceC-Tunnel0] destination 20.1.1.1

[DeviceC-Tunnel0] quit

# Create and configure service loopback group 1 and specify its service type as tunnel.

[DeviceC] service-loopback group 1 type tunnel

# Assign a port (GigabitEthernet 2/0/3 for example) of the device to service loopback group 1.

[DeviceC] interface GigabitEthernet 2/0/3

[DeviceC-GigabitEthernet2/0/3] undo stp enable

[DeviceC-GigabitEthernet2/0/3] port service-loopback group 1

# In tunnel interface view, configure the tunnel to reference service loopback group 1.

[DeviceC-GigabitEthernet2/0/3] quit

[DeviceC] interface tunnel 0

[DeviceC-Tunnel0] service-loopback-group 1

[DeviceC-Tunnel0] quit

# Enable the OSPF protocol.

[DeviceC] ospf 1

[DeviceC-ospf-1] area 0

[DeviceC-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255

[DeviceC-ospf-1-area-0.0.0.0] network 40.1.1.0 0.0.0.255

[DeviceC-ospf-1-area-0.0.0.0] network 50.1.1.0 0.0.0.255

[DeviceC-ospf-1-area-0.0.0.0] quit

[DeviceC-ospf-1] quit

# Create local mirroring group 1.

[DeviceC] mirroring-group 1 local

Advertising