Example: Configuring Monitor Link
Network configuration
As shown in Figure 42:
Device C is a Smart Link device, and Device A, Device B, and Device D are associated devices. Traffic of VLANs 1 through 30 on Device C is dual-uplinked to Device A through a smart link group.
Implement dual uplink backup on Device C. When the link between Device A and Device B (or Device D) fails, Device C can detect the link fault. It then performs uplink switchover in the smart link group.
For more information about Smart Link, see "Configuring Smart Link."
Figure 42: Network diagram
Procedure
![]() | IMPORTANT: By default, interfaces on the device are disabled (in ADM or Administratively Down state). To have an interface operate, you must use the undo shutdown command to enable that interface. | |
Configure Device C:
# Create VLANs 1 through 30.
<DeviceC> system-view [DeviceC] vlan 1 to 30
# Map these VLANs to MSTI 1.
[DeviceC] stp region-configuration [DeviceC-mst-region] instance 1 vlan 1 to 30
# Activate MST region configuration.
[DeviceC-mst-region] active region-configuration [DeviceC-mst-region] quit
# Shut down FortyGigE 1/0/1.
[DeviceC] interface fortygige 1/0/1 [DeviceC-FortyGigE1/0/1] shutdown
# Disable the spanning tree feature on the interface.
[DeviceC-FortyGigE1/0/1] undo stp enable
# Configure the interface as a trunk port.
[DeviceC-FortyGigE1/0/1] port link-type trunk
# Assign the interface to VLANs 1 through 30.
[DeviceC-FortyGigE1/0/1] port trunk permit vlan 1 to 30 [DeviceC-FortyGigE1/0/1] quit
# Configure FortyGigE 1/0/2 in the same way FortyGigE 1/0/1 is configured.
[DeviceC] interface fortygige 1/0/2 [DeviceC-FortyGigE1/0/2] shutdown [DeviceC-FortyGigE1/0/2] undo stp enable [DeviceC-FortyGigE1/0/2] port link-type trunk [DeviceC-] port trunk permit vlan 1 to 30 [DeviceC-FortyGigE1/0/2] quit
# Create smart link group 1, and configure all the VLANs mapped to MSTI 1 as the protected VLANs for smart link group 1.
[DeviceC] smart-link group 1 [DeviceC-smlk-group1] protected-vlan reference-instance 1
# Configure FortyGigE 1/0/1 as the primary port and FortyGigE 1/0/2 as the secondary port for smart link group 1.
[DeviceC-smlk-group1] port fortygige 1/0/1 primary [DeviceC-smlk-group1] port fortygige 1/0/2 secondary
# Enable the smart link group to transmit flush messages.
[DeviceC-smlk-group1] flush enable [DeviceC-smlk-group1] quit
# Bring up FortyGigE 1/0/1 and FortyGigE 1/0/2.
[DeviceC] interface fortygige 1/0/1 [DeviceC-FortyGigE1/0/1] undo shutdown [DeviceC-FortyGigE1/0/1] quit [DeviceC] interface fortygige 1/0/2 [DeviceC-FortyGigE1/0/2] undo shutdown [DeviceC-FortyGigE1/0/2] quit
Configure Device A:
# Create VLANs 1 through 30.
<DeviceA> system-view [DeviceA] vlan 1 to 30
# Configure FortyGigE 1/0/1 as a trunk port.
[DeviceA] interface fortygige 1/0/1 [DeviceA-FortyGigE1/0/1] port link-type trunk
# Assign the interface to VLANs 1 through 30.
[DeviceA-FortyGigE1/0/1] port trunk permit vlan 1 to 30
# Enable flush message receiving on the interface.
[DeviceA-FortyGigE1/0/1] smart-link flush enable [DeviceA-FortyGigE1/0/1] quit
# Configure in the same way FortyGigE 1/0/1 is configured.
[DeviceA] interface fortygige 1/0/2 [DeviceA-FortyGigE1/0/2] port link-type trunk [DeviceA-FortyGigE1/0/2] port trunk permit vlan 1 to 30 [DeviceA-FortyGigE1/0/2] smart-link flush enable [DeviceA-FortyGigE1/0/2] quit
Configure Device B:
# Create VLANs 1 through 30.
<DeviceB> system-view [DeviceB] vlan 1 to 30
# Configure as a trunk port.
[DeviceB] interface fortygige 1/0/1 [DeviceB-FortyGigE1/0/1] port link-type trunk
# Assign the interface to VLANs 1 through 30.
[DeviceB-FortyGigE1/0/1] port trunk permit vlan 1 to 30
# Enable flush message receiving on the interface.
[DeviceB-FortyGigE1/0/1] smart-link flush enable [DeviceB-FortyGigE1/0/1] quit
# Disable the spanning tree feature on FortyGigE 1/0/2.
[DeviceB] interface [DeviceB-FortyGigE1/0/2] undo stp enable
# Configure the interface as a trunk port.
[DeviceB-FortyGigE1/0/2] port link-type trunk
# Assign the interface to VLANs 1 through 30.
[DeviceB-FortyGigE1/0/2] port trunk permit vlan 1 to 30
# Enable flush message receiving on the interface.
[DeviceB-] smart-link flush enable [DeviceB-FortyGigE1/0/2] quit
# Create monitor link group 1.
[DeviceB] monitor-link group 1
# Configure FortyGigE 1/0/1 as an uplink interface for monitor link group 1.
[DeviceB-mtlk-group1] port fortygige 1/0/1 uplink
# Configure FortyGigE 1/0/2 as a downlink interface for monitor link group 1.
[DeviceB-mtlk-group1] port fortygige 1/0/2 downlink [DeviceB-mtlk-group1] quit
Configure Device D:
# Create VLANs 1 through 30.
<DeviceD> system-view [DeviceD] vlan 1 to 30
# Configure FortyGigE 1/0/1 as a trunk port.
[DeviceD] interface fortygige 1/0/1 [DeviceD-FortyGigE1/0/1] port link-type trunk
# Assign the interface to VLANs 1 through 30.
[DeviceD-FortyGigE1/0/1] port trunk permit vlan 1 to 30
# Enable flush message receiving on the interface.
[DeviceD-] smart-link flush enable [DeviceD-FortyGigE1/0/1] quit
# Disable the spanning tree feature on FortyGigE 1/0/2.
[DeviceD] interface fortygige 1/0/2 [DeviceD-FortyGigE1/0/2] undo stp enable
# Configure the interface as a trunk port.
[DeviceD-] port link-type trunk
# Assign the interface to VLANs 1 through 30.
[DeviceD-FortyGigE1/0/2] port trunk permit vlan 1 to 30
# Enable flush message receiving on the interface.
[DeviceD-FortyGigE1/0/2] smart-link flush enable [DeviceD-FortyGigE1/0/2] quit
# Create monitor link group 1.
[DeviceD] monitor-link group 1
# Configure FortyGigE 1/0/1 as an uplink interface for monitor link group 1.
[DeviceD-mtlk-group1] port fortygige 1/0/1 uplink
# Configure as a downlink interface for monitor link group 1.
[DeviceD-mtlk-group1] port fortygige 1/0/2 downlink [DeviceD-mtlk-group1] quit
Verifying the configuration
# When on Device A goes down because of a link fault, verify information about monitor link group 1 on Device B.
[DeviceB] display monitor-link group 1 Monitor link group 1 information: Group status : UP Downlink up-delay: 0(s) Last-up-time : 16:38:26 2012/4/21 Last-down-time : 16:37:20 2012/4/21 Up-port-threshold: 1 Member Role Status -------------------------------------------- FGE1/0/1 UPLINK UP FGE1/0/2 DOWNLINK UP
# Verify information about monitor link group 1 on Device D.
[DeviceD] display monitor-link group 1 Monitor link group 1 information: Group status : DOWN Downlink up-delay: 0(s) Last-up-time : 16:37:20 2012/4/21 Last-down-time : 16:38:26 2012/4/21 Up-port-threshold: 1 Member Role Status -------------------------------------------- FGE1/0/1 UPLINK DOWN FGE1/0/2 DOWNLINK DOWN