As shown in Figure 1, a dual-homing networking is used to enhance network reliability. The customer wants to eliminate loops on the network while implementing link redundancy and fast convergence.
The configuration roadmap is as follows:
Create VLANs and configure related interfaces to allow packets of these VLANs to pass through.
Create a Smart Link group on SwitchA and specify the master and slave interfaces.
Enable revertive switching on SwitchA to enable traffic to be switched back to the original active link after the active link recovers.
Enable SwitchA to send Flush packets.
Enable interfaces of SwitchB, SwitchC, and SwitchD to receive Flush packets.
Enable the Smart Link group on SwitchA.
# Create VLANs on SwitchA and configure related interfaces to allow packets of these VLANs to pass through. The configurations of SwitchB, SwitchC, and SwitchD are similar to the configuration of SwitchA, and are not mentioned here.
<HUAWEI> system-view [HUAWEI] sysname SwitchA [SwitchA] vlan batch 10 to 30 [SwitchA] interface gigabitethernet 0/0/1 [SwitchA-GigabitEthernet0/0/1] port link-type trunk [SwitchA-GigabitEthernet0/0/1] port trunk allow-pass vlan 10 to 30 [SwitchA-GigabitEthernet0/0/1] quit [SwitchA] interface gigabitethernet 0/0/2 [SwitchA-GigabitEthernet0/0/2] port link-type trunk [SwitchA-GigabitEthernet0/0/2] port trunk allow-pass vlan 10 to 30 [SwitchA-GigabitEthernet0/0/2] quit
# Configure SwitchA.
[SwitchA] interface gigabitethernet 0/0/1 [SwitchA-GigabitEthernet0/0/1] stp disable [SwitchA-GigabitEthernet0/0/1] quit [SwitchA] interface gigabitethernet 0/0/2 [SwitchA-GigabitEthernet0/0/2] stp disable [SwitchA-GigabitEthernet0/0/2] quit [SwitchA] smart-link group 1 [SwitchA-smlk-group1] port gigabitethernet 0/0/1 master [SwitchA-smlk-group1] port gigabitethernet 0/0/2 slave
# Configure SwitchA.
[SwitchA-smlk-group1] restore enable [SwitchA-smlk-group1] timer wtr 30
# Configure SwitchA to send Flush packets containing an SHA-encrypted password.
[SwitchA-smlk-group1] flush send control-vlan 10 password sha huawei-123
# Enable SwitchB to receive Flush packets containing an SHA-encrypted password.
[SwitchB] interface gigabitethernet 0/0/1 [SwitchB-GigabitEthernet0/0/1] smart-link flush receive control-vlan 10 password sha huawei-123 [SwitchB-GigabitEthernet0/0/1] stp disable [SwitchB-GigabitEthernet0/0/1] quit [SwitchB] interface gigabitethernet 0/0/2 [SwitchB-GigabitEthernet0/0/2] smart-link flush receive control-vlan 10 password sha huawei-123 [SwitchB-GigabitEthernet0/0/2] stp disable [SwitchB-GigabitEthernet0/0/2] quit
# Enable SwitchC to receive Flush packets containing an SHA-encrypted password.
[SwitchC] interface gigabitethernet 0/0/1 [SwitchC-GigabitEthernet0/0/1] smart-link flush receive control-vlan 10 password sha huawei-123 [SwitchC-GigabitEthernet0/0/1] stp disable [SwitchC-GigabitEthernet0/0/1] quit [SwitchC] interface gigabitethernet 0/0/2 [SwitchC-GigabitEthernet0/0/2] smart-link flush receive control-vlan 10 password sha huawei-123 [SwitchC-GigabitEthernet0/0/2] stp disable [SwitchC-GigabitEthernet0/0/2] quit
# Enable SwitchD to receive Flush packets containing an SHA-encrypted password.
[SwitchD] interface gigabitethernet 0/0/1 [SwitchD-GigabitEthernet0/0/1] smart-link flush receive control-vlan 10 password sha huawei-123 [SwitchD-GigabitEthernet0/0/1] stp disable [SwitchD-GigabitEthernet0/0/1] quit [SwitchD] interface gigabitethernet 0/0/2 [SwitchD-GigabitEthernet0/0/2] smart-link flush receive control-vlan 10 password sha huawei-123 [SwitchD-GigabitEthernet0/0/2] stp disable [SwitchD-GigabitEthernet0/0/2] quit
[SwitchA-smlk-group1] smart-link enable [SwitchA-smlk-group1] quit
# Run the display smart-link group command to view information about the Smart Link group on SwitchA. If the following information is displayed, the configuration is successful:
[SwitchA] display smart-link group 1 Smart Link group 1 information : Smart Link group was enabled Wtr-time is: 30 sec. There is no Load-Balance There is no protected-vlan reference-instance DeviceID: 0018-2000-0083 Control-vlan ID: 10 Member Role InstanceID State Flush Count Last-Flush-Time --------------------------------------------------------------------------------- GigabitEthernet0/0/1 Master 0 Active 1 2009/01/05 10:33:46 UTC+05:00 GigabitEthernet0/0/2 Slave 0 Inactive 0 0000/00/00 00:00:00 UTC+05:00
# Run the shutdown command to shut down GE0/0/1. Then GE0/0/1 changes to Inactive state, and GE0/0/2 changes to Active state.
[SwitchA] interface gigabitethernet 0/0/1 [SwitchA-GigabitEthernet0/0/1] shutdown
[SwitchA-GigabitEthernet0/0/1] display smart-link group 1 Smart Link group 1 information : Smart Link group was enabled Wtr-time is: 30 sec. There is no Load-Balance There is no protected-vlan reference-instance DeviceID: 0018-2000-0083 Control-vlan ID: 10 Member Role InstanceID State Flush Count Last-Flush-Time --------------------------------------------------------------------------------- GigabitEthernet0/0/1 Master 0 Inactive 1 2009/01/05 10:33:46 UTC+05:00 GigabitEthernet0/0/2 Slave 0 Active 1 2009/01/05 10:34:46 UTC+05:00
# Run the undo shutdown command to restore GE0/0/1.
[SwitchA-GigabitEthernet0/0/1] undo shutdown
# After 30s, GE0/0/1 is in Active state and GE0/0/2 is in Inactive state.
[SwitchA-GigabitEthernet0/0/1] display smart-link group 1 Smart Link group 1 information : Smart Link group was enabled Wtr-time is: 30 sec. There is no Load-Balance There is no protected-vlan reference-instance DeviceID: 0018-2000-0083 Control-vlan ID: 10 Member Role InstanceID State Flush Count Last-Flush-Time --------------------------------------------------------------------------------- GigabitEthernet0/0/1 Master 0 Active 2 2009/01/05 10:35:46 UTC+05:00 GigabitEthernet0/0/2 Slave 0 Inactive 1 2009/01/05 10:34:46 UTC+05:00
SwitchA configuration file
# sysname SwitchA # vlan batch 10 to 30 # interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 10 to 30 stp disable # interface GigabitEthernet0/0/2 port link-type trunk port trunk allow-pass vlan 10 to 30 stp disable # smart-link group 1 restore enable smart-link enable port GigabitEthernet0/0/1 master port GigabitEthernet0/0/2 slave timer wtr 30 flush send control-vlan 10 password sha %^%#rwIhOw`~g7,xyl>~|:v9Cyw2CH,7l2\dbzA[cH3YA9BdA;1qqSs%WJHM3|hO%^%# # return
SwitchB configuration file
# sysname SwitchB # vlan batch 10 to 30 # interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 10 to 30 stp disable smart-link flush receive control-vlan 10 password sha %^%#fR)IGHHT:>]iNbG:Nq#)<^1p#`np!T#/\V&%)iHB_ibX!99]e#E{/L2Sxw!I%^%# # interface GigabitEthernet0/0/2 port link-type trunk port trunk allow-pass vlan 10 to 30 stp disable smart-link flush receive control-vlan 10 password sha %^%#XbPxG#g5C6$/*d2^GRU>3ODTJF_C(Bht`^*}tT05u]7SIZ5y%9bQ!x~3:v;O%^%# # return
SwitchC configuration file
# sysname SwitchC # vlan batch 10 to 30 # interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 10 to 30 stp disable smart-link flush receive control-vlan 10 password sha %^%#IOf[Q`=F=QK"O4-j9A}Y-N7<,F~cn%/NR:G-,L5*[SMN,FlIYAZd88*ObE;T%^%# # interface GigabitEthernet0/0/2 port link-type trunk port trunk allow-pass vlan 10 to 30 stp disable smart-link flush receive control-vlan 10 password sha %^%#vMK'GvJozEo1Fi:%~jkO<ge&0HgYZVh@ch709e49'r8&M{k6X.NzX)<K_R<P%^%# # return
SwitchD configuration file
# sysname SwitchD # vlan batch 10 to 30 # interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 10 to 30 stp disable smart-link flush receive control-vlan 10 password sha %^%#:ssvXl%=T&UGOl$eoPWJaQ'>)@+TbEELAQM=7sh~J1>;>,H<HIEjK$@kW1B1%^%# # interface GigabitEthernet0/0/2 port link-type trunk port trunk allow-pass vlan 10 to 30 stp disable smart-link flush receive control-vlan 10 password sha %^%#i~K431w:TERjN]OK0kS+Y*VB=*-BP2+X33UoHVG#{<qPBD:s1.~,2h/s($\&%^%# # return