display VLAN - HPE Support Center

HP 5830 Switch Series
Layer 2—LAN Switching
Command Reference
Part number: 5998-2073
Software version: Release 1115, Release 1118
Document version: 6W101-20130604
Legal and notice information
© Copyright 2013 Hewlett-Packard Development Company, L.P.
No part of this documentation may be reproduced or transmitted in any form or by any means without
prior written consent of Hewlett-Packard Development Company, L.P.
The information contained herein is subject to change without notice.
HEWLETT-PACKARD COMPANY MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS
MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard shall not be liable for errors contained
herein or for incidental or consequential damages in connection with the furnishing, performance, or
use of this material.
The only warranties for HP products and services are set forth in the express warranty statements
accompanying such products and services. Nothing herein should be construed as constituting an
additional warranty. HP shall not be liable for technical or editorial errors or omissions contained
herein.
Contents
Ethernet interface configuration commands ··············································································································· 1 General Ethernet interface configuration commands ···································································································· 1 default ········································································································································································ 1 description ································································································································································· 1 display counters ························································································································································ 2 display counters rate ················································································································································ 3 display interface ······················································································································································· 5 display packet-drop interface ······························································································································· 14 display packet-drop summary ······························································································································ 15 display port combo ··············································································································································· 16 duplex ····································································································································································· 17 flow-control ····························································································································································· 17 flow-interval ···························································································································································· 18 interface ·································································································································································· 18 jumboframe enable ··············································································································································· 19 link-delay ································································································································································ 19 link-delay mode up ················································································································································ 20 loopback ································································································································································ 21 port auto-power-down ··········································································································································· 21 port link-mode ························································································································································ 22 port link-mode interface-list ··································································································································· 23 reset counters interface ········································································································································· 24 reset packet-drop interface ··································································································································· 24 shutdown ································································································································································ 25 speed ······································································································································································ 26 Layer 2 Ethernet interface configuration commands ·································································································· 27 broadcast-suppression ·········································································································································· 27 display loopback-detection··································································································································· 28 loopback-detection action ···································································································································· 29 loopback-detection control enable ······················································································································ 29 loopback-detection enable ··································································································································· 30 loopback-detection interval-time ·························································································································· 31 loopback-detection multi-port-mode enable ········································································································ 32 loopback-detection per-vlan enable ···················································································································· 33 mdi ·········································································································································································· 33 multicast-suppression ············································································································································· 34 speed auto ····························································································································································· 35 unicast-suppression ················································································································································ 36 virtual-cable-test ····················································································································································· 37 Layer 3 Ethernet interface configuration commands ·································································································· 38 mtu ·········································································································································································· 38 Loopback and null interface configuration commands ··························································································· 40 default ····································································································································································· 40 description ······························································································································································ 40 display interface loopback ··································································································································· 41 display interface null ············································································································································· 44 interface loopback ················································································································································ 45 interface null··························································································································································· 46 i
reset counters interface loopback ························································································································ 46 reset counters interface null ·································································································································· 47 shutdown ································································································································································ 48 Bulk interface configuration commands ··················································································································· 49 interface range ······················································································································································ 49 interface range name ············································································································································ 50 MAC address table configuration commands ········································································································· 51 display mac-address ············································································································································· 51 display mac-address aging-time ·························································································································· 52 display mac-address statistics ······························································································································ 53 mac-address (interface view)································································································································ 54 mac-address (system view) ··································································································································· 55 mac-address mac-learning disable ······················································································································ 56 mac-address max-mac-count ································································································································ 57 mac-address timer ················································································································································· 58 MAC Information configuration commands ············································································································· 60 mac-address information enable (interface view) ······························································································ 60 mac-address information enable (system view) ·································································································· 60 mac-address information interval ························································································································· 61 mac-address information mode···························································································································· 61 mac-address information queue-length················································································································ 62 Ethernet link aggregation configuration commands ································································································ 63 default ····································································································································································· 63 description ······························································································································································ 63 display interface ···················································································································································· 64 display lacp system-id ··········································································································································· 66 display link-aggregation load-sharing mode ······································································································ 67 display link-aggregation member-port ················································································································ 69 display link-aggregation summary······················································································································· 71 display link-aggregation verbose ························································································································ 72 enable snmp trap updown ··································································································································· 74 interface bridge-aggregation ······························································································································· 75 lacp period short ··················································································································································· 76 lacp system-priority ················································································································································ 76 link-aggregation lacp traffic-redirect-notification enable ··················································································· 77 link-aggregation load-sharing mode ··················································································································· 78 link-aggregation load-sharing mode local-first ··································································································· 79 link-aggregation mode ·········································································································································· 80 link-aggregation port-priority ································································································································ 80 port link-aggregation group ································································································································· 81 reset counters interface ········································································································································· 82 reset lacp statistics ················································································································································· 82 shutdown ································································································································································ 83 Port isolation configuration commands ···················································································································· 84 display port-isolate group ····································································································································· 84 port-isolate enable ················································································································································· 85 Spanning tree configuration commands··················································································································· 86 active region-configuration ··································································································································· 86 bpdu-drop any ······················································································································································· 86 check region-configuration ··································································································································· 87 display stp ······························································································································································ 88 ii
display stp abnormal-port ····································································································································· 95 display stp bpdu-statistics ····································································································································· 96 display stp down-port ············································································································································ 99 display stp history ················································································································································ 100 display stp ignored-vlan······································································································································ 102 display stp region-configuration ························································································································ 102 display stp root ···················································································································································· 104 display stp tc ························································································································································ 105 instance ································································································································································ 106 region-name ························································································································································· 107 reset stp ································································································································································ 108 revision-level ························································································································································· 109 stp bpdu-protection ·············································································································································· 110 stp bridge-diameter ············································································································································· 110 stp compliance ····················································································································································· 111 stp config-digest-snooping ·································································································································· 112 stp cost ·································································································································································· 113 stp edged-port ······················································································································································ 114 stp enable ····························································································································································· 115 stp ignored vlan ··················································································································································· 116 stp loop-protection ··············································································································································· 117 stp max-hops ························································································································································ 118 stp mcheck···························································································································································· 118 stp mode ······························································································································································· 119 stp no-agreement-check ······································································································································ 120 stp pathcost-standard ·········································································································································· 121 stp point-to-point ·················································································································································· 121 stp port priority ···················································································································································· 122 stp port-log ··························································································································································· 124 stp priority ···························································································································································· 125 stp region-configuration ······································································································································ 125 stp root primary ··················································································································································· 126 stp root secondary ··············································································································································· 127 stp root-protection ················································································································································ 128 stp tc-protection ···················································································································································· 129 stp tc-protection threshold ··································································································································· 129 stp timer forward-delay ······································································································································· 130 stp timer hello······················································································································································· 131 stp timer max-age ················································································································································ 132 stp timer-factor ····················································································································································· 133 stp transmit-limit ··················································································································································· 134 vlan-mapping modulo ········································································································································· 135 BPDU tunneling configuration commands ············································································································· 136 bpdu-tunnel dot1q ··············································································································································· 136 bpdu-tunnel tunnel-dmac ····································································································································· 137 VLAN configuration commands ····························································································································· 139 Basic VLAN configuration commands ······················································································································· 139 default ··································································································································································· 139 description ···························································································································································· 139 display interface vlan-interface ·························································································································· 141 display vlan ·························································································································································· 143 interface vlan-interface ········································································································································ 145 ip address ···························································································································································· 145 iii
mtu ········································································································································································ 146 name ····································································································································································· 147 shutdown ······························································································································································ 148 vlan ······································································································································································· 149 Port-based VLAN configuration commands ··············································································································· 150 display port ·························································································································································· 150 port ········································································································································································ 151 port access vlan ··················································································································································· 152 port hybrid pvid ··················································································································································· 153 port hybrid vlan ··················································································································································· 154 port link-type ························································································································································ 155 port trunk permit vlan ·········································································································································· 156 port trunk pvid ····················································································································································· 157 MAC-based VLAN configuration commands ············································································································ 158 display mac-vlan ·················································································································································· 158 display mac-vlan interface ·································································································································· 160 mac-vlan enable ·················································································································································· 161 mac-vlan mac-address ········································································································································· 161 mac-vlan trigger enable ······································································································································ 162 port pvid disable ················································································································································· 163 vlan precedence ·················································································································································· 163 Protocol-based VLAN configuration commands ······································································································· 164 display protocol-vlan interface ··························································································································· 164 display protocol-vlan vlan··································································································································· 165 port hybrid protocol-vlan ···································································································································· 166 protocol-vlan ························································································································································ 168 IP subnet-based VLAN configuration commands ······································································································ 169 display ip-subnet-vlan interface ·························································································································· 169 display ip-subnet-vlan vlan ································································································································· 170 ip-subnet-vlan ······················································································································································· 171 port hybrid ip-subnet-vlan ··································································································································· 172 Isolate-user-VLAN configuration commands ·········································································································· 174 display isolate-user-vlan ······································································································································ 174 isolate-user-vlan···················································································································································· 175 isolate-user-vlan enable ······································································································································· 176 isolated-vlan enable ············································································································································ 177 port isolate-user-vlan promiscuous ····················································································································· 178 port isolate-user-vlan host···································································································································· 180 GVRP configuration commands ····························································································································· 182 display garp statistics·········································································································································· 182 display garp timer ··············································································································································· 183 display gvrp local-vlan ········································································································································ 184 display gvrp state ················································································································································ 184 display gvrp statistics ·········································································································································· 186 display gvrp status··············································································································································· 187 display gvrp vlan-operation ······························································································································· 187 garp timer hold ···················································································································································· 188 garp timer join ····················································································································································· 189 garp timer leave ·················································································································································· 190 garp timer leaveall ·············································································································································· 190 gvrp ······································································································································································· 191 gvrp registration ·················································································································································· 192 reset garp statistics ·············································································································································· 192 iv
QinQ configuration commands ····························································································································· 194 nest ········································································································································································ 194 qinq enable ·························································································································································· 195 qinq ethernet-type customer-tag ························································································································· 195 qinq ethernet-type service-tag····························································································································· 196 qinq transparent-vlan ·········································································································································· 197 VLAN mapping configuration commands ············································································································· 199 nest ········································································································································································ 199 qinq enable downlink ········································································································································· 199 qinq enable uplink ·············································································································································· 200 remark customer-vlan-id ······································································································································ 200 remark service-vlan-id ········································································································································· 201 LLDP configuration commands································································································································ 202 display lldp local-information ····························································································································· 202 display lldp neighbor-information ······················································································································ 205 display lldp statistics ··········································································································································· 211 display lldp status ················································································································································ 212 display lldp tlv-config ·········································································································································· 214 lldp admin-status ·················································································································································· 216 lldp check-change-interval ·································································································································· 217 lldp enable ··························································································································································· 217 lldp encapsulation snap ······································································································································ 218 lldp fast-count ······················································································································································· 218 lldp hold-multiplier ··············································································································································· 219 lldp management-address-format string ············································································································ 220 lldp management-address-tlv ······························································································································ 220 lldp notification remote-change enable ············································································································· 221 lldp timer notification-interval ····························································································································· 221 lldp timer reinit-delay ·········································································································································· 222 lldp timer tx-delay ················································································································································ 222 lldp timer tx-interval ············································································································································· 223 lldp tlv-enable ······················································································································································· 224 Service loopback group configuration commands ······························································································· 227 display service-loopback group ························································································································· 227 port service-loopback group ······························································································································ 228 service-loopback group ······································································································································ 228 Support and other resources ·································································································································· 230 Contacting HP ······························································································································································ 230 Subscription service ············································································································································ 230 Related information ······················································································································································ 230 Documents ···························································································································································· 230 Websites······························································································································································· 230 Conventions ·································································································································································· 231 Index ········································································································································································ 233 v
Ethernet interface configuration commands
General Ethernet interface configuration
commands
default
Use default to restore the default settings for an Ethernet interface.
Syntax
default
Views
Ethernet interface view
Default command level
2: System level
Usage guidelines
CAUTION:
The default command might interrupt ongoing network services. Make sure you are fully aware of the
impacts of this command when you use it in a live network.
This command might fail to restore the default settings for some commands for reasons such as command
dependencies and system restrictions. Use the display this command in interface view to identify these
commands, and then use their undo forms or follow the command reference to individually restore their
default settings. If your restoration attempt still fails, follow the error message instructions to resolve the
problem.
Examples
# Restore the default settings for interface GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] default
This command will restore the default settings. Continue? [Y/N]:y
description
Use description to change the description of the interface.
Use undo description to restore the default.
Syntax
description text
undo description
1
Default
The default description of an interface is the interface name plus Interface. For example, GigabitEthernet
1/0/1 Interface.
Views
Ethernet interface view
Default command level
2: System level
Parameters
text: Specifies the interface description, a string of 1 to 80 characters. The string can include
case-sensitive letters, digits, special characters such as tilde (~), exclamation point (!), at sign (@), pound
sign (#), dollar sign ($), percent sign (%), caret (^), ampersand sign (&), asterisk (*), left brace({), right
brace (}), left parenthesis ((), right parenthesis ()), left bracket ([), right bracket (]), left angle bracket (<),
right angle bracket (>), hyphen (-), underscore(_), plus sign (+), equal sign (=), vertical bar (|), back
slash (\), colon (:), semi-colon (;), quotation marks ("), apostrophe ('), comma (,), dot (.), and slash (/),
spaces, and other Unicode characters and symbols.
When you specify a description, follow these guidelines:
•
Each Unicode character takes the space of two regular characters.
•
To use Unicode characters or symbols in an interface description, install the specific input method
editor and log in to the device through remote login software that supports the character type.
•
When the length of a description string reaches or exceeds the maximum line width on the terminal
software, the software starts a new line, possibly breaking a Unicode character in half. This might
result in garbled characters at the end of a line.
Examples
# Change the description of interface GigabitEthernet 1/0/1 to lanswitch-interface.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] description lanswitch-interface
Related commands
display interface
display counters
Use display counters to display traffic statistics for interfaces.
Syntax
display counters { inbound | outbound } interface [ interface-type ] [ | { begin | exclude | include }
regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
inbound: Displays inbound traffic statistics.
2
outbound: Displays outbound traffic statistics.
interface-type: Specifies an interface type.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
If an interface type is specified, this command displays traffic statistics for all interfaces of the specified
type.
If no interface type is specified, this command displays traffic statistics for all interfaces that have traffic
counters.
Examples
# Display inbound traffic statistics for all GigabitEthernet interfaces.
<Sysname> display counters inbound interface gigabitethernet
Interface
Total(pkts)
GE1/0/1
Broadcast(pkts)
100
Multicast(pkts) Err(pkts)
100
0
0
GE1/0/2
0
0
0
0
GE1/0/3
Overflow
Overflow
Overflow
OverFlow
GE1/0/4
0
0
0
0
Overflow: more than 14 decimal digits(7 digits for column "Err").
--: not supported.
Table 1 Command output
Field
Description
Interface
Abbreviated interface name.
Total (pkts)
Total number of packets received or sent through the interface.
Broadcast (pkts)
Total number of broadcast packets received or sent through the interface.
Multicast (pkts)
Total number of multicast packets received or sent through the interface.
Err (pkts)
Total number of error packets received or sent through the interface.
Overflow: more than 14
decimal digits(7 digits for
column "Err").
The command displays Overflow if any of the following applies:
• The data length of an error statistic is greater than 7 decimal digits.
• The data length of a non-error statistic is greater than 14 decimal digits.
--: not supported.
The statistical item is not supported.
display counters rate
Use display counters rate to display traffic rate statistics over the last statistics polling interval.
3
Syntax
display counters rate { inbound | outbound } interface [ interface-type ] [ | { begin | exclude | include }
regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
inbound: Displays inbound traffic rate statistics.
outbound: Displays outbound traffic rate statistics.
interface-type: Specifies an interface type.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
The statistics cover only interfaces in up state. If an interface type is specified, the command displays
traffic rate statistics for all up interfaces of the specified type. If no interface type is specified, the
command displays traffic rate statistics for all up interfaces that have traffic counters.
You can use the flow-interval command to set the statistics polling interval, which is 5 minutes by default.
Examples
# Display the inbound traffic rate statistics for all GigabitEthernet interfaces.
<Sysname> display counters rate inbound interface gigabitethernet
Interface
Total(pkts/sec)
GE1/0/1
Broadcast(pkts/sec)
0
--
Multicast(pkts/sec)
--
Overflow: more than 14 decimal digits.
--: not supported.
Table 2 Command output
Field
Description
Interface
Abbreviated interface name.
Total (pkts/sec)
Average rate (in pps) of receiving or sending packets during the statistics
polling interval.
Broadcast (pkts/sec)
Average rate (in pps) of receiving or sending broadcast packets during the
statistics polling interval.
Multicast (pkts/sec)
Average rate (in pps) of receiving or sending multicast packets during the
statistics polling interval.
4
Field
Overflow: more than 14
decimal digits.
--: not supported.
Description
The command displays Overflow if any of the following applies:
• The data length of an error statistic is greater than 7 decimal digits.
• The data length of a non-error statistic is greater than 14 decimal digits.
The statistical item is not supported.
Related commands
flow-interval
display interface
Use display interface to display Ethernet interface information.
Syntax
display interface [ interface-type ] [ brief [ down ] ] [ | { begin | exclude | include } regular-expression ]
display interface interface-type interface-number [ brief ] [ | { begin | exclude | include }
regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
interface-type: Specifies an interface type.
interface-number: Specifies an interface number.
brief: Displays brief interface information. If you do not specify this keyword, the command displays
detailed interface information.
down: Displays information about interfaces in the down state and the causes. If you do not specify this
keyword, this command displays information about interfaces in all states.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
If no interface type is specified, this command displays information about all interfaces.
If an interface type is specified but no interface number is specified, this command displays information
about all interfaces of the specified type.
Examples
# Display information about Layer 3 interface GigabitEthernet 1/0/1.
<Sysname> display interface gigabitethernet 1/0/1
5
GigabitEthernet1/0/1 current state: DOWN
Line protocol current state: DOWN
Description: GigabitEthernet1/0/1 Interface
The Maximum Transmit Unit is 1500
Internet protocol processing : disabled
IP Packet Frame Type: PKTFMT_ETHNT_2,
Hardware Address: 3ce5-a6df-e139
IPv6 Packet Frame Type: PKTFMT_ETHNT_2,
Hardware Address: 3ce5-a6df-e139
Media type is twisted pair
Port hardware type is
1000_BASE_T
Port priority: 0
Output queue: Strict-priority queue
Unknown-speed mode, unknown-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
Flow-control is not enabled
The Maximum Frame Length is 9216
Peak value of input: 0 bytes/sec, at 2011-05-28 10:01:36
Peak value of output: 0 bytes/sec, at 2011-05-28 10:01:36
Last 300 seconds input:
0 packets/sec 0 bytes/sec
Last 300 seconds output:
Input (total):
0 packets/sec 0 bytes/sec
0 packets, 0 bytes
0 unicasts, 0 broadcasts,
Input (normal):
0 multicasts, 0 pauses
0 packets, - bytes
0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses
Input:
0 input errors, 0 runts, 0 giants, 0 throttles
0 CRC,
0 frame, - overruns, 0 aborts
- ignored, - parity errors
Output (total):
0 packets, 0 bytes
0 unicasts, 0 broadcasts,
Output (normal):
0 multicasts, 0 pauses
0 packets, - bytes
0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses
Output:
0 output errors,
0 aborts,
- underruns, - buffer failures
0 deferred, 0 collisions, 0 late collisions
0 lost carrier, - no carrier
Table 3 Command output
Field
Description
State of the Ethernet interface:
• DOWN ( Administratively )—The Ethernet interface was shut down with
the shutdown command. The interface is administratively down.
GigabitEthernet1/0/1 current
state
• DOWN ( Link-Aggregation interface down )—The Ethernet interface is
physically down because the aggregate interface corresponding to the
aggregation group to which the Ethernet interface belongs was shut
down with the shutdown command.
• DOWN—The Ethernet interface is administratively up but physically
down (possibly because no physical link is present or the link has failed).
• UP—The Ethernet interface is both administratively and physically up.
6
Field
Description
Link layer state of the interface:
• DOWN—The interface is physically down.
• UP—The interface is physically up.
Line protocol current state
Disabled indicates that IP packets cannot be processed.
Internet protocol processing
For an interface configured with an IP address, this field changes to Internet
Address is.
Media type is
Physical medium, twisted pair or optical fiber.
Last clearing of counters
Time when the reset counters interface command was last used to clear the
interface statistics. If the command was never used after the device was
started, this field displays Never.
Average output rate over the last 300 seconds in Bps, bps, and pps.
Last 300 seconds output rate
The statistics polling interval, 300 seconds in this example, can be
configured by using the flow-interval command.
Input
Input packets.
Output
Output packets.
# Display detailed information about Layer 2 interface GigabitEthernet 1/0/1.
<Sysname> display interface gigabitethernet 1/0/1
GigabitEthernet1/0/1 current state: DOWN
IP Packet Frame Type: PKTFMT_ETHNT_2, Hardware Address: 3ce5-a6df-e142
Description: GigabitEthernet1/0/1 Interface
Loopback is not set
Media type is twisted pair
Port hardware type is
1000_BASE_T
Unknown-speed mode, unknown-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
The Maximum Frame Length is 9216
Broadcast MAX-ratio: 100%
Unicast MAX-ratio: 100%
Multicast MAX-ratio: 100%
Allow jumbo frame to pass
PVID: 1
Mdi type: auto
Port link-type: access
Tagged
VLAN ID : none
Untagged VLAN ID : 1
Port priority: 0
Last clearing of counters:
Never
Peak value of input: 0 bytes/sec, at 2011-05-28 10:02:36
Peak value of output: 0 bytes/sec, at 2011-05-28 10:02:36
Last 300 seconds input:
Last 300 seconds output:
Input (total):
0 packets/sec 0 bytes/sec -%
0 packets/sec 0 bytes/sec -%
0 packets, 0 bytes
0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses
Input (normal):
0 packets, - bytes
7
0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses
Input:
0 input errors, 0 runts, 0 giants, 0 throttles
0 CRC, 0 frame, - overruns, 0 aborts
- ignored, - parity errors
Output (total): 0 packets, 0 bytes
0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses
Output (normal): 0 packets, - bytes
0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses
Output: 0 output errors, - underruns, - buffer failures
0 aborts, 0 deferred, 0 collisions, 0 late collisions
0 lost carrier, - no carrier
Table 4 Command output
Field
Description
GigabitEthernet1/0/1 current state
Physical state of the Ethernet interface. For more information, see Table
5.
IP Packet Frame Type
Ethernet framing format on the interface.
Loopback
Loopback testing status of the interface.
Unknown-speed mode
This field displays Unknown-speed mode when the interface is
disconnected from the peer that it will automatically negotiate a port
speed with.
Link speed type is autonegotiation
The interface will negotiate a speed with its peer.
link duplex type is autonegotiation
The interface will negotiate a duplex mode with its peer.
The Maximum Frame Length
Maximum Ethernet frame length allowed on the interface.
Broadcast MAX-ratio
Broadcast suppression threshold as a percentage of the maximum
interface rate. When the threshold is exceeded, the interface drops
broadcast packets.
Unicast MAX-ratio
Unknown unicast suppression threshold as a percentage of the
maximum interface rate. When the threshold is exceeded, the
interface drops unknown unicast packets.
Multicast MAX-ratio
Multicast suppression threshold as a percentage of the maximum
interface rate. When the threshold is exceeded, the interface drops
multicast packets.
Allow jumbo frame to pass
Jumbo frames are allowed to pass through the interface.
PVID
Port VLAN ID.
Mdi type
Cable type.
Port link-type
Link type of the interface, which can be access, trunk, or hybrid.
Tagged VLAN ID
VLANs for which the interface sends packets without removing VLAN
tags.
Untagged VLAN ID
VLANs for which the interface sends packets after removing VLAN
tags.
Last clearing of counters: Never
Time when the reset counters interface command was last used to clear
statistics on the interface. Never indicates that the reset counters
interface command was never used after the device was started.
8
Field
Description
Peak value of input
Peak value of inbound traffic, in Bps.
Peak value of output
Peak value of outbound traffic, in Bps.
Last 300 seconds input: 0
packets/sec 0 bytes/sec -%
Average rate of input and output traffic in the last 300 seconds, in pps
and Bps.
Last 300 seconds output: 0
packets/sec 0 bytes/sec -%
The statistics polling interval, 300 seconds in this example, can be
configured by using the flow-interval command.
Input (total): 0 packets, 0 bytes
Inbound traffic statistics (in packets and bytes) for the interface. All
inbound normal and abnormal packets (including unicast, broadcast,
and multicast), and pause frames were counted.
0 unicasts, 0 broadcasts, 0
multicasts, 0 pauses
Input (normal): 0 packets, - bytes
0 unicasts, 0 broadcasts, 0
multicasts, 0 pauses
Inbound normal traffic (including unicast, broadcast, and multicast)
and pause frame statistics (in packets and bytes) for the interface.
input errors
Inbound packets with errors.
runts
Inbound frames that are shorter than 64 bytes, that are in correct
format, and that contain valid CRCs.
Inbound frames larger than the maximum frame length supported on
the interface.
• For an Ethernet interface that does not permit jumbo frames, giants
giants
refer to frames larger than 1536 bytes (without VLAN tags) or 1540
bytes (with VLAN tags).
• For an Ethernet interface that permits jumbo frames, giants refer to
frames larger than the maximum size of Ethernet frames that are
allowed to pass through, which is configured when you configure
jumbo frame support on the interface.
- throttles
Number of times that the port shut down because of buffer or CPU
overload.
CRC
Total number of inbound frames that had a normal length, but
contained checksum errors.
frame
Total number of inbound frames that contained checksum errors and a
non-integer number of bytes.
- overruns
Number of packets dropped because the input rate of the port
exceeded the queuing capability.
9
Field
Description
Total number of illegal inbound packets:
• Fragment frames—CRC error frames shorter than 64 bytes. The
length can be an integer or non-integer value.
• Jabber frames—CRC error frames greater than the maximum frame
aborts
length supported on the Ethernet interface (with an integer or
non-integer length). For an Ethernet interface that does not permit
jumbo frames, jabber frames refer to CRC error frames greater than
1518 bytes (without VLAN tags) or 1522 bytes (with VLAN tags). For
an Ethernet interface that permits jumbo frames, jabber frames refer
to CRC error frames greater than the maximum size of Ethernet
frames that are allowed to pass through the interface (which is
configured when you configure jumbo frame support on the
interface).
• Symbol error frames—Frames that contained at least one
undefined symbol.
• Unknown operation code frames—Non-pause MAC control
frames.
• Length error frames—Frames whose 802.3 length fields did not
accord with the actual frame length (46 to 1500 bytes).
ignored
Number of inbound frames dropped because the receive buffer of the
port ran low.
- parity errors
Total number of frames with parity errors.
Output (total): 0 packets, 0 bytes
Outbound traffic statistics (in packets and bytes) for the port. All
outbound normal and abnormal packets (including unicast, broadcast,
and multicast), and pause frames were counted.
0 unicasts, 0 broadcasts, 0
multicasts, 0 pauses
Output (normal): 0 packets, - bytes
0 unicasts, 0 broadcasts, 0
multicasts, 0 pauses
Outbound normal traffic (including unicast, broadcast, and multicast)
and pause frame statistics (in packets and bytes) for the interface.
output errors
Outbound packets with errors.
- underruns
Number of packets dropped because the output rate of the interface
exceeded the output queuing capability. This is a low-probability
hardware anomaly.
- buffer failures
Number of packets dropped because the transmit buffer of the
interface ran low.
aborts
Number of packets that failed to be transmitted, for example, because
of Ethernet collisions.
deferred
Number of frames that the interface deferred to transmit because of
detected collisions.
collisions
Number of frames that the interface stopped transmitting because
Ethernet collisions were detected during transmission.
late collisions
Number of frames that the interface deferred to transmit after
transmitting their first 512 bits, because of detected collisions.
lost carrier
Number of carrier losses during transmission. This counter applies to
serial WAN interfaces.
10
Field
Description
- no carrier
Number of times that the port failed to detect the carrier when
attempting to send frames. This counter applies to serial WAN
interfaces.
NOTE:
If an output field is not available, a hyphen (-) is displayed.
Table 5 Description on the possible physical states of a Layer 2 Ethernet interface
Field
Description
UP
The interface is physically up.
DOWN
The interface is physically down, because no physical connection exists
(possibly because the network cable is disconnected or faulty).
DOWN ( Administratively )
The interface is physically down because it was shut down with the shutdown
command. To restore its physical state, use the undo shutdown command.
DOWN ( Link-Aggregation
interface down )
The interface is physically down, because the aggregate interface
corresponding to the aggregation group to which it belongs was shut down
with the shutdown command.
DOWN ( OAM connection
failure )
The interface is physically down, because an OAM connection failed to be
established on it or the OAM connection is disconnected.
DOWN ( DLDP connection
failure )
The interface is physically down, because a DLDP connection failed to be
established on it or the DLDP connection is disconnected.
DOWN ( Loopback
detection-protected )
The interface is shut down because a loop is detected on it.
DOWN ( BPDU-protected )
The interface is shut down by the BPDU guard function.
DOWN ( Monitor-Link uplink
down )
The interface is physically down because the uplink of the monitor link group
to which it belongs is down.
# Display brief information about all interfaces.
<Sysname> display interface brief
The brief information of interface(s) under route mode:
Link: ADM - administratively down; Stby - standby
Protocol: (s) - spoofing
Interface
Link Protocol Main IP
M-GE0/0/0
DOWN DOWN
--
Description
NULL0
UP
UP(s)
--
Vlan1
UP
UP
192.168.0.59
The brief information of interface(s) under bridge mode:
Link: ADM - administratively down
Speed or Duplex: (a)/A - auto; H - half; F - full
Type: A - access; T - trunk; H - hybrid
Interface
Link Speed
Duplex Type PVID Description
GE1/0/2
DOWN auto
A
A
1
GE1/0/3
DOWN auto
A
A
1
11
GE1/0/4
DOWN auto
A
A
1
GE1/0/5
DOWN auto
A
A
1
GE1/0/6
DOWN auto
A
A
1
GE1/0/7
DOWN auto
A
A
1
GE1/0/8
DOWN auto
A
A
1
GE1/0/9
DOWN auto
A
A
1
GE1/0/10
DOWN auto
A
A
1
GE1/0/11
DOWN auto
A
A
1
# Filter the brief interface information to display the line starting with the (s) string and all subsequent
lines.
<Sysname> display interface brief | begin (s)
The brief information of interface(s) under route mode:
Link: ADM - administratively down; Stby - standby
Protocol: (s) - spoofing
Interface
Link Protocol Main IP
NULL0
UP
Vlan1
DOWN DOWN
UP(s)
Description
-10.153.89.230
When you use the begin keyword to filter the output, the system only searches the Layer 3 interface list or
the Layer 2 interface list. If regular-expression is on the Layer 3 interface list, the system only displays the
line that contains regular-expression, and all subsequent lines on the Layer 3 interface list.
# Display information about interfaces in the down state and the relevant causes.
<Sysname> display interface brief down
The brief information of interface(s) under bridge mode:
Link: ADM - administratively down; Stby - standby
Interface
Link Cause
BAGG1
DOWN Not connected
GE1/0/1
DOWN Not connected
GE1/0/2
DOWN Not connected
GE1/0/4
DOWN Not connected
GE1/0/5
DOWN Not connected
Table 6 Command output
Field
Description
The brief information of
interface(s) under route
mode:
The command displays brief information about Layer 3 interfaces.
Link: ADM administratively down;
Stby - standby
Link layer state of the interface:
• ADM—The interface has been shut down by the network administrator. To
recover its physical layer state, use the undo shutdown command.
• Stby—The interface is a standby interface.
Protocol: (s) - spoofing
If the network layer protocol state of an interface is shown as UP, but its link is an
on-demand link or not present at all, its protocol attribute includes the spoofing
flag, (a letter "s" in parentheses). This attribute is typical of interface Null 0 and
loopback interfaces.
Interface
Interface name.
12
Field
Description
Physical link state of the interface:
Link
• UP—The link is up.
• DOWN—The link is physically down.
• ADM—The link has been administratively shut down. To recover its physical
state, use the undo shutdown command.
• Stby—The interface is a standby interface.
Protocol
Protocol connection state of the interface, which can be UP, DOWN, or UP(s).
Interface description.
Description
The brief information of
interface(s) under bridge
mode:
Information displayed in this field is restricted by space. To view the complete
interface description, use the display interface command without specifying the
brief keyword.
Brief information about Layer 2 interfaces.
If the speed of an interface is automatically negotiated, its speed attribute
includes the autonegotiation flag, letter a in parentheses.
Speed or Duplex: (a)/A auto; H - half; F - full
If the duplex mode of an interface is automatically negotiated, its duplex mode
attribute includes the following options:
• (a)/A—Autonegotiation.
• H—Half negotiation.
• F—Full negotiation.
Type: A - access; T - trunk;
H - hybrid
Link type options for Ethernet interfaces.
Speed
Interface rate, in bps.
Duplex mode of the interface:
Duplex
•
•
•
•
•
A—Autonegotiation.
F—Full duplex.
F(a)—Autonegotiated full duplex.
H—Half duplex.
H(a)—Autonegotiated half duplex.
Link type of the interface:
Type
• A—Access.
• H—Hybrid.
• T—Trunk.
PVID
Port VLAN ID.
Cause
Reasons for the physical state of an interface to be DOWN. For more information,
see Table 7.
Table 7 Reasons for the physical state of an interface to be DOWN
Field
Description
Not connected
No physical connection exists (possibly because the network cable is
disconnected or faulty).
13
Field
Description
Administratively
The port was shut down with the shutdown command. To restore the physical
state of the interface, use the undo shutdown command.
Link-Aggregation interface
down
The aggregate interface corresponding to the aggregation group to which the
interface belongs was shut down with the shutdown command.
OAM connection failure
The OAM connection failed (possibly because the connection failed to be
established or the connection is disconnected).
DLDP connection failure
The DLDP connection failed (possibly because the connection failed to be
established or the connection is disconnected).
Loopback detection-protected
The interface is shut down because a loop was detected on it.
BPDU-protected
The interface is shut down by the BPDU guard function.
Monitor-Link uplink down
The uplink of the monitor link group to which the interface belongs is down.
Related commands
interface
display packet-drop interface
Use display packet-drop interface to display information about packets dropped on an interface or
multiple interfaces.
Syntax
display packet-drop interface [ interface-type [ interface-number ] ] [ | { begin | exclude | include }
regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
interface-type: Specifies an interface type.
interface-number: Specifies an interface number.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
If you do not specify an interface type, this command displays information about dropped packets on all
interfaces on the device.
14
If you only specify an interface type, this command displays information about dropped packets on the
specified type of interface.
If you specify both the interface type and interface number, this command displays information about
dropped packets on the specified interface.
Examples
# Display information about dropped packets on GigabitEthernet 1/0/1.
<Sysname> display packet-drop interface gigabitethernet 1/0/1
GigabitEthernet1/0/1:
Packets dropped by GBP full or insufficient bandwidth: 301
Packets dropped by FFP: 261
Packets dropped by STP non-forwarding state: 321
Table 8 Command output
Field
Description
Packets dropped by GBP full or insufficient
bandwidth
Packets that are dropped because of insufficient buffer or
bandwidth.
Packets dropped by FFP
Packets that are filtered out.
Packets dropped by STP non-forwarding state
Packets that are dropped because STP is in the
non-forwarding state.
Packets(UC) dropped by TM queues
Unicast packets that are dropped because the traffic
manager (TM) chip queue is full.
display packet-drop summary
Use display packet-drop summary to display summary information about dropped packets on all
interfaces.
Syntax
display packet-drop summary [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display information about dropped packets on all interfaces.
15
<Sysname> display packet-drop summary
All interfaces:
Packets dropped by GBP full or insufficient bandwidth: 0
Packets dropped by FFP: 1028
Packets dropped by STP non-forwarding state: 0
Packets(UC) dropped by TM queues: 0
For the description of some fields in the output, see Table 8.
display port combo
Use display port combo to display the combo interfaces of the device and the corresponding fiber and
copper combo ports.
Syntax
display port combo [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display the combo interfaces of the device and the corresponding fiber and copper ports.
<Sysname> display port combo
Combo-group
Active
Inactive
1
GigabitEthernet1/0/47
GigabitEthernet1/0/49
2
GigabitEthernet1/0/48
GigabitEthernet1/0/50
Table 9 Command output
Field
Description
Combo-group
Combo interfaces of the device, represented by combo interface numbers generated
by the system.
Active
Active ports of the combo interfaces.
Inactive
Inactive ports of the combo interfaces.
In a combo interface, the fiber or copper combo port with the smaller port number is active by default.
You can distinguish copper combo ports from fiber combo ports by checking the "Media type is" field
of the display interface command.
16
duplex
Use duplex to set the duplex mode for an Ethernet interface.
Use undo duplex to restore the default duplex mode of the Ethernet interface.
Syntax
duplex { auto | full | half }
undo duplex
Default
Ethernet interfaces operate in autonegotiation mode.
Views
Ethernet interface view
Default command level
2: System level
Parameters
auto: Sets the interface to operate in autonegotiation mode.
full: Sets the interface to operate in full duplex mode.
half: Sets the interface to operate in half-duplex mode. The copper ports configured with the speed of
1000 Mbps and fiber ports do not support the half keyword.
Usage guidelines
Support of a 10-GE interface for the parameters used in this command varies with your device models.
Examples
# Configure interface GigabitEthernet 1/0/1 to operate in full duplex mode.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] duplex full
flow-control
Use flow-control to enable TxRx mode generic flow control on an Ethernet interface.
Use undo flow-control to disable generic flow control on the Ethernet interface.
Syntax
flow-control
undo flow-control
Default
Generic flow control on an Ethernet interface is disabled.
Views
Ethernet interface view
Default command level
2: System level
17
Usage guidelines
This command is supported in Release 1118 and later versions.
With the flow-control command configured, an interface can both send and receive flow control frames:
•
When congested, the interface sends a flow control frame to its peer.
•
Upon receiving a flow control frame from its peer, the interface suspends sending packets.
To implement flow control on a link, enable the generic flow control function at both ends of the link.
Examples
# Enable TxRx mode generic flow control on the interface GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] flow-control
flow-interval
Use flow-interval to set the interface statistics polling interval.
Use undo flow-interval to restore the default interval.
Syntax
flow-interval interval
undo flow-interval
Default
The interface statistics polling interval is 300 seconds.
Views
Ethernet interface view
Default command level
2: System level
Parameters
interval: Sets the statistics polling interval, in seconds. It is in the range of 5 to 300 and must be a multiple
of 5.
Examples
# Set the statistics polling interval to 100 seconds on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] flow-interval 100
interface
Use interface to enter interface view.
Syntax
interface interface-type interface-number
18
Views
System view
Default command level
2: System level
Parameters
interface-type: Specifies an interface type.
interface-number: Specifies an interface number.
Examples
# Enter GigabitEthernet 1/0/1 interface view.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1]
jumboframe enable
Use jumboframe enable to allow jumbo frames within the specified length to pass through an Ethernet
interface.
Use undo jumboframe enable to prevent jumbo frames from passing through an Ethernet interface.
Syntax
jumboframe enable [ value ]
undo jumboframe enable
Default
The device allows jumbo frames within 9216 bytes to pass through Ethernet interfaces.
Views
Ethernet interface view
Default command level
2: System level
Parameters
value: Sets the maximum size of Ethernet frames that are allowed to pass through. The value argument is
in the range of 1536 to 9216. If you set the value argument multiple times, the last configuration takes
effect.
Examples
# Enable jumbo frames to pass through GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] jumboframe enable
link-delay
Use link-delay to set the physical state change suppression interval on an Ethernet interface.
Use undo link-delay to restore the default.
19
Syntax
link-delay delay-time
undo link-delay
Default
Physical state change suppression is disabled.
Views
Ethernet interface view
Default command level
2: System level
Parameters
delay-time: Sets the physical state change suppression interval on the Ethernet interface, in seconds. The
delay-time argument is in the range of 2 to 10.
Usage guidelines
This command does not apply to ports administratively shut down (with the shutdown command).
Do not use this command on Ethernet interfaces with MSTP or Smart Link enabled.
Examples
# Enable physical state change suppression on GigabitEthernet 1/0/1, setting the suppression interval
to 8 seconds.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] link-delay 8
link-delay mode up
Use link-delay delay-time mode up to set the link-up event suppression interval on an Ethernet interface.
Use undo link-delay to restore the default.
Syntax
link-delay delay-time mode up
undo link-delay
Default
Link-up event suppression is disabled.
Views
Ethernet interface view
Default command level
2: System level
Parameters
delay-time: Sets the link-up event suppression interval on the Ethernet interface, in seconds. The
delay-time argument is in the range of 2 to 10.
20
Usage guidelines
The link-delay mode up command and the link-delay command supersede each other. The one
configured last takes effect.
Do not use this command on Ethernet interfaces with MSTP or Smart Link enabled.
Examples
# Enable link-up event suppression on GigabitEthernet 1/0/1, setting the suppression interval to 10
seconds.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] link-delay 10 mode up
loopback
Use loopback to perform loopback testing on an Ethernet interface and display the test result.
Syntax
loopback { external | internal }
Default
Loopback testing is disabled on Ethernet interfaces.
Views
Ethernet interface view
Default command level
2: System level
Parameters
external: Enables external loopback testing for all on-chip functions related to Ethernet interfaces.
internal: Enables internal loopback testing for the hardware of Ethernet interfaces.
Usage guidelines
Enable loopback testing for troubleshooting purposes, such as identifying an Ethernet problem.
During loopback testing, the Ethernet interface operates in full duplex mode. When you disable
loopback testing, the port returns to its duplex setting.
Loopback testing is a one-time operation, and is not recorded in the configuration file.
Examples
# Enable internal loopback testing on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] loopback internal
Loop internal succeeded!
port auto-power-down
Use port auto-power-down to enable automatic power-down on Ethernet interfaces for energy efficiency.
Use undo port auto-power-down to restore the default.
21
Syntax
port auto-power-down
undo port auto-power-down
Default
Automatic power-down is disabled on Ethernet interfaces.
Views
Ethernet interface view
Default command level
2: System level
Examples
# Enable automatic power-down on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port auto-power-down
port link-mode
Use port link-mode to change the link mode of an Ethernet interface.
Use undo port link-mode to restore the default.
Syntax
port link-mode { bridge | route }
undo port link-mode
Default
An Ethernet interface operates in bridge mode.
Views
Ethernet interface view
Default command level
2: System level
Parameters
bridge: Specifies the Layer 2 mode.
route: Specifies the Layer 3 mode.
Usage guidelines
You can configure an Ethernet interfaces to operate in bridge mode as Layer 2 Ethernet interfaces or in
route mode as Layer 3 Ethernet interfaces.
After you change the link mode of an Ethernet interface, all settings are restored to their default values in
the new link mode.
Examples
# Configure GigabitEthernet 1/0/1 to operate in bridge mode.
<Sysname> system-view
22
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] display this
#
interface GigabitEthernet1/0/1
port link-mode route
#
Return
The output shows that GigabitEthernet 1/0/1 operates in route mode.
[Sysname-GigabitEthernet1/0/1] port link-mode bridge
[Sysname-GigabitEthernet1/0/1] display this
#
interface GigabitEthernet1/0/1
port link-mode bridge
#
Return
The output shows that GigabitEthernet 1/0/1 is now operating in bridge mode.
NOTE:
The display this command displays the configuration that takes effect in the current view.
Related commands
port link-mode interface-list
port link-mode interface-list
Use port link-mode interface-list to change the link mode of Ethernet interfaces.
Syntax
port link-mode { bridge | route } interface-list
Views
System view
Default command level
2: System level
Parameters
bridge: Specifies the Layer 2 mode.
route: Specifies the Layer 3 mode.
interface-list: Specifies an Ethernet interface list, in the format of interface-type interface-number [ to
interface-type interface-number ] &<1-10>, where &<1-10> indicates that you can specify up to 10
interfaces or interface ranges.
Usage guidelines
Configuring the port link-mode interface-list command in system view and configuring the port
link-mode command in Ethernet interface view lead to the same result. The difference is that the former
changes the link mode of multiple Ethernet interfaces in batch, and the latter changes the link mode of
one Ethernet interface at a time.
23
After you change the link mode of an Ethernet interface, all the settings of the Ethernet interface are
restored to their defaults under the new link mode.
The link mode configuration for an Ethernet interface in system view and that in interface view supersede
each other, and the one configured last takes effect.
Examples
# Configure GigabitEthernet 1/0/1 through GigabitEthernet 1/0/5 to operate in Layer 2 mode.
<Sysname> system-view
[Sysname] port link-mode bridge gigabitethernet 1/0/1 to gigabitethernet 1/0/5
# Configure GigabitEthernet 1/0/1 through GigabitEthernet 1/0/5 to operate in Layer 3 mode.
<Sysname> system-view
[Sysname] port link-mode route gigabitethernet 1/0/1 to gigabitethernet 1/0/5
reset counters interface
Use reset counters interface to clear the Ethernet interface statistics.
Syntax
reset counters interface [ interface-type [ interface-number ] ]
Views
User view
Default command level
2: System level
Parameters
interface-type: Specifies an interface type.
interface-number: Specifies an interface number.
Usage guidelines
Clear old statistics on the interface before collecting new traffic statistics for a specific period of time.
•
If no interface type is specified, this command clears statistics for all interfaces on the device.
•
If only the interface type is specified, this command clears statistics for all interfaces of the specified
type.
•
If both the interface type and number are specified, this command only clears statistics for the
specified interface.
Examples
# Clear the statistics of GigabitEthernet 1/0/1.
<Sysname> reset counters interface gigabitethernet 1/0/1
reset packet-drop interface
Use reset packet-drop interface to clear statistics for dropped packets on an interface or multiple
interfaces.
Syntax
reset packet-drop interface [ interface-type [ interface-number ] ]
24
Views
Any view
Default command level
2: System level
Parameters
interface-type: Specify an interface type.
interface-number: Specify an interface number.
Usage guidelines
Clear old statistics for the interface or interfaces before collecting new dropped packet statistics.
If you do not specify an interface type, this command clears dropped packet statistics for all interfaces on
the device.
If you only specify an interface type, this command clears dropped packet statistics for all interfaces of
the specified type.
If you specify both the interface type and interface number, this command only clears dropped packet
statistics for the specified interface.
Examples
# Clear dropped packet statistics for GigabitEthernet 1/0/1.
<Sysname> reset packet-drop interface gigabitethernet 1/0/1
# Clear dropped packet statistics for all interfaces.
<Sysname> reset packet-drop interface
shutdown
Use shutdown to shut down an Ethernet interface.
Use undo shutdown to bring up an Ethernet interface.
Syntax
shutdown
undo shutdown
Default
Ethernet interfaces are up.
Views
Ethernet interface view
Default command level
2: System level
Usage guidelines
You may need to shut down and then bring up an Ethernet interface to activate configuration changes
such as speed or duplex mode changes.
The copper and fiber combo ports of a combo interface cannot work simultaneously. When you bring up
one port with the undo shutdown command, the other port is automatically shut down.
25
Examples
# Shut down and then bring up GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] shutdown
[Sysname-GigabitEthernet1/0/1] undo shutdown
speed
Use speed to set the speed of an Ethernet interface.
Use undo speed to restore the default.
Syntax
speed { 10 | 100 | 1000 | 10000 | auto }
undo speed
Views
Ethernet interface view
Default
The speed of an Ethernet interface is autonegotiated.
Default command level
2: System level
Parameters
10: Sets the interface speed to 10 Mbps.
100: Sets the interface speed to 100 Mbps.
1000: Sets the interface speed to 1000 Mbps.
10000: Sets the interface speed to 10000 Mbps.
auto: Enables the interface to negotiate a speed with its peer.
Usage guidelines
For an Ethernet copper port, use the speed command to set its speed to match the speed of the peer
interface.
For a fiber port, use the speed command to set its speed to match the rate of a pluggable transceiver.
GE fiber ports do not support the 10 or 10000 keyword. 10-GE fiber ports do not support the 10 or 100
keyword.
Examples
# Configure GigabitEthernet 1/0/1 to operate at 100 Mbps.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] speed 100
Related commands
speed auto
26
Layer 2 Ethernet interface configuration commands
broadcast-suppression
Use broadcast-suppression to set the broadcast suppression threshold on an Ethernet interface.
Use undo broadcast-suppression to restore the default broadcast suppression threshold.
Syntax
broadcast-suppression { ratio | pps max-pps | kbps max-kbps }
undo broadcast-suppression
Default
Ethernet interfaces do not suppress broadcast traffic.
Views
Layer 2 Ethernet interface view
Default command level
2: System level
Parameters
ratio: Sets the broadcast suppression threshold as a percentage of the maximum interface rate. The
smaller the percentage, the less broadcast traffic is allowed to be received. This argument is in the range
of 1 to 100.
pps max-pps: Specifies the maximum number of broadcast packets that the Ethernet interface can receive
per second.
The value range of the max-pps argument varies by interface type as follows:
•
On a GE port, the value is in the range of 1 to 1488100.
•
On a 10-GE port, the value is in the range of 1 to 14881000.
kbps max-kbps: Specifies the maximum number of kilobits of broadcast traffic that the Ethernet interface
can receive per second.
The value range of the max-kbps argument varies by interface type as follows:
•
On a GE port, the value is in the range of 1 to 1000000.
•
On a 10-GE port, the value is in the range of 1 to 10000000.
Usage guidelines
When the received broadcast traffic exceeds the broadcast suppression threshold, the interface discards
broadcast packets until broadcast traffic drops below the threshold.
When you configure the suppression threshold multiple times for a port, the latest configuration takes
effect.
When you configure the broadcast suppression threshold in kbps, if the input value is less than 64, the
value that takes effect is 64; if the input value is greater than 64 but is not a multiple of 64, the value that
takes effect is a multiple of 64 greater than and nearest to the input value.
Examples
# Set the broadcast suppression threshold to 20% on GigabitEthernet 1/0/1.
27
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] broadcast-suppression 20
# Set the broadcast suppression threshold to 10000 kbps on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] broadcast-suppression kbps 10000
Info: The actual value is 10048 on this port currently.
display loopback-detection
Use display loopback-detection to display the status of the loopback detection function.
Syntax
display loopback-detection [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
If loopback detection is enabled, this command also displays the detection interval and all ports in a
loop condition.
Examples
# Display information about loopback detection.
<Sysname> display loopback-detection
Loopback detection is running.
Detection interval is 30 seconds.
No port is detected with loopback.
Table 10 Command output
Field
Description
Detection interval time is 30 seconds.
Loopback detection interval is 30 seconds.
No port is detected with loopback.
No loops are detected on any port.
28
loopback-detection action
Use loopback-detection action to configure the action for loop protection on Ethernet interfaces.
Use undo loopback-detection action to restore the default.
Syntax
loopback-detection action { no-learning | semi-block | shutdown }
undo loopback-detection action
Default
When a loop is detected on a port, the port does not receive or send any packet.
Views
Layer 2 Ethernet interface view
Default command level
2: System level
Parameters
no-learning: Disables MAC address learning on the interface.
semi-block: Permits only STP BPDUs and stops MAC address learning on the port.
shutdown: Shuts down the Ethernet interface. To bring up the interface again, use the undo shutdown
command.
Usage guidelines
When you change the link type of an Ethernet interface with the port link-type command, the device
removes the protective action configured on the interface. For more information about the port link-type
command, see Layer 2—LAN Switching Command Reference.
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
loopback-detection control enable
Use loopback-detection control enable to enable loopback detection control on trunk or hybrid ports.
Use undo loopback-detection control enable to restore the default.
29
Syntax
loopback-detection control enable
undo loopback-detection control enable
Default
Loopback detection control is disabled on trunk and hybrid ports.
Views
Layer 2 Ethernet interface view
Default command level
2: System level
Usage guidelines
When a hybrid or trunk port detects a loop condition, it sends traps and log messages, whether
loopback detection control is enabled or not. However, the port performs the protective action that you
configure with the loopback-detection action command only after loopback detection control is enabled.
This command is not applicable to access ports.
Examples
# Enable loopback detection control on the trunk port GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] loopback-detection enable
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type trunk
[Sysname-GigabitEthernet1/0/1] loopback-detection enable
[Sysname-GigabitEthernet1/0/1] loopback-detection control enable
loopback-detection enable
Use loopback-detection enable to enable loopback detection globally in system view or on interfaces in
Ethernet interface. To use loopback detection on an Ethernet interface, you must enable the function both
globally and on the port.
Use undo loopback-detection enable to disable loopback detection globally or on Ethernet interfaces.
Syntax
loopback-detection enable
undo loopback-detection enable
Default
Loopback detection is disabled on all Ethernet interfaces.
Views
System view, Layer 2 Ethernet interface view
Default command level
2: System level
30
Usage guidelines
The undo loopback-detection enable command in system view disables loopback detection on all
interfaces.
If an interface receives a packet that it sent out, a loop has occurred. Loops might cause broadcast storms,
which degrade network performance. You can enable loopback detection to detect loops on an
interface and, if the interface supports the loopback-detection action command, configure the protective
action to take (for example, shut down the port) when a loop is detected.
In addition to the configured protective action, the device also performs other actions to alleviate the
impact of the loops. For more information, see Table 11.
Table 11 Actions to take upon detection of a loop condition
Port type
Actions
No protective action is configured
• Place the interface in controlled mode. The
Access port
interface discards all incoming packets, but
still forwards outgoing traffic.
• Generate traps and log messages.
• Delete all MAC address entries of the
A protective action is configured
• Perform the configured protective
action.
• Generate traps and log messages.
• Delete all MAC address entries of the
interface.
interface.
• Generate traps and log messages.
• If loopback detection control is enabled, set
Hybrid or trunk
port
the interface to controlled mode. The
interface discards all incoming packets, but
still forwards outgoing packets.
• Delete all MAC address entries of the
• Generate traps and log messages.
• If loopback detection control is
enabled, take the configured
protective action on the interface.
• Delete all MAC address entries of the
interface.
interface.
Examples
# Enable loopback detection on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] loopback-detection enable
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] loopback-detection enable
Related commands
loopback-detection control enable
loopback-detection interval-time
Use loopback-detection interval-time to set the loopback detection interval.
Use undo loopback-detection interval-time to restore the default loopback detection interval.
Syntax
loopback-detection interval-time time
undo loopback-detection interval-time
Default
The loopback detection interval is 30 seconds.
31
Views
System view
Default command level
2: System level
Parameters
time: Specifies the loopback detection interval in the range of 5 to 300 seconds.
Examples
# Set the loopback detection interval to 10 seconds.
<Sysname> system-view
[Sysname] loopback-detection interval-time 10
Related commands
display loopback-detection
loopback-detection multi-port-mode enable
Use loopback-detection multi-port-mode enable to enable multi-port loopback detection.
Use undo loopback-detection multi-port-mode enable to restore the default.
Syntax
loopback-detection multi-port-mode enable
undo loopback-detection multi-port-mode enable
Default
Multi-port loopback detection is disabled.
Views
System view
Default command level
2: System level
Usage guidelines
This command is supported in Release 1118 and later versions.
When detecting a loop between two interfaces, the switch takes the following actions on the looped
interface:
•
If the looped interface is an access interface, the switch performs the configured protective action,
sends traps and log messages to the terminals, and deletes all MAC address entries of the interface.
•
If the looped interface is a trunk or hybrid interface, the switch sends traps and log messages to the
terminals. If loopback detection control is enabled, the switch performs the configured protection
action on the looped interface and deletes all MAC address entries of the interface.
NOTE:
To enable multi-port loopback detection, you must configure the loopback-detection multi-port-mode
enable and loopback-detection enable commands in system view, and configure the loopback-detection
enable command in the view of the related interfaces.
32
Examples
# Enable multi-port loopback detection to monitor loops between GigabitEthernet 1/0/1 and
GigabitEthernet 1/0/2.
<Sysname> system-view
[Sysname] loopback-detection enable
[Sysname] loopback-detection multi-port-mode enable
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] loopback-detection enable
[Sysname-GigabitEthernet1/0/1] quit
[Sysname] interface gigabitethernet 1/0/2
[Sysname-GigabitEthernet1/0/2] loopback-detection enable
loopback-detection per-vlan enable
Use loopback-detection per-vlan enable to enable loopback detection in each VLAN on trunk or hybrid
ports.
Use undo loopback-detection per-vlan enable to disable loopback detection in all VLANs but the PVID
on trunk or hybrid ports.
Syntax
loopback-detection per-vlan enable
undo loopback-detection per-vlan enable
Default
A trunk port or hybrid port performs loopback detection only in its PVID.
Views
Layer 2 Ethernet interface view
Default command level
2: System level
Usage guidelines
The loopback-detection per-vlan enable command is not applicable to access ports.
Examples
# Enable loopback detection in all VLANs on hybrid port GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] loopback-detection enable
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] loopback-detection enable
[Sysname-GigabitEthernet1/0/1] port link-type trunk
[Sysname-GigabitEthernet1/0/1] loopback-detection per-vlan enable
mdi
Use mdi to configure the MDI mode of an Ethernet copper interface.
Use undo mdi to restore the default.
33
Syntax
mdi { across | auto | normal }
undo mdi
Default
Ethernet interfaces operate in auto MDI mode.
Views
Layer 2 Ethernet interface view
Default command level
2: System level
Parameters
across: Sets the MDI mode to across. In this mode, pins 1 and 2 are receive pins, and pins 3 and 6 are
transmit pins.
auto: Sets the MDI mode to auto. In this mode, the port negotiates pin roles with its peer.
normal: Sets the MDI mode to normal. In normal mode, pins 1 and 2 are transmit pins, and pins 3 and
6 are receive pins.
Examples
# Set GigabitEthernet 1/0/1 to operate in across MDI mode.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] mdi across
multicast-suppression
Use multicast-suppression to set the multicast suppression threshold on an Ethernet interface.
Use undo multicast-suppression to restore the default multicast suppression threshold.
Syntax
multicast-suppression { ratio | pps max-pps | kbps max-kbps }
undo multicast-suppression
Default
Ethernet interfaces do not suppress multicast traffic.
Views
Layer 2 Ethernet interface view
Default command level
2: System level
Parameters
ratio: Sets the multicast suppression threshold as a percentage of the maximum interface rate, in the
range of 1 to 100. The smaller the percentage, the less multicast traffic is allowed to be received.
pps max-pps: Specifies the maximum number of multicast packets that the Ethernet interface can receive
per second.
34
The value range of the max-pps argument varies by interface type as follows:
•
On a GE port, the value is in the range of 1 to 1488100.
•
On a 10-GE port, the value is in the range of 1 to 14881000.
kbps max-kbps: Specifies the maximum number of kilobits of multicast packets that the Ethernet interface
can receive per second.
The value range of the max-kbps argument varies by interface type as follows:
•
On a GE port, the value is in the range of 1 to 1000000.
•
On a 10-GE port, the value is in the range of 1 to 10000000.
Usage guidelines
When the received multicast traffic exceeds the threshold, the system discards multicast packets until
multicast traffic drops below the threshold.
When you configure the suppression threshold multiple times for a port, the latest configuration takes
effect.
When you configure the multicast suppression threshold in kbps, if the input value is less than 64, the
value that takes effect is 64; if the input value is greater than 64 but is not a multiple of 64, the value that
takes effect is a multiple of 64 greater than and nearest to the input value.
Examples
# Set the multicast threshold to 20% on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] multicast-suppression 20
# Set the multicast suppression threshold to 10000 kbps on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] multicast-suppression kbps 10000
Info: The actual value is 10048 on this port currently.
speed auto
Use speed auto to set options for speed autonegotiation.
Syntax
speed auto { 10 | 100 | 1000 } *
undo speed
Default
The speed of an interface is autonegotiated.
Views
Gigabit Layer 2 Ethernet interface view
Default command level
2: System level
Parameters
10: Sets 10 Mbps as an option for speed autonegotiation.
35
100: Sets 100 Mbps as an option for speed autonegotiation.
1000: Sets 1000 Mbps as an option for speed autonegotiation.
Usage guidelines
The speed command and the speed auto command supersede each other. The last command that you
configure takes effect.
If you configure speed 100 after configuring speed auto 100 1000 on an interface, the interface speed
is set to 100 Mbps by force without negotiation. If you configure speed auto 100 1000 after configuring
speed 100 on the interface, the interface negotiates with its peer, and the negotiated speed is either 100
Mbps or 1000 Mbps.
To avoid negotiation failure, make sure that at least one speed option is supported at both ends.
This command is available only on GE copper ports that support port speed autonegotiation.
Examples
# Configure the port GigabitEthernet 1/0/1 to use 10 Mbps and 1000 Mbps for speed negotiation.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] speed auto 10 1000
unicast-suppression
Use unicast-suppression to set the unknown unicast suppression threshold on an Ethernet interface.
Use undo unicast-suppression to restore the default.
Syntax
unicast-suppression { ratio | pps max-pps | kbps max-kbps }
undo unicast-suppression
Default
Ethernet interfaces do not suppress unknown unicast traffic.
Views
Layer 2 Ethernet interface view
Default command level
2: System level
Parameters
ratio: Sets the unknown unicast suppression threshold as a percentage of the maximum interface rate, in
the range of 1 to 100. The smaller the percentage, the less unknown unicast traffic is allowed to be
received.
pps max-pps: Specifies the maximum number of unknown unicast packets that the Ethernet interface can
receive per second.
The value range of the max-pps argument varies by interface type as follows:
•
On a GE port, the value is in the range of 1 to 1488100.
•
On a 10-GE port, the value is in the range of 1 to 14881000.
kbps max-kbps: Specifies the maximum number of kilobits of unknown unicast traffic that the Ethernet
interface can receive per second.
36
The value range of the max-kbps argument varies by interface type as follows:
•
On a GE port, the value is in the range of 1 to 1000000.
•
On a 10-GE port, the value is in the range of 1 to 10000000.
Usage guidelines
When the received unknown unicast traffic exceeds the threshold, the system discards unknown unicast
packets until unknown unicast traffic drops below the threshold.
When you configure the suppression threshold multiple times for a port, the latest configuration takes
effect.
When you configure the unknown unicast suppression threshold in kbps, if the input value is less than 64,
the value that takes effect is 64; if the input value is greater than 64 but is not a multiple of 64, the value
that takes effect is a multiple of 64 greater than and nearest to the input value.
Examples
# Set the unknown unicast threshold to 20% on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] unicast-suppression 20
# Set the unknown unicast suppression threshold to 10000 kbps on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] unicast-suppression kbps 10000
Info: The actual value is 10048 on this port currently.
virtual-cable-test
Use virtual-cable-test to test the cable connection of an Ethernet interface. The test results are displayed
within 5 seconds.
Syntax
virtual-cable-test
Views
Layer 2 Ethernet interface view
Default command level
2: System level
Usage guidelines
The following cable states are available:
•
Normal—The cable is in good condition.
•
Abnormal—Any fault other than a short or open circuit is detected.
•
Abnormal (open)—An open circuit is detected.
•
Abnormal (short)—A short circuit is detected.
•
Failure—The detection failed.
If the cable connection is normal, the displayed cable length is the total length of the cable.
37
If the cable connection has a fault, the displayed cable length is the length from the local port to the faulty
point.
Fiber ports do not support this command.
If the link of an Ethernet interface is up, testing its cable connection will cause the link to go down and
then up.
The test result is for reference only. The cable length detection error is up to 5 m (about 16 ft). If a test item
is not available, a hyphen (-) is displayed.
Examples
# Test the cable connection of GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] virtual-cable-test
Cable status: normal, 1 metres
Pair Impedance mismatch: Pair skew: - ns
Pair swap: Pair polarity: Insertion loss: - db
Return loss: - db
Near-end crosstalk: - db
NOTE:
The Pair Impedance mismatch field has the following values:
• Yes—Match
• No—Mismatch
Layer 3 Ethernet interface configuration commands
mtu
Use mtu to set the MTU for an Ethernet interface.
Use undo mtu to restore the default.
Syntax
mtu size
undo mtu
Default
The MTU of an Ethernet interface is 1500 bytes.
Views
Layer 3 Ethernet interface view
Default command level
2: System level
38
Parameters
size: Sets the MTU (in bytes) in the range of 46 to 1560.
Usage guidelines
As the size of MTU decreases, the number of fragments grows. When setting MTU for an interface, you
should consider QoS queue lengths (for example, the default FIFO queue length is 75) to avoid a too
small MTU causing packet drop in QoS queuing. To achieve the best result, you can tune MTU with the
mtu command or QoS queue lengths with the qos fifo queue-length command. For more information,
see ACL and QoS Command Reference.
Examples
# Set the MTU to 1430 bytes for the Layer 3 Ethernet interface GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface GigabitEthernet1/0/1
[Sysname-GigabitEthernet1/0/1] mtu 1430
39
Loopback and null interface configuration
commands
default
CAUTION:
The default command might interrupt ongoing network services. Make sure you are fully aware of the
impacts of this command when you perform it on a live network.
Use default to restore the default settings for the loopback or null interface.
Syntax
default
Views
Loopback interface view, null interface view
Default command level
2: System level
Usage guidelines
This command might fail to restore the default settings for some commands for reasons such as command
dependencies and system restrictions. Use the display this command in interface view to identify these
commands, and then use their undo forms or follow the command reference to individually restore their
default settings. If your restoration attempt still fails, follow the error message instructions to resolve the
problem.
Examples
# Restore the default settings of interface loopback 1.
<Sysname> system-view
[Sysname] interface loopback 1
[Sysname-loopback1] default
This command will restore the default settings. Continue? [Y/N]:y
description
Use description to set a description for the current interface.
Use undo description to restore the default.
Syntax
description text
undo description
40
Default
The description of a loopback or null interface is interface name Interface, for example, Loopback1
interface.
Views
Loopback interface view, null interface view
Default command level
2: System level
Parameters
text: Interface description, a string of 1 to 80 characters. The string can include case-sensitive letters,
digits, special characters, spaces, and other Unicode characters and symbols
Follow these guidelines when you configure a description:
•
An interface description can be a mixture of English characters and other Unicode characters. The
mixed description cannot exceed the specified length.
•
To use a type of Unicode characters or symbols in an interface description, you must install the
corresponding IME and log in to the device through supported remote login software.
•
Each non-English Unicode character or symbol (non-English characters) takes the space of two
regular characters. When the length of a description string reaches or exceeds the maximum line
width on the terminal software, the software starts a new line. This may break a Unicode character
into two parts and create garbled characters at the end of a line.
Examples
# Set the description for interface loopback 1 to loopback1.
<Sysname> system-view
[Sysname] interface loopback 1
[Sysname- loopback1] description loopback1
Related commands
display interface
display interface loopback
Use display interface loopback to display information about a loopback interface.
Syntax
display interface [ loopback ] [ brief [ down ] ] [ | { begin | exclude | include } regular-expression ]
display interface loopback interface-number [ brief ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
interface-number: Specifies a loopback interface by its number, which can be the number of any existing
loopback interface. With this argument, this command displays information about a specified loopback
interface.
41
brief: Displays brief interface information. If you do not specify this keyword, this command displays
detailed interface information.
down: Displays information about interfaces in DOWN state and the causes. If you do not specify this
keyword, this command displays information about interfaces in all states.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
If you do not specify the loopback keyword, this command displays information about all interfaces on
the device.
If you specify the loopback keyword without the interface-number argument, this command displays
information about all created loopback interfaces.
Examples
# Display detailed information about interface loopback 0.
<Sysname> display interface loopback 0
LoopBack0 current state: UP
Line protocol current state: UP (spoofing)
Description: LoopBack0 Interface
The Maximum Transmit Unit is 1536
Internet protocol processing : disabled
Physical is Loopback
Last clearing of counters:
Never
Last 300 seconds input:
Last 300 seconds output:
0 bytes/sec, 0 bits/sec, 0 packets/sec
0 bytes/sec, 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 drops
0 packets output, 0 bytes, 0 drops
# Display brief information about interface loopback 0.
<Sysname> display interface loopback 0 brief
The brief information of interface(s) under route mode:
Link: ADM - administratively down; Stby - standby
Protocol: (s) - spoofing
Interface
Link Protocol Main IP
Loop0
UP
UP(s)
Description
--
# Display brief information about all loopback interfaces in DOWN state.
<Sysname> display interface loopback brief down
The brief information of interface(s) under route mode:
Link: ADM - administratively down; Stby - standby
Interface
Link Cause
Loop1
ADM
Administratively
42
Table 12 Command output
Field
Description
current state
Physical state (up or administratively down) of the interface.
Line protocol current state
State of the data link layer protocol: up (spoofing). Spoofing
refers to the spoofing attribute of the interface. When the network
layer protocol state of the interface is displayed as up, the
corresponding link may not exist, or the corresponding link is
non-permanent and established on demand.
Description
Description string of the interface.
The Maximum Transmit Unit
MTU of the interface.
Internet protocol processing
State (enabled or disabled) of the network layer protocol
(displayed as Internet Address is X.X.X.X/XX Primary).
Physical is loopback
The physical type of the interface is loopback.
Time when statistics on the logical interface were last cleared by
using the reset counters interface command.
Last clearing of counters
If the statistics of the interface have never been cleared by using
the reset counters interface command after the device started,
Never is displayed for this field.
Average input rate during the last 300 seconds, where:
Last 300 seconds input: 0 bytes/sec, 0
bits/sec, 0 packets/sec
• packets/sec—Average number of packets received per
second.
• bytes/sec—Average number of bytes received per second.
• bits/sec—Average number of bits received per second.
Average output rate over the last 300 seconds, where:
Last 300 seconds output: 0 bytes/sec, 0
bits/sec, 0 packets/sec
• packets/sec—Average number of packets sent per second.
• bytes/sec—Average number of bytes sent per second.
• bits/sec—Average number of bits sent per second.
0 packets input, 0 bytes, 0 drops
Total number and size (in bytes) of the input packets of the
interface and the number of the dropped packets.
0 packets output, 0 bytes, 0 drops
Total number and size (in bytes) of the output packets of the
interface and the number of the dropped packets.
The brief information of interface(s) under
route mode
Brief information about Layer 3 interfaces.
Link status:
Link: ADM - administratively down; Stby standby
• ADM—The interface has been administratively shut down. To
recover its physical state, execute the undo shutdown
command.
• Stby—The interface is operating as a backup interface.
Protocol: (s) - spoofing
If the network layer protocol state of an interface is shown as UP,
but its link is an on-demand link or not present at all, its protocol
attribute includes the spoofing flag (an s in parentheses).
Interface
Abbreviated interface name.
43
Field
Description
Physical link state of the interface:
Link
• UP—The link is up.
• ADM—The link has been administratively shut down. To
recover its physical state, use the undo shutdown command.
Protocol connection state of the interface:
Protocol
• UP.
• DOWN.
• UP(s).
Main IP
Main IP address of the interface.
Description
Description of the interface.
Cause
Cause of a DOWN physical link. If the port has been shut down
with the shutdown command, this field displays Administratively.
To restore the physical state of the interface, use the undo
shutdown command.
Related commands
interface loopback
display interface null
Use display interface null to display information about the null interface. Because Null 0 interface is the
only null interface on a device, this command displays information about Null 0 interface even if you do
not specify the 0 keyword.
Syntax
display interface [ null ] [ brief [ down ] ] [ | { begin | exclude | include } regular-expression ]
display interface null 0 [ brief ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
0: Specifies interface Null 0. The null interface number is fixed at 0, because the device has only one null
interface.
brief: Displays brief interface information. If you do not specify this keyword, this command displays
detailed interface information.
down: Displays information about interfaces in DOWN state and the causes. If you do not specify this
keyword, this command displays information about interfaces in all states.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
44
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
If you do not specify the null keyword, this command displays information about all interfaces on the
device.
If you specify the null keyword, this command displays information about interface Null 0 with or without
the 0 keyword, because the device supports only one interface Null 0.
Examples
# Display detailed information about null interface Null 0.
<Sysname> display interface null 0
NULL0 current state :UP
Line protocol current state :UP (spoofing)
Description :
NULL0 Interface
The Maximum Transmit Unit is 1500
Internet protocol processing : disabled
Physical is NULL DEV
Last clearing of counters:
Never
Last 300 seconds input:
Last 300 seconds output:
0 bytes/sec, 0 bits/sec, 0 packets/sec
0 bytes/sec, 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 drops
0 packets output, 0 bytes, 0 drops
# Display brief information about interface Null 0.
<Sysname> display interface null 0 brief
The brief information of interface(s) under route mode:
Link: ADM - administratively down; Stby - standby
Protocol: (s) - spoofing
Interface
Link Protocol Main IP
NULL0
UP
UP(s)
Description
--
For the command output, see Table 12.
Related commands
interface null
interface loopback
Use interface loopback to create a loopback interface or enter loopback interface view.
Use undo interface loopback to remove a loopback interface.
Syntax
interface loopback interface-number
undo interface loopback interface-number
Views
System view
45
Default command level
2: System level
Parameters
interface-number: Specifies a loopback interface by its number in the range of 0 to 127.
Examples
# Create interface loopback 5.
<Sysname> system-view
[Sysname] interface loopback 5
[Sysname-LoopBack5]
Related commands
display interface loopback
interface null
Use interface null to enter null interface view.
Syntax
interface null 0
Views
System view
Default command level
2: System level
Parameters
0: Specifies interface Null 0. The null interface number is fixed to 0.
Usage guidelines
A device has only one null interface, interface Null 0. Interface Null 0 is always up. You cannot remove
it or shut it down.
Examples
# Enter Null 0 interface view.
<Sysname> system-view
[Sysname] interface null 0
[Sysname-NULL0]
Related commands
display interface null
reset counters interface loopback
Use reset counters interface loopback to clear statistics on loopback interfaces.
Syntax
reset counters interface [ loopback [ interface-number ] ]
46
Views
User view
Default command level
2: System level
Parameters
interface-number: Number of the loopback interface, which can be the number of any existing loopback
interface. With this argument, the command clears statistics on a specified loopback interface.
Usage guidelines
Before collecting traffic statistics within a specific period of time on a loopback interface, clear the
existing statistics.
If you do not specify the loopback keyword, this command clears the statistics on all interfaces in the
system.
If you specify the loopback keyword without the interface-number argument, this command clears the
statistics on all loopback interfaces.
Examples
# Clear statistics on loopback interface Loopback 5.
<Sysname> reset counters interface loopback 5
reset counters interface null
Use reset counters interface null to clear statistics on the null interface.
Syntax
reset counters interface [ null [ 0 ] ]
Views
User view
Default command level
2: System level
Parameters
0: Number of the null interface, which is fixed at 0.
Usage guidelines
Before collecting traffic statistics within a specific period of time on the null interface, clear the existing
statistics.
If you do not specify the null keyword, this command clears statistics on all interfaces.
If you specify the null keyword, this command clears the statistics on interface Null 0 with or without the
0 keyword, because the device supports only one interface Null 0.
Examples
# Clear statistics on interface Null 0.
<Sysname> reset counters interface null 0
47
shutdown
Use shutdown to shut down the current loopback interface.
Use undo shutdown to bring up the current loopback interface.
Syntax
shutdown
undo shutdown
Default
A loopback interface is up.
Views
Loopback interface view
Default command level
2: System level
Examples
# Shut down loopback interface loopback 1.
<Sysname> system-view
[Sysname] interface loopback 1
[Sysname-Loopback1] shutdown
48
Bulk interface configuration commands
interface range
Use interface range to create an interface range and enter interface range view.
Syntax
interface range interface-list
Views
System view
Default command level
2: System level
Parameters
interface-list: Specifies an interface list in the format of interface-list = { interface-type interface-number
[ to interface-type interface-number ] }&<1-5>, where &<1-5> indicates that you can specify up to five
interfaces or interface ranges. Interfaces can include Ethernet, VLAN, and aggregate interfaces. If you
use the interface-type interface -number to interface-type interface-number option to specify an interface
range, make sure that all the interfaces are on the same interface card or subcard, and the
interface-number argument before to must be less than or equal to that after to.
Usage guidelines
In interface range view, only the commands supported by the first interface are available. To view the
commands supported by the first interface in the interface range, enter the interface range view and
enter ? at the command line interface prompt.
To verify the configuration of the first interface in the interface range, execute the display this command
in interface range view.
Failure to apply a command on one member interface does not affect the application of the command
on the other member interfaces. If applying a command on one member interface fails, the system
displays an error message and continues with the next member interface.
Do not assign an aggregate interface and any of its member interfaces to an interface range at the same
time. Some commands, after being executed on both an aggregate interface and its member interfaces,
can break up the aggregation.
No limit is set on the maximum number of interfaces in an interface range. The more interfaces in an
interface range, the longer the command execution time.
Examples
# Shut down interfaces GigabitEthernet 1/0/1 through GigabitEthernet 1/0/24, and VLAN interface 2.
<Sysname> system-view
[Sysname] interface range gigabitethernet 1/0/1 to gigabitethernet 1/0/24 vlan-interface
2
[Sysname-if-range] shutdown
49
interface range name
Use interface range name name interface interface-list to create an interface range, configure a name
for the interface range, add interfaces to the interface range, and enter the interface range view.
Use interface range name without the interface keyword to enter the view of an interface range with the
specified name.
Use undo interface range name to delete the interface range with the specified name.
Syntax
interface range name name [ interface interface-list ]
undo interface range name name
Views
System view
Default command level
2: System level
Parameters
name: Interface range name, a case-sensitive string of 1 to 32 characters.
interface-list: Interface list in the format of interface-list = { interface-type interface-number [ to
interface-type interface-number ] }&<1-5>. The interface-type interface-number argument specifies an
interface by its type and number. &<1-5> indicates that you can specify up to five interfaces or interface
lists. Interfaces can include Ethernet, VLAN, and aggregate interfaces. When you specify the to keyword
in interface-type interface-number1 to interface-type interface-number2, the interfaces before and after
the to keyword must be on the same interface card or subcard, and the interface number before to must
be no greater than the one after to.
Usage guidelines
You can use this command to assign a name to an interface range and can specify this name rather than
the interface range to enter the interface range view.
You can use the display current-configuration | include interface range command to view the member
interfaces of an interface range.
Examples
# Add GigabitEthernet 1/0/1 through GigabitEthernet 1/0/12 to interface range named myEthPort,
and enter the interface range view.
<Sysname> system-view
[Sysname] interface range name myEthPort interface gigabitethernet 1/0/1 to
gigabitethernet 1/0/12
[Sysname-if-range-myEthPort]
# Enter the view of interface range named myEthPort.
<Sysname> system-view
[Sysname] interface range name myEthPort
[Sysname-if-range-myEthPort]
50
MAC address table configuration commands
The MAC address table can contain only Layer 2 Ethernet ports and Layer 2 aggregate interfaces.
This document covers only the configuration of unicast MAC address entries, including static, dynamic,
and blackhole MAC address entries.
display mac-address
Use display mac-address to display information about the MAC address table.
Syntax
display mac-address [ mac-address [ vlan vlan-id ] | [ [ dynamic | static ] [ interface interface-type
interface-number ] | blackhole ] [ vlan vlan-id ] [ count ] ] [ | { begin | exclude | include }
regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
blackhole: Displays blackhole MAC address entries, which do not age and can be added and deleted.
Packets with a matching source or destination MAC address are discarded.
vlan vlan-id: Displays MAC address entries of the specified VLAN, in the range of 1 to 4094.
count: Displays the number of MAC address entries specified by related parameters in the command.
When this keyword is used, the command displays only the number of specified MAC address entries,
rather than related information about these MAC address entries.
mac-address: Displays MAC address entries of a specified MAC address, in the format of H-H-H.
dynamic: Displays dynamic MAC address entries, which can be aged.
static: Displays static MAC address entries, which do not age.
interface interface-type interface-number: Displays the MAC address learning status of the specified
interface. The interface-type interface-number argument specifies an interface by its type and number.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
If you execute this command without specifying any parameters, it displays information of all MAC
address entries on the device.
51
If you execute this command using only the vlan keyword or the count keyword, or only these two
keywords, it displays information of unicast MAC address entries.
Examples
# Display the MAC address entry for MAC address 000f-e201-0101.
<Sysname> display mac-address 000f-e201-0101
MAC ADDR
VLAN ID
STATE
PORT INDEX
000f-e201-0101
1
Learned
GigabitEthernet1/0/1
---
1 mac address(es) found
AGING TIME(s)
AGING
---
Table 13 Command output
Field
Description
MAC ADDR
MAC address.
VLAN ID
ID of the VLAN to which the MAC address belongs.
State of a MAC address entry:
STATE
PORT INDEX
•
•
•
•
Config static—Static entry manually configured by the user.
Config dynamic—Dynamic entry manually configured by the user.
Learned—Entry learned by the device.
Blackhole—Blackhole entry.
Outgoing port for packets that are destined for the MAC address. It is
displayed as N/A for a blackhole MAC address entry.
Aging time:
AGING TIME(s)
• AGING—The entry is aging.
• NOAGED—The entry does not age.
mac address(es) found
Number of matching MAC address entries.
Related commands
•
mac-address (system view)
•
mac-address (interface view)
•
mac-address timer
display mac-address aging-time
Use display mac-address aging-time to display the aging time of dynamic entries in the MAC address
table.
Syntax
display mac-address aging-time [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
52
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display the aging time of dynamic entries in the MAC address table.
<Sysname> display mac-address aging-time
Mac address aging time: 300s
The output shows that the aging time of dynamic entries in the MAC address table is 300 seconds.
Related commands
•
mac-address (system view)
•
mac-address (interface view)
•
mac-address timer
•
display mac-address
display mac-address statistics
Use display mac-address statistics to display the statistics of the MAC address table.
Syntax
display mac-address statistics [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display the statistics of the MAC address table.
<Sysname> display mac-address statistics
MAC TYPE
LEARNED
USER-DEFINED
SYSTEM-DEFINED IN-USE
Dynamic
Unicast
1
0
0
1
Static
Unicast
0
0
4
4
53
AVAILABLE
5120
Total
Unicast
5
32768
Dynamic Multicast
0
0
0
0
Static
Multicast
0
0
15
15
256
Total
Multicast
15
256
Table 14 Command output
Field
Description
MAC address type:
MAC TYPE
•
•
•
•
•
•
Dynamic Unicast.
Static Unicast.
Total Unicast.
Dynamic Multicast.
Static Multicast.
Total Multicast.
LEARNED
Dynamically learned MAC addresses.
USER-DEFINED
User defined MAC addresses (dynamic and static).
SYSTEM-DEFINED
MAC addresses generated by the system (for example, 802.1X and MAC
authentication).
IN-USE
Number of existing MAC addresses of a specific type.
AVAILABLE
Maximum number of MAC addresses supported by the system.
mac-address (interface view)
Use mac-address to add or modify a MAC address entry on a specified interface.
Use undo mac-address to remove a MAC address entry on the interface.
Syntax
mac-address { dynamic | static } mac-address vlan vlan-id
undo mac-address { dynamic | static } mac-address vlan vlan-id
Default
No MAC address entry is configured.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Parameters
dynamic: Specifies dynamic MAC address entries. These entries can age.
static: Specifies static MAC address entries. They do not age, but you can add or remove them.
54
mac-address: Specifies a MAC address in the format of H-H-H, where 0s at the beginning of each H
(16-bit hexadecimal digit) can be omitted. For example, entering "f-e2-1" indicates that the MAC address
is "000f-00e2-0001."
vlan vlan-id: Specifies an existing VLAN to which the Ethernet interface belongs. The value range for the
vlan-id argument is 1 to 4094.
Usage guidelines
The MAC address entries configuration cannot survive a reboot unless you save them. However, the
dynamic MAC address entries are lost at next reboot regardless of whether you save the configuration or
not.
Examples
# Add a static entry for MAC address 000f-e201-0101 on port GigabitEthernet 1/0/1 that belongs to
VLAN 2.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] mac-address static 000f-e201-0101 vlan 2
# Add a static entry for MAC address 000f-e201-0102 on port Bridge-Aggregation 1 that belongs to
VLAN 1.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] mac-address static 000f-e201-0102 vlan 1
Related commands
display mac-address
mac-address (system view)
Use mac-address to add or modify a MAC address entry.
Use undo mac-address to remove one or all MAC address entries.
Syntax
mac-address blackhole mac-address vlan vlan-id
mac-address { dynamic | static } mac-address interface interface-type interface-number vlan vlan-id
undo mac-address [ { dynamic | static } mac-address interface interface-type interface-number vlan
vlan-id ]
undo mac-address [ blackhole | dynamic | static ] [ mac-address ] vlan vlan-id
undo mac-address [ dynamic | static ] mac-address interface interface-type interface-number vlan
vlan-id
undo mac-address [ dynamic | static ] interface interface-type interface-number
Default
No MAC address entry is configured.
Views
System view
55
Default command level
2: System level
Parameters
blackhole: Specifies blackhole MAC address entries. These entries do not age, but you can add or
remove them. The packets whose source or destination MAC addresses match blackhole MAC address
entries are dropped.
mac-address: Specifies a MAC address in the format of H-H-H, where 0s at the beginning of each H
(16-bit hexadecimal digit) can be omitted. For example, entering "f-e2-1" indicates that the MAC address
is "000f-00e2-0001."
vlan vlan-id: Specifies an existing VLAN to which the Ethernet interface belongs. The value range for the
vlan-id argument is 1 to 4094.
dynamic: Specifies dynamic MAC address entries, which can be aged.
static: Specifies static MAC address entries. These entries do not age, but you can add or remove them.
interface interface-type interface-number: Specifies an outbound interface by its type and number.
Usage guidelines
A static or blackhole MAC address entry will not be overwritten by a dynamic MAC address entry. A
dynamic MAC address entry can be overwritten by a static or blackhole MAC address entry.
If you execute the undo mac-address command without specifying any parameters, this command
deletes all unicast MAC address entries.
You can delete all the MAC address entries of a VLAN, or you can choose to delete a specific type
(dynamic, static, or blackhole) of MAC address entries only. You can single out certain ports and delete
the corresponding unicast MAC address entries
The MAC address entries configuration cannot survive a reboot unless you save them. However, the
dynamic MAC address entries are lost at next reboot regardless of whether you save the configuration or
not.
Examples
# Add a static entry for MAC address 000f-e201-0101. All frames destined to this MAC address are sent
out of port GigabitEthernet 1/0/1, which belongs to VLAN 2.
<Sysname> system-view
[Sysname] mac-address static 000f-e201-0101 interface gigabitethernet 1/0/1 vlan 2
Related commands
display mac-address
mac-address mac-learning disable
Use mac-address mac-learning disable to disable MAC address learning. Depending on the view that
you entered, you can disable it globally, on a Layer 2 Ethernet interface, or on a VLAN.
Use undo mac-address mac-learning disable to enable MAC address learning. Depending on the view
that you entered, you can disable it globally, on a Layer 2 Ethernet interface, or on a VLAN.
Syntax
mac-address mac-learning disable
undo mac-address mac-learning disable
56
Default
MAC address learning is enabled.
Views
System view, Layer 2 Ethernet interface view, VLAN view, Layer 2 aggregate interface view
Default command level
2: System level
Usage guidelines
Follow these guidelines when you configure MAC address learning:
•
You may need to disable MAC address learning to prevent the MAC address table from being
saturated. For example, when your device is being attacked by many packets with different source
MAC addresses, it affects the update of the MAC address table.
•
Because disabling MAC address learning may result in broadcast storms, enable broadcast storm
suppression after you disable MAC address learning on a port.
When MAC address learning is disabled, the learned MAC addresses remain valid until they age out.
Examples
# Disable global MAC address learning.
<Sysname> system-view
[Sysname] mac-address mac-learning disable
# Disable MAC address learning on port GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] mac-address mac-learning disable
# Disable MAC address learning on VLAN 10.
<Sysname> system-view
[Sysname] vlan 10
[Sysname-vlan10] mac-address mac-learning disable
# Disable MAC address learning on Bridge-Aggregation 1.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] mac-address mac-learning disable
mac-address max-mac-count
Use mac-address max-mac-count count to configure the maximum number of MAC addresses that can
be learned on a port.
Use undo mac-address max-mac-count to restore the default maximum number of MAC addresses that
can be learned on an Ethernet port.
Syntax
mac-address max-mac-count count
undo mac-address max-mac-count
Default
No MAC learning limit is configured.
57
Views
Layer 2 Ethernet interface view
Default command level
2: System level
Parameters
count: Sets the maximum number of MAC addresses that can be learned on a port. The value is in the
range of 0 to 4096. When the argument takes 0, the port is not allowed to learn MAC addresses.
Examples
# Set the maximum number of MAC addresses that can be learned on port GigabitEthernet 1/0/1 to
600.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] mac-address max-mac-count 600
Related commands
•
mac-address (system view)
•
mac-address (interface view)
•
mac-address timer
mac-address timer
Use mac-address timer to configure the aging timer for dynamic MAC address entries.
Use undo mac-address timer to restore the default.
Syntax
mac-address timer { aging seconds | no-aging }
undo mac-address timer aging
Default
The default setting is 300 seconds.
Views
System view
Default command level
2: System level
Parameters
aging seconds: Sets an aging timer for dynamic MAC address entries, in the range of 10 to 1000000
seconds.
no-aging: Sets dynamic MAC address entries not to age.
Usage guidelines
Follow these guidelines to set the aging timer appropriately:
•
A long aging interval may cause the MAC address table to retain outdated entries and fail to
accommodate the latest network changes.
58
•
A short aging interval may result in removal of valid entries and unnecessary broadcasts that may
affect the performance of the device.
Examples
# Set the aging timer for dynamic MAC address entries to 500 seconds.
<Sysname> system-view
[Sysname] mac-address timer aging 500
59
MAC Information configuration commands
MAC Information applies only to Layer 2 Ethernet interfaces.
mac-address information enable (interface view)
Use mac-address information enable to enable MAC Information on the Layer 2 Ethernet interface.
Use undo mac-address information enable to restore the default.
Syntax
mac-address information enable { added | deleted }
undo mac-address information enable { added | deleted }
Default
MAC Information is disabled on a Layer 2 Ethernet interface.
Views
Layer 2 Ethernet interface view
Default command level
1: Monitor level
Parameters
added: Enables the device to record security information when a new MAC address is learned on the
Ethernet port.
deleted: Enables the device to record security information when an existing MAC address is deleted.
Usage guidelines
This command is not supported on aggregate interfaces.
Before you enable MAC Information on an Ethernet interface, enable MAC Information globally.
Examples
# Enable MAC Information on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] mac-address information enable added
mac-address information enable (system view)
Use mac-address information enable to enable MAC Information globally.
Use undo mac-address information enable to restore the default.
Syntax
mac-address information enable
undo mac-address information enable
60
Default
MAC Information is disabled globally.
Views
System view
Default command level
2: System level
Examples
# Enable MAC Information globally.
<Sysname> system-view
[Sysname] mac-address information enable
mac-address information interval
Use mac-address information interval to set the interval for sending Syslog or trap messages.
Use undo mac-address information interval to restore the default.
Syntax
mac-address information interval interval-time
undo mac-address information interval
Default
The interval for sending Syslog or trap messages is 1 second.
Views
System view
Default command level
2: System level
Parameters
interval-time: Sets the interval for sending Syslog or trap messages, in the range of 1 to 20000 seconds.
Examples
# Set the interval for sending Syslog or trap messages to 200 seconds.
<Sysname> system-view
[Sysname] mac-address information interval 200
mac-address information mode
Use mac-address information mode to set the MAC Information mode (to use Syslog messages or trap
messages) to inform the remote network management device of MAC address changes.
Use undo mac-address information mode to restore the default.
Syntax
mac-address information mode { syslog | trap }
undo mac-address information mode { syslog | trap }
61
Default
Trap messages are sent to inform the remote network management device of MAC address changes.
Views
System view
Default command level
2: System level
Parameters
syslog: Specifies that the device sends Syslog messages to inform the remote network management
device of MAC address changes.
trap: Specifies that the device sends trap messages to inform the remote network management device of
MAC address changes.
Examples
# Configure the device to send trap messages to inform the remote network management device of MAC
address changes.
<Sysname> system-view
[Sysname] mac-address information mode trap
mac-address information queue-length
Use mac-address information queue-length to set the MAC Information queue length.
Use undo mac-address information queue-length to restore the default.
Syntax
mac-address information queue-length value
undo mac-address information queue-length
Default
The MAC Information queue length is 50.
Views
System view
Default command level
2: System level
Parameters
value: Specifies the MAC Information queue length in the range of 0 to 1000.
Examples
# Set the MAC Information queue length to 600.
<Sysname> system-view
[Sysname] mac-address information queue-length 600
62
Ethernet link aggregation configuration
commands
default
Use default to restore the default settings for an aggregate interface.
Syntax
default
Views
Layer 2 aggregate interface view
Default command level
2: System level
Usage guidelines
CAUTION:
The default command might interrupt ongoing network services. Make sure you are fully aware of the
impacts of this command when you perform it on a live network.
This command might fail to restore the default settings for some commands for reasons such as command
dependencies and system restrictions. Use the display this command in interface view to identify these
commands, and then use their undo forms or follow the command reference to individually restore their
default settings. If your restoration attempt still fails, follow the error message instructions to resolve the
problem.
Examples
# Restore the default settings for Layer 2 aggregate interface Bridge-Aggregation 1.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] default
This command will restore the default settings. Continue? [Y/N]:y
description
Use description to set a description for an interface. For example, you can include information such as
the purpose of the interface for the ease of management.
Use undo description to restore the default setting.
Syntax
description text
undo description
63
Default
The description of an interface is interface-name Interface. For example, the default description of
Bridge-Aggregation1 is Bridge-Aggregation1 Interface.
Views
Layer 2 aggregate interface view
Default command level
2: System level
Parameters
text: Specifies the interface description, a string of 1 to 80 characters.
Examples
# Set the description of Layer 2 aggregate interface Bridge-Aggregation 1 to connect to the lab.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] description connect to the lab
display interface
Use display interface to display aggregate interface information.
Syntax
display interface [ bridge-aggregation ] [ brief [ down ] ] [ | { begin | exclude | include }
regular-expression ]
display interface bridge-aggregation interface-number [ brief ] [ | { begin | exclude | include }
regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
bridge-aggregation: Displays information about Layer 2 aggregate interfaces.
interface-number: Specifies an existing aggregate interface number. The value range for the
interface-number argument is the set of all existing aggregate interface numbers.
brief: Displays brief interface information. If you do not specify this keyword, this command displays
detailed interface information.
down: Displays information about interfaces in DOWN state and the causes. If you do not specify this
keyword, this command displays information about interfaces in all states.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
64
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
If bridge-aggregation is not specified, this command displays information about all interfaces.
If bridge-aggregation is specified without any interface number specified, this command displays
information about all aggregate interfaces.
If bridge-aggregation interface-number is specified, this command displays information about the
specified aggregate interface.
Examples
# Display information about Layer 2 aggregate interface Bridge-Aggregation 1.
<Sysname> display interface bridge-aggregation 1
Bridge-Aggregation1 current state: DOWN
IP Packet Frame Type: PKTFMT_ETHNT_2, Hardware Address: 000f-e207-f2e0
Description: Bridge-Aggregation1 Interface
Unknown-speed mode, unknown-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
PVID: 1
Port link-type: access
Tagged
VLAN ID : none
Untagged VLAN ID : 1
Last clearing of counters:
Last 300 seconds input:
Last 300 seconds output:
Input (total):
Never
0 packets/sec 0 bytes/sec
-%
0 packets/sec 0 bytes/sec
-%
0 packets, 0 bytes
0 unicasts, 0 broadcasts, 0 multicasts
Input (normal):
0 packets, 0 bytes
0 unicasts, 0 broadcasts, 0 multicasts
Input:
0 input errors, 0 runts, 0 giants, 0 throttles
0 CRC, 0 frame, 0 overruns, 0 aborts
0 ignored, 0 parity errors
Output (total): 0 packets, 0 bytes
0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses
Output (normal): 0 packets, 0 bytes
0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses
Output: 0 output errors, 0 underruns, 0 buffer failures
0 aborts, 0 deferred, 0 collisions, 0 late collisions
0 lost carrier, 0 no carrier
Table 15 Command output
Field
Description
State of the Layer 2 aggregate interface:
• DOWN (Administratively)—The interface is administratively shut
Bridge-Aggregation1 current state
down with the shutdown command.
• DOWN—The interface is administratively up but physically down
(possibly because no physical link is present or the link is faulty).
• UP—The Ethernet interface is both administratively and physically up.
65
Field
Description
Unknown-speed mode,
unknown-duplex mode
The interface speed and duplex mode are unknown.
PVID
Port VLAN ID (PVID).
Last clearing of counters
Time when the reset counters interface command was last used to clear
the interface statistics.
Never indicates the reset counters interface command has never been
used on the interface after the device's startup.
Last 300 seconds input/output
Average input/output rate over the last 300 seconds.
Input/Output (total)
Statistics of all packets received/sent on the interface.
Input/Output (normal)
Statistics of all normal packets received/sent on the interface.
Line protocol current state
Link layer state of the interface.
IP packet processing.
Internet protocol processing
Disabled indicates that IP packets cannot be processed.
For an interface configured with an IP address, this field changes to
Internet Address is.
The brief information of interface(s)
under route mode
Brief information about Layer 3 interfaces.
The brief information of interface(s)
under bridge mode
Brief information about Layer 2 interfaces.
Link status:
Link: ADM - administratively down;
Stby - standby
• ADM—The interface has been administratively shut down. To recover
its physical layer state, use the undo shutdown command.
• Stby—The interface is operating as a backup interface.
If the speed of an interface is automatically negotiated, its speed attribute
includes the auto negotiation flag (an "a" in parentheses).
Speed or Duplex: (a)/A - auto; H half; F - full
If the duplex mode of an interface is automatically negotiated, its duplex
mode attribute includes the auto negotiation flag, letter a in parentheses
or a capital A. Letter H indicates the half duplex mode, and letter F
indicates the full duplex mode.
Type: A - access; T - trunk; H hybrid
Link type options for Ethernet interfaces.
Interface
Abbreviated interface name.
Link
Physical link state of the interface.
Speed
Interface speed, in bps.
Cause
Cause of a DOWN physical link.
display lacp system-id
Use display lacp system-id to display the system ID of the local system.
Syntax
display lacp system-id [ | { begin | exclude | include } regular-expression ]
66
Views
Any view
Default command level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
The system ID comprises the system LACP priority and the system MAC address.
Although you specify the LACP priority value in decimal format in the lacp system-priority command, it
is displayed as a hexadecimal value with the display lacp system-id command.
Examples
# Display the local system ID.
<Sysname> display lacp system-id
Actor System ID: 0x8000, 0000-fc00-6504
Table 16 Command output
Field
Description
Actor System ID: 0x8000,
0000-fc00-6504
Local system ID, which comprises the system LACP priority (0x8000 in
this sample output) and the system MAC address (0000-fc00-6504 in this
sample output).
Related commands
lacp system-priority
display link-aggregation load-sharing mode
Use display link-aggregation load-sharing mode to display global or group-specific link-aggregation
load sharing criteria.
Syntax
display link-aggregation load-sharing mode [ interface [ bridge-aggregation interface-number ] ] [ |
{ begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
67
Parameters
bridge-aggregation: Displays the load sharing criteria of the aggregation group corresponding to the
specified Layer 2 aggregate interface.
interface-number: Specifies an existing aggregate interface number.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
To display the global link-aggregation load sharing criteria, run the command without the interface
keyword.
To display all group-specific load sharing criteria, run the command with the interface keyword, but do
not specify a particular interface.
To display the load sharing criteria of a particular aggregation group, use the command with the
aggregate interface specified.
The bridge-aggregation keyword becomes available only after you create Layer 2 aggregate interfaces
on the device.
Examples
# Display the default global link-aggregation load sharing criteria.
<Sysname> display link-aggregation load-sharing mode
Link-Aggregation Load-Sharing Mode:
Layer 2 traffic: packet type-based sharing
Layer 3 traffic: packet type-based sharing
# Display the default link-aggregation load sharing criteria of the aggregation group corresponding to
Layer 2 aggregate interface Bridge-Aggregation 10.
<Sysname> display link-aggregation load-sharing mode interface bridge-aggregation 10
Bridge-Aggregation10 Load-Sharing Mode:
Layer 2 traffic: packet type-based sharing
Layer 3 traffic: packet type-based sharing
Table 17 Command output
Field
Description
Link-Aggregation Load-Sharing
Mode
Global link-aggregation load sharing criteria.
Bridge-Aggregation10
Load-Sharing Mode
Link-aggregation load sharing criteria of the aggregation group
corresponding to the aggregate interface Bridge-Aggregation 10.
Layer 2 traffic: packet type-based
sharing
Default link-aggregation load sharing criteria for Layer 2 traffic. In this
sample output, the criterion is the packet type.
68
Field
Description
Layer 3 traffic: packet type-based
sharing
Default link-aggregation load sharing criteria for Layer 3 traffic. In this
sample output, the criterion is the packet type.
display link-aggregation member-port
Use display link-aggregation member-port to display detailed link aggregation information for the
specified member ports. If no port is specified, this command displays detailed link aggregation
information for all member ports.
Syntax
display link-aggregation member-port [ interface-list ] [ | { begin | exclude | include }
regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
interface-list: Specifies a list of link aggregation member ports, in the format interface-type
interface-number1 [ to interface-type interface-number2 ], where interface-type interface-number
specifies an interface by its type and number.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
Only the port number and operational key of a member port in a static aggregation group are displayed,
because the aggregation group is not aware of the partner’s information.
Examples
# Display detailed link aggregation information for GigabitEthernet 1/0/1, a member port of a static
aggregation group.
<Sysname> display link-aggregation member-port gigabitethernet 1/0/1
Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
GigabitEthernet1/0/1:
Aggregation Interface: Bridge-Aggregation1
Port Number: 1
Port Priority: 32768
Oper-Key: 1
69
# Display detailed link aggregation information for GigabitEthernet 1/0/2, a member port of a
dynamic aggregation group.
<Sysname> display link-aggregation member-port gigabitethernet 1/0/2
Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
GigabitEthernet1/0/2:
Aggregation Interface: Bridge-Aggregation10
Local:
Port Number: 2
Port Priority: 32768
Oper-Key: 2
Flag: {ACDEF}
Remote:
System ID: 0x8000, 000f-e267-6c6a
Port Number: 26
Port Priority: 32768
Oper-Key: 2
Flag: {ACDEF}
Received LACP Packets: 5 packet(s)
Illegal: 0 packet(s)
Sent LACP Packets: 7 packet(s)
Table 18 Command output
Field
Description
LACP state flags:
Flags
•
•
•
•
•
•
•
•
A—LACP is enabled.
B—LACP short timeout.
C—The sending system detects that the link is aggregatable.
D—The sending system detects that the link is synchronized.
E—The sending system detects that the incoming frames are collected.
F—The sending system detects that the outgoing frames are distributed.
G—The sending system receives frames in default state.
H—The sending system receives frames in expired state.
Aggregation Interface
Aggregate interface to which the member port belongs.
Local
Information about the local end.
Port Priority
Aggregation priority of the port.
Oper-key
Operational key.
Flag
LACP protocol state flag.
Remote
Information about the remote end.
System ID
Remote end system ID, comprising the system LACP priority and the system MAC
address.
Received LACP Packets
Total number of LACP packets received.
Illegal
Total number of illegal packets.
70
Field
Description
Sent LACP Packets
Total number of LACP packets sent.
display link-aggregation summary
Use display link-aggregation summary to display the summary information for all aggregation groups.
Syntax
display link-aggregation summary [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
The information about the remote system for a static link aggregation group may be displayed as none
or may not be displayed, because the aggregation group is not aware of the partner’s information.
Examples
# Display the summary information for all aggregation groups.
<Sysname> display link-aggregation summary
Aggregation Interface Type:
BAGG -- Bridge-Aggregation, RAGG -- Route-Aggregation
Aggregation Mode: S -- Static, D -- Dynamic
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Actor System ID: 0x8000, 000f-e267-6c6a
AGG
AGG
Interface
Mode
Partner ID
Select Unselect
Share
Ports
Type
Ports
------------------------------------------------------------------------BAGG1
S
none
1
0
Shar
BAGG10
D
0x8000, 000f-e267-57ad
2
0
Shar
71
Table 19 Command output
Field
Description
Aggregate interface type:
Aggregation Interface Type
• BAGG—Layer 2 aggregate interface.
• RAGG—Layer 3 aggregate interface.
Aggregation group type:
Aggregation Mode
• S—Static link aggregation.
• D—Dynamic aggregation.
Load sharing type:
Loadsharing Type
• Shar—Load sharing.
• NonS—Non-load sharing.
Actor System ID
Local system ID, which comprises the system LACP priority and the
system MAC address.
AGG Interface
Type and number of the aggregate interface.
AGG Mode
Aggregation group type.
Partner ID
System ID of the partner, which comprises the system LACP priority
and the system MAC address.
Select Ports
Total number of Selected ports.
Unselect Ports
Total number of Unselected ports.
Share Type
Load sharing type.
display link-aggregation verbose
Use display link-aggregation verbose to display detailed information about the aggregation groups
corresponding to the aggregate interfaces.
Syntax
display link-aggregation verbose [ bridge-aggregation [ interface-number ] ] [ | { begin | exclude |
include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
bridge-aggregation: Displays detailed information about the Layer 2 aggregation groups corresponding
to Layer 2 aggregate interfaces.
interface-number: Specifies an existing aggregate interface number.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
72
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
To display the information about a specific Layer 2 aggregation group, use the display link-aggregation
verbose bridge-aggregation interface-number command.
To display the information about all Layer 2 aggregation groups, use the display link-aggregation
verbose bridge-aggregation command.
To display the information about all aggregation groups, use the display link-aggregation verbose
command.
The bridge-aggregation keyword is available only when you create Layer 2 aggregate interfaces on the
device.
Examples
# Display detailed information about the aggregation group corresponding to Layer 2 aggregate
interface Bridge-Aggregation 10, which is a dynamic aggregation group.
<Sysname> display link-aggregation verbose bridge-aggregation 10
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Port Status: S -- Selected, U -- Unselected
Flags:
A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
Aggregation Interface: Bridge-Aggregation10
Aggregation Mode: Dynamic
Loadsharing Type: Shar
System ID: 0x8000, 000f-e267-6c6a
Local:
Port
Status
Priority Oper-Key
Flag
------------------------------------------------------------------------------GE1/0/6
S
32768
2
{ACDEF}
GE1/0/10
S
32768
2
{ACDEF}
Remote:
Actor
Partner Priority Oper-Key
SystemID
Flag
------------------------------------------------------------------------------GE1/0/6
32
32768
2
0x8000, 000f-e267-57ad {ACDEF}
GE1/0/10
26
32768
2
0x8000, 000f-e267-57ad {ACDEF}
# Display detailed information about the aggregation group corresponding to Layer 2 aggregate
interface Bridge-Aggregation 20, which is a static aggregation group.
<Sysname> display link-aggregation verbose bridge-aggregation 20
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Port Status: S -- Selected, U -- Unselected
Flags:
A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
Aggregation Interface: Bridge-Aggregation20
Aggregation Mode: Static
73
Loadsharing Type: NonS
Port
Status
Priority
Oper-Key
-------------------------------------------------------------------------------GE1/0/21
U
32768
1
GE1/0/22
U
32768
1
GE1/0/23
U
63
1
Table 20 Command output
Field
Description
Loadsharing Type
• Shar—Load sharing.
• NonS—Non-load sharing.
Port Status
Port state: Selected or unselected.
Load sharing type:
LACP state flags:
Flags
Aggregation Interface
•
•
•
•
•
•
•
•
A—LACP is enabled.
B—LACP short timeout.
C—The sending system detects that the link is aggregatable.
D—The sending system detects that the link is synchronized.
E—The sending system detects that the incoming frames are collected.
F—The sending system detects that the outgoing frames are distributed.
G—The sending system receives frames in default state.
H—The sending system receives frames in expired state.
Name of the aggregate interface.
Mode of the aggregation group:
Aggregation Mode
• Static for static aggregation.
• Dynamic for dynamic aggregation.
System ID
Local system ID, comprising the system LACP priority and the system MAC
address.
Local
Information about the local end.
Port
Port type and number.
Status
Port state: selected or unselected.
Priority
Port aggregation priority.
Oper-Key
Operational key.
Flag
LACP protocol state flag.
Remote
Information about the remote end.
Actor
Local port type and number.
Partner
Remote port index.
enable snmp trap updown
Use enable snmp trap updown to enable linkUp/linkDown trap generation for the aggregate interface.
74
Use undo enable snmp trap updown to disable linkUp/linkDown trap generation for the aggregate
interface.
Syntax
enable snmp trap updown
undo enable snmp trap updown
Default
LinkUp/linkDown trap generation is enabled for an aggregate interface.
Views
Layer 2 aggregate interface view
Default command level
2: System level
Usage guidelines
For an aggregate interface to generate linkUp/linkDown traps when its link state changes, you must
enable linkUp/linkDown trap generation globally with the snmp-agent trap enable [ standard
[ linkdown | linkup ] * ] command.
For more information about the snmp-agent trap enable command, see Network Management and
Monitoring Command Reference.
Examples
# Enable linkUp/linkDown trap generation on Layer 2 aggregate interface Bridge-Aggregation 1.
<Sysname> system-view
[Sysname] snmp-agent trap enable
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] enable snmp trap updown
interface bridge-aggregation
Use interface bridge-aggregation to create a Layer 2 aggregate interface and enter the Layer 2
aggregate interface view.
Use undo interface bridge-aggregation to remove a Layer 2 aggregate interface.
Syntax
interface bridge-aggregation interface-number
undo interface bridge-aggregation interface-number
Views
System view
Default command level
2: System level
Parameters
interface-number: Specifies a Layer 2 aggregate interface number in the range of 1 to 128.
75
Usage guidelines
When you create a Layer 2 aggregate interface, a Layer 2 aggregation group with the same number is
automatically created. If you remove the Layer 2 aggregate interface, you also remove the Layer 2
aggregation group, and any member ports leave the aggregation group.
Examples
# Create Layer 2 aggregate interface Bridge-Aggregation 1 and enter its view.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1]
lacp period short
Use lacp period short to set the LACP timeout interval on a port to the short timeout interval (1 second).
Use undo lacp period to restore the default setting.
Syntax
lacp period short
undo lacp period
Default
The LACP timeout interval is the long timeout interval (30 seconds).
Views
Ethernet interface view
Default command level
2: System level
Examples
# Set the LACP timeout interval on GigabitEthernet 1/0/1 to the short timeout interval (1 second).
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] lacp period short
lacp system-priority
Use lacp system-priority to set the LACP priority of the local system.
Use undo lacp system-priority to restore the default setting.
Syntax
lacp system-priority system-priority
undo lacp system-priority
Default
The system LACP priority is 32768.
Views
System view
76
Default command level
2: System level
Parameters
system-priority: Specifies the LACP priority of the local system, in the range of 0 to 65535. The smaller the
value, the higher the system LACP priority.
Examples
# Set the system LACP priority to 64.
<Sysname> system-view
[Sysname] lacp system-priority 64
link-aggregation lacp traffic-redirect-notification enable
Use link-aggregation lacp traffic-redirect-notification enable to enable link-aggregation traffic
redirection.
Use undo link-aggregation lacp traffic-redirect-notification enable to disable link-aggregation traffic
redirection.
Syntax
link-aggregation lacp traffic-redirect-notification enable
undo link-aggregation lacp traffic-redirect-notification enable
Default
Link-aggregation traffic redirection is disabled.
Views
System view
Default command level
2: System level
Usage guidelines
Link-aggregation traffic redirection applies only to dynamic link aggregation groups.
To prevent traffic interruption, enable link-aggregation traffic redirection on devices at both ends of the
aggregate link.
Do not enable both MSTP and link-aggregation traffic redirection at the same time. Light packet loss may
occur when the device reboots.
After link-aggregation traffic redirection is enabled, do not add an Ethernet interface configured with
physical state change suppression to an aggregation group. Otherwise, Selected ports in the
aggregation group might work incorrectly. For more information about physical state change
suppression, see the link-delay command in "Ethernet interface configuration commands."
Examples
# Enable link-aggregation traffic redirection.
<Sysname> system-view
[Sysname] link-aggregation lacp traffic-redirect-notification enable
77
link-aggregation load-sharing mode
Use link-aggregation load-sharing mode to configure the global or group-specific link-aggregation load
sharing criteria.
Use undo link-aggregation load-sharing mode to restore the default setting.
Syntax
In system view:
link-aggregation load-sharing mode { destination-ip | destination-mac | destination-port |
ingress-port | source-ip | source-mac | source-port }*
In Layer 2 aggregate interface view:
link-aggregation load-sharing mode { { destination-ip | destination-mac | source-ip | source-mac } * }
undo link-aggregation load-sharing mode
Default
The system selects the load sharing criteria according to the packet type, and the group-specific
link-aggregation load sharing criteria are the same as the global ink-aggregation load sharing criteria.
Views
System view, Layer 2 aggregate interface view
Default command level
2: System level
Parameters
destination-ip: Performs load sharing in link aggregation groups based on destination IP address.
destination-mac: Performs load sharing in link aggregation groups based on destination MAC address.
destination-port: Performs load sharing in link aggregation groups based on destination port.
ingress-port: Performs load sharing in link aggregation groups based on ingress port.
source-ip: Performs load sharing in link aggregation groups based on source IP address.
source-mac: Performs load sharing in link aggregation groups based on source MAC address.
source-port: Performs load sharing in link aggregation groups based on source port.
Usage guidelines
This command takes effect on only unicast packets, and can change the load sharing criteria for unicast
packets. Broadcast packets and multicast packets always use the default load sharing criteria.
The load sharing criteria that you configure will overwrite the previous criteria.
If unsupported load sharing criteria are configured, an error prompt will appear.
In system view, the switch supports the following load sharing criteria and combinations:
•
Load-sharing criteria automatically determined based on the packet type
•
Source IP address
•
Destination IP address
•
Source MAC address
•
Destination MAC address
78
•
Ingress port
•
Source IP address and destination IP address
•
Source IP address and source port
•
Destination IP address and destination port
•
Source IP address, source port, destination IP address, and destination port
•
Any combination of ingress port, source MAC address, and destination MAC address
In Layer 2 aggregate interface view, the switch supports the following load sharing criteria and
combinations:
•
Load sharing criteria automatically determined based on the packet type
•
Source IP address
•
Destination IP address
•
Source MAC address
•
Destination MAC address
•
Destination IP address and source IP address
•
Destination MAC address and source MAC address
NOTE:
The ingress-port keyword is supported only in Release 1118 and later versions.
Examples
# Configure the source MAC address and destination MAC address as the global link-aggregation load
sharing criteria.
<Sysname> system-view
[Sysname] link-aggregation load-sharing mode source-mac destination-mac
# Configure the destination MAC address as the load sharing criterion specific to the link aggregation
group of aggregate interface Bridge-Aggregation 1.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] link-aggregation load-sharing mode destination-mac
link-aggregation load-sharing mode local-first
Use link-aggregation load-sharing mode local-first to enable local-first load sharing for link
aggregation.
Use undo link-aggregation load-sharing mode local-first to disable local-first load sharing for link
aggregation.
Syntax
link-aggregation load-sharing mode local-first
undo link-aggregation load-sharing mode local-first
Default
Local-first load sharing is enabled for link aggregation.
79
Views
System view
Default command level
2: System level
Usage guidelines
After you disable local-first load sharing for link aggregation, the packets to be forwarded out of an
aggregate interface will be load-shared among all Selected ports of the aggregate interface on all IRF
member devices.
Local-first load sharing for link aggregation takes effect on only known unicast packets.
Examples
# Disable local-first load sharing for link aggregation.
<Sysname> system-view
[Sysname] undo link-aggregation load-sharing mode local-first
link-aggregation mode
Use link-aggregation mode dynamic to configure an aggregation group to operate in dynamic
aggregation mode.
Use undo link-aggregation mode to restore the default setting.
Syntax
link-aggregation mode dynamic
undo link-aggregation mode
Default
An aggregation group operates in static aggregation mode.
Views
Layer 2 aggregate interface view
Default command level
2: System level
Usage guidelines
To change the aggregation mode of an aggregation group that contains member ports, remove all
member ports from the aggregation group first.
Examples
# Configure the aggregation group corresponding to Bridge-Aggregation 1 to operate in dynamic
aggregation mode.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] link-aggregation mode dynamic
link-aggregation port-priority
Use link-aggregation port-priority to set the aggregation priority of a port.
80
Use undo link-aggregation port-priority to restore the default setting.
Syntax
link-aggregation port-priority port-priority
undo link-aggregation port-priority
Default
The aggregation priority of a port is 32768.
Views
Ethernet interface view
Default command level
2: System level
Parameters
port-priority: Specifies a port aggregation priority in the range of 0 to 65535. The smaller the value, the
higher the port aggregation priority.
Examples
# Set the aggregation priority of port GigabitEthernet 1/0/1 to 64.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] link-aggregation port-priority 64
port link-aggregation group
Use port link-aggregation group to assign the Ethernet interface to the specified aggregation group.
Use undo port link-aggregation group to remove the Ethernet interface from the aggregation group to
which it belongs.
Syntax
port link-aggregation group number
undo port link-aggregation group
Views
Ethernet interface view
Default command level
2: System level
Parameters
number: Specifies the number of the aggregate interface corresponding to an aggregation group. The
value range for this argument is 1 to 128.
Usage guidelines
An Ethernet interface can belong to only one aggregation group.
Examples
# Assign Layer 2 Ethernet interface GigabitEthernet 1/0/1 to Layer 2 aggregation group 1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
81
[Sysname-GigabitEthernet1/0/1] port link-aggregation group 1
reset counters interface
Use reset counters interface to clear the statistics of the specified aggregate interface or interfaces.
Syntax
reset counters interface [ bridge-aggregation [ interface-number ] ]
Views
User view
Default command level
2: System level
Parameters
bridge-aggregation: Clears statistics for Layer 2 aggregate interfaces.
interface-number: Specifies an aggregate interface number. If this argument is not specified, the
command clears statistics for all aggregate interfaces of the specified type.
Usage guidelines
Before collecting statistics for a Layer 2 aggregate interface within a specific period, clear the existing
statistics of the interface.
•
If no keyword or argument is specified, the command clears the statistics of all interfaces in the
system.
•
If only the bridge-aggregation keyword is specified, the command clears the statistics of all Layer
2 aggregate interfaces.
•
If the bridge-aggregation interface-number option is specified, the command clears the statistics of
the specified Layer 2 aggregate interface.
•
The bridge-aggregation keyword becomes available only after you create Layer 2 aggregate
interfaces on the device.
Examples
# Clear the statistics of Layer 2 aggregate interface Bridge-Aggregation 1.
<Sysname> reset counters interface bridge-aggregation 1
reset lacp statistics
Use reset lacp statistics to clear the LACP statistics on the specified member ports or all member ports, if
no member ports are specified.
Syntax
reset lacp statistics [ interface interface-list ]
Views
User view
Default command level
1: Monitor level
82
Parameters
interface-list: Specifies a list of link aggregation member ports, in the format interface-type
interface-number1 [ to interface-type interface-number2 ], where interface-type interface-number
specifies an interface by its type and number.
Examples
# Clear the LACP statistics on all link aggregation member ports.
<Sysname> reset lacp statistics
Related commands
display link-aggregation member-port
shutdown
Use shutdown to shut down the aggregate interface.
Use undo shutdown to bring up the aggregate interface.
Syntax
shutdown
undo shutdown
Default
Aggregate interfaces are up.
Views
Layer 2 aggregate interface view
Default command level
2: System level
Examples
# Shut down Layer 2 aggregate interface Bridge-Aggregation 1.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] shutdown
83
Port isolation configuration commands
display port-isolate group
Use display port-isolate group to display port isolation group information.
Syntax
display port-isolate group [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
This command displays information about the default isolation group (isolation group 1).
Examples
# Display port isolation group information.
<Sysname> display port-isolate group
Port-isolate group information:
Uplink port support: NO
Group ID: 1
Group members:
GigabitEthernet1/0/2
Table 21 Command output
Field
Description
Port-isolate group information
Displays port isolation group information.
Uplink port support
Indicates whether the device supports configuring an uplink
port in the port isolation group.
Group ID
Isolation group number.
Group members
Isolated ports (non-uplink ports) in the isolation group.
84
port-isolate enable
Use port-isolate enable to assign a port to an isolation group.
Use undo port-isolate enable to remove a port from the isolation group.
Syntax
port-isolate enable
undo port-isolate enable
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Usage guidelines
This command assigns a port to the default isolation group, called isolation group 1.
•
To assign Ethernet ports to the isolation group one by one, use the command in Layer 2 Ethernet
interface view.
•
To assign a Layer 2 aggregate interface to the isolation group, use the command in Layer 2
aggregate interface view. The configuration applies to the Layer 2 aggregate interface and all its
member ports. If the device fails to apply the port-isolate enable command to a Layer 2 aggregate
interface, it does not assign any member port of the aggregate interface to the isolation group. If
the failure occurs on a member port, the device can still assign other member ports to the isolation
group. For more information about Layer 2 aggregate interfaces, see "Ethernet link aggregation
configuration commands."
You cannot assign the member ports of a service loopback group to an isolation group, and vice versa.
Examples
#Assign ports GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 to the isolation group.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port-isolate enable
[Sysname-GigabitEthernet1/0/1] quit
[Sysname] interface gigabitethernet 1/0/2
[Sysname-GigabitEthernet1/0/2] port-isolate enable
# Assign Layer 2 aggregate interface Bridge-Aggregation 1 to the isolation group.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] quit
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-aggregation group 1
[Sysname-GigabitEthernet1/0/1] quit
[Sysname] interface GigabitEthernet 1/0/2
[Sysname-GigabitEthernet1/0/2] port link-aggregation group 1
[Sysname-GigabitEthernet1/0/2] quit
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] port-isolate enable
85
Spanning tree configuration commands
active region-configuration
Use active region-configuration to activate your MST region configuration.
Syntax
active region-configuration
Views
MST region view
Default command level
2: System level
Usage guidelines
When you configure MST region–related parameters, MSTP launches a new spanning tree calculation
process that may cause network topology instability. This is most likely to occur when you configure the
VLAN-to-instance mapping table. The launch occurs only after you activate the MST region–related
parameters by using the active region-configuration command or enable the spanning tree feature by
using the stp enable command.
HP recommends that you use the check region-configuration command to determine whether the MST
region configurations to be activated are correct. Run this command only when they are correct.
Examples
# Map VLAN 2 to MSTI 1 and manually activate the MST region configuration.
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region] instance 1 vlan 2
[Sysname-mst-region] active region-configuration
Related commands
•
instance
•
region-name
•
revision-level
•
vlan-mapping modulo
•
check region-configuration
bpdu-drop any
Use bpdu-drop any to enable BPDU drop on a port.
Use undo bpdu-drop any to disable BPDU drop on a port.
Syntax
bpdu-drop any
86
undo bpdu-drop any
Default
BPDU drop is disabled on a port.
Views
Ethernet interface view
Default command level
2: System level
Examples
# Enable BPDU drop on port GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] bpdu-drop any
check region-configuration
Use check region-configuration to display MST region pre-configuration information, including the
region name, revision level, and VLAN-to-instance mapping settings.
Syntax
check region-configuration
Views
MST region view
Default command level
2: System level
Usage guidelines
Two or more spanning tree devices belong to the same MST region only if they are configured with the
same format selector (0, which is not configurable), MST region name, MST region revision level, and the
same VLAN-to-instance mapping entries in the MST region, and if they are connected through a physical
link.
HP recommends that you use this command to determine whether the MST region configurations to be
activated are correct. Activate them only when they are correct.
Examples
# Display MST region pre-configurations.
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region] check region-configuration
Admin Configuration
Format selector
:0
Region name
:000fe26a58ed
Revision level
:0
Configuration digest :0x41b5018aca57daa8dcfdba2984d99d06
Instance
Vlans Mapped
87
0
15
1 to 9, 11 to 4094
10
Table 22 Command output
Field
Description
Format selector
Format selector of the MST region, which is 0 (not configurable).
Region name
MST region name.
Revision level
Revision level of the MST region.
Instance Vlans Mapped
VLAN-to-instance mappings in the MST region.
Related commands
•
instance
•
region-name
•
revision-level
•
vlan-mapping modulo
•
active region-configuration
display stp
Use display stp to display the spanning tree status and statistics information.
Syntax
display stp [ instance instance-id | vlan vlan-id ] [ interface interface-list | slot slot-number ] [ brief ] [ |
{ begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
instance instance-id: Displays the status and statistics information of a specific MSTI. The value range for
the instance-id argument is 0 to 31, and 0 represents the common internal spanning tree (CIST).
vlan vlan-id: Displays the spanning tree status and statistics of a VLAN specified by vlan-id. The value
range for the vlan-id argument is 1 to 4094.
interface interface-list: Displays the spanning tree status and statistics on the ports specified by a port list,
in the format of interface-list = { interface-type interface-number [ to interface-type
interface-number ] }&<1-10>, where &<1-10> indicates that you can specify up to 10 ports or port
ranges.
slot slot-number: Displays the spanning tree status and statistics information on the specified IRF member
device. The slot-number argument represents the ID of the IRF member device. If this argument is not
specified, this command displays the spanning tree status and statistics on all member devices in the IRF
fabric.
brief: Displays brief spanning tree status and statistics.
88
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
Based on the spanning tree status and statistics information, you can analyze and maintain the network
topology or check whether spanning tree is working correctly.
In STP or RSTP mode, follow these guidelines:
•
If you do not specify any port, this command displays the spanning tree information for all ports.
The displayed information is sorted by port name.
•
If you specify a port list, this command displays the spanning tree information for the specified ports.
The displayed information is sorted by port name.
In MSTP mode, follow these guidelines:
•
If you do not specify any MSTI or port, this command displays the spanning tree information of all
MSTIs on all ports. The displayed information is sorted by MSTI ID and by port name in each MSTI.
•
If you specify an MSTI but not a port, this command displays the spanning tree information on all
ports in that MSTI. The displayed information is sorted by port name.
•
If you specify some ports but not an MSTI, this command displays the spanning tree information of
all MSTIs on the specified ports. The displayed information is sorted by MSTI ID and by port name
in each MSTI.
•
If you specify both an MSTI ID and a port list, this command displays the spanning tree information
on the specified ports in the specified MSTI. The displayed information is sorted by port name.
In PVST mode, follow these guidelines:
•
If you do not specify any VLAN or port, this command displays the spanning tree information of all
VLANs on all ports. The displayed information is sorted by VLAN ID and by port name in each
VLAN.
•
If you specify a VLAN but not a port, this command displays the spanning tree information on all
ports in that VLAN. The displayed information is sorted by port name.
•
If you specify some ports but not any VLAN, this command displays the spanning tree information
of all VLANs on the specified ports. The displayed information is sorted by VLAN ID and by port
name in each VLAN.
•
If you specify both a VLAN ID and a port list, this command displays the spanning tree information
on the specified ports in the specified VLAN. The displayed information is sorted by port name.
Examples
# In MSTP mode, display the brief spanning tree status and statistics information of MSTI 0 on ports
GigabitEthernet 1/0/1 through GigabitEthernet 1/0/4.
<Sysname> display stp instance 0 interface gigabitethernet 1/0/1 to gigabitethernet 1/0/4
brief
MSTID
Port
Role
STP State
Protection
0
GigabitEthernet1/0/1
ALTE
DISCARDING
LOOP
0
GigabitEthernet1/0/2
DESI
FORWARDING
NONE
89
0
GigabitEthernet1/0/3
DESI
FORWARDING
NONE
0
GigabitEthernet1/0/4
DESI
FORWARDING
NONE
# In PVST mode, display the brief spanning tree status and statistics of VLAN 2 on ports GigabitEthernet
1/0/1 through GigabitEthernet 1/0/4.
<Sysname> system-view
[Sysname] stp mode pvst
[Sysname] display stp vlan 2 interface gigabitethernet 1/0/1 to gigabitethernet 1/0/4 brief
VLAN
Port
Role
STP State
Protection
2
GigabitEthernet1/0/1
ALTE
DISCARDING
LOOP
2
GigabitEthernet1/0/2
DESI
FORWARDING
NONE
2
GigabitEthernet1/0/3
DESI
FORWARDING
NONE
2
GigabitEthernet1/0/4
DESI
FORWARDING
NONE
Table 23 Command output
Field
Description
MSTID
MSTI ID in the MST region.
Port
Port name, corresponding to each MSTI or VLAN.
Port role:
•
•
•
•
•
•
Role
ALTE—The port is an alternate port.
BACK—The port is a backup port.
ROOT—The port is a root port.
DESI—The port is a designated port.
MAST—The port is a master port.
DISA—The port is disabled.
Spanning tree status on the port:
• FORWARDING—The port can receive and send BPDUs, and also forward
user traffic.
STP State
• DISCARDING—The port can receive and send BPDUs, but cannot forward
user traffic.
• LEARNING—The port is in a transitional state. It can receive and send
BPDUs, but cannot forward user traffic.
Protection type on the port:
•
•
•
•
•
Protection
ROOT—Root guard.
LOOP—Loop guard.
BPDU—BPDU guard.
BPDU/ROOT—BPDU guard and root guard.
NONE—No protection.
# In MSTP mode, display the spanning tree status and statistics information of all MSTIs on all ports.
<Sysname> display stp
-------[CIST Global Info][Mode MSTP]------CIST Bridge
:32768.000f-e200-2200
Bridge Times
:Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC
:0.00e0-fc0e-6554 / 200200
CIST RegRoot/IRPC
:32768.000f-e200-2200 / 0
CIST RootPortId
:128.48
90
BPDU-Protection
:disabled
Bridge ConfigDigest-Snooping
:disabled
TC or TCN received
:2
Time since last TC
:0 days 0h:5m:42s
----[Port1(GigabitEthernet1/0/1)][FORWARDING]---Port Protocol
:enabled
Port Role
:CIST Designated Port
Port Priority
:128
Port Cost(Legacy)
:Config=auto / Active=200
Desg. Bridge/Port
:32768.000f-e200-2200 / 128.2
Port Edged
:Config=disabled / Active=disabled
Point-to-point
:Config=auto / Active=true
Transmit Limit
:10 packets/hello-time
Protection Type
:None
MST BPDU Format
:Config=auto / Active=legacy
Port ConfigDigest-Snooping
:disabled
Rapid transition
:false
Num of Vlans Mapped :1
PortTimes
:Hello 2s MaxAge 20s FwDly 15s MsgAge 2s RemHop 20
BPDU Sent
:186
TCN: 0, Config: 0, RST: 0, MST: 186
BPDU Received
:0
TCN: 0, Config: 0, RST: 0, MST: 0
-------[MSTI 1 Global Info]------MSTI Bridge ID
:0.000f-e23e-9ca4
MSTI RegRoot/IRPC
:0.000f-e23e-9ca4 / 0
MSTI RootPortId
:0.0
MSTI Root Type
:PRIMARY root
Master Bridge
:32768.000f-e23e-9ca4
Cost to Master
:0
TC received
:0
# In PVST mode, display the spanning tree status and statistics of all VLANs on all ports.
<Sysname> system-view
[Sysname] stp mode pvst
[Sysname] display stp
-------[VLAN 1 Global Info]------Protocol Status
:enabled
Bridge ID
:32768.000f-e200-2200
Bridge Times
:Hello 2s MaxAge 20s FwDly 15s
Root ID / RPC
:0.00e0-fc0e-6554 / 200200
Root PortId
:128.48
BPDU-Protection
:disabled
TC or TCN received
:2
Time since last TC
:0 days 0h:5m:42s
91
----[Port1(GigabitEthernet1/0/1)][FORWARDING]---Port Protocol
:enabled
Port Role
:Designated Port
Port Priority
:128
Port Cost(Legacy)
:Config=auto / Active=200
Desg. Bridge/Port
:32768.000f-e200-2200 / 128.2
Port Edged
:Config=disabled / Active=disabled
Point-to-point
:Config=auto / Active=true
Transmit Limit
:10 packets/hello-time
Protection Type
:None
Rapid transition
:false
PortTimes
:Hello 2s MaxAge 20s FwDly 15s MsgAge 2s
BPDU Sent
:186
TCN: 0, Config: 0, RST: 0
BPDU Received
:0
TCN: 0, Config: 0, RST: 0, MST: 0
-------[VLAN 2 Global Info]------Protocol Status
:enabled
Bridge ID
:32768.000f-e200-2200
Bridge Times
:Hello 2s MaxAge 20s FwDly 15s
Root ID / RPC
:0.00e0-fc0e-6554 / 200200
Root PortId
:128.48
BPDU-Protection
:disabled
TC or TCN received
:2
Time since last TC
:0 days 0h:5m:42s
# Display the spanning tree status and statistics when the spanning tree feature is disabled.
<Sysname> display stp
Protocol Status
:disabled
Protocol Std.
:IEEE 802.1s
Version
:3
Bridge-Prio.
:32768
MAC address
:000f-e200-8048
Max age(s)
:20
Forward delay(s)
:15
Hello time(s)
:2
Max hops
:20
Table 24 Command output
Field
Description
CIST Bridge
CIST bridge ID, which comprises the device's priority in the CIST and its MAC
address. For example, in output "32768.000f-e200-2200", the value preceding
the dot is the device's priority in the CIST, and the value following the dot is the
device's MAC address.
92
Field
Description
Bridge ID
Bridge ID, which comprises the device's priority in VLAN 1 and its MAC address.
For example, in output "32768.000f-e200-2200", the value preceding the dot is
the device's priority in VLAN 1, and the value following the dot is the device's
MAC address.
Major parameters for the bridge:
Bridge Times
•
•
•
•
Hello—Hello timer.
MaxAge—Max age timer.
FwDly—Forward delay timer.
MaxHop—Max hops within the MST region.
CIST Root/ERPC
CIST root ID and external path cost (the path cost from the device to the CIST root).
CIST RegRoot/IRPC
CIST regional root ID and internal path cost (the path cost from the device to the
CIST regional root).
Root ID / RPC
VLAN root ID and root path cost (the path cost from the device to the root).
CIST RootPortId
CIST root port ID. The "0.0" indicates that the device is the root, and there is no
root port.
Root PortId
VLAN root port ID. The "0.0" indicates that the device is the root, and there is no
root port.
BPDU-Protection
Global status of BPDU protection.
Bridge ConfigDigest-Snooping
Global status of digest snooping.
TC or TCN received
Number of TC/TCN BPDUs received in the MSTI or VLAN.
Time since last TC
Time after the latest topology change in the MSTI or VLAN.
[FORWARDING]
The port is in forwarding state.
[DISCARDING]
The port is in discarding state.
[LEARNING]
The port is in learning state.
Port Protocol
Status of the spanning tree feature on the port.
Port role:
Port Role
Port Cost(Legacy)
•
•
•
•
•
•
Alternate.
Backup.
Root.
Designated.
Master.
Disabled.
Path cost of the port. The field in parentheses indicates the standard (legacy,
dot1d-1998, or dot1t) used for port path cost calculation.
• Config—Configured value.
• Active—Actual value.
Designated bridge ID and port ID of the port.
Desg. Bridge/Port
The port ID displayed is insignificant for a port which does not support port
priority.
93
Field
Description
The port is an edge port or non-edge port.
Port Edged
• Config—Configured value.
• Active—Actual value.
Point-to-point
• Config—Configured value.
• Active—Actual value.
Transmit Limit
Maximum number of packets sent within each hello time.
The port is connected to a point-to-point link or not.
Protection type on the port:
Protection Type
•
•
•
•
•
Root—Root guard.
Loop—Loop guard.
BPDU—BPDU guard.
BPDU/ROOT—BPDU guard and root guard.
None—No protection.
Format of the MST BPDUs that the port can send, which can be legacy or 802.1s.
MST BPDU Format
Port ConfigDigest-Snooping
• Config—Configured value.
• Active—Actual value.
Status of digest snooping on the port.
Rapid transition
The port rapidly transits to the forwarding state or not in the MSTI or VLAN.
Num of Vlans Mapped
Number of VLANs mapped to the MSTI.
Major parameters for the port:
PortTimes
•
•
•
•
•
Hello—Hello timer.
MaxAge—Max Age timer.
FwDly—Forward delay timer.
MsgAge—Message Age timer.
RemHop—Remaining hops.
BPDU Sent
Statistics on sent BPDUs.
BPDU Received
Statistics on received BPDUs.
MSTI RegRoot/IRPC
MSTI regional root/internal path cost.
MSTI RootPortId
MSTI root port ID.
MSTI Root Type
MSTI root type, primary root or secondary root.
Master Bridge
MSTI root bridge ID.
Cost to Master
Path cost from the MSTI to the master bridge.
TC received
Number of received TC BPDUs.
Protocol Status
Spanning tree protocol status.
Protocol Std.
Spanning tree protocol standard.
Version
Spanning tree protocol version.
Bridge-Prio.
In MSTP mode, this field indicates the device's priority in the CIST. In PVST mode,
this field indicates the device's priority in VLAN 1.
94
Field
Description
Max age(s)
Aging timer (in seconds) for BPDUs. In PVST mode, this field is the configuration
in VLAN 1.
Forward delay(s)
Port state transition delay (in seconds). In PVST mode, this field is the
configuration in VLAN 1.
Hello time(s)
Interval (in seconds) for the root bridge to send BPDUs. In PVST mode, this field is
the configuration in VLAN 1.
Max hops
Maximum hops in the MSTI.
Related commands
reset stp
display stp abnormal-port
Use display stp abnormal-port to display information about ports blocked by spanning tree protection
functions.
Syntax
display stp abnormal-port [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# In MSTP mode, display information about ports blocked by spanning tree protection functions.
<Sysname> display stp abnormal-port
MSTID
Blocked Port
Reason
1
GigabitEthernet1/0/1
ROOT-Protected
2
GigabitEthernet1/0/2
LOOP-Protected
2
GigabitEthernet1/0/3
Formatcompatibility–Protected
# In PVST mode, display information about ports blocked by spanning tree protection functions.
<Sysname> system-view
[Sysname] stp mode pvst
[Sysname] display stp abnormal-port
VLAN
1
Blocked Port
Reason
GigabitEthernet1/0/1
ROOT-Protected
95
2
GigabitEthernet1/0/2
LOOP-Protected
2
GigabitEthernet1/0/3
Formatcompatibility–Protected
Table 25 Command output
Field
Description
Blocked Port
Name of a blocked port, which corresponds to the related MSTI or VLAN.
Reason that the port was blocked:
Reason
• ROOT-Protected—Root guard function.
• LOOP-Protected—Loop guard function.
• Formatcompatibility-Protected—MSTP BPDU format incompatibility protection
function.
• InconsistentPortType-Protected—Port type inconsistent protection function.
• InconsistentPvid-Protected—PVID inconsistent protection function.
display stp bpdu-statistics
Use display stp bpdu-statistics to display the BPDU statistics on ports.
Syntax
display stp bpdu-statistics [ interface interface-type interface-number [ instance instance-id ] ] [ | { begin
| exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
interface interface-type interface-number: Displays the BPDU statistics on the specified port, where
interface-type interface-number indicates the port type and number.
instance instance-id: Displays the BPDU statistics of the specified MSTI on the specified port. The value
range for the instance-id argument is 0 to 31, and 0 represents the CIST.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
In MSTP mode, follow these guidelines:
•
If you do not specify any MSTI or port, this command displays the BPDU statistics of all MSTIs on all
ports. The displayed information is sorted by port name and by MSTI ID on each port.
•
If you specify a port but not an MSTI, this command displays the BPDU statistics of all MSTIs on the
port. The displayed information is sorted by MSTI ID.
96
•
If you specify both an MSTI ID and a port, this command displays the BPDU statistics of the specified
MSTI on the port.
In STP, RSTP, or PVST mode, follow these guidelines:
•
If you do not specify any port, this command displays the BPDU statistics of on all ports. The
displayed information is sorted by port name.
•
If you specify a port, this command displays the BPDU statistics on the port.
Examples
# In MSTP mode, display the BPDU statistics of all MSTIs on GigabitEthernet 1/0/1.
<Sysname> display stp bpdu-statistics interface gigabitethernet 1/0/1
Port: GigabitEthernet1/0/1
Instance-independent:
Type
Count
Last Updated
--------------------------- ---------- ----------------Invalid BPDUs
0
Looped-back BPDUs
0
MAX-aged BPDUs
0
TCN sent
0
TCN received
0
TCA sent
0
TCA received
2
Config sent
0
Config received
0
RST sent
0
RST received
0
MST sent
4
10:33:11 01/13/2010
MST received
151
10:37:43 01/13/2010
Count
Last Updated
10:33:12 01/13/2010
Instance 0:
Type
--------------------------- ---------- ----------------Timeout BPDUs
0
MAX-hoped BPDUs
0
TC detected
1
10:32:40 01/13/2010
TC sent
3
10:33:11 01/13/2010
TC received
0
Instance 1:
Type
Count
Last Updated
--------------------------- ---------- ----------------Timeout BPDUs
0
MAX-hoped BPDUs
0
TC detected
0
TC sent
0
97
TC received
0
Instance 2:
Type
Count
Last Updated
--------------------------- ---------- ----------------Timeout BPDUs
0
MAX-hoped BPDUs
0
TC detected
0
TC sent
0
TC received
0
# In PVST mode, display the BPDU statistics on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] stp mode pvst
[Sysname] display stp bpdu-statistics interface gigabitethernet 1/0/1
Port: GigabitEthernet1/0/1
Type
Count
Last Updated
--------------------------- ---------- ----------------Invalid BPDUs
0
Looped-back BPDUs
0
MAX-aged BPDUs
0
TCN sent
0
TCN received
0
TCA sent
0
TCA received
2
Config sent
0
Config received
0
RST sent
0
RST received
0
MST sent
4
10:33:11 01/13/2010
MST received
151
10:37:43 01/13/2010
Timeout BPDUs
0
MAX-hoped BPDUs
0
TC detected
511
10:32:40 01/13/2010
TC sent
8844
10:33:11 01/13/2010
TC received
1426
10:33:32 01/13/2010
10:33:12 01/13/2010
Table 26 Command output
Field
Description
Port
Port name.
Instance-independent
Statistics not related to any particular MSTI.
Type
Statistical item.
Looped-back BPDUs
BPDUs sent and then received by the same port.
Max-Aged BPDUs
BPDUs whose max age was exceeded.
TCN Sent
TCN BPDUs sent.
98
Field
Description
TCN Received
TCN BPDUs received.
TCA Sent
TCA BPDUs sent.
TCA Received
TCA BPDUs received.
Config Sent
Configuration BPDUs sent.
Config Received
Configuration BPDUs received.
RST Sent
RSTP BPDUs sent.
RST Received
RSTP BPDUs received.
MST Sent
MSTP BPDUs sent.
MST Received
MSTP BPDUs received.
Instance
Statistical information for a particular MSTI.
Timeout BPDUs
Expired BPDUs.
Max-Hoped BPDUs
BPDUs whose maximum hops were exceeded.
TC Detected
TC BPDUs detected.
TC Sent
TC BPDUs sent.
TC Received
TC BPDUs received.
display stp down-port
Use display stp down-port to display information about ports shut down by spanning tree protection
functions.
Syntax
display stp down-port [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display information about ports shut down by spanning tree protection functions.
<Sysname> display stp down-port
Down Port
Reason
99
GigabitEthernet1/0/1
BPDU-Protected
GigabitEthernet1/0/2
Formatfrequency-Protected
Table 27 Command output
Field
Description
Down Port
Name of a port shut down by the spanning tree protection functions.
Reason that the port was shut down:
Reason
• BPDU-Protected—BPDU guard function.
• Formatfrequency-Protected—MSTP BPDU format frequent change protection function.
display stp history
Use display stp history to display the historical port role calculation information for the specified MSTI or
all MSTIs.
Syntax
display stp [ instance instance-id | vlan vlan-id ] history [ slot slot-number ] [ | { begin | exclude |
include } regular-expression ]
Views
Any view
Default command level
0: Visit level
Parameters
instance instance-id: Displays the historical port role calculation information for a specific MSTI. The
value range for the instance-id argument is 0 to 31, and 0 represents the CIST.
vlan vlan-id: Displays the historical port role calculation information for a specific VLAN. The value range
for the vlan-id argument is 1 to 4094.
slot slot-number: Displays the historical port role calculation information on the specified IRF member
device. The slot-number argument represents the ID of the IRF member device. If this argument is not
specified, this command displays historical port role calculation information on all member devices in the
IRF fabric.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
In STP or RSTP mode, the displayed information is sorted by port role calculation time.
In MSTP mode, follow these guidelines:
100
•
If you do not specify any MSTI, this command displays the historical port role calculation
information for all MSTIs. The displayed information is sorted by MSTI ID and by port role
calculation time in each MSTI.
•
If you specify an MSTI, this command displays the historical port role calculation information for the
specified MSTI by the sequence of port role calculation time.
In PVST mode, follow these guidelines:
•
If you do not specify any VLAN, this command displays the historical port role calculation
information for all VLANs. The displayed information is sorted by VLAN ID and by port role
calculation time in each VLAN.
•
If you specify a VLAN, this command displays the historical port role calculation information for the
specified VLAN by the sequence of port role calculation time.
Examples
I# In MSTP mode, display the historical port role calculation information for IRF member device 1 in
MSTI 2.
•
<Sysname> display stp instance 2 history slot 1
--------------- STP slot 1 history trace ---------------------------------
Instance 2
---------------------
Port Ethernet1/1
Role change
: ROOT->DESI (Aged)
Time
: 2009/02/08 00:22:56
Port priority : 0.00e0-fc01-6510 0 0.00e0-fc01-6510 128.1
Port Ethernet1/2
Role change
: ALTER->ROOT
Time
: 2009/02/08 00:22:56
Port priority : 0.00e0-fc01-6510 0 0.00e0-fc01-6510 128.2
# In PVST mode, display the historical port role calculation information for IRF member device 1 in
VLAN 2.
<Sysname> system-view
[Sysname] stp mode pvst
[Sysname] display stp vlan 2 history slot 1
--------------- STP slot 1 history trace ---------------------------------
VLAN 2
---------------------
Port Ethernet1/1
Role change
: ROOT->DESI (Aged)
Time
: 2009/02/08 00:22:56
Port priority : 0.00e0-fc01-6510 0 0.00e0-fc01-6510 128.1
Port Ethernet1/2
Role change
: ALTER->ROOT
Time
: 2009/02/08 00:22:56
Port priority : 0.00e0-fc01-6510 0 0.00e0-fc01-6510 128.2
Table 28 Command output
Field
Description
Port
Port name.
Role change
Role change of the port. When the change was caused by expiration of the received
configuration BPDU, this field displays Age).
101
Field
Description
Time
Time of port role calculation.
Port priority
Port priority.
display stp ignored-vlan
Use display stp ignored-vlan to display VLAN ignore-enabled VLANs.
Syntax
display stp ignored-vlan [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display VLAN ignore-enabled VLANs.
<Sysname> display stp ignored-vlan
STP-Ignored VLAN: 1 to 2
Table 29 Command output
Field
Description
STP-Ignored VLAN
List of VLAN ignore-enabled VLANs. A value of NONE for this field indicates
that no VLAN is enabled with the VLAN ignore feature.
display stp region-configuration
Use display stp region-configuration to display the effective configuration information of the MST region,
including the region name, revision level, and user-configured VLAN-to-instance mappings.
Syntax
display stp region-configuration [ | { begin | exclude | include } regular-expression ]
Views
Any view
102
Default command level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# In MSTP mode, display effective MST region configuration information.
<Sysname> display stp region-configuration
Oper Configuration
Format selector
:0
Region name
:hello
Revision level
:0
Configuration digest :0x5f762d9a46311effb7a488a3267fca9f
Instance
Vlans Mapped
0
21 to 4094
1
1 to 10
2
11 to 20
# In PVST mode, display the effective MST region configuration information.
<Sysname> system-view
[Sysname] stp mode pvst
[Sysname] display stp region-configuration
Oper Configuration
Format selector
:0
Region name
:hello
Revision level
:0
Configuration digest :0x5f762d9a46311effb7a488a3267fca9f
Instance
Mode
Vlans Mapped
0
default
3 to 4094
1
static
1
2
dynamic
2
Table 30 Command output
Field
Description
Format selector
Format selector defined by the spanning tree protocol. The default value is 0
and the selector cannot be configured.
Region name
MST region name.
Revision level
Revision level of the MST region, which can be configured by using the
revision-level command and defaults to 0.
103
Field
Description
MSTI mode:
• Default—Default instance MSTI 0. In PVST mode, the spanning tree
feature is disabled.
Mode
• Static—Static MSTI.
• Dynamic—Dynamically assigned MSTI, which only exists in PVST mode.
Related commands
•
instance
•
region-name
•
revision-level
•
vlan-mapping modulo
display stp root
Use display stp root to display the root bridge information of all MSTIs.
Syntax
display stp root [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# In MSTP mode, display the root bridge information of all spanning trees.
<Sysname> display stp root
MSTID
0
Root Bridge ID
ExtPathCost IntPathCost Root Port
0.00e0-fc0e-6554
200200
0
GigabitEthernet1/0/1
# In PVST mode, display the root bridge information of all spanning trees.
<Sysname> system-view
[Sysname] stp mode pvst
[Sysname] display stp root
VLAN
1
Root Bridge ID
ExtPathCost IntPathCost Root Port
0.00e0-fc0e-6554
200200
0
104
GigabitEthernet1/0/1
Table 31 Command output
Field
Description
ExtPathCost
External path cost. The device automatically calculates the default path cost of a
port. Otherwise, you can use the stp cost command to configure the path cost of
a port.
IntPathCost
Internal path cost. The device automatically calculates the default path cost of a
port. Otherwise, you can use the stp cost command to configure the path cost of
a port.
Root Port
Root port name (displayed only if a port of the device is the root port of MSTIs).
display stp tc
Use display stp tc to display the statistics of TC/TCN BPDUs received and sent by all ports in an MSTI or
all MSTIs.
Syntax
display stp [ instance instance-id | vlan vlan-id ] tc [ slot slot-number ] [ | { begin | exclude | include }
regular-expression ]
Views
Any view
Default command level
0: Visit level
Parameters
instance instance-id: Displays the statistics of TC/TCN BPDUs received and sent by all ports in a
particular MSTI. The value range for the instance-id argument is 0 to 31, and 0 represents the CIST.
vlan vlan-id: Displays the statistics of TC/TCN BPDUs received and sent by all ports in the specified
VLAN. The value range for the vlan-id argument is 1 to 4094.
slot slot-number: Displays the statistics of TC/TCN BPDUs received and sent by all ports in the specified
MSTI on the specified IRF member device. The slot-number argument represents the ID of the IRF member
device. If this argument is not specified, this command displays statistics of TC/TCN BPDUs received and
sent by all ports in the specified MSTI on all member devices in the IRF fabric.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
In STP or RSTP mode, the displayed information is sorted by port name.
In MSTP mode, follow these guidelines:
105
•
If you do not specify any MSTI, this command displays the statistics of TC/TCN BPDUs received and
sent by all ports in all MSTIs. The displayed information is sorted by instance ID and by port name
in each MSTI.
•
If you specify an MSTI, this command displays the statistics of TC/TCN BPDUs received and sent by
all ports in the specified MSTI in port name order.
In PVST mode, follow these guidelines:
•
If you do not specify any VLAN, this command displays the statistics of TC/TCN BPDUs received
and sent by all ports in all VLANs. The displayed information is sorted by VLAN ID and by port
name in each VLAN.
•
If you specify a VLAN, this command displays the statistics of TC/TCN BPDUs received and sent by
all ports in the specified VLAN in port name order.
Examples
# In MSTP mode, display the statistics of TC/TCN BPDUs received and sent by all ports on IRF
member device 1 in MSTI 0.
<Sysname> display stp instance 0 tc slot 1
-------------- STP slot 1 TC or TCN count ------------MSTID
Port
Receive
Send
0
Ethernet1/1
6
4
0
Ethernet1/2
0
2
# In PVST mode, display the statistics of TC/TCN BPDUs received and sent by all ports on IRF
member device 1 in VLAN 2.
<Sysname> system-view
[Sysname] stp mode pvst
[Sysname] display stp vlan 2 tc slot 1
-------------- STP slot 1 TC or TCN count ------------VLAN
Port
Receive
Send
2
Ethernet1/1
6
4
2
Ethernet1/2
0
2
Table 32 Command output
Field
Description
Port
Port name.
Receive
Number of TC/TCN BPDUs received on each port.
Send
Number of TC/TCN BPDUs sent by each port.
instance
Use instance to map a list of VLANs to the specified MSTI.
Use undo instance to re-map the specified VLAN or all VLANs to the CIST (MSTI 0).
Syntax
instance instance-id vlan vlan-list
undo instance instance-id [ vlan vlan-list ]
106
Default
All VLANs are mapped to the CIST.
Views
MST region view
Default command level
2: System level
Parameters
instance-id: Specifies an MSTI ID. The value range for the instance-id argument is 0 to 31 in MSTP mode,
and 0 to 64 in PVST mode. 0 represents the CIST.
vlan vlan-list: Specifies a VLAN list in the format of vlan-list = { vlan-id [ to vlan-id ] }&<1-10>, where the
vlan-id argument represents the VLAN ID in the range of 1 to 4094, and &<1-10> indicates that you can
specify up to 10 VLAN IDs or VLAN ID ranges.
Usage guidelines
If you specify no VLAN in the undo instance command, all VLANs mapped to the specified MSTI are
re-mapped to the CIST.
You cannot map the same VLAN to different MSTIs. If you map a VLAN that has been mapped to an MSTI
to a new MSTI, the old mapping is automatically removed.
In PVST mode, you can map multiple VLANs to the CIST, and only one VLAN to each remaining MSTI.
After configuring this command, use the active region-configuration command to activate the
VLAN-to-instance mapping.
Examples
# Map VLAN 2 to MSTI 1.
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region] instance 1 vlan 2
Related commands
•
display stp region-configuration
•
check region-configuration
•
active region-configuration
region-name
Use region-name to configure the MST region name.
Use undo region-name to restore the default MST region name.
Syntax
region-name name
undo region-name
Default
The MST region name of a device is its MAC address.
107
Views
MST region view
Default command level
2: System level
Parameters
name: Specifies the MST region name, a string of 1 to 32 characters.
Usage guidelines
The MST region name, the VLAN-to-instance mapping table, and the MSTP revision level of a device
determine the device's MST region.
After configuring this command, use the active region-configuration command to activate the configured
MST region name.
Examples
# Set the MST region name of the device to hello.
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region] region-name hello
Related commands
•
instance
•
revision-level
•
vlan-mapping modulo
•
display stp region-configuration
•
check region-configuration
•
active region-configuration
reset stp
Use reset stp to clear the MSTP statistics information.
Syntax
reset stp [ interface interface-list ]
Views
User view
Default command level
1: Monitor level
Parameters
interface interface-list: Clears the MSTP statistics of the ports specified in the format of interface-list =
{ interface-type interface-number [ to interface-type interface-number ] }&<1-10>, where &<1-10>
indicates that you can specify up to 10 ports or port ranges. If you do not specify this option, the
command clears the spanning tree-related statistics on all ports.
108
Usage guidelines
The MSTP statistics information includes the numbers of TCN BPDUs, configuration BPDUs, RST BPDUs
and MST BPDUs sent/received through the specified ports.
Examples
# Clear the spanning tree-related statistics on ports GigabitEthernet 1/0/1 through GigabitEthernet
1/0/3.
<Sysname> reset stp interface gigabitethernet 1/0/1 to gigabitethernet 1/0/3
Related commands
display stp
revision-level
Use revision-level to configure the MSTP revision level.
Use undo revision-level to restore the default MSTP revision level.
Syntax
revision-level level
undo revision-level
Default
The MSTP revision level is 0.
Views
MST region view
Default command level
2: System level
Parameters
level: Specifies an MSTP revision level in the range of 0 to 65535.
Usage guidelines
The MSTP revision level, the MST region name, and the VLAN-to-instance mapping table of a device
determine the device's MST region. When the MST region name and VLAN-to-instance mapping table
are both the same for two MST regions, they can still be differentiated by their MSTP revision levels.
After configuring this command, use the active region-configuration command to activate the configured
MST region level.
Examples
# Set the MSTP revision level of the MST region to 5.
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region] revision-level 5
Related commands
•
instance
•
region-name
•
vlan-mapping modulo
109
•
display stp region-configuration
•
check region-configuration
•
active region-configuration
stp bpdu-protection
Use stp bpdu-protection to enable the BPDU guard function.
Use undo stp bpdu-protection to disable the BPDU guard function.
Syntax
stp bpdu-protection
undo stp bpdu-protection
Default
The BPDU guard function is disabled.
Views
System view
Default command level
2: System level
Examples
# Enable the BPDU guard function.
<Sysname> system-view
[Sysname] stp bpdu-protection
stp bridge-diameter
Use stp bridge-diameter to specify the network diameter, the maximum possible number of stations
between any two terminal devices on the switched network.
Use undo stp bridge-diameter to restore the default.
Syntax
stp [ vlan vlan-list ] bridge-diameter diameter
undo stp [ vlan vlan-list ] bridge-diameter
Default
The network diameter of the switched network is 7.
Views
System view
Default command level
2: System level
Parameters
vlan vlan-list: Specifies a VLAN list in the format of vlan-list = { vlan-id [ to vlan-id ] }&<1-10>, where the
vlan-id argument represents the VLAN ID in the range of 1 to 4094, and &<1-10> indicates that you can
specify up to 10 VLAN IDs or VLAN ID ranges.
110
diameter: Specifies the switched network diameter in the range of 2 to 7.
Usage guidelines
An appropriate setting of hello time, forward delay, and max age can speed up network convergence.
The values of these timers are related to the network size, and you can set the timers by setting the
network diameter. With the network diameter set to 7 (the default), the three timers are also set to their
defaults.
To set the network diameter of an STP/RSTP/MSTP switched network, use this command without
specifying any VLAN. To set the network diameter of the specified VLAN or multiple VLANs in a PVST
switched network, use this command with a VLAN list specified.
In STP, RSTP, or MSTP mode, each MST region is considered as a device, and the configured network
diameter of the switched network is only effective on the CIST (or the common root bridge) but not on
other MSTIs.
In PVST mode, the network diameter configuration takes effect only on the root bridge.
Examples
# In MSTP mode, set the network diameter of the switched network to 5.
<Sysname> system-view
[Sysname] stp bridge-diameter 5
# In PVST mode, set the network diameter of VLAN 2 to 5.
<Sysname> system-view
[Sysname] stp mode pvst
[Sysname] stp vlan 2 bridge-diameter 5
Related commands
•
stp timer forward-delay
•
stp timer hello
•
stp timer max-age
stp compliance
Use stp compliance to configure the mode the specified ports use to recognize and send MSTP BPDUs.
Use undo stp compliance to restore the default.
Syntax
stp compliance { auto | dot1s | legacy }
undo stp compliance
Default
A port automatically recognizes the formats of received MSTP packets and determines the formats of
MSTP packets to be sent based on the recognized formats.
Views
Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
111
Parameters
auto: Configures the ports to recognize the MSTP BPDU format automatically and determine the format
of MSTP BPDUs to send.
dot1s: Configures the ports to receive and send only standard-format (802.1s-compliant) MSTP BPDUs.
legacy: Configures the ports to receive and send only compatible-format MSTP BPDUs.
Usage guidelines
Configured in Ethernet interface view, the setting takes effect only on that interface.
Configured in Layer 2 aggregate interface view, the setting takes effect only on the aggregate interface.
Configured on a member port in an aggregation group, the setting takes effect only after the port leaves
the aggregation group.
Examples
# Configure GigabitEthernet 1/0/1 to receive and send only standard-format (802.1s) MSTP packets.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] stp compliance dot1s
stp config-digest-snooping
Use stp config-digest-snooping to enable digest snooping.
Use undo stp config-digest-snooping to disable digest snooping.
Syntax
stp config-digest-snooping
undo stp config-digest-snooping
Default
The feature is disabled by default.
Views
System view, Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Usage guidelines
Configured in system view, the setting takes effect globally.
Configured in Ethernet interface view, the setting takes effect only on the interface.
Configured in Layer 2 aggregate interface view, the setting takes effect only on the aggregate interface.
Configured on a member port in an aggregation group, the setting takes effect only after the port leaves
the aggregation group.
Enable this feature both globally and on ports connected to other vendors' devices to make it effective.
To minimize impact, enable the feature on all associated ports before you enable it globally.
When digest snooping is globally enabled, if you modify the VLAN-to-instance mapping or use the undo
stp region-configuration command to restore the default MST region configuration, traffic may be
112
interrupted because the local VLAN-to-instance mapping is different from that on a neighbor device.
Perform these operations with caution.
Examples
# Enable digest snooping on GigabitEthernet 1/0/1 and then globally.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] stp config-digest-snooping
[Sysname-GigabitEthernet1/0/1] quit
[Sysname] stp config-digest-snooping
Related commands
display stp
stp cost
Use stp cost to set the path cost of the port or ports.
Use undo stp cost to restore the default.
Syntax
stp [ instance instance-id | vlan vlan-list ] cost cost
undo stp [ instance instance-id | vlan vlan-list ] cost
Default
The device automatically calculates the path costs of ports in each spanning tree based on the
corresponding standard.
Views
Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Parameters
instance instance-id: Sets the path cost of the ports in a particular MSTI. The value range for the
instance-id argument is 0 to 31, and 0 represents the CIST.
vlan vlan-list: Specifies a VLAN list in the format of vlan-list = { vlan-id [ to vlan-id ] }&<1-10>, where the
vlan-id argument represents the VLAN ID in the range of 1 to 4094, and &<1-10> indicates that you can
specify up to 10 VLAN IDs or VLAN ID ranges.
cost: Specifies the path cost of the port, with an effective range that depends on the path cost calculation
standard adopted.
•
With the IEEE 802.1d-1998 standard selected for path cost calculation, the value range for the cost
argument is 1 to 65535.
•
With the IEEE 802.1t standard selected for path cost calculation, the value range for the cost
argument is 1 to 200000000.
•
With the private standard selected for path cost calculation, the value range for the cost argument
is 1 to 200000.
Usage guidelines
Configured in Ethernet interface view, the setting takes effect only on the interface.
113
Configured in Layer 2 aggregate interface view, the setting takes effect only on the aggregate interface.
Configured on a member port in an aggregation group, the setting takes effect only after the port leaves
the aggregation group.
To set the path cost of an MSTP port in a specific MSTI, use this command with the MSTI specified. To set
the path cost of a PVST port in a specific VLAN, use this command with the VLAN specified. To set the
path cost of an MSTP port in the CIST or an STP or RSTP port, use this command without specifying any
MSTI and VLAN.
Path cost is an important factor in spanning tree calculation. Setting different path costs for a port in
MSTIs allows different VLAN traffic flows to be forwarded along different physical links and enables
VLAN-based load balancing.
The path cost setting of a port can affect the role selection of the port. When the path cost of a port is
changed, the system re-calculates the role of the port and initiates a state transition.
Examples
# In MSTP mode, set the path cost of port GigabitEthernet 1/0/3 in MSTI 2 to 200.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/3
[Sysname-GigabitEthernet1/0/3] stp instance 2 cost 200
# In PVST mode, set the path cost of port GigabitEthernet 1/0/3 in VLAN 2 to 200.
<Sysname> system-view
[Sysname] stp mode pvst
[Sysname] interface gigabitethernet 1/0/3
[Sysname-GigabitEthernet1/0/3] stp vlan 2 cost 200
Related commands
•
display stp
•
stp pathcost-standard
stp edged-port
Use stp edged-port enable to configure one or more ports as edge ports.
Use stp edged-port disable to configure one or more ports as non-edge ports.
Use undo stp edged-port to restore the default.
Syntax
stp edged-port { enable | disable }
undo stp edged-port
Default
All ports are non-edge ports.
Views
Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Parameters
enable: Configures one or more ports as edge ports.
114
disable: Configures one or more ports as non-edge ports.
Usage guidelines
Configured in Ethernet interface view, the setting takes effect only on the interface.
Configured in Layer 2 aggregate interface view, the setting takes effect only on the aggregate interface.
Configured on a member port in an aggregation group, the setting takes effect only after the port leaves
the aggregation group.
If a port directly connects to a user terminal rather than another device or a shared LAN segment, this
port is regarded as an edge port. When the network topology changes, an edge port does not cause a
temporary loop. You can enable the port to transit to the forwarding state rapidly by configuring it as an
edge port. HP recommends that you configure ports directly connecting to user terminals as edge ports.
Typically, configuration BPDUs from other devices cannot reach an edge port, because the edge port
does not connect to any other device. If a port receives a configuration BPDU when the BPDU guard
function is disabled, the port functions as a non-edge port, even if you configure it as an edge port.
You cannot configure edge port settings and loop guard on a port at the same time.
Examples
# Configure GigabitEthernet 1/0/1 as an edge port.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] stp edged-port enable
Related commands
stp loop-protection
stp enable
Use stp enable to enable the spanning tree feature.
Use undo stp enable to disable the spanning tree feature.
Syntax
In system view:
stp [ vlan vlan-list ] enable
undo stp [ vlan vlan-list ] enable
In Ethernet interface, Layer 2 aggregate interface:
stp enable
undo stp enable
Default
The spanning tree feature is globally disabled, but is enabled on all ports and in all VLANs.
Views
System view, Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
115
Parameters
vlan vlan-list: Specifies a VLAN list in the format of vlan-list = { vlan-id [ to vlan-id ] }&<1-10>, where the
vlan-id argument represents the VLAN ID in the range of 1 to 4094, and &<1-10> indicates that you can
specify up to 10 VLAN IDs or VLAN ID ranges. If you do not specify this option, this command enables
or disables the spanning tree feature globally (not for any VLAN).
Usage guidelines
Configured in system view, the setting takes effect globally.
Configured in Ethernet interface view, the setting takes effect only on the interface.
Configured in Layer 2 aggregate interface view, the setting takes effect only on the aggregate interface.
Configured on a member port in an aggregation group, the setting takes effect only after the port leaves
the aggregation group.
When you enable the spanning tree feature, the device operates in STP, RSTP, MSTP, or PVST mode,
depending on the spanning tree mode setting.
When you enable the spanning tree feature, the device dynamically maintains the spanning tree status
of VLANs based on received configuration BPDUs.
When you disable the spanning tree feature, the device stops maintaining the spanning tree status.
Examples
# In MSTP mode, enable the spanning tree feature globally.
<Sysname> system-view
[Sysname] stp enable
# In PVST mode, enable the spanning tree feature globally and in VLAN 2.
<Sysname> system-view
[Sysname] stp mode pvst
[Sysname] stp enable
[Sysname] stp vlan 2 enable
# In MSTP mode, disable the spanning tree feature on port GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] undo stp enable
Related commands
stp mode
stp ignored vlan
Use stp ignored vlan to enable VLAN ignore for the specified VLANs.
Use undo stp ignored vlan to disable VLAN ignore for the specified VLANs.
Syntax
stp ignored vlan vlan-list
undo stp ignored vlan vlan-list
Default
VLAN ignore is disabled for a VLAN.
116
Views
System view
Default command level
2: System level
Parameters
vlan vlan-list: Specifies a VLAN list in the format of vlan-list = { vlan-id [ to vlan-id ] }&<1-10>, where the
vlan-id argument represents the VLAN ID in the range of 1 to 4094, and &<1-10> indicates that you can
specify up to 10 VLAN IDs or VLAN ID ranges.
Examples
# Enable VLAN ignore for VLAN 1 through VLAN 10.
<Sysname> system-view
[Sysname] stp ignored vlan 1 to 10
Related commands
display stp ignored-vlan
stp loop-protection
Use stp loop-protection to enable the loop guard function on the ports.
Use undo stp loop-protection to disable the loop guard function on the ports.
Syntax
stp loop-protection
undo stp loop-protection
Default
The loop guard function is disabled.
Views
Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Usage guidelines
Configured in Ethernet interface view, the setting takes effect only on the interface.
Configured in Layer 2 aggregate interface view, the setting takes effect only on the aggregate interface.
Configured on a member port in an aggregation group, the setting takes effect only after the port leaves
the aggregation group.
You cannot configure edge port settings and loop guard, or configure root guard and loop guard on a
port at the same time.
Examples
# Enable the loop guard function on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] stp loop-protection
117
Related commands
•
stp edged-port
•
stp root-protection
stp max-hops
Use stp max-hops to set the maximum hops of the MST region.
Use undo stp max-hops to restore the default.
Syntax
stp max-hops hops
undo stp max-hops
Default
The maximum number of hops of an MST region is 20.
Views
System view
Default command level
2: System level
Parameters
hops: Sets the maximum hops in the range of 1 to 40.
Usage guidelines
The maximum hops limit the size of the MST region.
Examples
# Set the maximum hops of the MST region to 35.
<Sysname> system-view
[Sysname] stp max-hops 35
Related commands
display stp
stp mcheck
Use stp mcheck to perform the mCheck operation globally or on a port.
Syntax
stp mcheck
Views
System view, Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
118
Usage guidelines
If a port on a device that runs MSTP, RSTP, or PVST mode connects to an STP device, the port
automatically transits to the STP mode. It cannot automatically transit back to the original mode when:
•
The STP device is shut down or removed.
•
The STP device transits to the MSTP, RSTP, or PVST mode.
Then, you can perform an mCheck operation to forcibly transit the port to operation in the original mode.
For example, suppose Device B that has no spanning tree feature enabled connects to Device A that is
running STP, and to Device C that is running RSTP, MSTP, or PVST. Device B transparently transmits STP
BPDUs, and the port on Device C and connecting to Device B transit to the STP mode. After you enable
the spanning tree feature on Device B, to run RSTP or MSTP between Device B and Device C, you must
perform an mCheck operation on the ports interconnecting Device B and Device C, in addition to
configuring the spanning tree to operate in RSTP, MSTP, or PVST mode on Device B.
The device operates in STP, RSTP, MSTP, or PVST mode depending on the spanning tree mode setting.
The stp mcheck command is effective only when the device operates in MSTP, RSTP, or PVST mode.
Configured in system view, the setting takes effect globally.
Configured in Ethernet interface view, the setting takes effect only on the interface.
Configured in Layer 2 aggregate interface view, the setting takes effect only on the aggregate interface.
Configured on a member port in an aggregation group, the setting takes effect only after the port leaves
the aggregation group.
Examples
# Perform mCheck on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] stp mcheck
Related commands
stp mode
stp mode
Use stp mode to configure the spanning tree operating mode.
Use undo stp mode to restore the default.
Syntax
stp mode { mstp | pvst | rstp | stp }
undo stp mode
Default
A spanning tree device operates in MSTP mode.
Views
System view
Default command level
2: System level
119
Parameters
mstp: Configures the spanning tree device to operate in MSTP mode.
pvst: Configures the spanning tree device to operate in PVST mode.
rstp: Configures the spanning tree device to operate in RSTP mode.
stp: Configures the spanning tree device to operate in STP mode.
Usage guidelines
The MSTP mode is compatible with the RSTP mode, and the RSTP mode is compatible with the STP mode.
The PVST mode's compatibility with the other spanning tree mode varies by port type:
•
On an access port, the PVST mode is compatible with any other spanning tree mode in any VLAN.
•
On a trunk or hybrid port, the PVST mode is compatible with any other spanning tree mode in only
VLAN 1.
Examples
# Configure the spanning tree device to operate in STP mode.
<Sysname> system-view
[Sysname] stp mode stp
Related commands
•
stp mcheck
•
stp enable
stp no-agreement-check
Use stp no-agreement-check to enable no agreement check on the ports.
Use undo stp no-agreement-check to disable no agreement check on the ports.
Syntax
stp no-agreement-check
undo stp no-agreement-check
Default
No agreement check is disabled.
Views
Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Usage guidelines
Configured in Ethernet interface view, the setting takes effect only on the interface.
Configured in Layer 2 aggregate interface view, the setting takes effect only on the aggregate interface.
Configured on a member port in an aggregation group, the setting takes effect only after the port leaves
the aggregation group.
This feature takes effect only after you enable it on the root port.
120
Examples
# Enable no agreement check on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] stp no-agreement-check
stp pathcost-standard
Use stp pathcost-standard to specify a standard for the device to use when calculating the default path
costs for ports.
Use undo stp pathcost-standard to restore the default.
Syntax
stp pathcost-standard { dot1d-1998 | dot1t | legacy }
undo stp pathcost-standard
Default
The default standard used by the device is legacy.
Views
System view
Default command level
2: System level
Parameters
dot1d-1998: Configures the device to calculate the default path cost for ports based on IEEE
802.1d-1998.
dot1t: Configures the device to calculate the default path cost for ports based on IEEE 802.1t.
legacy: Configures the device to calculate the default path cost for ports based on a private standard.
Usage guidelines
If you change the standard that the device uses in calculating the default path costs, you restore the path
costs to the default.
Examples
# Configure the device to calculate the default path cost for ports based on IEEE 802.1d-1998.
<Sysname> system-view
[Sysname] stp pathcost-standard dot1d-1998
Related commands
•
stp cost
•
display stp
stp point-to-point
Use stp point-to-point to configure the link type of the ports.
Use undo stp point-to-point to restore the default.
121
Syntax
stp point-to-point { auto | force-false | force-true }
undo stp point-to-point
Default
The default setting is auto and the spanning tree device automatically detects whether a port connects to
a point-to-point link.
Views
Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Parameters
auto: Specifies automatic detection of the link type.
force-false: Specifies the non-point-to-point link type.
force-true: Specifies the point-to-point link type.
Usage guidelines
Configured in Ethernet interface view, the setting takes effect only on the interface.
Configured in Layer 2 aggregate interface view, the setting takes effect only on the aggregate interface.
Configured on a member port in an aggregation group, the setting takes effect only after the port leaves
the aggregation group.
When connecting to a non-point-to-point link, a port is incapable of rapid state transition.
You can configure the link type as point-to-point for a Layer 2 aggregate interface or a port that operates
in full duplex mode. HP recommends that you use the default setting to let the device automatically detect
the port link type.
The stp point-to-point force-false or stp point-to-point force-true command configured on a port in MSTP
or PVST mode is effective on all MSTIs or VLANs.
If the physical link to which the port connects is not a point-to-point link but you set it to be one, the
configuration may bring a temporary loop.
Examples
# Configure the link connecting GigabitEthernet 1/0/3 as a point-to-point link.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/3
[Sysname-GigabitEthernet1/0/3] stp point-to-point force-true
Related commands
display stp
stp port priority
Use stp port priority to set the priority of the ports.
Use undo stp port priority to restore the default.
122
Syntax
stp [ instance instance-id | vlan vlan-list ] port priority priority
undo stp [ instance instance-id | vlan vlan-list ] port priority
Default
The port priority is 128.
Views
Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Parameters
instance instance-id: Sets the priority of the ports in a particular MSTI. The value range for the instance-id
argument is 0 to 31, and 0 represents the CIST.
priority: Specifies the port priority. The value range is 0 to 240 in increments of 16 (as indicated by 0, 16,
32).
vlan vlan-list: Specifies a VLAN list in the format of vlan-list = { vlan-id [ to vlan-id ] }&<1-10>, where the
vlan-id argument represents the VLAN ID in the range of 1 to 4094, and &<1-10> indicates that you can
specify up to 10 VLAN IDs or VLAN ID ranges.
Usage guidelines
Configured in Ethernet interface view, the setting takes effect only on the interface.
Configured in Layer 2 aggregate interface view, the setting takes effect only on the aggregate interface.
Configured on a member port in an aggregation group, the setting takes effect only after the port leaves
the aggregation group.
To set the priority of an MSTP port in a specific MSTI, use this command with the MSTI specified. To set
the priority of a PVST port in a specific VLAN or multiple VLANs, use this command with a VLAN list
specified. To set the priority of an MSTP port in the CIST or an STP or RSTP port, use this command without
specifying any MSTI and VLAN.
Port priority affects the role of a port in a spanning tree.
The smaller the value, the higher the port priority. If all ports on your device use the same priority value,
the port priority depends on the port index. The smaller the index, the higher the priority.
Examples
# In MSTP mode, set the priority of port GigabitEthernet 1/0/3 to 16 in MSTI 2.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/3
[Sysname-GigabitEthernet1/0/3] stp instance 2 port priority 16
# In PVST mode, set the priority of port GigabitEthernet 1/0/3 to 16 in VLAN 2.
<Sysname> system-view
[Sysname] stp mode pvst
[Sysname] interface gigabitethernet 1/0/3
[Sysname-GigabitEthernet1/0/3] stp vlan 2 port priority 16
Related commands
display stp
123
stp port-log
Use stp port-log to enable outputting port state transition information for the specified MSTI or all MSTIs.
Use undo stp port-log to disable outputting port state transition information for the specified MSTI or all
MSTIs.
Syntax
stp port-log { instance { instance-id | all } | vlan vlan-list }
undo stp port-log { instance { instance-id | all } | vlan vlan-list }
Default
Outputting port state transition information is enabled.
Views
System view
Default command level
2: System level
Parameters
instance instance-id: Specifies an MSTI. The value range for the instance-id argument is 0 to 31, and 0
represents the CIST. To enable or disable outputting port state transition information in STP or RSTP mode,
specify instance 0.
all: Specifies all MSTIs.
vlan vlan-list: Specifies a VLAN list in the format of vlan-list = { vlan-id [ to vlan-id ] }&<1-10>, where the
vlan-id argument represents the VLAN ID in the range of 1 to 4094, and &<1-10> indicates that you can
specify up to 10 VLAN IDs or VLAN ID ranges.
Examples
# In MSTP mode, enable outputting port state transition information for MSTI 2.
<Sysname> system-view
[Sysname] stp port-log instance 2
%Aug 16 00:49:41:856 2006 Sysname MSTP/3/MSTP_DISCARDING: Instance 2's
GigabitEthernet1/0/1 has been set to discarding state!
%Aug 16 00:49:41:856 2006 Sysname MSTP/3/MSTP_DISCARDING: Instance 2's
GigabitEthernet1/0/2 has been set to forwarding state!
The output shows that GigabitEthernet 1/0/1 in MSTI 2 transited to the discarding state and
GigabitEthernet 1/0/2 in MSTI 2 transited to the forwarding state.
# In PVST mode, enable outputting port state transition information for VLAN 1 to VLAN 4094.
<Sysname> system-view
[Sysname] stp mode pvst
[Sysname] stp port-log vlan 1 to 4094
%Aug 16 00:49:41:856 2006 Sysname MSTP/3/PVST_DISCARDING: VLAN 2's GigabitEthernet1/0/1
has been set to discarding state!
%Aug 16 00:49:41:856 2006 Sysname MSTP/3/PVST_FORWARDING: VLAN 2's GigabitEthernet1/0/2
has been set to forwarding state!
The output shows that GigabitEthernet 1/0/1 in VLAN 2 transited to the discarding state and
GigabitEthernet 1/0/2 in VLAN 2 transited to the forwarding state.
124
stp priority
Use stp priority to set the priority of the device.
Use undo stp priority to restore the default priority.
Syntax
stp [ instance instance-id | vlan vlan-list ] priority priority
undo stp [ instance instance-id | vlan vlan-list ] priority
Default
The device priority is 32768.
Views
System view
Default command level
2: System level
Parameters
instance instance-id: Sets the priority of the device in a MSTI. The value range for the instance-id
argument is 0 to 31, and 0 represents the CIST.
vlan vlan-list: Specifies a VLAN list in the format of vlan-list = { vlan-id [ to vlan-id ] }&<1-10>, where the
vlan-id argument represents the VLAN ID in the range of 1 to 4094, and &<1-10> indicates that you can
specify up to 10 VLAN IDs or VLAN ID ranges.
priority: Specifies the device priority. The value range is 0 to 61440 in increments of 4096 (as indicated
by 0, 4096, 8192). You can set up to 16 priority values on the device. The smaller the value, the higher
the device priority.
Usage guidelines
To set the priority of an MSTP device in a specific MSTI, use this command with the MSTI specified. To set
the priority of a PVST device in a specific VLAN or multiple VLANs, use this command with a VLAN list
specified. To set the priority of an MSTP device in the CIST or an STP or RSTP device, use this command
without specifying any MSTI and VLAN.
Examples
# In MSTP mode, set the device priority to 4096 in MSTI 1.
<Sysname> system-view
[Sysname] stp instance 1 priority 4096
# In PVST mode, set the device priority to 4096 in VLAN 1.
<Sysname> system-view
[Sysname] stp mode pvst
[Sysname] stp vlan 1 priority 4096
stp region-configuration
Use stp region-configuration to enter MST region view.
Use undo stp region-configuration to restore the default MST region configurations.
125
Syntax
stp region-configuration
undo stp region-configuration
Views
System view
Default command level
2: System level
Usage guidelines
These are the default settings for the MST region:
•
The MST region name of the device is the MAC address of the device.
•
All VLANs are mapped to the CIST.
•
The MSTP revision level is 0.
After you enter MST region view, you can configure the MST region-related parameters, including the
region name, VLAN-to-instance mappings, and revision level.
Examples
# Enter MST region view.
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region]
stp root primary
Use stp root primary to configure the device as the root bridge.
Use undo stp root to restore the default.
Syntax
stp [ instance instance-id | vlan vlan-list ] root primary
undo stp [ instance instance-id | vlan vlan-list ] root
Default
A device is not a root bridge.
Views
System view
Default command level
2: System level
Parameters
instance instance-id: Configures the device as the root bridge in a particular MSTI. The value range for
the instance-id argument is 0 to 31, and 0 represents the CIST.
vlan vlan-list: Specifies a VLAN list in the format of vlan-list = { vlan-id [ to vlan-id ] }&<1-10>, where the
vlan-id argument represents the VLAN ID in the range of 1 to 4094, and &<1-10> indicates that you can
specify up to 10 VLAN IDs or VLAN ID ranges.
126
Usage guidelines
To set an MSTP device as the root bridge in a specific MSTI, use this command with the MSTI specified.
To set a PVST device as the root bridge in a specific VLAN or multiple VLANs, use this command with a
VLAN list specified. To set an MSTP device in the CIST or an STP or RSTP device as the root bridge, use
this command without specifying any MSTI and VLAN.
Once you specify the device as the root bridge, you cannot change the priority of the device.
Examples
# In MSTP mode, specify the device as the root bridge of MSTI 1.
<Sysname> system-view
[Sysname] stp instance 1 root primary
# In PVST mode, specify the device as the root bridge of VLAN 1.
<Sysname> system-view
[Sysname] stp mode pvst
[Sysname] stp vlan 1 root primary
Related commands
•
stp priority
•
stp root secondary
stp root secondary
Use stp root secondary to configure the device as a secondary root bridge.
Use undo stp root to restore the default.
Syntax
stp [ instance instance-id | vlan vlan-list ] root secondary
undo stp [ instance instance-id | vlan vlan-list ] root
Default
A device is not a secondary root bridge.
Views
System view
Default command level
2: System level
Parameters
instance instance-id: Configures the device as a secondary root bridge in a particular MSTI. The value
range for the instance-id argument is 0 to 31, and 0 represents the CIST.
vlan vlan-list: Specifies a VLAN list in the format of vlan-list = { vlan-id [ to vlan-id ] }&<1-10>, where the
vlan-id argument represents the VLAN ID in the range of 1 to 4094, and &<1-10> indicates that you can
specify up to 10 VLAN IDs or VLAN ID ranges.
Usage guidelines
To set an MSTP device as a secondary root bridge in a specific MSTI, use this command with the MSTI
specified. To set a PVST device as a secondary root bridge in a specific VLAN or multiple VLANs, use this
127
command with a VLAN list specified. To set an MSTP device in the CIST or an STP or RSTP device as a
secondary root bridge, use this command without specifying any MSTI and VLAN.
Once you specify the device as a secondary root bridge, you cannot change the priority of the device.
Examples
# In MSTP mode, specify the device as a secondary root bridge in MSTI 1.
<Sysname> system-view
[Sysname] stp instance 1 root secondary
# In PVST mode, specify the device as a secondary root bridge in VLAN 1.
<Sysname> system-view
[Sysname] stp mode pvst
[Sysname] stp vlan 1 root secondary
Related commands
•
stp priority
•
stp root primary
stp root-protection
Use stp root-protection to enable the root guard function on the ports.
Use undo stp root-protection to disable the root guard function on the ports.
Syntax
stp root-protection
undo stp root-protection
Default
The root guard function is disabled.
Views
Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Usage guidelines
Configured in Ethernet interface view, the setting takes effect only on the interface.
Configured in Layer 2 aggregate interface view, the setting takes effect only on the aggregate interface.
Configured on a member port in an aggregation group, the setting takes effect only after the port leaves
the aggregation group.
You cannot configure root guard and loop guard on a port at the same time.
Examples
# Enable the root guard function for GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] stp root-protection
128
Related commands
stp loop-protection
stp tc-protection
Use stp tc-protection enable to enable the TC-BPDU attack guard function for the device.
Use stp tc-protection disable to disable the TC-BPDU attack guard function for the device.
Syntax
stp tc-protection enable
stp tc-protection disable
Default
The TC-BPDU attack guard function is enabled.
Views
System view
Default command level
2: System level
Usage guidelines
With the TC-BPDU guard function, you can set the maximum number of immediate forwarding address
entry flushes that the device can perform every a certain period of time (10 seconds). For TC-BPDUs
received in excess of the limit, the device performs a forwarding address entry flush when the time period
expires. This prevents frequent flushing of forwarding address entries.
Examples
# Disable the TC-BPDU attack guard function for the device.
<Sysname> system-view
[Sysname] stp tc-protection disable
Related commands
stp tc-protection threshold
stp tc-protection threshold
Use stp tc-protection threshold to configure the maximum number of forwarding address entry flushes
that the device can perform every a certain period of time (10 seconds).
Use undo stp tc-protection threshold to restore the default.
Syntax
stp tc-protection threshold number
undo stp tc-protection threshold
Default
The device can perform a maximum of six forwarding address entry flushes every 10 seconds.
Views
System view
129
Default command level
2: System level
Parameters
number: Sets the maximum number of immediate forwarding address entry flushes that the device can
perform within a certain period of time (10 seconds). The value range is 1 to 255.
Examples
# Configure the device to perform up to 10 forwarding address entry flushes every 10 seconds.
<Sysname> system-view
[Sysname] stp tc-protection threshold 10
Related commands
stp tc-protection
stp timer forward-delay
Use stp timer forward-delay to set the forward delay timer of the device.
Use undo stp timer forward-delay to restore the default.
Syntax
stp [ vlan vlan-list ] timer forward-delay time
undo stp [ vlan vlan-list ] timer forward-delay
Default
The forward delay timer is 15 seconds.
Views
System view
Default command level
2: System level
Parameters
vlan vlan-list: Specifies a VLAN list in the format of vlan-list = { vlan-id [ to vlan-id ] }&<1-10>, where the
vlan-id argument represents the VLAN ID in the range of 1 to 4094, and &<1-10> indicates that you can
specify up to 10 VLAN IDs or VLAN ID ranges.
time: Sets the forward delay (in 0.01 seconds). The value range is 400 to 3000 in increments of 100 (as
indicated by 400, 500, 600).
Usage guidelines
The forward delay timer determines the time interval of state transition. To prevent temporary loops, a
spanning tree port goes through the learning (intermediate) state before it transits from the discarding to
the forwarding state. To stay synchronized with the remote device, the port has a wait period between
transition states that is determined by the forward delay timer.
To set the forward delay in STP/RSTP/MSTP mode, use this command without any VLAN specified. To set
the forward delay for a specific VLAN or multiple VLANs in PVST mode, use this command with a VLAN
list specified.
HP recommends not setting the forward delay with this command. Instead, you can specify the network
diameter of the switched network by using the stp bridge-diameter command and let spanning tree
130
protocols automatically calculate optimal settings of the forward delay timer. If the network diameter uses
the default value, the forward delay timer also uses the default value.
Examples
# In MSTP mode, set the forward delay timer to 20 seconds.
<Sysname> system-view
[Sysname] stp timer forward-delay 2000
# In PVST mode, set the forward delay timer to 20 seconds.
<Sysname> system-view
[Sysname] stp mode pvst
[Sysname] stp vlan 2 timer forward-delay 2000
Related commands
•
stp timer hello
•
stp timer max-age
•
stp bridge-diameter
stp timer hello
Use stp timer hello to set the hello time of the device.
Use undo stp timer hello to restore the default.
Syntax
stp [ vlan vlan-list ] timer hello time
undo stp [ vlan vlan-list ] timer hello
Default
The hello time is 2 seconds.
Views
System view
Default command level
2: System level
Parameters
vlan vlan-list: Specifies a VLAN list in the format of vlan-list = { vlan-id [ to vlan-id ] }&<1-10>, where the
vlan-id argument represents the VLAN ID in the range of 1 to 4094, and &<1-10> indicates that you can
specify up to 10 VLAN IDs or VLAN ID ranges.
time: Sets the hello time (in 0.01 seconds). The value range is 100 to 1000 in increments of 100 (as
indicated by 100, 200, 300).
Usage guidelines
Hello time is the time interval at which spanning tree devices send configuration BPDUs to maintain
spanning tree. If a device fails to receive configuration BPDUs within the set period of time, a new
spanning tree calculation process is triggered due to timeout.
To set the hello time in STP/RSTP/MSTP mode, use this command without any VLAN specified. To set the
hello time for a specific VLAN or multiple VLANs in PVST mode, use this command with a VLAN list
specified.
131
HP recommends not setting the hello time with this command. Instead, you can specify the network
diameter of the switched network by using the stp bridge-diameter command and let spanning tree
protocols automatically calculate optimal settings of the hello timer. If the network diameter uses the
default value, the hello timer also uses the default value.
Examples
# In MSTP mode, set the hello time to 4 seconds.
<Sysname> system-view
[Sysname] stp timer hello 400
# In PVST mode, set the hello time in VLAN 2 to 4 seconds.
<Sysname> system-view
[Sysname] stp mode pvst
[Sysname] stp vlan 2 timer hello 400
Related commands
•
stp timer forward-delay
•
stp timer max-age
•
stp bridge-diameter
stp timer max-age
Use stp timer max-age to set the max age timer of the device.
Use undo stp timer max-age to restore the default.
Syntax
stp [ vlan vlan-list ] timer max-age time
undo stp [ vlan vlan-list ] timer max-age
Default
The max age is 20 seconds.
Views
System view
Default command level
2: System level
Parameters
vlan vlan-list: Specifies a VLAN list in the format of vlan-list = { vlan-id [ to vlan-id ] }&<1-10>, where the
vlan-id argument represents the VLAN ID in the range of 1 to 4094, and &<1-10> indicates that you can
specify up to 10 VLAN IDs or VLAN ID ranges.
time: Sets the max age (in 0.01 seconds). The value range is 600 to 4000 in increments of 100 (as
indicated by 600, 700, 800).
Usage guidelines
In the CIST of an MSTP network or each VLAN of a PVST network, the device determines whether a
configuration BPDU received on a port has expired based on the max age timer. If yes, a new spanning
tree calculation process starts. The max age timer does not take effect on MSTIs.
132
To set the max age timer in STP/RSTP/MSTP mode, use this command without any VLAN specified. To
set the max age timer for a specific VLAN or multiple VLANs in PVST mode, use this command with a
VLAN list specified.
HP recommends not setting the max age timer with this command. Instead, you can specify the network
diameter of the switched network by using the stp bridge-diameter command and let spanning tree
protocols automatically calculate optimal settings of the max age timer. If the network diameter uses the
default value, the max age timer also uses the default value.
Examples
# In MSTP mode, set the max age timer to 10 seconds.
<Sysname> system-view
[Sysname] stp timer max-age 1000
# In PVST mode, set the max age timer in VLAN 2 to 10 seconds.
<Sysname> system-view
[Sysname] stp mode pvst
[Sysname] stp vlan 2 timer max-age 1000
Related commands
•
stp timer forward-delay
•
stp timer hello
•
stp bridge-diameter
stp timer-factor
Use stp timer-factor to configure the timeout time by setting the timeout factor.
Use undo stp timer-factor to restore the default.
Syntax
stp timer-factor factor
undo stp timer-factor
Default
The timeout factor of the device is set to 3.
Views
System view
Default command level
2: System level
Parameters
factor: Sets the timeout factor in the range of 1 to 20.
Usage guidelines
Timeout time = timeout factor × 3 × hello time.
After the network topology is stabilized, each non-root-bridge device forwards configuration BPDUs to
the surrounding devices at the interval of hello time to check whether any link is faulty. If a device does
not receive a BPDU from the upstream device within nine times the hello time, it assumes that the
upstream device has failed and starts a new spanning tree calculation process.
133
In a stable network, this kind of spanning tree calculation may occur because the upstream device is busy.
You can avoid such unwanted spanning tree calculations by lengthening the timeout time (by setting the
timeout factor to 4 or more), saving the network resources. HP recommends that you set the timeout factor
to 5, 6, or 7, for a stable network.
Examples
# Set the timeout factor of the device to 7.
<Sysname> system-view
[Sysname] stp timer-factor 7
Related commands
stp timer hello
stp transmit-limit
Use stp transmit-limit to set the maximum number of BPDUs that the ports can send within each hello
time.
Use undo stp transmit-limit to restore the default.
Syntax
stp transmit-limit limit
undo stp transmit-limit
Default
The maximum transmission rate of all ports is 10. Each port can send up to 10 BPDUs within each hello
time.
Views
Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Parameters
limit: Sets the maximum number of BPDUs the ports can send within each hello time. The value range is
1 to 255.
Usage guidelines
Configured in Ethernet interface view, the setting takes effect only on the interface.
Configured in Layer 2 aggregate interface view, the setting takes effect only on the aggregate interface.
Configured on a member port in an aggregation group, the setting takes effect only after the port leaves
the aggregation group.
A larger maximum transmission rate value requires more system resources. An appropriate maximum
transmission rate setting can prevent spanning tree protocols from using excessive bandwidth resources
during network topology changes. HP recommends that you use the default value.
Examples
# Set the maximum transmission rate of port GigabitEthernet 1/0/1 to 5.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
134
[Sysname-GigabitEthernet1/0/1] stp transmit-limit 5
vlan-mapping modulo
Use vlan-mapping modulo to map VLANs in the MST region to MSTIs according to the specified modulo
value, quickly creating a VLAN-to-instance mapping table.
Syntax
vlan-mapping modulo modulo
Default
All VLANs are mapped to the CIST (MSTI 0).
Views
MST region view
Default command level
2: System level
Parameters
modulo: Sets the modulo value in the range of 1 to 31.
Usage guidelines
You cannot map a VLAN to different MSTIs. If you map a VLAN that has been mapped to an MSTI to a
new MSTI, the old mapping is automatically removed.
This command maps each VLAN to the MSTI whose ID is (VLAN ID – 1) %modulo + 1, where (VLAN ID
– 1) %modulo is the modulo operation for (VLAN ID – 1). If the modulo value is 15, for example, then
VLAN 1 is mapped to MSTI 1, VLAN 2 to MSTI 2, VLAN 15 to MSTI 15, VLAN 16 to MSTI 1, and so on.
Examples
# Map VLANs to MSTIs as per modulo 8.
<Sysname> system-view
[Sysname] stp region-configuration
[Sysname-mst-region] vlan-mapping modulo 8
Related commands
•
region-name
•
revision-level
•
display stp region-configuration
•
check region-configuration
•
active region-configuration
135
BPDU tunneling configuration commands
bpdu-tunnel dot1q
Use bpdu-tunnel dot1q to enable BPDU tunneling for a protocol on the ports.
Use undo bpdu-tunnel dot1q to disable BPDU tunneling for a protocol on the ports.
Syntax
In Layer 2 Ethernet interface view:
bpdu-tunnel dot1q { cdp | dldp | eoam | gvrp | hgmp | lacp | lldp | pagp | pvst | stp | udld | vtp }
undo bpdu-tunnel dot1q { cdp | dldp | eoam | gvrp | hgmp | lacp | lldp | pagp | pvst | stp | udld
| vtp }
In Layer 2 aggregate interface view:
bpdu-tunnel dot1q { cdp | gvrp | hgmp | pvst | stp | vtp }
undo bpdu-tunnel dot1q { cdp | gvrp | hgmp | pvst | stp | vtp }
Default
BPDU tunneling for any protocol is disabled.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Parameters
cdp: Specifies CDP.
dldp: Specifies DLDP.
eoam: Specifies EOAM.
gvrp: Specifies GVRP.
hgmp: Specifies HGMP.
lacp: Specifies LACP.
lldp: Specifies LLDP.
pagp: Specifies PAGP.
pvst: Specifies PVST.
stp: Specifies STP.
udld: Specifies UDLD.
vtp: Specifies VTP.
136
Usage guidelines
Settings made in Layer 2 Ethernet interface view or Layer 2 aggregate interface view take effect only on
the Ethernet interface or aggregate interface.
You cannot enable BPDU tunneling on a member port of a service loopback group.
Before you enable BPDU tunneling for DLDP, EOAM, GVRP, HGMP, LLDP, or STP on a port, disable the
protocol on the port first.
To enable BPDU tunneling for PVST (a spanning tree protocol) on a port, disable STP first, and then
enable BPDU tunneling for STP on the port.
Do not enable BPDU tunneling for DLDP, EOAM, LACP, LLDP, PAGP, or UDLD on the member port of a
Layer 2 aggregation group.
Examples
# Disable STP on GigabitEthernet 1/0/1, and then enable BPDU tunneling for STP on the port.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] undo stp enable
[Sysname-GigabitEthernet1/0/1] bpdu-tunnel dot1q stp
# Disable STP on Layer 2 aggregate interface Bridge-Aggregation 1, and then enable BPDU tunneling
for STP on the Layer 2 aggregate interface.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] undo stp enable
[Sysname-Bridge-Aggregation1] bpdu-tunnel dot1q stp
bpdu-tunnel tunnel-dmac
Use bpdu-tunnel tunnel-dmac to configure the destination multicast MAC address for BPDUs.
Use undo bpdu-tunnel tunnel-dmac to restore the default value.
Syntax
bpdu-tunnel tunnel-dmac mac-address
undo bpdu-tunnel tunnel-dmac
Default
The destination multicast MAC address for BPDUs is 0x010F-E200-0003.
Views
System view
Default command level
2: System level
Parameters
mac-address: Specifies a destination multicast MAC address for BPDUs in the format of H-H-H. The
allowed values are 0x0100-0CCD-CDD0, 0x0100-0CCD-CDD1, 0x0100-0CCD-CDD2, and
0x010F-E200-0003.
137
Examples
# Set the destination multicast MAC address for BPDUs to 0x0100-0CCD-CDD0.
<Sysname> system-view
[Sysname] bpdu-tunnel tunnel-dmac 0100-0ccd-cdd0
138
VLAN configuration commands
Basic VLAN configuration commands
default
Use default to restore the default settings for a VLAN interface.
Syntax
default
Views
VLAN interface view
Default command level
2: System level
Usage guidelines
CAUTION:
The default command might interrupt ongoing network services. Make sure you are fully aware of the
impacts of this command when you perform it on a live network.
This command might fail to restore the default settings for some commands for reasons such as command
dependencies and system restrictions. Use the display this command in interface view to identify these
commands, and then use their undo forms or follow the command reference to individually restore their
default settings. If your restoration attempt still fails, follow the error message instructions to resolve the
problem.
Examples
# Restore the default settings for VLAN-interface 1.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] default
This command will restore the default settings. Continue? [Y/N]:y
description
Use description to change the description of the VLAN or VLAN interface.
Use undo description to restore the default.
Syntax
description text
undo description
139
Default
The description for a VLAN is VLAN vlan-id, which is the ID of the VLAN. For example, the default
description of VLAN 100 is VLAN 0100. The default description for a VLAN interface is the name of the
interface. For example, the default description of VLAN-interface 1 is Vlan-interface1 Interface.
Views
VLAN view, VLAN interface view
Default command level
2: System level
Parameters
text: Description for a VLAN or VLAN interface. The string can include case-sensitive letters, digits,
special characters such as tilde (~), exclamation point (!), at sign (@), pound sign (#), dollar sign ($),
percent sign (%), caret (^), ampersand sign (&), asterisk (*), left brace({), right brace (}), left parenthesis
((), right parenthesis ()), left bracket ([), right bracket (]), left angle bracket (<), right angle bracket (>),
hyphen (-), underscore(_), plus sign (+), equal sign (=), vertical bar (|), back slash (\), colon (:),
semi-colon (;) quotation marks ("), apostrophe ('), comma (,), dot (.), and slash (/), spaces, and other
Unicode characters and symbols.
•
For a VLAN, this is a string of 1 to 32 characters.
•
For a VLAN interface, this is a string of 1 to 80 characters.
When you configure a description, follow these guidelines:
•
Each Unicode character takes the space of two regular characters.
•
To use Unicode characters or symbols in an interface description, install the specific input method
editor and log in to the device through remote login software that supports the character type.
•
When the length of a description string reaches or exceeds the maximum line width on the terminal
software, the software starts a new line, possibly breaking a Unicode character into two and
creating garbled characters at the end of a line.
Usage guidelines
Configure a description to describe the function or connection of a VLAN or VLAN interface for easy
management.
Examples
# Change the description of VLAN 2 to sales-private.
<Sysname> system-view
[Sysname] vlan 2
[Sysname-vlan2] description sales-private
# Change the description of VLAN-interface 2 to linktoPC56.
<Sysname> system-view
[Sysname] vlan 2
[Sysname-vlan2] quit
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] description linktoPC56
Related commands
•
display interface vlan-interface
•
display vlan
140
display interface vlan-interface
Use display interface vlan-interface to display information about a specified or all VLAN interfaces.
Syntax
display interface [ vlan-interface ] [ brief [ down ] ] [ | { begin | exclude | include } regular-expression ]
display interface vlan-interface vlan-interface-id [ brief ] [ | { begin | exclude | include }
regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
vlan-interface-id: Specifies a VLAN interface number.
brief: Displays brief interface information. If you do not specify this keyword, the command displays
detailed interface information.
down: Displays information about interfaces in the DOWN state and the causes. If you do not specify
this keyword, this command displays information about interfaces in all states.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
If you do not provide the vlan-interface keyword, this command displays information about all interfaces.
If you provide the vlan-interface keyword but do not specify the VLAN interface number, this command
displays information about all VLAN interfaces.
Examples
# Display information for VLAN-interface 2.
<Sysname> display interface vlan-interface 2
Vlan-interface2 current state: DOWN
Line protocol current state: DOWN
Description: Vlan-interface2 Interface
The Maximum Transmit Unit is 1500
Internet protocol processing : disabled
IP Packet Frame Type: PKTFMT_ETHNT_2,
Hardware Address: 000f-e249-8050
IPv6 Packet Frame Type: PKTFMT_ETHNT_2,
Hardware Address: 000f-e249-8050
# Display brief information for VLAN-interface 2.
<Sysname> display interface vlan-interface 2 brief
The brief information of interface(s) under route mode:
Link: ADM - administratively down; Stby - standby
141
Protocol: (s) - spoofing
Interface
Link Protocol Main IP
Vlan2
DOWN DOWN
Description
--
# Display brief information for VLAN interfaces in DOWN state.
<Sysname> display interface vlan-interface brief down
The brief information of interface(s) under route mode:
Link: ADM - administratively down; Stby - standby
Interface
Link Cause
Vlan2
DOWN Not connected
Table 33 Command output
Field
Description
Physical state of a VLAN interface:
• DOWN (Administratively)—The administrative state of the VLAN
interface is down, because it has been shut down with the
shutdown command.
Vlan-interface2 current state
• DOWN—The administrative sate of the VLAN interface is up, but its
physical sate is down. The VLAN corresponding to this interface
does not contain any physical port in the UP state (possibly because
the ports are not well connected or the lines have failed).
• UP—Both the administrative state and the physical state of the
VLAN interface are up.
Link layer protocol state of a VLAN interface:
Line protocol current state
• DOWN—The protocol state of the VLAN interface is down.
• UP—The protocol state of the VLAN interface is up.
Description
Description string of a VLAN interface.
The Maximum Transmit Unit
MTU of a VLAN interface.
Internet protocol processing :
disabled
The interface is not capable of processing IP packets. This information
is displayed when the interface is not configured with an IP address.
Internet Address is
192.168.1.54/24 Primary
The primary IP address of the interface is 192.168.1.54/24. This
information is displayed only if the primary IP address is configured for
the interface.
Internet Address is 6.4.4.4/24 Sub
The secondary IP address of the interface is 6.4.4.4/24. This
information is displayed only if a secondary IP address is configured
for the interface.
IP Packet Frame Type
IPv4 outgoing frame format.
Hardware address
MAC address corresponding to a VLAN interface.
IPv6 Packet Frame Type
IPv6 outgoing frame format.
The brief information of interface(s)
under route mode
Brief information about Layer 3 interfaces.
State of the interface:
Link: ADM - administratively down;
Stby - standby
• ADM—The interface has been administratively shut down. To
recover its physical state, use the undo shutdown command.
• Stby—The interface is operating as a standby interface.
142
Field
Description
Protocol: (s) - spoofing
If the network layer protocol state of an interface is shown as UP, but its
link is an on-demand link or not present at all, its protocol attribute
includes the spoofing flag (an s in parentheses).
Interface
Abbreviated interface name.
Physical link state of the interface:
Link
• UP—The link is up.
• ADM—The link has been administratively shut down. To recover its
physical state, use the undo shutdown command.
Protocol connection state of the interface:
Protocol
• UP.
• DOWN.
• UP(s).
Main IP
Main IP address of the interface.
Description
Description of the interface.
Cause
Cause of a DOWN physical link. If the port has been shut down with
the shutdown command, this field displays Administratively. To restore
the physical state of the interface, use the undo shutdown command.
display vlan
Use display vlan to display VLAN information.
Syntax
display vlan [ vlan-id1 [ to vlan-id2 ] | all | dynamic | reserved | static ] [ | { begin | exclude | include }
regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
vlan-id1: Displays information about a VLAN specified by VLAN ID in the range of 1 to 4094.
vlan-id1 to vlan-id2: Displays information about VLANs specified by a VLAN ID range. vlan-id2 must be
no smaller than vlan-id1.
all: Displays all VLAN information but the reserved VLANs.
dynamic: Displays the number of dynamic VLANs and the ID for each dynamic VLAN. The dynamic
VLANs are generated through MVRP or GVRP or those distributed by a RADIUS server.
reserved: Displays information about the reserved VLANs. Protocol modules determine which VLANs are
reserved VLANs, according to function implementation, and reserved VLANs serve protocol modules.
You cannot configure reserved VLANs.
static: Displays the number of static VLANs and the ID for each static VLAN. The static VLANs are
manually created.
143
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display VLAN 2 information.
<Sysname> display vlan 2
VLAN ID: 2
VLAN Type: static
Route interface: not configured
Description: VLAN 0002
Name: VLAN 0002
Tagged
Ports: none
Untagged Ports:
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/3
# Display VLAN 3 information.
<Sysname> display vlan 3
VLAN ID: 3
VLAN Type: static
Route Interface: configured
IP Address: 1.1.1.1
Subnet Mask: 255.255.255.0
Description: VLAN 0003
Name: VLAN 0003
Tagged
Ports: none
Untagged Ports: none
Table 34 Command output
Field
Description
VLAN Type
VLAN type, static or dynamic.
Route interface
Indicates whether the VLAN interface is configured.
Description
Description of the VLAN.
Name
Name configured for the VLAN.
IP Address
Primary IP address of the VLAN interface. This is available only when an IP
address is configured for the VLAN interface. To display secondary IP
addresses, use the display interface vlan-interface command in any view or the
display this command in VLAN interface view.
Subnet Mask
Subnet mask of the primary IP address. This is available only when an IP
address is configured for the VLAN interface.
Tagged Ports
Ports through which VLAN packets are sent tagged.
Untagged Ports
Ports through which VLAN packets are sent untagged.
144
Related commands
vlan
interface vlan-interface
Use interface vlan-interface to create a VLAN interface and enter its view or enter the view of an existing
VLAN interface.
Use undo interface vlan-interface to remove the specified VLAN interface.
Syntax
interface vlan-interface vlan-interface-id
undo interface vlan-interface vlan-interface-id
Default
No VLAN interface exists on the device.
Views
System view
Default command level
2: System level
Parameters
vlan-interface-id: Specifies a VLAN interface number in the range of 1 to 4094.
Usage guidelines
Create the VLAN before you create the VLAN interface.
To configure an IP address for a VLAN interface that will perform IP routing, use the ip address command
in VLAN interface view.
In Release 1115, the device does not have the default configuration file, and the device starts up with
empty configuration.
Examples
# Create VLAN-interface 2, and enter its view.
<Sysname> system-view
[Sysname] vlan 2
[Sysname-vlan2] quit
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2]
Related commands
display interface vlan-interface
ip address
Use ip address to assign an IP address and subnet mask to a VLAN interface.
Use undo ip address to remove the IP address and subnet mask for a VLAN interface.
Syntax
ip address ip-address { mask | mask-length } [ sub ]
145
undo ip address [ ip-address { mask | mask-length } [ sub ] ]
Default
No IP address is assigned to any VLAN interface.
Views
VLAN interface view
Default command level
2: System level
Parameters
ip-address: Specifies an IP address in dotted decimal notation.
mask: Specifies a subnet mask in dotted decimal notation.
mask-length: Sets the number of consecutive 1s in the subnet mask, in the range of 0 to 32.
sub: Indicates the address is a secondary IP address.
Usage guidelines
To connect a VLAN to multiple subnets, assign one primary IP address and multiple secondary IP
addresses to a VLAN interface.
When you configure IP addresses for a VLAN interface, follow these guidelines:
•
The primary IP address you assign to a VLAN interface overwrites the previous one, if any.
•
Remove all secondary IP addresses before you remove the primary IP address.
•
To remove all IP addresses, use the undo ip address command without any parameter.
•
To remove the primary IP address, use the undo ip address ip-address { mask | mask-length }
command.
•
To remove a secondary IP address, use the undo ip address ip-address { mask | mask-length } sub
command.
Examples
# Specify the IP address as 1.1.0.1, the subnet mask as 255.255.255.0 for VLAN-interface 1.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] ip address 1.1.0.1 255.255.255.0
Related commands
display ip interface (Layer 3—IP Services Command Reference)
mtu
Use mtu to set the MTU for a VLAN interface.
Use undo mtu to restore the default.
Syntax
mtu size
undo mtu
146
Default
The MTU of a VLAN interface is 1500 bytes.
Views
VLAN interface view
Default command level
2: System level
Parameters
size: Sets the MTU (in bytes) in the range of 46 to 1500.
Examples
# Set the MTU to 1492 bytes for VLAN-interface 1.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] mtu 1492
Related commands
display interface vlan-interface
name
Use name to configure a name for the VLAN.
Use undo name to restore the default name of the VLAN.
Syntax
name text
undo name
Default
The name of a VLAN is VLAN vlan-id, which is its VLAN ID. For example, the default name of VLAN 100
is VLAN 0100.
Views
VLAN view
Default command level
2: System level
Parameters
text: Specifies a VLAN name, a string of 1 to 32 characters. The string can include case-sensitive letters,
digits, special characters such as tilde (~), exclamation point (!), at sign (@), pound sign (#), dollar sign
($), percent sign (%), caret (^), ampersand sign (&), asterisk (*), left brace({), right brace (}), left
parenthesis ((), right parenthesis ()), left bracket ([), right bracket (]), left angle bracket (<), right angle
bracket (>), hyphen (-), underscore(_), plus sign (+), equal sign (=), vertical bar (|), back slash (\), colon
(:), semi-colon (;) quotation marks ("), apostrophe ('), comma (,), dot (.), and slash (/), spaces, and other
Unicode characters and symbols.
When you configure a description, follow these guidelines:
•
Each Unicode character takes the space of two regular characters.
147
•
To use Unicode characters or symbols in an interface description, install the specific input method
editor and log in to the device through remote login software that supports the character type.
•
When the length of a description string reaches or exceeds the maximum line width on the terminal
software, the software starts a new line, possibly breaking a Unicode character into two and
creating garbled characters at the end of a line.
Usage guidelines
When 802.1X or MAC address authentication is configured on a switch, you can use a RADIUS server
to issue VLAN configuration to ports that have passed the authentication. Some servers can send IDs or
names of the issued VLANs to the switch.
Use VLAN names, rather than VLAN IDs, to distinguish a large number of VLANs.
Examples
# Configure the name of VLAN 2 as Test VLAN.
<Sysname> system-view
[Sysname] vlan 2
[Sysname-vlan2] name Test VLAN
Related commands
display vlan
shutdown
Use shutdown to manually shut down a VLAN interface.
Use undo shutdown to cancel the action of shutting down a VLAN interface.
Syntax
shutdown
undo shutdown
Default
A VLAN interface is not manually shut down. The VLAN interface is up if one or more ports in the VLAN
is up, and goes down if all ports in the VLAN go down.
Views
VLAN interface view
Default command level
2: System level
Usage guidelines
A VLAN interface shut down with the shutdown command is in DOWN (Administratively) state until you
bring it up, regardless of how the state of the ports in the VLAN changes.
Before configuring parameters for a VLAN interface, shut down the VLAN interface with the shutdown
command to prevent the configurations from affecting the network. Use the undo shutdown command to
bring up a VLAN interface after you have configured related parameters and protocols for the VLAN
interface.
You can shut down a failed interface with the shutdown command and then bring it up with the undo
shutdown command to see if it recovers.
148
In a VLAN, the state of any Ethernet port is independent of the state of the VLAN interface.
Examples
# Shut down VLAN-interface 2 and then bring it up.
<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] shutdown
[Sysname-Vlan-interface2] undo shutdown
vlan
Use vlan vlan-id to create a VLAN and enter its view or enter the view of an existing VLAN.
Use vlan vlan-id1 to vlan-id2 to create VLANs vlan-id1 through vlan-id2, except reserved VLANs.
Use vlan all to create VLANs 1 through 4094.
Use undo vlan to remove the specified VLANs.
Syntax
vlan { vlan-id1 [ to vlan-id2 ] | all }
undo vlan { vlan-id1 [ to vlan-id2 ] | all }
Default
Only the default VLAN (VLAN 1) exists in the system.
Views
System view
Default command level
2: System level
Parameters
vlan-id1, vlan-id2: Specifies a VLAN ID in the range of 1 to 4094.
vlan-id1 to vlan-id2: Specifies a VLAN range. vlan-id2 must be no smaller than vlan-id1.
all: Creates or removes all VLANs except reserved VLANs.
Usage guidelines
You cannot create or remove the default VLAN (VLAN 1).
You cannot create or remove VLANs reserved for specific functions.
For the following VLANs, you must remove the related configurations first, because you cannot use the
undo vlan command to directly remove them:
•
Protocol reserved VLANs
•
Management VLANs
•
Dynamic VLANs
•
VLANs configured with QoS policies
•
Control VLANs configured for smart link groups or RRPP domains
•
Remote probe VLANs for remote port mirroring
149
Examples
# Create VLAN 2, and enter VLAN 2 view.
<Sysname> system-view
[Sysname] vlan 2
[Sysname-vlan2]
# Create VLAN 4 through VLAN 100.
<Sysname> system-view
[Sysname] vlan 4 to 100
Please wait............. Done.
Related commands
display vlan
Port-based VLAN configuration commands
display port
Use display port to display information about the hybrid or trunk ports on the device, including the port
names, PVIDs, and allowed VLAN IDs.
Syntax
display port { hybrid | trunk } [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
hybrid: Displays hybrid ports.
trunk: Displays trunk ports.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display information about the hybrid ports in the system.
<Sysname> display port hybrid
Interface
PVID
VLAN passing
GE1/0/4
100
Tagged:
1000, 1002, 1500, 1600-1611, 2000,
2555-2558, 3000, 4000
Untagged:1, 10, 15, 18, 20-30, 44, 55, 67, 100,
150-160, 200, 255, 286, 300-302
150
# Display information about the trunk ports in the system.
<Sysname> display port trunk
Interface
PVID
VLAN passing
GE1/0/8
2
1-4, 6-100, 145, 177, 189-200, 244, 289, 400,
555, 600-611, 1000, 2006-2008
Table 35 Command output
Field
Description
Interface
Port name.
PVID
Port VLAN ID.
VLAN passing
VLANs for which the port allows packets to pass through.
Tagged
VLANs for which the port sends packets without removing VLAN tags.
Untagged
VLANs for which the port sends packets after removing VLAN tags.
port
Use port to assign the specified access ports to the VLAN.
Use undo port to remove the specified access ports from the VLAN.
Syntax
port interface-list
undo port interface-list
Default
All ports are in VLAN 1. All ports are access ports. However, you can manually configure the port type.
For more information, see "port link-type."
Views
VLAN view
Default command level
2: System level
Parameters
interface-list: Specifies an interface list, in the format of interface-list = { interface-type interface-number1
[ to interface-type interface-number2 ] }&<1-10>, where interface-type interface-number specifies an
interface by its type and number, and &<1-10> indicates that you can specify up to 10 ports or port
ranges.
Usage guidelines
This command is only applicable on access ports.
You cannot assign Layer 2 aggregate interfaces to a VLAN.
Examples
# Assign GigabitEthernet 1/0/1 through GigabitEthernet 1/0/3 to VLAN 2.
<Sysname> system-view
[Sysname] vlan 2
[Sysname-vlan2] port gigabitethernet 1/0/1 to gigabitethernet 1/0/3
151
Related commands
display vlan
port access vlan
Use port access vlan to assign the access ports to the specified VLAN.
Use undo port access vlan to restore the default.
Syntax
port access vlan vlan-id
undo port access vlan
Default
All access ports belong to VLAN 1.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Parameters
vlan-id: Specifies a VLAN ID in the range of 1 to 4094. Make sure that the VLAN specified by the VLAN
ID already exists.
Usage guidelines
The configuration made in Layer 2 Ethernet interface view applies only to the port.
The configuration made in Layer 2 aggregate interface view applies to the aggregate interface and its
aggregation member ports.
•
If the system fails to apply the configuration to the aggregate interface, it stops applying the
configuration to aggregation member ports.
•
If the system fails to apply the configuration to an aggregation member port, it skips the port and
moves to the next member port.
Examples
# Assign GigabitEthernet 1/0/1 to VLAN 3.
<Sysname> system-view
[Sysname] vlan 3
[Sysname-vlan3] quit
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port access vlan 3
# Assign Layer 2 aggregate interface Bridge-Aggregation 1 and its member ports to VLAN 3.
<Sysname> system-view
[Sysname] vlan 3
[Sysname-vlan3] quit
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] port access vlan 3
152
port hybrid pvid
Use port hybrid pvid to configure the PVID of the hybrid port.
Use undo port hybrid pvid to restore the default.
Syntax
port hybrid pvid vlan vlan-id
undo port hybrid pvid
Default
The PVID of a hybrid port is VLAN 1.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Parameters
vlan-id: Specifies a VLAN ID in the range of 1 to 4094.
Usage guidelines
You can use a nonexistent VLAN as the PVID for a hybrid port. If you use the undo vlan command to
remove the PVID of a hybrid port, it does not affect the setting of the PVID on the port.
HP recommends that you set the same PVID for the local and remote hybrid ports.
You must use the port hybrid vlan command to configure the hybrid port to pass and forward packets
from the PVID.
The configuration made in Layer 2 Ethernet interface view applies only to the port.
The configuration made in Layer 2 aggregate interface view applies to the aggregate interface and its
aggregation member ports.
•
If the system fails to apply the configuration to the aggregate interface, it stops applying the
configuration to aggregation member ports.
•
If the system fails to apply the configuration to an aggregation member port, it skips the port and
moves to the next member port.
Examples
# Configure VLAN 100 as the PVID of the hybrid port GigabitEthernet 1/0/1, and assign
GigabitEthernet 1/0/1 to VLAN 100 as an untagged member.
<Sysname> system-view
[Sysname] vlan 100
[Sysname-vlan100] quit
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type hybrid
[Sysname-GigabitEthernet1/0/1] port hybrid pvid vlan 100
[Sysname-GigabitEthernet1/0/1] port hybrid vlan 100 untagged
# Configure VLAN 100 as the PVID of the hybrid Layer 2 aggregate interface Bridge-Aggregation 1, and
assign Bridge-Aggregation 1 to VLAN 100 as an untagged member.
<Sysname> system-view
153
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] port link-type hybrid
[Sysname-Bridge-Aggregation1] port hybrid pvid vlan 100
[Sysname-Bridge-Aggregation1] port hybrid vlan 100 untagged
Related commands
•
port link-type
•
port hybrid vlan
port hybrid vlan
Use port hybrid vlan to assign the hybrid ports to the specified VLANs.
Use undo port hybrid vlan to remove the hybrid ports from the specified VLANs.
Syntax
port hybrid vlan vlan-list { tagged | untagged }
undo port hybrid vlan vlan-list
Default
A hybrid port only allows packets from VLAN 1 to pass through untagged.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Parameters
vlan-list: Specifies a list of VLANs that the hybrid ports will be assigned to in the format of { vlan-id1 [ to
vlan-id2 ] }&<1-10>, where vlan-id1 and vlan-id2 represent VLAN IDs and each range from 1 to 4094,
vlan-id2 must be no smaller than vlan-id1, and &<1-10> indicates that you can specify up to 10 VLAN IDs
or VLAN ID ranges. Make sure that the specified VLANs already exist.
tagged: Configures the ports to send the tagged packets of the specified VLANs.
untagged: Configures the ports to send the untagged packets of the specified VLANs.
Usage guidelines
A hybrid port can carry multiple VLANs. If you use the port hybrid vlan command multiple times, the
VLANs the hybrid port carries are the set of VLANs specified by vlan-list in each execution.
The configuration made in Layer 2 Ethernet interface view applies only to the port.
The configuration made in Layer 2 aggregate interface view applies to the aggregate interface and its
aggregation member ports.
•
If the system fails to apply the configuration to the aggregate interface, it stops applying the
configuration to aggregation member ports.
•
If the system fails to apply the configuration to an aggregation member port, it skips the port and
moves to the next member port.
Examples
# Assign the hybrid port GigabitEthernet 1/0/1 to VLAN 2, VLAN 4, and VLAN 50 through VLAN 100,
and configure GigabitEthernet 1/0/1 to send packets of these VLANs with tags kept.
154
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type hybrid
[Sysname-GigabitEthernet1/0/1] port hybrid vlan 2 4 50 to 100 tagged
# Assign the hybrid Layer 2 aggregate interface Bridge-Aggregation 1 and its member ports to VLAN 2,
and configure them to send packets of VLAN 2 with tags removed.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] port link-type hybrid
[Sysname-Bridge-Aggregation1] port hybrid vlan 2 untagged
Please wait... Done.
Configuring GigabitEthernet1/0/1... Done.
Configuring GigabitEthernet1/0/2... Done.
Configuring GigabitEthernet1/0/3... Done.
The output shows that GigabitEthernet 1/0/1, GigabitEthernet 1/0/2, and GigabitEthernet 1/0/3 are
the member ports of the aggregation group corresponding to Bridge-Aggregation 1.
Related commands
port link-type
port link-type
Use port link-type to configure the link type of a port.
Use undo port link-type to restore the default link type of a port.
Syntax
port link-type { access | hybrid | trunk }
undo port link-type
Default
Any port is an access port.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Parameters
access: Configures the link type of a port as access.
hybrid: Configures the link type of a port as hybrid.
trunk: Configures the link type of a port as trunk.
Usage guidelines
To change the link type of a port from trunk to hybrid or vice versa, you must first set the link type to
access.
After you change the link type of an interface with the port link-type command, the loopback detection
action configured on the interface with the loopback-detection action command automatically restores
155
the default. For more information about the loopback-detection action command, see "Ethernet interface
configuration commands."
The configuration made in Layer 2 Ethernet interface view applies only to the port.
The configuration made in Layer 2 aggregate interface view applies to the aggregate interface and its
aggregation member ports.
•
If the system fails to apply the configuration to the aggregate interface, it stops applying the
configuration to aggregation member ports.
•
If the system fails to apply the configuration to an aggregation member port, it skips the port and
moves to the next member port.
Examples
# Configure GigabitEthernet 1/0/1 as a trunk port.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type trunk
# Configure Layer 2 aggregate interface Bridge-Aggregation 1 and its member ports as hybrid ports.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] port link-type hybrid
port trunk permit vlan
Use port trunk permit vlan to assign the trunk ports to the specified VLANs.
Use undo port trunk permit vlan to remove the trunk ports from the specified VLANs.
Syntax
port trunk permit vlan { vlan-list | all }
undo port trunk permit vlan { vlan-list | all }
Default
A trunk port allows only packets from VLAN 1 to pass through.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Parameters
vlan-list: Specifies a list of VLANs that the trunk ports will be assigned to in the format of { vlan-id1 [ to
vlan-id2 ] }&<1-10>, where vlan-id1 and vlan-id2 represent VLAN IDs and each range from 1 to 4094,
vlan-id2 must be no smaller than vlan-id1, and &<1-10> indicates that you can specify up to 10 VLAN IDs
or VLAN ID ranges. Make sure that the specified VLANs already exist.
all: Permits all VLANs to pass through the trunk ports.
Usage guidelines
A trunk port can carry multiple VLANs. If you use the port trunk permit vlan command multiple times, the
trunk port carries the set of VLANs specified by vlan-list in each execution.
156
On a trunk port, only traffic of the PVID can pass through untagged.
To prevent unauthorized VLAN users from accessing restricted resources, use the port trunk permit vlan
all command with caution.
The configuration made in Layer 2 Ethernet interface view applies only to the port.
The configuration made in Layer 2 aggregate interface view applies to the aggregate interface and its
aggregation member ports.
•
If the system fails to apply the configuration to the aggregate interface, it stops applying the
configuration to aggregation member ports.
•
If the system fails to apply the configuration to an aggregation member port, it skips the port and
moves to the next member port.
Examples
# Assign the trunk port GigabitEthernet 1/0/1 to VLAN 2, VLAN 4, and VLAN 50 through VLAN 100.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type trunk
[Sysname-GigabitEthernet1/0/1] port trunk permit vlan 2 4 50 to 100
Please wait........... Done.
# Assign the trunk Layer 2 aggregate interface Bridge-Aggregation 1 to VLAN 2.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] port link-type trunk
[Sysname-Bridge-Aggregation1] port trunk permit vlan 2
Please wait... Done.
Configuring GigabitEthernet1/0/1... Done.
Configuring GigabitEthernet1/0/2... Done.
Configuring GigabitEthernet1/0/3... Done.
The output shows that GigabitEthernet 1/0/1, GigabitEthernet 1/0/2, and GigabitEthernet 1/0/3 are
the member ports of the aggregation group corresponding to Bridge-Aggregation 1.
Related commands
port link-type
port trunk pvid
Use port trunk pvid to configure the PVID for the trunk port.
Use undo port trunk pvid to restore the default.
Syntax
port trunk pvid vlan vlan-id
undo port trunk pvid
Default
The PVID of a trunk port is VLAN 1.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
157
Default command level
2: System level
Parameters
vlan-id: Specifies a VLAN ID in the range of 1 to 4094.
Usage guidelines
You can use a nonexistent VLAN as the PVID for a trunk port. If you use the undo vlan command to
remove the PVID of a trunk port, it does not affect the setting of the PVID on the port.
The local and remote trunk ports must use the same PVID for the traffic of the PVID to be transmitted
correctly.
You must use the port trunk permit vlan command to configure the trunk port to allow and forward
packets from the PVID.
The configuration made in Layer 2 Ethernet interface view applies only to the port.
The configuration made in Layer 2 aggregate interface view applies to the aggregate interface and its
aggregation member ports.
•
If the system fails to apply the configuration to the aggregate interface, it stops applying the
configuration to aggregation member ports.
•
If the system fails to apply the configuration to an aggregation member port, it skips the port and
moves to the next member port.
Examples
# Configure VLAN 100 as the PVID of the trunk port GigabitEthernet 1/0/1, and assign GigabitEthernet
1/0/1 to VLAN 100.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type trunk
[Sysname-GigabitEthernet1/0/1] port trunk pvid vlan 100
[Sysname-GigabitEthernet1/0/1] port trunk permit vlan 100
# Configure VLAN 100 as the PVID of the trunk Layer 2 aggregate interface Bridge-Aggregation 1, and
assign Bridge-Aggregation 1 to VLAN 100.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] port link-type trunk
[Sysname-Bridge-Aggregation1] port trunk pvid vlan 100
[Sysname-Bridge-Aggregation1] port trunk permit vlan 100
Related commands
•
port link-type
•
port trunk permit vlan
MAC-based VLAN configuration commands
display mac-vlan
Use display mac-vlan to display the specified MAC address-to-VLAN entries.
158
Syntax
display mac-vlan { all | dynamic | mac-address mac-address [ mask mac-mask ] | static | vlan vlan-id }
[ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
all: Displays all MAC address-to-VLAN entries.
dynamic: Displays dynamically configured MAC address-to-VLAN entries.
mac-address mac-address: Displays the MAC address-to-VLAN entry containing the specified MAC
address.
mask mac-mask: Displays the MAC address-to-VLAN entries with their MAC addresses in the specified
range.
static: Displays the statically configured MAC address-to-VLAN entries.
vlan vlan-id: Displays the MAC address-to-VLAN entries associated with the specified VLAN.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
If mac-address mac-address is specified, but mask is not specified, only the MAC address-to-VLAN entry
containing the specified MAC address is displayed.
Examples
# Display all MAC address-to-VLAN entries.
<Sysname> display mac-vlan all
The following MAC-VLAN address exist:
S: Static
D: Dynamic
MAC ADDR
MASK
VLAN ID
PRIO
STATE
------------------------------------------------------------------0008-0001-0000
FFFF-FF00-0000
5
3
S
0002-0001-0000
FFFF-FFFF-FFFF
5
3
S&D
Total MAC VLAN address count:2
Table 36 Command output
Field
Description
S: Static
S stands for the MAC address-to-VLAN entries that are configured statically.
159
Field
Description
D: Dynamic
D stands for the MAC address-to-VLAN entries that are configured dynamically.
MAC ADDR
MAC address of a MAC address-to-VLAN entry.
MASK
Mask of the MAC address of a MAC address-to-VLAN entry.
VLAN ID
VLAN ID of a MAC address-to-VLAN entry.
PRIO
802.1p priority corresponding to the MAC address of a MAC address-to-VLAN
entry.
State of a MAC address-to-VLAN entry:
STATE
• S—The MAC address-to-VLAN entry is configured statically.
• D—The MAC address-to-VLAN entry is configured automatically through the
authentication server.
• S&D—The MAC address-to-VLAN entry is configured both statically and
dynamically.
display mac-vlan interface
Use display mac-vlan interface to display all ports with MAC-based VLAN enabled.
Syntax
display mac-vlan interface [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display all interfaces with MAC-based VLAN enabled.
<Sysname> display mac-vlan interface
MAC VLAN is enabled on following ports:
--------------------------------------GigabitEthernet1/0/1
GigabitEthernet1/0/2
Related commands
mac-vlan enable
160
GigabitEthernet1/0/3
mac-vlan enable
Use mac-vlan enable to enable the MAC-based VLAN feature on a port.
Use undo mac-vlan enable to disable the MAC-based VLAN feature on a port.
Syntax
mac-vlan enable
undo mac-vlan enable
Default
The MAC-based VLAN feature is disabled on a port.
Views
Layer 2 Ethernet port view
Default command level
2: System level
Usage guidelines
This command is available on only hybrid ports.
Examples
# Enable the MAC-based VLAN feature on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname] port link-type hybrid
[Sysname–GigabitEthernet1/0/1] mac-vlan enable
mac-vlan mac-address
Use mac-vlan mac-address to associate the specified VLAN and priority value with the specified MAC
addresses.
Use undo mac-vlan to remove the association.
Syntax
mac-vlan mac-address mac-address [ mask mac-mask ] vlan vlan-id [ priority pri ]
undo mac-vlan { all | mac-address mac-address [ mask mac-mask ] | vlan vlan-id }
Default
The hexadecimal digits of this argument are all Fs.
Views
System view
Default command level
2: System level
Parameters
mac-address mac-address: Specifies a MAC address.
161
mask mac-mask: Specifies a mask for the MAC address in the format of H-H-H. The mac-mask argument
is comprised of the high-order part (all binary bits of which are 1s) and the low-order part (all binary bits
of which are 0s).
vlan vlan-id: Specifies a VLAN ID in the range of 1 to 4094.
priority pri: Specifies the 802.1p priority value corresponding to the specified MAC address. The pri
argument is in the range of 0 to 7.
all: Removes all static MAC address-to-VLAN entries.
Usage guidelines
Two MAC address-to-VLAN entry tables exist in a device. One table contains the MAC address-to-VLAN
entries configured with the mask keyword specified. A MAC address-to-VLAN entry of this type describes
the relationship between a group of MAC addresses and a VLAN, and a priority value. Another table
contains the MAC address-to-VLAN entries configured without the mask keyword specified. A MAC
address-to-VLAN entry of this type describes the relationship between a single MAC address and a
VLAN, and a priority value. The system adds or removes MAC address-to-VLAN entries to or from the two
tables according to the configuration.
Examples
# Associate a single MAC address 0-1-1 with VLAN 100 and 802.1p priority 7.
<Sysname> system-view
[Sysname] mac-vlan mac-address 0-1-1 vlan 100 priority 7
# Associate the MAC addresses with the high-order six hexadecimal digits being 121122 with VLAN 100
and 802.1p priority 4.
<Sysname> system-view
[Sysname] mac-vlan mac-address 1211-2222-3333 mask ffff-ff00-0000 vlan 100 priority 4
mac-vlan trigger enable
Use mac-vlan trigger enable to enable dynamic MAC-based VLAN assignment. The port configured with
this command is dynamically assigned to VLANs based on the source MAC addresses of the received
packets.
Use undo mac-vlan trigger enable to restore the default.
Syntax
mac-vlan trigger enable
undo mac-vlan trigger enable
Default
Dynamic MAC-based VLAN assignment is not enabled.
Views
Layer 2 Ethernet port view
Default command level
2: System level
Usage guidelines
After receiving a packet with an unknown source MAC address, a port submits the packet to the CPU.
162
If the source MAC address matches a MAC address-to-VLAN entry (whose mask is all Fs) maintained by
the device, the device dynamically learns the source MAC address and assigns the receiving port to the
corresponding VLAN. Then, subsequent packets with this source MAC address can be directly
forwarded through the port.
If the MAC address does not match any MAC address-to-VLAN entry or matches only a MAC
address-to-VLAN entry whose mask is not all Fs, the device does not dynamically learn the MAC address
and assign the receiving port to the corresponding VLAN.
Examples
# Enable dynamic MAC-based VLAN assignment on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] mac-vlan trigger enable
port pvid disable
Use port pvid disable to disable the PVID of the port from forwarding packets whose source MAC
addresses do not match any MAC address-to-VLAN entry.
Use undo port pvid disable to restore the default.
Syntax
port pvid disable
undo port pvid disable
Default
When a port receives a packet with an unknown source MAC address that does not match any MAC
address-to-VLAN entry, it forwards the packet in its PVID.
Views
Layer 2 Ethernet port view
Default command level
2: System level
Examples
# Disable the PVID of GigabitEthernet 1/0/1 from forwarding packets whose source MAC addresses do
not match any MAC address-to-VLAN entry.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port pvid disable
vlan precedence
Use vlan precedence to set the order of VLAN matching.
Use undo vlan precedence to restore the default.
Syntax
vlan precedence { mac-vlan | ip-subnet-vlan }
undo vlan precedence
163
Default
VLANs are matched based on single MAC addresses preferentially.
Views
Layer 2 Ethernet port view
Default command level
2: System level
Parameters
mac-vlan: Matches VLANs based on single MAC addresses preferentially.
ip-subnet-vlan: Matches VLANs based on IP subnets preferentially.
Usage guidelines
This command only applies to VLANs based on a single MAC address and IP subnet-based VLANs.
If both the MAC-based VLAN function and the IP subnet-based VLAN function are created on a port,
MAC address-to-VLAN entries are matched preferentially, and the remaining VLAN entries (VLAN entries
based on a single MAC address and IP subnet-based VLANs) are matched as configured by the vlan
precedence command.
Examples
# Configure matching VLANs based on single MAC addresses preferentially on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] vlan precedence mac-vlan
Protocol-based VLAN configuration commands
display protocol-vlan interface
Use display protocol-vlan interface to display information about protocol-based VLANs for the specified
ports.
Syntax
display protocol-vlan interface { interface-type interface-number1 [ to interface-type interface-number2 ]
| all } [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
2: System level
Parameters
interface-type interface-number1: Specifies an interface by its type and number.
interface-type interface-number1 to interface-type interface-number2: Specifies an interface range.
all: Displays information about protocol-based VLANs on all ports.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
164
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display protocol-based VLAN information on GigabitEthernet 1/0/1.
[Sysname] display protocol-vlan interface gigabitethernet 1/0/1
Interface: GigabitEthernet1/0/1
VLAN ID
Protocol Index
Protocol Type
======================================================
2
0
ipv6
3
0
ipv4
Table 37 Command output
Field
Description
VLAN ID
ID of the protocol-based VLAN bound to the port.
Protocol Index
Protocol template index.
Protocol Type
Protocol type specified by the protocol template.
display protocol-vlan vlan
Use display protocol-vlan vlan to display the protocols and protocol indexes configured on the specified
VLANs.
Syntax
display protocol-vlan vlan { vlan-id1 [ to vlan-id2 ] | all } [ | { begin | exclude | include }
regular-expression ]
Views
Any view
Default command level
2: System level
Parameters
vlan-id1: Specifies a protocol-based VLAN ID in the range of 1 to 4094.
vlan-id1 to vlan-id2: Displays protocol-based VLAN information of a VLAN range from vlan-id1 to
vlan-id2. vlan-id1 and vlan-id2 represent VLAN IDs and each range from 1 to 4094. vlan-id2 must be no
smaller than vlan-id1.
all: Displays information about all protocol-based VLANs.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
165
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display the protocols and protocol indexes configured on all protocol-based-VLANs.
<Sysname> display protocol-vlan vlan all
VLAN ID:2
Protocol Index
Protocol Type
======================================================
0
ipv4
3
ipv6
VLAN ID:3
Protocol Index
Protocol Type
======================================================
0
ipv4
1
ipv6
Table 38 Command output
Field
Description
VLAN ID
ID of the protocol-based VLAN bound to the port.
Protocol Index
Protocol template index.
Protocol Type
Protocol type specified by the protocol template.
Related commands
display vlan
port hybrid protocol-vlan
Use port hybrid protocol-vlan to associate the hybrid ports with a protocol-based VLAN.
Use undo port hybrid protocol-vlan to remove the association.
Syntax
port hybrid protocol-vlan vlan vlan-id { protocol-index [ to protocol-end ] | all }
undo port hybrid protocol-vlan { vlan vlan-id { protocol-index [ to protocol-end ] | all } | all }
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Parameters
vlan vlan-id: Specifies a VLAN ID in the range of 1 to 4094.
protocol-index: Specifies a protocol index in the range of 0 to 15. The value can be specified by the users
or assigned by the system automatically when the protocol-based VLAN is created. You can use the
display protocol-vlan vlan all command to display the protocol indexes.
166
to protocol-end: Specifies the end protocol index. The protocol-end argument is in the range of 0 to 15,
and must be greater than or equal to the beginning protocol index.
all: Specifies all protocols bound to vlan-id.
Usage guidelines
The configuration made in Layer 2 Ethernet interface view applies only to the port.
The configuration made in Layer 2 aggregate interface view applies to the aggregate interface and its
aggregation member ports.
•
If the system fails to apply the configuration to the aggregate interface, it stops applying the
configuration to aggregation member ports.
•
If the system fails to apply the configuration to an aggregation member port, it skips the port and
moves to the next member port.
Before you use this command, make the following configurations:
•
Create a VLAN and associate it with specified protocols.
•
Configure the link type as hybrid.
•
Configure the port to allow the protocol-based VLAN to pass through.
Examples
# Associate the hybrid port GigabitEthernet 1/0/1 with protocol 0 (IPv4) in VLAN 2.
<Sysname> system-view
[Sysname] vlan 2
[Sysname-vlan2] protocol-vlan ipv4
[Sysname-vlan2] quit
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type hybrid
[Sysname-GigabitEthernet1/0/1] port hybrid vlan 2 untagged
Please wait... Done
[Sysname-GigabitEthernet1/0/1] port hybrid protocol-vlan vlan 2 0
# Associate the hybrid Layer 2 aggregate interface Bridge-Aggregation 1 with protocol 0 in VLAN 2.
<Sysname> system-view
[Sysname] vlan 2
[Sysname-vlan2] protocol-vlan ipv4
[Sysname-vlan2] quit
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] port link-type hybrid
[Sysname-Bridge-Aggregation1] port hybrid vlan 2 untagged
Please wait... Done
Configuring GigabitEthernet1/0/1... Done.
Configuring GigabitEthernet1/0/2... Done.
Configuring GigabitEthernet1/0/3... Done.
[Sysname-Bridge-Aggregation1] port hybrid protocol-vlan vlan 2 0
The output shows that GigabitEthernet 1/0/1, GigabitEthernet 1/0/2, and GigabitEthernet 1/0/3 are
the member ports of the aggregation group corresponding to Bridge-Aggregation 1.
Related commands
display protocol-vlan interface
167
protocol-vlan
Use protocol-vlan to configure the VLAN as a protocol based VLAN and to configure the protocol
template for the VLAN.
Use undo protocol-vlan to remove the configured protocol template.
Syntax
protocol-vlan [ protocol-index ] { at | ipv4 | ipv6 | ipx { ethernetii | llc | raw | snap } | mode
{ ethernetii etype etype-id | llc { dsap dsap-id [ ssap ssap-id ] | ssap ssap-id } | snap etype etype-id } }
undo protocol-vlan { protocol-index [ to protocol-end ] | all }
Default
No VLAN is bound to any protocol template.
Views
VLAN view
Default command level
2: System level
Parameters
at: Specifies the AppleTalk based VLAN.
ipv4: Specifies the IPv4 based VLAN.
ipv6: Specifies the IPv6 based VLAN.
ipx: Specifies the IPX based VLAN. The keywords ethernetii, llc, raw, and snap are encapsulation
formats for IPX.
mode: Configures a user-defined protocol template for the VLAN, which could also have the following
encapsulation formats: ethernetii, llc, and snap.
ethernetii etype etype-id: Matches Ethernet II encapsulation format and the corresponding protocol type
values. The etype-id argument is the protocol type ID of inbound packets, in the range of 0x0600 to
0xFFFF (excluding 0x0800, 0x809B, 0x8137, and 0x86DD).
llc: Matches the llc encapsulation format.
dsap dsap-id: Specifies the destination service access point in the range of 0x00 to 0xFF.
ssap ssap-id: Specifies the source service access point in the range of 0x00 to 0xFF.
snap etype etype-id: Matches SNAP encapsulation format and the corresponding protocol type values.
The etype-id argument is the Ethernet type of inbound packets, in the range of 0x0600 to 0xFFFF
(excluding 0x8137).
protocol-index: Specifies a protocol template index in the range of 0 to 15. The system automatically
assigns an index if this parameter is not specified.
to protocol-end: Specifies the end protocol index. The protocol-end argument is in the range of 0 to 15,
and must be greater than or equal to the protocol-index argument.
all: Removes all protocols bound to the VLAN.
168
Usage guidelines
When you use the mode keyword to configure a user-defined protocol template, do not set etype-id in
ethernetii etype etype-id to 0x0800, 0x809B, 0x8137, or 0x86DD. Otherwise, the encapsulation format
of the matching packets is the same as that of the IPv4, AppleTalk, IPX, and IPv6 packets, respectively.
Do not configure both the dsap-id and ssap-id arguments in the protocol-vlan command as 0xE0 or 0xFF
when you configure the user-defined template for llc encapsulation. Otherwise, the encapsulation format
of the matching packets is the same as that of the ipx llc or ipx raw packets, respectively. When either of
the dsap-id and ssap-id arguments is configured, the system assigns 0XAA to the other argument.
When you use the mode keyword to configure a user-defined protocol template, do not set etype-id in
snap etype etype-id to 0x8137. Otherwise, the template format is the same as that of the IPX protocol. You
can set etype-id to 0x0800, 0x809B, or 0x86DD, corresponding to IPv4, AppleTalk, and IPv6,
respectively.
Examples
CAUTION:
IP uses ARP for address resolution in Ethernet. To prevent communication failure, configure the IP and ARP
templates in the same VLAN and associate them with the same port.
# Configure VLAN 3 as an IPv4 based VLAN.
<Sysname> system-view
[Sysname] vlan 3
[Sysname-vlan3] protocol-vlan ipv4
# Create an ARP protocol template for VLAN 3 (ARP code is 0x0806) to make VLAN 3 transmit ARP
packets.
•
To use Ethernet encapsulation, use this command:
[Sysname-vlan3] protocol-vlan mode ethernetii etype 0806
•
To use 802.3 encapsulation, use this command:
[Sysname-vlan3] protocol-vlan mode snap etype 0806
Related commands
display protocol-vlan vlan
IP subnet-based VLAN configuration commands
display ip-subnet-vlan interface
Use display ip-subnet-vlan interface to display IP subnet-based VLANs and IP subnet indexes on the
specified ports.
Syntax
display ip-subnet-vlan interface { interface-type interface-number1 [ to interface-type interface-number2 ]
| all } [ | { begin | exclude | include } regular-expression ]
Views
Any view
169
Default command level
2: System level
Parameters
interface-type interface-number1: Specifies an interface by its type and number.
interface-type interface-number1 to interface-type interface-number2: Specifies an interface range.
interface-number2 must be no smaller than interface-number1.
all: Displays IP subnet information about all ports with IP subnet-based VLAN configured.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display IP subnet-based VLANs and IP subnet indexes on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] display ip-subnet-vlan interface gigabitethernet 1/0/1
Interface: GigabitEthernet1/0/1
VLAN ID
Subnet-Index
IP ADDRESS
NET MASK
=======================================================
3
0
192.168.1.0
255.255.255.0
Table 39 Command output
Field
Description
Subnet-Index
Index of the IP subnet.
IP ADDRESS
IP address of the subnet (either an IP address or a network address).
NET MASK
Mask of the IP subnet.
display ip-subnet-vlan vlan
Use display ip-subnet-vlan vlan to display the IP subnet-based VLAN information and IP subnet indexes
on the specified VLANs.
Syntax
display ip-subnet-vlan vlan { vlan-id1 [ to vlan-id2 ] | all } [ | { begin | exclude | include }
regular-expression ]
Views
Any view
Default command level
2: System level
170
Parameters
vlan-id1: Specifies a VLAN ID in the range of 1 to 4094.
vlan-id1 to vlan-id2: Specifies a VLAN ID range. vlan-id1 and vlan-id2 represent VLAN IDs and each
range from 1 to 4094. vlan-id2 must be no smaller than vlan-id1.
all: Specifies all VLANs.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display the IP subnet-based VLAN information and IP subnet indexes for all VLANs.
<Sysname> display ip-subnet-vlan vlan all
VLAN ID:
3
Subnet Index
IP Address
Subnet Mask
====================================================
0
192.168.1.0
255.255.255.0
Table 40 Command output
Field
Description
Subnet Index
IP subnet index.
IP Address
IP address of the subnet (either an IP address or a network address).
Subnet Mask
Mask of the IP subnet.
Related commands
display vlan
ip-subnet-vlan
Use ip-subnet-vlan to associate the VLAN with a specified IP subnet or IP address.
Use undo ip-subnet-vlan to remove the association.
Syntax
ip-subnet-vlan [ ip-subnet-index ] ip ip-address [ mask ]
undo ip-subnet-vlan { ip-subnet-index [ to ip-subnet-end ] | all }
Views
VLAN view
Default command level
2: System level
171
Parameters
ip-subnet-index: Specifies a beginning IP subnet index in the range of 0 to 11. The value can be
configured by users, or automatically numbered by the system, based on the order in which the IP subnets
or IP addresses are associated with the VLAN.
ip ip-address [ mask ]: Specifies the source IP address or network address based on which the
subnet-based VLANs are classified, in dotted decimal notation. The mask argument is the subnet mask of
the source IP address or network address, in dotted decimal notation with a default value of
255.255.255.0.
to: Specifies an IP subnet index range.
ip-subnet-end: Specifies an end IP subnet index in the range of 0 to 11. The value must be greater than
or equal to the beginning IP subnet index.
all: Removes all associations between VLANs and IP subnets or IP addresses.
Usage guidelines
The IP subnet or IP address cannot be a multicast network segment or a multicast address.
Examples
# Configure VLAN 3 as an IP subnet-based VLAN and associate it with the 192.168.1.0/24 network
segment.
<Sysname> system-view
[Sysname] vlan 3
[Sysname-vlan3] ip-subnet-vlan ip 192.168.1.0 255.255.255.0
Related commands
display ip-subnet-vlan vlan
port hybrid ip-subnet-vlan
Use port hybrid ip-subnet-vlan to associate the Ethernet port with the specified IP subnet-based VLAN.
Use undo port hybrid ip-subnet-vlan to remove the association.
Syntax
port hybrid ip-subnet-vlan vlan vlan-id
undo port hybrid ip-subnet-vlan { vlan vlan-id | all }
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Parameters
vlan vlan-id: Specifies a VLAN ID in the range of 1 to 4094.
all: Specifies all VLANs.
Usage guidelines
On an Ethernet port associated with an IP subnet-based VLAN, if the source IP address of a received
untagged packet belongs to the corresponding IP subnet, the port tags the packet with the corresponding
VLAN tag.
172
The configuration made in Layer 2 Ethernet interface view applies only to the port.
The configuration made in Layer 2 aggregate interface view applies to the aggregate interface and its
aggregation member ports.
•
If the system fails to apply the configuration to the aggregate interface, it stops applying the
configuration to aggregation member ports.
•
If the system fails to apply the configuration to an aggregation member port, it skips the port and
moves to the next member port.
Only hybrid ports support this feature. Before you use this command, assign the port to the IP
subnet-based VLAN with which you want to associate.
Examples
# Associate GigabitEthernet 1/0/1 with the IP subnet-based VLAN 3.
<Sysname> system-view
[Sysname] vlan 3
[Sysname-vlan3] ip-subnet-vlan ip 192.168.1.0 255.255.255.0
[Sysname-vlan3] quit
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type hybrid
[Sysname-GigabitEthernet1/0/1] port hybrid vlan 3 untagged
Please wait... Done.
[Sysname-GigabitEthernet1/0/1] port hybrid ip-subnet-vlan vlan 3
# Associate the hybrid Layer 2 aggregate interface Bridge-Aggregation 1 with the IP subnet-based VLAN
3.
<Sysname> system-view
[Sysname] vlan 3
[Sysname-vlan3] ip-subnet-vlan ip 192.168.1.0 255.255.255.0
[Sysname-vlan3] quit
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] port link-type hybrid
[Sysname-Bridge-Aggregation1] port hybrid vlan 3 untagged
Please wait... Done
Configuring GigabitEthernet1/0/1... Done.
Configuring GigabitEthernet1/0/2... Done.
Configuring GigabitEthernet1/0/3... Done.
[Sysname-Bridge-Aggregation1] port hybrid ip-subnet-vlan vlan 3
The output shows that GigabitEthernet 1/0/1, GigabitEthernet 1/0/2, and GigabitEthernet 1/0/3 are
the member ports of the aggregation group corresponding to Bridge-Aggregation 1.
Related commands
display ip-subnet-vlan interface
173
Isolate-user-VLAN configuration commands
display isolate-user-vlan
Use display isolate-user-vlan to display the mapping between an isolate-user-VLAN and secondary
VLANs.
Syntax
display isolate-user-vlan [ isolate-user-vlan-id ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
isolate-user-vlan-id: Specifies an isolate-user-VLAN ID in the range of 1 to 4094.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display the mapping between an isolate-user-VLAN and secondary VLANs.
<Sysname> display isolate-user-vlan
Isolate-user-VLAN VLAN ID : 2
Secondary VLAN ID : 3 4
VLAN ID: 2
VLAN Type: static
Isolate-user-VLAN type : isolate-user-VLAN
Route Interface: configured
IP Address: 1.1.1.1
Subnet Mask: 255.255.255.0
Description: VLAN 0002
Name: VLAN 0002
Tagged
Ports: none
Untagged Ports:
GigabitEthernet1/0/2
GigabitEthernet1/0/3
VLAN ID: 3
VLAN Type: static
174
GigabitEthernet1/0/4
Isolate-user-VLAN type : secondary
Route Interface: not configured
Description: VLAN 0003
Name: VLAN 0003
Tagged
Ports: none
Untagged Ports:
GigabitEthernet1/0/2
GigabitEthernet1/0/3
VLAN ID: 4
VLAN Type: static
Isolate-user-VLAN type : secondary
Route Interface: not configured
Description: VLAN 0004
Name: VLAN 0004
Tagged
Ports: none
Untagged Ports:
GigabitEthernet1/0/2
GigabitEthernet1/0/4
Table 41 Command output
Field
Description
VLAN Type
VLAN type (static or dynamic).
Isolate-user-VLAN type
VLAN type (isolate-user-VLAN or secondary VLAN).
Route Interface
Indicates whether a VLAN interface is configured for the VLAN.
IP Address
IP address of the VLAN interface, if configured. This field is not displayed
if no IP address is configured for the VLAN interface.
Subnet Mask
Subnet mask of the VLAN interface, if configured. This field is not
displayed if no mask is configured for the VLAN interface.
Description
VLAN description.
Name
VLAN name.
Tagged Ports
Ports through which packets of the VLAN are sent tagged.
Untagged Ports
Ports through which packets of the VLAN are sent untagged.
Related commands
•
isolate-user-vlan
•
isolate-user-vlan enable
isolate-user-vlan
Use isolate-user-vlan to associate an isolate-user-VLAN with the specified secondary VLANs.
Use undo isolate-user-vlan to remove the association.
Syntax
isolate-user-vlan isolate-user-vlan-id secondary secondary-vlan-id [ to secondary-vlan-id ]
undo isolate-user-vlan isolate-user-vlan-id [ secondary secondary-vlan-id [ to secondary-vlan-id ] ]
175
Default
An isolate-user-VLAN is not associated with any secondary VLAN.
Views
System view
Default command level
2: System level
Parameters
isolate-user-vlan-id: Specifies an isolate-user-VLAN ID in the range of 1 to 4094. Do not specify VLAN 1
for this argument.
secondary secondary-vlan-id [ to secondary-vlan-id ]: Specifies a secondary VLAN ID or a secondary
VLAN ID range. The secondary-vlan-id argument is a secondary VLAN ID in the range of 1 to 4094. Do
not specify VLAN 1 for this argument.
Usage guidelines
The undo isolate-user-vlan command without the secondary secondary-vlan-id parameter specified
removes the association between the specified isolate-user-VLAN and all its secondary VLANs.
The undo isolate-user-vlan command with the secondary secondary-vlan-id parameter specified only
removes the association between the specified isolate-user-VLAN and the specified secondary VLANs.
Examples
# Associate isolate-user-VLAN 2 with secondary VLAN 3 and secondary VLAN 4.
<Sysname> system-view
[Sysname] vlan 2
[Sysname-vlan2] isolate-user-vlan enable
[Sysname-vlan2] port gigabitethernet 1/0/2
[Sysname-vlan2] vlan 3
[Sysname-vlan3] port gigabitethernet 1/0/3
[Sysname-vlan3] vlan 4
[Sysname-vlan4] port gigabitethernet 1/0/4
[Sysname-vlan4] quit
[Sysname] isolate-user-vlan 2 secondary 3 to 4
Related commands
display isolate-user-vlan
isolate-user-vlan enable
Use isolate-user-vlan enable to configure a VLAN as an isolate-user-VLAN.
Use undo isolate-user-vlan enable to remove the isolate-user-VLAN configuration for the VLAN.
Syntax
isolate-user-vlan enable
undo isolate-user-vlan enable
Default
No VLAN is an isolate-user-VLAN.
176
Views
VLAN view
Default command level
2: System level
Usage guidelines
An isolate-user-VLAN may include multiple ports, including the one connected to the upstream device.
Examples
# Configure VLAN 5 as an isolate-user-VLAN.
<Sysname> system-view
[Sysname] vlan 5
[Sysname-vlan5] isolate-user-vlan enable
Related commands
display isolate-user-vlan
isolated-vlan enable
Use isolated-vlan enable to configure Layer 2 isolation between ports in the same secondary VLAN.
Use undo isolated-vlan enable to restore the default.
Syntax
isolated-vlan enable
undo isolated-vlan enable
Default
Ports in the same secondary VLAN can communicate at Layer 2.
Views
VLAN view
Default command level
2: System level
Usage guidelines
After you configure the isolated-vlan enable command in VLAN view, you cannot assign any port in the
VLAN to an isolation group.
Layer 2 isolation configured with the isolated-vlan enable command takes effect only when the
isolate-user-VLAN type of each port in the secondary VLAN is configured as host and the secondary
VLAN is associated with an isolate-user-VLAN.
Examples
# Configure Layer 2 isolation between ports in secondary VLAN 4, where GigabitEthernet 1/0/1 is the
uplink port, and GigabitEthernet 1/0/2 and GigabitEthernet 1/0/3 are the downlink ports.
<Sysname> system-view
[Sysname] vlan 2
[Sysname-vlan2] isolate-user-vlan enable
[Sysname-vlan2] quit
[Sysname] vlan 4
177
[Sysname-vlan4] quit
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port isolate-user-vlan 2 promiscuous
[Sysname-GigabitEthernet1/0/1] quit
[Sysname] interface gigabitethernet 1/0/2
[Sysname-GigabitEthernet1/0/2] port access vlan 4
[Sysname-GigabitEthernet1/0/2] port isolate-user-vlan host
[Sysname-GigabitEthernet1/0/2] quit
[Sysname] interface gigabitethernet 1/0/3
[Sysname-GigabitEthernet1/0/3] port access vlan 4
[Sysname-GigabitEthernet1/0/3] port isolate-user-vlan host
[Sysname-GigabitEthernet1/0/3] quit
[Sysname] isolate-user-vlan 2 secondary 4
[Sysname] vlan 4
[Sysname-vlan4] isolated-vlan enable
Related commands
isolate-user-vlan
port isolate-user-vlan promiscuous
Use port isolate-user-vlan promiscuous to configure a port to operate in promiscuous mode in a VLAN.
Use undo port isolate-user-vlan to restore the default.
Syntax
port isolate-user-vlan vlan-id promiscuous
undo port isolate-user-vlan
Default
A port does not operate in promiscuous mode or host mode.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Parameters
vlan-id: Specifies a VLAN ID in the range of 2 to 4094.
Usage guidelines
HP recommends assigning access or hybrid ports to an isolate-user-VLAN.
When you use the port isolate-user-vlan vlan-id promiscuous command on a port that is operating in
promiscuous mode, the device automatically executes the undo port isolate-user-vlan command to
cancel the promiscuous mode of the port first.
If you specify an isolate-user-VLAN in the command, the switch automatically assigns the target port to
both the specified VLAN and all secondary VLANs associated with it. If you specify a
non-isolate-user-VLAN in the command, the switch assigns the target port only to the specified VLAN.
However, when the isolate-user-VLAN setting is configured for that VLAN, the switch immediately assigns
the port to all secondary VLANs associated with the isolate-user-VLAN.
178
In automatic assignment to the isolate-user-VLAN and secondary VLANs for an access port, the switch
also changes the link type of the port to hybrid, and sets the isolate-user-VLAN as the PVID of the port. If
the isolate-user-VLAN setting is configured later than the execution of the port isolate-user-vlan vlan-id
promiscuous command, the link type and PVID do not change until the isolate-user-VLAN setting is
configured on the VLAN specified in the command.
The link type and PVID never change on a trunk port or hybrid port in the automatic VLAN assignment
process.
After the port link type changes, the switch keeps the member attribute of the hybrid port unchanged in
the VLANs where it is already a tagged member, and automatically assigns the port to the remaining
VLANs as an untagged member.
When you execute the undo port isolate-user-vlan command, follow these guidelines:
•
The command cancels the promiscuous mode of a port. It does not remove an access port from the
specific VLAN, but removes a trunk or hybrid port from the specific VLAN.
•
If the specific VLAN has been configured as an isolate-user-VLAN and associated with secondary
VLANs, the command does not remove the port from the secondary VLANs.
Examples
# Configure access port GigabitEthernet 1/0/1 to operate in promiscuous mode in isolate-user-VLAN 2,
which is associated with secondary VLAN 20, and then cancel the configuration.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] display this
#
interface GigabitEthernet1/0/1
port link-mode bridge
#
return
[Sysname-GigabitEthernet1/0/1] port isolate-user-vlan 2 promiscuous
[Sysname-GigabitEthernet1/0/1] display this
#
interface GigabitEthernet1/0/1
port link-mode bridge
port isolate-user-vlan 2 promiscuous
port link-type hybrid
undo port hybrid vlan 1
port hybrid vlan 2 20 untagged
port hybrid pvid vlan 2
#
return
[Sysname-GigabitEthernet1/0/1] undo port isolate-user-vlan
[Sysname-GigabitEthernet1/0/1] display this
#
interface GigabitEthernet1/0/1
port link-mode bridge
port link-type hybrid
undo port hybrid vlan 1
port hybrid vlan 20 untagged
port hybrid pvid vlan 2
179
#
return
# Assign access port GigabitEthernet 1/0/1 to VLAN 10, which is not an isolate-user-VLAN, configure
the port to operate in promiscuous mode in VLAN 10, and then cancel the configuration.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] display this
#
interface GigabitEthernet1/0/1
port link-mode bridge
#
return
[Sysname-GigabitEthernet1/0/1] port isolate-user-vlan 10 promiscuous
[Sysname-GigabitEthernet1/0/1] display this
#
interface GigabitEthernet1/0/1
port link-mode bridge
port isolate-user-vlan 10 promiscuous
port access vlan 10
#
return
[Sysname-GigabitEthernet1/0/1] undo port isolate-user-vlan
[Sysname-GigabitEthernet1/0/1] display this
#
interface GigabitEthernet1/0/1
port link-mode bridge
port access vlan 10
#
return
port isolate-user-vlan host
Use port isolate-user-vlan host to configure a port to operate in host mode.
Use undo port isolate-user-vlan to restore the default.
Syntax
port isolate-user-vlan host
undo port isolate-user-vlan
Default
A port does not operate in promiscuous mode or host mode.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
180
Usage guidelines
You cannot assign trunk ports to a secondary VLAN.
If the port has been assigned to a secondary VLAN, the switch automatically assigns the target port to
the isolate-user-VLAN associated with the secondary VLAN. If the port has not been assigned to a
secondary VLAN, the switch immediately assigns the target port to the isolate-user-VLAN associated with
the secondary VLAN after the port is assigned to a secondary VLAN.
In automatic assignment to the isolate-user-VLAN associated with the secondary VLAN for an access port,
the switch also changes the link type of the port to hybrid, and sets the secondary VLAN as the PVID of
the port.
The link type and PVID never change on a trunk port or hybrid port in the automatic VLAN assignment
process.
After the port link type changes, the switch keeps the member attribute of the hybrid port unchanged
when it is already a tagged member of the isolate-user-VLAN, and otherwise automatically assigns the
port to the isolate-user-VLAN as an untagged member.
When you execute the undo port isolate-user-vlan command, the command cancels the host mode of a
port. It does not remove the port from the isolate-user-VLAN.
Examples
# Configure access port GigabitEthernet 1/0/1 to operate in host mode and assign the port to
secondary VLAN 20, which is associated with isolate-user-VLAN 2.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port isolate-user-vlan host
[Sysname-GigabitEthernet1/0/1] display this
#
interface GigabitEthernet1/0/1
port link-mode bridge
port isolate-user-vlan host
#
return
[Sysname-GigabitEthernet1/0/1] port access vlan 20
[Sysname-GigabitEthernet1/0/1] display this
#
interface GigabitEthernet1/0/1
port link-mode bridge
port isolate-user-vlan host
port link-type hybrid
undo port hybrid vlan 1
port hybrid vlan 2 20 untagged
port hybrid pvid vlan 20
#
return
181
GVRP configuration commands
display garp statistics
Use display garp statistics to display the GARP statistics of the specified ports. If no ports are specified,
this command displays the GARP statistics for all ports.
Syntax
display garp statistics [ interface interface-list ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
interface interface-list: Displays the GARP statistics of one or multiple ports. You can specify up to 10 port
lists. By using each port list, you can specify a single port in the form of interface-type interface-number,
or a port range in the form of interface-type interface-number1 to interface-type interface-number2,
where the end port number specified by interface-number2 must be greater than the start port number
specified by interface-number1.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
This command displays the statistics about GVRP PDUs received, transmitted, and dropped on
GVRP-enabled ports. When the system is restarted or after you use the reset garp statistics command, the
existing packet statistics are cleared and the system starts to collect new GARP statistics. With the
statistics, you can judge whether a GVRP-enabled port is operating correctly.
•
If the number of received and transmitted GVRP PDUs on the port is the same as the remote port, it
indicates that the two ends are transmitting and receiving GVRP PDUs correctly and no registration
information is lost.
•
If the port drops GVRP PDUs, you should check its registration mode. GVRP PDUs are likely to be
dropped if the registration mode is fixed or forbidden, because dynamic VLANs cannot be
registered in these two modes.
Examples
# Display GARP statistics on ports GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2.
<Sysname> display garp statistics interface gigabitethernet 1/0/1 to gigabitethernet 1/0/2
GARP statistics on port GigabitEthernet1/0/1
182
Number of GVRP Frames Received
: 5
Number of GVRP Frames Transmitted
: 2
Number of Frames Discarded
: 1
GARP statistics on port GigabitEthernet1/0/2
Number of GVRP Frames Received
: 3
Number of GVRP Frames Transmitted
: 4
Number of Frames Discarded
: 2
Related commands
reset garp statistics
display garp timer
Use display garp timer to display GARP timers on specific ports. If no ports are specified, this command
displays the GARP timers on all ports.
Syntax
display garp timer [ interface interface-list ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
interface interface-list: Displays the GARP timer settings of one or multiple ports. You can specify up to 10
port lists. By using each port list, you can specify a single port in the form of interface-type
interface-number, or a port range in the form of interface-type interface-number1 to interface-type
interface-number2, where the end port number specified by interface-number2 must be greater than the
start port number specified by interface-number1.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display GARP timers on port GigabitEthernet 1/0/1.
<Sysname> display garp timer interface gigabitethernet 1/0/1
GARP timers on port GigabitEthernet1/0/1
Garp Join Time
: 20 centiseconds
Garp Leave Time
: 60 centiseconds
Garp LeaveAll Time
: 1000 centiseconds
183
Garp Hold Time
: 10 centiseconds
Related commands
•
garp timer hold
•
garp timer join
•
garp timer leave
•
garp timer leaveall
display gvrp local-vlan
Use display gvrp local-vlan to display the local VLAN information maintained by GVRP on the specified
port.
Syntax
display gvrp local-vlan interface interface-type interface-number [ | { begin | exclude | include }
regular-expression ]
Views
Any view
Default command level
0: Visit level
Parameters
interface interface-type interface-number: Specifies an interface by its type and number.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display the local VLAN information maintained by GVRP on GigabitEthernet 1/0/1.
<Sysname> display gvrp local-vlan interface gigabitethernet 1/0/1
Following VLANs exist in GVRP local database:
1(default),2-500
display gvrp state
Use display gvrp state to display GVRP state machines in a specified VLAN on a port.
Syntax
display gvrp state interface interface-type interface-number vlan vlan-id [ | { begin | exclude | include }
regular-expression ]
Views
Any view
184
Default command level
0: Visit level
Parameters
interface interface-type interface-number: Specifies an interface by its type and number.
vlan vlan-id: Specifies a VLAN ID in the range of 1 to 4094.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display GVRP state machines in VLAN 2 on port GigabitEthernet 1/0/1.
<Sysname> display gvrp state interface gigabitethernet 1/0/1 vlan 2
GVRP state of VLAN 2 on port GigabitEthernet1/0/1
Applicant state machine
: VP
Registrar state machine
: MTR
Table 42 Command output
Field
Description
GVRP state of VLAN 2 on port
GigabitEthernet1/0/1
Information about the GVRP state machines in VLAN 2 on
port GigabitEthernet 1/0/1.
Applicant state machine handles attribute declarations. Its
state can be VA, AA, QA, LA, VP, AP, QP, VO, AO, QO,
LO, VON, AON, and QON. Each state consists of two or
three letters with the following meanings:
• The first letter indicates the state: V for Very anxious, A
Applicant state machine
for Anxious, Q for Quiet, and L for Leaving.
• The second letter indicates the membership state: A for
Active member, P for Passive member, and O for
Observer.
• The third letter N, if any, stands for Non-participant.
For example, VP indicates "Very anxious, Passive member."
185
Field
Description
Registrar state machine records the registration of attributes
declared by other participants. Its state can be INN, LV, L3,
L2, L1, MT, INR, LVR, L3R, L2R, L1R, MTR, INF, LVF, L3F,
L2F, L1F, and MTF. Each state consists of two or three letters
or numbers with the following meanings:
• The first two letters or numbers indicate the state: IN
stands for In; LV, L3, L2, and L1 all stand for Leaving, and
L3, L2, L1 are three sub-states of LV; MT stands for Empty.
Registrar state machine
• The third letter indicates the registration mode: N, if any,
stands for Normal registration, R stands for Registration
fixed, and F stands for Registration forbidden.
For example, MTR stands for "Empty, Registration fixed"
and indicates the fixed registration mode in Empty state.
display gvrp statistics
Use display gvrp statistics to display the GVRP statistics of the specified trunk ports. If no ports are
specified, this command displays the GVRP statistics for all trunk ports.
Syntax
display gvrp statistics [ interface interface-list ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
interface interface-list: Displays the GVRP statistics of one or multiple Ethernet ports. You can specify up
to 10 Ethernet port lists, by each of which you can specify an individual port in the form of interface-type
interface-number, or a port range in the form of interface-type interface-number1 to interface-type
interface-number2, where the end-port number specified by interface-number2 must be greater than the
start-port number specified by interface-number1.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display GVRP statistics for trunk port GigabitEthernet 1/0/1.
<Sysname> display gvrp statistics interface gigabitethernet 1/0/1
GVRP statistics on port GigabitEthernet1/0/1
GVRP Status
: Enabled
GVRP Running
: YES
186
GVRP Failed Registrations
: 0
GVRP Last Pdu Origin
: 0000-0000-0000
GVRP Registration Type
: Normal
Table 43 Command output
Field
Description
GVRP Status
Indicates whether GVRP is enabled or disabled.
GVRP Running
Indicates whether GVRP is running.
GVRP Failed Registrations
Indicates the number of GVRP registration failures.
GVRP Last Pdu Origin
Indicates the source MAC address in the last GVRP PDU.
GVRP Registration Type
Indicates the GVRP registration mode (fixed, forbidden, or
normal) on the port.
display gvrp status
Use display gvrp status to display the global GVRP state.
Syntax
display gvrp status [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display the global GVRP state.
<Sysname> display gvrp status
GVRP is enabled
display gvrp vlan-operation
Use display gvrp vlan-operation to display information about dynamic VLAN operations on a port.
187
Syntax
display gvrp vlan-operation interface interface-type interface-number [ | { begin | exclude | include }
regular-expression ]
Views
Any view
Default command level
0: Visit level
Parameters
interface interface-type interface-number: Specifies an interface by its type and number.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display information about dynamic VLAN operations on GigabitEthernet 1/0/1.
<Sysname> display gvrp vlan-operation interface gigabitethernet 1/0/1
Dynamic VLAN operations on port GigabitEthernet1/0/1
Operations of creating VLAN
:
2-100
Operations of deleting VLAN
:
none
Operations of adding VLAN to TRUNK
:
2-100
Operations of deleting VLAN from TRUNK
:
none
garp timer hold
Use garp timer hold to set the GARP Hold timer for an Ethernet port or Layer 2 aggregate interface.
Use undo garp timer hold to restore the default of the GARP Hold timer. This may fail if the default is
beyond the valid value range for the Hold timer.
Syntax
garp timer hold timer-value
undo garp timer hold
Default
The Hold timer is 10 centiseconds.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
188
Parameters
timer-value: Specifies the Hold timer (in centiseconds), which must be a multiple of 5 and range from 10
(inclusive) to half the Join timer (inclusive).
Examples
# Set the GARP Hold timer to 15 centiseconds, assuming that the Join timer is 30 centiseconds.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] garp timer hold 15
Related commands
•
display garp timer
•
garp timer join
garp timer join
Use garp timer join to set the GARP Join timer for an Ethernet port or Layer 2 aggregate interface.
Use undo garp timer join to restore the default of the GARP Join timer. This may fail if the default is
beyond the valid value range for the Join timer.
Syntax
garp timer join timer-value
undo garp timer join
Default
The Join timer is set to 20 centiseconds.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Parameters
timer-value: Specifies the Join timer (in centiseconds), which must be a multiple of 5 and range from twice
the Hold timer (inclusive) and half the Leave timer (inclusive).
Examples
# Set the GARP Join timer to 25 centiseconds, assuming that both the Hold timer and the Leave timer are
using the default.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] garp timer join 25
Related commands
•
display garp timer
•
garp timer hold
•
garp timer leave
189
garp timer leave
Use garp timer leave to set the GARP Leave timer for an Ethernet port or Layer 2 aggregate interface.
Use undo garp timer leave to restore the default of the GARP Leave timer. This may fail if the default is
beyond the valid value range for the Leave timer.
Syntax
garp timer leave timer-value
undo garp timer leave
Default
The Leave timer is set to 60 centiseconds.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Parameters
timer-value: Specifies the Leave timer (in centiseconds), which must be a multiple of 5 and range from
twice the Join timer (exclusive) to the LeaveAll timer (exclusive).
Examples
# Set the GARP Leave timer to 100 centiseconds, assuming that both the Join timer and the LeaveAll timer
are using the default.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] garp timer leave 100
Related commands
•
display garp timer
•
garp timer join
•
garp timer leaveall
garp timer leaveall
Use garp timer leaveall to set the GARP LeaveAll timer.
Use undo garp timer leaveall to restore the default. This may fail if the default is beyond the valid value
range for the LeaveAll timer.
Syntax
garp timer leaveall timer-value
undo garp timer leaveall
Default
The LeaveAll timer is 1000 centiseconds.
Views
System view
190
Default command level
2: System level
Parameters
timer-value: Specifies the Leaveall timer (in centiseconds), which must be a multiple of 5 and range from
the maximum Leave timer on the device (exclusive) to 32765 (inclusive).
Usage guidelines
To keep the dynamic VLANs learned through GVRP stable, do not set the LeaveAll timer smaller than its
default value.
Examples
# Set the leaveall timer to 2000 centiseconds, assuming that the Leave timer on every port is set to 60
centiseconds.
<Sysname> system-view
[Sysname] garp timer leaveall 2000
Related commands
•
display garp timer
•
garp timer leave
gvrp
Use gvrp to enable GVRP.
Use undo gvrp to disable GVRP.
Syntax
gvrp
undo gvrp
Default
GVRP is disabled.
Views
System view, Layer 2 Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Usage guidelines
Settings in system view take effect globally. Settings in Layer 2 Ethernet view or Layer 2 aggregate
interface take effect only on the current interface.
To enable GVRP on a port, enable GVRP globally before you enable it on the port.
In interface view, you can use this command on trunk ports only.
You cannot change the link type of a GVRP-enabled trunk port.
Examples
# Enable GVRP globally.
<Sysname> system-view
[Sysname] gvrp
191
GVRP is enabled globally.
Related commands
display gvrp status
gvrp registration
Use gvrp registration to configure the GVRP registration mode.
Use undo gvrp registration to restore the default.
Syntax
gvrp registration { fixed | forbidden | normal }
undo gvrp registration
Default
The GVRP registration mode is normal.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Parameters
fixed: Sets the GVRP registration mode to fixed.
forbidden: Sets the GVRP registration mode to forbidden.
normal: Sets the GVRP registration mode to normal.
Usage guidelines
Settings in system view take effect globally. Settings in Ethernet view or Layer 2 aggregate interface take
effect on the current interface.
This command is only available on trunk ports.
Examples
# Set the GVRP registration mode to fixed on port GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type trunk
[Sysname-GigabitEthernet1/0/1] gvrp registration fixed
Related commands
display garp statistics
reset garp statistics
Use reset garp statistics to clear the GARP statistics on the specified ports. If no ports are specified, this
command clears the GARP statistics on all ports.
Syntax
reset garp statistics [ interface interface-list ]
192
Views
User view
Default command level
2: System level
Parameters
interface interface-list: Clears the GARP statistics of one or multiple ports. You can specify up to 10 port
lists, by each of which you can specify a single port in the form of interface-type interface-number, or a
port range in the form of interface-type interface-number1 to interface-type interface-number2, where
the end port number specified by interface-number2 must be greater than the start port number specified
by interface-number1.
Usage guidelines
The cleared statistics include the statistics about GVRP PDUs sent, received, and dropped.
Examples
# Clear the GARP statistics on all ports.
<Sysname> reset garp statistics
Related commands
display garp statistics
193
QinQ configuration commands
This document uses the following terms:
•
CVLAN—Customer network VLANs, also called "inner VLANs," refer to VLANs that a customer
uses on the private network.
•
SVLAN—Service provider network VLANs, also called "outer VLANs," refer to VLANs that a service
provider uses to transmit VLAN tagged traffic for customers.
Selective QinQ is implemented through a QoS policy. For QoS policy configuration commands, see ACL
and QoS Command Reference.
nest
Use nest to add a VLAN tag adding action to a traffic behavior. If the traffic behavior already contains
a VLAN tag adding action, the new tag overwrites the old tag.
Use undo nest to remove the action.
Syntax
nest top-most vlan-id vlan-id
undo nest top-most
Views
Traffic behavior view
Default command level
2: System level
Parameters
top-most: Adds an SVLAN tag into VLAN tagged traffic.
vlan-id vlan-id: Specifies a VLAN tag ID in the range of 1 to 4094.
Usage guidelines
The VLAN tag adding action enables a port to add an SVLAN tag into VLAN tagged traffic.
If a QoS policy contains a VLAN tag adding action, apply it only to the incoming traffic of interfaces. To
make sure that the QoS policy can be successfully applied, you must enable basic QinQ on the target
interface before applying the QoS policy.
A QoS policy containing a VLAN tag adding action cannot be applied to VLANs or globally.
Examples
# Create traffic behavior b1, and add the action of adding SVLAN tag 123.
<Sysname> system-view
[Sysname] traffic behavior b1
[Sysname-behavior-b1] nest top-most vlan-id 123
194
qinq enable
Use qinq enable to enable basic QinQ on the Ethernet ports.
Use undo qinq enable to disable basic QinQ on the Ethernet ports.
Syntax
qinq enable
undo qinq enable
Default
Basic QinQ is disabled on Ethernet ports.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Usage guidelines
A basic QinQ-enabled port tags received frames with its PVID tag.
Configured in Layer 2 Ethernet interface view, the command takes effect on the port only.
Configured in Layer 2 aggregate interface view, the command takes effect on the Layer 2 aggregate
interface and all member ports in the aggregation group.
Examples
# Enable basic QinQ on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] qinq enable
qinq ethernet-type customer-tag
Use qinq ethernet-type customer-tag to configure the TPID value in CVLAN tags.
Use undo qinq ethernet-type customer-tag to restore the TPID value in CVLAN tags to the system default.
Syntax
qinq ethernet-type customer-tag hex-value
undo qinq ethernet-type customer-tag
Default
The TPID value in CVLAN tags is 0x8100.
Views
System view
Default command level
2: System level
195
Parameters
hex-value: Specifies the hexadecimal Tag Protocol Identifier (TPID) value in the range of 0x0001 to
0xFFFF. However, do not set it to any of the protocol type values listed in Table 44.
Table 44 Common protocol type values
Protocol type
Value
ARP
0x0806
PUP
0x0200
RARP
0x8035
IP
0x0800
IPv6
0x86DD
PPPoE
0x8863/0x8864
MPLS
0x8847/0x8848
IPX/SPX
0x8137
IS-IS
0x8000
LACP
0x8809
802.1X
0x888E
Cluster
0x88A7
Reserved
0xFFFD/0xFFFE/0xFFFF
Usage guidelines
On a port with basic QinQ or customer-side QinQ enabled, the switch judges whether a frame is VLAN
tagged based on the CVLAN TPID value globally configured.
Examples
# Set the TPID value in the CVLAN tags to 0x8200 globally.
<Sysname> system-view
[Sysname] qinq ethernet-type customer-tag 8200
qinq ethernet-type service-tag
Use qinq ethernet-type service-tag to configure the TPID value in SVLAN tags.
Use undo qinq ethernet-type service-tag to restore the TPID value in SVLAN tags to the default setting.
Syntax
qinq ethernet-type service-tag hex-value
undo qinq ethernet-type service-tag
Default
The TPID value in SVLAN tags is 0x8100.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
196
Default command level
2: System level
Parameters
hex-value: Specifies the hexadecimal TPID value in the range of 0x0001 to 0xFFFF. However, do not set
it to any of the protocol type values listed in Table 44.
Usage guidelines
On a port with basic QinQ and customer-side QinQ not enabled, the switch judges whether a frame is
VLAN tagged based on the SVLAN TPID value on the port.
Configured in Ethernet interface view, this command takes effect on the current port only. Configured in
Layer 2 aggregate interface view, this command takes effect on the Layer 2 aggregate interface and the
member ports in its aggregation group.
Examples
# Set the TPID value in the SVLAN tags to 0x9100 on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] qinq ethernet-type service-tag 9100
qinq transparent-vlan
Use qinq transparent-vlan to configure VLAN transparent transmission on one or multiple ports, so the
port or ports can transparently transmit frames from the specified VLANs.
Use undo qinq transparent-vlan to remove the configuration.
Syntax
qinq transparent-vlan vlan-list
undo qinq transparent-vlan { vlan-list | all }
Default
VLAN transparent transmission is not configured on ports.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
Default command level
2: System level
Parameters
vlan-list: Specifies a space-separated list of up to 10 VLAN items. Each item specifies a single VLAN ID
or a VLAN ID range in the form of vlan-id1 to vlan-id2, where vlan-id1 must be smaller than vlan-id2. The
value range for VLAN IDs is 1 to 4094.
all: Specifies all VLANs.
Usage guidelines
Configured in Layer 2 Ethernet interface view, the command takes effect on the interface only.
Configured in Layer 2 aggregate interface view, the command takes effect on the Layer 2 aggregate
interface and all member ports in the aggregation group.
197
Examples
# Enable basic QinQ on GigabitEthernet 1/0/1, and configure GigabitEthernet 1/0/1 to transparently
transmit frames from VLAN 2, VLAN 3, and VLAN 50 through VLAN 100.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type trunk
[Sysname-GigabitEthernet1/0/1] port trunk permit vlan 2 3 50 to 100
[Sysname-GigabitEthernet1/0/1] qinq enable
[Sysname-GigabitEthernet1/0/1] qinq transparent-vlan 2 3 50 to 100
198
VLAN mapping configuration commands
VLAN mapping is implemented through a QoS policy. This chapter introduces the VLAN
mapping-related port and traffic behavior configuration commands. For the QoS policy configuration
commands, see ACL and QoS Command Reference.
nest
Use nest to add a VLAN tag adding action to a traffic behavior. If the traffic behavior already contains
a VLAN tag adding action, the new one overwrites the old one.
Use undo nest to remove the action.
Syntax
nest top-most vlan-id vlan-id
undo nest top-most
Views
Traffic behavior view
Default command level
2: System level
Parameters
top-most: Adds an outer VLAN tag into VLAN tagged traffic.
vlan-id vlan-id: Specifies a VLAN tag ID in the range of 1 to 4094.
Usage guidelines
The VLAN tag adding action enables a port to add an outer VLAN tag into VLAN tagged traffic.
If a QoS policy contains a VLAN tag adding action, apply it only to the incoming traffic of interfaces. To
make sure that the QoS policy can be successfully applied, you must enable basic QinQ on the target
interface before applying the QoS policy.
A QoS policy containing a VLAN tag adding action cannot be applied to VLANs or globally.
Examples
# Create traffic behavior b1, and add the action of adding outer VLAN tag 123.
<Sysname> system-view
[Sysname] traffic behavior b1
[Sysname-behavior-b1] nest top-most vlan-id 123
qinq enable downlink
Use qinq enable downlink to enable customer-side QinQ on an Ethernet port.
Use undo qinq enable to disable customer-side QinQ on an Ethernet port.
Syntax
qinq enable downlink
199
undo qinq enable
Default
Customer-side QinQ is disabled on Ethernet ports.
Views
Layer 2 Ethernet interface view
Default command level
2: System level
Usage guidelines
Enable or disable customer-side QinQ on one port in Layer 2 Ethernet interface view.
Examples
# Enable customer-side QinQ on port GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] qinq enable downlink
qinq enable uplink
Use qinq enable uplink to enable network-side QinQ on an Ethernet port.
Use undo qinq enable to disable network-side QinQ on the Ethernet port.
Syntax
qinq enable uplink
undo qinq enable
Default
Network-side QinQ is disabled on Ethernet ports.
Views
Layer 2 Ethernet interface view
Default command level
2: System level
Usage guidelines
Enable or disable network-side QinQ on one port in Layer 2 Ethernet interface view.
Examples
# Enable network-side QinQ on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] qinq enable uplink
remark customer-vlan-id
Use remark customer-vlan-id to add a CVLAN marking action to a traffic behavior.
Use undo remark customer-vlan-id to remove the action from the traffic behavior.
200
Syntax
remark customer-vlan-id vlan-id
undo remark customer-vlan-id
Views
Traffic behavior view
Default command level
2: System level
Parameters
vlan-id: Specifies a customer VLAN (CVLAN) ID in the range of 1 to 4094.
Usage guidelines
A QoS policy containing a CVLAN marking action cannot be applied to VLANs or globally applied.
Examples
# Configure traffic behavior b1 to mark matching packets with CVLAN 111.
<Sysname> system-view
[Sysname] traffic behavior b1
[Sysname-behavior-b1] remark customer-vlan-id 111
remark service-vlan-id
Use remark service-vlan-id to add an SVLAN marking action to a traffic behavior.
Use undo remark service-vlan-id to remove the action from the traffic behavior.
Syntax
remark service-vlan-id vlan-id
undo remark service-vlan-id
Views
Traffic behavior view
Default command level
2: System level
Parameters
vlan-id: Specifies a service-provider VLAN (SVLAN) ID in the range of 1 to 4094.
Usage guidelines
A QoS policy containing a SVLAN marking action cannot be applied to VLANs or globally.
Examples
# Configure traffic behavior b1 to mark matching packets with SVLAN 222.
<Sysname> system-view
[Sysname] traffic behavior b1
[Sysname-behavior-b1] remark service-vlan-id 222
201
LLDP configuration commands
Both Layer 2 and Layer 3 Ethernet interfaces support the LLDP function. The term "interface" in this
chapter collectively refers to these two types of interfaces. You can use the port link-mode command to
configure an Ethernet port as a Layer 2 or Layer 3 interface (see "Ethernet interface configuration
commands").
display lldp local-information
Use display lldp local-information to display the LLDP information to be sent. This information, contained
in the LLDP TLVs, is sent to neighbor devices.
Syntax
display lldp local-information [ global | interface interface-type interface-number ] [ | { begin | exclude
| include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
global: Displays the global LLDP information to be sent.
interface interface-type interface-number: Displays the LLDP information to be sent out of the interface
specified by its type and number.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
If no keyword or argument is specified, this command displays all LLDP information to be sent. This
information includes the global LLDP information and the LLDP information about the LLDP-enabled ports
in up state.
Examples
# Display all LLDP information to be sent.
<Sysname> display lldp local-information
Global LLDP local-information:
Chassis ID
: 3ce5-a6df-e138
System name
: HP
System description : HP Comware Platform Software, Software Version 5.20.105 R
elease 1118
202
HP A5830AF-48G
Copyright (c) 2010-2013 Hewlett-Packard Development Company, L.P.
System capabilities supported : Bridge,Router
System capabilities enabled
: Bridge,Router
MED information
Device class: Connectivity device
(MED inventory information of master board)
HardwareRev
: REV.B
FirmwareRev
: 1.06
SoftwareRev
: 5.20.105 Release 1118
SerialNum
: 210235A0JHH10C000002
Manufacturer name
: HP
Model name
: A5830AF-48G
Asset tracking identifier : Unknown
LLDP local-information of port 1[GigabitEthernet1/0/1]:
Port ID subtype
: Interface name
Port ID
: GigabitEthernet1/0/1
Port description : GigabitEthernet1/0/1 Interface
Management address type
: ipv4
Management address
: 192.168.1.11
Management address interface type : IfIndex
Management address interface ID
: 54
Management address OID
: 0
Port VLAN ID(PVID): 1
Port and protocol VLAN ID(PPVID) : 1
Port and protocol VLAN supported : Yes
Port and protocol VLAN enabled
: No
VLAN name of VLAN 1: VLAN 0001
Auto-negotiation supported : Yes
Auto-negotiation enabled
: Yes
OperMau
: speed(1000)/duplex(Full)
PoE supported: No
Link aggregation supported : Yes
Link aggregation enabled
: No
Aggregation port ID
: 0
Maximum frame Size: 1536
MED information
203
Media policy type
: Unknown
Unknown Policy
: Yes
VLAN tagged
: No
Media policy VlanID
: 0
Media policy L2 priority : 0
Media policy Dscp
: 0
Table 45 Command output
Field
Description
Global LLDP local-information
Global LLDP information to be sent.
Chassis ID
Bridge MAC address of the device.
Supported capabilities:
System capabilities supported
• Bridge—Switching is supported.
• Router—Routing is supported.
Enabled capabilities:
System capabilities enabled
• Bridge—Switching is enabled.
• Router—Routing is enabled.
MED device class:
• Connectivity device—Network device.
• Class I—Normal terminal device. It requires the basic LLDP discovery
services.
Device class
• Class II—Media terminal device. It supports media streams and can
also function as a normal terminal device.
• Class III—Communication terminal device. It supports the IP
communication systems of end users and can also function as a normal
terminal device or media terminal device.
MED inventory information of
master board
MED asset information of the master of the IRF fabric.
HardwareRev
Hardware version.
FirmwareRev
Firmware version.
SoftwareRev
Software version.
SerialNum
Serial number.
Manufacturer name
Device manufacturer.
Model name
Device model.
LLDP local-information of port 1
LLDP information to be sent out of port 1.
Port ID subtype
Port ID type: MAC address or interface name.
Port ID
Port ID, the value of which depends on the port ID subtype.
Management address interface
type
Numbering type of the interface identified by the management address.
Management address interface
ID
Index of the interface identified by the management address.
Management address OID
Management address object ID.
Port and protocol VLAN ID(PPVID)
Port protocol VLAN ID.
204
Field
Description
Port and protocol VLAN
supported
Indicates whether protocol VLAN is supported on the port.
Port and protocol VLAN enabled
Indicates whether protocol VLAN is enabled on the port.
VLAN name of VLAN 1
Name of VLAN 1.
Auto-negotiation supported
Indicates whether auto-negotiation is supported on the port.
Auto-negotiation enabled
Indicates whether auto-negotiation is enabled on the port.
OperMau
Speed and duplex state of the port.
PoE supported
Indicates whether PoE is supported on the port.
Link aggregation supported
Indicates whether link aggregation is supported.
Link aggregation enabled
Indicates whether link aggregation is enabled.
Aggregation port ID
Aggregation group ID, which is 0 when link aggregation is disabled.
MED information
MED LLDP information.
Media policy type:
Media policy type
•
•
•
•
•
•
•
•
•
unknown.
voice.
voiceSignaling.
guestVoice.
guestVoiceSignaling.
softPhoneVoice.
videoconferencing.
streamingVideo.
videoSignaling.
Unknown Policy
Indicates whether the media policy is unknown.
VLAN tagged
Indicates whether packets of the media VLAN are tagged.
Media Policy VlanID
ID of the media VLAN.
Media Policy L2 priority
Layer 2 priority.
Media Policy Dscp
DSCP precedence.
When the port is allowed to advertise Location Identification TLVs, this field
indicates the location information format:
Location format
Location Information
•
•
•
•
Invalid—The format of the location information is invalid.
Coordinate-based LCI—The location information is coordinate-based.
Civic Address LCI—Typical address information.
ECS ELIN—Telephone number for urgencies.
When the port is allowed to advertise Location Identification TLVs, this field
displays the location information of the device.
display lldp neighbor-information
Use display lldp neighbor-information to display the LLDP information carried in LLDP TLVs sent from the
neighboring devices.
205
Syntax
display lldp neighbor-information [ brief | interface interface-type interface-number [ brief ] | list
[ system-name system-name ] ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
brief: Displays the summary of LLDP information sent from the neighboring devices. If this keyword is not
specified, this command displays detailed LLDP information sent from the neighboring devices.
interface interface-type interface-number: Displays the LLDP information sent from the neighboring
devices received through a port specified by its type and number. If this option is not specified, this
command displays the LLDP information sent from the neighboring devices received through all ports.
list: Displays the LLDP information sent from the neighboring devices in the form of a list.
system-name system-name: Displays the LLDP information sent from a neighboring device specified by its
system name. The system-name argument is a character string of 1 to 255 characters. If this option is not
specified, this command displays the LLDP information sent from all neighboring devices in a list.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display the LLDP information sent from the neighboring devices received through all ports.
<Sysname> display lldp neighbor-information
LLDP neighbor-information of port 1[GigabitEthernet1/0/1]:
Neighbor index
: 1
Update time
: 0 days,0 hours,1 minutes,1 seconds
Chassis type
: MAC address
Chassis ID
: 000f-0055-0002
Port ID type
: Interface name
Port ID
: GigabitEthernet1/0/1
Port description : GigabitEthernet1/0/1 Interface
System name
: HP
System description : HP Comware Platform Software
System capabilities supported : Repeater,Bridge,Router
System capabilities enabled
: Repeater,Bridge,Router
Management address type
: ipv4
Management address
: 192.168.1.55
Management address interface type : IfIndex
206
Management address interface ID
: Unknown
Management address OID
: 0
Port VLAN ID(PVID): 1
Port and protocol VLAN ID(PPVID) : 1
Port and protocol VLAN supported : Yes
Port and protocol VLAN enabled
: No
VLAN name of VLAN 1: VLAN 0001
Auto-negotiation supported : Yes
Auto-negotiation enabled
: Yes
OperMau
: speed(1000)/duplex(Full)
Power port class
: PD
PSE power supported
: No
PSE power enabled
: No
PSE pairs control ability : No
Power pairs
: Signal
Port power classification : Class 0
Link aggregation supported : Yes
Link aggregation enabled
: No
Aggregation port ID
: 0
Maximum frame Size: 1536
# Display the LLDP information sent from all neighboring devices in a list.
<Sysname> display lldp neighbor-information list
System Name
Local Interface Chassis ID
System1
GE1/0/1
000f-e25d-ee91 GigabitEthernet1/0/5
Port ID
System2
GE1/0/2
000f-e25d-ee92 GigabitEthernet1/0/6
System3
GE1/0/3
000f-e25d-ee93 GigabitEthernet1/0/7
Table 46 Command output
Field
Description
LLDP neighbor-information of port 1
LLDP information received through port 1.
Neighbor index
Index of the LLDP neighboring device.
Update time
Time when LLDP information about a neighboring device was last
updated.
207
Field
Description
Chassis ID type of the LLDP neighboring device:
Chassis type
Chassis ID
•
•
•
•
•
•
•
Chassis component.
Interface alias.
Port component.
MAC address.
Network address (ipv4).
Interface name.
Locally assigned—Locally-defined chassis type other than those
listed above.
Chassis ID of the LLDP neighboring device, whose value type is the
chassis ID type.
ID type of the port that connects the LLDP neighboring device to the
local device:
Port ID type
•
•
•
•
•
•
•
Interface alias.
Port component.
MAC address.
Network address (ipv4).
Interface name.
Agent circuit ID.
Locally assigned—Locally-defined port ID type other than those
listed above.
Port ID
ID of the port that connects the LLDP neighboring device to the local
device, whose type is the port ID type.
Port description
Description of the port that connects the LLDP neighboring device to
the local device.
System name of the LLDP neighboring device.
System name
System description
If the system name of a neighboring device cannot be identified by
the local device, this field displays a hyphen (-). In this case, you
cannot display information about the neighboring device by using
the display lldp neighbor-information list system-name system-name
command.
System description of the LLDP neighboring device.
Capabilities supported on the LLDP neighboring device:
System capabilities supported
• Repeater—Signal repeating is supported.
• Bridge—Switching is supported.
• Router—Routing is supported.
Capabilities enabled on the LLDP neighboring device:
System capabilities enabled
• Repeater—Signal repeating is enabled.
• Bridge—Switching is enabled.
• Router—Routing is enabled.
Management address type
Management address type of the port that connects the LLDP
neighboring device to the local device.
Management address
Management address of the port that connects the LLDP neighboring
device to the local device.
208
Field
Description
Management address interface type
Management address interface type of the port that connects the LLDP
neighboring device to the local device.
Management address OID
Management address object ID of the port that connects the LLDP
neighboring device to the local device.
Port VLAN ID
Port VLAN ID of the port that connects the LLDP neighboring device to
the local device.
Port and protocol VLAN ID(PPVID)
Port protocol VLAN ID of the port that connects the LLDP neighboring
device to the local device.
Port and protocol VLAN supported
Indicates whether protocol VLAN is supported on the port that
connects the LLDP neighboring device to the local device.
Port and protocol VLAN enabled
Indicates whether protocol VLAN is enabled on the port that connects
the LLDP neighboring device to the local device.
VLAN name of VLAN 1
Name of VLAN 1.
Auto-negotiation supported
Indicates whether auto-negotiation is supported on the port that
connects the LLDP neighboring device to the local device.
Auto-negotiation enabled
Indicates whether auto-negotiation is enabled on the port that
connects the LLDP neighboring device to the local device.
OperMau
Speed and duplex state on the port that connects the LLDP
neighboring device to the local device.
PoE device type of the LLDP neighboring device:
Power port class
• PSE—The LLDP neighboring device is a PSE device.
• PD—The LLDP neighboring device is a powered device (a PD
device or non-PSE device).
PSE power supported
Indicates whether the LLDP neighboring device can operate as a PSE
device.
PSE power enabled
Indicates whether the LLDP neighboring device is operating as a PSE
device.
PSE pairs control ability
Indicates whether the PSE-PD pair control is available on the LLDP
neighboring device.
PoE mode of the LLDP neighboring device:
Power pairs
• Signal—PoE through signal lines.
• Spare—PoE through spare lines.
Port power classification of the PD of the LLDP neighboring device:
Port power classification
•
•
•
•
•
Class 0.
Class 1.
Class 2.
Class 3.
Class 4.
Link aggregation supported
Indicates whether link aggregation is supported on the port that
connects the LLDP neighboring device to the local device.
Link aggregation enabled
Indicates whether link aggregation is enabled.
Aggregation port ID
Aggregation group ID, which is 0 when link aggregation is disabled.
209
Field
Description
Maximum frame size
Maximum frame size of the port that connects the LLDP neighboring
device to the local device.
Location information format of the neighboring device which is a
communication terminal with the MED device type being Class III, for
example, an IP phone:
Location format
• Invalid—The format of the location information is invalid.
• Coordinate-based LCI—The location information is
coordinate-based.
• Civic Address LCI—Typical address information.
• ECS ELIN—Telephone for urgencies.
Location information
Location information of the neighboring device which is a
communication terminal with the MED device type being Class III, for
example, an IP phone.
PSE power type of an LLDP neighboring device which is a PSE device:
PoE PSE power source
• Unknown—Unknown power supply.
• Primary—Primary power supply.
• Backup—Backup power supply.
PD power type of an LLDP neighboring device which is a PD device:
PoE PD power source
•
•
•
•
Unknown—Unknown power supply.
PSE—PSE power supply.
Local—Local power supply.
PSE and local—PSE and local power supplies.
PoE power supply priority of ports on an LLDP neighboring device
which is a PSE device:
Port PSE Priority
•
•
•
•
Unknown.
Critical.
High.
Low.
PoE power receiving priority of ports on an LLDP neighboring device
which is a PD device:
Port PD Priority
•
•
•
•
Unknown.
Critical.
High.
Low.
• Power supplied to the port when the LLDP neighboring device is a
Port available power value
PSE device, in watts.
• Power supplied by the port when the LLDP neighboring device is a
PD device, in watts.
TLV type
This field appears only when the device connects to a device of an
unknown vendor.
Unknown basic TLV type.
TLV information
This field appears only when the device connects to a device of an
unknown vendor.
Information contained in the unknown basic TLV type.
210
Field
Description
Unknown organizationally-defined TLV
This field appears only when the device connects to a device of an
unknown vendor.
Unknown organizationally specific TLV.
TLV OUI
This field appears only when the device connects to a device of an
unknown vendor.
OUI of the unknown organizationally specific TLV.
TLV subtype
This field appears only when the device connects to a device of an
unknown vendor.
Unknown organizationally specific TLV subtype.
Index
This field appears only when the device connects to a device of an
unknown vendor.
Unknown organization index.
TLV information
This field appears only when the device connects to a device of an
unknown vendor.
Information contained in unknown organizationally specific TLV.
Local Interface
Local port that receives the LLDP information.
Information about CDP neighbors:
CDP neighbor-information of port 2
CDP information received through port 2.
CDP neighbor index
Index of the CDP neighboring device.
Chassis ID
Name of the CDP neighboring device.
Address
IPv4 address of the port that connects the CDP neighboring device to
the local device.
Port ID
ID of the port that connects the CDP neighboring device to the local
device.
Software version
Software version of the CDP neighboring device.
Platform
Model of the CDP neighboring device.
Duplex
Duplex state of the port that connects the CDP neighboring device to
the local device.
display lldp statistics
Use display lldp statistics to display the global LLDP statistics or the LLDP statistics of a port.
Syntax
display lldp statistics [ global | interface interface-type interface-number ] [ | { begin | exclude |
include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
211
Parameters
global: Displays the global LLDP statistics.
interface interface-type interface-number: Specifies a port by its type and number.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
If no keyword or argument is specified, this command displays the global LLDP statistics and the LLDP
statistics of all ports.
Examples
# Display the global LLDP statistics and the LLDP statistics of all ports.
<Sysname> display lldp statistics
LLDP statistics global Information:
LLDP neighbor information last change time:0 days,0 hours,4 minutes,40 seconds
The number of LLDP neighbor information inserted : 1
The number of LLDP neighbor information deleted
: 1
The number of LLDP neighbor information dropped
: 0
The number of LLDP neighbor information aged out : 1
LLDP statistics information of port 1 [GigabitEthernet1/0/1]:
The number of LLDP frames transmitted
: 0
The number of LLDP frames received
: 0
The number of LLDP frames discarded
: 0
The number of LLDP error frames
: 0
The number of LLDP TLVs discarded
: 0
The number of LLDP TLVs unrecognized
: 0
The number of LLDP neighbor information aged out : 0
Table 47 Command output
Field
Description
LLDP statistics global information
Global LLDP statistics.
LLDP neighbor information last change time
Time the neighbor information was last updated.
The number of LLDP neighbor information inserted
Number of times of adding neighbor information.
The number of LLDP neighbor information deleted
Number of times of removing neighbor information.
The number of LLDP neighbor information dropped
Number of times of dropping neighbor information
due to lack of available memory space.
display lldp status
Use display lldp status to display LLDP status information of a port.
212
Syntax
display lldp status [ interface interface-type interface-number ] [ | { begin | exclude | include }
regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
interface interface-type interface-number: Specifies a port by its type and number.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
If no port is specified, this command displays the global LLDP status and the LLDP status information for
all ports.
Examples
# Display the global LLDP status and the LLDP status information of all ports.
<Sysname> display lldp status
Global status of LLDP: Enable
The current number of LLDP neighbors: 0
The current number of CDP neighbors: 0
LLDP neighbor information last changed time: 0 days,0 hours,4 minutes,40 seconds
Transmit interval
: 30s
Hold multiplier
: 4
Reinit delay
: 2s
Transmit delay
: 2s
Trap interval
: 5s
Fast start times
: 3
Port 1 [GigabitEthernet1/0/1]:
Port status of LLDP
: Enable
Admin status
: Tx_Rx
Trap flag
: No
Polling interval
: 0s
Number of neighbors
: 0
Number of MED neighbors
: 0
Number of sent optional TLV
: 23
Number of received unknown TLV : 0
213
Table 48 Command output
Field
Description
Global status of LLDP
Indicates whether LLDP is globally enabled.
LLDP neighbor information last
changed time
Time when the neighbor information was last updated.
Transmit interval
LLDPDU transmit interval.
Hold multiplier
TTL multiplier.
Reinit delay
LLDP re-initialization delay.
Transmit delay
LLDPDU transmit delay.
Trap interval
Trap transmit interval.
Fast start times
Number of LLDPDUs sent each time fast LLDPDU transmission is
triggered.
Port 1
LLDP status of port 1.
Port status of LLDP
Indicates whether LLDP is enabled on the port.
LLDP mode of the port:
Admin status
•
•
•
•
TxRx—The port sends and receives LLDPDUs.
Rx_Only—The port only receives LLDPDUs.
Tx_Only—The port only sends LLDPDUs.
Disable—The port does not send or receive LLDPDUs.
Trap Flag
Indicates whether trapping is enabled.
Polling interval
LLDP polling interval, which is 0 when LLDP polling is disabled.
Number of neighbors
Number of LLDP neighbors connecting to the port.
Number of MED neighbors
Number of MED neighbors connecting to the port.
Number of sent optional TLV
Number of optional TLVs contained in an LLDPDU sent through the port.
Number of received unknown TLV
Number of unknown TLVs contained in all received LLDPDUs.
display lldp tlv-config
Use display lldp tlv-config to display the types of advertisable optional LLDP TLVs of a port.
Syntax
display lldp tlv-config [ interface interface-type interface-number ] [ | { begin | exclude | include }
regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
interface interface-type interface-number: Specifies a port by its type and number.
214
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
If no port is specified, this command displays the types of advertisable optional TLVs of each port.
Examples
# Display the types of advertisable optional LLDP TLVs of interface GigabitEthernet 1/0/1.
<Sysname> display lldp tlv-config interface gigabitethernet 1/0/1
LLDP tlv-config of port 1[GigabitEthernet1/0/1]:
NAME
STATUS
DEFAULT
Port Description TLV
YES
YES
System Name TLV
YES
YES
System Description TLV
YES
YES
System Capabilities TLV
YES
YES
Management Address TLV
YES
YES
Port VLAN ID TLV
YES
YES
Port And Protocol VLAN ID TLV
YES
YES
VLAN Name TLV
YES
YES
MAC-Physic TLV
YES
YES
Power via MDI TLV
YES
YES
Link Aggregation TLV
YES
YES
Maximum Frame Size TLV
YES
YES
Basic optional TLV:
IEEE 802.1 extend TLV:
IEEE 802.3 extend TLV:
LLDP-MED extend TLV:
Capabilities TLV
YES
YES
Network Policy TLV
YES
YES
Location Identification TLV
NO
NO
Extended Power via MDI TLV
YES
YES
Inventory TLV
YES
YES
Table 49 Command output
Field
Description
LLDP tlv-config of port 1
Advertisable optional TLVs of port 1.
NAME
TLV type.
STATUS
Indicates whether a specific type of TLV is sent through a port.
DEFAULT
Indicates whether a specific type of TLV is sent through a port by default.
215
Field
Description
Basic TLVs:
Basic optional TLV
•
•
•
•
•
Port description TLV.
System name TLV.
System description TLV.
System capabilities TLV.
Management address TLV.
IEEE 802.1 organizationally specific TLVs:
IEEE 802.1 extended TLV
• Port VLAN ID TLV.
• Port and protocol VLAN ID TLV.
• VLAN name TLV.
IEEE 802.3 organizationally specific TLVs:
IEEE 802.3 extended TLV
•
•
•
•
MAC-Physic TLV.
Power via MDI TLV.
Link aggregation TLV.
Maximum frame size TLV.
LLDP-MED TLVs:
LLDP-MED extend TLV
•
•
•
•
•
Capabilities TLV.
Network Policy TLV.
Extended Power-via-MDI TLV.
Location Identification TLV.
Inventory TLV: hardware revision TLV, firmware revision TLV, software
revision TLV, serial number TLV, manufacturer name TLV, model name
TLV, and asset ID TLV.
lldp admin-status
Use lldp admin-status to specify the LLDP operating mode for a port.
Use undo lldp admin-status to restore the default LLDP operating mode.
Syntax
lldp admin-status { disable | rx | tx | txrx }
undo lldp admin-status
Default
The LLDP operating mode is TxRx.
Views
Layer 2 Ethernet interface view, Layer 3 Ethernet interface view
Default command level
2: System level
Parameters
disable: Specifies the Disable mode. A port in this mode does not send or receive LLDPDUs.
rx: Specifies the Rx mode. A port in this mode only receives LLDPDUs.
216
tx: Specifies the Tx mode. A port in this mode only sends LLDPDUs.
txrx: Specifies the TxRx mode. A port in this mode sends and receives LLDPDUs.
Examples
# Configure the LLDP operating mode as Rx for GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] lldp admin-status rx
lldp check-change-interval
Use lldp check-change-interval to enable LLDP polling and to set the polling interval.
Use undo lldp check-change-interval to restore the default.
Syntax
lldp check-change-interval interval
undo lldp check-change-interval
Default
LLDP polling is disabled.
Views
Layer 2 Ethernet interface view, Layer 3 Ethernet interface view
Default command level
2: System level
Parameters
interval: Sets the LLDP polling interval in the range of 1 to 30 seconds.
Examples
# Enable LLDP polling on GigabitEthernet 1/0/1, setting the polling interval to 30 seconds.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] lldp check-change-interval 30
lldp enable
Use lldp enable to enable LLDP.
Use undo lldp enable to disable LLDP.
Syntax
lldp enable
undo lldp enable
Default
LLDP is enabled both globally and on ports.
Views
System view, Layer 2 Ethernet interface view, Layer 3 Ethernet interface view
217
Default command level
2: System level
Usage guidelines
LLDP takes effect on a port only when LLDP is enabled both globally and on the port.
Examples
# Disable LLDP on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] undo lldp enable
lldp encapsulation snap
Use lldp encapsulation snap to configure the encapsulation format for LLDPDUs as SNAP on a port.
Use undo lldp encapsulation to restore the default encapsulation format for LLDPDUs.
Syntax
lldp encapsulation snap
undo lldp encapsulation
Default
Ethernet II is the encapsulation format for LLDPDUs.
Views
Layer 2 Ethernet interface view, Layer 3 Ethernet interface view
Default command level
2: System level
Usage guidelines
The command does not apply to LLDP-CDP packets, which use only SNAP encapsulation.
Examples
# Configure the encapsulation format for LLDPDUs as SNAP on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] lldp encapsulation snap
lldp fast-count
Use lldp fast-count to set the number of the LLDPDUs sent each time fast LLDPDU transmission is triggered.
Use undo lldp fast-count to restore the default.
Syntax
lldp fast-count count
undo lldp fast-count
Default
The number is 3.
218
Views
System view
Default command level
2: System level
Parameters
count: Sets the number of the LLDPDUs sent each time fast LLDPDU transmission is triggered. The value
range is 1 to 10.
Examples
# Configure the device to send four LLDPDUs each time fast LLDPDU transmission is triggered.
<Sysname> system-view
[Sysname] lldp fast-count 4
lldp hold-multiplier
Use lldp hold-multiplier to set the TTL multiplier.
Use undo lldp hold-multiplier to restore the default.
Syntax
lldp hold-multiplier value
undo lldp hold-multiplier
Default
The TTL multiplier is 4.
Views
System view
Default command level
2: System level
Parameters
value: Sets the TTL multiplier in the range of 2 to 10.
Usage guidelines
You can set the TTL of the local device information by configuring the TTL multiplier.
The TTL configuration of a device is determined by the expression:
TTL multiplier × LLDPDU transmit interval
The TTL can be up to 65535 seconds. Longer TTLs is rounded off to 65535 seconds.
Examples
# Set the TTL multiplier to 6.
<Sysname> system-view
[Sysname] lldp hold-multiplier 6
Related commands
lldp timer tx-interval
219
lldp management-address-format string
Use lldp management-address-format string to encapsulate the management address in the form of
strings in TLVs.
Use undo lldp management-address-format to restore the default.
Syntax
lldp management-address-format string
undo lldp management-address-format
Default
The management address is encapsulated in the form of numbers in TLVs.
Views
Layer 2 Ethernet interface view, Layer 3 Ethernet interface view
Default command level
2: System level
Examples
# Configure GigabitEthernet 1/0/1 to encapsulate the management address in the form of strings in
management address TLVs.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] lldp management-address-format string
lldp management-address-tlv
Use lldp management-address-tlv to enable management address advertising and set the management
address.
Use undo lldp management-address-tlv to disable management address advertising in LLDPDUs.
Syntax
lldp management-address-tlv [ ip-address ]
undo lldp management-address-tlv
Default
The management address is advertised through LLDPDUs. For a Layer 2 Ethernet port, the management
address is the main IP address of the lowest-ID VLAN carried on the port. If none of the carried VLANs
is assigned an IP address, no management addresses are advertised. For a Layer 3 Ethernet port, the
management address is its own IP address. If no IP address is configured for the Layer 3 Ethernet port,
no management addresses are advertised.
Views
Layer 2 Ethernet interface view, Layer 3 Ethernet interface view
Default command level
2: System level
Parameters
ip-address: Specifies a management address to be advertised in LLDPDUs.
220
Usage guidelines
An LLDPDU carries only one management address TLV. If you set multiple management addresses, the
most recent setting takes effect.
In Layer 2 Ethernet interface view, if you use the lldp management-address-tlv command without
specifying the ip-address argument, the advertised management address is the main IP address of the
lowest-ID VLAN carried on the interface. If none of the carried VLANs is assigned an IP address, no
management addresses are advertised.
In Layer 3 Ethernet interface view, if you use the lldp management-address-tlv command without
specifying the ip-address argument, the advertised management address is the IP address of the Layer 3
Ethernet port. If no IP address is configured for the port, no management addresses are advertised.
Examples
# Set the management address to 192.6.0.1 for GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] lldp management-address-tlv 192.6.0.1
lldp notification remote-change enable
Use lldp notification remote-change enable to enable LLDP trapping for a port.
Use undo lldp notification remote-change enable to disable LLDP trapping.
Syntax
lldp notification remote-change enable
undo lldp notification remote-change enable
Default
LLDP trapping is disabled on ports.
Views
Layer 2 Ethernet interface view, Layer 3 Ethernet interface view
Default command level
2: System level
Examples
# Enable LLDP trapping for GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] lldp notification remote-change enable
lldp timer notification-interval
Use lldp timer notification-interval to set the LLDP trap transmit interval.
Use undo lldp timer notification-interval to restore the default.
Syntax
lldp timer notification-interval interval
undo lldp timer notification-interval
221
Default
The LLDP trap transmit interval is 5 seconds.
Views
System view
Default command level
2: System level
Parameters
interval: Sets the LLDP trap transmit interval in the range of 5 to 3600 seconds.
Examples
# Set the LLDP trap transmit interval to 8 seconds.
<Sysname> system-view
[Sysname] lldp timer notification-interval 8
lldp timer reinit-delay
Use lldp timer reinit-delay to set the LLDP re-initialization delay.
Use undo lldp timer reinit-delay to restore the default.
Syntax
lldp timer reinit-delay delay
undo lldp timer reinit-delay
Default
The LLDP re-initialization delay is 2 seconds.
Views
System view
Default command level
2: System level
Parameters
delay: Sets the LLDP re-initialization delay in the range of 1 to 10 seconds.
Examples
# Set the LLDP re-initialization delay to 4 seconds.
<Sysname> system-view
[Sysname] lldp timer reinit-delay 4
lldp timer tx-delay
Use lldp timer tx-delay to set the LLDPDU transmit delay.
Use undo lldp timer tx-delay to restore the default.
Syntax
lldp timer tx-delay delay
undo lldp timer tx-delay
222
Default
The LLDPDU transmit delay is 2 seconds.
Views
System view
Default command level
2: System level
Parameters
delay: Sets the LLDPDU transmit delay in the range of 1 to 8192 seconds.
Usage guidelines
It is a good practice to set the LLDPDU transmit delay to be no greater than a quarter of the LLDPDU
transmit interval.
If the LLDPDU transmit delay is greater than the LLDPDU transmit interval, the device uses the LLDPDUs
transmit delay as the transmit interval.
Examples
# Set the LLDPDU transmit delay to 4 seconds.
<Sysname> system-view
[Sysname] lldp timer tx-delay 4
Related commands
lldp timer tx-interval
lldp timer tx-interval
Use lldp timer tx-interval to set the LLDPDU transmit interval.
Use undo lldp timer tx-interval to restore the default.
Syntax
lldp timer tx-interval interval
undo lldp timer tx-interval
Default
The LLDPDU transmit interval is 30 seconds.
Views
System view
Default command level
2: System level
Parameters
interval: Sets the LLDPDU transmit interval in the range of 5 to 32768 seconds.
Usage guidelines
It is a good practice to set the LLDPDU transmit interval to be no less than four times the LLDPDU transmit
delay.
223
If the LLDPDU transmit interval is less than the LLDPDU transmit delay, the device uses the LLDPDUs
transmit delay as the transmit interval.
Examples
# Set the LLDPDU transmit interval to 20 seconds.
<Sysname> system-view
[Sysname] lldp timer tx-interval 20
Related commands
lldp timer tx-delay
lldp tlv-enable
Use lldp tlv-enable to configure the types of advertisable TLVs for a port.
Use undo lldp tlv-enable to disable the advertising of specific types of TLVs.
Syntax
In Layer 2 Ethernet interface view:
lldp tlv-enable { basic-tlv { all | port-description | system-capability | system-description |
system-name } | dot1-tlv { all | port-vlan-id | protocol-vlan-id [ vlan-id ] | vlan-name [ vlan-id ] } |
dot3-tlv { all | link-aggregation | mac-physic | max-frame-size | power } | med-tlv { all | capability
| inventory | location-id { civic-address device-type country-code { ca-type ca-value }&<1-10> |
elin-address tel-number } | network-policy | power-over-ethernet } }
undo lldp tlv-enable { basic-tlv { all | port-description | system-capability | system-description |
system-name } | dot1-tlv { all | port-vlan-id | protocol-vlan-id | vlan-name } | dot3-tlv { all |
link-aggregation | mac-physic | max-frame-size | power } | med-tlv { all | capability | inventory |
location-id | network-policy | power-over-ethernet } }
In Layer 3 Ethernet interface view:
lldp tlv-enable { basic-tlv { all | port-description | system-capability | system-description |
system-name } | dot3-tlv { all | link-aggregation | mac-physic | max-frame-size | power } | med-tlv
{ all | capability | inventory | location-id { civic-address device-type country-code { ca-type
ca-value }&<1-10> | elin-address tel-number } | power-over-ethernet } }
undo lldp tlv-enable { basic-tlv { all | port-description | system-capability | system-description |
system-name } | dot3-tlv { all | link-aggregation | mac-physic | max-frame-size | power } | med-tlv
{ all | capability | inventory | location-id | power-over-ethernet } }
Default
The device can advertise on a Layer 2 Ethernet port all types of LLDP TLVs, except location identification
TLVs, and advertise on a Layer 3 Ethernet port all types of LLDP TLVs, except IEEE 802.1 organizationally
specific TLVs, network policy TLVs, and location identification TLVs.
Views
Layer 2 Ethernet interface view, Layer 3 Ethernet interface view
Default command level
2: System level
Parameters
all: Advertises all basic LLDP TLVs, IEEE 802.1 organizationally specific LLDP TLVs, or IEEE 802.3
organizationally specific LLDP TLVs when the all keyword is specified for basic-tlv, dot1-tlv, or dot3-tlv in
224
Layer 2 Ethernet interface view; advertises all basic LLDP TLVs or IEEE 802.3 organizationally specific
LLDP TLVs when the all keyword is specified for basic-tlv or dot3-tlv in Layer 3 Ethernet interface view; or
advertises all LLDP-MED TLVs except location identification TLVs when the all keyword is specified for
med-tlv, regardless of whether in Layer 2 or Layer 3 Ethernet interface view.
basic-tlv: Advertises basic LLDP TLVs.
port-description: Advertises port description TLVs.
system-capability: Advertises system capabilities TLVs.
system-description: Advertises system description TLVs.
system-name: Advertises system name TLVs.
dot1-tlv: Advertises IEEE 802.1 organizationally specific LLDP TLVs.
port-vlan-id: Advertises port VLAN ID TLVs.
protocol-vlan-id [ vlan-id ]: Advertises port and protocol VLAN ID TLVs. The vlan-id argument specifies a
VLAN ID in the TLVs to be advertised, in the range of 1 to 4094 and defaulting to the lowest VLAN ID on
the port.
vlan-name [ vlan-id ]: Advertises VLAN name TLVs. The vlan-id argument specifies a VLAN ID in the TLVs
to be advertised, in the range of 1 to 4094 and defaulting to the lowest VLAN ID on the port.
dot3-tlv: Advertises IEEE 802.3 organizationally specific LLDP TLVs.
link-aggregation: Advertises link aggregation TLVs.
mac-physic: Advertises MAC/PHY configuration/status TLVs.
max-frame-size: Advertises maximum frame size TLVs.
power: Advertises power via MDI TLVs and power stateful control TLVs.
med-tlv: Advertises LLDP-MED TLVs.
capability: Advertises LLDP-MED capabilities TLVs.
inventory: Advertises the following TLVs: hardware revision, firmware revision, software revision, serial
number, manufacturer name, model name, and asset ID.
location-id: Advertises location identification TLVs.
civic-address: Inserts the normal address information about the network device in location identification
TLVs .
device-type: Sets a device type value in the range of 0 to 2. Value 0 specifies a DHCP server. Value 1
specifies a switch. Value 2 specifies an LLDP-MED endpoint.
country-code: Sets a country code, corresponding to ISO 3166.
{ ca-type ca-value }&<1-10>: Configures address information, where ca-type represents the address
information type in the range of 0 to 255, ca-value represents address information, a string of 1 to 250
characters, and &<1-10> indicates that you can enter up to 10 parameters.
elin-address: Inserts telephone numbers for emergencies in location identification TLVs.
tel-number: Sets the telephone number for emergencies, a string of 10 to 25 characters.
network-policy: Advertises network policy TLVs.
power-over-ethernet: Advertises extended power-via-MDI TLVs.
225
Usage guidelines
To enable the device to advertise LLDP-MED TLVs, you must first enable it to advertise LLDP-MED
capabilities TLVs.
To disable the device from advertising LLDP-MED capabilities TLVs, you must first disable it from
advertising other LLDP-MED TLVs.
To disable the device from advertising MAC/PHY configuration/status TLVs, you must first disable it from
advertising LLDP-MED capabilities TLVs.
If you enable the device to advertise LLDP-MED capabilities TLVs, you also enable it to advertise
MAC/PHY configuration/status TLVs.
To enable the device to advertise multiple types of TLVs, you can execute the lldp tlv-enable command
repeatedly without the all keyword specified.
Examples
# Enable the device to advertise link aggregation TLVs of the IEEE 802.3 organizationally specific TLVs
on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] lldp tlv-enable dot3-tlv link-aggregation
226
Service loopback group configuration
commands
display service-loopback group
Use display service-loopback group to display information of the specified service loopback group or all
service loopback groups.
Syntax
display service-loopback group [ number ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
number: Specifies the ID of the service loopback group to be displayed. This value range is 1 to 1024.
If you do not specify a service loopback group, information about all service loopback groups is
displayed.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display information of service loopback group 5.
<Sysname> display service-loopback group 5
Service Group ID:
5
Quote Number: 0
Service Type: tunnel
Member
Status
------------------------------------------------------------------------GE1/0/1
Selected
GE1/0/2
Selected
Table 50 Command output
Field
Description
Service Group ID
Service loopback group ID.
Quote Number
Reference count of the service loopback group.
227
Field
Service Type
Description
Service type of the service loopback group:
• Tunnel—Supports unicast tunnel traffic.
Member
Member ports of the service loopback group.
Status
Port state: Selected or Unselected.
port service-loopback group
Use port service-loopback group to assign the current port to the specified service loopback group.
Use undo port service-loopback group to remove the current port from the specified service loopback
group.
Syntax
port service-loopback group number
undo port service-loopback group
Default
A port does not belong to any service loopback group.
Views
Layer 2 Ethernet interface view
Default command level
2: System level
Parameters
number: Specifies the service loopback group ID in the range of 1 to 1024.
Usage guidelines
To assign multiple ports to a service loopback group, run this command on multiple ports separately.
You cannot remove the last member port of a referenced service loopback group.
Examples
# Assign interface GigabitEthernet 1/0/1 to service loopback group 5.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port service-loopback group 5
service-loopback group
Use service-loopback group to create a service loopback group and specify its service type.
Use undo service-loopback group to remove a service loopback group.
Syntax
service-loopback group number type tunnel
undo service-loopback group number
228
Views
System view
Default command level
2: System level
Parameters
number: Specifies the service loopback group ID in the range of 1 to 1024.
type: Specifies the service type of a service loopback group.
tunnel: Specifies the service type of a service loopback group as Tunnel (unicast tunnel service).
Usage guidelines
A service loopback group can be referenced by other features once it is created, and can process service
traffic only after it is referenced. A service loopback group may be referenced by multiple features at the
same time.
You can change the service type of an existing service loopback group. For the change to be successful,
verify the following conditions:
•
The service group has not been referenced.
•
The attributes of all member ports, if any, are not conflicting with the target service type.
You cannot remove a service loopback group that is referenced by other features.
Examples
# Configure service loopback group 5, and specify its service type as Tunnel.
<Sysname> system-view
[Sysname] service-loopback group 5 type tunnel
229
Support and other resources
Contacting HP
For worldwide technical support information, see the HP support website:
http://www.hp.com/support
Before contacting HP, collect the following information:
•
Product model names and numbers
•
Technical support registration number (if applicable)
•
Product serial numbers
•
Error messages
•
Operating system type and revision level
•
Detailed questions
Subscription service
HP recommends that you register your product at the Subscriber's Choice for Business website:
http://www.hp.com/go/wwalerts
After registering, you will receive email notification of product enhancements, new driver versions,
firmware updates, and other product resources.
Related information
Documents
To find related documents, browse to the Manuals page of the HP Business Support Center website:
http://www.hp.com/support/manuals
•
For related documentation, navigate to the Networking section, and select a networking category.
•
For a complete list of acronyms and their definitions, see HP FlexNetwork Technology Acronyms.
Websites
•
HP.com http://www.hp.com
•
HP Networking http://www.hp.com/go/networking
•
HP manuals http://www.hp.com/support/manuals
•
HP download drivers and software http://www.hp.com/support/downloads
•
HP software depot http://www.software.hp.com
•
HP Education http://www.hp.com/learn
230
Conventions
This section describes the conventions used in this documentation set.
Command conventions
Convention
Description
Boldface
Bold text represents commands and keywords that you enter literally as shown.
Italic
Italic text represents arguments that you replace with actual values.
[]
Square brackets enclose syntax choices (keywords or arguments) that are optional.
{ x | y | ... }
Braces enclose a set of required syntax choices separated by vertical bars, from which
you select one.
[ x | y | ... ]
Square brackets enclose a set of optional syntax choices separated by vertical bars, from
which you select one or none.
{ x | y | ... } *
Asterisk-marked braces enclose a set of required syntax choices separated by vertical
bars, from which you select at least one.
[ x | y | ... ] *
Asterisk-marked square brackets enclose optional syntax choices separated by vertical
bars, from which you select one choice, multiple choices, or none.
&<1-n>
The argument or keyword and argument combination before the ampersand (&) sign can
be entered 1 to n times.
#
A line that starts with a pound (#) sign is comments.
GUI conventions
Convention
Description
Boldface
Window names, button names, field names, and menu items are in bold text. For
example, the New User window appears; click OK.
>
Multi-level menus are separated by angle brackets. For example, File > Create > Folder.
Convention
Description
Symbols
WARNING
An alert that calls attention to important information that if not understood or followed can
result in personal injury.
CAUTION
An alert that calls attention to important information that if not understood or followed can
result in data loss, data corruption, or damage to hardware or software.
IMPORTANT
An alert that calls attention to essential information.
NOTE
TIP
An alert that contains additional or supplementary information.
An alert that provides helpful information.
231
Network topology icons
Represents a generic network device, such as a router, switch, or firewall.
Represents a routing-capable device, such as a router or Layer 3 switch.
Represents a generic switch, such as a Layer 2 or Layer 3 switch, or a router that supports
Layer 2 forwarding and other Layer 2 features.
Represents an access controller, a unified wired-WLAN module, or the switching engine
on a unified wired-WLAN switch.
Represents an access point.
Represents a security product, such as a firewall, a UTM, or a load-balancing or security
card that is installed in a device.
Represents a security card, such as a firewall card, a load-balancing card, or a
NetStream card.
Port numbering in examples
The port numbers in this document are for illustration only and might be unavailable on your device.
232
Index
ABCDEFGIJLMNPQRSUVW
display link-aggregation load-sharing mode,67
A
display link-aggregation member-port,69
active region-configuration,86
display link-aggregation summary,71
B
display link-aggregation verbose,72
bpdu-drop any,86
display lldp local-information,202
bpdu-tunnel dot1q,136
display lldp neighbor-information,205
bpdu-tunnel tunnel-dmac,137
display lldp statistics,211
broadcast-suppression,27
display lldp status,212
C
display lldp tlv-config,214
display loopback-detection,28
check region-configuration,87
display mac-address,51
D
display mac-address aging-time,52
default,40
display mac-address statistics,53
default,63
display mac-vlan,158
default,139
display mac-vlan interface,160
default,1
display packet-drop interface,14
description,139
display packet-drop summary,15
description,40
display port,150
description,1
display port combo,16
description,63
display port-isolate group,84
display counters,2
display protocol-vlan interface,164
display counters rate,3
display protocol-vlan vlan,165
display garp statistics,182
display service-loopback group,227
display garp timer,183
display stp,88
display gvrp local-vlan,184
display stp abnormal-port,95
display gvrp state,184
display stp bpdu-statistics,96
display gvrp statistics,186
display stp down-port,99
display gvrp status,187
display stp history,100
display gvrp vlan-operation,187
display stp ignored-vlan,102
display interface,5
display stp region-configuration,102
display interface,64
display stp root,104
display interface loopback,41
display stp tc,105
display interface null,44
display vlan,143
display interface vlan-interface,141
Documents,230
display ip-subnet-vlan interface,169
duplex,17
display ip-subnet-vlan vlan,170
E
display isolate-user-vlan,174
enable snmp trap updown,74
display lacp system-id,66
233
lldp hold-multiplier,219
F
lldp management-address-format string,220
flow-control,17
lldp management-address-tlv,220
flow-interval,18
lldp notification remote-change enable,221
G
lldp timer notification-interval,221
garp timer hold,188
lldp timer reinit-delay,222
garp timer join,189
lldp timer tx-delay,222
garp timer leave,190
lldp timer tx-interval,223
garp timer leaveall,190
lldp tlv-enable,224
gvrp,191
loopback,21
gvrp registration,192
loopback-detection action,29
I
loopback-detection control enable,29
instance,106
loopback-detection enable,30
loopback-detection interval-time,31
interface,18
loopback-detection multi-port-mode enable,32
interface bridge-aggregation,75
interface loopback,45
loopback-detection per-vlan enable,33
interface null,46
M
interface range,49
mac-address (interface view),54
interface range name,50
mac-address (system view),55
interface vlan-interface,145
mac-address information enable (interface view),60
ip address,145
mac-address information enable (system view),60
ip-subnet-vlan,171
mac-address information interval,61
isolated-vlan enable,177
mac-address information mode,61
isolate-user-vlan,175
mac-address information queue-length,62
isolate-user-vlan enable,176
mac-address mac-learning disable,56
J
mac-address max-mac-count,57
jumboframe enable,19
mac-address timer,58
mac-vlan enable,161
L
mac-vlan mac-address,161
lacp period short,76
mac-vlan trigger enable,162
lacp system-priority,76
mdi,33
link-aggregation lacp traffic-redirect-notification
enable,77
mtu,38
mtu,146
link-aggregation load-sharing mode,78
multicast-suppression,34
link-aggregation load-sharing mode local-first,79
N
link-aggregation mode,80
name,147
link-aggregation port-priority,80
nest,194
link-delay,19
link-delay mode up,20
nest,199
lldp admin-status,216
P
lldp check-change-interval,217
port,151
lldp enable,217
port access vlan,152
lldp encapsulation snap,218
port auto-power-down,21
lldp fast-count,218
port hybrid ip-subnet-vlan,172
234
port hybrid protocol-vlan,166
speed,26
port hybrid pvid,153
speed auto,35
port hybrid vlan,154
stp bpdu-protection,110
port isolate-user-vlan host,180
stp bridge-diameter,110
port isolate-user-vlan promiscuous,178
stp compliance,111
port link-aggregation group,81
stp config-digest-snooping,112
port link-mode,22
stp cost,113
port link-mode interface-list,23
stp edged-port,114
port link-type,155
stp enable,115
port pvid disable,163
stp ignored vlan,116
port service-loopback group,228
stp loop-protection,117
port trunk permit vlan,156
stp max-hops,118
port trunk pvid,157
stp mcheck,118
port-isolate enable,85
stp mode,119
protocol-vlan,168
stp no-agreement-check,120
stp pathcost-standard,121
Q
stp point-to-point,121
qinq enable,195
stp port priority,122
qinq enable downlink,199
stp port-log,124
qinq enable uplink,200
stp priority,125
qinq ethernet-type customer-tag,195
stp region-configuration,125
qinq ethernet-type service-tag,196
stp root primary,126
qinq transparent-vlan,197
stp root secondary,127
R
stp root-protection,128
region-name,107
stp tc-protection,129
remark customer-vlan-id,200
stp tc-protection threshold,129
remark service-vlan-id,201
stp timer forward-delay,130
reset counters interface,82
stp timer hello,131
reset counters interface,24
stp timer max-age,132
reset counters interface loopback,46
stp timer-factor,133
reset counters interface null,47
stp transmit-limit,134
reset garp statistics,192
Subscription service,230
reset lacp statistics,82
U
reset packet-drop interface,24
unicast-suppression,36
reset stp,108
revision-level,109
V
S
virtual-cable-test,37
vlan,149
service-loopback group,228
vlan precedence,163
shutdown,148
vlan-mapping modulo,135
shutdown,25
shutdown,83
W
shutdown,48
Websites,230
235
Download PDF
Similar pages