Example: Configuring a single smart link group
Network configuration
As shown in Figure 38:
Device C and Device D are Smart Link devices. Device A, Device B, and Device E are associated devices. Traffic of VLANs 1 through 30 on Device C and Device D is dually uplinked to Device A.
Configure Smart Link on Device C and Device D for dual uplink backup.
Figure 38: 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 the 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 port.
[DeviceC-FortyGigE1/0/1] undo stp enable
# Configure the port as a trunk port.
[DeviceC-FortyGigE1/0/1] port link-type trunk
# Assign the port 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-FortyGigE1/0/2] port trunk permit vlan 1 to 30 [DeviceC-FortyGigE1/0/2] quit
# Create smart link group 1, and configure all VLANs mapped to MSTI 1 as the protected VLANs.
[DeviceC] smart-link group 1 [DeviceC-smlk-group1] protected-vlan reference-instance 1
# Configure FortyGigE 1/0/1 as the primary port and 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 flush message sending in smart link group 1, and configure VLAN 10 as the transmit control VLAN.
[DeviceC-smlk-group1] flush enable control-vlan 10 [DeviceC-smlk-group1] quit
# Bring up FortyGigE 1/0/1 and FortyGigE 1/0/2 again.
[DeviceC] interface fortygige 1/0/1 [DeviceC-FortyGigE1/0/1] undo shutdown [DeviceC-FortyGigE1/0/1] quit [DeviceC] interface fortygige 1/0/2 [DeviceC-] undo shutdown [DeviceC-FortyGigE1/0/2] quit
Configure Device D:
# Create VLANs 1 through 30.
<DeviceD> system-view [DeviceD] vlan 1 to 30
# Map these VLANs to MSTI 1.
[DeviceD] stp region-configuration [DeviceD-mst-region] instance 1 vlan 1 to 30
# Activate the MST region configuration.
[DeviceD-mst-region] active region-configuration [DeviceD-mst-region] quit
# Shut down .
[DeviceD] interface fortygige 1/0/1 [DeviceD-FortyGigE1/0/1] shutdown
# Disable the spanning tree feature on the port.
[DeviceD-FortyGigE1/0/1] undo stp enable
# Configure the port as a trunk port.
[DeviceD-FortyGigE1/0/1] port link-type trunk
# Assign the port to VLANs 1 through 30.
[DeviceD-FortyGigE1/0/1] port trunk permit vlan 1 to 30 [DeviceD-FortyGigE1/0/1] quit
# Configure FortyGigE 1/0/2 in the same way FortyGigE 1/0/1 is configured.
[DeviceD] interface fortygige 1/0/2 [DeviceD-FortyGigE1/0/2] shutdown [DeviceD-FortyGigE1/0/2] undo stp enable [DeviceD-FortyGigE1/0/2] port link-type trunk [DeviceD-] port trunk permit vlan 1 to 30 [DeviceD-FortyGigE1/0/2] quit
# Create smart link group 1, and configure all VLANs mapped to MSTI 1 as the protected VLANs.
[DeviceD] smart-link group 1 [DeviceD-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.
[DeviceD-smlk-group1] port fortygige 1/0/1 primary [DeviceD-smlk-group1] port fortygige 1/0/2 secondary
# Enable flush message sending in smart link group 1, and configure VLAN 20 as the transmit control VLAN.
[DeviceD-smlk-group1] flush enable control-vlan 20 [DeviceD-smlk-group1] quit
# Bring up FortyGigE 1/0/1 and again.
[DeviceD] interface fortygige 1/0/1 [DeviceD-FortyGigE1/0/1] undo shutdown [DeviceD-] quit [DeviceD] interface fortygige 1/0/2 [DeviceD-FortyGigE1/0/2] undo shutdown [DeviceD-FortyGigE1/0/2] quit
Configure Device B:
# Create VLANs 1 through 30.
<DeviceB> system-view [DeviceB] vlan 1 to 30
# Configure FortyGigE 1/0/1 as a trunk port.
[DeviceB] interface fortygige 1/0/1 [DeviceB-FortyGigE1/0/1] port link-type trunk
# Assign the port to VLANs 1 through 30.
[DeviceB-] port trunk permit vlan 1 to 30
# Enable flush message receiving and configure VLAN 10 and VLAN 20 as the receive control VLANs on the port.
[DeviceB-FortyGigE1/0/1] smart-link flush enable control-vlan 10 20 [DeviceB-FortyGigE1/0/1] quit
# Configure FortyGigE 1/0/2 as a trunk port.
[DeviceB] interface [DeviceB-FortyGigE1/0/2] port link-type trunk
# Assign the port to VLANs 1 through 30.
[DeviceB-FortyGigE1/0/2] port trunk permit vlan 1 to 30
# Disable the spanning tree feature on the port.
[DeviceB-FortyGigE1/0/2] undo stp enable
# Enable flush message receiving and configure VLAN 20 as the receive control VLAN on the port.
[DeviceB-FortyGigE1/0/2] smart-link flush enable control-vlan 20 [DeviceB-FortyGigE1/0/2] quit
# Configure as a trunk port.
[DeviceB] interface fortygige 1/0/3 [DeviceB-FortyGigE1/0/3] port link-type trunk
# Assign the port to VLANs 1 through 30.
[DeviceB-FortyGigE1/0/3] port trunk permit vlan 1 to 30
# Disable the spanning tree feature on the port.
[DeviceB-FortyGigE1/0/3] undo stp enable
# Enable flush message receiving and configure VLAN 10 as the receive control VLAN on the port.
[DeviceB-FortyGigE1/0/3] smart-link flush enable control-vlan 10 [DeviceB-] quit
Configure Device E:
# Create VLANs 1 through 30.
<DeviceE> system-view [DeviceE] vlan 1 to 30
# Configure FortyGigE 1/0/1 as a trunk port.
[DeviceE] interface fortygige 1/0/1 [DeviceE-FortyGigE1/0/1] port link-type trunk
# Assign the port to VLANs 1 through 30.
[DeviceE-FortyGigE1/0/1] port trunk permit vlan 1 to 30
# Enable flush message receiving and configure VLAN 10 and VLAN 20 as the receive control VLANs on the port.
[DeviceE-FortyGigE1/0/1] smart-link flush enable control-vlan 10 20 [DeviceE-FortyGigE1/0/1] quit
# Configure FortyGigE 1/0/2 as a trunk port.
[DeviceE] interface fortygige 1/0/2 [DeviceE-FortyGigE1/0/2] port link-type trunk
# Assign the port to VLANs 1 through 30.
[DeviceE-FortyGigE1/0/2] port trunk permit vlan 1 to 30
# Disable the spanning tree feature on the port.
[DeviceE-FortyGigE1/0/2] undo stp enable
# Enable flush message receiving and configure VLAN 10 as the receive control VLAN on the port.
[DeviceE-FortyGigE1/0/2] smart-link flush enable control-vlan 10 [DeviceE-FortyGigE1/0/2] quit
# Configure as a trunk port.
[DeviceE] interface fortygige 1/0/3 [DeviceE-FortyGigE1/0/3] port link-type trunk
# Assign the port to VLANs 1 through 30.
[DeviceE-FortyGigE1/0/3] port trunk permit vlan 1 to 30
# Disable the spanning tree feature on the port.
[DeviceE-FortyGigE1/0/3] undo stp enable
# Enable flush message receiving and configure VLAN 20 as the receive control VLAN on the port.
[DeviceE-FortyGigE1/0/3] smart-link flush enable control-vlan 20 [DeviceE-] 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 [DeviceA-FortyGigE1/0/1] port link-type trunk
# Assign the port to VLANs 1 through 30.
[DeviceA-FortyGigE1/0/1] port trunk permit vlan 1 to 30
# Enable flush message receiving and configure VLAN 10 and VLAN 20 as the receive control VLANs on the port.
[DeviceA-FortyGigE1/0/1] smart-link flush enable control-vlan 10 20 [DeviceA-FortyGigE1/0/1] quit
# Configure FortyGigE 1/0/2 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 control-vlan 10 20 [DeviceA-FortyGigE1/0/2] quit
Verifying the configuration
# Display the smart link group configuration on Device C.
[DeviceC] display smart-link group 1 Smart link group 1 information: Device ID : 000f-e23d-5af0 Preemption mode : None Preemption delay: 1(s) Control VLAN : 10 Protected VLAN : Reference Instance 1 Member Role State Flush-count Last-flush-time ----------------------------------------------------------------------------- FGE1/0/1 PRIMARY ACTIVE 5 16:45:20 2012/04/21 FGE1/0/2 SECONDARY STANDBY 1 16:37:20 2012/04/21
# Display the flush messages received on Device B.
[DeviceB] display smart-link flush Received flush packets : 5 Receiving interface of the last flush packet : FortyGigE1/0/3 Receiving time of the last flush packet : 16:50:21 2012/04/21 Device ID of the last flush packet : 000f-e23d-5af0 Control VLAN of the last flush packet : 10