The block port command configures the mode in which an interface is blocked on the device where the primary edge interface resides.
The undo block port command restores the default mode in which an interface is blocked on the device where the primary edge interface resides.
By default, the system selects a blocked interface from the interfaces on both ends of the link that is established last or the link that recovers from a fault last.
block port { sysname sysname interface interface-type interface-number | hop hop-id | optimal | middle }
undo block port
Parameter | Description | Value |
---|---|---|
sysname sysname | Specifies the name of the device where the interface to be blocked resides. | The value is a string of 1 to 20 case-sensitive characters without spaces. When double quotation marks are used around the string, spaces are allowed in the string. |
interface interface-type interface-number | Specifies the interface to be blocked. interface-type indicates the type of the interface to be blocked. After SEP is enabled, sysname sysname and interface { interface-type interface-number } specify the interface to be blocked. Before configuring the mode in which an interface is blocked, run the display sep topology verbose command to view detailed information about the topology of the current ring and obtain information about all the interfaces in the topology. Then, you can specify the device and interface names. |
- |
hop hop-id | Specifies the interface with the specified hop count from the primary edge interface as the blocked interface. hop-id specifies the hop count. If hop-id is set to 1, the primary edge interface is blocked. If hop-id is set to 2, the neighboring interface of the primary edge interface is blocked. The hop count increases by steps of 1 in the downstream direction of the primary edge interface. |
The value is an integer that ranges from 1 to 128. |
optimal | Specifies the interface with the highest priority as the blocked interface. SEP compares interface priorities as follows:
|
- |
middle | Specifies the interface in the middle of the SEP segment as the blocked interface. |
- |
In a SEP segment, some interfaces are blocked to prevent loops. Any interface in a SEP segment may be blocked if no interface is specified for blocking. A complete SEP segment contains only one blocked interface.
You can specify the blocked interface according to network requirements or your reference. The specified interface is not blocked immediately. Normally, the blocked interface is one of the two interfaces that complete neighbor negotiations last. The specified interface preempts to be the blocked interface only after the preemption mechanism takes effect.
The SEP segment must have been created before the block port command is used.
To make the block port command configuration take effect, complete the following tasks before using the block port command.
Run the sep segment command in the system view to create a SEP segment.
Run the control-vlan (SEP segment view) command to configure the control VLAN of the SEP segment.
Run the sep segment (interface view) command to add the interface to the SEP segment and configure the interface as the primary edge interface.
# On the device where the primary edge interface is located, specify the device and interface names to block the specified interface.
<HUAWEI> system-view
[HUAWEI] sep segment 1
[HUAWEI-sep-segment1] block port sysname HUAWEI interface gigabitethernet 0/0/1
# On the device where the primary edge interface is located, specify the interface with the specified hop count from the primary edge interface as the interface to be blocked.
<HUAWEI> system-view
[HUAWEI] sep segment 1
[HUAWEI-sep-segment1] block port hop 3
# On the device where the primary edge interface is located, specify the interface with the highest priority as the interface to be blocked.
<HUAWEI> system-view
[HUAWEI] sep segment 1
[HUAWEI-sep-segment1] block port optimal
# On the device where the primary edge interface is located, specify the interface in the middle of the SEP segment as the interface to be blocked.
<HUAWEI> system-view
[HUAWEI] sep segment 1
[HUAWEI-sep-segment1] block port middle