29
[Sysname] port-group manual group1
[Sysname-port-group-manual-group1] group-member gigabitethernet 1/0/1
loopback-detection action
Description
Use the loopback-detection action command to configure the action for loop protection on Ethernet
interfaces.
Use the undo loopback-detection action command to restore the default.
By default, a looped interface does not receive or send packets.
When you change the link type of an Ethernet interface by using the port link-type command, the switch
removes the protective action configured on the interface. For more information about the port link-type
command, see the chapter ―VLAN configuration commands.‖
Syntax
loopback-detection action { no-learning | semi-block | shutdown }
undo loopback-detection action
View
Layer 2 Ethernet interface view, port group view
Default level
2: System level
Parameters
no-learning: Disables MAC address learning on the interface.
semi-block: Blocks all packets but STP BPDUs.
shutdown: Shuts down the Ethernet interface. To bring up the interface again, use the undo shutdown
command.
Examples
# Configure the access port GigabitEthernet 1/0/1 to shut down when a loop is detected.
<Sysname> system-view
[Sysname] loopback-detection enable
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] loopback-detection enable
[Sysname-GigabitEthernet1/0/1] loopback-detection action shutdown
# Configure the trunk port GigabitEthernet 1/0/2 to shut down when a loop is detected.
<Sysname> system-view
[Sysname] loopback-detection enable
[Sysname] interface gigabitethernet 1/0/2
[Sysname-GigabitEthernet1/0/2] port link-type trunk
[Sysname-GigabitEthernet1/0/2] loopback-detection enable
[Sysname-GigabitEthernet1/0/2] loopback-detection control enable
[Sysname-GigabitEthernet1/0/2] loopback-detection action shutdown