Part number: 5998-1791
Software version: Release 2208
Document version: 5W100-20110530
Layer 2 - LAN Switching
Configuration Guide
Abstract
This document describes the software features for the HP A Series products and guides you through the
software configuration procedures. These configuration guides also provide configuration examples to
help you apply software features to different network scenarios.
This documentation is intended for network planners, field technical support and servicing engineers, and
network administrators working with the HP A Series products.
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.
Ethernet interface naming conventions ··························································································································· 1
Configuring basic settings of an Ethernet interface ······································································································· 1
Configuring a combo interface ······························································································································· 1
Configuring basic settings of an Ethernet interface ······························································································ 2
Setting speed options for auto negotiation on an Ethernet interface ·································································· 3
Configuring generic flow control on an Ethernet interface ·················································································· 4
Configuring link change suppression on an Ethernet interface ··········································································· 5
Configuring loopback testing on an Ethernet interface ························································································ 6
Configuring a port group ········································································································································ 7
Configuring traffic storm protection························································································································ 7
Setting the statistics polling interval ························································································································ 9
Enabling the auto power-down function on an Ethernet interface ··································································· 10
Configuring jumbo frame support ······················································································································· 10
Enabling single-port loopback detection on an Ethernet interface··································································· 11
Enabling multi-port loopback detection··············································································································· 12
Setting the MDI mode of an Ethernet interface ·································································································· 13
Enabling bridging on an Ethernet interface ······································································································· 14
Testing the cable connection of an Ethernet interface ······················································································· 14
Displaying and maintaining an Ethernet interface ····································································································· 15
Loopback and null interface configuration ················································································································· 17
How a MAC address table entry is created ······································································································· 20
Types of MAC address table entries ··················································································································· 20
MAC address table-based frame forwarding ···································································································· 21
Configuring the MAC address table ···························································································································· 21
Manually configuring MAC address table entries ····························································································· 21
Disabling MAC address learning ························································································································ 22
Configuring the aging timer for dynamic MAC address entries ······································································ 23
Configuring the MAC learning limit on ports ····································································································· 24
Displaying and maintaining MAC address tables ····································································································· 24
MAC address table configuration example ················································································································ 25
MAC Information configuration ··································································································································· 26
Introduction to MAC Information ························································································································· 26
How MAC Information works ······························································································································ 26
Configuring MAC Information ······································································································································ 26
Enabling MAC Information globally ··················································································································· 26
Enabling MAC Information on an interface ······································································································· 26
Configuring MAC Information mode ·················································································································· 27
iii
Configuring the interval for sending Syslog or trap messages········································································· 27
Configuring the MAC Information queue length································································································ 27
MAC Information configuration example ···················································································································· 28
Ethernet link aggregation configuration ······················································································································ 29
Aggregating links in static mode ························································································································· 32
Aggregating links in dynamic mode ··················································································································· 34
Load-sharing criteria for link aggregation groups ····························································································· 36
Ethernet link aggregation configuration task list ········································································································· 36
Configuring an aggregation group ····························································································································· 36
Configuring a static aggregation group ············································································································· 37
Configuring a dynamic aggregation group ······································································································· 37
Configuring an aggregate interface ···························································································································· 38
Configuring the description of an aggregate interface····················································································· 39
Enabling link state traps for an aggregate interface ························································································· 39
Shutting down an aggregate interface ··············································································································· 39
Configuring load sharing for link aggregation groups ······························································································ 40
Configuring load-sharing criteria for link aggregation groups ········································································ 40
Enabling local-first load sharing for link aggregation ······················································································· 41
Enabling link-aggregation traffic redirection··············································································································· 42
Displaying and maintaining Ethernet link aggregation ····························································································· 43
Ethernet link aggregation configuration examples ····································································································· 43
Layer 2 static aggregation configuration example ···························································································· 44
Layer 2 dynamic aggregation configuration example ······················································································ 46
Layer 2 aggregation load sharing configuration example ··············································································· 48
Port isolation configuration ··········································································································································· 51
Introduction to port isolation ········································································································································· 51
Configuring the isolation group ··································································································································· 51
Displaying and maintaining isolation groups ············································································································· 52
Port isolation configuration example ··························································································································· 52
Introduction to STP ························································································································································· 54
Protocol packets of STP ········································································································································· 54
Basic concepts in STP ··········································································································································· 55
How STP works ······················································································································································ 56
Introduction to RSTP ······················································································································································· 62
Introduction to MSTP ······················································································································································ 62
Basic concepts in MSTP ········································································································································ 63
How MSTP works ·················································································································································· 66
Implementation of MSTP on devices···················································································································· 67
Protocols and standards ······································································································································· 67
MSTP configuration task list ·········································································································································· 67
Configuring MSTP ·························································································································································· 69
Configuring an MST region ································································································································· 69
Configuring the root bridge or a secondary root bridge ·················································································· 69
Configuring the work mode of an MSTP device ································································································ 70
Configuring the priority of a device ···················································································································· 71
Configuring the maximum hops of an MST region ··························································································· 71
Configuring the network diameter of a switched network ················································································ 72
iv
Configuring timers of MSTP ································································································································· 72
Configuring the timeout factor ····························································································································· 73
Configuring the maximum port rate ···················································································································· 74
Configuring ports as edge ports ·························································································································· 74
Configuring path costs of ports ···························································································································· 75
Configuring port priority ······································································································································· 77
Configuring the link type of ports ························································································································ 78
Configuring the mode a port uses to recognize/send MSTP packets ····························································· 79
Enabling the output of port state transition information ···················································································· 80
Enabling the MSTP feature ··································································································································· 80
Introduction to VLAN ··················································································································································· 101
Types of VLANs ··················································································································································· 102
Configuring basic VLAN settings ······························································································································· 103
Configuring basic settings of a VLAN interface ······································································································· 104
Port-based VLAN configuration ·································································································································· 104
Introduction to port-based VLAN ······················································································································· 104
Assigning an access port to a VLAN ················································································································ 106
Assigning a trunk port to a VLAN ····················································································································· 107
Assigning a hybrid port to a VLAN ··················································································································· 108
Configuring an IP subnet-based VLAN ············································································································· 122
Displaying and maintaining VLAN ···························································································································· 124
Configuring an isolate-user-VLAN ····················································································································· 126
Associating secondary VLANs with an isolate-user-VLAN ·············································································· 128
Displaying and maintaining isolate-user-VLAN ········································································································· 128
Isolate-user-VLAN configuration example ·················································································································· 129
Security mode and normal mode of voice VLANs ··························································································· 135
Configuring a voice VLAN ·········································································································································· 136
Introduction to GVRP ···················································································································································· 143
Introduction to QinQ ··················································································································································· 155
Background and benefits ···································································································································· 155
How QinQ works ················································································································································ 155
Implementations of QinQ ··································································································································· 157
Modifying the TPID in a VLAN tag ···················································································································· 157
Protocols and standards ····································································································································· 158
QinQ configuration task list ········································································································································ 158
Configuring basic QinQ ············································································································································· 159
How LLDP works ·················································································································································· 172
Protocols and standards ····································································································································· 173
LLDP configuration task list ·········································································································································· 173
Performing basic LLDP configuration ·························································································································· 174
Configuring the advertisable TLVs ····················································································································· 175
Configuring the management address and its encoding format ···································································· 176
Setting other LLDP parameters ···························································································································· 177
Setting an encapsulation format for LLDPDUs ·································································································· 177
Configuring CDP compatibility ··································································································································· 178
Basic LLDP configuration example ····················································································································· 180
CDP-compatible LLDP configuration example ··································································································· 183
Support and other resources ····································································································································· 185
Contacting HP ······························································································································································ 185
Subscription service ············································································································································ 185
Related information ······················································································································································ 185
Index ············································································································································································· 188
vii
Ethernet interface configuration
NOTE:
For more information about the expansion cards, see the
HP A5120 EI Switch Series Installation Guide.
The HP A5120-24G EI Switch(JE066A) and the HP A5120-48G EI Switch(JE067A) do not support IRF.
Ethernet interface naming conventions
The GE and 10-GE interfaces on the A5120 EI Switch Series are named in the format of interface-type
A/B/C, where the following definitions apply:
If the switch does not support Intelligent Resilient Framework (IRF), A takes 1. If the switch supports
IRF, A represents the ID of the switch in an IRF fabric. If the switch is not assigned to any IRF fabric,
A uses 1.
B represents a slot number on the switch. It uses 0 for fixed interfaces, 1 for interfaces on interface
expansion card 1, and 2 for interfaces on interface expansion card 2.
C represents the number of an interface on a slot.
Configuring basic settings of an Ethernet interface
Configuring a combo interface
Introduction to combo interfaces
A combo interface is a logical interface that comprises one optical (fiber) port and one electrical (copper)
port. The two ports share one forwarding interface, so they cannot work simultaneously. When you
enable one port, the other is automatically disabled.
The fiber combo port and the copper combo port are Layer 2 Ethernet interfaces. They have their own
separate interface views, in which you can activate the fiber or copper combo port and configure other
port attributes such as the interface rate and duplex mode.
Configuration prerequisites
Before you configure a combo interface, complete the following tasks:
Use the display port combo command to identify the combo interfaces on your device and identify
the two physical ports that compose each combo interface.
Use the display interface command to determine, of the two physical ports that compose a combo
interface, which is the fiber combo port and which is the cooper combo port. If the current port is
the copper port, the output will include ―Media type is twisted pair, Port hardware type is 1000_BASE_T‖. If the current port is the fiber port, the output will include ―Media type is not sure,
Port hardware type is No connector‖.
Changing the active port of a combo interface
Follow these steps to change the active port of a double combo interface:
1
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enter Ethernet interface view
interface interface-type interfacenumber
—
Activate the current interface
undo shutdown
Optional
By default, of the two ports that
compose a combo interface, the
one with a smaller port ID is
active.
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enter Ethernet interface view
interface interface-type interfacenumber
—
Change the description of the
interface
descriptiontext
Optional
By default, the description of an
interface is the interface name
followed by the ―Interface‖ string, GigabitEthernet1/0/1 Interface for
example.
Set the duplex mode
duplex { auto | full | half }
Optional
The optical port of an SFP port and
the electrical port of an Ethernet port
whose port rate is configured as
1000 Mbps do not support the half
keyword.
The default duplex mode of a port is
auto negotiation.
Configuring basic settings of an Ethernet interface
You can set an Ethernet interface to operate in one of the following duplex modes:
Full-duplex mode (full): Interfaces that operates in this mode can send and receive packets
simultaneously.
Half-duplex mode (half): Interfaces that operates in this mode cannot send and receive packets
simultaneously.
Auto-negotiation mode (auto): Interfaces that operates in this mode negotiate a duplex mode with
their peers.
You can set the speed of an Ethernet interface or enable it to automatically negotiate a speed with its
peer. For a 100-Mbps or 1000-Mbps Layer 2 Ethernet interface, you can also set speed options for auto
negotiation. The two ends can select a speed only from the available options. For more information, see
―Setting speed options for auto negotiation on an Ethernet interface.‖
Follow these steps to configure an Ethernet interface:
2
To do…
Use the command…
Remarks
Set the interface speed
speed { 10 | 100 | 1000 | auto }
Optional
The optical port of an SFP port does
not support the 10 and 100
keywords.
By default, the auto option is
enabled.
Shut down the Ethernet
interface
shutdown
Optional
By default, an Ethernet interface is in
the up state.
To bring up an Ethernet interface,
use the undo shutdown command.
NOTE:
Optical interfaces do not support this feature.
IP network
Server 1Server 3Server 2
( Speed 1000 Mbps )
( Speed 1000 Mbps )
GE1/0/1
GE1/0/2
GE1/0/3
GE1/0/4
( Speed 1000 Mbps )
Setting speed options for auto negotiation on an Ethernet
interface
As shown in Figure 1, speed auto negotiation enables an Ethernet interface to negotiate with its peer for
the highest speed that both ends support by default. You can narrow down the speed option list for
negotiation.
Figure 1 Speed auto negotiation application scenario
All interfaces on the switch are operating in speed auto negotiation mode, with the highest speed of
1000 Mbps. If the transmission rate of each server in the server cluster is 1000 Mbps, their total
transmission rate will exceed the capability of interface GigabitEthernet 1/0/4, the interface providing
access to the Internet for the servers.
To avoid congestion on GigabitEthernet 1/0/4, set 100 Mbps as the only speed option available for
negotiation on interface GigabitEthernet 1/0/1, GigabitEthernet 1/0/2, and GigabitEthernet 1/0/3. As
a result, the transmission rate on each interface connected to a server is limited to 100 Mbps.
Follow these steps to configure an auto-negotiation transmission rate:
3
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enter Ethernet interface view
interface interface-type interfacenumber
—
Set speed options for auto
negotiation
speedauto [ 10 | 100 | 1000 ] *
Optional
NOTE:
This function is only available for Gigabit Layer-2 copper (electrical) Ethernet interfaces that support speed auto
negotiation.
The speed and speed auto commands supersede each other, and whichever is configured last takes effect.
Port A
Switch ASwitch B
Port B
1000Mbps
Port C
100Mbps
1000Mbps
Port D
100Mbps
Switch C
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enter Ethernet interface view
interface interface-type interfacenumber
—
Enable TxRx mode flow control
flow-control
Required
Use either command.
By default, flow control is
disabled on an Ethernet interface.
Enable Rx mode flow control
flow-control receive enable
Configuring generic flow control on an Ethernet interface
An interface implements generic flow control by sending and receiving common pause frames. The
following generic flow control modes are available:
TxRx mode enables an interface to both send and receive common pause frames.
Rx mode enables an interface to receive but not send common pause frames.
In Figure 2, when both Port A and Port B forward packets at 1000 Mbps, Port C is congested. To avoid
packet loss, enable flow control on Port A and Port B.
Figure 2 Flow control application scenario
Configure Port B to operate in TxRx mode, Port A in Rx mode.
When congestion occurs on Port C, Switch B buffers frames. When the amount of buffered frames
exceeds a certain value, Switch B sends a common pause frame out of Port B to ask Port A to
suspend sending packets. This pause frame also tells Port A for how long it is expected to pause.
Upon receiving the common pause frame from Port B, Port A suspends sending packets to Port B for
a period.
If congestion persists, Port B keeps sending common pause frames to Port A until the congestion
condition is removed.
Follow these steps to configure flow control on an interface:
4
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enter Ethernet interface view
interface interface-type
interface-number
—
Set a link-down suppression
interval
link-delay delay-time
Required
Link-down suppression is disabled by
default.
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enter Ethernet interface view
interface interface-type interfacenumber
—
Set a link-up suppression interval
link-delay delay-time mode up
Required
Link-up suppression is disabled by
default.
Configuring link change suppression on an Ethernet interface
An Ethernet interface has two physical link states: up and down. Each time the physical link of an
interface goes up or comes down, the physical layer reports the change to the upper layers, and the
upper layers handle the change, resulting in increased overhead.
To prevent physical link flapping from affecting system performance, configure link change suppression to
delay the reporting of physical link state changes. When the delay expires, the interface reports any
detected change.
Link change suppression does not suppress administrative up or down events. When you shut down or
bring up an interface by using the shutdown or undo shutdown command, the interface reports the event
to the upper layers immediately.
On an A5120 EI switch, you can configure link-down suppression or link-up suppression, but not both.
Link-down suppression enables an interface to suppress link-down events and start a delay timer each time
the physical link goes down. During this delay, the interface does not report the link-down event, and the
display interface brief or display interface command displays the interface state as UP. If the physical link
is still down when the timer expires, the interface reports the link-down event to the upper layers.
Link-up suppression enables an interface to suppress link-up events and start a delay timer each time the
physical link goes up. During this delay, the interface does not report the link-up event, and the display interface brief or display interface command displays the interface state as DOWN. If the physical link is
still up when the timer expires, the interface reports the link-up event to the upper layers.
Configuring link-down suppression
Follow these steps to enable an Ethernet interface to suppress link-down events:
Configuring link-up suppression
Follow these steps to configure link-up suppression on an Ethernet interface:
5
NOTE:
The link-delay mode up command and the link-delay command supersedes each other, and whichever
is configured last takes effect.
Port 1Port 2
Switching chip
Switch
Test packets
Looped packets
Port 1
Port 2
Switching chip
Switch
Loopback
plug
Test packets
Looped packets
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enter Ethernet interface view
interface interface-type interfacenumber
—
Perform loopback testing
loopback { external | internal }
Required
Configuring loopback testing on an Ethernet interface
You can perform loopback testing on an Ethernet interface to determine whether the interface functions
properly. The Ethernet interface cannot forward data packets during the testing. Loopback testing falls into
the following categories:
Internal loopback testing, which tests all on-chip functions related to Ethernet interfaces. As shown in
Figure 3, internal loopback testing is performed on Port 1. During internal loopback testing, the
interface sends a certain number of test packets, which are looped back to the interface over the
self-loop created on the switching chip.
Figure 3 Internal loopback testing
External loopback testing, which tests the hardware of Ethernet interfaces. As shown in Figure 4,
external loopback testing is performed on Port 1. To perform external loopback testing on an
Ethernet interface, insert a loopback plug into the interface. During external loopback testing, the
interface sends a certain number of test packets, which are looped over the plug and back to the
interface. If the interface fails to receive any test packet, the hardware of the interface is faulty.
Figure 4 External loopback testing
Follow these steps to perform loopback testing on an Ethernet interface:
6
NOTE:
On an interface that is physically down, you can only perform internal loopback testing. On an interface
administratively shut down, you can perform neither internal nor external loopback testing.
The speed, duplex, mdi, and shutdown commands are not available during loopback testing.
During loopback testing, the Ethernet interface operates in full duplex mode. When you disable loopback testing,
the port returns to its duplex setting.
To do…
Use the command…
Remarks
Enter system view
system-view
—
Create a port group and enter
port group view
port-group manual port-groupname
Required
Assign Ethernet interfaces to the
port group
group-member interface-list
Required
Shut down all Ethernet interfaces
in the port group
shutdown
Optional
By default, all Ethernet interfaces
in a port group are up. To bring
up all Ethernet interfaces shut
down manually in a port group,
use the undo shutdown command
in port group view.
Configuring a port group
Some interfaces on your switch might use the same set of settings. To configure these interfaces in bulk
rather than one by one, you can assign them to a port group.
You create port groups manually. All settings made for a port group apply to all the member ports of the
group. For example, you can configure a traffic suppression threshold (see ―Configuring traffic storm
protection‖) for multiple interfaces in bulk by assigning these interfaces to a port group.
Even though the settings are made on the port group, they are saved on each interface basis rather than
on a port group basis. You can only view the settings in the view of each interface by using the display current-configuration or display this command.
Follow these steps to configure a port group:
Configuring traffic storm protection
A traffic storm occurs when a large amount of broadcast, multicast, or unknown unicast packets congest a
network. The A5120 EI switches provide the following storm protection approaches:
Storm suppression, which you can use to limit the size of monitored traffic that passes through an
Ethernet interface by setting a traffic threshold. The port discards all traffic that exceeds the
threshold.
Storm control, which you can use to shut down Ethernet interfaces or block traffic when monitored
traffic exceeds the traffic threshold. Depending on your configuration, storm control can also enable
an interface to send trap or log messages when monitored traffic reaches a certain traffic threshold.
For a particular type of traffic, configure either storm suppression or storm control, but not both. If you
configure both of them, you might fail to achieve the expected storm control effect.
7
Configuring storm suppression on an Ethernet interface
NOTE:
If one suppression threshold has been set in pps on an Ethernet interface, you must set other
suppression thresholds in pps. If one suppression threshold has been set in percentage or kbps, you
cannot set other suppression thresholds in pps.
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enter Ethernet
interface view
or port group
view
Enter Ethernet
interface view
interface interface-type interfacenumber
Use either command.
To configure storm suppression
on one Ethernet interface, enter
Ethernet interface view.
To configure storm suppression
on a group of Ethernet
interfaces, enter port group
view.
Enter port
group view
port-groupmanual port-group-name
Set a broadcast suppression
threshold
broadcast-suppression { ratio |pps
max-pps | kbpsmax-bps }
Optional
By default, all broadcast traffic
is allowed to pass through an
interface.
Set a multicast suppression
threshold
multicast-suppression { ratio |pps
max-pps | kbpsmax-bps }
Optional
By default, all multicast traffic is
allowed to pass through an
interface.
Set a unknown unicast
suppression threshold
unicast-suppression { ratio |pps maxpps | kbps max-bps }
Optional
By default, all unknown unicast
traffic is allowed to pass
through an interface.
NOTE:
If you set a storm suppression threshold in both Ethernet interface view and port group view, the
threshold configured last takes effect.
You can use the following guidelines to set one suppression threshold for broadcast, multicast, and
unknown unicast traffic separately on an Ethernet interface.
Set the threshold as a percentage of the interface transmission capability.
Set the threshold in kbps, limiting the number of kilobits of monitored traffic passing through the
interface per second.
Set the threshold in pps, limiting the number of monitored packets passing through the interface per
second.
Follow these steps to configure storm suppression on an Ethernet interface:
Configuring storm control on an Ethernet interface
Storm control compares broadcast, multicast, and unknown unicast traffic regularly with their respective
traffic thresholds on an Ethernet interface. For each type of traffic, storm control provides a lower threshold
and a higher threshold.
8
For management purposes, you can configure the interface to send threshold event traps and log
To do…
Use the command…
Remarks
Enter system view
system-view
—
Set the traffic polling interval of
the storm control module
storm-constrain interval seconds
Optional
10 seconds by default.
Enter Ethernet interface view
interface interface-type interfacenumber
—
Enable storm control, and set the
lower and upper thresholds for
broadcast, multicast, or unknown
unicast traffic
Set the control action to take
when monitored traffic exceeds
the upper threshold
storm-constrain control { block |
shutdown }
Optional
Disabled by default.
Enable the interface to send storm
control threshold event traps.
storm-constrain enable trap
Optional
By default, the interface sends
traps when monitored traffic
exceeds the upper threshold or
drops below the lower threshold
from the upper threshold.
Enable the interface to log storm
control threshold events.
storm-constrain enable log
Optional
By default, the interface outputs
log messages when monitored
traffic exceeds the upper
threshold or falls below the lower
threshold from the upper
threshold.
NOTE:
For network stability, use the default or set a higher traffic polling interval.
Storm control uses a complete polling cycle to collect traffic data, and analyzes the data in the next cycle. An
interface takes one to two polling intervals to take a storm control action.
messages when monitored traffic exceeds the upper threshold or falls below the lower threshold from the
upper threshold.
When the traffic exceeds its higher threshold, the interface does either of the following, depending on
your configuration:
Blocks the particular type of traffic, while forwarding other types of traffic. Even though the interface
does not forward the blocked traffic, it still counts the traffic. When the blocked traffic drops below
the threshold, the interface begins to forward the traffic.
Shuts down automatically. The interface shuts down automatically and stops forwarding any traffic.
To bring up the interface, use the undo shutdown command or disable the storm control function.
Follow these steps to configure the storm control function on an Ethernet interface:
Setting the statistics polling interval
Follow these steps to set the statistics polling interval on an Ethernet interface:
9
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enter Ethernet interface view
interface interface-type interfacenumber
—
Set the statistics polling interval on
the Ethernet interface
flow-interval interval
Optional
The default interface statistics
polling interval is 300 seconds.
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enter Ethernet
interface view
or port group
view
Enter Ethernet
interface view
interface interface-type interfacenumber
Use either command.
To configure auto power-down on
one Ethernet interface, enter
Ethernet interface view.
To configure auto power-down on
a group of Ethernet interfaces,
enter port group view.
Enter port
group view
port-groupmanual port-group-name
Enable auto power-down on an
Ethernet interface
port auto-power-down
Required
Disabled by default.
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enter Ethernet
interface view
Enter Ethernet
interface view
interface interface-type
interface-number
Use either command.
To display the interface statistics collected in the last polling interval, use the display interface command.
To clear interface statistics, use the reset counters interface command.
Enabling the auto power-down function on an Ethernet interface
To save power, enable the auto power-down function on Ethernet interfaces. An interface enters the power
save mode if it has not received any packet for a certain period of time (this interval depends on the
specifications of the chip, and is not configurable). When a packet arrives later, the interface enters its
normal state.
Follow these steps to enable auto power-down on an Ethernet interface:
Configuring jumbo frame support
Ethernet frames longer than the standard Ethernet frame size (1536 bytes) are called "jumbo frames",
which are typical of file transfer.
If you set an Ethernet interface to accept jumbo frames, it allows frames up to 9216 bytes to pass
through.
If you disable an Ethernet interface to accept jumbo frames, it allows frames up to 1536 bytes to
pass through.
Follow these steps to configure jumbo frame support in Ethernet interface view:
10
To do…
Use the command…
Remarks
or port group
view
Enter port
group view
To configure jumbo frame support on one
Ethernet interface, enter Ethernet interface
view.
To configure jumbo frame support on a
group of Ethernet interfaces, enter port
group view.
Enable the interface to accept
jumbo frames
jumboframe enable
Required
By default, an Ethernet interface accepts
jumbo frames (up to 9216 bytes).
Port type
Actions
No protective action is configured
A protective action is configured
Access interface
Put the interface in controlled mode.
The interface discards all incoming
packets, but still forwards outgoing
traffic.
Create traps.
Delete all MAC address entries of
the interface.
Perform the configured protective
action.
Create traps and log messages.
Delete all MAC address entries of the
interface.
Hybrid or trunk
interface
Create traps.
If loopback detection control is
enabled, set the interface in
controlled mode. The interface
discards all incoming packets, but
still forwards outgoing packets.
Delete all MAC address entries of
the interface.
Create 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.
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enable global loopback detection
loopback-detection enable
Required
Disabled by default.
Set the loopback detection
interval
loopback-detection interval-time
time
Optional
30 seconds by default.
Enabling single-port loopback detection on an Ethernet
interface
If an interface receives a packet that it sent, a loop occurs. Loops might cause broadcast storms,
degrading network performance. You can use loopback detection to detect loops on an interface and
configure the protective action to take on the interface when a loop is detected, for example, to shut
down the interface. In addition to the configured protective action, the switch also performs other actions
to alleviate the impact of the loop condition, as described in Table 1.
Table 1 Actions to take upon detection of a loop condition
Follow these steps to configure single-port loopback detection:
11
To do…
Use the command…
Remarks
Enter
Ethernet
interface
view or port
group view
Enter Ethernet
interface view
interface interface-type interface-
number
Use either command.
To configure loopback detection
on one interface, enter Ethernet
interface view.
To configure loopback detection
on a group of Ethernet interfaces,
enter port group view.
Enter port group
view
port-group manual port-group-
name
Enable loopback detection on the
interface
loopback-detection enable
Required
Disabled by default.
Enable loopback detection control
loopback-detection control enable
Optional
Disabled by default.
Enable loopback detection in all
VLANs on the trunk or hybrid
interface
loopback-detection per-vlan
enable
Optional
By default, a trunk or hybrid
interface performs loopback
detection only in its PVID.
Set the protective action to take
on the interface when a loop is
detected
By default, a looped interface
discards all incoming packets but
still forwards outgoing packets.
The system generates traps and
deletes all MAC address entries
of the looped interface.
With the shutdown keyword used,
the switch shuts down looped
Ethernet interfaces and sets their
physical state to Loop down.
When a looped interface
recovers, you must use the undo shutdown command to restore its
forwarding capability.
NOTE:
To use single-port loopback detection on an Ethernet interface, you must enable the function both globally and
on the interface.
To disable loopback detection on all interfaces, run the undo loopback-detection enable command in system
view.
To enable a hybrid or trunk interface to take the administratively specified protective action, you must use the
loopback-detection control enable command on the interface.
When you change the link type of an Ethernet interface by using the port link-type command, the switch
removes the protective action configured on the interface. For more information about the port link-type
command, see the
Layer 2—LAN Switching Command Reference
.
Enabling multi-port loopback detection
When an interface receives packets sent from another interface on the same switch, a loop occurs
between the two interfaces. Such a loop is called a "multi-port loop". As shown in Figure 5, if Port 1
receives packets sent out Port 2, a multi-port loop occurs between the two interfaces, and Port 1 (the
12
interface that receives the looped packets) is the looped interface. Multi-port loops might also cause
LAN
Port 1Port 2
Switch A
Loop
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enable multi-port loopback
detection
loopback-detection multi-portmode enable
Required
Disabled by default.
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.
The single-port loopback detection function is available when the switch is performing multi-port loopback
detection.
NOTE:
Optical interfaces do not support the MDI mode setting.
broadcast storms.
Figure 5 Network diagram for multi-port loopback detection
The multi-port loopback detection function detects loops among interfaces on your switch. You can use the
loopback-detection action command to configure the protective action to take on looped interfaces— for
example, to shut down the interface, eliminating the loops. In addition, the switch also takes other link
type-dependant actions on the looped interface (for example, Port 1 in Figure 5) to alleviate the impact of
the loop condition. For more information, see ―Setting the statistics polling interval.‖
Multi-port loopback detection is implemented on the basis of single-port loopback detection
configurations on Ethernet interfaces. To implement multi-port loopback detection, you must enable singleport loopback detection on one or multiple Ethernet interfaces on the switch.
Follow these steps to configure multi-port loopback detection:
Setting the MDI mode of an Ethernet interface
You can use both crossover and straight-through Ethernet cables to connect copper Ethernet interfaces. To
accommodate these types of cables, a copper Ethernet interface can operate in one of the following
Medium Dependent Interface (MDI) modes:
Across mode
Normal mode
Auto mode
13
A copper Ethernet interface uses an RJ-45 connector, which comprises eight pins, each of which plays a
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enter Ethernet interface view
interface interface-type interfacenumber
—
Set the MDI mode of the Ethernet
interface
mdi { across | auto | normal }
Optional
By default, a copper Ethernet
interface operates in auto mode to
negotiate pin roles with its peer.
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enter Ethernet interface view
interface interface-type interfacenumber
—
Enable bridging on the Ethernet
interface
port bridge enable
Required
Disabled by default.
dedicated role. For example, pins 1 and 2 transmit signals, and pins 3 and 6 receive signals. The pin
role varies by the MDI modes as follows:
In normal mode, pins 1 and 2 are transmit pins, and pins 3 and 6 are receive pins.
In across mode, pins 1 and 2 are receive pins, and pins 3 and 6 are transmit pins.
In auto mode, the interface negotiates pin roles with its peer.
To enable the interface to communicate with its peer, ensure that its transmit pins are connected to the
remote receive pins. If the interface can detect the connection cable type, set the interface in auto MDI
mode. If not, set its MDI mode by using the following guidelines:
When a straight-through cable is used, set the interface to work in the MDI mode different than its
peer.
When a crossover cable is used, set the interface to work in the same MDI mode as its peer, or set
either end to work in auto mode.
Follow these steps to set the MDI mode of an Ethernet interface:
Enabling bridging on an Ethernet interface
When an incoming packet arrives, the switch looks up the destination MAC address of the packet in the
MAC address table. If an entry is found, but the outgoing interface is the same as the receiving interface
(for example, if the destination and source MAC addresses of the packet are the same), the switch
discards the packet.
To enable the switch to return such packets to the sender through the receiving interface rather than drop
them, enable the bridging function on the Ethernet interface.
Follow these steps to enable bridging on an Ethernet interface:
Testing the cable connection of an Ethernet interface
14
NOTE:
Optical interfaces do not support this feature.
If the link of an Ethernet interface is up, testing its cable connection will cause the link to come down and then go
up.
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enter Ethernet interface view
interface interface-type interfacenumber
—
Test the cable connected to the
Ethernet interface
virtual-cable-test
Required
To do…
Use the command…
Remarks
Display the current state of an
interface and the related
information
displayinterface [ interface-type [ interface-
number ] ] [ | { begin | exclude | include }
regular-expression ]
Available in any view
Display the summary of an
interface
display interface [ interface-type [ interface-
number ] ] brief [ | { begin | exclude |
include } regular-expression ]
display interface [ interface-type ] brief
down [ | { begin | exclude | include }
regular-expression ]
Available in any view
Display the statistics on the
packets that pass through a
specific type of interfaces
Display the statistics on the rate of
the packets that pass through the
interfaces that are of a specific
type and are in the up state in the
latest sampling interval
display packet-drop interface [ interface-type
[ interface-number ] ] [ | { begin | exclude |
include } regular-expression ]
Available in any view
Display summary information
about discarded packets on all
interfaces
display packet-drop summary [ | { begin |
exclude | include } regular-expression ]
Available in any view
Display information about a
manual port group or all manual
port groups
display port-group manual [ all | name port-
group-name ] [ | { begin | exclude | include
} regular-expression ]
Available in any view
You can test the cable connection of an Ethernet interface for a short or open circuit. The device displays
cable test results within five seconds. If any fault is detected, the test results include the length of the faulty
cable segment.
Follow these steps to test the cable connection of an Ethernet interface:
Displaying and maintaining an Ethernet interface
15
To do…
Use the command…
Remarks
Display information about the
loopback function
display loopback-detection [ | { begin |
exclude | include } regular-expression ]
Available in any view
Display information about storm
control on interfaces
Display the combo interfaces and
the fiber and copper combo ports
display port combo [ | { begin | exclude |
include } regular-expression ]
Available in any view
16
To do…
Use the command…
Remarks
Enter system view
system-view
—
Create a loopback interface and
enter loopback interface view
interface loopback interface-
number
—
Set a description for the loopback
interface
description text
Optional
By default, the description of an
interface is the interface name
followed by the ―Interface‖ string.
Shut down the loopback interface
shutdown
Optional
By default, a loopback interface is
up after it is created.
Loopback and null interface configuration
Loopback interface
Introduction to loopback interface
A loopback interface is a software-only virtual interface. It delivers the following benefits.
The physical layer state and link-layer protocols of a loopback interface are always up unless the
loopback interface is manually shut down.
To save IP address resources, you can assign an IP address with an all-F mask to a loopback
interface. When you assign an IPv4 address whose mask is not 32-bit, the system automatically
changes the mask into a 32-bit mask. When you assign an IPv6 address whose mask is not 128-bit,
the system automatically changes the mask into a 128-bit mask.
You can enable routing protocols on a loopback interface, and a loopback interface can send and
receive routing protocol packets.
You can configure a loopback interface address as the source address of the IP packets that the switch
generates. Because loopback interface addresses are stable unicast addresses, they are usually used as
device identifications. When you configure a rule on an authentication or security server to permit or
deny packets that a switch generates, you can simplify the rule by configuring it to permit or deny packets
that carry the loopback interface address that identifies the switch. When you use a loopback interface
address as the source address of IP packets, be sure to perform any necessary routing configuration to
ensure that the route from the loopback interface to the peer is reachable. All data packets sent to the
loopback interface are treated as packets sent to the switch itself, so the switch does not forward these
packets.
Configuring a loopback interface
Follow these steps to configure a loopback interface:
17
NOTE:
You can configure settings such as IP addresses and IP routes on loopback interfaces. For more
information, see the
Layer 3—IP Services Configuration Guide
and
Layer 3—IP Routing Configuration
Guide
.
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enter null interface view
interface null 0
Required
The Null 0 interface is the default null interface
on your switch. It cannot be manually created
or removed.
Set a description for the
null interface
description text
Optional
By default, the description of an interface is
the interface name followed by the ―Interface‖
string.
To do…
Use the command…
Remarks
Display information
about loopback
interfaces
display interface loopback [ brief [ down ] ] [ | {
begin | exclude | include } regular-expression ]
display interface loopback interface-number [ brief ] [
| { begin | exclude | include } regular-expression ]
Available in any view
Null interface
Introduction to null interface
A null interface is a completely software-based logical interface, and is always up. However, you cannot
use it to forward data packets or configure an IP address or link-layer protocol on it. With a null interface
specified as the next hop of a static route to a specific network segment, any packets routed to the
network segment are dropped. The null interface provides a simpler way to filter packets than ACL. You
can filter uninteresting traffic by transmitting it to a null interface instead of applying an ACL.
For example, by executing the ip route-static 92.101.0.0 255.255.0.0 null 0 command (which configures a
static route that leads to null interface 0), you can have all the packets destined to the network segment
92.101.0.0/16 discarded.
Only one null interface, Null 0, is supported on your switch. You cannot remove or create a null interface.
Configuring null 0 interface
Follow these steps to enter null interface view:
Displaying and maintaining loopback and null
interfaces
18
To do…
Use the command…
Remarks
Display information
about the null interface
display interface null [ brief [ down ] ] [ | { begin |
exclude | include } regular-expression ]
Every Ethernet switch maintains a MAC address table for forwarding frames through unicast instead of
broadcast. This table describes from which port a MAC address (or host) can be reached. When
forwarding a frame, the switch first looks up the MAC address of the frame in the MAC address table for
a match. If the switch finds an entry, it forwards the frame out of the outgoing port in the entry. If the
switch does not find an entry, it broadcasts the frame out of all but the incoming port.
How a MAC address table entry is created
The switch automatically obtains entries in the MAC address table, or you can add them manually.
MAC address learning
The switch can automatically populate its MAC address table by obtaining the source MAC addresses
(called ―MAC address learning‖) of incoming frames on each port.
When a frame arrives at a port, Port A for example, the switch performs the following tasks:
1. Verifies the source MAC address (for example, MAC-SOURCE) of the frame.
2. Looks up the MAC address in the MAC address table.
3. Updates an entry if it finds one. If the switch does not find an entry, it adds an entry for MAC-
SOURCE and Port A.
The switch performs the learning process each time it receives a frame from an unknown source MAC
address, until the MAC address table is fully populated.
After obtaining the source MAC address of a frame, the switch looks up the destination MAC address in
the MAC address table. If the switch finds an entry for the MAC address, it forwards the frame out of the
specific outgoing port, Port A in this example.
Manually configuring MAC address entries
With dynamic MAC address learning, a switch does not distinguish between illegitimate and legitimate
frames, which can invite security hazards. For example, if a hacker sends frames with a forged source
MAC address to a port different from the one that the real MAC address is connected to, the switch will
create an entry for the forged MAC address, and forward frames destined for the legal user to the hacker
instead.
To enhance the security of a port, you can bind specific user devices to the port by manually adding
MAC address entries into the MAC address table of the switch. Because manually configured entries have
higher priority than dynamically obtained ones, you can prevent hackers from stealing data using forged
MAC addresses.
Types of MAC address table entries
A MAC address table can contain the following types of entries:
Static entries, which are manually added and never age out.
20
NOTE:
A static or blackhole MAC address entry can overwrite a dynamic MAC address entry, but not vice
versa.
NOTE:
The MAC address table can contain only Layer 2 Ethernet ports and Layer 2 aggregate interfaces.
This document covers configuring static, dynamic, and blackhole unicast MAC address table entries. For more
information about static multicast MAC address table entries, see the
IP Multicast Configuration Guide
.
Dynamic entries, which can be manually added or dynamically obtained and might age out.
Blackhole entries, which are manually configured and never age out. Blackhole entries are
configured for filtering out frames with specific destination MAC addresses. For example, to block all
packets destined for a specific user for security concerns, you can configure the MAC address of this
user as a blackhole destination MAC address entry.
To adapt to network changes and prevent inactive entries from occupying table space, an aging
mechanism is adopted for dynamic MAC address entries. Each time a dynamic MAC address entry
obtained or created, an aging time starts. If the entry has not updated when the aging timer expires, the
switch deletes the entry. If the entry has updated before the aging timer expires, the aging timer restarts.
MAC address table-based frame forwarding
When forwarding a frame, the switch adopts the following forwarding modes based on the MAC
address table:
Unicast mode: If an entry is available for the destination MAC address, the switch forwards the
frame out of the outgoing interface indicated by the MAC address table entry.
Broadcast mode: If the switch receives a frame with the destination address as all ones, or no entry
is available for the destination MAC address, the switch broadcasts the frame to all the interfaces
except the receiving interface.
Configuring the MAC address table
The MAC address table configuration tasks include:
Manually configuring MAC address table entries
Disabling MAC address learning
Configuring the aging timer for dynamic MAC address entries
Configuring the MAC learning limit on ports
These configuration tasks are all optional and can be performed in any order.
Manually configuring MAC address table entries
To help prevent MAC address spoofing attacks and improve port security, you can manually add MAC
address table entries to bind ports with MAC addresses. You can also configure blackhole MAC address
entries to filter out packets with certain source or destination MAC addresses.
Follow these steps to add, modify, or remove entries in the MAC address table in system view:
21
To do…
Use the command…
Remarks
Enter system view
system-view
—
Configure MAC
address table
entries
Configure static or
dynamic MAC
address table
entries
Ensure that you have created the
VLAN and assign the interface to
the VLAN
To do…
Use the command…
Remarks
Enter system view
system-view
—
Disable global MAC address
learning
mac-address mac-learning
disable
Required
Enabled by default.
NOTE:
When MAC address learning is disabled, the obtained MAC addresses remain valid until they age out.
Follow these steps to add or modify a MAC address table entry in interface view:
Disabling MAC address learning
Sometimes, you might need to disable MAC address learning to prevent the MAC address table from
being saturated, for example, when your switch is being attacked by a large amount of packets with
different source MAC addresses.
Disabling global MAC address learning
Disabling global MAC address learning disables the learning function on all ports.
Follow these steps to disable MAC address learning:
Disabling MAC address learning on ports
After enabling global MAC address learning, you can disable the function on a single port, or on all
ports in a port group as needed.
Follow these steps to disable MAC address learning on an interface or a port group:
22
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enable global MAC address
learning
undo mac-address mac-learning
disable
Optional
Enabled by default.
Enter
interface view
or port group
view
Enter Layer 2
Ethernet interface
view or Layer 2
aggregate interface
view
interface interface-type interfacenumber
Required
Use either command.
The configuration made in Layer
2 Ethernet or Layer 2 aggregate
interface view takes effect on the
current interface only. The
configuration made in port
group view takes effect on all
the member ports in the port
group.
Enter port group
view
port-group manual port-group-
name
Disable MAC address learning on
the interface or all ports in the port
group
mac-address mac-learning
disable
Required
Enabled by default.
NOTE:
When MAC address learning is disabled, the obtained MAC addresses remain valid until they age out.
For more information about port groups, see the chapter ―Ethernet interface configuration.‖
To do…
Use the command…
Remarks
Enter system view
system-view
—
Configure the aging timer for
dynamic MAC address entries
mac-address timer { agingseconds | no-aging }
Optional
300 seconds by default.
Configuring the aging timer for dynamic MAC address entries
The MAC address table uses an aging timer for dynamic MAC address entries for security and efficient
use of table space. If a dynamic MAC address entry has failed to update before the aging timer expires,
the switch deletes the entry. This aging mechanism ensures that the MAC address table can quickly
update to accommodate the latest network changes.
Set the aging timer appropriately. A long aging interval might cause the MAC address table to retain
outdated entries, exhaust the MAC address table resources, and fail to update its entries to accommodate
the latest network changes. A short interval might result in the removal of valid entries and unnecessary
broadcasts, which might affect device performance.
Follow these steps to configure the aging timer for dynamic MAC address entries:
You can reduce broadcasts on a stable network by disabling the aging timer to prevent dynamic entries
from unnecessarily aging out. By reducing broadcasts, you improve not only network performance, but
also security, because you reduce the chances that a data packet will reach unintended destinations.
23
Loading...
+ 167 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.