LAN Switching Configuration Guide
LAN Switching Configuration Guide
Switch Series
Layer 2—LAN Switching Configuration Guide
Audience
This documentation is intended for:
• Network planners.
• Field technical support and servicing engineers.
• Network administrators working with the S6805, S6850, or S9850 switch series.
Conventions
The following information describes the conventions used in the documentation.
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.
Braces enclose a set of required syntax choices separated by vertical bars, from which
{ x | y | ... }
you select one.
Square brackets enclose a set of optional syntax choices separated by vertical bars,
[ x | y | ... ]
from which you select one or none.
Asterisk marked braces enclose a set of required syntax choices separated by vertical
{ x | y | ... } *
bars, from which you select a minimum of one.
Asterisk marked square brackets enclose optional syntax choices separated by vertical
[ x | y | ... ] *
bars, from which you select one choice, multiple choices, or none.
The argument or keyword and argument combination before the ampersand (&) sign
&<1-n>
can be entered 1 to n times.
# A line that starts with a pound (#) sign is comments.
GUI conventions
Convention Description
Window names, button names, field names, and menu items are in Boldface. For
Boldface
example, the New User window opens; click OK.
Multi-level menus are separated by angle brackets. For example, File > Create >
>
Folder.
Symbols
Convention Description
An alert that calls attention to important information that if not understood or followed
WARNING! can result in personal injury.
An alert that calls attention to important information that if not understood or followed
CAUTION: can result in data loss, data corruption, or damage to hardware or software.
Convention Description
Documentation feedback
You can e-mail your comments about product documentation to [email protected].
We appreciate your comments.
Contents
Configuring the MAC address table ······························································· 1
About the MAC address table ···························································································································· 1
How a MAC address entry is created········································································································· 1
Types of MAC address entries ··················································································································· 1
MAC address table tasks at a glance················································································································· 2
Configuring MAC address entries ······················································································································ 3
About MAC address entry-based frame forwarding ··················································································· 3
Restrictions and guidelines for MAC address entry configuration······························································ 3
Prerequisites for MAC address entry configuration···················································································· 3
Adding or modifying a static or dynamic MAC address entry····································································· 4
Adding or modifying a blackhole MAC address entry ················································································ 4
Adding or modifying a multiport unicast MAC address entry ····································································· 4
Setting the aging timer for dynamic MAC address entries ················································································· 5
Disabling MAC address learning ························································································································ 6
About disabling MAC address learning ······································································································ 6
Disabling global MAC address learning ····································································································· 6
Disabling MAC address learning on an interface ······················································································· 7
Disabling MAC address learning on a VLAN ····························································································· 7
Disabling the device from learning the source MAC addresses of Layer 2 protocol packets ···················· 7
Setting the MAC learning limit ···························································································································· 8
Configuring the unknown frame forwarding rule after the MAC learning limit is reached ·································· 8
About unknown frame forwarding rule configuration ·················································································· 9
Configuring the device to forward unknown frames after the MAC learning limit on an interface is reached
··································································································································································· 9
Assigning MAC learning priority to interfaces ···································································································· 9
Enabling MAC address synchronization ·········································································································· 10
Configuring MAC address move notifications and suppression ······································································· 11
Enabling ARP fast update for MAC address moves ························································································ 12
Disabling static source check ··························································································································· 13
Enabling SNMP notifications for the MAC address table ················································································· 14
Display and maintenance commands for MAC address table ········································································· 14
MAC address table configuration examples····································································································· 15
Example: Configuring the MAC address table ························································································· 15
Configuring MAC Information······································································· 17
About MAC Information ···································································································································· 17
Enabling MAC Information ······························································································································· 17
Configuring the MAC Information mode ··········································································································· 17
Setting the MAC change notification interval ··································································································· 18
Setting the MAC Information queue length ······································································································ 18
MAC Information configuration examples ········································································································ 19
Example: Configuring MAC Information ··································································································· 19
i
Configuring the MAC address table
About the MAC address table
An Ethernet device uses a MAC address table to forward frames. A MAC address entry includes a
destination MAC address, an outgoing interface, and a VLAN ID. When the device receives a frame,
it uses the destination MAC address of the frame to look for a match in the MAC address table.
• The device forwards the frame out of the outgoing interface in the matching entry if a match is
found.
• The device floods the frame in the VLAN of the frame if no match is found.
1
• Static entries—A static entry is manually added to forward frames with a specific destination
MAC address out of the associated interface, and it never ages out. A static entry has higher
priority than a dynamically learned one.
• Dynamic entries—A dynamic entry can be manually configured or dynamically learned to
forward frames with a specific destination MAC address out of the associated interface. A
dynamic entry might age out. A manually configured dynamic entry has the same priority as a
dynamically learned one.
• Blackhole entries—A blackhole entry is manually configured and never ages out. A blackhole
entry is configured for filtering out frames with a specific source or destination MAC address.
For example, to block all frames destined for or sourced from a user, you can configure the
MAC address of the user as a blackhole MAC address entry. A blackhole entry has higher
priority than a dynamically learned one.
• Multiport unicast entries—A multiport unicast entry is manually added to send frames with a
specific unicast destination MAC address out of multiple ports, and it never ages out. A multiport
unicast entry has higher priority than a dynamically learned one.
A static or blackhole MAC address entry can overwrite a dynamic MAC address entry. A dynamic
MAC address entry cannot overwrite a static, blackhole, or multiport unicast MAC address entry. A
static entry, a blackhole entry, and a multiport unicast entry cannot overwrite one another.
A multiport unicast MAC address entry does not affect learning the corresponding dynamic MAC
address entry. For the same MAC address, a multiport unicast MAC address entry and a dynamic
MAC address entry can coexist, and the multiport unicast MAC address takes priority.
This document does not cover the configuration of static multicast MAC address entries and MAC
address entries in VPLS. For more information about configuring static multicast MAC address
entries, see IGMP snooping in IP Multicast Configuration Guide. For more information about MAC
address table configuration in VPLS, see VPLS in MPLS Configuration Guide.
2
Configuring MAC address entries
About MAC address entry-based frame forwarding
A frame whose source MAC address matches different types of MAC address entries is processed
differently.
Type Description
Forwards the frame according to the destination MAC address regardless of
Static MAC address entry
whether the frame's ingress interface is the same as that in the entry.
Learns the source MAC address of the frame, generates a dynamic MAC
Multiport unicast MAC address entry for that MAC address, and forwards the frame. The multiport
address entry unicast MAC address entry has higher priority than the dynamic MAC address
entry in traffic forwarding.
3
Adding or modifying a static or dynamic MAC address entry
Adding or modifying a static or dynamic MAC address entry globally
1. Enter system view.
system-view
2. Add or modify a static or dynamic MAC address entry.
mac-address { dynamic | static } mac-address interface interface-type
interface-number vlan vlan-id
By default, no MAC address entry is configured globally.
Make sure you have assigned the interface to the VLAN.
Adding or modifying a static or dynamic MAC address entry on an interface
1. Enter system view.
system-view
2. Enter interface view.
Enter Layer 2 Ethernet interface view.
interface interface-type interface-number
Enter Layer 2 aggregate interface view.
interface bridge-aggregation interface-number
3. Add or modify a static or dynamic MAC address entry.
mac-address { dynamic | static } mac-address vlan vlan-id
By default, no MAC address entry is configured on an interface.
Make sure you have assigned the interface to the VLAN.
4
Figure 1 NLB cluster
Device
NLB cluster
You can configure a multiport unicast MAC address entry globally or on an interface.
Configuring a multiport unicast MAC address entry globally
1. Enter system view.
system-view
2. Add or modify a multiport unicast MAC address entry.
mac-address multiport mac-address interface interface-list vlan
vlan-id
By default, no multiport unicast MAC address entry is configured globally.
Make sure you have assigned the interface to the VLAN.
Configuring a multiport unicast MAC address entry on an interface
1. Enter system view.
system-view
2. Enter interface view.
Enter Layer 2 Ethernet interface view.
interface interface-type interface-number
Enter Layer 2 aggregate interface view.
interface bridge-aggregation interface-number
3. Add the interface to a multiport unicast MAC address entry.
mac-address multiport mac-address vlan vlan-id
By default, no multiport unicast MAC address entry is configured on an interface.
Make sure you have assigned the interface to the VLAN.
5
An aging interval that is too long might cause the MAC address table to retain outdated entries. As a
result, the MAC address table resources might be exhausted, and the MAC address table might fail
to update its entries to accommodate the latest network changes.
An interval that is too short might result in removal of valid entries, which would cause unnecessary
floods and possibly affect the device performance.
To reduce floods on a stable network, set a long aging timer or disable the timer to prevent dynamic
entries from unnecessarily aging out. Reducing floods improves the network performance. Reducing
flooding also improves the security because it reduces the chances for a data frame to reach
unintended destinations.
Procedure
1. Enter system view.
system-view
2. Set the aging timer for dynamic MAC address entries.
mac-address timer { aging seconds | no-aging }
By default, the aging timer is 300 seconds for dynamic MAC address entries.
6
Disabling MAC address learning on an interface
About this task
When global MAC address learning is enabled, you can disable MAC address learning on a single
interface.
Procedure
1. Enter system view.
system-view
2. Enter interface view.
Enter Layer 2 Ethernet interface view.
interface interface-type interface-number
Enter Layer 2 aggregate interface view.
interface bridge-aggregation interface-number
3. Disable MAC address learning on the interface.
undo mac-address mac-learning enable
By default, MAC address learning is enabled on an interface.
7
Figure 2 Frequent MAC moves caused by protocol packets
Server Device
If you disable the device from learning the source MAC addresses of Layer 2 protocol packets, the
device does not learn the source MAC addresses of the following protocol packets:
• BPDUs destined for a MAC address in the range of 0x01-80-c2-00-00-00 to
0x01-80-c2-00-00-0f.
• GARP PDUs destined for a MAC address in the range of 0x01-80-c2-00-00-20 to
0x01-80-c2-00-00-2f.
• PVST BPDUs destined for MAC address 0x01-00-0c-cc-cc-cd.
Procedure
1. Enter system view.
system-view
2. Disable the device from learning the source MAC addresses of Layer 2 protocol packets.
undo mac-address mac-learning pdu
By default, the device learns the source MAC addresses of Layer 2 protocol packets.
8
About unknown frame forwarding rule configuration
You can enable or disable forwarding of unknown frames after the MAC learning limit is reached.
9
Enabling MAC address synchronization
About this task
To avoid unnecessary floods and improve forwarding speed, make sure all member devices have the
same MAC address table. After you enable MAC address synchronization, each member device
advertises learned MAC address entries to other member devices.
As shown in Figure 3:
• Device A and Device B form an IRF fabric enabled with MAC address synchronization.
• Device A and Device B connect to AP C and AP D, respectively.
When Client A associates with AP C, Device A learns a MAC address entry for Client A and
advertises it to Device B.
Figure 3 MAC address tables of devices when Client A accesses AP C
MAC A A1 MAC A A1
IRF
Device A Device B
Port A1 Port B1
AP C AP D
Client A
When Client A roams to AP D, Device B learns a MAC address entry for Client A. Device B
advertises it to Device A to ensure service continuity for Client A, as shown in Figure 4.
10
Figure 4 MAC address tables of devices when Client A roams to AP D
MAC A A1 B1 MAC A B1
IRF
Device A Device B
Port A1 Port B1
AP C AP D
Client A
Procedure
1. Enter system view.
system-view
2. Enable MAC address synchronization.
mac-address mac-roaming enable
By default, MAC address synchronization is disabled.
11
If the system detects that MAC address moves occur frequently on an interface, you can configure
MAC address move suppression to shut the interface down. The interface automatically goes up
after a suppression interval. Or, you can manually bring up the interface.
Restrictions and guidelines
After you configure MAC address move notifications, the system sends only log messages to the
information center module. If the device is also configured with the snmp-agent trap enable
mac-address command, the system also sends SNMP notifications to the SNMP module.
Procedure
1. Enter system view.
system-view
2. Enable MAC address move notifications and optionally specify a MAC move detection interval.
mac-address notification mac-move [ interval interval ]
By default, MAC address move notifications are disabled.
3. (Optional.) Set MAC address move suppression parameters.
mac-address notification mac-move suppression { interval interval |
threshold threshold }
By default, the suppression interval is 30 seconds, and the suppression threshold is 3.
For the MAC address move suppression parameters to take effect, enable the MAC address
move suppression on a port.
4. Enter interface view.
Enter Layer 2 Ethernet interface view.
interface interface-type interface-number
Enter Layer 2 aggregate interface view.
interface bridge-aggregation interface-number
5. Enable MAC address move suppression.
mac-address notification mac-move suppression
By default, MAC address move suppression is disabled.
12
Figure 5 ARP fast update application scenario
Device
Port A Port B
AP 1 AP 2
Laptop
Procedure
1. Enter system view.
system-view
2. Enable ARP fast update for MAC address moves.
mac-address mac-move fast-update
By default, ARP fast update for MAC address moves is disabled.
13
interface interface-type interface-number
Enter Layer 3 aggregate interface view.
interface route-aggregation interface-number
Enter IRF physical interface view.
interface interface-type interface-number
3. Disable the static source check feature.
undo mac-address static source-check enable
By default, the static source check feature is enabled.
Task Command
display mac-address [ mac-address [ vlan
vlan-id ] | [ [ dynamic | static ] [ interface
Display MAC address table
interface-type interface-number ] |
information.
blackhole | multiport ] [ vlan vlan-id ]
[ count ] ]
Display the aging timer for dynamic
display mac-address aging-time
MAC address entries.
14
Task Command
address learning state. [ interface interface-type interface-number ]
Display the MAC address move display mac-address mac-move [ slot
records. slot-number]
Display MAC address statistics. display mac-address statistics
WGE1/0/1
Procedure
# Add a static MAC address entry for MAC address 000f-e235-dc71 on Twenty-FiveGigE 1/0/1 that
belongs to VLAN 1.
<Device> system-view
[Device] mac-address static 000f-e235-dc71 interface twenty-fivegige 1/0/1 vlan 1
# Add a blackhole MAC address entry for MAC address 000f-e235-abcd that belongs to VLAN 1.
[Device] mac-address blackhole 000f-e235-abcd vlan 1
# Set the aging timer to 500 seconds for dynamic MAC address entries.
[Device] mac-address timer aging 500
15
MAC Address VLAN ID State Port/Nickname Aging
000f-e235-abcd 1 Blackhole N/A N
16
Configuring MAC Information
About MAC Information
The MAC Information feature can generate syslog messages or SNMP notifications when MAC
address entries are learned or deleted. You can use these messages to monitor user's leaving or
joining the network and analyze network traffic.
The MAC Information feature buffers the MAC change syslog messages or SNMP notifications in a
queue. The device overwrites the oldest MAC address change written into the queue with the most
recent MAC address change when the following conditions exist:
• The MAC change notification interval does not expire.
• The queue has been exhausted.
To send a syslog message or SNMP notification immediately after it is created, set the queue length
to zero.
17
Procedure
1. Enter system view.
system-view
2. Configure the MAC Information mode.
mac-address information mode { syslog | trap }
The default setting is trap.
18
MAC Information configuration examples
Example: Configuring MAC Information
Network configuration
Enable MAC Information on Twenty-FiveGigE 1/0/1 on Device in Figure 7 to send MAC address
changes in syslog messages to the log host, Host B, through interface Twenty-FiveGigE 1/0/2.
Figure 7 Network diagram
Device
WGE1/0/1 WGE1/0/3
WGE1/0/2
Host A Server
192.168.1.1/24 192.168.1.3/24
Host B
192.168.1.2/24
19
# mkdir /var/log/Device
c. Create file info.log in the Device directory to save logs from Device.
# touch /var/log/Device/info.log
d. Edit the file syslog.conf in directory /etc/ and add the following contents:
# Device configuration messages
local4.info /var/log/Device/info.log
In this configuration, local4 is the name of the logging facility that the log host uses to
receive logs, and info is the informational level. The UNIX system records the log
information that has a severity level no lower than informational to file
/var/log/Device/info.log.
e. Display the process ID of syslogd, end the syslogd process, and then restart syslogd
using the –r option to make the new configuration take effect.
# ps -ae | grep syslogd
147
# kill -HUP 147
# syslogd -r &
The device can output MAC address logs to the log host, which stores the logs to the specified
file.
3. Enable MAC Information on Device:
# Enable MAC Information globally.
[Device] mac-address information enable
# Configure the MAC Information mode as syslog.
[Device] mac-address information mode syslog
# Enable MAC Information on Twenty-FiveGigE 1/0/1 to enable the port to record MAC address
change information when the interface performs either of the following operations:
Learns a new MAC address.
Deletes an existing MAC address.
[Device] interface twenty-fivegige 1/0/1
[Device-Twenty-FiveGigE1/0/1] mac-address information enable added
[Device-Twenty-FiveGigE1/0/1] mac-address information enable deleted
[Device-Twenty-FiveGigE1/0/1] quit
# Set the MAC Information queue length to 100.
[Device] mac-address information queue-length 100
# Set the MAC change notification interval to 20 seconds.
[Device] mac-address information interval 20
20
Contents
Bulk configuring interfaces ············································································· 1
About interface bulk configuration ······················································································································ 1
Restrictions and guidelines: Bulk interface configuration ··················································································· 1
Procedure··························································································································································· 2
Display and maintenance commands for bulk interface configuration ······························································· 2
i
Bulk configuring interfaces
About interface bulk configuration
You can enter interface range view to bulk configure multiple interfaces with the same feature
instead of configuring them one by one. For example, you can execute the shutdown command in
interface range view to shut down a range of interfaces.
To configure interfaces in bulk, you must configure an interface range and enter its view by using the
interface range or interface range name command.
The interface range created by using the interface range command is not saved to the running
configuration. You cannot use the interface range repeatedly. To create an interface range that can
be used repeatedly, use the interface range name command.
1
You can use the display this command to verify the configuration in interface view of
each member interface. In addition, if the configuration in system view is not needed, use
the undo form of the command to remove the configuration.
Procedure
1. Enter system view.
system-view
2. Create an interface range and enter interface range view.
Create an interface range without specifying a name.
interface range { interface-type interface-number [ to
interface-type interface-number ] } &<1-24>
Create a named interface range.
interface range name name [ interface { interface-type
interface-number [ to interface-type interface-number ] } &<1-24> ]
3. (Optional.) Display commands available for the first interface in the interface range.
Enter a question mark (?) at the interface range prompt.
4. Use available commands to configure the interfaces.
Available commands depend on the interface.
5. (Optional.) Verify the configuration.
display this
Task Command
2
Contents
Configuring Ethernet interfaces ····································································· 1
About Ethernet interface ···································································································································· 1
Configuring a management Ethernet interface ·································································································· 1
Ethernet interface naming conventions ·············································································································· 2
Restrictions and guidelines for 25-GE interfaces ······························································································· 2
Restrictions and guidelines for 10-GE interfaces ······························································································· 5
Configuring common Ethernet interface settings ······························································································· 5
Splitting a 40-GE interface and combining 10-GE breakout interfaces ······················································ 6
Splitting a 100-GE interface and combining 50-GE breakout interfaces ···················································· 7
Splitting a 100-GE interface and combining 10-GE breakout interfaces ···················································· 8
Splitting a 100-GE interface and combining 25-GE breakout interfaces ···················································· 9
Configuring basic settings of an Ethernet interface·················································································· 10
Configuring basic settings of an Ethernet subinterface ············································································ 11
Configuring the link mode of an Ethernet interface ·················································································· 12
Configuring jumbo frame support ············································································································· 12
Configuring physical state change suppression on an Ethernet interface ··············································· 13
Configuring dampening on an Ethernet interface····················································································· 13
Enabling link flapping protection on an interface······················································································ 15
Configuring FEC······································································································································· 16
Configuring link compensation ················································································································· 17
Configuring storm suppression ················································································································ 17
Configuring generic flow control on an Ethernet interface ······································································· 18
Configuring PFC······································································································································· 19
Setting PFC thresholds ···························································································································· 20
Configuring PFC deadlock detection········································································································ 22
Configuring the early warning thresholds for PFC packets ······································································ 24
Enabling energy saving features on an Ethernet interface ······································································ 25
Setting the statistics polling interval ········································································································· 25
Enabling loopback testing on an Ethernet interface ················································································· 25
Forcibly bringing up a fiber port················································································································ 26
Setting the media type for an Ethernet interface ······················································································ 28
Configuring interface alarm functions······································································································· 28
Restoring the default settings for an interface·························································································· 30
Configuring a Layer 2 Ethernet interface ········································································································· 30
Configuring storm control on an Ethernet interface·················································································· 30
Changing a Layer 2 Ethernet interface to an FC interface ······································································· 32
Enabling bridging on an Ethernet interface ······························································································ 32
Configuring a Layer 3 Ethernet interface or subinterface················································································· 33
Setting the MTU for an Ethernet interface or subinterface ······································································· 33
Setting the MAC address of an Ethernet interface or subinterface ·························································· 33
Display and maintenance commands for Ethernet interfaces ·········································································· 34
i
Configuring Ethernet interfaces
About Ethernet interface
The Switch Series supports Ethernet interfaces, management Ethernet interfaces, Console
interfaces, and USB interfaces. For the interface types and the number of interfaces supported by a
switch model, see the installation guide.
This chapter describes how to configure management Ethernet interfaces and Ethernet interfaces.
1
By default, the management Ethernet interface is up.
CAUTION:
Executing the shutdown command on an interface will disconnect the link of the interface and
interrupt communication. Use this command with caution.
2
Interfaces in the same group must have the same speed settings. When you modify the speed of an
interface in a group, the modification takes effect on all interfaces in the group. When you use the
default command to restore the default settings for the interface, the speed will be restored to the
default for the interface and the other interfaces in the group.
For the following 25-GE interfaces, 12 contiguous interfaces in ascending order of interface number
are organized into one group. When one of the following 25-GE interfaces uses an
SFP-XG-LX-SM1310-D (0231A1RQ) transceiver module, for the transceiver module to operate
correctly, you must set the same speed for interfaces in the same group as the interface.
• Interfaces 1 through 24 and interfaces 33 through 56 on an S6850-56HF switch. When you set
the speed for an interface, the speed is set for four interfaces in the same group as the
interface.
• Interfaces 1 through 24 and interfaces 31 through 54 on an S6825-54HF switch.
• Interfaces 1 through 24 on an LSWM124TG2H card. When you set the speed for an interface,
the speed is set for four interfaces in the same group as the interface.
For example, when interface 3 on an S6850-56HF switch uses an SFP-XG-LX-SM1310-D
transceiver module, interfaces 1 through 12 must be configured to operate at 10 Gbps for the
transceiver module to operate properly. When you set the speed for an interface, set the speed for
four interfaces in the same group as prompted.
For 25-GE interfaces on an LSWM124TG2H interface module, you must use the port
media-type { copper | fiber } command to set the media type. Set the media type to fiber
for an interface that uses a transceiver module or fiber cable. Set the media type to copper for an
interface that uses a copper cable. The media type of interfaces in the same group is the same.
When you set the media type for any interface in a group, the setting is synchronized to the other
interfaces in the group.
When a local 25-GE interface on an S6825-54HF, S6850-56HF, or S9850-32H switch is connected
to a peer 25-GE interface on a different device, the interface configuration requirements are as
shown in Table 1. For interfaces to operate properly, you must enable link compensation (also known
as training or CL72) on both ends when the interfaces are connected by using a copper cable. This
requirement is not otherwise described in Table 1.
In Table 1, the 25-GE interfaces are supposed to be connected when they use the default settings.
Table 1 States of a local 25-GE interface on an S6825-54HF, S6850-56HF, or S9850-32H
switch
3
S9820-64H switch
• By default, the local interface is down when connected to the peer
by using a cable. To bring up the local interface, perform the
following operations:
25-GE breakout interfaces split Configure the local interface to operate in the same speed and
from interfaces 33 through 64 on duplex mode as the peer interface. Do not configure
an S9820-64H switch autonegotiation settings.
Set the FEC mode to RS-FEC for the local interface.
• The local interface is up by default when connected to the peer by
using a transceiver module.
• By default, the local interface is down when connected to the peer
by using a cable. To bring up the local interface, perform the
following operations:
Configure the local interface to operate in the same speed and
duplex mode as the peer interface. Do not configure
autonegotiation settings.
S9850-4C, S6850-2C Set the FEC mode to RS-FEC for the local interface.
Execute the port media-type copper command on
the peer interface if the peer interface is an SFP28 interface on
an LSWM124TG2H interface module.
• The local interface is up by default when connected to the peer by
using a transceiver module.
S6825-54HF, S6850-56HF,
Up by default.
S9850-32H
When a local 25-GE interface on an S9850-4C or S6850-2C switch is connected to a peer 25-GE
interface on a different device, the interface configuration requirements are as shown in Table 2. For
interfaces to operate properly, you must enable link compensation (also known as training or CL72)
on both ends when the interfaces are connected by using a copper cable. This requirement is not
otherwise described in Table 2.
In Table 2, the 25-GE interfaces (including 25-GE breakout interfaces split from a 100-GE interface)
are supposed to be connected when they use the default settings.
Table 2 States of a local 25-GE interface on an S9850-4C or S6850-2C switch
4
duplex mode as the local interface. Do not configure
autonegotiation settings.
Set the FEC mode to RS-FEC for the peer interface.
Execute the port media-type copper command on
the local interface if the local interface is an SFP28 interface
on an LSWM124TG2H interface module.
• The local interface is up by default when connected to the peer by
using a transceiver module.
• When the local interface is connected to the peer by using a cable,
execute the port media-type copper command on the
25-GE breakout interfaces split local interface if the local interface is an SFP28 interface on an
from interfaces 33 through 64 on LSWM124TG2H interface module.
an S9820-64H switch
• When the local interface is connected to the peer by using a
transceiver module, the local interface is up by default.
• When the local interface is connected to the peer by using a cable,
execute the port media-type copper command on both
the local interface and peer interface if the interfaces are SFP28
S9850-4C, S6850-2C interfaces on LSWM124TG2H interface modules.
• When the local interface is connected to the peer by using a
transceiver module, the local interface is up by default.
• By default, the local interface is down when connected to the peer
by using a cable. To bring up the local interface, perform the
following operations:
Configure the peer interface to operate in the same speed and
duplex mode as the local interface. Do not configure
S6825-54HF, S6850-56HF, autonegotiation settings.
S9850-32H Set the FEC mode to RS-FEC for the peer interface.
Execute the port media-type copper command on
the local interface if the local interface is an SFP28 interface
on an LSWM124TG2H interface module.
• The local interface is up by default when connected to the peer by
using a transceiver module.
5
Splitting a 40-GE interface and combining 10-GE breakout
interfaces
About this task
You can use a 40-GE interface as a single interface. To improve port density, reduce costs, and
improve network flexibility, you can also split a 40-GE interface into four 10-GE breakout interfaces.
The 10-GE breakout interfaces support the same configuration and attributes as common 10-GE
interfaces, except that they are numbered differently.
For example, you can split 40-GE interface FortyGigE 1/0/1 into four 10-GE breakout interfaces
Ten-GigabitEthernet 1/0/1:1 through Ten-GigabitEthernet 1/0/1:4.
If you need higher bandwidth on a single interface, you can combine the four 10-GE breakout
interfaces into a 40-GE interface.
Hardware and feature compatibility
The S6805 and S6825 switch series does not support this feature.
Restrictions and guidelines for 40-GE interface splitting and 10-GE breakout interface
combining
• A 40-GE interface split into four 10-GE breakout interfaces must use a dedicated 1-to-4 cable.
After you combine the four 10-GE breakout interfaces, replace the dedicated 1-to-4 cable with a
dedicated 1-to-1 cable or a 40-GE transceiver module. For more information about the cable or
transceiver module, see the installation guides.
• Device reboot is not required for this feature to take effect. You can view the split or combined
interface by using the display interface brief command.
• When the LSWM18QC interface module is installed in the slot 2 on the S9850-4C switch, the
interface numbered 8 on the interface module cannot be split.
• When the LSWM124XG2Q, LSWM124XGT2Q, LSWM124XG2QFC, LSWM124XG2QL
interface module is installed in the slot 2 on the S9850-4C switch, the interface numbered 25 on
the interface module cannot be split.
• All interfaces on the LSWM116Q interface module cannot be split.
• An interface with any of the following configurations cannot be split:
IRF physical interface.
Service loopback group member.
Reflector port for mirroring.
Forcibly bringing up a fiber port.
Splitting a 40-GE interface into four 10-GE breakout interfaces
1. Enter system view.
system-view
2. Enter 40-GE interface view.
interface fortygige interface-number
3. Split the 40-GE interface into four 10-GE breakout interfaces.
using tengige
By default, a 40-GE interface is not split and operates as a single interface.
Combining four 10-GE breakout interfaces into a 40-GE interface
1. Enter system view.
system-view
6
2. Enter the view of any 10-GE breakout interface.
interface ten-gigabitethernet interface-number
3. Combine the four 10-GE breakout interfaces into a 40-GE interface.
using fortygige
By default, a 10-GE breakout interface operates as a single interface.
7
By default, a 100-GE interface is not split and operates as a single interface.
Combining two 50-GE breakout interfaces into a 100-GE interface
1. Enter system view.
system-view
2. Enter the view of any 50-GE breakout interface.
interface fiftygige interface-number
3. Combine the two 50-GE breakout interfaces into a 100-GE interface.
using hundredgige
By default, a 100-GE interface is not split and operates as a single interface.
8
• IRF physical interface.
• Service loopback group member.
• Reflector port for mirroring.
• Forcibly bringing up a fiber port.
Splitting a 100-GE interface into multiple 10-GE breakout interfaces
1. Enter system view.
system-view
2. Enter 100-GE interface view.
interface hundredgige interface-number
3. Split the 100-GE interface into multiple 10-GE breakout interfaces.
using tengige
By default, a 100-GE interface is not split and operates as a single interface.
Combining multiple 10-GE breakout interfaces into a 100-GE interface
1. Enter system view.
system-view
2. Enter the view of any 10-GE breakout interface.
interface ten-gigabitethernet interface-number
3. Combine the multiple 10-GE breakout interfaces into a 100-GE interface.
using hundredgige
By default, a 10-GE breakout interface operates as a single interface.
9
After configuring this feature, you do not need to reboot the device. To view information about the
breakout interfaces, execute the display interface brief command.
The interface numbered 31 on the S6850-56HF switch cannot be split.
The interface numbered 31 on an S9850-32H switch cannot be split by default. To split this interface,
first enable the hardware resource flex mode for the device by using the hardware-resource
flex-mode enable command. For more information about the hardware resource flex mode, see
Fundamentals Configuration Guide.
When the LSWM18CQ or LSWM18CQMSEC interface module is installed in the slot 2 on the
S9850-4C switch, the interface numbered 7 on the interface module cannot be split.
When the LSWM124TG2H interface module is installed in the slot 2 on the S9850-4C switch, the
interface numbered 25 on the interface module cannot be split.
An interface with any of the following configurations cannot be split:
• IRF physical interface.
• Service loopback group member.
• Reflector port for mirroring.
• Forcibly bringing up a fiber port.
Splitting a 100-GE interface into four 25-GE breakout interfaces
1. Enter system view.
system-view
2. Enter 100-GE interface view.
interface hundredgige interface-number
3. Split the 100-GE interface into four 25-GE breakout interfaces.
using twenty-fivegige
By default, a 100-GE interface is not split and operates as a single interface.
Combining four 25-GE breakout interfaces into a 100-GE interface
1. Enter system view.
system-view
2. Enter the view of any 25-GE breakout interface.
interface twenty-fivegige interface-number
3. Combine the four 25-GE breakout interfaces into a 100-GE interface.
using hundredgige
By default, a 25-GE breakout interface operates as a single interface.
10
Restrictions and guidelines
When a 25-GE or 10-GE interface connects to a peer through a 1-Gbps transceiver module, you
must disable autonegotiation on the peer interface.
The shutdown and port up-mode commands are mutually exclusive.
The shutdown command cannot be configured on an Ethernet interface in a loopback test.
Procedure
1. Enter system view.
system-view
2. Enter Ethernet interface view.
interface interface-type interface-number
3. Set the description for the Ethernet interface.
description text
The default setting is interface-name Interface. For example, Twenty-FiveGigE1/0/1
Interface.
4. Set the duplex mode for the Ethernet interface.
duplex { auto | full | half }
By default, the duplex mode is auto for Ethernet interfaces.
Fiber ports do not support the half keyword.
5. Set the speed for the Ethernet interface.
speed { 10 | 100 | 1000 | 10000 | 25000 | 40000 | 100000 | auto }
By default, an Ethernet interface negotiates a speed with its peer.
6. Set the expected bandwidth for the Ethernet interface.
bandwidth bandwidth-value
By default, the expected bandwidth (in kbps) is the interface baud rate divided by 1000.
7. Bring up the Ethernet interface.
undo shutdown
By default, Ethernet interfaces are in up state.
11
The default setting is interface-name Interface. For example, Twenty-FiveGigE1/0/1.1
Interface.
4. Set the expected bandwidth for the Ethernet subinterface.
bandwidth bandwidth-value
By default, the expected bandwidth (in kbps) is the interface baud rate divided by 1000.
5. Bring up the Ethernet subinterface.
undo shutdown
By default, Ethernet subinterfaces are in up state.
CAUTION:
After you change the link mode of an Ethernet interface, all commands (except the
description, duplex, jumboframe enable, speed, and shutdown commands) on
the Ethernet interface are restored to their defaults in the new link mode.
12
3. Configure jumbo frame support.
jumboframe enable [ size ]
By default, the device allows jumbo frames within 9416 bytes to pass through.
If you set the size argument multiple times, the most recent configuration takes effect.
13
If an interface is not dampened, its state changes are reported. For each state change, the system
also generates an SNMP trap and log message.
After a flapping interface is dampened, it does not report its state changes to the CPU. For state
change events, the interface only generates SNMP trap and log messages.
Parameters
• Penalty—The interface has an initial penalty of 0. When the interface flaps, the penalty
increases by 1000 for each down event until the ceiling is reached. It does not increase for up
events. When the interface stops flapping, the penalty decreases by half each time the half-life
timer expires until the penalty drops to the reuse threshold.
• Ceiling—The penalty stops increasing when it reaches the ceiling.
• Suppress-limit—The accumulated penalty that triggers the device to dampen the interface. In
dampened state, the interface does not report its state changes to the CPU. For state change
events, the interface only generates SNMP traps and log messages.
• Reuse-limit—When the accumulated penalty decreases to this reuse threshold, the interface is
not dampened. Interface state changes are reported to the upper layers. For each state change,
the system also generates an SNMP trap and log message.
• Decay—The amount of time (in seconds) after which a penalty is decreased.
• Max-suppress-time—The maximum amount of time the interface can be dampened. If the
penalty is still higher than the reuse threshold when this timer expires, the penalty stops
increasing for down events. The penalty starts to decrease until it drops below the reuse
threshold.
When configuring the dampening command, follow these rules to set the values mentioned above:
•
(Max-suppress-time/Decay)
The ceiling is equal to 2 × reuse-limit. It is not user configurable.
• The configured suppress limit is lower than or equal to the ceiling.
• The ceiling is lower than or equal to the maximum suppress limit supported.
Figure 1 shows the change rule of the penalty value. The lines t0 and t2 indicate the start time and
end time of the suppression, respectively. The period from t0 to t2 indicates the suppression period, t0
to t1 indicates the max-suppress-time, and t1 to t2 indicates the complete decay period.
14
Figure 1 Change rule of the penalty value
Penalty
t0 t1 t2
Ceiling
Suppress limit
Reuse limit
Time
15
Restrictions and guidelines
This feature takes effect only if it is configured in both the system view and interface view.
IRF system stability might be affected by IRF physical link flapping. For IRF system stability, this
feature is enabled by default on IRF physical interfaces and the enabling status of this feature is not
affected by the status of global link flapping protection. When the number of flaps detected on an IRF
physical interface exceeds the threshold within the detection interval, the device outputs a log rather
than shuts down the IRF physical interface.
The dampening, link-delay, and port link-flap protect enable commands are
mutually exclusive on an Ethernet interface.
To bring up an interface that has been shut down by link flapping protection, execute the undo
shutdown command.
In the display interface command output, the Link-Flap DOWN value of the Current state
field indicates that the interface has been shut down by link flapping protection.
Procedure
1. Enter system view.
system-view
2. Enable link flapping protection globally.
link-flap protect enable
By default, link flapping protection is disabled globally.
3. Enter Ethernet interface view.
interface interface-type interface-number
4. Enable link flapping protection on the Ethernet interface.
port link-flap protect enable [ interval interval | threshold
threshold ] *
By default, link flapping protection is disabled on an Ethernet interface.
Configuring FEC
About this task
The forward error correction (FEC) feature corrects packet errors to improve transmission quality. It
attaches correction information to a packet at the sending end, and corrects error codes generated
during transmission at the receiving end based on the correction information. You can set the FEC
mode as needed.
Restrictions and guidelines
This feature is supported on 25-GE interfaces operating at 25 Gbps.
This feature is supported on 100-GE interfaces operating at 100 Gbps (supported only in Release
6616 and later).
Make sure you set the same FEC mode for both interfaces of a link.
On a 100-GE interface installed with a QSFP-100G-LR4-WDM1300 transceiver module, manual
FEC configuration does not take effect. However, the interface will go down and then come up upon
the configuration.
Procedure
1. Enter system view.
system-view
2. Enter Ethernet interface view.
16
interface interface-type interface-number
3. Set the FEC mode of the Ethernet interface.
port fec mode { auto | base-r | none | rs-fec }
By default, the FEC mode of an Ethernet interface is autonegotiation.
100-GE interfaces do not support the base-r keyword.
17
Restrictions and guidelines
• For the traffic suppression result to be determined, do not configure storm control together with
storm suppression for the same type of traffic. For more information about storm control, see
"Configuring storm control on an Ethernet interface."
• When you configure the suppression threshold in kbps, the actual suppression threshold might
be different from the configured one as follows:
If the configured value is smaller than 64, the value of 64 takes effect.
If the configured value is greater than 64 but not an integer multiple of 64, the integer
multiple of 64 that is greater than and closest to the configured value takes effect.
For the suppression threshold that takes effect, see the prompt on the device.
• Set the same type of thresholds for each interface.
Procedure
1. Enter system view.
system-view
2. Enter Ethernet interface view.
interface interface-type interface-number
3. Enable broadcast suppression and set the broadcast suppression threshold.
broadcast-suppression { ratio | pps max-pps | kbps max-kbps }
By default, broadcast suppression is disabled.
4. Enable multicast suppression and set the multicast suppression threshold.
multicast-suppression { ratio | pps max-pps | kbps max-kbps }
[ unknown ]
By default, multicast suppression is disabled.
5. Enable unknown unicast suppression and set the unknown unicast suppression threshold.
unicast-suppression { ratio | pps max-pps | kbps max-kbps }
By default, unknown unicast suppression is disabled.
18
To handle unidirectional traffic congestion on a link, configure the flow-control receive
enable command at one end and the flow-control command at the other end. To enable both
ends of a link to handle traffic congestion, configure the flow-control command at both ends.
Restrictions and guidelines
To implement flow control, configure flow control on each interface that the traffic passes through.
Procedure
1. Enter system view.
system-view
2. Enter Ethernet interface view.
interface interface-type interface-number
3. Enable generic flow control.
Enable TxRx-mode generic flow control.
flow-control
Enable Rx-mode generic flow control.
flow-control receive enable
By default, generic flow control is disabled on an Ethernet interface.
Configuring PFC
About this task
When congestion occurs in the network, the local device notifies the peer to stop sending packets
carrying the specified 802.1p priority if all of the following conditions exist:
• Both the local end and the remote end have priority-based flow control (PFC) enabled.
• Both the local end and the remote end have the priority-flow-control no-drop
dot1p command configured.
• The specified 802.1p priority is in the 802.1p priority list specified by the dot1p-list
argument.
• The local end receives a packet carrying the specified 802.1p priority.
Feature and hardware compatibility
The two 1-Gbps SFP interfaces on the rear panel of an S9850-4C, S9850-32H, or S6850-56HF
switch does not support this feature.
Restrictions and guidelines
• You can configure PFC in both system view and Ethernet interface view. If you configure PFC in
system view and Ethernet interface view multiple times, the most recent configuration takes
effect.
• For IRF and other protocols to operate correctly, as a best practice, do not enable PFC for
802.1p priorities 0, 6, and 7.
• To perform PFC on an IRF port, configure PFC on the IRF port and the IRF physical interfaces
that are bound to the IRF port. For information about IRF, see Virtual Technologies
Configuration Guide.
• To perform PFC in an overlay network, execute the qos trust tunnel-dot1p command.
For information about the overlay network, see VXLAN Configuration Guide. For information
about the qos trust tunnel-dot1p command, see ACL and QoS Command Reference.
• To avoid packet loss, apply the same PFC configuration to all interfaces that the packets pass
through.
19
• If you do not enable PFC on an interface, the interface can receive but cannot process PFC
pause frames. To make PFC take effect, you must enable PFC on both ends.
• If you configure the flow control or flow-control receive enable command on a
PFC-enabled interface, the following rules apply:
The PFC configuration takes effect.
The configuration of the flow control or flow-control receive enable
command is ignored.
The flow control or flow-control receive enable command takes effect on the
interface only when PFC is disabled on it.
Configuring PFC in system view
1. Enter system view.
system-view
2. Enable PFC on all Ethernet interfaces.
priority-flow-control enable { receive | send }
By default, PFC is disabled on all Ethernet interfaces.
3. Enable PFC for 802.1p priorities on all Ethernet interfaces.
priority-flow-control no-drop dot1p dot1p-list
By default, PFC is disabled for all 802.1p priorities on all Ethernet interfaces.
Configuring PFC in Ethernet interface view
1. Enter system view.
system-view
2. Enter Ethernet interface view.
interface interface-type interface-number
3. Enable PFC on the Ethernet interface.
priority-flow-control enable { receive | send }
By default, PFC is disabled on an Ethernet interface.
4. Enable PFC for 802.1p priorities.
priority-flow-control no-drop dot1p dot1p-list
By default, PFC is disabled for all 802.1p priorities.
5. (Optional.) Set the pause time in PFC pause frames.
priority-flow-control pause-time time-vale
By default, the pause time in PFC pause frames is 65535.
20
• Headroom buffer threshold—Maximum number of cell resources that can be used by packets
with a specific 802.1p priority value in a headroom storage space. An interface drops received
packets once this threshold is reached.
• Back pressure frame triggering threshold—Maximum number of cell resources that can be
used by packets with a specific 802.1p priority value in a shared storage space. PFC is
triggered once this threshold is reached. The back pressure frame triggering threshold includes
the following types:
Dynamic back pressure frame triggering threshold—Maximum cell resources set in
percentage.
Static back pressure frame triggering threshold—Maximum cell resources set in an
absolute value.
• Offset between the back pressure frame stopping threshold and triggering
threshold—When the number of cell resources used by packets with a specific 802.1p priority
value decreases by this offset after PFC is triggered, PFC will be stopped.
• PFC reserved threshold—Number of cell resources reserved for packets with a specific
802.1p priority value in a guaranteed storage space.
Feature and hardware compatibility
The two 1-Gbps SFP interfaces on the rear panel of an S9850-4C, S9850-32H, or S6850-56HF
switch does not support this feature.
Restrictions and guidelines
WARNING!
After PFC is enabled for 802.1p priorities, the PFC thresholds use the default values, which are
adequate in typical network environments. As a practice, change the thresholds only when
necessary. Table 3 and Table 4 describe the default PFC thresholds.
Offset between
PFC threshold the back
Dynamic back
(right) Headroom pressure frame
pressure frame PFC reserved
buffer stopping
Interface type triggering threshold
threshold threshold and
(below) threshold
triggering
threshold
1-GE/10-GE 100 5 12 17
25-GE 125 5 12 17
40-GE 200 5 12 17
100-GE 491 5 12 17
Offset between
PFC threshold the back
Dynamic back
(right) Headroom pressure frame
pressure frame PFC reserved
buffer stopping
Interface type triggering threshold
threshold threshold and
(below) threshold
triggering
threshold
All interfaces 8192 Not configured 48 6
21
You must enable PFC for 802.1p priorities before setting the PFC thresholds.
If you cancel PFC threshold settings on an interface, the PFC thresholds are restored to the state
when only the priority-flow-control no-drop dot1p command is executed.
Complete PFC threshold settings before the device receives and forwards packets. If you perform
these tasks when the device is forwarding packets, packets might be lost.
This feature does not support preprovisioning. For more information about preprovisioning, see
Fundamentals Configuration Guide.
Procedure
1. Enter system view.
system-view
2. Set the maximum number of cell resources in a headroom storage space.
priority-flow-control poolID pool-number headroom headroom-number
By default, the maximum number of cell resources in a headroom storage space is 12288.
3. Enter Ethernet interface view.
interface interface-type interface-number
4. Set the headroom buffer threshold.
priority-flow-control dot1p dot1p headroom headroom-number
See Table 3 and Table 4 for the default value.
5. Set the back pressure frame triggering threshold.
Set the dynamic back pressure frame triggering threshold.
priority-flow-control dot1p dot1p ingress-buffer dynamic ratio
See Table 3 and Table 4 for the default value.
Set the static back pressure frame triggering threshold.
priority-flow-control dot1p dot1p ingress-buffer static threshold
By default, the static back pressure frame triggering threshold is not configured.
6. Set the offset between the back pressure frame stopping threshold and triggering threshold.
priority-flow-control dot1p dot1p ingress-threshold-offset
offset-number
See Table 3 and Table 4 for the default value.
7. Set the PFC reserved threshold.
priority-flow-control dot1p dot1p reserved-buffer reserved-number
See Table 3 and Table 4 for the default value.
22
After the PFC deadlock state is released, the PFC deadlock detection feature can be recovered on
the interface in automatic or manual mode. Recovering this feature enables the PFC feature again at
the same time. Use the automatic recovery mode when no serious failures occur.
When a packet loop cannot be eliminated and the device enters PFC deadlock state frequently,
manually recover PFC deadlock detection on the interface as follows:
1. Perform troubleshooting and set the manual recovery mode for PFC deadlock detection.
2. Execute the priority-flow-control deadlock recover command to recover the
PFC deadlock detection and PFC features.
Feature and hardware compatibility
The two 1-Gbps SFP interfaces on the rear panel of an S9850-4C, S9850-32H, or S6850-56HF
switch does not support this feature.
Restrictions and guidelines
The specified CoS value must be within the 802.1p priority list specified by using the
priority-flow-control no-drop dot1p command. To view the 802.1p priority for each
CoS value, execute the display qos map-table dot1p-lp command.
Prerequisites
Before you configure PFC deadlock detection on an Ethernet interface, complete the following tasks:
• Enable PFC in auto mode or forcibly on the Ethernet interface.
• Enable PFC for 802.1p priorities on the Ethernet interface.
Procedure
1. Enter system view.
system-view
2. Set the precision for the PFC deadlock detection timer.
priority-flow-control deadlock precision { high | normal | low }
By default, the PFC deadlock detection timer uses normal precision.
3. Set the PFC deadlock detection interval for the specified CoS value.
priority-flow-control deadlock cos cos-value interval interval
[ pause-recover ]
By default, the PFC deadlock detection interval is not set.
The pause-recover keyword is supported only in Release 6616 and later.
4. Configure the delay timer for PFC deadlock detection automatic recovery.
priority-flow-control deadlock auto-recover cos cos-value delay
delay-interval
By default, the delay timer for PFC deadlock detection automatic recovery is not configured.
5. Configure the action to take on packets during the delay timer period for PFC deadlock
automatic recovery.
priority-flow-control deadlock auto-recover action { discard |
forwarding }
By default, the device forwards received data packets during the delay timer period for PFC
deadlock detection automatic recovery.
6. Configure the upper threshold for PFC deadlock times during the specified period.
priority-flow-control deadlock threshold cos cos-value period period
count count
By default, the upper threshold for PFC deadlock times during the specified period is not
configured.
23
7. Enter Ethernet interface view.
interface interface-type interface-number
8. Set the recovery mode for PFC deadlock detection on the Ethernet interface.
priority-flow-control deadlock recover-mode { auto | manual }
By default, PFC deadlock detection recovers in automatic mode.
9. Enable PFC deadlock detection on the Ethernet interface.
priority-flow-control deadlock enable
By default, PFC deadlock detection is disabled.
10. (Optional.) Recover PFC deadlock detection on the Ethernet interface.
priority-flow-control deadlock recover
You can use only this command to recover PFC deadlock detection if you set the manual
recovery mode for PFC deadlock detection on the Ethernet interface.
24
By default, no early warning threshold is configured for outgoing PFC packets.
25
• External loopback testing—Tests the hardware function of the Ethernet interface. The
Ethernet interface sends outgoing packets to the local device through a self-loop plug. If the
device fails to receive the packets, the hardware function of the Ethernet interface fails.
Restrictions and guidelines
• After you enable this feature on an Ethernet interface, the interface does not forward data
traffic.
• You cannot perform a loopback test on the following Ethernet interfaces:
Ethernet interfaces manually brought down (displayed as in ADM or Administratively
DOWN state).
Ethernet interfaces configured with the port up-mode command.
• The speed, duplex, and shutdown commands cannot be configured on an Ethernet
interface in a loopback test.
• After you enable this feature on an Ethernet interface, the Ethernet interface switches to full
duplex mode. After you disable this feature, the Ethernet interface restores to its duplex setting.
Procedure
1. Enter system view.
system-view
2. Enter Ethernet interface view.
interface interface-type interface-number
3. Enable loopback testing.
loopback{ external | internal }
26
Figure 2 Forcibly bring up a fiber port
When Ethernet interfaces
Correct fiber When Ethernet interfaces
cannot be or are not forcibly
connection are forcibly brought up
brought up
27
Setting the media type for an Ethernet interface
Hardware and feature compatibility
The S6805 and S6825 switch series does not support this feature.
Restrictions and guidelines
For 25-GE interfaces on an LSWM124TG2H interface module, you must set the media type. Set the
media type to fiber for an interface that uses a transceiver module or fiber cable. Set the media type
to copper for an interface that uses a copper cable. The media type of interfaces in the same group is
the same. When you set the media type for any interface in a group, the setting is synchronized to
the other interfaces in the group.
This configuration fails when an interface group has any service loopback interface or reflector port
for mirroring.
When you configure this feature for an interface through the preprovisioning feature, the
configuration on the interface is not automatically synchronized to the other interfaces in the same
group. For more information about preprovisioning, see preprovisioning configuration in
Fundamentals Configuration Guide.
Procedure
1. Enter system view.
system-view
2. Enter Ethernet interface view.
interface interface-type interface-number
3. Set the media type for the Ethernet interface.
port media-type { copper | fiber }
By default, the media type of an Ethernet interface is fiber.
28
Enabling interface alarm functions
1. Enter system view.
system-view
2. Enable alarm functions for the interface monitoring module.
snmp-agent trap enable ifmonitor [ crc-error | input-error |
output-error ] *
By default, all alarm functions are enabled for interfaces.
Configuring CRC error packet parameters
1. Enter system view.
system-view
2. Configure global CRC error packet alarm parameters.
ifmonitor crc-error slot slot-number high-threshold high-value
low-threshold low-value interval interval [ shutdown ]
By default, the upper threshold is 1000, the lower threshold is 100, and the statistics collection
and comparison interval is 10 seconds for CRC error packets.
This command is supported only in Release 6616, Release 6616P01, and F6619 or later. This
command is not supported in F6617L01 and F6618.
3. Enter Ethernet interface view.
interface interface-type interface-number
4. Configure CRC error packet alarm parameters for the interface.
port ifmonitor crc-error [ ratio ] high-threshold high-value
low-threshold low-value interval interval [ shutdown ]
By default, an interface uses the global CRC error packet alarm parameters.
Configuring input error packet alarm parameters
1. Enter system view.
system-view
2. Configure global input error packet alarm parameters.
ifmonitor input-error slot slot-number high-threshold high-value
low-threshold low-value interval interval [ shutdown ]
By default, the upper threshold is 1000, the lower threshold is 100, and the statistics collection
and comparison interval is 10 seconds for input error packets.
This command is supported only in Release 6616, Release 6616P01, and F6619 or later. This
command is not supported in F6617L01 and F6618.
3. Enter Ethernet interface view.
interface interface-type interface-number
4. Configure input error packet alarm parameters for the interface.
port ifmonitor input-error high-threshold high-value low-threshold
low-value interval interval [ shutdown ]
By default, an interface uses the global input error packet alarm parameters.
Configuring output error packet alarm parameters
1. Enter system view.
system-view
2. Configure global output error packet alarm parameters.
ifmonitor output-error slot slot-number high-threshold high-value
low-threshold low-value interval interval [ shutdown ]
29
By default, the upper threshold is 1000, the lower threshold is 100, and the statistics collection
and comparison interval is 10 seconds for output error packets.
This command is supported only in Release 6616, Release 6616P01, and F6619 or later. This
command is not supported in F6617L01 and F6618.
3. Enter Ethernet interface view.
interface interface-type interface-number
4. Configure output error packet alarm parameters.
port ifmonitor output-error high-threshold high-value low-threshold
low-value interval interval [ shutdown ]
By default, an interface uses the global output error packet alarm parameters.
CAUTION:
This feature might interrupt ongoing network services. Make sure you are fully aware of the impacts
of this feature when you use it in a live network.
This feature might fail to restore the default settings for some commands because of command
dependencies or system restrictions. You can use the display this command in interface view to
check for these commands and perform their undo forms or follow the command reference to
restore their default settings. If your restoration attempt still fails, follow the error message to resolve
the problem.
Procedure
1. Enter system view.
system-view
2. Enter Ethernet interface view or Ethernet subinterface view.
interface interface-type { interface-number |
interface-number.subnumber }
3. Restore the default settings for the interface.
default
30
automatically come up. To bring up the interface, use the undo shutdown command or
disable the storm control feature.
You can configure an Ethernet interface to output threshold event traps and log messages when
monitored traffic meets one of the following conditions:
• Exceeds the upper threshold.
• Drops below the lower threshold.
Both storm suppression and storm control can suppress storms on an interface. Storm suppression
physically suppresses traffic. Storm suppression has less impact on the device performance than
storm control, which uses software to suppress traffic. For more information about storm
suppression, see "Configuring storm suppression."
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.
Restrictions and guidelines
For the traffic suppression result to be determined, do not configure storm control together with storm
suppression for the same type of traffic.
Procedure
1. Enter system view.
system-view
2. (Optional.) Set the statistics polling interval of the storm control module.
storm-constrain interval interval
The default setting is 10 seconds.
For network stability, use the default or set a longer statistics polling interval.
3. Enter Ethernet interface view.
interface interface-type interface-number
4. Enable storm control, and set the lower and upper thresholds for broadcast, multicast, or
unknown unicast traffic.
storm-constrain { broadcast | multicast | unicast } { pps | kbps |
ratio } upperlimit lowerlimit
By default, storm control is disabled.
5. Set the control action to take when monitored traffic exceeds the upper threshold.
storm-constrain control { block | shutdown }
By default, storm control is disabled.
6. Enable the Ethernet interface to output log messages when it detects storm control threshold
events.
storm-constrain enable log
By default, the Ethernet interface outputs log messages when monitored traffic exceeds the
upper threshold or drops below the lower threshold from a value above the upper threshold.
7. Enable the Ethernet interface to send storm control threshold event traps.
storm-constrain enable trap
By default, the Ethernet interface sends traps when monitored traffic exceeds the upper
threshold or drops below the lower threshold from the upper threshold from a value above the
upper threshold.
31
Changing a Layer 2 Ethernet interface to an FC interface
About this task
This feature allows you to change a Layer 2 Ethernet interface to an FC interface.
Hardware and feature compatibility
Only interfaces on the LSWM124XG2QFC and LSWM116FC interface modules support this feature.
The S6805 and S6825 switch series does not support this feature.
Restrictions and guidelines
After the type of an interface is changed, the system creates a new interface that is numbered the
same as the original interface.
An LSWM116FC interface expansion card has 16 interfaces, and every two neighboring interfaces
belong to one port group. If you change an Ethernet interface to an FC interface by using the
port-type fc command, the other interface in the same port group is also changed to an FC
interface. If you change an FC interface to an Ethernet interface by using the port-type
ethernet command, the other interface in the same port group is also changed to an Ethernet
interface. An Ethernet interface on the card operates at 25 Gbps in full duplex and cannot perform
speed autonegotiation.
Procedure
1. Enter system view.
system-view
2. Enter Layer 2 Ethernet interface view.
interface interface-type interface-number
3. Change the type of the interface:
Change the Layer 2 Ethernet interface to an FC interface.
port-type fc
Change the FC interface back to a Layer 2 Ethernet interface.
port-type ethernet
CAUTION:
After the type of an interface is changed, the system deletes the original interface and creates a
new interface that is numbered the same as the original interface. All the other commands are
restored to the default on the new interface.
32
3. Enable bridging on the Ethernet interface.
port bridge enable
By default, bridging is disabled on an Ethernet interface.
33
Display and maintenance commands for Ethernet
interfaces
Execute display commands in any view and reset commands in user view.
Task Command
display counters { inbound | outbound }
Display interface traffic statistics. interface [ interface-type
[ interface-number ] ]
34
Contents
Configuring Ethernet link aggregation ···························································· 1
About Ethernet link aggregation ························································································································· 1
Ethernet link aggregation application scenario ·························································································· 1
Aggregate interface, aggregation group, and member port ······································································· 1
Operational key ·········································································································································· 2
Configuration types ···································································································································· 2
Link aggregation modes ····························································································································· 3
How static link aggregation works ·············································································································· 3
Dynamic link aggregation ··························································································································· 4
How dynamic link aggregation works ········································································································· 6
Edge aggregate interface ··························································································································· 9
Load sharing modes for link aggregation groups ······················································································· 9
S-MLAG ····················································································································································· 9
Restrictions and guidelines: Mixed use of manual and automatic link aggregation configuration ··················· 10
Ethernet link aggregation tasks at a glance ····································································································· 10
Configuring the system ID ································································································································ 11
Configuring a manual link aggregation············································································································· 12
Restrictions and guidelines for aggregation group configuration ····························································· 12
Configuring a Layer 2 aggregation group································································································· 13
Configuring a Layer 3 aggregation group································································································· 15
Configuring S-MLAG ········································································································································ 16
Configuring an aggregate interface ·················································································································· 17
Configuring the description of an aggregate interface ············································································· 17
Setting the MAC address for an aggregate interface ··············································································· 18
Configuring jumbo frame support ············································································································· 18
Setting the MTU for a Layer 3 aggregate interface ·················································································· 19
Setting the expected bandwidth for an aggregate interface ····································································· 19
Configuring an edge aggregate interface ································································································· 19
Configuring physical state change suppression on an aggregate interface ············································· 20
Shutting down an aggregate interface ····································································································· 21
Restoring the default settings for an aggregate interface ········································································ 21
Setting the minimum and maximum numbers of Selected ports for an aggregation group ····························· 22
Disabling the default action of selecting a Selected port for dynamic aggregation groups that have not received
LACPDUs ························································································································································· 23
Configuring a dynamic aggregation group to use port speed as the prioritized criterion for reference port
selection ··························································································································································· 24
Specifying ignored VLANs for a Layer 2 aggregate interface ·········································································· 24
Configuring load sharing for link aggregation groups······················································································· 25
Setting static load sharing modes for link aggregation groups ································································ 25
Setting a dynamic load sharing mode for a link aggregation group ························································· 27
Specifying ignored packet fields for default link-aggregation load sharing ·············································· 28
Enabling local-first load sharing for link aggregation················································································ 28
Configuring link aggregation load sharing algorithm and hash seed settings ·········································· 29
Setting a hash offset to adjust the load balancing results on link aggregations ······································· 29
Setting the load sharing mode for tunneled traffic···················································································· 30
Specifying link aggregation management VLANs and link aggregation management port ····························· 30
Excluding a subnet from load sharing on aggregate links ··············································································· 30
Enabling a Layer 2 aggregate interface to reflect incoming packets back ······················································· 32
Enabling link-aggregation traffic redirection ····································································································· 32
About link-aggregation traffic redirection·································································································· 32
Restrictions and guidelines for link-aggregation traffic redirection ··························································· 32
Enabling link-aggregation traffic redirection globally ················································································ 33
Enabling link-aggregation traffic redirection for an aggregation group····················································· 33
Isolating aggregate interfaces on the device ··································································································· 33
Enabling BFD for an aggregation group··········································································································· 34
Display and maintenance commands for Ethernet link aggregation ································································ 35
Ethernet link aggregation configuration examples ··························································································· 36
i
Example: Configuring a Layer 2 static aggregation group ······································································· 36
Example: Configuring a Layer 2 dynamic aggregation group ·································································· 38
Example: Configuring Layer 2 aggregation load sharing ········································································· 39
Example: Configuring a Layer 2 edge aggregate interface ······································································ 42
Example: Configuring a Layer 3 static aggregation group ······································································· 44
Example: Configuring a Layer 3 dynamic aggregation group ·································································· 45
Example: Configuring Layer 3 aggregation load sharing ········································································· 46
Example: Configuring S-MLAG ················································································································ 48
ii
Configuring Ethernet link aggregation
About Ethernet link aggregation
Ethernet link aggregation bundles multiple physical Ethernet links into one logical link (called an
aggregate link). Link aggregation provides the following benefits:
• Increased bandwidth beyond the limits of a single individual link. In an aggregate link, traffic is
distributed across the member ports.
• Improved link reliability. The member ports dynamically back up one another. When a member
port fails, its traffic is automatically switched to other member ports.
Device A Device B
1
• Individual—An Individual port can forward traffic as a normal physical port. This state is
peculiar to the member ports of edge aggregate interfaces. A Selected or Unselected member
port of an edge aggregate interface is placed in Individual state if the following events occur in
sequence:
a. The member port goes down and then comes up.
b. The LACP timeout timer expires because it has not received LACPDUs.
For more information about edge aggregate interfaces, see "Edge aggregate interface."
Operational key
When aggregating ports, the system automatically assigns each port an operational key based on
port information, such as port rate and duplex mode. Any change to this information triggers a
recalculation of the operational key.
In an aggregation group, all Selected ports have the same operational key.
Configuration types
Port configuration includes the attribute configuration and protocol configuration. Attribute
configuration affects the aggregation state of the port but the protocol configuration does not.
Attribute configuration
To become a Selected port, a member port must have the same attribute configuration as the
aggregate interface. Table 1 describes the attribute configuration.
Table 1 Attribute configuration
Protocol configuration
Protocol configuration of a member port does not affect the aggregation state of the member port.
MAC address learning and spanning tree settings are examples of the protocol configuration.
2
Link aggregation modes
An aggregation group operates in one of the following modes:
• Static—Static aggregation is stable. An aggregation group in static mode is called a static
aggregation group. The aggregation states of the member ports in a static aggregation group
are not affected by the peer ports.
• Dynamic—An aggregation group in dynamic mode is called a dynamic aggregation group.
Dynamic aggregation is implemented through IEEE 802.3ad Link Aggregation Control Protocol
(LACP). The local system and the peer system automatically maintain the aggregation states of
the member ports. Dynamic link aggregation reduces the administrators' workload.
3
Figure 2 Setting the aggregation state of a member port in a static aggregation group
Yes
Is there any hardware restriction?
No
No
Is the port up?
Yes
Operational No
key/attribute configuration same as the
reference port?
Yes
No
After the limit on Selected ports is reached, the aggregation state of a new member port varies by
following conditions:
• The port is placed in Unselected state if the port and the Selected ports have the same port
priority. This mechanism prevents traffic interruption on the existing Selected ports. A device
reboot can cause the device to recalculate the aggregation states of member ports.
• The port is placed in Selected state when the following conditions are met:
The port and the Selected ports have different port priorities, and the port has a higher port
priority than a minimum of one Selected port.
The port has the same attribute configurations as the aggregate interface.
Any operational key or attribute configuration change might affect the aggregation states of link
aggregation member ports.
4
on the other member ports. In this way, the two systems reach an agreement on which ports are
placed in Selected state.
LACP functions
LACP offers basic LACP functions and extended LACP functions, as described in Table 2.
Table 2 Basic and extended LACP functions
Category Description
Implemented through the basic LACPDU fields, including the LACP system
Basic LACP functions
priority, system MAC address, port priority, port number, and operational key.
Implemented by extending the LACPDU with new TLV fields. Extended LACP can
implement LACP MAD for the IRF feature. For more information about IRF and the
Extended LACP LACP MAD mechanism, see Virtual Technologies Configuration Guide.
functions
The device can participate in LACP MAD as either an IRF member device or an
intermediate device.
Type Description
Used by two peer devices (or systems) to determine which one is superior in link
aggregation.
LACP system In dynamic link aggregation, the system that has higher LACP system priority sets
priority the Selected state of member ports on its side. The system that has lower priority
sets the aggregation state of local member ports the same as their respective peer
ports.
Determines the likelihood of a member port to be a Selected port on a system. A port
Port priority
with a higher port priority is more likely to become Selected.
5
• Automatic assignment—Enable automatic assignment on interfaces to have them
automatically join a dynamic link aggregation group depending on the peer information in the
received LACPDUs.
NOTE:
When you use automatic assignment on one end, you must use manual assignment on the
other end.
Yes No
Does a preferred aggregation
group exist?
No
Does the reference port have
the same peer information as the
LACPDUs?
Yes
Yes
Does an aggregation
group matching the LACPDUs
exist?
No
6
The local system (the actor) and the peer system (the partner) negotiate a reference port by using
the following workflow:
1. The two systems determine the system with the smaller system ID.
A system ID contains the LACP system priority and the system MAC address.
a. The two systems compare their LACP priority values.
The lower the LACP priority, the smaller the system ID. If the LACP priority values are the
same, the two systems proceed to step b.
b. The two systems compare their MAC addresses.
The lower the MAC address, the smaller the system ID.
2. The system with the smaller system ID chooses the port with the smallest port ID as the
reference port.
A port ID contains a port priority and a port number. The lower the port priority, the smaller the
port ID.
a. The system chooses the port with the lowest priority value as the reference port.
If the ports have the same priority, the system proceeds to step b.
b. The system compares their port numbers.
The smaller the port number, the smaller the port ID.
The port with the smallest port number and the same attribute configurations as the
aggregate interface is chosen as the reference port.
NOTE:
To identify the port numbers of aggregation member ports, execute the display
link-aggregation verbose command and examine the Index field in the command
output.
7
Figure 4 Setting the state of a member port in a dynamic aggregation group
Yes
Is there any hardware restriction?
No
No
Is the port up?
Yes
Operational No
key/attribute configuration same as the
reference port?
Yes
Operational
key/attribute configuration of the peer No
port same as the peer port of the
reference port?
Yes
No Yes
The system with the greater system ID can detect the aggregation state changes on the peer system.
The system with the greater system ID sets the aggregation state of local member ports the same as
their peer ports.
When you aggregate interfaces in dynamic mode, follow these guidelines:
• A dynamic link aggregation group chooses only full-duplex ports as the Selected ports.
• For stable aggregation and service continuity, do not change the operational key or attribute
configurations on any member port.
• When a member port changes to the Selected or Unselected state, its peer port changes to the
same aggregation state.
• After the Selected port limit is reached, a newly joining port becomes a Selected port if it is more
eligible than a current Selected port.
8
Edge aggregate interface
Dynamic link aggregation fails on a server-facing aggregate interface if dynamic link aggregation is
configured only on the device. The device forwards traffic by using only one of the physical ports that
are connected to the server.
To improve link reliability, configure the aggregate interface as an edge aggregate interface. This
feature enables all member ports of the aggregation group to forward traffic. When a member port
fails, its traffic is automatically switched to other member ports.
After dynamic link aggregation is configured on the server, the device can receive LACPDUs from
the server. Then, link aggregation between the device and the server operates correctly.
An edge aggregate interface takes effect only when it is configured on an aggregate interface
corresponding to a dynamic aggregation group.
S-MLAG
Simple multichassis link aggregation (S-MLAG) enhances dynamic link aggregation to establish an
aggregation that spans multiple standalone devices to a remote device.
An S-MLAG multichassis aggregation connects one dynamic Layer 2 aggregate interface on each
S-MLAG device to the remote device, as shown in Figure 5.
S-MLAG uses an S-MLAG group to manage the aggregate interfaces for each aggregation, and it
runs LACP to maintain each aggregation as does dynamic link aggregation. To the remote device,
the S-MLAG devices appear as one peer aggregation system.
9
Figure 5 S-MLAG application scenario
Device A
Port A1 Port A3
Port A2
BAGG
10
Setting the minimum and maximum numbers of Selected ports for an aggregation group
Disabling the default action of selecting a Selected port for dynamic aggregation groups that
have not received LACPDUs
Configuring a dynamic aggregation group to use port speed as the prioritized criterion for
reference port selection
Specifying ignored VLANs for a Layer 2 aggregate interface
To have the system ignore the permit state and tagging mode of a VLAN when it decides
Selected ports, perform this task.
5. (Optional.) Configuring load sharing for link aggregation groups
Setting static load sharing modes for link aggregation groups
Setting a dynamic load sharing mode for a link aggregation group
Specifying ignored packet fields for default link-aggregation load sharing
Enabling local-first load sharing for link aggregation
Configuring link aggregation load sharing algorithm and hash seed settings
Setting a hash offset to adjust the load balancing results on link aggregations
Setting the load sharing mode for tunneled traffic
6. (Optional.) Optimizing traffic forwarding
Specifying link aggregation management VLANs and link aggregation management port
Perform this task to enable an aggregation group to forward Layer 3 data traffic of some
VLANs through a specific member port.
Excluding a subnet from load sharing on aggregate links
Perform this task to make sure the bidirectional traffic of a subnet traverses the same
member port in an aggregation group.
Enabling a Layer 2 aggregate interface to reflect incoming packets back
Perform this task to have a Layer 2 aggregate interface reflect a packet back when it is both
the incoming and outgoing interfaces of that packet.
Enabling link-aggregation traffic redirection
This feature redirects traffic on an unavailable Selected port to the remaining available
Selected ports of an aggregation group to avoid traffic interruption.
Isolating aggregate interfaces on the device
7. (Optional.) Enabling BFD for an aggregation group
11
You can configure the system ID globally and in aggregate interface view. The global system ID
takes effect on all aggregation groups, and an aggregate-interface-specific system ID takes
precedence over the global system ID.
Software version and feature compatibility
The system ID conifiguration in aggregate interface view is supported only in Release 6616 and later.
Restrictions and guidelines
Member devices in an S-MLAG system must use the same LACP system priority and LACP system
MAC address.
For member ports to be selected correctly, do not modify the LACP system priority and LACP system
MAC address after a dynamic link aggregation is established.
Procedure
1. Enter system view.
system-view
2. Set the LACP system MAC address globally.
lacp system-mac mac-address
By default, the LACP system MAC address is the bridge MAC address of the device.
3. Set the LACP system priority globally.
lacp system-priority priority
By default, the LACP system priority is 32768.
4. Enter aggregate interface view.
Enter Layer 2 aggregate interface view.
interface bridge-aggregation interface-number
Enter Layer 3 aggregate interface view.
interface route-aggregation interface-number
5. Set the LACP system MAC address on the aggregate interface.
port lacp system-mac mac-address
By default, the LACP system MAC address is the bridge MAC address of the device.
6. Set the LACP system priority on the aggregate interface.
port lacp system-priority priority
By default, the LACP system priority is 32768.
Forcibly bringing up a fiber port by using Ethernet interface configuration in Interface Configuration
12
Feature on the interface Reference
the port up-mode command Guide.
13
quit
4. Assign an interface to the Layer 2 aggregation group:
a. Enter Layer 2 Ethernet interface view.
interface interface-type interface-number
b. Assign the interface to the Layer 2 aggregation group.
port link-aggregation group group-id [ force ]
Repeat the substeps to assign more interfaces to the aggregation group.
To synchronize the attribute configurations from the aggregate interface when the current
interface joins the aggregation group, specify the force keyword.
5. (Optional.) Set the port priority of the interface.
link-aggregation port-priority priority
The default port priority of an interface is 32768.
Configuring a Layer 2 dynamic aggregation group
1. Enter system view.
system-view
2. Create a Layer 2 aggregate interface and enter Layer 2 aggregate interface view.
interface bridge-aggregation interface-number
When you create a Layer 2 aggregate interface, the system automatically creates a Layer 2
static aggregation group numbered the same as that interface.
3. Configure the aggregation group to operate in dynamic mode.
link-aggregation mode dynamic
By default, an aggregation group operates in static mode.
4. Return to system view.
quit
5. Assign an interface to the Layer 2 aggregation group:
a. Enter Layer 2 Ethernet interface view.
interface interface-type interface-number
b. Assign the interface to the Layer 2 aggregation group or enable automatic assignment on
that interface.
port link-aggregation group { group-id [ force ] | auto [ group-id ] }
Repeat these two substeps to assign more Layer 2 Ethernet interfaces to the aggregation
group.
To synchronize the attribute configurations from the aggregate interface when the current
interface joins the aggregation group, specify the force keyword.
To enable automatic assignment, specify the auto keyword. As a best practice, do not modify
the configuration on an automatically created aggregate interface or its member ports.
6. Set the LACP operating mode for the interface.
Set the LACP operating mode to passive.
lacp mode passive
Set the LACP operating mode to active.
undo lacp mode
By default, LACP is operating in active mode.
7. (Optional.) Set the port priority for the interface.
link-aggregation port-priority priority
The default setting is 32768.
14
8. (Optional.) Set the short LACP timeout interval (3 seconds) for the interface.
lacp period short
By default, the long LACP timeout interval (90 seconds) is used by the interface.
To avoid traffic interruption during an ISSU, do not set the short LACP timeout interval before
performing the ISSU. For more information about ISSU, see Fundamentals Configuration
Guide.
15
Repeat these two substeps to assign more Layer 3 Ethernet interfaces to the aggregation
group.
To enable automatic assignment, specify the auto keyword. As a best practice, do not modify
the configuration on an automatically created aggregate interface or its member ports.
6. Set the LACP operating mode for the interface.
Set the LACP operating mode to passive.
lacp mode passive
Set the LACP operating mode to active.
undo lacp mode
By default, LACP is operating in active mode.
7. (Optional.) Set the port priority of the interface.
link-aggregation port-priority priority
The default setting is 32768.
8. (Optional.) Set the short LACP timeout interval (3 seconds) for the interface.
lacp period short
By default, the long LACP timeout interval (90 seconds) is used by the interface.
To avoid traffic interruption during an ISSU, do not set the short LACP timeout interval before
performing the ISSU. For more information about ISSU, see Fundamentals Configuration
Guide.
Configuring S-MLAG
Restrictions and guidelines
Use S-MLAG only to establish aggregate links with servers.
S-MLAG is intended for a non-IRF environment. Do not configure it on an IRF fabric. For more
formation about IRF, see Virtual Technologies Configuration Guide.
Each S-MLAG group can contain only one aggregate interface on each device.
The aggregate interfaces in an S-MLAG group cannot be used as DR interfaces or IPPs in DRNI. For
more information about DR interfaces and IPPs, see DRNI configuration in Layer 2—LAN Switching
Configuration Guide.
On S-MLAG devices, make sure the member ports in an aggregation group have the same speed
and duplex mode. Inconsistency in these settings might cause reference port reselection and
interrupt traffic forwarding when new member ports join the aggregation group.
Do not configure the following settings on S-MLAG devices:
• LACP MAD.
• Link-aggregation traffic redirection.
• Maximum or minimum number of Selected ports.
• Automatic member port assignment.
• Spanning tree. For more information about spanning tree, see "Configuring spanning tree
protocols."
As a best practice, maintain consistency across S-MLAG devices in service feature configuration.
Prerequisites
Configure the link aggregation settings other than S-MLAG settings on each S-MLAG device. Make
sure the settings are consistent across the S-MLAG devices.
16
Procedure
1. Enter system view.
system-view
2. Set the LACP system MAC address.
lacp system-mac mac-address
By default, the LACP system MAC address is the bridge MAC address of the device.
All S-MLAG devices must use the same LACP system MAC address.
3. Set the LACP system priority.
lacp system-priority priority
By default, the LACP system priority is 32768.
All S-MLAG devices must use the same LACP system priority.
4. Set the LACP system number.
lacp system-number number
By default, the LACP system number is not set.
You must assign a unique LACP system number to each S-MLAG device.
5. Enter Layer 2 aggregate interface view.
interface bridge-aggregation interface-number
6. Set the link aggregation mode to dynamic.
link-aggregation mode dynamic
By default, an aggregation group operates in static mode.
7. Assign the aggregate interface to an S-MLAG group.
port s-mlag group group-id
By default, an aggregate interface is not assigned to any S-MLAG group.
17
3. Configure the interface description.
description text
By default, the description of an interface is interface-name Interface.
18
By default, an aggregate interface allows jumbo frames with a maximum length of 9416 bytes to
pass through.
If you execute this command multiple times, the most recent configuration takes effect.
19
Procedure
1. Enter system view.
system-view
2. Enter aggregate interface view.
Enter Layer 2 aggregate interface view.
interface bridge-aggregation interface-number
Enter Layer 3 aggregate interface view.
interface route-aggregation interface-number
3. Configure the aggregate interface as an edge aggregate interface.
lacp edge-port
By default, an aggregate interface does not operate as an edge aggregate interface.
20
link-delay { down | up } [ msec ] delay-time
By default, each time the physical link of an aggregate interface goes up or comes down, the
system immediately reports the change to the CPU.
CAUTION:
The shutdown command will disconnect all links established on an interface. Make sure you
are fully aware of the impacts of this command when you use it on a live network.
CAUTION:
The default command might interrupt ongoing network services. Make sure you are fully aware of
the impacts of this command when you execute it on a live network.
The default command might fail to restore the default settings for some commands for reasons
such as command dependencies and system restrictions.
To resolve this issue:
1. Use the display this command in interface view to identify these commands.
2. Use their undo forms or follow the command reference to restore their default settings.
21
3. If the restoration attempt still fails, follow the error message instructions to resolve the issue.
Procedure
1. Enter system view.
system-view
2. Enter aggregate interface view.
Enter Layer 2 aggregate interface view.
interface bridge-aggregation interface-number
Enter Layer 3 aggregate interface view.
interface route-aggregation interface-number
Enter Layer 3 aggregate subinterface view.
interface route-aggregation interface-number.subnumber }
3. Restore the default settings for the aggregate interface.
Default
IMPORTANT:
After you set the minimum percentage of Selected ports for an aggregation group, aggregate
interface flapping might occur when ports join or leave an aggregation group. Make sure you are
fully aware of the impacts of this setting when you configure it on a live network.
22
You can set either the minimum number or the minimum percentage of Selected ports for an
aggregation group. If you configure both settings on an aggregate interface, the higher Selected port
number limit takes effect.
The minimum and maximum numbers of Selected ports must be the same between the two ends of
an aggregate link.
The minimum percentage of Selected ports must be the same between the two ends of an aggregate
link.
For an aggregation group, the maximum number of Selected ports must be equal to or higher than
the minimum number of Selected ports.
Procedure
1. Enter system view.
system-view
2. Enter aggregate interface view.
Enter Layer 2 aggregate interface view.
interface bridge-aggregation interface-number
Enter Layer 3 aggregate interface view.
interface route-aggregation interface-number
3. Set the minimum number of Selected ports for the aggregation group. Choose one of the
following methods:
Set the minimum number of Selected ports.
link-aggregation selected-port minimum min-number
Set the minimum percentage of Selected ports.
link-aggregation selected-port minimum percentage number
By default, the minimum number of Selected ports is not specified for an aggregation group.
4. Set the maximum number of Selected ports for the aggregation group.
link-aggregation selected-port maximum max-number
By default, an aggregation group can have a maximum of 32 Selected ports.
23
lacp default-selected-port disable
By default, the default port selection action is enabled for dynamic aggregation groups.
24
Procedure
1. Enter system view.
system-view
2. Enter Layer 2 aggregate interface view.
interface bridge-aggregation interface-number
3. Specify ignored VLANs.
link-aggregation ignore vlan vlan-id-list
By default, a Layer 2 aggregate interface does not ignore any VLANs.
25
• Source MAC and destination MAC.
When you configure resilient load sharing, follow these restrictions and guidelines:
• In resilient load sharing mode, an aggregation group distributes traffic based on the default load
sharing mode if no link change occurs.
• If you have configured dynamic load sharing on an aggregate interface, you cannot configure
resilient load sharing on any aggregate interfaces.
• Before you enable resilient load sharing on an aggregate interface, make sure its aggregation
group does not contain Selected member ports. If Selected member ports exist, shut down the
aggregate interface.
• To use resilient load sharing on a DR interface, you must configure the resilient load sharing
mode before you assign member ports to the DR interface.
• If a local DR interface or its peer DR interface already has member ports, use the following
procedure to configure the resilient load sharing mode on the local DR interface:
a. Delete the DR interface.
b. Recreate the DR interface.
c. Configure the resilient load sharing mode.
d. Assign member ports to the DR interface.
For information about DR interfaces, see "Configuring DRNI."
Setting the global link-aggregation load sharing mode
1. Enter system view.
system-view
2. Set the global link-aggregation load sharing mode.
link-aggregation global load-sharing mode { { destination-ip |
destination-mac | destination-port | ingress-port | mpls-label1 |
mpls-label2 | source-ip | source-mac | source-port } *
The default settings are as follows:
Layer 2 frames are load shared based on the source and destination MAC addresses, and
EtherType value.
IP packets are load shared based on the source and destination IP addresses, protocol
number, and source and destination port numbers.
Setting the group-specific load sharing mode
1. Enter system view.
system-view
2. Enter aggregate interface view.
Enter Layer 2 aggregate interface view.
interface bridge-aggregation interface-number
Enter Layer 3 aggregate interface view.
interface route-aggregation interface-number
3. Set the load sharing mode for the aggregation group.
link-aggregation load-sharing mode { { destination-ip |
destination-mac | source-ip | source-mac } * | flexible | per-packet|
resilient }
By default, group-specific load sharing mode is the same as the global load sharing mode.
The resilient keyword is supported only in Release 6616 and later.
26
Setting a dynamic load sharing mode for a link aggregation
group
About this task
An aggregation group does not distribute traffic based on the bandwidth usage of its member ports
when using a static load sharing mode. As a result, traffic might be distributed unevenly among the
aggregation member ports. To obtain balanced load sharing results, you can use dynamic load
sharing to distribute traffic based on the bandwidth usage of aggregation member ports.
Dynamic load sharing supports the following modes:
• Eligible—Distributes the traffic from a flow on a per-flowlet basis. Flowlets are bursts of packets
from a flow, which are separated based on the flowlet gap timer. If the forwarding latency
between two bursts of packets is larger than the flowlet gap timer, they are two flowlets and can
be forwarded on different links. The link selected for a flowlet is the least utilized link at the time
of selection.
• Fixed—Distributes traffic across the aggregation member links on a per-flow basis. The link
selected for a flow is the least utilized link at the time of selection.
• Spray—Distributes traffic across the aggregation member links on a per-packet basis. The link
selected for a packet is the least utilized link at the time of selection.
IMPORTANT:
In spray mode, packets in a flow might be distributed to different links and arrive at the receiving
device out of order. When you use this mode, you must make sure the receiving device
supports packet reordering.
The dynamic load sharing mode has priority over the static load sharing mode. If you configure both
settings on an aggregate interface, the dynamic mode takes effect.
If you have configured resilient load sharing on an aggregate interface, you cannot configure
dynamic load sharing on any aggregate interfaces.
Procedure
1. Enter system view.
system-view
2. Enter aggregate interface view.
Enter Layer 2 aggregate interface view.
interface bridge-aggregation interface-number
Enter Layer 3 aggregate interface view.
interface route-aggregation interface-number
3. Configure a dynamic load sharing mode.
link-aggregation load-sharing mode dynamic { eligible
[ flowlet-gap-time flowlet-gap-time ] | fixed | spray }
By default, an aggregation group uses the static load sharing mode.
27
Specifying ignored packet fields for default link-aggregation
load sharing
About this task
To obtain the optimal load distribution performance in the default load sharing mode, you can
perform this task to exclude some fields from load sharing calculation.
Procedure
1. Enter system view.
system-view
2. Specify ignored packet fields for default link-aggregation load sharing.
link-aggregation load-sharing ignore { destination-ip |
destination-mac | destination-port | ethernet-type | ingress-port |
ip-protocol | mpls-label1 | mpls-label2 | mpls-label3 | source-ip |
source-mac | source-port | vlan-id } *
By default, no ignored packet fields are specified for default link-aggregation load sharing.
No
Any Selected ports on the
ingress device?
Yes
28
system-view
2. Enable local-first load sharing for link aggregation globally.
link-aggregation load-sharing mode local-first
By default, local-first load sharing is enabled globally.
29
By default, no hash offset is configured for load sharing on link aggregations.
30
As shown in Figure 7, an aggregate link is established between the server and the IRF fabric. The
server sends all uplink traffic of a subnet through Port C1 to Port A1 on the IRF fabric. If that subnet
is not specified as a management subnet, the IRF fabric distributes its downlink traffic across Port A1
and Port B2. To send the downlink traffic of that subnet to the server only through Port A1, you can
specify the subnet as a link aggregation management subnet.
Figure 7 Link aggregation scenario before management subnets are used
IP network
Uplink traffic
Downlink traffic
Device A IRF Device B
IRF- port1/2 IRF-port2/1
Port A1 Port B2
BAGG
BAGG
Port C1
Server
When an aggregate interface receives an ARP packet from the management subnet, the device
looks up the sender IP address in the ARP table for a matching entry.
• If no matching entry exists, the device creates an ARP entry on the aggregation member port
from which the packet came in. This mechanism ensures that the returned downlink traffic will
be forwarded out of the member port that received the uplink traffic.
• If an ARP entry already exists on a different port than the aggregate interface or its member
ports, the device does not update that ARP entry. Instead, the device broadcasts an ARP
request out of all ports to relearn the ARP entry.
When an aggregate interface sends an ARP packet to the management subnet, the device sends
the packet out of all Selected member ports of the aggregate interface.
Restrictions and guidelines
You can configure a maximum of 20 management subnets.
To ensure correct packet forwarding, delete all ARP entries of a subnet before you specify it as a
management subnet or after you remove it from the management subnet list.
If you are using link aggregation management subnets, do not use the following features:
• DRNI. For more information, see Layer 2—LAN Switching Configuration Guide.
• ARP snooping. For more information, see Layer 3—IP Services Configuration Guide.
Procedure
1. Enter system view.
system-view
2. Specify a link aggregation management subnet.
link-aggregation management-subnet ip-address { mask | mask-length }
By default, no link aggregation management subnets are specified.
31
Enabling a Layer 2 aggregate interface to reflect
incoming packets back
About this task
By default, the device drops a packet if its outgoing interface is the incoming interface where the
packet arrived. To have a Layer 2 aggregate interface reflect a packet back when it is both the
incoming and outgoing interfaces of that packet, perform this task.
Procedure
1. Enter system view.
system-view
2. Enter Layer 2 aggregate interface view.
interface bridge-aggregation interface-number
3. Enable port bridging.
port bridge enable
By default, port bridging is disabled. A Layer 2 aggregate interface cannot reflect incoming
packets back.
NOTE:
The device does not redirect traffic to member ports that become Selected during the traffic
redirection process.
This feature ensures zero packet loss for known unicast traffic, but does not protect unknown unicast
traffic.
You can enable link-aggregation traffic redirection globally or for an aggregation group. Global
link-aggregation traffic redirection settings take effect on all aggregation groups. A link aggregation
group preferentially uses the group-specific link-aggregation traffic redirection settings. If
group-specific link-aggregation traffic redirection is not configured, the group uses the global
link-aggregation traffic redirection settings.
32
To prevent traffic interruption, enable link-aggregation traffic redirection at both ends of the
aggregate link.
To prevent packet loss that might occur at a reboot, do not enable the spanning tree feature together
with link-aggregation traffic redirection.
Link-aggregation traffic redirection does not operate correctly on an edge aggregate interface.
33
2. Isolate aggregate interfaces.
link-aggregation lacp isolate
By default, aggregate interfaces are not isolated.
34
Enter Layer 2 aggregate interface view.
interface bridge-aggregation interface-number
Enter Layer 3 aggregate interface view.
interface route-aggregation interface-number
3. Enable BFD for the aggregation group.
link-aggregation bfd ipv4 source ip-address destination ip-address
By default, BFD is disabled for an aggregation group.
Task Command
display interface
[ { bridge-aggregation |
Display information about aggregate
route-aggregation }
interfaces.
[ interface-number ] ] [ brief
[ description | down ] ]
Display the local system ID. display lacp system-id
display link-aggregation load-sharing
Display the global or group-specific mode [ interface [ { bridge-aggregation
link-aggregation load sharing modes. | route-aggregation }
interface-number ] ]
display link-aggregation load-sharing
path interface { bridge-aggregation |
route-aggregation } interface-number
ingress-port interface-type
interface-number [ route ]
{ { destination-ip ip-address |
Display the outgoing physical interface destination-ipv6 ipv6-address } |
selected for a traffic flow. { source-ip ip-address | source-ipv6
ipv6-address } | destination-mac
mac-address | destination-port port-id
| ethernet-type type-number |
ip-protocol protocol-id | source-mac
mac-address | source-port port-id |
vlan vlan-id } *
Display detailed link aggregation information display link-aggregation member-port
about link aggregation member ports. [ interface-list | auto ]
Display summary information about all
display link-aggregation summary
aggregation groups.
display link-aggregation
Display the aggregation states of aggregation troubleshooting [ { bridge-aggregation
member ports and the reason why a port was
placed in Unselected state.
| route-aggregation }
[ interface-number ] ]
Display detailed information about the display link-aggregation verbose
35
Task Command
specified aggregation groups. [ { bridge-aggregation |
route-aggregation }
[ interface-number ] ]
reset counters interface
Clear statistics for the specified aggregate [ { bridge-aggregation |
interfaces. route-aggregation }
[ interface-number ] ]
Clear LACP statistics for the specified link reset lacp statistics [ interface
aggregation member ports. interface-list ]
VLAN 10 VLAN 10
WGE1/0/4 WGE1/0/4
WGE1/0/1 WGE1/0/1
WGE1/0/2 WGE1/0/2
Device A Link aggregation 1 Device B
WGE1/0/3 WGE1/0/3
VLAN 20 VLAN 20
Procedure
1. Configure Device A:
# Create VLAN 10, and assign port Twenty-FiveGigE 1/0/4 to VLAN 10.
<DeviceA> system-view
[DeviceA] vlan 10
[DeviceA-vlan10] port twenty-fivegige 1/0/4
[DeviceA-vlan10] quit
# Create VLAN 20, and assign port Twenty-FiveGigE 1/0/5 to VLAN 20.
[DeviceA] vlan 20
36
[DeviceA-vlan20] port twenty-fivegige 1/0/5
[DeviceA-vlan20] quit
# Create Layer 2 aggregate interface Bridge-Aggregation 1.
[DeviceA] interface bridge-aggregation 1
[DeviceA-Bridge-Aggregation1] quit
# Assign ports Twenty-FiveGigE 1/0/1 through Twenty-FiveGigE 1/0/3 to link aggregation
group 1.
[DeviceA] interface twenty-fivegige 1/0/1
[DeviceA-Twenty-FiveGigE1/0/1] port link-aggregation group 1
[DeviceA-Twenty-FiveGigE1/0/1] quit
[DeviceA] interface twenty-fivegige 1/0/2
[DeviceA-Twenty-FiveGigE1/0/2] port link-aggregation group 1
[DeviceA-Twenty-FiveGigE1/0/2] quit
[DeviceA] interface twenty-fivegige 1/0/3
[DeviceA-Twenty-FiveGigE1/0/3] port link-aggregation group 1
[DeviceA-Twenty-FiveGigE1/0/3] quit
# Configure Layer 2 aggregate interface Bridge-Aggregation 1 as a trunk port and assign it to
VLANs 10 and 20.
[DeviceA] interface bridge-aggregation 1
[DeviceA-Bridge-Aggregation1] port link-type trunk
[DeviceA-Bridge-Aggregation1] port trunk permit vlan 10 20
[DeviceA-Bridge-Aggregation1] quit
2. Configure Device B in the same way Device A is configured. (Details not shown.)
Verifying the configuration
# Display detailed information about all aggregation groups on Device A.
[DeviceA] display link-aggregation verbose
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Port Status: S -- Selected, U -- Unselected, I -- Individual
Port: A -- Auto port, M -- Management port, R -- Reference port
Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
The output shows that link aggregation group 1 is a Layer 2 static aggregation group that contains
three Selected ports.
37
Example: Configuring a Layer 2 dynamic aggregation group
Network configuration
On the network shown in Figure 9, perform the following tasks:
• Configure a Layer 2 dynamic aggregation group on both Device A and Device B.
• Enable VLAN 10 at one end of the aggregate link to communicate with VLAN 10 at the other
end.
• Enable VLAN 20 at one end of the aggregate link to communicate with VLAN 20 at the other
end.
Figure 9 Network diagram
VLAN 10 VLAN 10
WGE1/0/4 WGE1/0/4
WGE1/0/1 WGE1/0/1
WGE1/0/2 WGE1/0/2
Device A Link aggregation 1 Device B
WGE1/0/3 WGE1/0/3
VLAN 20 VLAN 20
Procedure
1. Configure Device A:
# Create VLAN 10, and assign the port Twenty-FiveGigE 1/0/4 to VLAN 10.
<DeviceA> system-view
[DeviceA] vlan 10
[DeviceA-vlan10] port twenty-fivegige 1/0/4
[DeviceA-vlan10] quit
# Create VLAN 20, and assign the port Twenty-FiveGigE 1/0/5 to VLAN 20.
[DeviceA] vlan 20
[DeviceA-vlan20] port twenty-fivegige 1/0/5
[DeviceA-vlan20] quit
# Create Layer 2 aggregate interface Bridge-Aggregation 1, and set the link aggregation mode
to dynamic.
[DeviceA] interface bridge-aggregation 1
[DeviceA-Bridge-Aggregation1] link-aggregation mode dynamic
[DeviceA-Bridge-Aggregation1] quit
# Assign ports Twenty-FiveGigE 1/0/1 through Twenty-FiveGigE 1/0/3 to link aggregation
group 1.
[DeviceA] interface twenty-fivegige 1/0/1
[DeviceA-Twenty-FiveGigE1/0/1] port link-aggregation group 1
[DeviceA-Twenty-FiveGigE1/0/1] quit
[DeviceA] interface twenty-fivegige 1/0/2
[DeviceA-Twenty-FiveGigE1/0/2] port link-aggregation group 1
[DeviceA-Twenty-FiveGigE1/0/2] quit
38
[DeviceA] interface twenty-fivegige 1/0/3
[DeviceA-Twenty-FiveGigE1/0/3] port link-aggregation group 1
[DeviceA-Twenty-FiveGigE1/0/3] quit
# Configure Layer 2 aggregate interface Bridge-Aggregation 1 as a trunk port and assign it to
VLANs 10 and 20.
[DeviceA] interface bridge-aggregation 1
[DeviceA-Bridge-Aggregation1] port link-type trunk
[DeviceA-Bridge-Aggregation1] port trunk permit vlan 10 20
[DeviceA-Bridge-Aggregation1] quit
2. Configure Device B in the same way Device A is configured. (Details not shown.)
Verifying the configuration
# Display detailed information about all aggregation groups on Device A.
[DeviceA] display link-aggregation verbose
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Port Status: S -- Selected, U -- Unselected, I -- Individual
Port: A -- Auto port, M -- Management port, R -- Reference port
Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
The output shows that link aggregation group 1 is a Layer 2 dynamic aggregation group that contains
three Selected ports.
39
• Enable VLAN 20 at one end of the aggregate link to communicate with VLAN 20 at the other
end.
• Configure link aggregation groups 1 and 2 to load share traffic across aggregation group
member ports.
Configure link aggregation group 1 to load share packets based on source MAC addresses.
Configure link aggregation group 2 to load share packets based on destination MAC
addresses.
Figure 10 Network diagram
VLAN 10 VLAN 10
VLAN 20 VLAN 20
Procedure
1. Configure Device A:
# Create VLAN 10, and assign the port Twenty-FiveGigE 1/0/5 to VLAN 10.
<DeviceA> system-view
[DeviceA] vlan 10
[DeviceA-vlan10] port twenty-fivegige 1/0/5
[DeviceA-vlan10] quit
# Create VLAN 20, and assign the port Twenty-FiveGigE 1/0/6 to VLAN 20.
[DeviceA] vlan 20
[DeviceA-vlan20] port twenty-fivegige 1/0/6
[DeviceA-vlan20] quit
# Create Layer 2 aggregate interface Bridge-Aggregation 1.
[DeviceA] interface bridge-aggregation 1
# Configure Layer 2 aggregation group 1 to load share packets based on source MAC
addresses.
[DeviceA-Bridge-Aggregation1] link-aggregation load-sharing mode source-mac
[DeviceA-Bridge-Aggregation1] quit
# Assign ports Twenty-FiveGigE 1/0/1 and Twenty-FiveGigE 1/0/2 to link aggregation group 1.
[DeviceA] interface twenty-fivegige 1/0/1
[DeviceA-Twenty-FiveGigE1/0/1] port link-aggregation group 1
[DeviceA-Twenty-FiveGigE1/0/1] quit
[DeviceA] interface twenty-fivegige 1/0/2
[DeviceA-Twenty-FiveGigE1/0/2] port link-aggregation group 1
[DeviceA-Twenty-FiveGigE1/0/2] quit
# Configure Layer 2 aggregate interface Bridge-Aggregation 1 as a trunk port and assign it to
VLAN 10.
40
[DeviceA] interface bridge-aggregation 1
[DeviceA-Bridge-Aggregation1] port link-type trunk
[DeviceA-Bridge-Aggregation1] port trunk permit vlan 10
[DeviceA-Bridge-Aggregation1] quit
# Create Layer 2 aggregate interface Bridge-Aggregation 2.
[DeviceA] interface bridge-aggregation 2
# Configure Layer 2 aggregation group 2 to load share packets based on destination MAC
addresses.
[DeviceA-Bridge-Aggregation2] link-aggregation load-sharing mode destination-mac
[DeviceA-Bridge-Aggregation2] quit
# Assign ports Twenty-FiveGigE 1/0/3 and Twenty-FiveGigE 1/0/4 to link aggregation group 2.
[DeviceA] interface twenty-fivegige 1/0/3
[DeviceA-Twenty-FiveGigE1/0/3] port link-aggregation group 2
[DeviceA-Twenty-FiveGigE1/0/3] quit
[DeviceA] interface twenty-fivegige 1/0/4
[DeviceA-Twenty-FiveGigE1/0/4] port link-aggregation group 2
[DeviceA-Twenty-FiveGigE1/0/4] quit
# Configure Layer 2 aggregate interface Bridge-Aggregation 2 as a trunk port and assign it to
VLAN 20.
[DeviceA] interface bridge-aggregation 2
[DeviceA-Bridge-Aggregation2] port link-type trunk
[DeviceA-Bridge-Aggregation2] port trunk permit vlan 20
[DeviceA-Bridge-Aggregation2] quit
2. Configure Device B in the same way Device A is configured. (Details not shown.)
Verifying the configuration
# Display detailed information about all aggregation groups on Device A.
[DeviceA] display link-aggregation verbose
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Port Status: S -- Selected, U -- Unselected, I -- Individual
Port: A -- Auto port, M -- Management port, R -- Reference port
Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
41
WGE1/0/4 S 32768 2
# (Release 6616 and later.) Display all the group-specific load sharing modes on Device A.
[DeviceA] display link-aggregation load-sharing mode interface
The dynamic load sharing mode takes effect if it exists.
Route-Aggregation1 load-sharing mode:
Dynamic:
N/A
Static:
source-mac address
WGE1/0/1
WGE1/0/2 Link aggregation 1
Procedure
# Create Layer 2 aggregate interface Bridge-Aggregation 1, and set the link aggregation mode to
dynamic.
42
<Device> system-view
[Device] interface bridge-aggregation 1
[Device-Bridge-Aggregation1] link-aggregation mode dynamic
# Assign ports Twenty-FiveGigE 1/0/1 and Twenty-FiveGigE 1/0/2 to link aggregation group 1.
[Device] interface twenty-fivegige 1/0/1
[Device-Twenty-FiveGigE1/0/1] port link-aggregation group 1
[Device-Twenty-FiveGigE1/0/1] quit
[Device] interface twenty-fivegige 1/0/2
[Device-Twenty-FiveGigE1/0/2] port link-aggregation group 1
[Device-Twenty-FiveGigE1/0/2] quit
Remote:
Actor Priority Index Oper-Key SystemID Flag
WGE1/0/1 32768 81 0 0x8000, 0000-0000-0000 {DEF}
WGE1/0/2 32768 82 0 0x8000, 0000-0000-0000 {DEF}
The output shows that Twenty-FiveGigE 1/0/1 and Twenty-FiveGigE 1/0/2 are in Individual state
when they do not receive LACPDUs from the server. Both Twenty-FiveGigE 1/0/1 and
Twenty-FiveGigE 1/0/2 can forward traffic. When one port fails, its traffic is automatically switched to
the other port.
43
Example: Configuring a Layer 3 static aggregation group
Network configuration
On the network shown in Figure 12, perform the following tasks:
• Configure a Layer 3 static aggregation group on both Device A and Device B.
• Configure IP addresses and subnet masks for the corresponding Layer 3 aggregate interfaces.
Figure 12 Network diagram
WGE1/0/1 WGE1/0/1
WGE1/0/2 WGE1/0/2
Link aggregation 1
WGE1/0/3 WGE1/0/3
Procedure
1. Configure Device A:
# Create Layer 3 aggregate interface Route-Aggregation 1, and configure an IP address and
subnet mask for the aggregate interface.
<DeviceA> system-view
[DeviceA] interface route-aggregation 1
[DeviceA-Route-Aggregation1] ip address 192.168.1.1 24
[DeviceA-Route-Aggregation1] quit
# Assign Layer 3 Ethernet interfaces Twenty-FiveGigE 1/0/1 through Twenty-FiveGigE 1/0/3 to
aggregation group 1.
[DeviceA] interface twenty-fivegige 1/0/1
[DeviceA-Twenty-FiveGigE1/0/1] port link-aggregation group 1
[DeviceA-Twenty-FiveGigE1/0/1] quit
[DeviceA] interface twenty-fivegige 1/0/2
[DeviceA-Twenty-FiveGigE1/0/2] port link-aggregation group 1
[DeviceA-Twenty-FiveGigE1/0/2] quit
[DeviceA] interface twenty-fivegige 1/0/3
[DeviceA-Twenty-FiveGigE1/0/3] port link-aggregation group 1
[DeviceA-Twenty-FiveGigE1/0/3] quit
2. Configure Device B in the same way Device A is configured. (Details not shown.)
Verifying the configuration
# Display detailed information about all aggregation groups on Device A.
[DeviceA] display link-aggregation verbose
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Port Status: S -- Selected, U -- Unselected, I -- Individual
Port: A -- Auto port, M -- Management port, R -- Reference port
Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
44
Port Status Priority Oper-Key
WGE1/0/1(R) S 32768 1
WGE1/0/2 S 32768 1
WGE1/0/3 S 32768 1
The output shows that link aggregation group 1 is a Layer 3 static aggregation group that contains
three Selected ports.
Procedure
1. Configure Device A:
# Create Layer 3 aggregate interface Route-Aggregation 1.
<DeviceA> system-view
[DeviceA] interface route-aggregation 1
# Set the link aggregation mode to dynamic.
[DeviceA-Route-Aggregation1] link-aggregation mode dynamic
# Configure an IP address and subnet mask for Route-Aggregation 1.
[DeviceA-Route-Aggregation1] ip address 192.168.1.1 24
[DeviceA-Route-Aggregation1] quit
# Assign Layer 3 Ethernet interfaces Twenty-FiveGigE 1/0/1 through Twenty-FiveGigE 1/0/3 to
aggregation group 1.
[DeviceA] interface twenty-fivegige 1/0/1
[DeviceA-Twenty-FiveGigE1/0/1] port link-aggregation group 1
[DeviceA-Twenty-FiveGigE1/0/1] quit
[DeviceA] interface twenty-fivegige 1/0/2
[DeviceA-Twenty-FiveGigE1/0/2] port link-aggregation group 1
[DeviceA-Twenty-FiveGigE1/0/2] quit
[DeviceA] interface twenty-fivegige 1/0/3
[DeviceA-Twenty-FiveGigE1/0/3] port link-aggregation group 1
[DeviceA-Twenty-FiveGigE1/0/3] quit
2. Configure Device B in the same way Device A is configured. (Details not shown.)
Verifying the configuration
# Display detailed information about all aggregation groups on Device A.
[DeviceA] display link-aggregation verbose
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Port Status: S -- Selected, U -- Unselected, I -- Individual
45
Port: A -- Auto port, M -- Management port, R -- Reference port
Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
The output shows that link aggregation group 1 is a Layer 3 dynamic aggregation group that contains
three Selected ports.
Procedure
1. Configure Device A:
# Create Layer 3 aggregate interface Route-Aggregation 1.
<DeviceA> system-view
[DeviceA] interface route-aggregation 1
# Configure Layer 3 aggregation group 1 to load share packets based on source IP addresses.
[DeviceA-Route-Aggregation1] link-aggregation load-sharing mode source-ip
46
# Configure an IP address and subnet mask for Layer 3 aggregate interface Route-Aggregation
1.
[DeviceA-Route-Aggregation1] ip address 192.168.1.1 24
[DeviceA-Route-Aggregation1] quit
# Assign Layer 3 Ethernet interfaces Twenty-FiveGigE 1/0/1 and Twenty-FiveGigE 1/0/2 to
aggregation group 1.
[DeviceA] interface twenty-fivegige 1/0/1
[DeviceA-Twenty-FiveGigE1/0/1] port link-aggregation group 1
[DeviceA-Twenty-FiveGigE1/0/1] quit
[DeviceA] interface twenty-fivegige 1/0/2
[DeviceA-Twenty-FiveGigE1/0/2] port link-aggregation group 1
[DeviceA-Twenty-FiveGigE1/0/2] quit
# Create Layer 3 aggregate interface Route-Aggregation 2.
[DeviceA] interface route-aggregation 2
# Configure Layer 3 aggregation group 2 to load share packets based on destination IP
addresses.
[DeviceA-Route-Aggregation2] link-aggregation load-sharing mode destination-ip
# Configure an IP address and subnet mask for Layer 3 aggregate interface Route-Aggregation
2.
[DeviceA-Route-Aggregation2] ip address 192.168.2.1 24
[DeviceA-Route-Aggregation2] quit
# Assign Layer 3 Ethernet interfaces Twenty-FiveGigE 1/0/3 and Twenty-FiveGigE 1/0/4 to
aggregation group 2.
[DeviceA] interface twenty-fivegige 1/0/3
[DeviceA-Twenty-FiveGigE1/0/3] port link-aggregation group 2
[DeviceA-Twenty-FiveGigE1/0/3] quit
[DeviceA] interface twenty-fivegige 1/0/4
[DeviceA-Twenty-FiveGigE1/0/4] port link-aggregation group 2
[DeviceA-Twenty-FiveGigE1/0/4] quit
2. Configure Device B in the same way Device A is configured. (Details not shown.)
Verifying the configuration
# Display detailed information about all aggregation groups on Device A.
[DeviceA] display link-aggregation verbose
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Port Status: S -- Selected, U -- Unselected, I -- Individual
Port: A -- Auto port, M -- Management port, R -- Reference port
Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
47
Aggregate Interface: Route-Aggregation2
Aggregation Mode: Static
Loadsharing Type: Shar
Management VLANs: None
Port Status Priority Oper-Key
WGE1/0/3(R) S 32768 2
WGE1/0/4 S 32768 2
# (Release 6616 and later.) Display all the group-specific load sharing modes on Device A.
[DeviceA] display link-aggregation load-sharing mode interface
The dynamic load sharing mode takes effect if it exists.
Route-Aggregation1 load-sharing mode:
Dynamic:
N/A
Static:
source-ip address
48
Figure 15 Network diagram
Device A
WGE1/0/1 WGE1/0/3
WGE1/0/2
BAGG
Procedure
1. Configure Device A:
# Create Layer 2 aggregate interface Bridge-Aggregation 10, and set the link aggregation mode
to dynamic.
<DeviceA> system-view
[DeviceA] interface bridge-aggregation 10
[DeviceA-Bridge-Aggregation10] link-aggregation mode dynamic
[DeviceA-Bridge-Aggregation10] quit
# Assign Twenty-FiveGigE 1/0/1 through Twenty-FiveGigE 1/0/3 to aggregation group 10.
[DeviceA] interface twenty-fivegige 1/0/1
[DeviceA-Twenty-FiveGigE1/0/1] port link-aggregation group 10
[DeviceA-Twenty-FiveGigE1/0/1] quit
[DeviceA] interface twenty-fivegige 1/0/2
[DeviceA-Twenty-FiveGigE1/0/2] port link-aggregation group 10
[DeviceA-Twenty-FiveGigE1/0/2] quit
[DeviceA] interface twenty-fivegige 1/0/3
[DeviceA-Twenty-FiveGigE1/0/3] port link-aggregation group 10
[DeviceA-Twenty-FiveGigE1/0/3] quit
2. Configure Device B:
# Set the LACP system MAC address to 0001-0001-0001.
<DeviceB> system-view
[DeviceB] lacp system-mac 1-1-1
# Set the LACP system priority to 123.
[DeviceB] lacp system-priority 123
# Set the LACP system number to 1.
[DeviceB] lacp system-number 1
# Create Layer 2 aggregate interface Bridge-Aggregation 2, and set the link aggregation mode
to dynamic.
[DeviceB] interface bridge-aggregation 2
[DeviceB-Bridge-Aggregation2] link-aggregation mode dynamic
# Assign Bridge-Aggregation 2 to S-MLAG group 100.
[DeviceB-Bridge-Aggregation2] port s-mlag group 100
# Assign Twenty-FiveGigE 1/0/1 to aggregation group 2.
[DeviceB] interface twenty-fivegige 1/0/1
49
[DeviceB-Twenty-FiveGigE1/0/1] port link-aggregation group 2
[DeviceB-Twenty-FiveGigE1/0/1] quit
3. Configure Device C:
# Set the LACP system MAC address to 0001-0001-0001.
<DeviceC> system-view
[DeviceC] lacp system-mac 1-1-1
# Set the LACP system priority to 123.
[DeviceC] lacp system-priority 123
# Set the LACP system number to 2.
[DeviceC] lacp system-number 2
# Create Layer 2 aggregate interface Bridge-Aggregation 3, and set the link aggregation mode
to dynamic.
[DeviceC] interface bridge-aggregation 3
[DeviceC-Bridge-Aggregation3] link-aggregation mode dynamic
# Assign Bridge-Aggregation 3 to S-MLAG group 100.
[DeviceC-Bridge-Aggregation3] port s-mlag group 100
# Assign Twenty-FiveGigE 1/0/1 to aggregation group 3.
[DeviceC] interface twenty-fivegige 1/0/1
[DeviceC-Twenty-FiveGigE1/0/1] port link-aggregation group 3
[DeviceC-Twenty-FiveGigE1/0/1] quit
4. Configure Device D:
# Set the LACP system MAC address to 0001-0001-0001.
<DeviceD> system-view
[DeviceD] lacp system-mac 1-1-1
# Set the LACP system priority to 123.
[DeviceD] lacp system-priority 123
# Set the LACP system number to 3.
[DeviceD] lacp system-number 3
# Create Layer 2 aggregate interface Bridge-Aggregation 4, and set the link aggregation mode
to dynamic.
[DeviceD] interface bridge-aggregation 4
[DeviceD-Bridge-Aggregation4] link-aggregation mode dynamic
# Assign Bridge-Aggregation 4 to S-MLAG group 100.
[DeviceD-Bridge-Aggregation4] port s-mlag group 100
# Assign Twenty-FiveGigE 1/0/1 to aggregation group 4.
[DeviceD] interface twenty-fivegige 1/0/1
[DeviceD-Twenty-FiveGigE1/0/1] port link-aggregation group 4
[DeviceD-Twenty-FiveGigE1/0/1] quit
50
Aggregate Interface: Bridge-Aggregation10
Creation Mode: Manual
Aggregation Mode: Dynamic
Loadsharing Type: Shar
Management VLANs: None
System ID: 0x8000, 40fa-264f-0100
Local:
Port Status Priority Index Oper-Key Flag
WGE1/0/1(R) S 32768 1 1 {ACDEF}
WGE1/0/2 S 32768 2 1 {ACDEF}
WGE1/0/3 S 32768 3 1 {ACDEF}
Remote:
Actor Priority Index Oper-Key SystemID Flag
WGE1/0/1 32768 16385 50100 0x7b , 0001-0001-0001 {ACDEF}
WGE1/0/2 32768 32769 50100 0x7b , 0001-0001-0001 {ACDEF}
WGE1/0/3 32768 49153 50100 0x7b , 0001-0001-0001 {ACDEF}
51
Contents
Configuring DRNI··························································································· 1
About DRNI ························································································································································ 1
DRNI network model ·································································································································· 1
DRCP ························································································································································· 2
Keepalive and failover mechanism ············································································································ 2
MAD mechanism ········································································································································ 3
Device role calculation ······························································································································· 3
DRNI MAD DOWN state persistence ········································································································· 3
DR system setup process ·························································································································· 4
DRNI standalone mode ······························································································································ 4
Configuration consistency check················································································································ 5
DRNI sequence number check ·················································································································· 7
DRNI packet authentication ······················································································································· 7
DRNI failure handling mechanisms ············································································································ 8
Mechanisms to handle concurrent IPL and keepalive link failures··························································· 10
Protocols and standards ·························································································································· 12
Restrictions and guidelines: DRNI configuration ······························································································ 12
Software version requirements ················································································································ 12
DRNI configuration ··································································································································· 12
Compatibility with other features ·············································································································· 14
DRNI tasks at a glance ···································································································································· 16
Configuring DR system settings ······················································································································· 17
Configuring the DR system MAC address ······························································································· 17
Setting the DR system number ················································································································ 17
Setting the DR system priority·················································································································· 18
Setting the DR role priority of the device·········································································································· 18
Enabling DRNI standalone mode on a DR member device ············································································· 19
Configuring DR keepalive settings ··················································································································· 20
Restrictions and guidelines for configuring DR keepalive settings··························································· 20
Configuring DR keepalive packet parameters·························································································· 20
Setting the DR keepalive interval and timeout timer ················································································ 20
Configuring DRNI MAD ···································································································································· 21
About this task·········································································································································· 21
Configuring the default DRNI MAD action on network interfaces ···························································· 22
Excluding an interface from the shutdown action by DRNI MAD ····························································· 22
Excluding all logical interfaces from the shutdown action by DRNI MAD ················································ 23
Specifying interfaces to be shut down by DRNI MAD when the DR system splits··································· 23
Enabling DRNI MAD DOWN state persistence ························································································ 24
Configuring a DR interface ······························································································································· 24
Specifying a Layer 2 aggregate interface or VXLAN tunnel interface as the IPP ············································ 25
Enabling the IPP to retain MAC address entries for down single-homed devices ··········································· 26
Assigning a DRNI virtual IP address to an interface ························································································ 27
Setting the mode of configuration consistency check ······················································································ 28
Disabling configuration consistency check ······································································································ 29
Enabling the short DRCP timeout timer on the IPP or a DR interface ····························································· 29
Setting the keepalive hold timer for identifying the cause of IPL down events ················································ 30
Configuring DR system auto-recovery ············································································································· 30
Setting the data restoration interval ················································································································· 31
Enabling DRNI sequence number check ········································································································· 31
Enabling DRNI packet authentication ·············································································································· 32
Displaying and maintaining DRNI ···················································································································· 32
DRNI configuration examples ·························································································································· 33
Example: Configuring basic DRNI functions ···························································································· 33
Example: Configuring Layer 3 gateways on a DR system ······································································· 37
Example: Configuring IPv4 and IPv6 VLAN gateways on a DR system ·················································· 47
i
Configuring DRNI
About DRNI
Distributed Resilient Network Interconnect (DRNI) virtualizes two physical devices into one system
through multichassis link aggregation.
IP network
Keepalive link
BAGG1 BAGG2
(DR interface) DR system (DR interface)
BAGG
Device C
The DR member devices are DR peers to each other. For features that require centralized traffic
processing (for example, spanning tree), a DR member device is assigned the primary or secondary
role based on its DR role priority. The secondary DR member device passes the traffic of those
features to the primary DR member device for processing. If the DR member devices in a DR system
have the same DR role priority, the device with the lower bridge MAC address is assigned the
primary role.
DRNI defines the following interface roles for each DR member device:
• DR interface—Layer 2 aggregate interface connected to the remote aggregation system. DR
interfaces connected to the same remote aggregation system belong to one DR group. In
Figure 1, Bridge-Aggregation 1 on Device A and Bridge-Aggregation 2 on Device B belong to
the same DR group. DR interfaces in a DR group form a multichassis aggregate link.
1
• Intra-portal port (IPP)—Interface connected to the DR peer for internal control. Each DR
member device has only one IPP. The IPPs of the DR member devices transmit DRNI protocol
packets and data packets through the intra-portal link (IPL) established between them. A DR
system has only one IPL.
DR member devices use a keepalive link to monitor each other's state. For more information about
the keepalive mechanism, see "Keepalive and failover mechanism."
If a device is attached to only one of the DR member devices in a DR system, that device is a
single-homed device.
DRCP
DRNI uses IEEE P802.1AX Distributed Relay Control Protocol (DRCP) for multichassis link
aggregation. DRCP runs on the IPL and uses distributed relay control protocol data units (DRCPDUs)
to advertise the DRNI configuration out of IPPs and DR interfaces.
DRCP operating mechanism
DRNI-enabled devices use DRCPDUs for the following purposes:
• Exchange DRCPDUs through DR interfaces to determine whether they can form a DR system.
• Exchange DRCPDUs through IPPs to negotiate the IPL state.
DRCP timeout timers
DRCP uses a timeout mechanism to specify the amount of time that an IPP or DR interface must wait
to receive DRCPDUs before it determines that the peer interface is down. This timeout mechanism
provides the following timer options:
• Short DRCP timeout timer, which is fixed at 3 seconds. If this timer is used, the peer interface
sends one DRCPDU every second.
• Long DRCP timeout timer, which is fixed at 90 seconds. If this timer is used, the peer interface
sends one DRCPDU every 30 seconds.
Short DRCP timeout timer enables the DR member devices to detect a peer interface down event
more quickly than the long DRCP timeout timer. However this benefit is at the expense of bandwidth
and system resources.
2
MAD mechanism
A multi-active collision occurs if the IPL goes down while the keepalive link is up. To avoid network
issues, DRNI MAD shuts down all network interfaces on the secondary DR member device except
those manually or automatically excluded.
When the IPL comes up, the secondary DR member device starts a delay timer and begins to restore
table entries (including MAC address entries and ARP entries) from the primary DR member device.
When the delay timer expires, the secondary DR member device brings up all network interfaces
placed in DRNI MAD DOWN state.
3
2. The keepalive link also goes down. Then, the secondary DR member device brings up the
network interfaces in DRNI MAD DOWN state and sets its role to primary.
DRNI MAD DOWN state persistence helps avoid the forwarding issues that might occur in the
multi-active situation that occurs because the keepalive link goes down while the IPL is down.
IP network
IPL
Keepalive link
Device A Device B
Compare DR settings
Set up DR system
Assign DR roles
Synchronize data
……
4
The following information describes the operating mechanism of this feature.
The DR member devices change to DRNI standalone mode when they detect that both the IPL and
the keepalive link are down. In addition, the secondary DR member device changes its role to
primary.
In DRNI standalone mode, the LACPDUs sent out of a DR interface by each DR member device
contain the interface-specific LACP system MAC address and LACP system priority.
The Selected state of the member ports in the DR interfaces in a DR group depends on their LACP
system MAC address and LACP system priority. If a DR interface has a lower LACP system priority
value or LACP system MAC address, the member ports in that DR interface become Selected to
forward traffic. If those Selected ports fail, the member ports in the DR interface on the other DR
member device become Selected to forward traffic.
NOTE:
A DR member device changes to DRNI standalone mode only when it detects that both the IPL and
the keepalive link are down. It does not change to DRNI standalone mode when the peer DR
member device reboots.
NOTE:
The data restoration interval specifies the maximum amount of time for the secondary DR member
device to synchronize data with the primary DR member device during DR system setup. For more
information, see "Setting the data restoration interval."
Type 1 configuration
Type 1 configuration consistency check is performed both globally and on DR interfaces. Table 1 and
Table 2 show settings that type 1 configuration contains.
Table 1 Global type 1 configuration
Setting Details
IPP link type IPP link type, including access, hybrid, and trunk.
PVID on the IPP PVID on the IPP.
• Global spanning tree state.
Spanning tree state • VLAN-specific spanning tree state. DRNI checks the VLAN-specific spanning
tree state only when PVST is enabled.
Spanning tree mode Spanning tree mode, including STP, RSTP, PVST, and MSTP.
• MST region name.
MST region settings
• MST region revision level.
5
Setting Details
• VLAN-to-MSTI mappings.
Setting Details
Type 2 configuration
Type 2 configuration consistency check is performed both globally and on DR interfaces. Table 3 and
Table 4 show settings that type 2 configuration contains.
Table 3 Global type 2 configuration
Setting Details
6
Setting Details
ACL used for RoCEv2 traffic ACL used to match RoCEv2 traffic for RoCEv2 traffic statistics collection.
statistics collection
Global RoCEv2 packet loss State of global RoCEv2 packet loss analysis.
analysis
Interval for reporting RoCEv2 Whether the interval is set for reporting RoCEv2 traffic statistics to the
traffic statistics to the NDA NDA.
Aging timer for inactive RoCEv2 Whether the aging timer is set for inactive RoCEv2 flows.
flows
The device displays the following global type 2 settings only when VLAN or VLAN interface
configuration inconsistency exists:
• VLAN interface status.
• IPv4 address of a VLAN interface.
• IPv6 address of a VLAN interface.
• Virtual IPv4 address of the VRRP group on a VLAN interface.
Table 4 DR interface type 2 configuration
Setting Details
7
match, the packet passes authentication. If the message digests do not match, the device drops the
packet.
Primary
Faulty interface
Downlink traffic
Device C
Forwarding path
Secondary after failure
Device B
8
Figure 4 IPL failure handling mechanism
DR system
Device A
Primary
Faulty link
Uplink traffic
IPL IP network
Downlink traffic
Device C
Interface in DRNI
MAD DOWN state
Secondary
Device B
Primary
Faulty device
Downlink traffic
Device C
Secondary
Device B
9
Figure 6 Uplink failure handling mechanism
DR system
Device A
Primary
Faulty link
Downlink traffic
Device C
Secondary
Device B
Primary
Faulty link
Keepalive
Uplink traffic
Network
Downlink traffic
IPL
Device C
Secondary
Device B
10
• If the IPL goes down while the keepalive link is up, the DR member devices negotiate their roles
over the keepalive link. DRNI MAD shuts down all network interfaces on the secondary DR
member device except those excluded from the shutdown action by DRNI MAD.
• If the keepalive link goes down while the IPL is down, the secondary DR member device sets its
role to primary, but it does not bring up the network interfaces in DRNI MAD DOWN state. Only
the original primary member device can forward traffic.
• If the keepalive link is down before the IPL goes down, DRNI MAD will not place network
interfaces in DRNI MAD DOWN state. Both DR member devices can operate with the primary
role to forward traffic.
Figure 8 Failure handling mechanism with DRNI MAD DOWN state persistence
DR system
Device A
Primary
Faulty link
Keepalive
Uplink traffic
Network
Downlink traffic
IPL
Device C
Interface in DRNI
MAD DOWN state
Secondary
Device B
As shown in Figure 9, you can bring up the interfaces in DRNI MAD DOWN state on the secondary
DR member device for it to forward traffic if the following conditions exist:
• Both the IPL and the keepalive link are down.
• The primary DR member device fails or its DR interface fails.
Figure 9 Bringing up the interfaces in DRNI MAD DOWN state
DR system
Device A
Primary
Faulty interface, link,
or device
Keepalive
Uplink traffic
Network
Downlink traffic
IPL
Device B
11
• If the keepalive link is down before the IPL goes down, both DR member devices change to
DRNI standalone mode.
Figure 10 Failure handling mechanism with DRNI standalone mode
DR system
Device A
Primary
Faulty interface, link,
or device
Keepalive
Uplink traffic
Network
Downlink traffic
IPL
Device C Interface in DRNI
MAD DOWN state
Secondary
Device B
DRNI configuration
DR system configuration
DRNI is an H3C proprietary protocol. You cannot use DR interfaces for communicating with
third-party devices.
You can assign two member devices to a DR system. For the DR member devices to be identified as
one DR system by the upstream or downstream devices, you must configure the same DR system
MAC address and DR system priority on the DR member devices. You must assign different DR
system numbers to the DR member devices.
Make sure each DR system uses a unique DR system MAC address.
To ensure correct forwarding, delete DRNI configuration from a DR member device if it leaves its DR
system.
When you bulk shut down physical interfaces on a DR member device for service changes or
hardware replacement, shut down the physical interfaces used for keepalive detection prior to the
physical member ports of the IPP. If you fail to do so, link flapping will occur on the member ports of
DR interfaces.
IPL
In addition to protocol packets, the IPL also transmits data packets between the DR member devices
when an uplink fails.
If a DR member device is a fixed-port device with interface expansion modules, assign ports from
multiple interface expansion modules to the aggregation group of the IPP. As a best practice, make
12
sure at least one member port resides on a different interface expansion module than the uplink
interfaces.
If a DR member device is a fixed-port device, assign at least two physical interfaces to the
aggregation group of the IPP.
Make sure the member ports in the aggregation group of the IPP have the same speed.
If a leaf-tier DR system is attached to a large number of servers whose NICs operate in
active/standby mode, take the size of the traffic sent among those servers into account when you
determine the bandwidth of the IPL.
As a best practice to reduce the impact of interface flapping on upper-layer services, use the
link-delay command to configure the same link delay settings on the IPPs. Do not set the link
delay to 0.
In a DR system , two IPPs must have the same configuration for the maximum jumbo frame length.
For the DR system to correctly forward traffic for single-homed devices, set the link type to trunk for
the IPPs and the interfaces attached to the single-homed devices. If you fail to do so, the ARP and
ND protocol packets sent to or from the single-homed devices cannot be forwarded over the IPL.
Keepalive link
The DR member devices exchange keepalive packets over the keepalive link to detect multi-active
collisions when the IPL is down.
As a best practice, establish a dedicated direct link between two DR member devices as a keepalive
link. Do not use the keepalive link for any other purposes. Make sure the DR member devices have
Layer 2 and Layer 3 connectivity to each other over the keepalive link.
You can use management Ethernet interfaces, Layer 3 Ethernet interfaces, Layer 3 aggregate
interfaces, or interfaces with a bound VPN instance to set up the keepalive link. As a best practice,
do not use VLAN interfaces for keepalive link setup. If you have to use VLAN interfaces, remove the
IPPs from the related VLANs to avoid loops.
On a fixed-port device with interface expansion modules, do not use the same module to provide
interfaces for setting up the keepalive link and IPL.
For correct keepalive detection, you must exclude the physical and logical interfaces used for
keepalive detection from the shutdown action by DRNI MAD.
DR interface
DR interfaces in the same DR group must use the different LACP system MAC addresses.
As a best practice, use the undo lacp period command to enable the long LACP timeout timer
(90 seconds) on a DR system.
You must execute the lacp edge-port command on the DR interfaces attached to bare metal
servers.
Interfaces excluded from the shutdown action by DRNI MAD
When you configure DRNI on the underlay networks, follow these restrictions and guidelines:
• Set the default DRNI MAD action to DRNI MAD DOWN by using the drni mad
default-action down command. By default, the default DRNI MAD action is DRNI MAD
DOWN.
• Exclude the VLAN interfaces of the VLANs to which the DR interfaces and IPPs belong from the
shutdown action by DRNI MAD. These interfaces will not be shut down by DRNI MAD.
• Exclude the interfaces used for keepalive detection. These interfaces will not be shut down by
DRNI MAD.
• Do not exclude the uplink Layer 3 interfaces, VLAN interfaces, or physical interfaces. These
interfaces will be shut down by DRNI MAD.
13
DRNI standalone mode
The DR member devices might both operate with the primary role to forward traffic if they have DR
interfaces in up state after the DR system splits. DRNI standalone mode helps avoid traffic
forwarding issues in this multi-active situation by allowing only the member ports in the DR interfaces
on one member device to forward traffic.
The following information describes the operating mechanism of this feature.
The DR member devices change to DRNI standalone mode when they detect that both the IPL and
the keepalive link are down. In addition, the secondary DR member device changes its role to
primary.
In DRNI standalone mode, the LACPDUs sent out of a DR interface by each DR member device
contain the interface-specific LACP system MAC address and LACP system priority.
The Selected state of the member ports in the DR interfaces in a DR group depends on their LACP
system MAC address and LACP system priority. If a DR interface has a lower LACP system priority
value or LACP system MAC address, the member ports in that DR interface become Selected to
forward traffic. If those Selected ports fail, the member ports in the DR interface on the other DR
member device become Selected to forward traffic.
To configure the DR system priority, use the drni system-priority command in system view.
To configure the LACP system priority, use one of the following methods:
• Execute the lacp system-mac and lacp system-priority commands in system view.
• Execute the port lacp system-mac and port lacp system-priority commands in
DR interface view.
The DR interface-specific configuration takes precedence over the global configuration.
When you configure the DR system priority and LACP system priority, follow these guidelines:
• For a single tier of DR system at the leaf layer, set the DR system priority value to be larger than
the LACP system priority value for DR interfaces. The smaller the value, the higher the priority.
For a DR group, configure different LACP system priority values for the member DR interfaces.
• For two or more tiers of DR systems, configure the same LACP system priority for the devices
with the same DR role. This ensures traffic is forwarded along the correct path when a DR
system splits.
14
Ethernet link aggregation
Do not configure automatic link aggregation on a DR system.
The aggregate interfaces in an S-MLAG group cannot be used as DR interfaces or IPPs.
You cannot configure link aggregation management subnets on a DR system.
When you configure a DR interface, follow these restrictions and guidelines:
• The link-aggregation selected-port maximum and link-aggregation
selected-port minimum commands do not take effect on a DR interface.
• If you execute the display link-aggregation verbose command for a DR interface,
the displayed system ID contains the DR system MAC address and the DR system priority.
• If the reference port is a member port of a DR interface, the display link-aggregation
verbose command displays the reference port on both DR member devices.
For more information about Ethernet link aggregation, see "Configuring Ethernet link aggregation."
Port isolation
Do not assign DR interfaces or IPPs to a port isolation group. For more information about port
isolation, see "Configuring port isolation."
Loop detection
Member devices in a DR system must have the same loop detection configuration. For information
about loop detection, see "Configuring loop detection."
Spanning tree
When the spanning tree protocol is enabled for a DR system, follow these restrictions and
guidelines:
• Make sure the DR member devices have the same spanning tree configuration. Violation of this
rule might cause network flapping. The configuration includes:
Global spanning tree configuration.
Spanning tree configuration on the IPP.
Spanning tree configuration on DR interfaces.
• IPPs of the DR system do not participate in spanning tree calculation.
• The DR member devices still use the DR system MAC address after the DR system splits,
which will cause spanning tree calculation issues. To avoid the issues, enable DRNI standalone
mode on the DR member devices before the DR system splits.
For more information about spanning tree, see "Configuring spanning tree."
Multicast
You can configure multicast on a DR system only with Release 6635.
Multicast VPN is not supported on a DR system. For more information about multicast VPN, see IP
Multicast Configuration Guide.
CFD
Do not use the MAC address of a remote MEP for CFD tests on IPPs. These tests cannot work on
IPPs. For more information about CFD, see High Availability Configuration Guide.
Smart Link
The DR member devices in a DR system must have the same Smart Link configuration.
For Smart Link to operate correctly on a DR interface, do not assign the DR interface and non-DR
interfaces to the same smart link group.
Do not assign an IPP to a smart link group.
15
For more information about Smart Link configuration, see High Availability Configuration Guide.
VRRP
If you use DRNI and VRRP together, make sure the keepalive hold timer is shorter than the interval
at which the VRRP master sends VRRP advertisements. Violation of this restriction might cause a
VRRP master/backup switchover to occur before IPL failure is confirmed. To set the interval at which
the VRRP master sends VRRP advertisements, use the vrrp vrid timer advertise or vrrp
ipv6 vrid timer advertise command. For more information about the commands, see High
Availability Command Reference.
Mirroring
For a mirroring group, do not assign the source port to an aggregation group other than the one that
accommodates the destination port, egress port, or reflector port. If the source port is in a different
aggregation group than the other ports, mirrored LACPDUs will be transmitted between the
aggregation groups and cause aggregate interface flapping.
VXLAN and EVPN
For information about VXLAN and EVPN restrictions, see VXLAN Configuration Guide and EVPN
VXLAN configuration in EVPN Configuration Guide.
16
(Optional.) Setting the data restoration interval
13. (Optional.) Configuring DRNI security features
Enabling DRNI sequence number check
Enabling DRNI packet authentication
18
Enabling DRNI standalone mode on a DR
member device
About this task
Perform this task to avoid forwarding issues in the multi-active situation that might occur after both
the IPL and the keepalive link are down.
DRNI standalone mode helps avoid traffic forwarding issues in this multi-active situation by allowing
only the member ports in the DR interfaces on one member device to forward traffic. For more
information about this mode, see "DRNI standalone mode."
When you configure this feature, you can configure a delay to prevent an unnecessary mode change
because of transient link down issues.
If the keepalive link fails before the IPL fails, DRNI MAD will not shut down the interfaces on the DR
member devices. After the DR member devices enter DRNI standalone mode, they use different
LACP system IDs for link aggregation. As a result, the aggregation member ports on one of the DR
member devices are selected to forward traffic.
If the IPL fails, DRNI MAD shuts down the interfaces on the secondary DR member device. When the
keepalive link also fails, DRNI MAD brings up the interfaces in DRNI MAD DOWN state, and then the
secondary DR member device enters DRNI standalone mode.
Software version and feature compatibility
The feature is supported only in Release 6616 and later.
Restrictions and guidelines
A DR member device changes to DRNI standalone mode only when it detects that both the IPL and
the keepalive link are down. It does not change to DRNI standalone mode when the peer DR
member device reboots, because the peer notifies the DR member device of the reboot event.
As a best practice, enable DRNI standalone mode on both DR member devices.
Before you enable DRNI standalone mode on a DR member device, make sure its LACP system
priority is higher than that of the remote aggregation system. This restriction ensures that the
reference port is on the remote aggregation system and prevents the interfaces attached to the DR
system from flapping. For more information about the LACP system priority, see "Configuring
Ethernet link aggregation."
To configure the DR system priority, use the drni system-priority command in system view.
To configure the LACP system priority, use one of the following methods:
• Execute the lacp system-mac and lacp system-priority commands in system view.
• Execute the port lacp system-mac and port lacp system-priority commands in
DR interface view.
The DR interface-specific configuration takes precedence over the global configuration.
When you configure the DR system priority and LACP system priority, follow these guidelines:
• For a single tier of DR system at the leaf layer, set the DR system priority value to be larger than
the LACP system priority value for DR interfaces. The smaller the value, the higher the priority.
For a DR group, configure different LACP system priority values for the member DR interfaces.
• For two tiers of DR systems at the spine and leaf layers, configure the same DR system priority
and LACP system priority settings of for the DR systems. This ensures traffic is forwarded along
the correct path when a DR system splits.
Procedure
1. Enter system view.
system-view
19
2. Enable DRNI standalone mode.
drni standalone enable [ delay delay-time ]
By default, DRNI standalone mode is disabled.
20
Procedure
1. Enter system view.
system-view
2. Set the DR keepalive interval and timeout timer.
drni keepalive interval interval [ timeout timeout ]
By default, the DR keepalive interval is 1000 milliseconds, and the DR keepalive timeout timer
is 5 seconds.
21
Interfaces assigned to a service loopback group by using the port service-loopback
group command.
Mirroring reflector ports configured by using the mirroring-group reflector-port
command.
Interfaces forced to stay up by using the port up-mode command.
22
The DRNI MAD DOWN action is always taken on interfaces listed in "List of automatically included
interfaces." You cannot disable the action by excluding those interfaces.
To view interfaces excluded from the MAD shutdown action, see the Excluded ports
(user-configured) field in the output from the display drni mad verbose command.
If you exclude an interface that is already in DRNI MAD DOWN state from the MAD shutdown action,
the interface stays in that state. It will not come up automatically.
Procedure
1. Enter system view.
system-view
2. Exclude an interface from the shutdown action by DRNI MAD.
drni mad exclude interface interface-type interface-number
By default, DRNI MAD shuts down all network interfaces when detecting a multi-active collision,
except for the network interfaces set by the system to not shut down.
23
Restrictions and guidelines
The DRNI MAD DOWN action will not take effect on the interfaces listed in "List of automatically
excluded interfaces."
Procedure
1. Enter system view.
system-view
2. Specify interfaces to be shut down by DRNI MAD when the DR system splits.
drni mad include interface interface-type interface-number
By default, the user-configured included port list does not contain any ports.
Configuring a DR interface
About this task
If a DR group contains only one DR interface, that interface is called a single-homed DR interface. By
default, DRNI does not allow access through single-homed DR interfaces, which means DRNI MAD
shuts down a DR interface if it is the only member in its DR group.
To ensure traffic forwarding for a device single-homed to a DR interface, allow the DR interface to be
the single member in its DR group. DRNI MAD will not shut down the single-homed DR interface,
and the device will not perform configuration consistency check on the interface.
24
Restrictions and guidelines
The device can have multiple DR interfaces. However, you can assign a Layer 2 aggregate interface
to only one DR group.
A Layer 2 aggregate interface cannot operate as both IPP and DR interface.
To improve forwarding efficiency, exclude the DR interface on the secondary DR member device
from the shutdown action by DRNI MAD. This action enables the DR interface to forward traffic
immediately after a multi-active collision is removed without having to wait for the secondary DR
member device to complete entry restoration.
To use resilient load sharing on a DR interface, you must configure the resilient load sharing mode
before you assign member ports to the DR interface.
If a DR interface or its peer DR interface already has member ports, use the following procedure to
configure the resilient load sharing mode on that DR interface:
1. Delete the DR interface.
2. Recreate the DR interface.
3. Configure the resilient load sharing mode.
4. Assign member ports to the DR interface.
For more information about the resilient load sharing mode, see "Configuring Ethernet link
aggregation."
To change the allow-single-member setting for a single-homed DR interface, first execute the
undo port drni group command to remove it from its DR group.
To prevent loops when you assign a single-homed aggregate interface to a DR group, use the
following procedure:
1. Assign the aggregate interface to the DR group.
2. Assign ports to the aggregation group of the aggregate interface.
When you remove a single-homed DR interface from its DR group, use the following procedure:
1. Remove the member ports from the aggregation group of the DR interface.
2. Remove the DR interface from the DR group.
Procedure
1. Enter system view.
system-view
2. Enter Layer 2 aggregate interface view.
interface bridge-aggregation interface-number
3. Assign the aggregate interface to a DR group.
port drni group group-id [ allow-single-member ]
As a best practice, specify the allow-single-member keyword for a dynamic aggregate
interface.
The allow-single-member keyword is supported in Release 6635 and later.
25
Do not associate a VXLAN tunnel interface with a VXLAN if you use it as the IPP. You can use a
VXLAN tunnel interface as an IPP only in an EVPN network. For more information about EVPN, see
EVPN Configuration Guide.
If you specify an aggregate interface as an IPP, the device assigns the aggregate interface as a trunk
port to all VLANs when the interface uses the default VLAN settings. If not, the device does not
change the VLAN settings of the interface.
To ensure correct Layer 3 forwarding over the IPL, you must use the undo mac-address static
source-check enable command to disable static source check on the Layer 2 aggregate
interface assigned the IPP role.
The device does not change the VLAN settings of an aggregate interface when you remove its IPP
role.
Do not use the MAC address of a remote MEP for CFD tests on IPPs. These tests cannot work on
IPPs. For more information about CFD, see High Availability Configuration Guide.
Procedure
1. Enter system view.
system-view
2. Enter interface view.
Enter Layer 2 aggregate interface view.
interface bridge-aggregation interface-number
Enter VXLAN tunnel interface view.
interface tunnel number
3. Specify the interface as the IPP.
port drni intra-portal-port port-id
26
2. Enable the IPP to retain MAC address entries for single-homed devices.
drni ipp mac-address hold
By default, the IPP does not retain MAC address entries for single-homed devices when the
devices go down.
27
interface vlan-interface interface-number
3. Assign a virtual IPv4 address to the VLAN interface.
port drni virtual-ip ipv4-address { mask-length | mask } [ active |
standby ] virtual-mac mac-address
By default, no virtual IPv4 addresses are assigned to interfaces.
4. Assign a virtual IPv6 address to the VLAN interface.
port drni ipv6 virtual-ip ipv6-address { prefix-length [ active |
standby ] [ virtual-mac mac-address ] | link-local }
By default, no virtual IPv6 addresses are assigned to interfaces.
Assigning DRNI virtual IP addresses to a loopback interface
1. Enter system view.
system-view
2. Enter loopback interface view.
interface loopback interface-number
3. Assign a virtual IPv4 address to the loopback interface.
port drni virtual-ip ipv4-address { mask-length | mask } [ active |
standby ]
By default, no virtual IPv4 addresses are assigned to interfaces.
4. Assign a virtual IPv6 address to the loopback interface.
port drni ipv6 virtual-ip ipv6-address { prefix-length [ active |
standby ] | link-local }
By default, no virtual IPv6 addresses are assigned to interfaces.
Assigning DRNI virtual IP addresses to a VSI interface
1. Enter system view.
system-view
2. Enter VSI interface view.
interface vsi-interface interface-number
3. Assign a virtual IPv4 address to the VSI interface.
port drni virtual-ip ipv4-address { mask-length | mask } [ active |
standby ]
By default, no virtual IPv4 addresses are assigned to interfaces.
4. Assign a virtual IPv6 address to the VSI interface.
port drni ipv6 virtual-ip ipv6-address { prefix-length [ active |
standby ] | link-local }
By default, no virtual IPv6 addresses are assigned to interfaces.
28
The device shuts down DR interfaces and generates log messages if strict mode is enabled.
• For type 2 configuration inconsistency, the device only generates log messages, whether strict
or loose mode is enabled.
Procedure
1. Enter system view.
system-view
2. Set the mode of configuration consistency check.
drni consistency-check mode { loose | strict }
By default, configuration consistency check uses strict mode.
29
Enter VXLAN tunnel interface view.
interface tunnel number
3. Enable the short DRCP timeout timer.
drni drcp period short
By default, an interface uses the long DRCP timeout timer (90 seconds).
30
Restrictions and guidelines
If both DR member devices recover and have up DR interfaces after the entire DR system reboots,
active-active situation might occur if both IPL and keepalive links were down when the reload delay
timer expires. If this rare situation occurs, examine the IPL and keepalive links and restore them.
To avoid incorrect role preemption, make sure the reload delay timer is longer than the amount of
time required for the device to restart.
Procedure
1. Enter system view.
system-view
2. Configure DR system auto-recovery.
drni auto-recovery reload-delay delay-value
By default, DR system auto-recovery is not configured. The reload delay timer is not set.
31
After one DR member device reboots, the other DR member device might receive and accept the
packets that were intercepted by an attacker before the reboot. As a best practice, change the
authentication key after a DR member device reboots.
Procedure
1. Enter system view.
system-view
2. Enable DRNI sequence number check.
drni sequence enable
By default, DRNI sequence number check is disabled.
Execute display commands in any view and reset commands in user view.
Task Command
32
Task Command
and DR interfaces.
WGE1/0/1 WGE1/0/2
WGE1/0/3
WGE1/0/4
BAGG
WGE1/0/3 WGE1/0/3
WGE1/0/4 WGE1/0/4
IPL
WGE1/0/1, WGE1/0/2 WGE1/0/1, WGE1/0/2
DR 1 DR 2
WGE1/0/5 Keepalive WGE1/0/5
Device A Device B
DR system
Procedure
1. Configure Device A:
# Configure DR system settings.
<DeviceA> system-view
[DeviceA] drni system-mac 1-1-1
[DeviceA] drni system-number 1
[DeviceA] drni system-priority 123
# Configure DR keepalive packet parameters.
33
[DeviceA] drni keepalive ip destination 1.1.1.1 source 1.1.1.2
# Set the link mode of Twenty-FiveGigE 1/0/5 to Layer 3, and assign the interface an IP address.
The IP address will be used as the source IP address of keepalive packets.
[DeviceA] interface twenty-fivegige 1/0/5
[DeviceA-Twenty-FiveGigE1/0/5] port link-mode route
[DeviceA-Twenty-FiveGigE1/0/5] ip address 1.1.1.2 24
[DeviceA-Twenty-FiveGigE1/0/5] quit
# Exclude the interface used for DR keepalive detection (Twenty-FiveGigE 1/0/5) from the
shutdown action by DRNI MAD.
[DeviceA] drni mad exclude interface twenty-fivegige 1/0/5
# Create Layer 2 dynamic aggregate interface Bridge-Aggregation 3.
[DeviceA] interface bridge-aggregation 3
[DeviceA-Bridge-Aggregation3] link-aggregation mode dynamic
[DeviceA-Bridge-Aggregation3] quit
# Assign Twenty-FiveGigE 1/0/1 and Twenty-FiveGigE 1/0/2 to aggregation group 3.
[DeviceA] interface twenty-fivegige 1/0/1
[DeviceA-Twenty-FiveGigE1/0/1] port link-aggregation group 3
[DeviceA-Twenty-FiveGigE1/0/1] quit
[DeviceA] interface twenty-fivegige 1/0/2
[DeviceA-Twenty-FiveGigE1/0/2] port link-aggregation group 3
[DeviceA-Twenty-FiveGigE1/0/2] quit
# Specify Bridge-Aggregation 3 as the IPP.
[DeviceA] interface bridge-aggregation 3
[DeviceA-Bridge-Aggregation3] port drni intra-portal-port 1
[DeviceA-Bridge-Aggregation3] undo mac-address static source-check enable
[DeviceA-Bridge-Aggregation3] quit
# Create Layer 2 dynamic aggregate interface Bridge-Aggregation 4.
[DeviceA] interface bridge-aggregation 4
[DeviceA-Bridge-Aggregation4] link-aggregation mode dynamic
[DeviceA-Bridge-Aggregation4] quit
# Assign Twenty-FiveGigE 1/0/3 and Twenty-FiveGigE 1/0/4 to aggregation group 4.
[DeviceA] interface twenty-fivegige 1/0/3
[DeviceA-Twenty-FiveGigE1/0/3] port link-aggregation group 4
[DeviceA-Twenty-FiveGigE1/0/3] quit
[DeviceA] interface twenty-fivegige 1/0/4
[DeviceA-Twenty-FiveGigE1/0/4] port link-aggregation group 4
[DeviceA-Twenty-FiveGigE1/0/4] quit
# Assign Bridge-Aggregation 4 to DR group 4.
[DeviceA] interface bridge-aggregation 4
[DeviceA-Bridge-Aggregation4] port drni group 4
[DeviceA-Bridge-Aggregation4] quit
2. Configure Device B:
# Configure DR system settings.
<DeviceB> system-view
[DeviceB] drni system-mac 1-1-1
[DeviceB] drni system-number 2
[DeviceB] drni system-priority 123
# Configure DR keepalive packet parameters.
34
[DeviceB] drni keepalive ip destination 1.1.1.2 source 1.1.1.1
# Set the link mode of Twenty-FiveGigE 1/0/5 to Layer 3, and assign the interface an IP address.
The IP address will be used as the source IP address of keepalive packets.
[DeviceB] interface twenty-fivegige 1/0/5
[DeviceB-Twenty-FiveGigE1/0/5] port link-mode route
[DeviceB-Twenty-FiveGigE1/0/5] ip address 1.1.1.1 24
[DeviceB-Twenty-FiveGigE1/0/5] quit
# Exclude the interface used for DR keepalive detection (Twenty-FiveGigE 1/0/5) from the
shutdown action by DRNI MAD.
[DeviceB] drni mad exclude interface twenty-fivegige 1/0/5
# Create Layer 2 dynamic aggregate interface Bridge-Aggregation 3.
[DeviceB] interface bridge-aggregation 3
[DeviceB-Bridge-Aggregation3] link-aggregation mode dynamic
[DeviceB-Bridge-Aggregation3] quit
# Assign Twenty-FiveGigE 1/0/1 and Twenty-FiveGigE 1/0/2 to aggregation group 3.
[DeviceB] interface twenty-fivegige 1/0/1
[DeviceB-Twenty-FiveGigE1/0/1] port link-aggregation group 3
[DeviceB-Twenty-FiveGigE1/0/1] quit
[DeviceB] interface twenty-fivegige 1/0/2
[DeviceB-Twenty-FiveGigE1/0/2] port link-aggregation group 3
[DeviceB-Twenty-FiveGigE1/0/2] quit
# Specify Bridge-Aggregation 3 as the IPP.
[DeviceB] interface bridge-aggregation 3
[DeviceB-Bridge-Aggregation3] port drni intra-portal-port 1
[DeviceB-Bridge-Aggregation3] undo mac-address static source-check enable
[DeviceB-Bridge-Aggregation3] quit
# Create Layer 2 dynamic aggregate interface Bridge-Aggregation 4.
[DeviceB] interface bridge-aggregation 4
[DeviceB-Bridge-Aggregation4] link-aggregation mode dynamic
[DeviceB-Bridge-Aggregation4] quit
# Assign Twenty-FiveGigE 1/0/3 and Twenty-FiveGigE 1/0/4 to aggregation group 4.
[DeviceB] interface twenty-fivegige 1/0/3
[DeviceB-Twenty-FiveGigE1/0/3] port link-aggregation group 4
[DeviceB-Twenty-FiveGigE1/0/3] quit
[DeviceB] interface twenty-fivegige 1/0/4
[DeviceB-Twenty-FiveGigE1/0/4] port link-aggregation group 4
[DeviceB-Twenty-FiveGigE1/0/4] quit
# Assign Bridge-Aggregation 4 to DR group 4.
[DeviceB] interface bridge-aggregation 4
[DeviceB-Bridge-Aggregation4] port drni group 4
[DeviceB-Bridge-Aggregation4] quit
3. Configure Device C:
# Create Layer 2 dynamic aggregate interface Bridge-Aggregation 4.
<DeviceC> system-view
[DeviceC] interface bridge-aggregation 4
[DeviceC-Bridge-Aggregation4] link-aggregation mode dynamic
[DeviceC-Bridge-Aggregation4] quit
# Assign Twenty-FiveGigE 1/0/1 through Twenty-FiveGigE 1/0/4 to aggregation group 4.
35
[DeviceC] interface range twenty-fivegige 1/0/1 to twenty-fivegige 1/0/4
[DeviceC-if-range] port link-aggregation group 4
[DeviceC-if-range] quit
# Verify that the IPP and the DR interface are working correctly on Device A.
[DeviceA] display drni summary
Flags: A -- Aggregate interface down, B -- No peer DR interface configured
C -- Configuration consistency check failed
IPP: BAGG3
IPP state (cause): UP
Keepalive link state (cause): UP
DR interface information
DR interface DR group Local state (cause) Peer state Remaining down time(s)
BAGG4 4 UP UP -
[DeviceA] display drni verbose
Flags: A -- Home_Gateway, B -- Neighbor_Gateway, C -- Other_Gateway,
D -- IPP_Activity, E -- DRCP_Timeout, F -- Gateway_Sync,
G -- Port_Sync, H -- Expired
IPP/IPP ID: BAGG3/1
State: UP
Cause: -
Local DRCP flags/Peer DRCP flags: ABDFG/ABDFG
Local Selected ports (index): WGE1/0/1 (1), WGE1/0/2 (2)
Peer Selected ports indexes: 1, 2
36
Local DR interface state: UP
Peer DR interface state: UP
DR group state: UP
Local DR interface down cause: -
Remaining DRNI DOWN time: -
Local DRCP flags/Peer DRCP flags: ABDFG/ABDFG
Local Selected ports (index): WGE1/0/3 (16387), WGE1/0/4 (16388)
Peer Selected ports indexes: 32771, 32772
# Verify that all member ports of aggregation group 4 are in Selected state on Device C, which
indicates a successful link aggregation between the DR system and Device C.
[DeviceC] display link-aggregation verbose bridge-aggregation 4
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Port Status: S -- Selected, U -- Unselected, I -- Individual
Port: A -- Auto port, M -- Management port, R -- Reference port
Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
Aggregate Interface: Bridge-Aggregation4
Creation Mode: Manual
Aggregation Mode: Dynamic
Loadsharing Type: Shar
Management VLANs: None
System ID: 0x8000, 2e56-cbae-0600
Local:
Port Status Priority Index Oper-Key Flag
WGE1/0/1(R) S 32768 1 1 {ACDEF}
WGE1/0/2 S 32768 2 1 {ACDEF}
WGE1/0/3 S 32768 3 1 {ACDEF}
WGE1/0/4 S 32768 4 1 {ACDEF}
Remote:
Actor Priority Index Oper-Key SystemID Flag
WGE1/0/1 32768 16387 40004 0x7b , 0001-0001-0001 {ACDEF}
WGE1/0/2 32768 16388 40004 0x7b , 0001-0001-0001 {ACDEF}
WGE1/0/3 32768 32771 40004 0x7b , 0001-0001-0001 {ACDEF}
WGE1/0/4 32768 32772 40004 0x7b , 0001-0001-0001 {ACDEF}
37
Figure 12 Network diagram
Virtual route 1 Virtual route 2
Virtual IP address 1: Virtual IP address 2:
10.1.1.100/24 20.1.1.100/24
Device A
Master
/ 1 WG
BAGG100 1/0 E1 BAGG101
GE /0 /2
Vlan-int100 W Vlan-int101
WGE1/0/5 WG
/0 /1 E1
E1 /0
WG /1
IPL
Device C Keepalive Device D
BAGG125
WG
WGE1/0/3 E1 /0/2 WGE1/0/3
/0 E1
/2 WG
WGE1/0/5
WG
E1 /0/2
/0 E1
/1 WG
Device B
Backup
Host A Host B
10.1.1.4/24 20.1.1.4/24
VLAN 100 VLAN 101
Procedure
1. Configure Device A:
# Configure DR system settings.
<DeviceA> system-view
[DeviceA] drni system-mac 1-1-1
[DeviceA] drni system-number 1
[DeviceA] drni system-priority 123
# Configure DR keepalive parameters.
[DeviceA] drni keepalive ip destination 1.1.1.2 source 1.1.1.1
# Set the link mode of Twenty-FiveGigE 1/0/5 to Layer 3, and assign the interface an IP address.
The IP address will be used as the source IP address of keepalive packets.
[DeviceA] interface twenty-fivegige 1/0/5
[DeviceA-Twenty-FiveGigE1/0/5] port link-mode route
[DeviceA-Twenty-FiveGigE1/0/5] ip address 1.1.1.1 24
[DeviceA-Twenty-FiveGigE1/0/5] quit
# Exclude the interface used for DR keepalive detection (Twenty-FiveGigE 1/0/5) from the
shutdown action by DRNI MAD.
[DeviceA] drni mad exclude interface twenty-fivegige 1/0/5
# Create Layer 2 dynamic aggregate interface Bridge-Aggregation 125.
[DeviceA] interface bridge-aggregation 125
[DeviceA-Bridge-Aggregation125] link-aggregation mode dynamic
[DeviceA-Bridge-Aggregation125] quit
# Assign Twenty-FiveGigE 1/0/3 and Twenty-FiveGigE 1/0/4 to aggregation group 125.
[DeviceA] interface twenty-fivegige 1/0/3
[DeviceA-Twenty-FiveGigE1/0/3] port link-aggregation group 125
[DeviceA-Twenty-FiveGigE1/0/3] quit
[DeviceA] interface Twenty-FiveGigE 1/0/4
38
[DeviceA-Twenty-FiveGigE1/0/4] port link-aggregation group 125
[DeviceA-Twenty-FiveGigE1/0/4] quit
# Specify Bridge-Aggregation 125 as the IPP.
[DeviceA] interface bridge-aggregation 125
[DeviceA-Bridge-Aggregation125] port drni intra-portal-port 1
[DeviceA-Bridge-Aggregation125] undo mac-address static source-check enable
[DeviceA-Bridge-Aggregation125] quit
# Create Layer 2 dynamic aggregate interface Bridge-Aggregation 100, and assign it to DR
group 1.
[DeviceA] interface bridge-aggregation 100
[DeviceA-Bridge-Aggregation100] link-aggregation mode dynamic
[DeviceA-Bridge-Aggregation100] port drni group 1
[DeviceA-Bridge-Aggregation100] quit
# Assign Twenty-FiveGigE 1/0/1 to aggregation group 100.
[DeviceA] interface twenty-fivegige 1/0/1
[DeviceA-Twenty-FiveGigE1/0/1] port link-aggregation group 100
[DeviceA-Twenty-FiveGigE1/0/1] quit
# Create Layer 2 dynamic aggregate interface Bridge-Aggregation 101, and assign it to DR
group 2.
[DeviceA] interface bridge-aggregation 101
[DeviceA-Bridge-Aggregation101] link-aggregation mode dynamic
[DeviceA-Bridge-Aggregation101] port drni group 2
[DeviceA-Bridge-Aggregation101] quit
# Assign Twenty-FiveGigE 1/0/2 to aggregation group 101.
[DeviceA] interface twenty-fivegige 1/0/2
[DeviceA-Twenty-FiveGigE1/0/2] port link-aggregation group 101
[DeviceA-Twenty-FiveGigE1/0/2] quit
# Create VLAN 100 and VLAN 101.
[DeviceA] vlan 100
[DeviceA-vlan100] quit
[DeviceA] vlan 101
[DeviceA-vlan101] quit
# Set the link type of Bridge-Aggregation 100 to trunk, and assign it to VLAN 100.
[DeviceA] interface bridge-aggregation 100
[DeviceA-Bridge-Aggregation100] port link-type trunk
[DeviceA-Bridge-Aggregation100] port trunk permit vlan 100
[DeviceA-Bridge-Aggregation100] quit
# Set the link type of Bridge-Aggregation 101 to trunk, and assign it to VLAN 101.
[DeviceA] interface bridge-aggregation 101
[DeviceA-Bridge-Aggregation101] port link-type trunk
[DeviceA-Bridge-Aggregation101] port trunk permit vlan 101
[DeviceA-Bridge-Aggregation101] quit
# Set the link type of Bridge-Aggregation 125 to trunk, and assign it to VLAN 100 and VLAN
101.
[DeviceA] interface bridge-aggregation 125
[DeviceA-Bridge-Aggregation125] port link-type trunk
[DeviceA-Bridge-Aggregation125] port trunk permit vlan 100 101
[DeviceA-Bridge-Aggregation125] quit
39
# Create VLAN-interface 100 and VLAN-interface 101, and assign IP addresses to them.
[DeviceA] interface vlan-interface 100
[DeviceA-vlan-interface100] ip address 10.1.1.1 24
[DeviceA-vlan-interface100] quit
[DeviceA] interface vlan-interface 101
[DeviceA-vlan-interface101] ip address 20.1.1.1 24
[DeviceA-vlan-interface101] quit
# Exclude VLAN-interface 100 and VLAN-interface 101 from the shutdown action by DRNI
MAD.
[DeviceA] drni mad exclude interface vlan-interface 100
[DeviceA] drni mad exclude interface vlan-interface 101
# Configure OSPF.
[DeviceA] ospf
[DeviceA-ospf-1] import-route direct
[DeviceA-ospf-1] area 0
[DeviceA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[DeviceA-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255
[DeviceA-ospf-1-area-0.0.0.0] quit
[DeviceA-ospf-1] quit
# Create VRRP group 1 on VLAN-interface 100 and set its virtual IP address to 10.1.1.100.
[DeviceA] interface vlan-interface 100
[DeviceA-Vlan-interface100] vrrp vrid 1 virtual-ip 10.1.1.100
# Set the priority of Device A (primary DR member device) to 200 for it to become the master in
VRRP group 1.
[DeviceA-Vlan-interface100] vrrp vrid 1 priority 200
[DeviceA-Vlan-interface100] quit
# Create VRRP group 2 on VLAN-interface 101 and set its virtual IP address to 20.1.1.100.
[DeviceA] interface vlan-interface 101
[DeviceA-Vlan-interface101] vrrp vrid 2 virtual-ip 20.1.1.100
# Set the priority of Device A (primary DR member device) to 200 for it to become the master in
VRRP group 2.
[DeviceA-Vlan-interface101] vrrp vrid 2 priority 200
[DeviceA-Vlan-interface101] quit
2. Configure Device B:
# Configure DR system settings.
<DeviceB> system-view
[DeviceB] drni system-mac 1-1-1
[DeviceB] drni system-number 2
[DeviceB] drni system-priority 123
# Configure DR keepalive parameters.
[DeviceB] drni keepalive ip destination 1.1.1.1 source 1.1.1.2
# Set the link mode of Twenty-FiveGigE 1/0/5 to Layer 3, and assign the interface an IP address.
The IP address will be used as the source IP address of keepalive packets.
[DeviceB] interface twenty-fivegige 1/0/5
[DeviceB-Twenty-FiveGigE1/0/5] port link-mode route
[DeviceB-Twenty-FiveGigE1/0/5] ip address 1.1.1.2 24
[DeviceB-Twenty-FiveGigE1/0/5] quit
40
# Exclude the interface used for DR keepalive detection (Twenty-FiveGigE 1/0/5) from the
shutdown action by DRNI MAD.
[DeviceB] drni mad exclude interface twenty-fivegige 1/0/5
# Create Layer 2 dynamic aggregate interface Bridge-Aggregation 125.
[DeviceB] interface bridge-aggregation 125
[DeviceB-Bridge-Aggregation125] link-aggregation mode dynamic
[DeviceB-Bridge-Aggregation125] quit
# Assign Twenty-FiveGigE 1/0/3 and Twenty-FiveGigE 1/0/4 to aggregation group 125.
[DeviceB] interface twenty-fivegige 1/0/3
[DeviceB-Twenty-FiveGigE1/0/3] port link-aggregation group 125
[DeviceB-Twenty-FiveGigE1/0/3] quit
[DeviceB] interface twenty-fivegige 1/0/4
[DeviceB-Twenty-FiveGigE1/0/4] port link-aggregation group 125
[DeviceB-Twenty-FiveGigE1/0/4] quit
# Specify Bridge-Aggregation 125 as the IPP.
[DeviceB] interface bridge-aggregation 125
[DeviceB-Bridge-Aggregation125] port drni intra-portal-port 1
[DeviceB-Bridge-Aggregation125] undo mac-address static source-check enable
[DeviceB-Bridge-Aggregation125] quit
# Create Layer 2 dynamic aggregate interface Bridge-Aggregation 100, and assign it to DR
group 1.
[DeviceB] interface bridge-aggregation 100
[DeviceB-Bridge-Aggregation100] link-aggregation mode dynamic
[DeviceB-Bridge-Aggregation100] port drni group 1
[DeviceB-Bridge-Aggregation100] quit
# Assign Twenty-FiveGigE 1/0/1 to aggregation group 100.
[DeviceB] interface twenty-fivegige 1/0/1
[DeviceB-Twenty-FiveGigE1/0/1] port link-aggregation group 100
[DeviceB-Twenty-FiveGigE1/0/1] quit
# Create Layer 2 dynamic aggregate interface Bridge-Aggregation 101, and assign it to DR
group 2.
[DeviceB] interface bridge-aggregation 101
[DeviceB-Bridge-Aggregation101] link-aggregation mode dynamic
[DeviceB-Bridge-Aggregation101] port drni group 2
[DeviceB-Bridge-Aggregation101] quit
# Assign Twenty-FiveGigE 1/0/2 to aggregation group 101.
[DeviceB] interface twenty-fivegige 1/0/2
[DeviceB-Twenty-FiveGigE1/0/2] port link-aggregation group 101
[DeviceB-Twenty-FiveGigE1/0/2] quit
# Create VLAN 100 and VLAN 101.
[DeviceB] vlan 100
[DeviceB-vlan100] quit
[DeviceB] vlan 101
[DeviceB-vlan101] quit
# Set the link type of Bridge-Aggregation 100 to trunk, and assign it to VLAN 100.
[DeviceB] interface bridge-aggregation 100
[DeviceB-Bridge-Aggregation100] port link-type trunk
[DeviceB-Bridge-Aggregation100] port trunk permit vlan 100
41
[DeviceB-Bridge-Aggregation100] quit
# Set the link type of Bridge-Aggregation 101 to trunk, and assign it to VLAN 101.
[DeviceB] interface bridge-aggregation 101
[DeviceB-Bridge-Aggregation101] port link-type trunk
[DeviceB-Bridge-Aggregation101] port trunk permit vlan 101
[DeviceB-Bridge-Aggregation101] quit
# Set the link type of Bridge-Aggregation 125 to trunk, and assign it to VLAN 100 and VLAN
101.
[DeviceB] interface bridge-aggregation 125
[DeviceB-Bridge-Aggregation125] port link-type trunk
[DeviceB-Bridge-Aggregation125] port trunk permit vlan 100 101
[DeviceB-Bridge-Aggregation125] quit
# Create VLAN-interface 100 and VLAN-interface 101, and assign IP addresses to them.
[DeviceB] interface vlan-interface 100
[DeviceB-vlan-interface100] ip address 10.1.1.2 24
[DeviceB-vlan-interface100] quit
[DeviceB] interface vlan-interface 101
[DeviceB-vlan-interface101] ip address 20.1.1.2 24
[DeviceB-vlan-interface101] quit
# Exclude VLAN-interface 100 and VLAN-interface 101 from the shutdown action by DRNI
MAD.
[DeviceB] drni mad exclude interface vlan-interface 100
[DeviceB] drni mad exclude interface vlan-interface 101
# Configure OSPF.
[DeviceB] ospf
[DeviceB-ospf-1] import-route direct
[DeviceB-ospf-1] area 0
[DeviceB-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[DeviceB-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255
[DeviceB-ospf-1-area-0.0.0.0] quit
[DeviceB-ospf-1] quit
# Create VRRP group 1 on VLAN-interface 100 and set its virtual IP address to 10.1.1.100.
[DeviceB] interface vlan-interface 100
[DeviceB-Vlan-interface100] vrrp vrid 1 virtual-ip 10.1.1.100
[DeviceB-Vlan-interface100] quit
# Create VRRP group 2 on VLAN-interface 101 and set its virtual IP address to 20.1.1.100.
[DeviceB] interface vlan-interface 101
[DeviceB-Vlan-interface101] vrrp vrid 2 virtual-ip 20.1.1.100
[DeviceB-Vlan-interface101] quit
3. Configure Device C:
# Create Layer 2 dynamic aggregate interface Bridge-Aggregation 100.
<DeviceC> system-view
[DeviceC] interface bridge-aggregation 100
[DeviceC-Bridge-Aggregation100] link-aggregation mode dynamic
[DeviceC-Bridge-Aggregation100] quit
# Assign Twenty-FiveGigE 1/0/1 and Twenty-FiveGigE 1/0/2 to aggregation group 100.
[DeviceC] interface range twenty-fivegige 1/0/1 to twenty-fivegige 1/0/2
[DeviceC-if-range] port link-aggregation group 100
42
[DeviceC-if-range] quit
# Create VLAN 100.
[DeviceC] vlan 100
[DeviceC-vlan100] quit
# Set the link type of Bridge-Aggregation 100 to trunk, and assign it to VLAN 100.
[DeviceC] interface bridge-aggregation 100
[DeviceC-Bridge-Aggregation100] port link-type trunk
[DeviceC-Bridge-Aggregation100] port trunk permit vlan 100
[DeviceC-Bridge-Aggregation100] quit
# Set the link type of Twenty-FiveGigE 1/0/3 to trunk, and assign it to VLAN 100.
[DeviceC] interface twenty-fivegige 1/0/3
[DeviceC-Twenty-FiveGigE1/0/3] port link-type trunk
[DeviceC-Twenty-FiveGigE1/0/3] port trunk permit vlan 100
[DeviceC-Twenty-FiveGigE1/0/3] quit
# Create VLAN-interface 100, and assign it an IP address.
[DeviceC] interface vlan-interface 100
[DeviceC-vlan-interface100] ip address 10.1.1.3 24
[DeviceC-vlan-interface100] quit
# Configure OSPF.
[DeviceC] ospf
[DeviceC-ospf-1] import-route direct
[DeviceC-ospf-1] area 0
[DeviceC-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[DeviceC-ospf-1-area-0.0.0.0] quit
[DeviceC-ospf-1] quit
4. Configure Device D:
# Create Layer 2 dynamic aggregate interface Bridge-Aggregation 101.
<DeviceD> system-view
[DeviceD] interface bridge-aggregation 101
[DeviceD-Bridge-Aggregation101] link-aggregation mode dynamic
[DeviceD-Bridge-Aggregation101] quit
# Assign Twenty-FiveGigE 1/0/1 and Twenty-FiveGigE 1/0/2 to aggregation group 101.
[DeviceD] interface range twenty-fivegige 1/0/1 to twenty-fivegige 1/0/2
[DeviceD-if-range] port link-aggregation group 101
[DeviceD-if-range] quit
# Create VLAN 101.
[DeviceD] vlan 101
[DeviceD-vlan101] quit
# Set the link type of Bridge-Aggregation 101 to trunk, and assign it to VLAN 101.
[DeviceD] interface bridge-aggregation 101
[DeviceD-Bridge-Aggregation101] port link-type trunk
[DeviceD-Bridge-Aggregation101] port trunk permit vlan 101
[DeviceD-Bridge-Aggregation101] quit
# Set the link type of Twenty-FiveGigE 1/0/3 to trunk, and assign it to VLAN 101.
[DeviceD] interface twenty-fivegige 1/0/3
[DeviceD-Twenty-FiveGigE1/0/3] port link-type trunk
[DeviceD-Twenty-FiveGigE1/0/3] port trunk permit vlan 101
43
[DeviceD-Twenty-FiveGigE1/0/3] quit
# Create VLAN-interface 101, and assign it an IP address.
[DeviceD] interface vlan-interface 101
[DeviceD-vlan-interface101] ip address 20.1.1.3 24
[DeviceD-vlan-interface101] quit
# Configure OSPF.
[DeviceD] ospf
[DeviceD-ospf-1] import-route direct
[DeviceD-ospf-1] area 0
[DeviceD-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255
[DeviceD-ospf-1-area-0.0.0.0] quit
[DeviceD-ospf-1] quit
IPP: BAGG125
IPP state (cause): UP
Keepalive link state (cause): UP
DR interface information
DR interface DR group Local state (cause) Peer state Remaining down time(s)
BAGG100 1 UP UP -
BAGG101 2 UP UP -
[DeviceA] display drni verbose
Flags: A -- Home_Gateway, B -- Neighbor_Gateway, C -- Other_Gateway,
D -- IPP_Activity, E -- DRCP_Timeout, F -- Gateway_Sync,
G -- Port_Sync, H -- Expired
44
Local DRCP flags/Peer DRCP flags: ABDFG/ABDFG
Local Selected ports (index): WGE1/0/1 (258)
Peer Selected ports indexes: 258
# Verify that Device C and Device D have correctly set up aggregate links with the DR system.
[DeviceC] display link-aggregation verbose
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Port Status: S -- Selected, U -- Unselected, I -- Individual
Port: A -- Auto port, M -- Management port, R -- Reference port
Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
45
Aggregate Interface: Bridge-Aggregation101
Creation Mode: Manual
Aggregation Mode: Dynamic
Loadsharing Type: Shar
Management VLANs: None
System ID: 0x8000, a03b-0d51-0400
Local:
Port Status Priority Index Oper-Key Flag
WGE1/0/1 S 32768 1 1 {ACDEF}
WGE1/0/2 S 32768 2 1 {ACDEF}
Remote:
Actor Priority Index Oper-Key SystemID Flag
WGE1/0/1(R) 32768 16387 40002 0x7b , 0001-0001-0001 {ACDEF}
WGE1/0/2 32768 32771 40002 0x7b , 0001-0001-0001 {ACDEF}
# Verify that Device A is the master in VRRP group 1 and VRRP group 2.
[DeviceA] display vrrp
IPv4 Virtual Router Information:
Running mode : Standard
Total number of virtual routers : 2
Interface VRID State Running Adver Auth Virtual
Pri Timer Type IP
----------------------------------------------------------------------------
Vlan100 1 Master 200 100 None 10.1.1.100
Vlan101 2 Master 200 100 None 20.1.1.100
[DeviceB] display vrrp
IPv4 Virtual Router Information:
Running mode : Standard
Total number of virtual routers : 2
Interface VRID State Running Adver Auth Virtual
Pri Timer Type IP
----------------------------------------------------------------------------
Vlan100 1 Backup 100 100 None 10.1.1.100
Vlan101 2 Backup 100 100 None 20.1.1.100
# Verify that Device C and Device D have established OSPF neighbor relationships with Device A
and Device B.
[DeviceC] display ospf peer
Area: 0.0.0.0
Router ID Address Pri Dead-Time State Interface
20.1.1.1 10.1.1.1 1 37 Full/DR Vlan100
20.1.1.2 10.1.1.2 1 32 Full/BDR Vlan100
[DeviceD] display ospf peer
46
Area: 0.0.0.0
Router ID Address Pri Dead-Time State Interface
20.1.1.1 20.1.1.1 1 38 Full/DR Vlan101
20.1.1.2 20.1.1.2 1 37 Full/BDR Vlan101
# Verify that Host A and Host B can ping each other. (Details not shown.)
Network 1
HGE1/0/3
Device C
HGE1/0/1 HGE1/0/2
HGE1/0/6 HGE1/0/6
HGE1/0/5 HGE1/0/5
HGE1/0/4 HGE1/0/4
Device A Device B
HGE1/0/3 HGE1/0/3
HG
IPL
/2
1
HG
/
/0
/0
E1
BAGG 1
E1
E1
E1
/0
HG
HG
/2
/0
/1
BAGG 3
HGE1/0/1~HGE1/0/4
Device D
Server 1 Server 2
47
Device Interface IP address Peer device and interface
Device C: Vlan-int32
IPv4: 32.1.1.1/24
Vlan-int32 • IPv4: 32.1.1.2/24
IPv6: 32::1/64
• IPv6: 32::2/64
Device C: Vlan-int33
IPv4: 33.1.1.1/24
Vlan-int33 • IPv4: 33.1.1.2/24
IPv6: 33::1/64
• IPv6: 33::2/64
48
• IPv6: 33::1/64
Requirement analysis
To meet the network requirements, you must perform the following tasks:
• Create VLAN-interface 100 as an IPv4 and IPv6 gateway on Device A and DeviceB. Assign the
same IPv4 address, MAC address, IPv6 global unicast address, and IPv6 link-local address to
VLAN-interface 100 on Device A and Device B.
• Create VLAN-interface 101 on Device A and Device B for them to have Layer 3 connectivity to
each other. The VLAN interface configuration enables Device A and Device B to send traffic to
each other.
Restrictions and guidelines
In this example, all devices use default settings. If you use this example on a live network, make sure
the existing configuration on your devices does not conflict with the DRNI configuration in this
example.
Make sure each DR system uses a unique DR system MAC address.
Procedure
1. Configure Device A:
# Configure DR system settings.
<DeviceA> system-view
[DeviceA] drni system-mac 0002-0002-0002
[DeviceA] drni system-number 1
[DeviceA] drni system-priority 123
# Configure DR keepalive packet parameters.
[DeviceA] drni keepalive ip destination 21.1.1.2 source 21.1.1.1
# Set the link mode of HundredGigE 1/0/5 to Layer 3, and assign the interface IPv4 and IPv6
addresses. The IPv4 or IPv6 address will be used as the source IP address of keepalive
packets.
[DeviceA] interface hundredgige 1/0/5
[DeviceA-HundredGigE1/0/5] port link-mode route
[DeviceA-HundredGigE1/0/5] ip address 21.1.1.1 255.255.255.0
[DeviceA-HundredGigE1/0/5] ipv6 address 21::1 64
[DeviceA-HundredGigE1/0/5] quit
# Exclude the interface used for DR keepalive detection (HundredGigE 1/0/5) from the
shutdown action by DRNI MAD.
[DeviceA] drni mad exclude interface hundredgige 1/0/5
# Create Layer 2 dynamic aggregate interface Bridge-Aggregation 1.
[DeviceA] interface bridge-aggregation 1
[DeviceA-Bridge-Aggregation1] link-aggregation mode dynamic
[DeviceA-Bridge-Aggregation1] quit
# Assign HundredGigE 1/0/3 and HundredGigE 1/0/4 to aggregation group 1.
[DeviceA] interface hundredgige 1/0/3
49
[DeviceA-HundredGigE1/0/3] port link-aggregation group 1
[DeviceA-HundredGigE1/0/3] quit
[DeviceA] interface hundredgige 1/0/4
[DeviceA-HundredGigE1/0/4] port link-aggregation group 1
[DeviceA-HundredGigE1/0/4] quit
# Specify Bridge-Aggregation 1 as the IPP.
[DeviceA] interface bridge-aggregation 1
[DeviceA-Bridge-Aggregation1] port drni intra-portal-port 1
[DeviceA-Bridge-Aggregation1] undo port trunk permit vlan 1
[DeviceA-Bridge-Aggregation1] undo mac-address static source-check enable
[DeviceA-Bridge-Aggregation1] quit
# Create Layer 2 dynamic aggregate interface Bridge-Aggregation 3, and specify the interface
as DR interface 1.
[DeviceA] interface bridge-aggregation 3
[DeviceA-Bridge-Aggregation3] link-aggregation mode dynamic
[DeviceA-Bridge-Aggregation3] port drni group 1
[DeviceA-Bridge-Aggregation3] quit
# Assign HundredGigE 1/0/1 and HundredGigE 1/0/2 to aggregation group 3.
[DeviceA] interface hundredgige 1/0/1
[DeviceA-HundredGigE1/0/1] port link-aggregation group 3
[DeviceA-HundredGigE1/0/1] quit
[DeviceA] interface hundredgige 1/0/2
[DeviceA-HundredGigE1/0/2] port link-aggregation group 3
[DeviceA-HundredGigE1/0/2] quit
# Create VLANs 100 and 101.
[DeviceA] vlan 100
[DeviceA-vlan100] quit
[DeviceA] vlan 101
[DeviceA-vlan101] quit
# Configure Bridge-Aggregation 3 as a trunk port, and assign it to VLAN 100.
[DeviceA] interface bridge-aggregation 3
[DeviceA-Bridge-Aggregation3] port link-type trunk
[DeviceA-Bridge-Aggregation3] port trunk permit vlan 100
[DeviceA-Bridge-Aggregation3] undo port trunk permit vlan 1
[DeviceA-Bridge-Aggregation3] quit
# Create VLAN-interface 100 and assign it an IPv4 address and a MAC address for the
interface to act as an IPv4 gateway.
[DeviceA] interface vlan-interface 100
[DeviceA-Vlan-interface100] ip address 100.1.1.100 255.255.255.0
[DeviceA-Vlan-interface100] mac-address 0000-0010-0010
# Configure an IPv6 global unicast address and an IPv6 link-local address for VLAN-interface
100 to act as an IPv6 gateway.
[DeviceA] interface vlan-interface 100
[DeviceA-Vlan-interface100] ipv6 address 100::100 64
[DeviceA-Vlan-interface100] ipv6 address FE80::80 link-local
# Enable unsolicited NA learning. For ND entries to be synchronous on DR member devices,
enable this feature.
[DeviceA-Vlan-interface100] ipv6 nd unsolicited-na-learning enable
50
# Exclude VLAN-interface 100 from the shutdown action by DRNI MAD.
[DeviceA] drni mad exclude interface vlan-interface100
# Create VLAN-interface 101 and assign it an IPv4 address and an IPv6 address for Layer 3
communication between the DR member devices.
[DeviceA] interface vlan-interface 101
[DeviceA-Vlan-interface101] ip address 101.1.1.1 255.255.255.0
[DeviceA-Vlan-interface101] ipv6 address 101::1 64
[DeviceA-Vlan-interface101] quit
# Exclude VLAN-interface 101 from the shutdown action by DRNI MAD.
[DeviceA] drni mad exclude interface vlan-interface101
# Configure a global router ID.
[DeviceA] router id 3.3.3.3
# Enable an OSPF process on VLAN-interfaces 100 and 101, and disable VLAN-interface 100
from receiving and sending OSPF packets for the DR member devices to have IPv4
connectivity.
[DeviceA] ospf 1
[DeviceA-ospf-1] silent-interface vlan-interface 100
[DeviceA-ospf-1] import-route direct
[DeviceA-ospf-1] area 0
[DeviceA-ospf-1-area-0.0.0.0] quit
[DeviceA-ospf-1] quit
[DeviceA] interface vlan-interface 100
[DeviceA-Vlan-interface100] ospf 1 area 0.0.0.0
[DeviceA-Vlan-interface100] quit
[DeviceA] interface vlan-interface 101
[DeviceA-Vlan-interface101] ospf 1 area 0.0.0.0
[DeviceA-Vlan-interface101] quit
# Enable an OSPFv3 process on VLAN-interfaces 100 and 101, and disable VLAN-interface
100 from receiving and sending OSPFv3 packets for the DR member devices to have IPv6
connectivity.
[DeviceA] ospfv3 1
[DeviceA-ospfv3-1] silent-interface vlan-interface 100
[DeviceA-ospfv3-1] import-route direct
[DeviceA-ospfv3-1] area 0
[DeviceA-ospfv3-1-area-0.0.0.0] quit
[DeviceA-ospfv3-1] quit
[DeviceA] interface vlan-interface 100
[DeviceA-Vlan-interface100] ospfv3 1 area 0.0.0.0
[DeviceA-Vlan-interface100] quit
[DeviceA] interface vlan-interface 101
[DeviceA-Vlan-interface101] ospfv3 1 area 0.0.0.0
[DeviceA-Vlan-interface101] quit
# Create VLAN 32, and assign uplink HundredGigE 1/0/6 to VLAN 32.
[DeviceA] vlan 32
[DeviceA-vlan32] quit
[DeviceA] interface hundredgige 1/0/6
[DeviceA-HundredGigE1/0/6] port link-type trunk
[DeviceA-HundredGigE1/0/6] port trunk permit vlan 32
[DeviceA-HundredGigE1/0/6] undo port trunk permit vlan 1
51
[DeviceA-HundredGigE1/0/6] quit
# Create VLAN-interface 32 and assign it an IPv4 address and an IPv6 address.
[DeviceA] interface vlan-interface 32
[DeviceA-Vlan-interface32] ip address 32.1.1.1 255.255.255.0
[DeviceA-Vlan-interface32] ipv6 address 32::1 64
# Configure OSPF and OSPFv3 processes on VLAN-interface 32.
[DeviceA-Vlan-interface32] ospf 1 area 0
[DeviceA-Vlan-interface32] ospfv3 1 area 0
[DeviceA-Vlan-interface32] quit
2. Configure Device B:
# Configure DR system settings.
<DeviceB> system-view
[DeviceB] drni system-mac 0002-0002-0002
[DeviceB] drni system-number 2
[DeviceB] drni system-priority 123
# Configure DR keepalive packet parameters.
[DeviceB] drni keepalive ip destination 21.1.1.1 source 21.1.1.2
# Set the link mode of HundredGigE 1/0/5 to Layer 3, and assign the interface IPv4 and IPv6
addresses. The IPv4 or IPv6 address will be used as the source IP address of keepalive
packets.
[DeviceB] interface hundredgige 1/0/5
[DeviceB-HundredGigE1/0/5] port link-mode route
[DeviceB-HundredGigE1/0/5] ip address 21.1.1.2 255.255.255.0
[DeviceB-HundredGigE1/0/5] ipv6 address 21::2 64
[DeviceB-HundredGigE1/0/5] quit
# Exclude the interface used for DR keepalive detection (HundredGigE 1/0/5) from the
shutdown action by DRNI MAD.
[DeviceB] drni mad exclude interface hundredgige 1/0/5
# Create Layer 2 dynamic aggregate interface Bridge-Aggregation 1.
[DeviceB] interface bridge-aggregation 1
[DeviceB-Bridge-Aggregation1] link-aggregation mode dynamic
[DeviceB-Bridge-Aggregation1] quit
# Assign HundredGigE 1/0/3 and HundredGigE 1/0/4 to aggregation group 1.
[DeviceB] interface hundredgige 1/0/3
[DeviceB-HundredGigE1/0/3] port link-aggregation group 1
[DeviceB-HundredGigE1/0/3] quit
[DeviceB] interface hundredgige 1/0/4
[DeviceB-HundredGigE1/0/4] port link-aggregation group 1
[DeviceB-HundredGigE1/0/4] quit
# Specify Bridge-Aggregation 1 as the IPP.
[DeviceB] interface bridge-aggregation 1
[DeviceB-Bridge-Aggregation1] port drni intra-portal-port 1
[DeviceB-Bridge-Aggregation1] undo port trunk permit vlan 1
[DeviceB-Bridge-Aggregation1] undo mac-address static source-check enable
[DeviceB-Bridge-Aggregation1] quit
# Create Layer 2 dynamic aggregate interface Bridge-Aggregation 3, and specify the interface
as DR interface 1.
[DeviceB] interface bridge-aggregation 3
52
[DeviceB-Bridge-Aggregation3] link-aggregation mode dynamic
[DeviceB-Bridge-Aggregation3] port drni group 1
[DeviceB-Bridge-Aggregation3] quit
# Assign HundredGigE 1/0/1 and HundredGigE 1/0/2 to aggregation group 3.
[DeviceB] interface hundredgige 1/0/1
[DeviceB-HundredGigE1/0/1] port link-aggregation group 3
[DeviceB-HundredGigE1/0/1] quit
[DeviceB] interface hundredgige 1/0/2
[DeviceB-HundredGigE1/0/2] port link-aggregation group 3
[DeviceB-HundredGigE1/0/2] quit
# Create VLANs 100 and 101.
[DeviceB] vlan 100
[DeviceB-vlan100] quit
[DeviceB] vlan 101
[DeviceB-vlan101] quit
# Configure Bridge-Aggregation 3 as a trunk port, and assign it to VLAN 100.
[DeviceB] interface bridge-aggregation 3
[DeviceB-Bridge-Aggregation3] port link-type trunk
[DeviceB-Bridge-Aggregation3] port trunk permit vlan 100
[DeviceB-Bridge-Aggregation3] undo port trunk permit vlan 1
[DeviceB-Bridge-Aggregation3] quit
# Create VLAN-interface 100 and assign it an IPv4 address and a MAC address for the
interface to act as an IPv4 gateway.
[DeviceB] interface vlan-interface 100
[DeviceB-Vlan-interface100] ip address 100.1.1.100 255.255.255.0
[DeviceB-Vlan-interface100] mac-address 0000-0010-0010
# Configure an IPv6 global unicast address and an IPv6 link-local address for VLAN-interface
100 to act as an IPv6 gateway.
[DeviceB] interface vlan-interface 100
[DeviceB-Vlan-interface100] ipv6 address 100::100 64
[DeviceB-Vlan-interface100] ipv6 address FE80::80 link-local
# Enable unsolicited NA learning. For ND entries to be synchronous on DR member devices,
enable this feature.
[DeviceB-Vlan-interface100] ipv6 nd unsolicited-na-learning enable
# Exclude VLAN-interface 100 from the shutdown action by DRNI MAD.
[DeviceB] drni mad exclude interface vlan-interface100
# Create VLAN-interface 101 and assign it an IPv4 address and an IPv6 address for Layer 3
communication between the DR member devices.
[DeviceB] interface vlan-interface 101
[DeviceB-vlan-interface101] ip address 101.1.1.2 24
[DeviceB-vlan-interface101] ipv6 address 101::2 64
[DeviceB-vlan-interface101] quit
# Exclude VLAN-interface 101 from the shutdown action by DRNI MAD.
[DeviceB] drni mad exclude interface vlan-interface101
# Configure a global router ID.
[DeviceB] router id 4.4.4.4
53
# Enable an OSPF process on VLAN-interfaces 100 and 101, and disable VLAN-interface 100
from receiving and sending OSPF packets for the DR member devices to have IPv4
connectivity.
[DeviceB] ospf 1
[DeviceB-ospf-1] silent-interface vlan-interface100
[DeviceB-ospf-1] import-route direct
[DeviceB-ospf-1] area 0
[DeviceB-ospf-1-area-0.0.0.0] quit
[DeviceB-ospf-1] quit
[DeviceB] interface vlan-interface 100
[DeviceB-Vlan-interface100] ospf 1 area 0.0.0.0
[DeviceB-Vlan-interface100] quit
[DeviceB] interface vlan-interface 101
[DeviceB-Vlan-interface101] ospf 1 area 0.0.0.0
[DeviceB-Vlan-interface101] quit
# Enable an OSPFv3 process on VLAN-interfaces 100 and 101, and disable VLAN-interface
100 from receiving and sending OSPFv3 packets for the DR member devices to have IPv6
connectivity.
[DeviceB] ospfv3 1
[DeviceB-ospf-1] silent-interface vlan-interface100
[DeviceB-ospfv3-1] import-route direct
[DeviceB-ospfv3-1] area 0
[DeviceB-ospfv3-1-area-0.0.0.0] quit
[DeviceB-ospfv3-1] quit
[DeviceB] interface vlan-interface 100
[DeviceB-vlan-interface100] ospfv3 1 area 0
[DeviceB-vlan-interface100] quit
[DeviceB] interface vlan-interface 101
[DeviceB-vlan-interface101] ospfv3 1 area 0
[DeviceB-vlan-interface101] quit
# Create VLAN 33, and assign uplink HundredGigE 1/0/6 to VLAN 33.
[DeviceB] vlan 33
[DeviceB-vlan33] quit
[DeviceB] interface hundredgige 1/0/6
[DeviceB-HundredGigE1/0/6] port link-type trunk
[DeviceB-HundredGigE1/0/6] port trunk permit vlan 33
[DeviceB-HundredGigE1/0/6] undo port trunk permit vlan 1
[DeviceB-HundredGigE1/0/6] quit
# Create VLAN-interface 33 and assign it an IPv4 address and an IPv6 address.
[DeviceB] interface vlan-interface 33
[DeviceB-Vlan-interface33] ip address 33.1.1.1 255.255.255.0
[DeviceB-Vlan-interface33] ipv6 address 33::1 64
# Configure OSPF and OSPFv3 processes on VLAN-interface 33.
[DeviceB-Vlan-interface33] ospf 1 area 0
[DeviceB-Vlan-interface33] ospfv3 1 area 0
[DeviceB-Vlan-interface33] quit
3. Configure Device C:
# Create VLAN 32.
<DeviceC> system-view
54
[DeviceC] vlan 32
[DeviceC-vlan32] quit
# Assign interface HundredGigE 1/0/1 connected to Device A to VLAN 32.
[DeviceC] interface hundredgige 1/0/1
[DeviceC-HundredGigE1/0/1] port link-type trunk
[DeviceC-HundredGigE1/0/1] port trunk permit vlan 32
[DeviceC-HundredGigE1/0/1] undo port trunk permit vlan 1
[DeviceC-HundredGigE1/0/1] quit
# Create VLAN-interface 32 and assign it an IPv4 address and an IPv6 address.
[DeviceC] interface vlan-interface 32
[DeviceC-Vlan-interface32] ip address 32.1.1.2 24
[DeviceC-Vlan-interface32] ipv6 address 32::2 64
[DeviceC-Vlan-interface32] quit
# Create VLAN 33.
[DeviceC] vlan 33
[DeviceC-vlan33] quit
# Assign interface HundredGigE 1/0/2 connected to Device B to VLAN 33.
[DeviceC] interface hundredgige 1/0/2
[DeviceC-HundredGigE1/0/2] port link-type trunk
[DeviceC-HundredGigE1/0/2] port trunk permit vlan 33
[DeviceC-HundredGigE1/0/2] undo port trunk permit vlan 1
[DeviceC-HundredGigE1/0/2] quit
# Create VLAN-interface 33 and assign it an IPv4 address and an IPv6 address.
[DeviceC] interface vlan-interface 33
[DeviceC-Vlan-interface33] ip address 33.1.1.2 24
[DeviceC-Vlan-interface33] ipv6 address 33::2 64
[DeviceC-Vlan-interface33] quit
# Configure a global router ID.
[DeviceC] router id 5.5.5.5
# Enable an OSPF process on VLAN-interfaces 32 and 33.
[DeviceC] ospf 1
[DeviceC-ospf-1] import-route direct
[DeviceC-ospf-1] area 0
[DeviceC-ospf-1-area-0.0.0.0] quit
[DeviceC-ospf-1] quit
[DeviceC] interface vlan-interface 32
[DeviceC-Vlan-interface32] ospf 1 area 0
[DeviceC-Vlan-interface32] quit
[DeviceC] interface vlan-interface 33
[DeviceC-Vlan-interface33] ospf 1 area 0
[DeviceC-Vlan-interface33] quit
# Enable an OSPFv3 process on VLAN-interfaces 32 and 33.
[DeviceC] ospfv3 1
[DeviceC-ospfv3-1] import-route direct
[DeviceC-ospfv3-1] area 0
[DeviceC-ospfv3-1-area-0.0.0.0] quit
[DeviceC-ospfv3-1] quit
[DeviceC] interface vlan-interface 32
55
[DeviceC-Vlan-interface32] ospfv3 1 area 0
[DeviceC-Vlan-interface32] quit
[DeviceC] interface vlan-interface 33
[DeviceC-Vlan-interface33] ospfv3 1 area 0
[DeviceC-Vlan-interface33] quit
# Create VLAN 22.
[DeviceC] vlan 22
[DeviceC-vlan22] quit
# Assign interface HundredGigE 1/0/3 connected to Network 1 to VLAN 22.
[DeviceC] interface hundredgige 1/0/3
[DeviceC-HundredGigE1/0/3] port link-type trunk
[DeviceC-HundredGigE1/0/3] port trunk permit vlan 22
[DeviceC-HundredGigE1/0/3] undo port trunk permit vlan 1
[DeviceC-HundredGigE1/0/3] quit
# Create VLAN-interface 22 and assign it an IPv4 address and an IPv6 address.
[DeviceC] interface vlan-interface 22
[DeviceC-Vlan-interface22] ip address 22.1.1.1 24
[DeviceC-Vlan-interface22] ipv6 address 22::1 64
[DeviceC-Vlan-interface22] quit
4. Configure Device D:
# Create Layer 2 dynamic aggregate interface Bridge-Aggregation 3.
<DeviceD> system-view
[DeviceD] interface bridge-aggregation 3
[DeviceD-Bridge-Aggregation3] link-aggregation mode dynamic
[DeviceD-Bridge-Aggregation3] quit
# Assign HundredGigE 1/0/1 through HundredGigE 1/0/4 to aggregation group 3.
[DeviceD] interface range hundredgige 1/0/1 to hundredgige 1/0/4
[DeviceD-if-range] port link-aggregation group 3
[DeviceD-if-range] quit
# Create VLAN 100.
[DeviceD] vlan 100
[DeviceD-vlan100] quit
# Configure Bridge-Aggregation 3 as a trunk port, and assign it to VLAN 100.
[DeviceD] interface bridge-aggregation 3
[DeviceD-Bridge-Aggregation3] port link-type trunk
[DeviceD-Bridge-Aggregation3] port trunk permit vlan 100
[DeviceD-Bridge-Aggregation3] undo port trunk permit vlan 1
[DeviceD-Bridge-Aggregation3] quit
IPP: BAGG1
IPP state (cause): UP
56
Keepalive link state (cause): UP
DR interface information
DR interface DR group Local state (cause) Peer state Remaining down time (s)
BAGG3 1 UP UP -
# Verify that the keepalive link is working correctly on Device A.
[DeviceA] display drni keepalive
Neighbor keepalive link status: Up
Neighbor is alive for: 64765 s 28 ms
Keepalive packet transmission status:
Sent: Successful
Received: Successful
Last received keepalive packet information:
Source IP address: 21.1.1.2
Time: 2021/01/17 17:10:52
Action: Accept
57
Local DRCP flags/Peer DRCP flags: ABDFG/ABDFG
Local Selected ports (index): HGE1/0/1 (12), HGE1/0/2 (13)
Peer Selected ports indexes: 56, 57
2. Verify that routing protocols operate correctly:
# Display OSPF neighbors on Device A to verify the neighbor relationship between Device A
and Device B, as well as Device A and Device C.
[DeviceA] display ospf peer
Area: 0.0.0.0
Router ID Address Pri Dead-Time State Interface
4.4.4.4 101.1.1.2 1 36 Full/DR Vlan101
5.5.5.5 32.1.1.2 1 38 Full/DR Vlan32
# Display OSPFv3 neighbors on Device A to verify the neighbor relationship between Device A
and Device B, as well as Device A and Device C.
[DeviceA] display ospf peer
Area: 0.0.0.0
Router ID Address Pri Dead-Time State Interface
4.4.4.4 101.1.1.2 1 36 Full/DR Vlan101
5.5.5.5 32.1.1.2 1 38 Full/DR Vlan32
# Display OSPF neighbors on Device B to verify the neighbor relationship between Device B
and Device A, as well as Device B and Device C.
[DeviceB] display ospf peer
Area: 0.0.0.0
Router ID Address Pri Dead-Time State Interface
3.3.3.3 101.1.1.1 1 32 Full/BDR Vlan101
5.5.5.5 33.1.1.2 1 33 Full/DR Vlan33
# Display OSPFv3 neighbors on Device B to verify the neighbor relationship between Device B
and Device A, as well as Device B and Device C.
[DeviceB] display ospfv3 peer
Area: 0.0.0.0
-------------------------------------------------------------------------
Router ID Pri State Dead-Time InstID Interface
3.3.3.3 1 Full/BDR 00:00:35 0 Vlan101
5.5.5.5 1 Full/DR 00:00:38 0 Vlan33
58
# Display OSPF neighbors on Device C to verify the neighbor relationship between Device C
and Device A, as well as Device C and Device B.
[DeviceC] display ospf peer
Area: 0.0.0.0
Router ID Address Pri Dead-Time State Interface
3.3.3.3 32.1.1.1 1 32 Full/DR Vlan32
4.4.4.4 33.1.1.1 1 38 Full/DR Vlan33
# Display OSPFv3 neighbors on Device B to verify the neighbor relationship between Device C
and Device A, as well as Device C and Device B.
[DeviceC] display ospfv3 peer
Area: 0.0.0.0
-------------------------------------------------------------------------
Router ID Pri State Dead-Time InstID Interface
3.3.3.3 1 Full/DR 00:00:37 0 Vlan32
4.4.4.4 1 Full/DR 00:00:34 0 Vlan33
3. Verify that Server 1 and Server 2 can communicate with Network 1 through IPv4 and IPv6
packets.
4. Verify that Server 1 and Server 2 can communicate Network 1 in the following conditions:
The uplink interface on Device A or Device B fails.
The uplink interface of Device A is down. In the traffic switchover process, transient packet
loss might occur.
59
Contents
Configuring port isolation ··············································································· 1
About port isolation ············································································································································ 1
Assigning a port to an isolation group ················································································································ 1
Display and maintenance commands for port isolation ····················································································· 1
Port isolation configuration examples ················································································································ 2
Example: Configuring port isolation ··········································································································· 2
i
Configuring port isolation
About port isolation
The port isolation feature isolates Layer 2 traffic for data privacy and security without using VLANs.
Ports in an isolation group cannot communicate with each other. However, they can communicate
with ports outside the isolation group.
1
Task Command
Internet
WGE1/0/4
Device
WGE1/0/1 WGE1/0/3
WGE1/0/2
Procedure
# Create isolation group 2.
<Device> system-view
[Device] port-isolate group 2
2
[Device-Twenty-FiveGigE1/0/3] quit
The output shows that Twenty-FiveGigE 1/0/1, Twenty-FiveGigE 1/0/2, and Twenty-FiveGigE 1/0/3
are assigned to isolation group 2. As a result, Host A, Host B, and Host C are isolated from one
another at layer 2.
3
Contents
Configuring VLANs ························································································ 1
About VLANs······················································································································································ 1
VLAN frame encapsulation ························································································································ 1
VLAN types ················································································································································ 2
Port-based VLANs ····································································································································· 2
MAC-based VLANs ···································································································································· 3
IP subnet-based VLANs ····························································································································· 5
Protocol-based VLANs ······························································································································· 6
Layer 3 communication between VLANs ··································································································· 6
Protocols and standards ···························································································································· 6
Configuring a VLAN ··········································································································································· 6
Restrictions and guidelines ························································································································ 6
VLAN configuration tasks at a glance ········································································································ 6
Creating VLANs ········································································································································· 6
Enabling packet dropping in the VLAN ······································································································ 7
Configuring port-based VLANs ·························································································································· 7
Restrictions and guidelines for port-based VLANs····················································································· 7
Assigning an access port to a VLAN ·········································································································· 7
Assigning a trunk port to a VLAN ··············································································································· 8
Assigning a hybrid port to a VLAN ············································································································· 9
Configuring MAC-based VLANs ························································································································ 9
Restrictions and guidelines for MAC-based VLANs ··················································································· 9
Configuring static MAC-based VLAN assignment···················································································· 10
Configuring dynamic MAC-based VLAN assignment··············································································· 10
Configuring server-assigned MAC-based VLAN ······················································································ 12
Configuring IP subnet-based VLANs ··············································································································· 12
Configuring protocol-based VLANs ·················································································································· 13
Configuring a VLAN group ······························································································································· 14
Configuring VLAN interfaces ···························································································································· 14
Restrictions and guidelines ······················································································································ 14
VLAN interfaces configuration tasks at a glance······················································································ 14
Prerequisites ············································································································································ 15
Creating a VLAN interface ······················································································································· 15
Specifying a traffic processing slot for the VLAN interface ······································································ 15
Restoring the default settings for the VLAN interface ·············································································· 16
Display and maintenance commands for VLANs ····························································································· 16
VLAN configuration examples ·························································································································· 17
Example: Configuring port-based VLANs ································································································ 17
Example: Configuring MAC-based VLANs······························································································· 18
Example: Configuring IP subnet-based VLANs ······················································································· 20
Example: Configuring protocol-based VLANs ·························································································· 22
Configuring super VLANs ············································································ 26
About super VLANs·········································································································································· 26
Restrictions and guidelines: Super VLAN configuration··················································································· 26
Super VLAN tasks at a glance ························································································································· 26
Creating a sub-VLAN ······································································································································· 26
Configuring a super VLAN ······························································································································· 27
Configuring a super VLAN interface················································································································· 27
Display and maintenance commands for super VLANs ··················································································· 28
Super VLAN configuration examples ··············································································································· 28
Example: Configuring a super VLAN ······································································································· 28
Configuring private VLAN ············································································ 31
About private VLAN·········································································································································· 31
Restrictions and guidelines: Private VLAN configuration ················································································· 32
Private VLAN tasks at a glance ······················································································································· 32
i
Creating a primary VLAN ································································································································· 32
Creating secondary VLANs ······························································································································ 32
Associating the primary VLAN with secondary VLANs ···················································································· 33
Configuring the uplink port ······························································································································· 33
Configuring a downlink port······························································································································ 33
Configuring Layer 3 communication for secondary VLANs ············································································· 34
Display and maintenance commands for the private VLAN ············································································· 35
Private VLAN configuration examples ············································································································· 35
Example: Configuring promiscuous ports ································································································ 35
Example: Configuring trunk promiscuous ports ······················································································· 38
Example: Configuring trunk promiscuous and trunk secondary ports ······················································ 41
Example: Configuring Layer 3 communication for secondary VLANs······················································ 45
Configuring voice VLANs ············································································· 48
About voice VLANs ·········································································································································· 48
Working mechanism································································································································· 48
Methods of identifying IP phones ············································································································· 48
Advertising the voice VLAN information to IP phones·············································································· 49
IP phone access methods ························································································································ 49
Voice VLAN assignment modes··············································································································· 50
Cooperation of voice VLAN assignment modes and IP phones ······························································ 51
Security mode and normal mode of voice VLANs···················································································· 52
Restrictions and guidelines: Voice VLAN configuration ··················································································· 52
Voice VLAN tasks at a glance ·························································································································· 53
Configuring the QoS priority settings for voice traffic ······················································································· 53
Configuring voice VLAN assignment modes for a port ···················································································· 54
Configuring a port to operate in automatic voice VLAN assignment mode ·············································· 54
Configuring a port to operate in manual voice VLAN assignment mode·················································· 55
Enabling LLDP for automatic IP phone discovery ···························································································· 56
Configuring LLDP or CDP to advertise a voice VLAN ····················································································· 56
Configuring LLDP to advertise a voice VLAN ·························································································· 56
Configuring CDP to advertise a voice VLAN ···························································································· 57
Display and maintenance commands for voice VLANs ··················································································· 57
Voice VLAN configuration examples ················································································································ 58
Example: Configuring automatic voice VLAN assignment mode ····························································· 58
Example: Configuring manual voice VLAN assignment mode ································································· 60
ii
Configuring VLANs
About VLANs
The Virtual Local Area Network (VLAN) technology divides a physical LAN into multiple logical LANs.
It has the following benefits:
• Security—Hosts in the same VLAN can communicate with one another at Layer 2, but they are
isolated from hosts in other VLANs at Layer 2.
• Broadcast traffic isolation—Each VLAN is a broadcast domain that limits the transmission of
broadcast packets.
• Flexibility—A VLAN can be logically divided on a workgroup basis. Hosts in the same
workgroup can be assigned to the same VLAN, regardless of their physical locations.
1
VLAN types
The following VLAN types are available:
• Port-based VLAN.
• MAC-based VLAN.
• IP subnet-based VLAN.
• Protocol-based VLAN.
If all these types of VLANs are configured on a port, the port processes packets in the following
descending order of priority by default:
• MAC-based VLAN.
• IP subnet-based VLAN.
• Protocol-based VLAN.
• Port-based VLAN.
Port-based VLANs
Port-based VLANs group VLAN members by port. A port forwards packets from a VLAN only after it
is assigned to the VLAN.
Port link type
You can set the link type of a port to access, trunk, or hybrid. The port link type determines whether
the port can be assigned to multiple VLANs. The link types use the following VLAN tag handling
methods:
• Access—An access port can forward packets only from one VLAN and send these packets
untagged. An access port is typically used in the following conditions:
Connecting to a terminal device that does not support VLAN packets.
In scenarios that do not distinguish VLANs.
• Trunk—A trunk port can forward packets from multiple VLANs. Except packets from the port
VLAN ID (PVID), packets sent out of a trunk port are VLAN-tagged. Ports connecting network
devices are typically configured as trunk ports.
• Hybrid—A hybrid port can forward packets from multiple VLANs. The tagging status of the
packets forwarded by a hybrid port depends on the port configuration. In one-to-two VLAN
mapping, hybrid ports are used to remove SVLAN tags for downlink traffic. For more
information about one-to-two VLAN mapping, see "Configuring VLAN mapping."
PVID
The PVID identifies the default VLAN of a port. Untagged packets received on a port are considered
as the packets from the port PVID.
An access port can join only one VLAN. The VLAN to which the access port belongs is the PVID of
the port. A trunk or hybrid port supports multiple VLANs and the PVID configuration.
How ports of different link types handle frames
In the inbound • If the PVID is permitted on the port, tags the frame with
Tags the frame with the the PVID tag.
direction for an
PVID tag.
untagged frame • If not, drops the frame.
In the inbound • Receives the • Receives the frame if its VLAN is permitted on the port.
direction for a frame if its VLAN
• Drops the frame if its VLAN is not permitted on the port.
tagged frame ID is the same as
2
Actions Access Trunk Hybrid
the PVID.
• Drops the frame if
its VLAN ID is
different from the
PVID.
• Removes the tag
and sends the frame
if the frame carries
the PVID tag and the Sends the frame if its VLAN is
port belongs to the permitted on the port. The
In the outbound Removes the VLAN tag PVID. tagging status of the frame
direction and sends the frame. • Sends the frame depends on the port
without removing the hybrid vlan command
tag if its VLAN is configuration.
carried on the port
but is different from
the PVID.
MAC-based VLANs
The MAC-based VLAN feature assigns hosts to a VLAN based on their MAC addresses. This feature
is also called user-based VLAN because VLAN configuration remains the same regardless of a
user's physical location.
Static MAC-based VLAN assignment
Use static MAC-based VLAN assignment in networks that have a small number of VLAN users. To
configure static MAC-based VLAN assignment on a port, perform the following tasks:
1. Create MAC-to-VLAN entries.
2. Enable the MAC-based VLAN feature on the port.
3. Assign the port to the MAC-based VLAN.
A port configured with static MAC-based VLAN assignment processes a received frame as follows
before sending the frame out:
• For an untagged frame, the port determines its VLAN ID in the following workflow:
a. The port first performs a fuzzy match as follows:
− Searches for the MAC-to-VLAN entries whose masks are not all Fs.
− Performs a logical AND operation on the source MAC address and each of these
masks.
If an AND operation result matches the MAC address in a MAC-to-VLAN entry, the port
tags the frame with the VLAN ID specific to this entry.
b. If the fuzzy match fails, the port performs an exact match. It searches for MAC-to-VLAN
entries whose masks are all Fs. If the source MAC address of the frame exactly matches the
MAC address of a MAC-to-VLAN entry, the port tags the frame with the VLAN ID specific to
this entry.
c. If no matching VLAN ID is found, the port determines the VLAN for the packet by using the
following matching order:
− IP subnet-based VLAN.
− Protocol-based VLAN.
− Port-based VLAN.
When a match is found, the port tags the packet with the matching VLAN ID.
3
• For a tagged frame, the port determines whether the VLAN ID of the frame is permitted on the
port.
If the VLAN ID of the frame is permitted on the port, the port forwards the frame.
If the VLAN ID of the frame is not permitted on the port, the port drops the frame.
Dynamic MAC-based VLAN assignment
When you cannot determine the target MAC-based VLANs of a port, use dynamic MAC-based VLAN
assignment on the port. To use dynamic MAC-based VLAN assignment, perform the following tasks:
1. Create MAC-to-VLAN entries.
2. Enable the MAC-based VLAN feature on the port.
3. Enable dynamic MAC-based VLAN assignment on the port.
Dynamic MAC-based VLAN assignment uses the following workflow, as shown in Figure 2:
1. When a port receives a frame, it first determines whether the frame is tagged.
If the frame is tagged, the port gets the source MAC address of the frame.
If the frame is untagged, the port selects a VLAN for the frame by using the following
matching order:
− MAC-based VLAN (fuzzy and exact MAC address match).
− IP subnet-based VLAN.
− Protocol-based VLAN.
− Port-based VLAN.
After tagging the frame with the selected VLAN, the port gets the source MAC address of
the frame.
2. The port uses the source MAC address and VLAN of the frame to match the MAC-to VLAN
entries.
If the source MAC address of the frame exactly matches the MAC address in a
MAC-to-VLAN entry, the port checks whether the VLAN ID of the frame matches the VLAN
in the entry.
− If the two VLAN IDs match, the port joins the VLAN and forwards the frame.
− If the two VLAN IDs do not match, the port drops the frame.
If the source MAC address of the frame does not exactly match any MAC addresses in
MAC-to-VLAN entries, the port checks whether the VLAN ID of the frame is its PVID.
− If the VLAN ID of the frame is the PVID of the port, the port determines whether it allows
the PVID.
If the PVID is allowed, the port forwards the frame within the PVID. If the PVID is not
allowed, the port drops the frame.
− If the VLAN ID of the frame is not the PVID of the port, the port determines whether the
VLAN ID is the primary VLAN ID and the port PVID is a secondary VLAN ID. If yes, the
port forwards the frame. Otherwise, the port drops the frame.
4
Figure 2 Flowchart for processing a frame in dynamic MAC-based VLAN assignment
The port receives a
frame
No
Tagged frame ?
Yes
No VLAN IDs No
PVID allowed? Drops the frame
match?
Yes Yes
IP subnet-based VLANs
The IP subnet-based VLAN feature assigns untagged packets to VLANs based on their source IP
addresses and subnet masks.
Use this feature when untagged packets from an IP subnet or IP address must be transmitted in a
VLAN.
5
Protocol-based VLANs
The protocol-based VLAN feature assigns inbound packets to different VLANs based on their
protocol types and encapsulation formats. The protocols available for VLAN assignment include IP,
IPX, and AT. The encapsulation formats include Ethernet II, 802.3 raw, 802.2 LLC, and 802.2 SNAP.
This feature associates the available network service types with VLANs and facilitates network
management and maintenance.
Configuring a VLAN
Restrictions and guidelines
• As the system default VLAN, VLAN 1 cannot be created or deleted.
• Before you delete a dynamic VLAN or a VLAN locked by an application, you must first remove
the configuration from the VLAN.
Creating VLANs
1. Enter system view.
system-view
2. Create one or multiple VLANs.
Create a VLAN and enter its view.
vlan vlan-id
Create multiple VLANs and enter VLAN view.
Create VLANs.
vlan { vlan-id-list | all }
Enter VLAN view.
vlan vlan-id
By default, only the system default VLAN (VLAN 1) exists.
6
3. (Optional.) Set a name for the VLAN.
name text
By default, the name of a VLAN is VLAN vlan-id. The vlan-id argument specifies the VLAN ID in
a four-digit format. If the VLAN ID has fewer than four digits, leading zeros are added. For
example, the name of VLAN 100 is VLAN 0100.
4. (Optional.) Configure the description for the VLAN.
description text
By default, the description of a VLAN is VLAN vlan-id. The vlan-id argument specifies the VLAN
ID in a four-digit format. If the VLAN ID has fewer than four digits, leading zeros are added. For
example, the default description of VLAN 100 is VLAN 0100.
7
Assigning one or multiple access ports to a VLAN in VLAN view
1. Enter system view.
system-view
2. Enter VLAN view.
vlan vlan-id
3. Assign one or multiple access ports to the VLAN.
port interface-list
By default, all ports belong to VLAN 1.
Assigning an access port to a VLAN in interface view
1. Enter system view.
system-view
2. Enter interface view.
Enter Layer 2 Ethernet interface view.
interface interface-type interface-number
Enter Layer 2 aggregate interface view.
interface bridge-aggregation interface-number
3. Set the port link type to access.
port link-type access
By default, all ports are access ports.
4. Assign the access port to a VLAN.
port access vlan vlan-id
By default, all access ports belong to VLAN 1.
8
port trunk permit vlan { vlan-id-list | all }
By default, a trunk port permits only VLAN 1.
5. (Optional.) Set the PVID for the trunk port.
port trunk pvid vlan vlan-id
The default setting is VLAN 1.
9
Configuring static MAC-based VLAN assignment
1. Enter system view.
system-view
2. Create a MAC-to-VLAN entry.
mac-vlan mac-address mac-address [ mask mac-mask ] vlan vlan-id [ dot1p
priority ]
By default, no MAC-to-VLAN entries exist.
3. Enter Layer 2 Ethernet interface view.
interface interface-type interface-number
4. Set the port link type to hybrid.
port link-type hybrid
By default, all ports are access ports.
5. Assign the hybrid port to the MAC-based VLANs.
port hybrid vlan vlan-id-list { tagged | untagged }
By default, a hybrid port is an untagged member of the VLAN to which the port belongs when its
link type is access.
6. Enable the MAC-based VLAN feature.
mac-vlan enable
By default, this feature is disabled.
7. (Optional.) Configure the system to assign VLANs based on the MAC address preferentially.
vlan precedence mac-vlan
By default, the system assigns VLANs based on the MAC address preferentially when both the
MAC-based VLAN and IP subnet-based VLAN are configured on a port.
10
forwards only packets exactly matching the MAC-to-VLAN entries and drops inexactly matching
packets.
• As a best practice, do not configure both dynamic MAC-based VLAN assignment and the MAC
learning limit on a port.
If the two features are configured together on a port and the port learns the configured
maximum number of MAC address entries, the port processes packets as follows:
Forwards only packets matching the MAC address entries learnt by the port.
Drops unmatching packets.
• As a best practice, do not use dynamic MAC-based VLAN assignment with MSTP. In MSTP
mode, if a port is blocked in the MSTI of its target VLAN, the port drops the received packets
instead of delivering them to the CPU. As a result, the port will not be dynamically assigned to
the target VLAN.
• As a best practice, do not use dynamic MAC-based VLAN assignment with PVST. In PVST
mode, if the target VLAN of a port is not permitted on the port, the port is placed in blocked state.
The port drops the received packets instead of delivering them to the CPU. As a result, the port
will not be dynamically assigned to the target VLAN.
• As a best practice, do not configure both dynamic MAC-based VLAN assignment and automatic
voice VLAN assignment mode on a port. They can have a negative impact on each other.
Procedure
1. Enter system view.
system-view
2. Create a MAC-to-VLAN entry.
mac-vlan mac-address mac-address vlan vlan-id [ dot1p priority ]
By default, no MAC-to-VLAN entries exist.
3. Enter Layer 2 Ethernet interface view.
interface interface-type interface-number
4. Set the port link type to hybrid.
port link-type hybrid
By default, all ports are access ports.
5. Enable the MAC-based VLAN feature.
mac-vlan enable
By default, MAC-based VLAN is disabled.
6. Enable dynamic MAC-based VLAN assignment.
mac-vlan trigger enable
By default, dynamic MAC-based VLAN assignment is disabled.
The VLAN assignment for a port is triggered only when the source MAC address of its receiving
packet exactly matches the MAC address in a MAC-to-VLAN entry.
7. (Optional.) Configure the system to assign VLANs based on the MAC address preferentially.
vlan precedence mac-vlan
By default, the system assigns VLANs based on the MAC address preferentially when both the
MAC-based VLAN and IP subnet-based VLAN are configured on a port.
8. (Optional.) Disable the port from forwarding packets that fail the exact MAC address match in its
PVID.
port pvid forbidden
By default, when a port receives packets whose source MAC addresses fail the exact match,
the port forwards them in its PVID.
11
Configuring server-assigned MAC-based VLAN
1. Enter system view.
system-view
2. Enter Layer 2 Ethernet interface view.
interface interface-type interface-number
3. Set the port link type to hybrid.
port link-type hybrid
By default, all ports are access ports.
4. Assign the hybrid port to the MAC-based VLANs.
port hybrid vlan vlan-id-list { tagged | untagged }
By default, a hybrid port is an untagged member of the VLAN to which the port belongs when its
link type is access.
5. Enable the MAC-based VLAN feature.
mac-vlan enable
By default, MAC-based VLAN is disabled.
6. Configure 802.1X or MAC authentication.
For more information, see Security Command Reference.
12
port hybrid vlan vlan-id-list { tagged | untagged }
By default, a hybrid port is an untagged member of the VLAN to which the port belongs when its
link type is access.
8. Associate the hybrid port with the specified IP subnet-based VLAN.
port hybrid ip-subnet-vlan vlan vlan-id
By default, a hybrid port is not associated with a subnet-based VLAN.
13
7. Assign the hybrid port to the specified protocol-based VLANs.
port hybrid vlan vlan-id-list { tagged | untagged }
By default, a hybrid port is an untagged member of the VLAN to which the port belongs when its
link type is access.
8. Associate the hybrid port with the specified protocol-based VLAN.
port hybrid protocol-vlan vlan vlan-id { protocol-index [ to
protocol-end ] | all }
By default, a hybrid port is not associated with a protocol-based VLAN.
14
3. (Optional.) Restoring the default settings for the VLAN interface
Prerequisites
Before you create a VLAN interface for a VLAN, create the VLAN first.
15
Restoring the default settings for the VLAN interface
Restrictions and guidelines
CAUTION:
This feature might interrupt ongoing network services. Make sure you are fully aware of the impact of
this feature when you use it on a live network.
This feature might fail to restore the default settings for some commands for reasons such as
command dependencies or 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
restore their default settings. If your restoration attempt still fails, follow the error message
instructions to resolve the problem.
Procedure
1. Enter system view.
system-view
2. Enter a VLAN interface view.
interface vlan-interface interface-number
3. Restore the default settings for the VLAN interface.
default
Task Command
16
Task Command
Procedure
1. Configure Device A:
# Create VLAN 100, and assign Twenty-FiveGigE 1/0/1 to VLAN 100.
<DeviceA> system-view
[DeviceA] vlan 100
[DeviceA-vlan100] port twenty-fivegige 1/0/1
[DeviceA-vlan100] quit
# Create VLAN 200, and assign Twenty-FiveGigE 1/0/2 to VLAN 200.
[DeviceA] vlan 200
[DeviceA-vlan200] port twenty-fivegige 1/0/2
[DeviceA-vlan200] quit
# Configure Twenty-FiveGigE 1/0/3 as a trunk port, and assign the port to VLANs 100 and 200.
[DeviceA] interface twenty-fivegige 1/0/3
[DeviceA-Twenty-FiveGigE1/0/3] port link-type trunk
[DeviceA-Twenty-FiveGigE1/0/3] port trunk permit vlan 100 200
17
Please wait... Done.
2. Configure Device B in the same way Device A is configured. (Details not shown.)
3. Configure hosts:
a. Configure Host A and Host C to be on the same IP subnet. For example, 192.168.100.0/24.
b. Configure Host B and Host D to be on the same IP subnet. For example, 192.168.200.0/24.
Verifying the configuration
# Verify that Host A and Host C can ping each other, but they both fail to ping Host B and Host D.
(Details not shown.)
# Verify that Host B and Host D can ping each other, but they both fail to ping Host A and Host C.
(Details not shown.)
# Verify that VLANs 100 and 200 are correctly configured on Device A.
[DeviceA-Twenty-FiveGigE1/0/3] display vlan 100
VLAN ID: 100
VLAN type: Static
Route interface: Not configured
Description: VLAN 0100
Name: VLAN 0100
Tagged ports:
Twenty-FiveGigE1/0/3
Untagged ports:
Twenty-FiveGigE1/0/1
[DeviceA-Twenty-FiveGigE1/0/3] display vlan 200
VLAN ID: 200
VLAN type: Static
Route interface: Not configured
Description: VLAN 0200
Name: VLAN 0200
Tagged ports:
Twenty-FiveGigE1/0/3
Untagged ports:
Twenty-FiveGigE1/0/2
18
Figure 4 Network diagram
VLAN 100 VLAN 200
Server1 Server2
IP: 1.1.1.1/24 IP: 1.1.2.1/24
WGE1/0/3 WGE1/0/4
WGE1/0/1 WGE1/0/2
Device B
WGE1/0/2 WGE1/0/2
Device A Device C
WGE1/0/1 WGE1/0/1
Laptop1 Laptop2
IP: 1.1.1.2/24 IP: 1.1.2.2/24
MAC: 000d-88f8-4e71 MAC: 0014-222c-aa69
Procedure
1. Configure Device A:
# Create VLANs 100 and 200.
<DeviceA> system-view
[DeviceA] vlan 100
[DeviceA-vlan100] quit
[DeviceA] vlan 200
[DeviceA-vlan200] quit
# Associate the MAC addresses of Laptop 1 and Laptop 2 with VLANs 100 and 200,
respectively.
[DeviceA] mac-vlan mac-address 000d-88f8-4e71 vlan 100
[DeviceA] mac-vlan mac-address 0014-222c-aa69 vlan 200
# Configure Twenty-FiveGigE 1/0/1 as a hybrid port, and assign it to VLANs 100 and 200 as an
untagged VLAN member.
[DeviceA] interface twenty-fivegige 1/0/1
[DeviceA-Twenty-FiveGigE1/0/1] port link-type hybrid
[DeviceA-Twenty-FiveGigE1/0/1] port hybrid vlan 100 200 untagged
# Enable the MAC-based VLAN feature on Twenty-FiveGigE 1/0/1.
[DeviceA-Twenty-FiveGigE1/0/1] mac-vlan enable
[DeviceA-Twenty-FiveGigE1/0/1] quit
# Configure the uplink port (Twenty-FiveGigE 1/0/2) as a trunk port, and assign it to VLANs 100
and 200.
[DeviceA] interface twenty-fivegige 1/0/2
[DeviceA-Twenty-FiveGigE1/0/2] port link-type trunk
[DeviceA-Twenty-FiveGigE1/0/2] port trunk permit vlan 100 200
[DeviceA-Twenty-FiveGigE1/0/2] quit
2. Configure Device B:
19
# Create VLAN 100, and assign Twenty-FiveGigE 1/0/3 to VLAN 100.
<DeviceB> system-view
[DeviceB] vlan 100
[DeviceB-vlan100] port twenty-fivegige 1/0/3
[DeviceB-vlan100] quit
# Create VLAN 200 and assign Twenty-FiveGigE 1/0/4 to VLAN 200.
[DeviceB] vlan 200
[DeviceB-vlan200] port twenty-fivegige 1/0/4
[DeviceB-vlan200] quit
# Configure Twenty-FiveGigE 1/0/1 as a trunk port, and assign the port to VLANs 100 and 200.
[DeviceB] interface twenty-fivegige 1/0/1
[DeviceB-Twenty-FiveGigE1/0/1] port link-type trunk
[DeviceB-Twenty-FiveGigE1/0/1] port trunk permit vlan 100 200
[DeviceB-Twenty-FiveGigE1/0/1] quit
# Configure Twenty-FiveGigE 1/0/2 as a trunk port, and assign the port to VLANs 100 and 200.
[DeviceB] interface twenty-fivegige 1/0/2
[DeviceB-Twenty-FiveGigE1/0/2] port link-type trunk
[DeviceB-Twenty-FiveGigE1/0/2] port trunk permit vlan 100 200
[DeviceB-Twenty-FiveGigE1/0/2] quit
3. Configure Device C in the same way as the Device A is configured. (Details not shown.)
Verifying the configuration
# Verify that Laptop 1 can access only Server 1, and Laptop 2 can access only Server 2. (Details not
shown.)
# Verify the MAC-to-VLAN entries on Device A and Device C, for example, on Device A.
[DeviceA] display mac-vlan all
The following MAC VLAN addresses exist:
S:Static D:Dynamic
MAC address Mask VLAN ID Dot1p State
000d-88f8-4e71 ffff-ffff-ffff 100 0 S
0014-222c-aa69 ffff-ffff-ffff 200 0 S
20
Figure 5 Network diagram
Device A Device B
WGE1/0/2 WGE1/0/3
Device C
WGE1/0/1
192.168.5.0/24 192.168.50.0/24
Office
Procedure
1. Configure Device C:
# Associate IP subnet 192.168.5.0/24 with VLAN 100.
<DeviceC> system-view
[DeviceC] vlan 100
[DeviceC-vlan100] ip-subnet-vlan ip 192.168.5.0 255.255.255.0
[DeviceC-vlan100] quit
# Associate IP subnet 192.168.50.0/24 with VLAN 200.
[DeviceC] vlan 200
[DeviceC-vlan200] ip-subnet-vlan ip 192.168.50.0 255.255.255.0
[DeviceC-vlan200] quit
# Configure Twenty-FiveGigE 1/0/2 as a hybrid port, and assign it to VLAN 100 as a tagged
VLAN member.
[DeviceC] interface twenty-fivegige 1/0/2
[DeviceC-Twenty-FiveGigE1/0/2] port link-type hybrid
[DeviceC-Twenty-FiveGigE1/0/2] port hybrid vlan 100 tagged
[DeviceC-Twenty-FiveGigE1/0/2] quit
# Configure Twenty-FiveGigE 1/0/3 as a hybrid port, and assign it to VLAN 200 as a tagged
VLAN member.
[DeviceC] interface twenty-fivegige 1/0/3
[DeviceC-Twenty-FiveGigE1/0/3] port link-type hybrid
[DeviceC-Twenty-FiveGigE1/0/3] port hybrid vlan 200 tagged
[DeviceC-Twenty-FiveGigE1/0/3] quit
# Configure Twenty-FiveGigE 1/0/1 as a hybrid port, and assign it to VLANs 100 and 200 as an
untagged VLAN member.
21
[DeviceC] interface twenty-fivegige 1/0/1
[DeviceC-Twenty-FiveGigE1/0/1] port link-type hybrid
[DeviceC-Twenty-FiveGigE1/0/1] port hybrid vlan 100 200 untagged
# Associate Twenty-FiveGigE 1/0/1 with the IP subnet-based VLANs 100 and 200.
[DeviceC-Twenty-FiveGigE1/0/1] port hybrid ip-subnet-vlan vlan 100
[DeviceC-Twenty-FiveGigE1/0/1] port hybrid ip-subnet-vlan vlan 200
[DeviceC-Twenty-FiveGigE1/0/1] quit
2. Configure Device A and Device B to forward packets from VLANs 100 and 200, respectively.
(Details not shown.)
Verifying the configuration
# Verify the IP subnet-based VLAN configuration on Device C.
[DeviceC] display ip-subnet-vlan vlan all
VLAN ID: 100
Subnet index IP address Subnet mask
0 192.168.5.0 255.255.255.0
22
Figure 6 Network diagram
VLAN 100 VLAN 200
WGE1/0/3
WGE1/0/4
WGE1/0/1 WGE1/0/2
Device
L2 switch A L2 switch B
Procedure
In this example, L2 Switch A and L2 Switch B use the factory configuration.
1. Configure Device:
# Create VLAN 100, and configure the description for VLAN 100 as protocol VLAN for IPv4.
<Device> system-view
[Device] vlan 100
[Device-vlan100] description protocol VLAN for IPv4
# Assign Twenty-FiveGigE 1/0/3 to VLAN 100.
[Device-vlan100] port twenty-fivegige 1/0/3
[Device-vlan100] quit
# Create VLAN 200, and configure the description for VLAN 200 as protocol VLAN for IPv6.
[Device] vlan 200
[Device-vlan200] description protocol VLAN for IPv6
# Assign Twenty-FiveGigE 1/0/4 to VLAN 200.
[Device-vlan200] port twenty-fivegige 1/0/4
# Configure VLAN 200 as a protocol-based VLAN, and create an IPv6 protocol template with
the index 1 for VLAN 200.
[Device-vlan200] protocol-vlan 1 ipv6
[Device-vlan200] quit
# Configure VLAN 100 as a protocol-based VLAN. Create an IPv4 protocol template with the
index 1, and create an ARP protocol template with the index 2. (In Ethernet II encapsulation, the
protocol type ID for ARP is 0806 in hexadecimal notation.)
[Device] vlan 100
[Device-vlan100] protocol-vlan 1 ipv4
[Device-vlan100] protocol-vlan 2 mode ethernetii etype 0806
[Device-vlan100] quit
23
# Configure Twenty-FiveGigE 1/0/1 as a hybrid port, and assign it to VLANs 100 and 200 as an
untagged VLAN member.
[Device] interface twenty-fivegige 1/0/1
[Device-Twenty-FiveGigE1/0/1] port link-type hybrid
[Device-Twenty-FiveGigE1/0/1] port hybrid vlan 100 200 untagged
# Associate Twenty-FiveGigE 1/0/1 with the IPv4 and ARP protocol templates of VLAN 100 and
the IPv6 protocol template of VLAN 200.
[Device-Twenty-FiveGigE1/0/1] port hybrid protocol-vlan vlan 100 1 to 2
[Device-Twenty-FiveGigE1/0/1] port hybrid protocol-vlan vlan 200 1
[Device-Twenty-FiveGigE1/0/1] quit
# Configure Twenty-FiveGigE 1/0/2 as a hybrid port, and assign it to VLANs 100 and 200 as an
untagged VLAN member.
[Device] interface twenty-fivegige 1/0/2
[Device-Twenty-FiveGigE1/0/2] port link-type hybrid
[Device-Twenty-FiveGigE1/0/2] port hybrid vlan 100 200 untagged
# Associate Twenty-FiveGigE 1/0/2 with the IPv4 and ARP protocol templates of VLAN 100 and
the IPv6 protocol template of VLAN 200.
[Device-Twenty-FiveGigE1/0/2] port hybrid protocol-vlan vlan 100 1 to 2
[Device-Twenty-FiveGigE1/0/2] port hybrid protocol-vlan vlan 200 1
[Device-Twenty-FiveGigE1/0/2] quit
2. Configure hosts and servers:
a. Configure IPv4 Host A, IPv4 Host B, and IPv4 server to be on the same network segment
(192.168.100.0/24, for example). (Details not shown.)
b. Configure IPv6 Host A, IPv6 Host B, and IPv6 server to be on the same network segment
(2001::1/64, for example). (Details not shown.)
Verifying the configuration
1. Verify the following:
The hosts and the server in VLAN 100 can successfully ping one another. (Details not
shown.)
The hosts and the server in VLAN 200 can successfully ping one another. (Details not
shown.)
The hosts or the server in VLAN 100 cannot ping the hosts or server in VLAN 200. (Details
not shown.)
2. Verify the protocol-based VLAN configuration:
# Display protocol-based VLANs on Device.
[Device] display protocol-vlan vlan all
VLAN ID: 100
Protocol index Protocol type
1 IPv4
2 Ethernet II Etype 0x0806
24
100 1 IPv4 Active
100 2 Ethernet II Etype 0x0806 Active
200 1 IPv6 Active
25
Configuring super VLANs
About super VLANs
Hosts in a VLAN typically use IP addresses in the same subnet. For Layer 3 interoperability with
other VLANs, you can create a VLAN interface for the VLAN and assign an IP address to it. This
requires a large number of IP addresses.
The super VLAN feature was introduced to save IP addresses. A super VLAN is associated with
multiple sub-VLANs. These sub-VLANs use the VLAN interface of the super VLAN (also known as a
super VLAN interface) as the gateway for Layer 3 communication.
You can create a VLAN interface for a super VLAN and assign an IP address to it. However, you
cannot create a VLAN interface for a sub-VLAN. You can assign a physical port to a sub-VLAN, but
you cannot assign a physical port to a super VLAN. Sub-VLANs are isolated at Layer 2.
To enable Layer 3 communication between sub-VLANs, perform the following tasks:
1. Create a super VLAN and the VLAN interface for the super VLAN.
2. Enable local proxy ARP or ND on the super VLAN interface as follows:
In an IPv4 network, enable local proxy ARP on the super VLAN interface. The super VLAN
can then process ARP requests and replies sent from the sub-VLANs.
In an IPv6 network, enable local proxy ND on the super VLAN interface. The super VLAN
can then process the NS and NA messages sent from the sub-VLANs.
Creating a sub-VLAN
1. Enter system view.
system-view
2. Create a sub-VLAN.
26
vlan vlan-id-list
By default, only the system default VLAN (VLAN 1) exists.
27
Sub-VLANs cannot communicate with each other at Layer 3.
Local proxy ND is disabled.
For more information about local proxy ND, see Layer 3—IP Services Configuration Guide.
Task Command
VLAN 2
WGE1/0/1 WGE1/0/2
Vlan-int10
WGE1/0/3 10.1.1.1/24
WGE1/0/4
Device A
VLAN 3 WGE1/0/5 WGE1/0/6 Device B
VLAN 5
Procedure
# Create VLAN 10.
<DeviceA> system-view
[DeviceA] vlan 10
28
[DeviceA-vlan10] quit
# Create VLAN 2, and assign Twenty-FiveGigE 1/0/1 and Twenty-FiveGigE 1/0/2 to the VLAN.
[DeviceA] vlan 2
[DeviceA-vlan2] port twenty-fivegige 1/0/1 twenty-fivegige 1/0/2
[DeviceA-vlan2] quit
# Create VLAN 3, and assign Twenty-FiveGigE 1/0/3 and Twenty-FiveGigE 1/0/4 to the VLAN.
[DeviceA] vlan 3
[DeviceA-vlan3] port twenty-fivegige 1/0/3 twenty-fivegige 1/0/4
[DeviceA-vlan3] quit
# Create VLAN 5, and assign Twenty-FiveGigE 1/0/5 and Twenty-FiveGigE 1/0/6 to the VLAN.
[DeviceA] vlan 5
[DeviceA-vlan5] port twenty-fivegige 1/0/5 twenty-fivegige 1/0/6
[DeviceA-vlan5] quit
# Configure VLAN 10 as a super VLAN, and associate sub-VLANs 2, 3, and 5 with the super VLAN.
[DeviceA] vlan 10
[DeviceA-vlan10] supervlan
[DeviceA-vlan10] subvlan 2 3 5
[DeviceA-vlan10] quit
[DeviceA] quit
29
Description: VLAN 0002
Name: VLAN 0002
Tagged ports: None
Untagged ports:
Twenty-FiveGigE1/0/1
Twenty-FiveGigE1/0/2
VLAN ID: 3
VLAN type: Static
It is a sub VLAN.
Route interface: Configured
Ipv4 address: 10.1.1.1
Ipv4 subnet mask: 255.255.255.0
Description: VLAN 0003
Name: VLAN 0003
Tagged ports: None
Untagged ports:
Twenty-FiveGigE1/0/3
Twenty-FiveGigE1/0/4
VLAN ID: 5
VLAN type: Static
It is a sub VLAN.
Route interface: Configured
Ipv4 address: 10.1.1.1
Ipv4 subnet mask: 255.255.255.0
Description: VLAN 0005
Name: VLAN 0005
Tagged ports: None
Untagged ports:
Twenty-FiveGigE1/0/5
Twenty-FiveGigE1/0/6
30
Configuring private VLAN
About private VLAN
VLAN technology provides a method for isolating traffic from customers. At the access layer of a
network, customer traffic must be isolated for security or accounting purposes. If VLANs are
assigned on a per-user basis, a large number of VLANs will be required.
The private VLAN feature saves VLAN resources. It uses a two-tier VLAN structure as follows:
• Primary VLAN—Used for connecting the upstream device. A primary VLAN can be associated
with multiple secondary VLANs. The upstream device identifies only the primary VLAN.
• Secondary VLANs—Used for connecting users. Secondary VLANs are isolated at Layer 2. To
implement Layer 3 communication between secondary VLANs associated with the primary
VLAN, enable local proxy ARP or ND on the upstream device (for example, L3 Device A in
Figure 8).
As shown in Figure 8, the private VLAN feature is enabled on L2 Device B. VLAN 10 is the primary
VLAN. VLANs 2, 5, and 8 are secondary VLANs that are associated with VLAN 10. L3 Device A is
only aware of VLAN 10.
Figure 8 Private VLAN example
L3 Device A
VLAN 10
VLAN 10
L2 Device B
If the private VLAN feature is configured on a Layer 3 device, use one of the following methods on
the Layer 3 device to enable Layer 3 communication. Layer 3 communication might be required
between secondary VLANs that are associated with the same primary VLAN, or between secondary
VLANs and other networks.
• Method 1:
a. Create VLAN interfaces for the secondary VLANs.
b. Assign IP addresses to the secondary VLAN interfaces.
• Method 2:
a. Enable Layer 3 communication between the secondary VLANs that are associated with the
primary VLAN.
b. Create the VLAN interface for the primary VLAN and assign an IP address to it. (Do not
create secondary VLAN interfaces if you use this method.)
c. Enable local proxy ARP or ND on the primary VLAN interface.
31
Restrictions and guidelines: Private VLAN
configuration
• Make sure the following requirements are met:
For a promiscuous port:
− The primary VLAN is the PVID of the port.
− The port is an untagged member of the primary VLAN and secondary VLANs.
For a host port:
− The PVID of the port is a secondary VLAN.
− The port is an untagged member of the primary VLAN and the secondary VLAN.
A trunk promiscuous or trunk secondary port must be a tagged member of the primary
VLANs and the secondary VLANs.
• VLAN 1 (system default VLAN) does not support the private VLAN configuration.
32
Associating the primary VLAN with secondary
VLANs
1. Enter system view.
system-view
2. Create enter VLAN view of the primary VLAN.
vlan vlan-id
3. Associate the primary VLAN with the secondary VLANs.
private-vlan secondary vlan-id-list
By default, a primary VLAN is not associated with any secondary VLANs.
33
Procedure
1. Enter system view.
system-view
2. Enter interface view of the downlink port.
interface interface-type interface-number
3. Assign the downlink port to secondary VLANs.
a. Set the link type of the port.
port link-type { access | hybrid | trunk }
b. Assign the access port to the specified VLAN.
port access vlan vlan-id
c. Assign the trunk port to the specified VLANs.
port trunk permit vlan { vlan-id-list | all }
d. Assign the hybrid port to the specified VLANs.
port hybrid vlan vlan-id-list { tagged | untagged }
Select substep b, c, or d depending on the port link type.
4. Configure the downlink port as a host or trunk secondary port.
Configure the downlink port as a host port.
port private-vlan host
Configure the downlink port as a trunk secondary port of the specified VLANs.
port private-vlan vlan-id-list trunk secondary
By default, a port is not a host or trunk secondary port.
5. Return to system view.
quit
6. Enter VLAN view of a secondary VLAN.
vlan vlan-id
7. (Optional.) Enable Layer 2 communication for ports in the same secondary VLAN. Choose one
command as needed:
undo private-vlan isolated
private-vlan community
By default, ports in the same secondary VLAN can communicate with each other at Layer 2.
34
IPv4:
ip address ip-address { mask-length | mask } [ sub ]
IPv6:
ipv6 address { ipv6-address prefix-length | ipv6-address/prefix-length }
By default, no IP address is configured for a VLAN interface.
5. Enable local proxy ARP or ND.
IPv4:
local-proxy-arp enable
By default, local proxy ARP is disabled.
For more information about local proxy ARP, see Layer 3—IP Services Configuration Guide.
IPv6:
local-proxy-nd enable
By default, local proxy ND is disabled.
For more information about local proxy ND, see Layer 3—IP Services Configuration Guide.
Task Command
35
Figure 9 Network diagram
Device A
Procedure
This example describes the configurations on Device B and Device C.
1. Configure Device B:
# Configure VLAN 5 as a primary VLAN.
<DeviceB> system-view
[DeviceB] vlan 5
[DeviceB-vlan5] private-vlan primary
[DeviceB-vlan5] quit
# Create VLANs 2 and 3.
[DeviceB] vlan 2 to 3
# Associate secondary VLANs 2 and 3 with primary VLAN 5.
[DeviceB] vlan 5
[DeviceB-vlan5] private-vlan secondary 2 to 3
[DeviceB-vlan5] quit
# Configure the uplink port (Twenty-FiveGigE 1/0/5) as a promiscuous port of VLAN 5.
[DeviceB] interface twenty-fivegige 1/0/5
[DeviceB-Twenty-FiveGigE1/0/5] port private-vlan 5 promiscuous
[DeviceB-Twenty-FiveGigE1/0/5] quit
# Assign downlink port Twenty-FiveGigE 1/0/2 to VLAN 2, and configure the port as a host port.
[DeviceB] interface twenty-fivegige 1/0/2
[DeviceB-Twenty-FiveGigE1/0/2] port access vlan 2
[DeviceB-Twenty-FiveGigE1/0/2] port private-vlan host
[DeviceB-Twenty-FiveGigE1/0/2] quit
# Assign downlink port Twenty-FiveGigE 1/0/3 to VLAN 3, and configure the port as a host port.
[DeviceB] interface twenty-fivegige 1/0/3
[DeviceB-Twenty-FiveGigE1/0/3] port access vlan 3
[DeviceB-Twenty-FiveGigE1/0/3] port private-vlan host
[DeviceB-Twenty-FiveGigE1/0/3] quit
36
2. Configure Device C:
# Configure VLAN 6 as a primary VLAN.
<DeviceC> system-view
[DeviceC] vlan 6
[DeviceC–vlan6] private-vlan primary
[DeviceC–vlan6] quit
# Create VLANs 3 and 4.
[DeviceC] vlan 3 to 4
# Associate secondary VLANs 3 and 4 with primary VLAN 6.
[DeviceC] vlan 6
[DeviceC-vlan6] private-vlan secondary 3 to 4
[DeviceC-vlan6] quit
# Configure the uplink port (Twenty-FiveGigE 1/0/5) as a promiscuous port of VLAN 6.
[DeviceC] interface twenty-fivegige 1/0/5
[DeviceC-Twenty-FiveGigE1/0/5] port private-vlan 6 promiscuous
[DeviceC-Twenty-FiveGigE1/0/5] quit
# Assign downlink port Twenty-FiveGigE 1/0/3 to VLAN 3, and configure the port as a host port.
[DeviceC] interface twenty-fivegige 1/0/3
[DeviceC-Twenty-FiveGigE1/0/3] port access vlan 3
[DeviceC-Twenty-FiveGigE1/0/3] port private-vlan host
[DeviceC-Twenty-FiveGigE1/0/3] quit
# Assign downlink port Twenty-FiveGigE 1/0/4 to VLAN 4, and configure the port as a host port.
[DeviceC] interface twenty-fivegige 1/0/4
[DeviceC-Twenty-FiveGigE1/0/4] port access vlan 4
[DeviceC-Twenty-FiveGigE1/0/4] port private-vlan host
[DeviceC-Twenty-FiveGigE1/0/4] quit
VLAN ID: 5
VLAN type: Static
Private VLAN type: Primary
Route interface: Not configured
Description: VLAN 0005
Name: VLAN 0005
Tagged ports: None
Untagged ports:
Twenty-FiveGigE1/0/2
Twenty-FiveGigE1/0/3
Twenty-FiveGigE1/0/5
VLAN ID: 2
VLAN type: Static
Private VLAN type: Secondary
37
Route interface: Not configured
Description: VLAN 0002
Name: VLAN 0002
Tagged ports: None
Untagged ports:
Twenty-FiveGigE1/0/2
Twenty-FiveGigE1/0/5
VLAN ID: 3
VLAN type: Static
Private VLAN type: Secondary
Route interface: Not configured
Description: VLAN 0003
Name: VLAN 0003
Tagged Ports: None
Untagged Ports:
Twenty-FiveGigE1/0/3
Twenty-FiveGigE1/0/5
38
Figure 10 Network diagram
Device A
WGE1/0/1 VLAN 5
VLAN 10
WGE1/0/1
Device B
WGE1/0/2 WGE1/0/5
WGE1/0/3 WGE1/0/4
Procedure
1. Configure Device B:
# Configure VLANs 5 and 10 as primary VLANs.
<DeviceB> system-view
[DeviceB] vlan 5
[DeviceB-vlan5] private-vlan primary
[DeviceB-vlan5] quit
[DeviceB] vlan 10
[DeviceB-vlan10] private-vlan primary
[DeviceB-vlan10] quit
# Create VLANs 2, 3, 6, and 8.
[DeviceB] vlan 2 to 3
[DeviceB] vlan 6
[DeviceB-vlan6] quit
[DeviceB] vlan 8
[DeviceB-vlan8] quit
# Associate secondary VLANs 2 and 3 with primary VLAN 5.
[DeviceB] vlan 5
[DeviceB-vlan5] private-vlan secondary 2 to 3
[DeviceB-vlan5] quit
# Associate secondary VLANs 6 and 8 with primary VLAN 10.
[DeviceB] vlan 10
[DeviceB-vlan10] private-vlan secondary 6 8
[DeviceB-vlan10] quit
# Configure the uplink port (Twenty-FiveGigE 1/0/1) as a trunk promiscuous port of VLANs 5
and 10.
[DeviceB] interface twenty-fivegige 1/0/1
[DeviceB-Twenty-FiveGigE1/0/1] port private-vlan 5 10 trunk promiscuous
[DeviceB-Twenty-FiveGigE1/0/1] quit
39
# Assign downlink port Twenty-FiveGigE 1/0/2 to VLAN 2, and configure the port as a host port.
[DeviceB] interface twenty-fivegige 1/0/2
[DeviceB-Twenty-FiveGigE1/0/2] port access vlan 2
[DeviceB-Twenty-FiveGigE1/0/2] port private-vlan host
[DeviceB-Twenty-FiveGigE1/0/2] quit
# Assign downlink port Twenty-FiveGigE 1/0/3 to VLAN 3, and configure the port as a host port.
[DeviceB] interface twenty-fivegige 1/0/3
[DeviceB-Twenty-FiveGigE1/0/3] port access vlan 3
[DeviceB-Twenty-FiveGigE1/0/3] port private-vlan host
[DeviceB-Twenty-FiveGigE1/0/3] quit
# Assign downlink port Twenty-FiveGigE 1/0/4 to VLAN 6, and configure the port as a host port.
[DeviceB] interface twenty-fivegige 1/0/4
[DeviceB-Twenty-FiveGigE1/0/4] port access vlan 6
[DeviceB-Twenty-FiveGigE1/0/4] port private-vlan host
[DeviceB-Twenty-FiveGigE1/0/4] quit
# Assign downlink port Twenty-FiveGigE 1/0/5 to VLAN 8, and configure the port as a host port.
[DeviceB] interface twenty-fivegige 1/0/5
[DeviceB-Twenty-FiveGigE1/0/5] port access vlan 8
[DeviceB-Twenty-FiveGigE1/0/5] port private-vlan host
[DeviceB-Twenty-FiveGigE1/0/5] quit
2. Configure Device A:
# Create VLANs 5 and 10.
[DeviceA] vlan 5
[DeviceA-vlan5] quit
[DeviceA] vlan 10
[DeviceA-vlan10] quit
# Configure Twenty-FiveGigE 1/0/1 as a hybrid port, and assign it to VLANs 5 and 10 as a
tagged VLAN member.
[DeviceA] interface twenty-fivegige 1/0/1
[DeviceA-Twenty-FiveGigE1/0/1] port link-type hybrid
[DeviceA-Twenty-FiveGigE1/0/1] port hybrid vlan 5 10 tagged
[DeviceA-Twenty-FiveGigE1/0/1] quit
VLAN ID: 5
VLAN type: Static
Private VLAN type: Primary
Route interface: Not configured
Description: VLAN 0005
Name: VLAN 0005
Tagged ports:
Twenty-FiveGigE1/0/1
Untagged ports:
40
Twenty-FiveGigE1/0/2
Twenty-FiveGigE1/0/3
VLAN ID: 2
VLAN type: Static
Private VLAN type: Secondary
Route interface: Not configured
Description: VLAN 0002
Name: VLAN 0002
Tagged ports:
Twenty-FiveGigE1/0/1
Untagged ports:
Twenty-FiveGigE1/0/2
VLAN ID: 3
VLAN type: Static
Private VLAN type: Secondary
Route interface: Not configured
Description: VLAN 0003
Name: VLAN 0003
Tagged ports:
Twenty-FiveGigE1/0/1
Untagged ports:
Twenty-FiveGigE1/0/3
41
Figure 11 Network diagram
VLAN 10 VLAN 20
Device C
WGE1/0/5
WGE1/0/5
Device A
WGE1/0/1 WGE1/0/3
WGE1/0/2
WGE1/0/2
Device B
WGE1/0/3 WGE1/0/4
Host C Host D
VLAN 22 VLAN 12
Host A Host B
VLAN 11 VLAN 21
Procedure
1. Configure Device A:
# Configure VLANs 10 and 20 as primary VLANs.
<DeviceA> system-view
[DeviceA] vlan 10
[DeviceA-vlan10] private-vlan primary
[DeviceA-vlan10] quit
[DeviceA] vlan 20
[DeviceA-vlan20] private-vlan primary
[DeviceA-vlan20] quit
# Create VLANs 11, 12, 21, and 22.
[DeviceA] vlan 11 to 12
[DeviceA] vlan 21 to 22
# Associate secondary VLANs 11 and 12 with primary VLAN 10.
[DeviceA] vlan 10
[DeviceA-vlan10] private-vlan secondary 11 12
[DeviceA-vlan10] quit
# Associate secondary VLANs 21 and 22 with primary VLAN 20.
[DeviceA] vlan 20
[DeviceA-vlan20] private-vlan secondary 21 22
[DeviceA-vlan20] quit
# Configure the uplink port (Twenty-FiveGigE 1/0/5) as a trunk promiscuous port of VLANs 10
and 20.
42
[DeviceA] interface twenty-fivegige 1/0/5
[DeviceA-Twenty-FiveGigE1/0/5] port private-vlan 10 20 trunk promiscuous
[DeviceA-Twenty-FiveGigE1/0/5] quit
# Assign downlink port Twenty-FiveGigE 1/0/1 to VLAN 22 and configure the port as a host port.
[DeviceA] interface twenty-fivegige 1/0/1
[DeviceA-Twenty-FiveGigE1/0/1] port access vlan 22
[DeviceA-Twenty-FiveGigE1/0/1] port private-vlan host
[DeviceA-Twenty-FiveGigE1/0/1] quit
# Assign downlink port Twenty-FiveGigE 1/0/3 to VLAN 12 and configure the port as a host port.
[DeviceA] interface twenty-fivegige 1/0/3
[DeviceA-Twenty-FiveGigE1/0/3] port access vlan 12
[DeviceA-Twenty-FiveGigE1/0/3] port private-vlan host
[DeviceA-Twenty-FiveGigE1/0/3] quit
# Configure downlink port Twenty-FiveGigE 1/0/2 as a trunk secondary port of VLANs 11 and
21.
[DeviceA] interface twenty-fivegige 1/0/2
[DeviceA-Twenty-FiveGigE1/0/2] port private-vlan 11 21 trunk secondary
[DeviceA-Twenty-FiveGigE1/0/2] quit
2. Configure Device B:
# Create VLANs 11 and 21.
<DeviceB> system-view
[DeviceB] vlan 11
[DeviceB-vlan11] quit
[DeviceB] vlan 21
[DeviceB-vlan21] quit
# Configure Twenty-FiveGigE 1/0/2 as a hybrid port, and assign it to VLANs 11 and 21 as a
tagged VLAN member.
[DeviceB] interface twenty-fivegige 1/0/2
[DeviceB-Twenty-FiveGigE1/0/2] port link-type hybrid
[DeviceB-Twenty-FiveGigE1/0/2] port hybrid vlan 11 21 tagged
[DeviceB-Twenty-FiveGigE1/0/2] quit
# Assign Twenty-FiveGigE 1/0/3 to VLAN 11.
[DeviceB] interface twenty-fivegige 1/0/3
[DeviceB-Twenty-FiveGigE1/0/3] port access vlan 11
[DeviceB-Twenty-FiveGigE1/0/3] quit
# Assign Twenty-FiveGigE 1/0/4 to VLAN 21.
[DeviceB] interface twenty-fivegige 1/0/4
[DeviceB-Twenty-FiveGigE1/0/4] port access vlan 21
[DeviceB-Twenty-FiveGigE1/0/4] quit
3. Configure Device C:
# Create VLANs 10 and 20.
<DeviceC> system-view
[DeviceC] vlan 10
[DeviceC-vlan10] quit
[DeviceC] vlan 20
[DeviceC-vlan20] quit
# Configure Twenty-FiveGigE 1/0/5 as a hybrid port, and assign it to VLANs 10 and 20 as a
tagged VLAN member.
43
[DeviceC] interface twenty-fivegige 1/0/5
[DeviceC-Twenty-FiveGigE1/0/5] port link-type hybrid
[DeviceC-Twenty-FiveGigE1/0/5] port hybrid vlan 10 20 tagged
[DeviceC-Twenty-FiveGigE1/0/5] quit
VLAN ID: 10
VLAN type: Static
Private-vlan type: Primary
Route interface: Not configured
Description: VLAN 0010
Name: VLAN 0010
Tagged ports:
Twenty-FiveGigE1/0/2
Twenty-FiveGigE1/0/5
Untagged ports:
Twenty-FiveGigE1/0/3
VLAN ID: 11
VLAN type: Static
Private-vlan type: Secondary
Route interface: Not configured
Description: VLAN 0011
Name: VLAN 0011
Tagged ports:
Twenty-FiveGigE1/0/2
Twenty-FiveGigE1/0/5
Untagged ports: None
VLAN ID: 12
VLAN type: Static
Private-vlan type: Secondary
Route interface: Not configured
Description: VLAN 0012
Name: VLAN 0012
Tagged ports:
Twenty-FiveGigE1/0/5
Untagged ports:
Twenty-FiveGigE1/0/3
44
• The trunk secondary port (Twenty-FiveGigE 1/0/2) is a tagged member of primary VLAN 10 and
secondary VLAN 11.
• The host port (Twenty-FiveGigE 1/0/3) is an untagged member of primary VLAN 10 and
secondary VLAN 12.
Device B
VLAN 10
Vlan-int10
WGE1/0/1
192.168.1.1/24
Device A
WGE1/0/2 WGE1/0/3
VLAN 2 VLAN 3
Procedure
# Create VLAN 10 and configure it as a primary VLAN.
<DeviceA> system-view
[DeviceA] vlan 10
[DeviceA-vlan10] private-vlan primary
[DeviceA-vlan10] quit
# Configure the uplink port (Twenty-FiveGigE 1/0/1) as a promiscuous port of VLAN 10.
[DeviceA] interface twenty-fivegige 1/0/1
[DeviceA-Twenty-FiveGigE1/0/1] port private-vlan 10 promiscuous
[DeviceA-Twenty-FiveGigE1/0/1] quit
45
# Assign downlink port Twenty-FiveGigE 1/0/2 to VLAN 2, and configure the port as a host port.
[DeviceA] interface twenty-fivegige 1/0/2
[DeviceA-Twenty-FiveGigE1/0/2] port access vlan 2
[DeviceA-Twenty-FiveGigE1/0/2] port private-vlan host
[DeviceA-Twenty-FiveGigE1/0/2] quit
# Assign downlink port Twenty-FiveGigE 1/0/3 to VLAN 3, and configure the port as a host port.
[DeviceA] interface twenty-fivegige 1/0/3
[DeviceA-Twenty-FiveGigE1/0/3] port access vlan 3
[DeviceA-Twenty-FiveGigE1/0/3] port private-vlan host
[DeviceA-Twenty-FiveGigE1/0/3] quit
# Enable Layer 3 communication between secondary VLANs 2 and 3 that are associated with
primary VLAN 10.
[DeviceA] interface vlan-interface 10
[DeviceA-Vlan-interface10] private-vlan secondary 2 3
VLAN ID: 10
VLAN type: Static
Private VLAN type: Primary
Route interface: Configured
IPv4 address: 192.168.1.1
IPv4 subnet mask: 255.255.255.0
Description: VLAN 0010
Name: VLAN 0010
Tagged ports: None
Untagged ports:
Twenty-FiveGigE1/0/1
Twenty-FiveGigE1/0/2
Twenty-FiveGigE1/0/3
VLAN ID: 2
VLAN type: Static
Private VLAN type: Secondary
Route interface: Configured
IPv4 address: 192.168.1.1
IPv4 subnet mask: 255.255.255.0
Description: VLAN 0002
Name: VLAN 0002
46
Tagged ports: None
Untagged ports:
Twenty-FiveGigE1/0/1
Twenty-FiveGigE1/0/2
VLAN ID: 3
VLAN type: Static
Private VLAN type: Secondary
Route interface: Configured
IPv4 address: 192.168.1.1
IPv4 subnet mask: 255.255.255.0
Description: VLAN 0003
Name: VLAN 0003
Tagged ports: None
Untagged ports:
Twenty-FiveGigE1/0/1
Twenty-FiveGigE1/0/3
The Route interface field in the output is Configured, indicating that secondary VLANs 2 and 3 are
interoperable at Layer 3.
47
Configuring voice VLANs
About voice VLANs
A voice VLAN is used for transmitting voice traffic. The device can configure QoS parameters for
voice packets to ensure higher transmission priority of the voice packets.
Common voice devices include IP phones and integrated access devices (IADs). This chapter uses
IP phones as an example.
Working mechanism
When an IP phone accesses a device, the device performs the following operations:
1. Identifies the IP phone in the network and obtains the MAC address of the IP phone.
2. Advertises the voice VLAN information to the IP phone.
After receiving the voice VLAN information, the IP phone performs automatic configuration. Voice
packets sent from the IP phone can then be transmitted within the voice VLAN.
Typically, an OUI address refers to the first 24 bits of a MAC address (in binary notation) and is a
globally unique identifier that IEEE assigns to a vendor. However, OUI addresses in this chapter are
addresses that the system uses to identify voice packets. They are the logical AND results of the
mac-address and oui-mask arguments in the voice-vlan mac-address command.
48
Automatically identifying IP phones through LLDP
If IP phones support LLDP, configure LLDP for automatic IP phone discovery on the device. The
device can then automatically discover the peer through LLDP, and exchange LLDP TLVs with the
peer.
If the LLDP System Capabilities TLV received on a port indicates that the peer can act as a telephone,
the device performs the following operations:
1. Sends an LLDP TLV with the voice VLAN configuration to the peer.
2. Assigns the receiving port to the voice VLAN.
3. Increases the transmission priority of the voice packets sent from the IP phone.
4. Adds the MAC address of the IP phone to the MAC address table to ensure that the IP phone
can pass authentication.
Use LLDP instead of the OUI list to identify IP phones if the network has more IP phone categories
than the maximum number of OUI addresses supported on the device. LLDP has higher priority than
the OUI list.
For more information about LLDP, see "Configuring LLDP."
No
Yes
Is the authorization VLAN Advertise the
received from the authorization VLAN to
authentication server? to the IP phone
No
49
Figure 14 Connecting the host and IP phone in series
Voice gateway
Voice gateway
Device
IP phone IP phone
50
Manual mode
Use manual mode when only IP phones access the network through the device, as shown in Figure
15. In this mode, ports are assigned to a voice VLAN that transmits voice traffic exclusively. No data
traffic affects the voice traffic transmission.
You must manually assign the port that connects to the IP phone to a voice VLAN. The device uses
the source MAC address of the received voice packets to match its OUI addresses. If the match
succeeds, the device issues ACL rules to set the packet precedence.
To remove the port from the voice VLAN, you must manually remove it.
Port link
Configuration requirements
type
51
Port link
Configuration requirements
type
The port must forward packets from the voice VLAN.
The voice VLAN must be the PVID of the port.
Hybrid
The port must forward packets from the voice VLAN without VLAN tags.
Voice VLAN
Packet type Packet processing
mode
• Untagged packets The port does not examine their source MAC addresses.
• Packets with the Both voice traffic and non-voice traffic can be transmitted in
Normal voice VLAN tags the voice VLAN.
Packets with other VLAN The port forwards or drops them depending on whether the
tags port permits packets from these VLANs to pass through.
• If the source MAC address of a packet matches an OUI
• Untagged packets address on the device, the packet is forwarded in the
• Packets with the voice VLAN.
Security voice VLAN tags • If the source MAC address of a packet does not match
an OUI address on the device, the packet is dropped.
Packets with other VLAN The port forwards or drops them depending on whether the
tags port permits packets from these VLANs to pass through.
52
aging timer for its dynamic MAC address entry. For more information about the aging timer for
dynamic MAC address entries, see "Configuring the MAC address table."
As a best practice, do not both configure voice VLAN and disable MAC address learning on a port. If
the two features are configured together on a port, the port forwards only packets exactly matching
the OUI addresses and drops inexactly matching packets.
As a best practice, do not configure both voice VLAN and the MAC learning limit on a port. If the two
features are configured together on a port and the port learns the configured maximum number of
MAC address entries, the port processes packets as follows:
• Forwards only packets matching the MAC address entries learnt by the port and OUI
addresses.
• Drops unmatching packets.
53
voice-vlan qos cos-value dscp-value
By default, a port modifies the CoS and DSCP values for voice VLAN packets to 6 and 46,
respectively.
If a port trusts the QoS priority settings in incoming voice VLAN packets, the port does not
modify their CoS and DSCP values.
54
port link-type hybrid
7. Configure the port to operate in automatic voice VLAN assignment mode.
voice-vlan mode auto
By default, the automatic voice VLAN assignment mode is enabled.
8. Enable the voice VLAN feature on the port.
voice-vlan vlan-id enable
By default, the voice VLAN feature is disabled.
Before you execute this command, make sure the specified VLAN already exists.
55
For the hybrid port, see "Assigning a hybrid port to a VLAN."
This step is required for untagged incoming voice traffic and prohibited for tagged incoming
voice traffic.
8. Enable the voice VLAN feature on the port.
voice-vlan vlan-id enable
By default, the voice VLAN feature is disabled.
Before you execute this command, make sure the specified VLAN already exists.
56
4. (Optional.) Display the voice VLAN advertised by LLDP.
display lldp local-information
For more information about the command, see Layer 2—LAN Switching Command Reference.
Task Command
57
Task Command
VLAN 2 VLAN 3
IP phone A IP phone B
010-1001 010-1002
MAC: 0011-1100-0001 MAC: 0011-2200-0001
Mask: ffff-ff00-0000 Mask: ffff-ff00-0000 0755-2002
PC A PC B
MAC: 0022-1100-0002 MAC: 0022-2200-0002
Procedure
1. Configure voice VLANs:
# Create VLANs 2 and 3.
<DeviceA> system-view
[DeviceA] vlan 2 to 3
# Set the voice VLAN aging timer to 30 minutes.
[DeviceA] voice-vlan aging 30
# Enable security mode for voice VLANs.
[DeviceA] voice-vlan security enable
# Add MAC addresses of IP phones A and B to the device with mask FFFF-FF00-0000.
58
[DeviceA] voice-vlan mac-address 0011-1100-0001 mask ffff-ff00-0000 description IP
phone A
[DeviceA] voice-vlan mac-address 0011-2200-0001 mask ffff-ff00-0000 description IP
phone B
2. Configure Twenty-FiveGigE 1/0/1:
# Configure Twenty-FiveGigE 1/0/1 as a hybrid port.
[DeviceA] interface twenty-fivegige 1/0/1
[DeviceA-Twenty-FiveGigE1/0/1] port link-type hybrid
# Configure Twenty-FiveGigE 1/0/1 to operate in automatic voice VLAN assignment mode.
[DeviceA-Twenty-FiveGigE1/0/1] voice-vlan mode auto
# Enable voice VLAN on Twenty-FiveGigE 1/0/1 and configure VLAN 2 as the voice VLAN for it.
[DeviceA-Twenty-FiveGigE1/0/1] voice-vlan 2 enable
[DeviceA-Twenty-FiveGigE1/0/1] quit
3. Configure Twenty-FiveGigE 1/0/2:
# Configure Twenty-FiveGigE 1/0/2 as a hybrid port.
[DeviceA] interface twenty-fivegige 1/0/2
[DeviceA-Twenty-FiveGigE1/0/2] port link-type hybrid
# Configure Twenty-FiveGigE 1/0/2 to operate in automatic voice VLAN assignment mode.
[DeviceA-Twenty-FiveGigE1/0/2] voice-vlan mode auto
# Enable voice VLAN on Twenty-FiveGigE 1/0/2 and configure VLAN 3 as the voice VLAN for it.
[DeviceA-Twenty-FiveGigE1/0/2] voice-vlan 3 enable
[DeviceA-Twenty-FiveGigE1/0/2] quit
59
Example: Configuring manual voice VLAN assignment mode
Network configuration
As shown in Figure 17, IP phone A send untagged voice traffic.
To enable Twenty-FiveGigE 1/0/1 to transmit only voice packets, perform the following tasks on
Device A:
• Create VLAN 2. This VLAN will be used as a voice VLAN.
• Configure Twenty-FiveGigE 1/0/1 to operate in manual voice VLAN assignment mode and add
it to VLAN 2.
• Add the OUI address of IP phone A to the OUI list of Device A.
Figure 17 Network diagram
Device A Device B
Internet
WGE1/0/1
VLAN 2
IP phone A IP phone B
010-1001 0755-2002
MAC: 0011-2200-0001
Mask: ffff-ff00-0000
Procedure
# Enable security mode for voice VLANs.
<DeviceA> system-view
[DeviceA] voice-vlan security enable
# Create VLAN 2.
[DeviceA] vlan 2
[DeviceA-vlan2] quit
# Enable voice VLAN and configure VLAN 2 as the voice VLAN on Twenty-FiveGigE 1/0/1.
[DeviceA-Twenty-FiveGigE1/0/1] voice-vlan 2 enable
[DeviceA-Twenty-FiveGigE1/0/1] quit
60
Verifying the configuration
# Display the OUI addresses supported on Device A.
[DeviceA] display voice-vlan mac-address
OUI Address Mask Description
0001-e300-0000 ffff-ff00-0000 Siemens phone
0003-6b00-0000 ffff-ff00-0000 Cisco phone
0004-0d00-0000 ffff-ff00-0000 Avaya phone
000f-e200-0000 ffff-ff00-0000 H3C Aolynk phone
0011-2200-0000 ffff-ff00-0000 test
0060-b900-0000 ffff-ff00-0000 Philips/NEC phone
00d0-1e00-0000 ffff-ff00-0000 Pingtel phone
00e0-7500-0000 ffff-ff00-0000 Polycom phone
00e0-bb00-0000 ffff-ff00-0000 3Com phone
61
Contents
Configuring MVRP ························································································· 1
About MVRP ······················································································································································ 1
MRP implementation ·································································································································· 1
MRP messages ·········································································································································· 1
MRP timers ················································································································································ 3
MVRP registration modes ·························································································································· 3
Protocols and standards ···························································································································· 4
Restrictions and guidelines: MVRP configuration ······························································································ 4
MVRP tasks at a glance ····································································································································· 4
Prerequisites ······················································································································································ 4
Enabling MVRP ·················································································································································· 5
Setting an MVRP registration mode ··················································································································· 5
Setting MRP timers ············································································································································ 5
Enabling GVRP compatibility ····························································································································· 6
Display and maintenance commands for MVRP ······························································································· 7
MVRP configuration examples ··························································································································· 7
Example: Configuring basic MVRP functions····························································································· 7
i
Configuring MVRP
About MVRP
Multiple Registration Protocol (MRP) is an attribute registration protocol used to transmit attribute
values. Multiple VLAN Registration Protocol (MVRP) is a typical MRP application. It synchronizes
VLAN information among devices and greatly reduces the workload of network administrators.
MRP implementation
An MRP-enabled port is called an MRP participant. An MVRP-enabled port is called an MVRP
participant.
As shown in Figure 1, an MRP participant sends declarations and withdrawals to notify other
participants to register and deregister its attribute values. It also registers and deregisters the
attribute values of other participants according to the received declarations and withdrawals. MRP
rapidly propagates the configuration information of an MRP participant throughout the LAN.
Figure 1 MRP implementation
Register
Device A Device B
Declaration
Deregister
Withdrawal
MRP messages
MRP messages include the following types:
• Declaration—Includes Join and New messages.
• Withdrawal—Includes Leave and LeaveAll messages.
Join message
An MRP participant sends a Join message to request the peer participant to register attributes in the
Join message.
When receiving a Join message from the peer participant, an MRP participant performs the following
tasks:
• Registers the attributes in the Join message.
1
• Propagates the Join message to all other participants on the device.
After receiving the Join message, other participants send the Join message to their respective peer
participants.
Join messages sent from a local participant to its peer participant include the following types:
• JoinEmpty—Declares an unregistered attribute. For example, when an MRP participant joins
an unregistered static VLAN, it sends a JoinEmpty message.
VLANs created manually and locally are called static VLANs. VLANs learned through MRP are
called dynamic VLANs.
• JoinIn—Declares a registered attribute. A JoinIn message is used in one of the following
situations:
An MRP participant joins an existing static VLAN and sends a JoinIn message after
registering the VLAN.
The MRP participant receives a Join message propagated by another participant on the
device and sends a JoinIn message after registering the VLAN.
New message
Similar to a Join message, a New message enables MRP participants to register attributes.
When the MSTP topology changes, an MRP participant sends a New message to the peer
participant to declare the topology change.
Upon receiving a New message from the peer participant, an MRP participant performs the following
tasks:
• Registers the attributes in the message.
• Propagates the New message to all other participants on the device.
After receiving the New message, other participants send the New message to their respective peer
participants.
Leave message
An MRP participant sends a Leave message to the peer participant when it wants the peer
participant to deregister attributes that it has deregistered.
When the peer participant receives the Leave message, it performs the following tasks:
• Deregisters the attribute in the Leave message.
• Propagates the Leave message to all other participants on the device.
After a participant on the device receives the Leave message, it determines whether to send the
Leave message to its peer participant depending on the attribute status on the device.
• If the VLAN in the Leave message is a dynamic VLAN not registered by any participants on the
device, both of the following events occur:
The VLAN is deleted on the device.
The participant sends the Leave message to its peer participant.
• If the VLAN in the Leave message is a static VLAN, the participant will not send the Leave
message to its peer participant.
LeaveAll message
Each MRP participant starts its LeaveAll timer when starting up. When the timer expires, the MRP
participant sends LeaveAll messages to the peer participant.
Upon sending or receiving a LeaveAll message, the local participant starts the Leave timer. The local
participant determines whether to send a Join message depending on its attribute status. A
participant can re-register the attributes in the received Join message before the Leave timer
expires.
2
When the Leave timer expires, a participant deregisters all attributes that have not been
re-registered to periodically clear useless attributes in the network.
MRP timers
MRP uses the following timers to control message transmission.
Periodic timer
The Periodic timer controls the transmission of MRP messages. An MRP participant starts its own
Periodic timer upon startup, and stores MRP messages to be sent before the Periodic timer expires.
When the Periodic timer expires, MRP sends stored MRP messages in as few MRP frames as
possible and restarts the Periodic timer. This mechanism reduces the number of MRP frames sent.
You can enable or disable the Periodic timer. When the Periodic timer is disabled, MRP does not
periodically send MRP messages. Instead, an MRP participant sends MRP messages when the
LeaveAll timer expires or the participant receives a LeaveAll message from the peer participant.
Join timer
The Join timer controls the transmission of Join messages. An MRP participant starts the Join timer
after sending a Join message to the peer participant. Before the Join timer expires, the participant
does not resend the Join message when the following conditions exist:
• The participant receives a JoinIn message from the peer participant.
• The received JoinIn message has the same attributes as the sent Join message.
When both the Join timer and the Periodic timer expire, the participant resends the Join message.
Leave timer
The Leave timer controls the deregistration of attributes.
An MRP participant starts the Leave timer in one of the following conditions:
• The participant receives a Leave message from its peer participant.
• The participant receives or sends a LeaveAll message.
The MRP participant does not deregister the attributes in the Leave or LeaveAll message if the
following conditions exist:
• The participant receives a Join message before the Leave timer expires.
• The Join message includes the attributes that have been encapsulated in the Leave or LeaveAll
message.
If the participant does not receive a Join message for these attributes before the Leave timer expires,
MRP deregisters the attributes.
LeaveAll timer
After startup, an MRP participant starts its own LeaveAll timer. When the LeaveAll timer expires, the
MRP participant sends out a LeaveAll message and restarts the LeaveAll timer.
Upon receiving the LeaveAll message, other participants restart their LeaveAll timer. The value of
the LeaveAll timer is randomly selected between the LeaveAll timer and 1.5 times the LeaveAll timer.
This mechanism provides the following benefits:
• Effectively reduces the number of LeaveAll messages in the network.
• Prevents the LeaveAll timer of a particular participant from always expiring first.
3
Based on how an MVRP participant handles registration of dynamic VLANs, MVRP has the following
registration modes:
• Normal—An MVRP participant in normal registration mode registers and deregisters dynamic
VLANs.
• Fixed—An MVRP participant in fixed registration mode disables deregistering dynamic VLANs
and drops received MVRP frames. The MVRP participant does not deregister dynamic VLANs
or register new dynamic VLANs.
• Forbidden—An MVRP participant in forbidden registration mode disables registering dynamic
VLANs and drops received MVRP frames. When you set the forbidden registration mode for a
port, VLAN 1 of the port retains and all dynamically registered VLANs of the port will be deleted.
Prerequisites
Before you configure MVRP, complete the following tasks:
• Map each MSTI used by MVRP to an existing VLAN on each device in the network.
• Set the port link type of MVRP participants to trunk because MVRP takes effect only on trunk
ports. For more information about trunk ports, see "Configuring VLANs."
4
Enabling MVRP
1. Enter system view.
system-view
2. Enable MVRP globally.
mvrp global enable
By default, MVRP is globally disabled.
For MVRP to take effect on a port, enable MVRP both on the port and globally.
3. Enter Layer 2 Ethernet interface view or Layer 2 aggregate interface view.
interface interface-type interface-number
4. Configure the port as a trunk port.
port link-type trunk
By default, each port is an access port. For more information about the port link-type
trunk command, see Layer 2—LAN Switching Command Reference.
5. Configure the trunk port to permit the specified VLANs.
port trunk permit vlan { vlan-id-list | all }
By default, a trunk port permits only VLAN 1.
Make sure the trunk port permits all registered VLANs.
For more information about the port trunk permit vlan command, see Layer 2—LAN
Switching Command Reference.
6. Enable MVRP on the port.
mvrp enable
By default, MVRP is disabled on a port.
5
Table 1 Dependencies of the Join, Leave, and LeaveAll timers
• To avoid frequent VLAN registrations and deregistrations, use the same MRP timers throughout
the network.
• Each port maintains its own Periodic, Join, and LeaveAll timers, and each attribute of a port
maintains a Leave timer.
• As a best practice, restore the timers in the order of Join, Leave, and LeaveAll when you restore
these timers to their default values.
• You can restore the Periodic timer to its default value at any time.
Procedure
1. Enter system view.
system-view
2. Enter Layer 2 Ethernet interface view or Layer 2 aggregate interface view.
interface interface-type interface-number
3. Set the LeaveAll timer.
mrp timer leaveall timer-value
The default setting is 1000 centiseconds.
4. Set the Join timer.
mrp timer join timer-value
The default setting is 20 centiseconds.
5. Set the Leave timer.
mrp timer leave timer-value
The default setting is 60 centiseconds.
6. Set the Periodic timer.
mrp timer periodic timer-value
The default setting is 100 centiseconds.
6
system-view
2. Enable GVRP compatibility.
mvrp gvrp-compliance enable
By default, GVRP compatibility is disabled.
Task Command
display mvrp running-status [ interface
Display MVRP running status.
interface-list ]
Display the MVRP state of a port in a display mvrp state interface interface-type
VLAN. interface-number vlan vlan-id
display mvrp statistics [ interface
Display MVRP statistics.
interface-list ]
reset mvrp statistics [ interface
Clear MVRP statistics.
interface-list ]
7
Figure 2 Network diagram
Device A Device B
Permit: all VLANs
WGE1/0/3 WGE1/0/3
WG
WG
/2
/0/
VLAN 10 E1
/0/ E 1/0 VLAN 20
E1
E1
2 WG
WG
/0/
1
Permit: all VLANs Permit: VLANs 20, 40
N s Pe
rm
VLA it:
all VL
WG
t: AN
/0/ mi
E1 r 40 WG
0/2 Pe
E1
E1
1/ /0/
WG
/0/
E 2
WG
1
VLAN 10 à MSTI 1
VLAN 20 à MSTI 2
Other VLANs à MSTI 0
Device C Device D
A B A B A B
C D C C D
MSTI 0 MSTI 1 MSTI 2
Procedure
1. Configure Device A:
# Enter MST region view.
<DeviceA> system-view
[DeviceA] stp region-configuration
# Configure the MST region name, VLAN-to-instance mappings, and revision level.
[DeviceA-mst-region] region-name example
[DeviceA-mst-region] instance 1 vlan 10
[DeviceA-mst-region] instance 2 vlan 20
[DeviceA-mst-region] revision-level 0
# Manually activate the MST region configuration.
[DeviceA-mst-region] active region-configuration
[DeviceA-mst-region] quit
# Configure Device A as the primary root bridge of MSTI 1.
[DeviceA] stp instance 1 root primary
# Globally enable the spanning tree feature.
[DeviceA] stp global enable
# Globally enable MVRP.
[DeviceA] mvrp global enable
8
# Configure Twenty-FiveGigE 1/0/1 as a trunk port, and configure it to permit all VLANs.
[DeviceA] interface twenty-fivegige 1/0/1
[DeviceA-Twenty-FiveGigE1/0/1] port link-type trunk
[DeviceA-Twenty-FiveGigE1/0/1] port trunk permit vlan all
# Enable MVRP on Twenty-FiveGigE 1/0/1.
[DeviceA-Twenty-FiveGigE1/0/1] mvrp enable
[DeviceA-Twenty-FiveGigE1/0/1] quit
# Configure Twenty-FiveGigE 1/0/2 as a trunk port, and configure it to permit VLAN 40.
[DeviceA] interface twenty-fivegige 1/0/2
[DeviceA-Twenty-FiveGigE1/0/2] port link-type trunk
[DeviceA-Twenty-FiveGigE1/0/2] port trunk permit vlan 40
# Enable MVRP on Twenty-FiveGigE 1/0/2.
[DeviceA-Twenty-FiveGigE1/0/2] mvrp enable
[DeviceA-Twenty-FiveGigE1/0/2] quit
# Configure Twenty-FiveGigE 1/0/3 as a trunk port, and configure it to permit all VLANs.
[DeviceA] interface twenty-fivegige 1/0/3
[DeviceA-Twenty-FiveGigE1/0/3] port link-type trunk
[DeviceA-Twenty-FiveGigE1/0/3] port trunk permit vlan all
# Enable MVRP on Twenty-FiveGigE 1/0/3.
[DeviceA-Twenty-FiveGigE1/0/3] mvrp enable
[DeviceA-Twenty-FiveGigE1/0/3] quit
# Create VLAN 10.
[DeviceA] vlan 10
[DeviceA-vlan10] quit
2. Configure Device B:
# Enter MST region view.
<DeviceB> system-view
[DeviceB] stp region-configuration
# Configure the MST region name, VLAN-to-instance mappings, and revision level.
[DeviceB-mst-region] region-name example
[DeviceB-mst-region] instance 1 vlan 10
[DeviceB-mst-region] instance 2 vlan 20
[DeviceB-mst-region] revision-level 0
# Manually activate the MST region configuration.
[DeviceB-mst-region] active region-configuration
[DeviceB-mst-region] quit
# Configure Device B as the primary root bridge of MSTI 2.
[DeviceB] stp instance 2 root primary
# Globally enable the spanning tree feature.
[DeviceB] stp global enable
# Globally enable MVRP.
[DeviceB] mvrp global enable
# Configure Twenty-FiveGigE 1/0/1 as a trunk port, and configure it to permit VLANs 20 and 40.
[DeviceB] interface twenty-fivegige 1/0/1
[DeviceB-Twenty-FiveGigE1/0/1] port link-type trunk
[DeviceB-Twenty-FiveGigE1/0/1] port trunk permit vlan 20 40
# Enable MVRP on Twenty-FiveGigE 1/0/1.
9
[DeviceB-Twenty-FiveGigE1/0/1] mvrp enable
[DeviceB-Twenty-FiveGigE1/0/1] quit
# Configure Twenty-FiveGigE 1/0/2 as a trunk port, and configure it to permit all VLANs.
[DeviceB] interface twenty-fivegige 1/0/2
[DeviceB-Twenty-FiveGigE1/0/2] port link-type trunk
[DeviceB-Twenty-FiveGigE1/0/2] port trunk permit vlan all
# Enable MVRP on Twenty-FiveGigE 1/0/2.
[DeviceB-Twenty-FiveGigE1/0/2] mvrp enable
[DeviceB-Twenty-FiveGigE1/0/2] quit
# Configure Twenty-FiveGigE 1/0/3 as a trunk port, and configure it to permit all VLANs.
[DeviceB] interface twenty-fivegige 1/0/3
[DeviceB-Twenty-FiveGigE1/0/3] port link-type trunk
[DeviceB-Twenty-FiveGigE1/0/3] port trunk permit vlan all
# Enable MVRP on Twenty-FiveGigE 1/0/3.
[DeviceB-Twenty-FiveGigE1/0/3] mvrp enable
[DeviceB-Twenty-FiveGigE1/0/3] quit
# Create VLAN 20.
[DeviceB] vlan 20
[DeviceB-vlan20] quit
3. Configure Device C:
# Enter MST region view.
<DeviceC> system-view
[DeviceC] stp region-configuration
# Configure the MST region name, VLAN-to-instance mappings, and revision level.
[DeviceC-mst-region] region-name example
[DeviceC-mst-region] instance 1 vlan 10
[DeviceC-mst-region] instance 2 vlan 20
[DeviceC-mst-region] revision-level 0
# Manually activate the MST region configuration.
[DeviceC-mst-region] active region-configuration
[DeviceC-mst-region] quit
# Configure Device C as the root bridge of MSTI 0.
[DeviceC] stp instance 0 root primary
# Globally enable the spanning tree feature.
[DeviceC] stp global enable
# Globally enable MVRP.
[DeviceC] mvrp global enable
# Configure Twenty-FiveGigE 1/0/1 as a trunk port, and configure it to permit all VLANs.
[DeviceC] interface twenty-fivegige 1/0/1
[DeviceC-Twenty-FiveGigE1/0/1] port link-type trunk
[DeviceC-Twenty-FiveGigE1/0/1] port trunk permit vlan all
# Enable MVRP on Twenty-FiveGigE 1/0/1.
[DeviceC-Twenty-FiveGigE1/0/1] mvrp enable
[DeviceC-Twenty-FiveGigE1/0/1] quit
# Configure Twenty-FiveGigE 1/0/2 as a trunk port, and configure it to permit all VLANs.
[DeviceC] interface twenty-fivegige 1/0/2
[DeviceC-Twenty-FiveGigE1/0/2] port link-type trunk
10
[DeviceC-Twenty-FiveGigE1/0/2] port trunk permit vlan all
# Enable MVRP on Twenty-FiveGigE 1/0/2.
[DeviceC-Twenty-FiveGigE1/0/2] mvrp enable
[DeviceC-Twenty-FiveGigE1/0/2] quit
4. Configure Device D:
# Enter MST region view.
<DeviceD> system-view
[DeviceD] stp region-configuration
# Configure the MST region name, VLAN-to-instance mappings, and revision level.
[DeviceD-mst-region] region-name example
[DeviceD-mst-region] instance 1 vlan 10
[DeviceD-mst-region] instance 2 vlan 20
[DeviceD-mst-region] revision-level 0
# Manually activate the MST region configuration.
[DeviceD-mst-region] active region-configuration
[DeviceD-mst-region] quit
# Globally enable the spanning tree feature.
[DeviceD] stp global enable
# Globally enable MVRP.
[DeviceD] mvrp global enable
# Configure Twenty-FiveGigE 1/0/1 as a trunk port, and configure it to permit VLANs 20 and 40.
[DeviceD] interface twenty-fivegige 1/0/1
[DeviceD-Twenty-FiveGigE1/0/1] port link-type trunk
[DeviceD-Twenty-FiveGigE1/0/1] port trunk permit vlan 20 40
# Enable MVRP on Twenty-FiveGigE 1/0/1.
[DeviceD-Twenty-FiveGigE1/0/1] mvrp enable
[DeviceD-Twenty-FiveGigE1/0/1] quit
# Configure Twenty-FiveGigE 1/0/2 as a trunk port, and configure it to permit VLAN 40.
[DeviceD] interface twenty-fivegige 1/0/2
[DeviceD-Twenty-FiveGigE1/0/2] port link-type trunk
[DeviceD-Twenty-FiveGigE1/0/2] port trunk permit vlan 40
# Enable MVRP on Twenty-FiveGigE 1/0/2.
[DeviceD-Twenty-FiveGigE1/0/2] mvrp enable
[DeviceD-Twenty-FiveGigE1/0/2] quit
----[Twenty-FiveGigE1/0/1]----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
11
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Normal
Registered VLANs :
1(default)
Declared VLANs :
1(default), 10, 20
Propagated VLANs :
1(default)
----[Twenty-FiveGigE1/0/2]----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Normal
Registered VLANs :
None
Declared VLANs :
1(default)
Propagated VLANs :
None
----[Twenty-FiveGigE1/0/3]----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Normal
Registered VLANs :
20
Declared VLANs :
1(default), 10
Propagated VLANs :
20
The output shows that the following events have occurred:
Twenty-FiveGigE 1/0/1 has registered VLAN 1, declared VLAN 1, VLAN 10, and VLAN 20,
and propagated VLAN 1 through MVRP.
Twenty-FiveGigE 1/0/2 has declared VLAN 1, and registered and propagated no VLANs.
Twenty-FiveGigE 1/0/3 has registered VLAN 20, declared VLAN 1 and VLAN 10, and
propagated VLAN 20 through MVRP.
# Display local VLAN information on Device B.
[DeviceB] display mvrp running-status
-------[MVRP Global Info]-------
12
Global Status : Enabled
Compliance-GVRP : False
----[Twenty-FiveGigE1/0/1]----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Normal
Registered VLANs :
1(default)
Declared VLANs :
1(default), 20
Propagated VLANs :
1(default)
----[Twenty-FiveGigE1/0/2]----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Normal
Registered VLANs :
1(default), 10
Declared VLANs :
1(default), 20
Propagated VLANs :
1(default)
----[Twenty-FiveGigE1/0/3]----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Normal
Registered VLANs :
1(default), 10
Declared VLANs :
20
Propagated VLANs :
10
The output shows that the following events have occurred:
13
Twenty-FiveGigE 1/0/1 has registered VLAN 1, declared VLAN 1 and VLAN 20, and
propagated VLAN 1 through MVRP.
Twenty-FiveGigE 1/0/2 has registered VLAN 1 and VLAN 10, declared VLAN 1 and VLAN
20, and propagated VLAN 1.
Twenty-FiveGigE 1/0/3 has registered VLAN 1 and VLAN 10, declared VLAN 20, and
propagated VLAN 10 through MVRP.
# Display local VLAN information on Device C.
[DeviceC] display mvrp running-status
-------[MVRP Global Info]-------
Global Status : Enabled
Compliance-GVRP : False
----[Twenty-FiveGigE1/0/1]----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Normal
Registered VLANs :
1(default), 10, 20
Declared VLANs :
1(default)
Propagated VLANs :
1(default), 10
----[Twenty-FiveGigE1/0/2]----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Normal
Registered VLANs :
1(default), 20
Declared VLANs :
1(default), 10
Propagated VLANs :
1(default), 20
The output shows that the following events have occurred:
Twenty-FiveGigE 1/0/1 has registered VLAN 1, VLAN 10, and VLAN 20, declared VLAN 1,
and propagated VLAN 1 and VLAN 10 through MVRP.
Twenty-FiveGigE 1/0/2 has registered VLAN 1 and VLAN 20, declared VLAN 1 and VLAN
10, and propagated VLAN 1 and VLAN 20 through MVRP.
# Display local VLAN information on Device D.
[DeviceD] display mvrp running-status
-------[MVRP Global Info]-------
14
Global Status : Enabled
Compliance-GVRP : False
----[Twenty-FiveGigE1/0/1]----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Normal
Registered VLANs :
1(default), 20
Declared VLANs :
1(default)
Propagated VLANs :
1(default), 20
----[Twenty-FiveGigE1/0/2]----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Normal
Registered VLANs :
1(default)
Declared VLANs :
None
Propagated VLANs :
None
The output shows that the following events have occurred:
Twenty-FiveGigE 1/0/1 has registered and propagated VLAN 10 and VLAN 20, and
declared VLAN 1 through MVRP.
Twenty-FiveGigE 1/0/2 has registered VLAN 1, and declared and propagated no VLANs
through MVRP.
2. Verify the configuration after changing the registration mode.
When the network is stable, set the MVRP registration mode to fixed on the port of Device B
connected to Device A. Then, verify that dynamic VLANs on the port will not be deregistered.
# Set the MVRP registration mode to fixed on Twenty-FiveGigE 1/0/3 of Device B.
[DeviceB] interface twenty-fivegige 1/0/3
[DeviceB-Twenty-FiveGigE1/0/3] mvrp registration fixed
[DeviceB-Twenty-FiveGigE1/0/3] quit
# Display local MVRP VLAN information on Twenty-FiveGigE 1/0/3.
[DeviceB] display mvrp running-status interface twenty-fivegige 1/0/3
-------[MVRP Global Info]-------
Global Status : Enabled
15
Compliance-GVRP : False
----[Twenty-FiveGigE1/0/3]----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Fixed
Registered VLANs :
1(default), 10
Declared VLANs :
20
Propagated VLANs :
10
The output shows that VLAN information on Twenty-FiveGigE 1/0/3 is not changed after you
set its MVRP registration mode to fixed.
# Delete VLAN 10 on Device A.
[DeviceA] undo vlan 10
# Display local MVRP VLAN information on Twenty-FiveGigE 1/0/3 of Device B.
[DeviceB] display mvrp running-status interface twenty-fivegige 1/0/3
-------[MVRP Global Info]-------
Global Status : Enabled
Compliance-GVRP : False
----[Twenty-FiveGigE1/0/3]----
Config Status : Enabled
Running Status : Enabled
Join Timer : 20 (centiseconds)
Leave Timer : 60 (centiseconds)
Periodic Timer : 100 (centiseconds)
LeaveAll Timer : 1000 (centiseconds)
Registration Type : Fixed
Registered VLANs :
1(default), 10
Declared VLANs :
20
Propagated VLANs :
10
The output shows that dynamic VLAN information on Twenty-FiveGigE 1/0/3 is not changed
after you set its MVRP registration mode to fixed.
16
Contents
Configuring loopback, null, and inloopback interfaces ··································· 1
About loopback, null, and inloopback interfaces ································································································ 1
About loopback interfaces ·························································································································· 1
About null interfaces··································································································································· 1
About inloopback interfaces ······················································································································· 1
Configuring a loopback interface ······················································································································· 1
Configuring a null interface ································································································································ 2
Restoring the default settings for an interface ··································································································· 2
Display and maintenance commands for loopback, null, and inloopback interfaces ········································· 3
i
Configuring loopback, null, and
inloopback interfaces
This chapter describes how to configure a loopback interface, a null interface, and an inloopback
interface.
1
interface loopback interface-number
3. Configure the interface description.
description text
The default setting is interface name Interface (for example, LoopBack1 Interface).
4. Configure the expected bandwidth of the loopback interface.
bandwidth bandwidth-value
By default, the expected bandwidth of a loopback interface is 0 kbps.
5. Bring up the loopback interface.
undo shutdown
By default, a loopback interface is up.
CAUTION:
This feature might interrupt ongoing network services. Make sure you are fully aware of the impact
of this feature when you use it on a live network.
This feature might fail to restore the default settings for some commands because of command
dependencies or system restrictions. You can use the display this command in interface view
to check for these commands and perform their undo forms or follow the command reference to
restore their default settings. If your restoration attempt still fails, follow the error message to resolve
the problem.
Procedure
1. Enter system view.
system-view
2. Enter loopback interface view or null interface view.
interface loopback interface-number
interface null 0
3. Restore the default settings for the interface.
default
2
Display and maintenance commands for
loopback, null, and inloopback interfaces
Execute display commands in any view and reset commands in user view.
Task Command
3
Contents
Configuring QinQ ··························································································· 1
About QinQ ························································································································································ 1
QinQ benefits ············································································································································· 1
How QinQ works ········································································································································ 1
QinQ implementations································································································································ 2
Protocols and standards ···························································································································· 3
Restrictions and guidelines: QinQ configuration ································································································ 3
Enabling QinQ ···················································································································································· 3
Configuring transmission for transparent VLANs ······························································································· 4
Configuring the TPID for VLAN tags ·················································································································· 5
About TPID················································································································································· 5
Restrictions and guidelines ························································································································ 5
Configuring the TPID for CVLAN tags········································································································ 6
Configuring the TPID for SVLAN tags ········································································································ 6
Setting the 802.1p priority in SVLAN tags ·········································································································· 6
About the 802.1p priority in SVLAN tags···································································································· 6
Prerequisites for setting the 802.1p priority in SVLAN tags ······································································· 6
Tasks at a glance ······································································································································· 7
Creating a traffic class and configuring CVLAN match criteria ·································································· 7
Creating a traffic behavior and configuring a priority marking action for SVLAN tags ······························· 7
Creating a QoS policy ································································································································ 7
Applying the QoS policy ····························································································································· 8
Display and maintenance commands for QinQ ································································································· 8
QinQ configuration examples ····························································································································· 8
Example: Configuring basic QinQ ·············································································································· 8
Example: Configuring VLAN transparent transmission ············································································ 10
i
Configuring QinQ
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.
About QinQ
802.1Q-in-802.1Q (QinQ) adds an 802.1Q tag to 802.1Q tagged customer traffic. It enables a
service provider to extend Layer 2 connections across an Ethernet network between customer sites.
QinQ benefits
QinQ provides the following benefits:
• Enables a service provider to use a single SVLAN to convey multiple CVLANs for a customer.
• Enables customers to plan CVLANs without conflicting with SVLANs.
• Enables customers to keep their VLAN assignment schemes unchanged when the service
provider changes its VLAN assignment scheme.
• Allows different customers to use overlapping CVLAN IDs. Devices in the service provider
network make forwarding decisions based on SVLAN IDs instead of CVLAN IDs.
1
As shown in Figure 2, customer A has remote sites CE 1 and CE 4. Customer B has remote sites CE
2 and CE 3. The CVLANs of the two customers overlap. The service provider assigns SVLANs 3 and
4 to customers A and B, respectively.
When a tagged Ethernet frame from CE 1 arrives at PE 1, the PE tags the frame with SVLAN 3. The
double-tagged Ethernet frame travels over the service provider network until it arrives at PE 2. PE 2
removes the SVLAN tag of the frame, and then sends the frame to CE 4.
Figure 2 Typical QinQ application scenario
VLANs 1 to 20 VLANs 1 to 10
CE 3 CE 4
Customer Customer
network B network A
CVLAN B Data CVLAN A Data
PE 1 Internet PE 2
VLANs 1 to 10 VLANs 1 to 20
QinQ implementations
QinQ is enabled on a per-port basis. The link type of a QinQ-enabled port can be access, hybrid, or
trunk. The QinQ tagging behaviors are the same across these types of ports.
A QinQ-enabled port tags all incoming frames (tagged or untagged) with the PVID tag.
• If an incoming frame already has one tag, it becomes a double-tagged frame.
• If the frame does not have any 802.1Q tags, it becomes a frame tagged with the PVID.
QinQ provides the most basic VLAN manipulation method to tag all incoming frames (tagged or
untagged) with the PVID tag. To perform advanced VLAN manipulations, use VLAN mappings or
QoS policies as follows:
• To add different SVLANs for different CVLAN tags, use one-to-two VLAN mappings.
• To replace the SVLAN ID, CVLAN ID, or both IDs for an incoming double-tagged frame, use
two-to-two VLAN mappings.
• To use criteria other than the CVLAN ID to match packets for SVLAN tagging, use the QoS nest
action. The QoS nest action can also be used with other actions in the same traffic behavior.
• To set the 802.1p priority in SVLAN tags, use the priority marking action as described in "Setting
the 802.1p priority in SVLAN tags."
For more information about VLAN mappings, see "Configuring VLAN mapping." For more
information about QoS, see ACL and QoS Configuration Guide.
2
Protocols and standards
• IEEE 802.1Q, IEEE Standard for Local and Metropolitan Area Networks-Virtual Bridged Local
Area Networks
• IEEE 802.1ad, IEEE Standard for Local and Metropolitan Area Networks-Virtual Bridged Local
Area Networks-Amendment 4: Provider Bridges
Enabling QinQ
About this task
Enable QinQ on customer-side ports of PEs. A QinQ-enabled port tags an incoming frame with its
PVID.
Restrictions and guidelines
Before you enable or disable QinQ on a port, you must remove any VLAN mappings on the port. For
more information about VLAN mapping, see Layer 2—LAN Switching Configuration Guide.
Procedure
1. Enter system view.
system-view
2. Enter Layer 2 Ethernet interface view or Layer 2 aggregate interface view.
interface interface-type interface-number
3. Set the port link type.
port link-type { access | hybrid | trunk }
By default, the link type of a port is access.
4. Configure the port to allow packets from its PVID to pass through.
Assign the access port to the specified VLAN.
port access vlan vlan-id
By default, all access ports belong to VLAN 1.
The PVID of an access port is the VLAN to which the port belongs. The port sends packets
from the VLAN untagged.
Configure the hybrid port to send packets from its PVID untagged.
port hybrid vlan vlan-id-list untagged
By default, the hybrid port is an untagged member of the VLAN to which the port belongs
when its link type is access.
3
Configure trunk port to allow packets from its PVID to pass through.
port trunk permit vlan { vlan-id-list | all }
By default, a trunk port allows packets only from VLAN 1 to pass through.
5. Enable QinQ on the port.
qinq enable
By default, QinQ is disabled on the port.
4
Configuring the TPID for VLAN tags
About TPID
TPID identifies a frame as an 802.1Q tagged frame. The TPID value varies by vendor. On an H3C
device, the TPID in the 802.1Q tag added on a QinQ-enabled port is 0x8100 by default, in
compliance with IEEE 802.1Q. In a multi-vendor network, make sure the TPID setting is the same
between directly connected devices so 802.1Q tagged frames can be identified correctly.
TPID settings include CVLAN TPID and SVLAN TPID.
A QinQ-enabled port uses the CVLAN TPID to match incoming tagged frames. An incoming frame is
handled as untagged if its TPID is different from the CVLAN TPID.
SVLAN TPIDs are configurable on a per-port basis. A port without QinQ enabled uses the SVLAN
TPID to replace the TPID in outgoing frames' SVLAN tags and match incoming tagged frames. An
incoming frame is handled as untagged if the TPID in its outer VLAN tag is different from the SVLAN
TPID.
The TPID field is at the same position as the EtherType field in an untagged Ethernet frame. To
ensure correct packet type identification, do not set the TPID value to any of the values listed in Table
1.
Table 1 Reserved EtherType values
5
Configuring the TPID for CVLAN tags
1. Enter system view.
system-view
2. Set the TPID for CVLAN tags.
qinq ethernet-type customer-tag hex-value
By default, the TPID is 0x8100 for CVLAN tags.
6
Tasks at a glance
To use QoS policies to set the 802.1p priority in SVLAN tags, perform the following tasks:
1. Creating a traffic class and configuring CVLAN match criteria
2. Creating a traffic behavior and configuring a priority marking action for SVLAN tags
3. Creating a QoS policy
4. Applying the QoS policy
7
Applying the QoS policy
1. Enter system view.
system-view
2. Enter Layer 2 Ethernet interface view.
interface interface-type interface-number
3. Apply the QoS policy to the inbound direction of the port.
qos apply policy policy-name inbound
Task Command
display qinq [ interface
Display QinQ-enabled ports.
interface-type interface-number ]
8
Figure 3 Network diagram
VLANs 30 to 90 VLANs 10 to 70
Site 3 CE 3 CE 4 Site 2
Company B Company A
WGE1/0/3 WGE1/0/3
WGE1/0/2 VLANs 100 and 200 WGE1/0/2
PE 1 PE 2
TPID = 0x8200
WGE1/0/1 WGE1/0/1
Company A Company B
Site 1 CE 1 CE 2 Site 4
VLANs 10 to 70 VLANs 30 to 90
Procedure
1. Configure PE 1:
# Configure Twenty-FiveGigE 1/0/1 as a trunk port, and assign it to VLAN 100.
<PE1> system-view
[PE1] interface twenty-fivegige 1/0/1
[PE1-Twenty-FiveGigE1/0/1] port link-type trunk
[PE1-Twenty-FiveGigE1/0/1] port trunk permit vlan 100
# Set the PVID of Twenty-FiveGigE 1/0/1 to VLAN 100.
[PE1-Twenty-FiveGigE1/0/1] port trunk pvid vlan 100
# Enable QinQ on Twenty-FiveGigE 1/0/1.
[PE1-Twenty-FiveGigE1/0/1] qinq enable
[PE1-Twenty-FiveGigE1/0/1] quit
# Configure Twenty-FiveGigE 1/0/2 as a trunk port, and assign it to VLANs 100 and 200.
[PE1] interface twenty-fivegige 1/0/2
[PE1-Twenty-FiveGigE1/0/2] port link-type trunk
[PE1-Twenty-FiveGigE1/0/2] port trunk permit vlan 100 200
# Set the TPID value in the SVLAN tags to 0x8200 on Twenty-FiveGigE 1/0/2.
[PE1-Twenty-FiveGigE1/0/2] qinq ethernet-type service-tag 8200
[PE1-Twenty-FiveGigE1/0/2] quit
# Configure Twenty-FiveGigE 1/0/3 as a trunk port, and assign it to VLAN 200.
[PE1] interface twenty-fivegige 1/0/3
[PE1-Twenty-FiveGigE1/0/3] port link-type trunk
[PE1-Twenty-FiveGigE1/0/3] port trunk permit vlan 200
# Set the PVID of Twenty-FiveGigE 1/0/3 to VLAN 200.
[PE1-Twenty-FiveGigE1/0/3] port trunk pvid vlan 200
# Enable QinQ on Twenty-FiveGigE 1/0/3.
[PE1-Twenty-FiveGigE1/0/3] qinq enable
9
[PE1-Twenty-FiveGigE1/0/3] quit
2. Configure PE 2:
# Configure Twenty-FiveGigE 1/0/1 as a trunk port, and assign it to VLAN 200.
<PE2> system-view
[PE2] interface twenty-fivegige 1/0/1
[PE2-Twenty-FiveGigE1/0/1] port link-type trunk
[PE2-Twenty-FiveGigE1/0/1] port trunk permit vlan 200
# Set the PVID of Twenty-FiveGigE 1/0/1 to VLAN 200.
[PE2-Twenty-FiveGigE1/0/1] port trunk pvid vlan 200
# Enable QinQ on Twenty-FiveGigE 1/0/1.
[PE2-Twenty-FiveGigE1/0/1] qinq enable
[PE2-Twenty-FiveGigE1/0/1] quit
# Configure Twenty-FiveGigE 1/0/2 as a trunk port, and assign it to VLANs 100 and 200.
[PE2] interface twenty-fivegige 1/0/2
[PE2-Twenty-FiveGigE1/0/2] port link-type trunk
[PE2-Twenty-FiveGigE1/0/2] port trunk permit vlan 100 200
# Set the TPID value in the SVLAN tags to 0x8200 on Twenty-FiveGigE 1/0/2.
[PE2-Twenty-FiveGigE1/0/2] qinq ethernet-type service-tag 8200
[PE2-Twenty-FiveGigE1/0/2] quit
# Configure Twenty-FiveGigE 1/0/3 as a trunk port, and assign it to VLAN 100.
[PE2] interface twenty-fivegige 1/0/3
[PE2-Twenty-FiveGigE1/0/3] port link-type trunk
[PE2-Twenty-FiveGigE1/0/3] port trunk permit vlan 100
# Set the PVID of Twenty-FiveGigE 1/0/3 to VLAN 100.
[PE2-Twenty-FiveGigE1/0/3] port trunk pvid vlan 100
# Enable QinQ on Twenty-FiveGigE 1/0/3.
[PE2-Twenty-FiveGigE1/0/3] qinq enable
[PE2-Twenty-FiveGigE1/0/3] quit
3. Configure the devices between PE 1 and PE 2:
# Set the MTU to a minimum of 1504 bytes for each port on the path of QinQ frames. (Details
not shown.)
# Configure all ports on the forwarding path to allow frames from VLANs 100 and 200 to pass
through without removing the VLAN tag. (Details not shown.)
10
Figure 4 Network diagram
PE 1 PE 2
WGE1/0/2 WGE1/0/2
VLANs 100 and 3000
WGE1/0/1 WGE1/0/1
Site 1 Site 2
CE 1 CE 2
Procedure
1. Configure PE 1:
# Configure Twenty-FiveGigE 1/0/1 as a trunk port, and assign it to VLAN 100 and VLAN 3000.
<PE1> system-view
[PE1] interface twenty-fivegige 1/0/1
[PE1-Twenty-FiveGigE1/0/1] port link-type trunk
[PE1-Twenty-FiveGigE1/0/1] port trunk permit vlan 100 3000
# Set the PVID of Twenty-FiveGigE 1/0/1 to VLAN 100.
[PE1-Twenty-FiveGigE1/0/1] port trunk pvid vlan 100
# Enable QinQ on Twenty-FiveGigE 1/0/1.
[PE1-Twenty-FiveGigE1/0/1] qinq enable
# Enable transparent transmission for VLAN 3000 on Twenty-FiveGigE 1/0/1.
[PE1-Twenty-FiveGigE1/0/1] qinq transparent-vlan 3000
[PE1-Twenty-FiveGigE1/0/1] quit
# Configure Twenty-FiveGigE 1/0/2 as a trunk port, and assign it to VLANs 100 and 3000.
[PE1] interface twenty-fivegige 1/0/2
[PE1-Twenty-FiveGigE1/0/2] port link-type trunk
[PE1-Twenty-FiveGigE1/0/2] port trunk permit vlan 100 3000
[PE1-Twenty-FiveGigE1/0/2] quit
2. Configure PE 2:
# Configure Twenty-FiveGigE 1/0/1 as a trunk port, and assign it to VLAN 100 and VLAN 3000.
<PE2> system-view
[PE2] interface twenty-fivegige 1/0/1
[PE2-Twenty-FiveGigE1/0/1] port link-type trunk
[PE2-Twenty-FiveGigE1/0/1] port trunk permit vlan 100 3000
# Set the PVID of Twenty-FiveGigE 1/0/1 to VLAN 100.
[PE1-Twenty-FiveGigE1/0/1] port trunk pvid vlan 100
# Enable QinQ on Twenty-FiveGigE 1/0/1.
[PE2-Twenty-FiveGigE1/0/1] qinq enable
# Enable transparent transmission for VLAN 3000 on Twenty-FiveGigE 1/0/1.
[PE2-Twenty-FiveGigE1/0/1] qinq transparent-vlan 3000
[PE2-Twenty-FiveGigE1/0/1] quit
11
# Configure Twenty-FiveGigE 1/0/2 as a trunk port, and assign it to VLANs 100 and 3000.
[PE2] interface twenty-fivegige 1/0/2
[PE2-Twenty-FiveGigE1/0/2] port link-type trunk
[PE2-Twenty-FiveGigE1/0/2] port trunk permit vlan 100 3000
3. Configure the devices between PE 1 and PE 2:
# Set the MTU to a minimum of 1504 bytes for each port on the path of QinQ frames. (Details
not shown.)
# Configure all ports on the forwarding path to allow frames from VLANs 100 and 3000 to pass
through without removing the VLAN tag. (Details not shown.)
12
Contents
Configuring VLAN mapping ··········································································· 1
About VLAN mapping········································································································································· 1
VLAN mapping types ································································································································· 1
VLAN mapping application scenarios ········································································································ 1
VLAN mapping implementations ················································································································ 4
Restrictions and guidelines: VLAN mapping configuration ················································································ 7
VLAN mapping tasks at a glance ······················································································································· 7
Prerequisites ······················································································································································ 8
Configuring one-to-one VLAN mapping ············································································································· 8
Configuring many-to-one VLAN mapping ·········································································································· 8
About many-to-one VLAN mapping ··········································································································· 8
Configuring many-to-one VLAN mapping in dynamic IP address assignment environment ······················ 9
Configuring many-to-one VLAN mapping in static IP address assignment environment ························· 11
Configuring one-to-two VLAN mapping ··········································································································· 13
Configuring two-to-one VLAN mapping ··········································································································· 13
Configuring two-to-two VLAN mapping ············································································································ 14
Display and maintenance commands for VLAN mapping ················································································ 15
VLAN mapping configuration examples ··········································································································· 15
Example: Configuring one-to-one and many-to-one VLAN mapping ······················································· 15
Example: Configuring one-to-two and two-to-two VLAN mapping ··························································· 20
i
Configuring VLAN mapping
About VLAN mapping
VLAN mapping re-marks VLAN traffic with new VLAN IDs.
1
Figure 1 Application scenario of one-to-one and many-to-one VLAN mapping
DHCP client
VLAN 1
PC
Home gateway
VLAN 2
VoD
Wiring-closet
switch DHCP server
VLAN 1
PC VLAN 1 -> VLAN 102
VLAN 2 -> VLAN 202
VLAN 3 -> .VLAN 302
..
VLAN 2
VoD
Home gateway VLANs 101 and 102 -> VLAN 501
VLANs 201 and 202 -> VLAN 502
VLAN 3 VLANs 301 and .302 -> VLAN 503
VoIP ..
... ... ...
Campus switch ..
.
VLAN 1
PC
VLANs 199 and 200 -> VLAN 501
VLANs 299 and 300 -> VLAN 502
Home gateway VLANs 399 and 400 -> VLAN 503
VLAN 2
VoD ...
Distribution
VLAN 1 -> VLAN 199 network
VLAN 3 VLAN 2 -> VLAN 299
VoIP VLAN 3 -> VLAN 399
Wiring-closet
switch
VLAN 1
PC VLAN 1 -> VLAN 200
VLAN 2 -> VLAN 300
VLAN 3 -> VLAN 400
VLAN 2
VoD
Home gateway
VLAN 3
VoIP
2
Figure 2 Application scenario of one-to-two and two-to-two VLAN mapping
PE 1 PE 2 PE 3 PE 4
SP 1 SP 2
Traffic
VPN A VPN A
CE 1 Site 1 Site 2 CE 2
As shown in Figure 2, Site 1 and Site 2 of VPN A are in VLAN 2 and VLAN 3, respectively. The SP 1
network assigns SVLAN 10 to Site 1. The SP 2 network assigns SVLAN 20 to Site 2. When the
packet from Site 1 arrives at PE 1, PE 1 tags the packet with SVLAN 10 by using one-to-two VLAN
mapping.
When the double-tagged packet from the SP 1 network arrives at the SP 2 network interface, PE 3
processes the packet as follows:
• Replaces SVLAN tag 10 with SVLAN tag 20.
• Replaces CVLAN tag 2 with CVLAN tag 3.
One-to-two VLAN mapping provides the following benefits:
• Enables a customer network to plan its CVLAN assignment without conflicting with SVLANs.
• Adds a VLAN tag to a tagged packet and expands the number of available VLANs to 4094 ×
4094.
• Reduces the stress on the SVLAN resources, which were 4094 VLANs in the SP network
before the mapping process was initiated.
Two-to-one VLAN mapping
As shown in Figure 3, configure VLANs and VLAN mappings to isolate traffic of different services and
ensure the communication between the user network and the service provider network:
• On Device A, assign different types of service traffic to different VLANs.
• On Device B, configure one-to-one VLAN mappings and one-to-two VLAN mappings for uplink
traffic.
• On Device B, configure two-to-one VLAN mappings for the downlink traffic. After receiving
double-tagged reply packets, Device B removes their double VLAN tags and adds the original
VLAN tags to them.
3
Figure 3 Application scenario of two-to-one VLAN mapping
VLAN 2
PC
VLAN 2 -> VLAN 20
VLAN 3 -> VLAN 30
Device A Device B
SP network
VLAN 2
PC
Device A Device B
SP network
VLAN 2 <- VLAN 20 VLAN 200
VLAN 3 <- VLAN 30 VLAN 300
VLAN 3
VoD
Downlink traffic
SP
Network-side port
Customer-side port
Uplink traffic
Downlink traffic
4
Figure 5 One-to-one VLAN mapping implementation
One-to-one
VLAN mapping
Customer-side Network-side
CVLAN 1 Data many-to-one many-to-one SVLAN Data
.. VLAN mapping VLAN mapping ..
. .
5
Figure 7 One-to-two VLAN mapping implementation
Two-to-one
VLAN mapping
6
Figure 9 Two-to-two VLAN mapping implementation
Two-to-two
VLAN mapping
SP network 1 SP network 2
7
Prerequisites
Before you configure VLAN mapping, create original and translated VLANs.
8
Configuring many-to-one VLAN mapping in dynamic IP
address assignment environment
About this task
In a network that uses dynamic address assignment, configure many-to-one VLAN mapping with
DHCP snooping.
The switch replaces the SVLAN tag of the downlink traffic with the associated CVLAN tag based on
the DHCP snooping entry lookup.
Restrictions and guidelines for many-to-one VLAN mapping in dynamic IP address
assignment environment
To ensure correct traffic forwarding from the service provider network to the customer network, do
not configure many-to-one VLAN mapping together with uRPF. For more information about uRPF,
see Security Configuration Guide.
To modify many-to-one VLAN mappings, first use the reset dhcp snooping binding
command to clear the DHCP snooping entries.
Many-to-one VLAN mapping in dynamic IP address assignment environment tasks at a
glance
To configure many-to-one VLAN mapping in dynamic IP address assignment environment, perform
the following tasks:
1. Enabling DHCP snooping
2. Enabling ARP detection
3. Configuring the customer-side port
4. Configuring the network-side port
Enabling DHCP snooping
1. Enter system view.
system-view
2. Enable DHCP snooping.
dhcp snooping enable
By default, DHCP snooping is disabled.
Enabling ARP detection
1. Enter system view.
system-view
2. Enter VLAN view.
vlan vlan-id
3. Enable ARP detection.
arp detection enable
By default, ARP detection is disabled.
You must enable ARP detection for the original VLANs and the translated VLANs.
Configuring the customer-side port
1. Enter system view.
system-view
2. Enter interface view.
Enter Layer 2 Ethernet interface view.
9
interface interface-type interface-number
Enter Layer 2 aggregate interface view.
interface bridge-aggregation interface-number
3. Set the link type of the port.
port link-type { hybrid | trunk }
By default, the link type of a port is access.
4. Assign the port to the original VLANs and the translated VLAN.
Assign the trunk port to the original VLANs and the translated VLAN.
port trunk permit vlan vlan-id-list
By default, a trunk port is assigned to VLAN 1.
Assign the hybrid port to the original VLANs and the translated VLAN as a tagged member.
port hybrid vlan vlan-id-list tagged
By default, a hybrid port is an untagged member of the VLAN to which the port belongs
when its link type is access.
5. Configure a many-to-one VLAN mapping.
vlan mapping uni { range vlan-range-list | single vlan-id-list }
translated-vlan vlan-id
By default, no VLAN mapping is configured on an interface.
6. Enable DHCP snooping entry recording.
dhcp snooping binding record
By default, DHCP snooping entry recording is disabled on an interface.
Configuring the network-side port
1. Enter system view.
system-view
2. Enter interface view.
Enter Layer 2 Ethernet interface view.
interface interface-type interface-number
Enter Layer 2 aggregate interface view.
interface bridge-aggregation interface-number
3. Set the link type of the port.
port link-type { hybrid | trunk }
By default, the link type of a port is access.
4. Assign the port to the translated VLAN.
Assign the trunk port to the translated VLAN.
port trunk permit vlan vlan-id-list
By default, a trunk port is assigned to VLAN 1.
Assign the hybrid port to the translated VLAN as a tagged member.
port hybrid vlan vlan-id-list tagged
By default, a hybrid port is an untagged member of the VLAN to which the port belongs
when its link type is access.
5. Configure the port as a DHCP snooping trusted port.
dhcp snooping trust
By default, all ports that support DHCP snooping are untrusted ports when DHCP snooping is
enabled.
10
6. Configure the port as an ARP trusted port.
arp detection trust
By default, all ports are ARP untrusted ports.
7. Configure the port to use the original VLAN tags of the many-to-one mapping to replace the
VLAN tags of the packets destined for the user network.
vlan mapping nni
By default, the port does not replace the VLAN tags of the packets destined for the user
network.
11
Configuring the customer-side port
1. Enter system view.
system-view
2. Enter interface view.
Enter Layer 2 Ethernet interface view.
interface interface-type interface-number
Enter Layer 2 aggregate interface view.
interface bridge-aggregation interface-number
3. Set the link type of the port.
port link-type { hybrid | trunk }
By default, the link type of a port is access.
4. Assign the port to the original VLANs and the translated VLAN.
Assign the trunk port to the original VLANs and the translated VLAN.
port trunk permit vlan vlan-id-list
By default, a trunk port is assigned to VLAN 1.
Assign the hybrid port to the original VLANs and the translated VLAN as a tagged member.
port hybrid vlan vlan-id-list tagged
By default, a hybrid port is an untagged member of the VLAN to which the port belongs
when its link type is access.
5. Configure a many-to-one VLAN mapping.
vlan mapping uni { range vlan-range-list | single vlan-id-list }
translated-vlan vlan-id
By default, no VLAN mapping is configured on an interface.
Configuring the network-side port
1. Enter system view.
system-view
2. Enter interface view.
Enter Layer 2 Ethernet interface view.
interface interface-type interface-number
Enter Layer 2 aggregate interface view.
interface bridge-aggregation interface-number
3. Set the link type of the port.
port link-type { hybrid | trunk }
By default, the link type of a port is access.
4. Assign the port to the translated VLAN.
Assign the trunk port to the translated VLAN.
port trunk permit vlan vlan-id-list
By default, a trunk port is assigned to VLAN 1.
Assign the hybrid port to the translated VLAN as a tagged member.
port hybrid vlan vlan-id-list tagged
By default, a hybrid port is an untagged member of the VLAN to which the port belongs
when its link type is access.
5. Configure the port to use the original VLAN tags of the many-to-one mapping to replace the
VLAN tags of the packets destined for the user network.
12
vlan mapping nni
By default, the port does not replace the VLAN tags of the packets destined for the user
network.
13
Restrictions and guidelines
On an interface, the original CVLAN and SVLAN of a two-to-one VLAN mapping cannot be the same
as the translated CVLAN and SVLAN of a two-to-two VLAN mapping.
You cannot specify multiple translated VLANs for the same original CVLAN and SVLAN on an
interface. To modify an existing two-to-one VLAN mapping on an interface, you must execute the
undo vlan mapping egress command to remove it first and then configure a new mapping.
Procedure
1. Enter system view.
system-view
2. Enter interface view.
Enter Layer 2 Ethernet interface view.
interface interface-type interface-number
Enter Layer 2 aggregate interface view.
interface bridge-aggregation interface-number
3. Set the port link type to hybrid or trunk.
port link-type { hybrid | trunk }
By default, the link type of a port is access.
4. Assign the port to the translated VLAN.
Assign the trunk port to the translated VLAN.
port trunk permit vlan vlan-id-list
By default, a trunk port is assigned to VLAN 1.
Assign the hybrid port to the translated VLAN.
port hybrid vlan vlan-id-list tagged
By default, a hybrid port is an untagged member of the VLAN to which the port belongs
when its link type is access.
5. Configure a two-to-one VLAN mapping.
vlan mapping egress outer-vlan outer-vlan-id inner-vlan
inner-vlan-id translated-vlan vlan-id
By default, no VLAN mapping is configured on an interface.
14
interface bridge-aggregation interface-number
3. Set the link type of the port.
port link-type { hybrid | trunk }
By default, the link type of a port is access.
4. Assign the port to the original VLANs and the translated VLANs.
Assign the trunk port to the original VLANs and the translated VLANs.
port trunk permit vlan vlan-id-list
By default, a trunk port is assigned to VLAN 1.
Assign the hybrid port to the original VLANs and the translated VLANs as a tagged member.
port hybrid vlan vlan-id-list tagged
By default, a hybrid port is an untagged member of the VLAN to which the port belongs
when its link type is access.
5. Configure a two-to-two VLAN mapping.
vlan mapping tunnel outer-vlan-id inner-vlan-id translated-vlan
outer-vlan-id inner-vlan-id
By default, no VLAN mapping is configured on an interface.
Task Command
display vlan mapping [ interface
Display VLAN mapping information.
interface-type interface-number ]
15
Table 1 VLAN mappings for each service
VLAN 1
PC
Home gateway
VLAN 2
VoD
Wiring-closet WGE1/0/3
Switch A
VLAN 1 WGE1/0/2
PC VLAN 1 -> VLAN 102 DHCP server
VLAN 2 -> VLAN 202
VLAN 3 -> VLAN 302
VLAN 2
VoD
Home gateway VLANs 101–102 -> VLAN 501
VLAN 2
VoD
Home gateway
VLAN 3
VoIP
Procedure
1. Configure Switch A:
# Create the original VLANs.
<SwitchA> system-view
[SwitchA] vlan 2 to 3
16
# Create the translated VLANs.
[SwitchA] vlan 101 to 102
[SwitchA] vlan 201 to 202
[SwitchA] vlan 301 to 302
# Configure customer-side port Twenty-FiveGigE 1/0/1 as a trunk port.
<SwitchA> system-view
[SwitchA] interface twenty-fivegige 1/0/1
[SwitchA-Twenty-FiveGigE1/0/1] port link-type trunk
# Assign Twenty-FiveGigE 1/0/1 to all original VLANs and translated VLANs.
[SwitchA-Twenty-FiveGigE1/0/1] port trunk permit vlan 1 2 3 101 201 301
# Configure one-to-one VLAN mappings on Twenty-FiveGigE 1/0/1 to map VLANs 1, 2, and 3
to VLANs 101, 201, and 301, respectively.
[SwitchA-Twenty-FiveGigE1/0/1] vlan mapping 1 translated-vlan 101
[SwitchA-Twenty-FiveGigE1/0/1] vlan mapping 2 translated-vlan 201
[SwitchA-Twenty-FiveGigE1/0/1] vlan mapping 3 translated-vlan 301
[SwitchA-Twenty-FiveGigE1/0/1] quit
# Configure customer-side port Twenty-FiveGigE 1/0/2 as a trunk port.
[SwitchA] interface twenty-fivegige 1/0/2
[SwitchA-Twenty-FiveGigE1/0/2] port link-type trunk
# Assign Twenty-FiveGigE 1/0/2 to all original VLANs and translated VLANs.
[SwitchA-Twenty-FiveGigE1/0/2] port trunk permit vlan 1 2 3 102 202 302
# Configure one-to-one VLAN mappings on Twenty-FiveGigE 1/0/2 to map VLANs 1, 2, and 3
to VLANs 102, 202, and 302, respectively.
[SwitchA-Twenty-FiveGigE1/0/2] vlan mapping 1 translated-vlan 102
[SwitchA-Twenty-FiveGigE1/0/2] vlan mapping 2 translated-vlan 202
[SwitchA-Twenty-FiveGigE1/0/2] vlan mapping 3 translated-vlan 302
[SwitchA-Twenty-FiveGigE1/0/2] quit
# Configure the network-side port (Twenty-FiveGigE 1/0/3) as a trunk port.
[SwitchA] interface twenty-fivegige 1/0/3
[SwitchA-Twenty-FiveGigE1/0/3] port link-type trunk
# Assign Twenty-FiveGigE 1/0/3 to the translated VLANs.
[SwitchA-Twenty-FiveGigE1/0/3] port trunk permit vlan 101 201 301 102 202 302
[SwitchA-Twenty-FiveGigE1/0/3] quit
2. Configure Switch B in the same way Switch A is configured. (Details not shown.)
3. Configure Switch C:
# Enable DHCP snooping.
<SwitchC> system-view
[SwitchC] dhcp snooping enable
# Create the original VLANs and translated VLANs, and enable ARP detection for these
VLANs.
[SwitchC] vlan 101
[SwitchC-vlan101] arp detection enable
[SwitchC-vlan101] vlan 201
[SwitchC-vlan201] arp detection enable
[SwitchC-vlan201] vlan 301
[SwitchC-vlan301] arp detection enable
[SwitchC-vlan301] vlan 102
[SwitchC-vlan102] arp detection enable
17
[SwitchC-vlan102] vlan 202
[SwitchC-vlan202] arp detection enable
[SwitchC-vlan202] vlan 302
[SwitchC-vlan302] arp detection enable
[SwitchC-vlan302] vlan 103
[SwitchC-vlan103] arp detection enable
[SwitchC-vlan103] vlan 203
[SwitchC-vlan203] arp detection enable
[SwitchC-vlan203] vlan 303
[SwitchC-vlan303] arp detection enable
[SwitchC-vlan303] vlan 104
[SwitchC-vlan104] arp detection enable
[SwitchC-vlan104] vlan 204
[SwitchC-vlan204] arp detection enable
[SwitchC-vlan204] vlan 304
[SwitchC-vlan304] arp detection enable
[SwitchC-vlan304] vlan 501
[SwitchC-vlan501] arp detection enable
[SwitchC-vlan501] vlan 502
[SwitchC-vlan502] arp detection enable
[SwitchC-vlan502] vlan 503
[SwitchC-vlan503] arp detection enable
[SwitchC-vlan503] quit
# Configure customer-side port Twenty-FiveGigE 1/0/1 as a trunk port.
[SwitchC] interface twenty-fivegige 1/0/1
[SwitchC-Twenty-FiveGigE1/0/1] port link-type trunk
# Assign Twenty-FiveGigE 1/0/1 to all original VLANs and translated VLANs.
[SwitchC-Twenty-FiveGigE1/0/1] port trunk permit vlan 101 102 201 202 301 302 501 to
503
# Configure many-to-one VLAN mappings on Twenty-FiveGigE 1/0/1 to map VLANs for PC,
VoD, and VoIP traffic to VLANs 501, 502, and 503, respectively.
[SwitchC-Twenty-FiveGigE1/0/1] vlan mapping uni range 101 to 102 translated-vlan 501
[SwitchC-Twenty-FiveGigE1/0/1] vlan mapping uni range 201 to 202 translated-vlan 502
[SwitchC-Twenty-FiveGigE1/0/1] vlan mapping uni range 301 to 302 translated-vlan 503
# Enable DHCP snooping entry recording on Twenty-FiveGigE 1/0/1.
[SwitchC-Twenty-FiveGigE1/0/1] dhcp snooping binding record
[SwitchC-Twenty-FiveGigE1/0/1] quit
# Configure customer-side port Twenty-FiveGigE 1/0/2 as a trunk port.
[SwitchC] interface twenty-fivegige 1/0/2
[SwitchC-Twenty-FiveGigE1/0/2] port link-type trunk
# Assign Twenty-FiveGigE 1/0/2 to all original VLANs and translated VLANs.
[SwitchC-Twenty-FiveGigE1/0/2] port trunk permit vlan 103 104 203 204 303 304 501 to
503
# Configure many-to-one VLAN mappings on Twenty-FiveGigE 1/0/2 to map VLANs for PC,
VoD, and VoIP traffic to VLANs 501, 502, and 503, respectively.
[SwitchC-Twenty-FiveGigE1/0/2] vlan mapping uni range 103 to 104 translated-vlan 501
[SwitchC-Twenty-FiveGigE1/0/2] vlan mapping uni range 203 to 204 translated-vlan 502
[SwitchC-Twenty-FiveGigE1/0/2] vlan mapping uni range 303 to 304 translated-vlan 503
18
# Enable recording of client information in DHCP snooping entries on Twenty-FiveGigE 1/0/2.
[SwitchC-Twenty-FiveGigE1/0/2] dhcp snooping binding record
[SwitchC-Twenty-FiveGigE1/0/2] quit
# Configure the network-side port (Twenty-FiveGigE 1/0/3) to use the original VLAN tags of the
many-to-one mappings to replace the VLAN tags of the packets destined for the user network.
[SwitchC] interface twenty-fivegige 1/0/3
[SwitchC-Twenty-FiveGigE1/0/3] vlan mapping nni
# Configure Twenty-FiveGigE 1/0/3 as a trunk port.
[SwitchC-Twenty-FiveGigE1/0/3] port link-type trunk
# Assign Twenty-FiveGigE 1/0/3 to the translated VLANs.
[SwitchC-Twenty-FiveGigE1/0/3] port trunk permit vlan 501 to 503
# Configure Twenty-FiveGigE 1/0/3 as a DHCP snooping trusted and ARP trusted port.
[SwitchC-Twenty-FiveGigE1/0/3] dhcp snooping trust
[SwitchC-Twenty-FiveGigE1/0/3] arp detection trust
[SwitchC-Twenty-FiveGigE1/0/3] quit
4. Configure Switch D:
# Create the translated VLANs.
<SwitchD> system-view
[SwitchD] vlan 501 to 503
# Configure Twenty-FiveGigE 1/0/1 as a trunk port.
<SwitchD> system-view
[SwitchD] interface twenty-fivegige 1/0/1
[SwitchD-Twenty-FiveGigE1/0/1] port link-type trunk
# Assign Twenty-FiveGigE 1/0/1 to the translated VLANs.
[SwitchD-Twenty-FiveGigE1/0/1] port trunk permit vlan 501 to 503
[SwitchD-Twenty-FiveGigE1/0/1] quit
19
Outer VLAN Inner VLAN Translated Outer VLAN Translated Inner VLAN
103-104 N/A 501 N/A
203-204 N/A 502 N/A
303-304 N/A 503 N/A
SP 1 SP 2
PE 1 PE 2 PE 3 PE 4
WGE1/0/2 WGE1/0/1 WGE1/0/2 WGE1/0/1 WGE1/0/2 WGE1/0/1
WGE1/0/1 WGE1/0/2
VLAN 100 VLAN 5 Data VLAN 200 VLAN 6 Data
VPN A VPN A CE 2
CE 1
Site 1 Site 2
Procedure
1. Configure PE 1:
# Create VLANs 5 and 100.
<PE1> system-view
[PE1] vlan 5
[PE1-vlan5] quit
[PE1] vlan 100
[PE1-vlan100] quit
# Configure a one-to-two VLAN mapping on the customer-side port (Twenty-FiveGigE 1/0/1) to
add SVLAN tag 100 to packets from VLAN 5.
[PE1] interface twenty-fivegige 1/0/1
[PE1-Twenty-FiveGigE1/0/1] vlan mapping nest single 5 nested-vlan 100
# Configure Twenty-FiveGigE 1/0/1 as a hybrid port.
[PE1-Twenty-FiveGigE1/0/1] port link-type hybrid
20
# Assign Twenty-FiveGigE 1/0/1 to VLAN 100 as an untagged member.
[PE1-Twenty-FiveGigE1/0/1] port hybrid vlan 100 untagged
[PE1-Twenty-FiveGigE1/0/1] quit
# Configure the network-side port (Twenty-FiveGigE 1/0/2) as a trunk port.
[PE1] interface twenty-fivegige 1/0/2
[PE1-Twenty-FiveGigE1/0/2] port link-type trunk
# Assign Twenty-FiveGigE 1/0/2 to VLAN 100.
[PE1-Twenty-FiveGigE1/0/2] port trunk permit vlan 100
[PE1-Twenty-FiveGigE1/0/2] quit
2. Configure PE 2:
# Create VLAN 100.
<PE2> system-view
[PE2] vlan 100
[PE2-vlan100] quit
# Configure Twenty-FiveGigE 1/0/1 as a trunk port.
[PE2] interface twenty-fivegige 1/0/1
[PE2-Twenty-FiveGigE1/0/1] port link-type trunk
# Assign Twenty-FiveGigE 1/0/1 to VLAN 100.
[PE2-Twenty-FiveGigE1/0/1] port trunk permit vlan 100
[PE2-Twenty-FiveGigE1/0/1] quit
# Configure Twenty-FiveGigE 1/0/2 as a trunk port.
[PE2] interface twenty-fivegige 1/0/2
[PE2-Twenty-FiveGigE1/0/2] port link-type trunk
# Assign Twenty-FiveGigE 1/0/2 to VLAN 100.
[PE2-Twenty-FiveGigE1/0/2] port trunk permit vlan 100
[PE2-Twenty-FiveGigE1/0/2] quit
3. Configure PE 3:
# Create VLANs 5, 6, 100, and 200.
<PE3> system-view
[PE3] vlan 5 to 6
[PE3] vlan 100
[PE3-vlan100] quit
[PE3] vlan 200
[PE3-vlan200] quit
# Configure Twenty-FiveGigE 1/0/1 as a trunk port.
[PE3] interface twenty-fivegige 1/0/1
[PE3-Twenty-FiveGigE1/0/1] port link-type trunk
# Assign Twenty-FiveGigE 1/0/1 to VLANs 100 and 200.
[PE3-Twenty-FiveGigE1/0/1] port trunk permit vlan 100 200
# Configure a two-to-two VLAN mapping on Twenty-FiveGigE 1/0/1 to map SVLAN 100 and
CVLAN 5 to SVLAN 200 and CVLAN 6.
[PE3-Twenty-FiveGigE1/0/1] vlan mapping tunnel 100 5 translated-vlan 200 6
[PE3-Twenty-FiveGigE1/0/1] quit
# Configure Twenty-FiveGigE 1/0/2 as a trunk port.
[PE3] interface twenty-fivegige 1/0/2
[PE3-Twenty-FiveGigE1/0/2] port link-type trunk
# Assign Twenty-FiveGigE 1/0/2 to VLAN 200.
21
[PE3-Twenty-FiveGigE1/0/2] port trunk permit vlan 200
[PE3-Twenty-FiveGigE1/0/2] quit
4. Configure PE 4:
# Create VLANs 6 and 200.
<PE4> system-view
[PE4] vlan 6
[PE4-vlan6] quit
[PE4] vlan 200
[PE4-vlan200] quit
# Configure the network-side port (Twenty-FiveGigE 1/0/1) as a trunk port.
[PE4] interface twenty-fivegige 1/0/1
[PE4-Twenty-FiveGigE1/0/1] port link-type trunk
# Assign Twenty-FiveGigE 1/0/1 to VLAN 200.
[PE4-Twenty-FiveGigE1/0/1] port trunk permit vlan 200
[PE4-Twenty-FiveGigE1/0/1] quit
# Configure the customer-side port (Twenty-FiveGigE 1/0/2) as a hybrid port.
[PE4] interface twenty-fivegige 1/0/2
[PE4-Twenty-FiveGigE1/0/2] port link-type hybrid
# Assign Twenty-FiveGigE 1/0/2 to VLAN 200 as an untagged member.
[PE4-Twenty-FiveGigE1/0/2] port hybrid vlan 200 untagged
# Configure a one-to-two VLAN mapping on Twenty-FiveGigE 1/0/2 to add SVLAN tag 200 to
packets from VLAN 6.
[PE4-Twenty-FiveGigE1/0/2] vlan mapping nest single 6 nested-vlan 200
[PE4-Twenty-FiveGigE1/0/2] quit
22
Contents
Configuring loop detection ············································································· 1
About loop detection ·········································································································································· 1
Loop detection mechanism ························································································································ 1
Loop detection interval ······························································································································· 2
Loop protection actions ······························································································································ 2
Port status auto recovery ··························································································································· 2
Restriction and guidelines: DRNI configuration ································································································· 3
Loop detection tasks at a glance ······················································································································· 3
Enabling loop detection ······································································································································ 3
Restrictions and guidelines for loop detection configuration ······································································ 3
Enabling loop detection globally················································································································· 3
Enabling loop detection on a port··············································································································· 3
Setting the loop protection action ······················································································································· 4
Restrictions and guidelines for loop protection action configuration ·························································· 4
Setting the global loop protection action ···································································································· 4
Setting the loop protection action on an interface ······················································································ 4
Setting the loop detection interval ······················································································································ 4
Display and maintenance commands for loop detection ··················································································· 5
Loop detection configuration examples ············································································································· 5
Example: Configuring basic loop detection functions················································································· 5
Example: Configuring loop detection on a DR system ··············································································· 8
i
Configuring loop detection
About loop detection
The loop detection mechanism performs periodic checking for Layer 2 loops. The mechanism
immediately generates a log when a loop occurs so that you are promptly notified to adjust network
connections and configurations. You can configure loop detection to shut down the looped port. Logs
are maintained in the information center. For more information, see Network Management and
Monitoring Configuration Guide.
SMAC
TPID TCI
Type
The Ethernet frame header of a loop detection packet contains the following fields:
• DMAC—Destination MAC address of the frame, which is the multicast MAC address
010f-e200-0007. When a loop detection-enabled device receives a frame with this destination
MAC address, it performs the following operations:
Sends the frame to the CPU.
Floods the frame in the VLAN from which the frame was originally received.
• SMAC—Source MAC address of the frame, which is the bridge MAC address of the sending
device.
• TPID—Type of the VLAN tag, with the value of 0x8100.
• TCI—Information of the VLAN tag, including the priority and VLAN ID.
• Type—Protocol type, with the value of 0x8918.
Figure 2 Inner frame header for loop detection
0 15 31
Code Version
Length Reserved
The inner frame header of a loop detection packet contains the following fields:
• Code—Protocol sub-type, which is 0x0001, indicating the loop detection protocol.
1
• Version—Protocol version, which is always 0x0000.
• Length—Length of the frame. The value includes the inner header, but excludes the Ethernet
header.
• Reserved—This field is reserved.
Frames for loop detection are encapsulated as TLV triplets.
Table 1 TLVs supported by loop detection
2
2. The device automatically sets the port to the forwarding state after the detection timer set by
using the shutdown-interval command expires. For more information about the
shutdown-interval command, see Fundamentals Command Reference.
3. The device shuts down the port again if a loop is still detected on the port when the detection
timer expires.
This process is repeated until the loop is removed.
NOTE:
Incorrect recovery can occur when loop detection frames are discarded to reduce the load. To avoid
this, use the shutdown action, or manually remove the loop.
3
2. Enter Layer 2 Ethernet interface view or Layer 2 aggregate interface view.
interface interface-type interface-number
3. Enable loop detection on the port.
loopback-detection enable vlan { vlan-id--list | all }
By default, loop detection is disabled on ports.
4
system-view
2. Set the loop detection interval.
loopback-detection interval-time interval
The default setting is 30 seconds.
Task Command
Device A
1
WG
/0/
E1
E1
WG
/0/
2
2
WG
/0/
E1
E1
WG
/0/
1
WGE1/0/1 WGE1/0/2
Device B Device C
VLAN 100
Procedure
1. Configure Device A:
# Create VLAN 100, and globally enable loop detection for the VLAN.
<DeviceA> system-view
[DeviceA] vlan 100
5
[DeviceA-vlan100] quit
[DeviceA] loopback-detection global enable vlan 100
# Configure Twenty-FiveGigE 1/0/1 and Twenty-FiveGigE 1/0/2 as trunk ports, and assign
them to VLAN 100.
[DeviceA] interface Twenty-FiveGigE 1/0/1
[DeviceA-Twenty-FiveGigE1/0/1] port link-type trunk
[DeviceA-Twenty-FiveGigE1/0/1] port trunk permit vlan 100
[DeviceA-Twenty-FiveGigE1/0/1] quit
[DeviceA] interface twenty-fivegige 1/0/2
[DeviceA-Twenty-FiveGigE1/0/2] port link-type trunk
[DeviceA-Twenty-FiveGigE1/0/2] port trunk permit vlan 100
[DeviceA-Twenty-FiveGigE1/0/2] quit
# Set the global loop protection action to shutdown.
[DeviceA] loopback-detection global action shutdown
# Set the loop detection interval to 35 seconds.
[DeviceA] loopback-detection interval-time 35
2. Configure Device B:
# Create VLAN 100.
<DeviceB> system-view
[DeviceB] vlan 100
[DeviceB–vlan100] quit
# Configure Twenty-FiveGigE 1/0/1 and Twenty-FiveGigE 1/0/2 as trunk ports, and assign
them to VLAN 100.
[DeviceB] interface twenty-fivegige 1/0/1
[DeviceB-Twenty-FiveGigE1/0/1] port link-type trunk
[DeviceB-Twenty-FiveGigE1/0/1] port trunk permit vlan 100
[DeviceB-Twenty-FiveGigE1/0/1] quit
[DeviceB] interface twenty-fivegige 1/0/2
[DeviceB-Twenty-FiveGigE1/0/2] port link-type trunk
[DeviceB-Twenty-FiveGigE1/0/2] port trunk permit vlan 100
[DeviceB-Twenty-FiveGigE1/0/2] quit
3. Configure Device C:
# Create VLAN 100.
<DeviceC> system-view
[DeviceC] vlan 100
[DeviceC–vlan100] quit
# Configure Twenty-FiveGigE 1/0/1 and Twenty-FiveGigE 1/0/2 as trunk ports, and assign
them to VLAN 100.
[DeviceC] interface twenty-fivegige 1/0/1
[DeviceC-Twenty-FiveGigE1/0/1] port link-type trunk
[DeviceC-Twenty-FiveGigE1/0/1] port trunk permit vlan 100
[DeviceC-Twenty-FiveGigE1/0/1] quit
[DeviceC] interface twenty-fivegige 1/0/2
[DeviceC-Twenty-FiveGigE1/0/2] port link-type trunk
[DeviceC-Twenty-FiveGigE1/0/2] port trunk permit vlan 100
[DeviceC-Twenty-FiveGigE1/0/2] quit
6
Verifying the configuration
# View the system logs on devices, for example, Device A.
[DeviceA]
%Feb 24 15:04:29:663 2013 DeviceA LPDT/4/LPDT_LOOPED: A loop was detected on
Twenty-FiveGigE1/0/1.
%Feb 24 15:04:29:664 2013 DeviceA LPDT/4/LPDT_VLAN_LOOPED: A loop was detected on
Twenty-FiveGigE1/0/1 in VLAN 100.
%Feb 24 15:04:29:667 2013 DeviceA LPDT/4/LPDT_LOOPED: A loop was detected on
Twenty-FiveGigE1/0/2.
%Feb 24 15:04:29:668 2013 DeviceA LPDT/4/LPDT_VLAN_LOOPED: A loop was detected on
Twenty-FiveGigE1/0/2 in VLAN 100.
%Feb 24 15:04:44:243 2013 DeviceA LPDT/5/LPDT_VLAN_RECOVERED: A loop was removed on
Twenty-FiveGigE1/0/1 in VLAN 100.
%Feb 24 15:04:44:243 2013 DeviceA LPDT/5/LPDT_RECOVERED: All loops were removed on
Twenty-FiveGigE1/0/1.
%Feb 24 15:04:44:248 2013 DeviceA LPDT/5/LPDT_VLAN_RECOVERED: A loop was removed on
Twenty-FiveGigE1/0/2 in VLAN 100.
%Feb 24 15:04:44:248 2013 DeviceA LPDT/5/LPDT_RECOVERED: All loops were removed on
Twenty-FiveGigE1/0/2.
The output shows that the device has removed the loops from Twenty-FiveGigE 1/0/1 and
Twenty-FiveGigE 1/0/2 according to the shutdown action.
# Display the status of Twenty-FiveGigE 1/0/1 on devices, for example, Device A.
[DeviceA] display interface twenty-fivegige 1/0/1
Twenty-FiveGigE1/0/1 current state: DOWN (Loop detection down)
...
The output shows that Twenty-FiveGigE 1/0/1 is already shut down by the loop detection module.
# Display the status of Twenty-FiveGigE 1/0/2 on devices, for example, Device A.
[DeviceA] display interface twenty-fivegige 1/0/2
Twenty-FiveGigE1/0/2 current state: DOWN (Loop detection down)
...
The output shows that Twenty-FiveGigE 1/0/2 is already shut down by the loop detection module.
7
Example: Configuring loop detection on a DR system
Network configuration
As shown in Figure 4, configure loop detection on the DR system formed by Device A and Device B
to meet the following requirements:
• Generates a log as a notification.
• Automatically shuts down the port on which a loop is detected.
Figure 4 Network diagram
Device C
WGE1/0/5
BAGG4
W
1
0/
GE
1/
W
2
0/
GE
1/
GE
1/
0
W
/3
GE
1/
0/
W
4
1
W
0/
GE
1/
W
GE
0/
1/
GE
1/
0/
W
GE
1
1/
0/
BAGG4 BAGG4
W
WGE1/0/1
IPL 2
WGE1/0/5 WGE1/0/5
Device A Device B
BAGG3 Device E
DR 1 DR 2
WGE1/0/6 Keepalive WGE1/0/6
WGE1/0/2
BAGG5 DR system BAGG5
W
4
0/
GE
1/
3
W
0/
GE
1/
GE
1/
0/
GE
4
1/
0/
W
3
2
0/
GE
1/
W
1
0/
GE
1/
GE
1/
0/
GE
1/
4
0/
W
3
BAGG5
WGE1/0/5
Device D
Procedure
1. Configure Device A:
# Create VLAN 100.
<DeviceA> system-view
[DeviceA] vlan 100
[DeviceA-vlan100] quit
# Configure DR system settings.
[DeviceA] drni system-mac 1-1-1
[DeviceA] drni system-number 1
[DeviceA] drni system-priority 123
# Configure DR keepalive packet parameters.
[DeviceA] drni keepalive ip destination 1.1.1.1 source 1.1.1.2
# Set the link mode of Twenty-FiveGigE 1/0/6 to Layer 3, and assign the interface an IP address.
The IP address will be used as the source IP address of keepalive packets.
[DeviceA] interface twenty-fivegige 1/0/6
[DeviceA-Twenty-FiveGigE1/0/6] port link-mode route
[DeviceA-Twenty-FiveGigE1/0/6] ip address 1.1.1.2 24
[DeviceA-Twenty-FiveGigE1/0/6] quit
8
# Exclude the interface used for DR keepalive detection (Twenty-FiveGigE 1/0/6) from the
shutdown action by DRNI MAD.
[DeviceA] drni mad exclude interface twenty-fivegige 1/0/6
# Create Layer 2 dynamic aggregate interface Bridge-Aggregation 3, and specify it as the IPP.
[DeviceA] interface bridge-aggregation 3
[DeviceA-Bridge-Aggregation3] link-aggregation mode dynamic
[DeviceA-Bridge-Aggregation3] port drni intra-portal-port 1
[DeviceA-Bridge-Aggregation3] quit
# Assign Twenty-FiveGigE 1/0/5 to aggregation group 3.
[DeviceA] interface twenty-fivegige 1/0/5
[DeviceA-Twenty-FiveGigE1/0/5] port link-aggregation group 3
[DeviceA-Twenty-FiveGigE1/0/5] quit
# Set the link type of Bridge-Aggregation 3 to trunk, and assign it to VLAN 100.
[DeviceA] interface bridge-aggregation 3
[DeviceA-Bridge-Aggregation3] port link-type trunk
[DeviceA-Bridge-Aggregation3] port trunk permit vlan 100
[DeviceA-Bridge-Aggregation3] quit
# Create Layer 2 dynamic aggregate interface Bridge-Aggregation 4, and assign it to DR group
4.
[DeviceA] interface bridge-aggregation 4
[DeviceA-Bridge-Aggregation4] link-aggregation mode dynamic
[DeviceA-Bridge-Aggregation4] port drni group 4
[DeviceA-Bridge-Aggregation4] quit
# Assign Twenty-FiveGigE 1/0/1 and Twenty-FiveGigE 1/0/2 to aggregation group 4.
[DeviceA] interface twenty-fivegige 1/0/1
[DeviceA-Twenty-FiveGigE1/0/1] port link-aggregation group 4
[DeviceA-Twenty-FiveGigE1/0/1] quit
[DeviceA] interface twenty-fivegige 1/0/2
[DeviceA-Twenty-FiveGigE1/0/2] port link-aggregation group 4
[DeviceA-Twenty-FiveGigE1/0/2] quit
# Set the link type of Bridge-Aggregation 4 to trunk, and assign it to VLAN 100.
[DeviceA] interface bridge-aggregation 4
[DeviceA-Bridge-Aggregation4] port link-type trunk
[DeviceA-Bridge-Aggregation4] port trunk permit vlan 100
[DeviceA-Bridge-Aggregation4] quit
# Create Layer 2 dynamic aggregate interface Bridge-Aggregation 5, and assign it to DR group
5.
[DeviceA] interface bridge-aggregation 5
[DeviceA-Bridge-Aggregation5] link-aggregation mode dynamic
[DeviceA-Bridge-Aggregation5] port drni group 5
[DeviceA-Bridge-Aggregation5] quit
# Assign Twenty-FiveGigE 1/0/3 and Twenty-FiveGigE 1/0/4 to aggregation group 5.
[DeviceA] interface twenty-fivegige 1/0/3
[DeviceA-Twenty-FiveGigE1/0/3] port link-aggregation group 5
[DeviceA-Twenty-FiveGigE1/0/3] quit
[DeviceA] interface twenty-fivegige 1/0/4
[DeviceA-Twenty-FiveGigE1/0/4] port link-aggregation group 5
[DeviceA-Twenty-FiveGigE1/0/4] quit
9
# Set the link type of Bridge-Aggregation 5 to trunk, and assign it to VLAN 100.
[DeviceA] interface bridge-aggregation 5
[DeviceA-Bridge-Aggregation5] port link-type trunk
[DeviceA-Bridge-Aggregation5] port trunk permit vlan 100
[DeviceA-Bridge-Aggregation5] quit
# Disable the spanning tree feature.
[DeviceA] undo stp global enable
# Enable loop detection for VLAN 100 globally, set the global loop protection action to shutdown,
and set the loop detection interval to 35 seconds.
[DeviceA] loopback-detection global enable vlan 100
[DeviceA] loopback-detection global action shutdown
[DeviceA] loopback-detection interval-time 35
2. Configure Device B in the same way Device A is configured. (Details not shown.)
3. Configure Device C:
# Disable the spanning tree feature.
<DeviceC> system-view
[DeviceC] undo stp global enable
# Create VLAN 100.
[DeviceC] vlan 100
[DeviceC-vlan100] quit
# Create Layer 2 dynamic aggregate interface Bridge-Aggregation 4.
[DeviceC] interface bridge-aggregation 4
[DeviceC-Bridge-Aggregation4] link-aggregation mode dynamic
[DeviceC-Bridge-Aggregation4] quit
# Assign Twenty-FiveGigE 1/0/1 through Twenty-FiveGigE 1/0/4 to aggregation group 4.
[DeviceC] interface range twenty-fivegige 1/0/1 to twenty-fivegige 1/0/4
[DeviceC-if-range] port link-aggregation group 4
[DeviceC-if-range] quit
# Set the link type of Bridge-Aggregation 4 to trunk, and assign it to VLAN 100.
[DeviceC] interface bridge-aggregation 4
[DeviceC-Bridge-Aggregation4] port link-type trunk
[DeviceC-Bridge-Aggregation4] port trunk permit vlan 100
[DeviceC-Bridge-Aggregation4] quit
# Set the link type of Twenty-FiveGigE 1/0/5 to trunk, and assign it to VLAN 100.
[DeviceC] interface twenty-fivegige 1/0/5
[DeviceC-Twenty-FiveGigE1/0/5] port link-type trunk
[DeviceC-Twenty-FiveGigE1/0/5] port trunk permit vlan 100
[DeviceC-Twenty-FiveGigE1/0/5] quit
4. Configure Device D:
# Disable the spanning tree feature.
<DeviceD> system-view
[DeviceD] undo stp global enable
# Create VLAN 100.
[DeviceD] vlan 100
[DeviceD-vlan100] quit
# Create Layer 2 dynamic aggregate interface Bridge-Aggregation 5.
[DeviceD] interface bridge-aggregation 5
10
[DeviceD-Bridge-Aggregation5] link-aggregation mode dynamic
[DeviceD-Bridge-Aggregation5] quit
# Assign Twenty-FiveGigE 1/0/1 through Twenty-FiveGigE 1/0/4 to aggregation group 5.
[DeviceD] interface range twenty-fivegige 1/0/1 to twenty-fivegige 1/0/4
[DeviceD-if-range] port link-aggregation group 5
[DeviceD-if-range] quit
# Set the link type of Bridge-Aggregation 5 to trunk, and assign it to VLAN 100.
[DeviceD] interface bridge-aggregation 5
[DeviceD-Bridge-Aggregation5] port link-type trunk
[DeviceD-Bridge-Aggregation5] port trunk permit vlan 100
[DeviceD-Bridge-Aggregation5] quit
# Set the link type of Twenty-FiveGigE 1/0/5 to trunk, and assign it to VLAN 100.
[DeviceD] interface twenty-fivegige 1/0/5
[DeviceD-Twenty-FiveGigE1/0/5] port link-type trunk
[DeviceD-Twenty-FiveGigE1/0/5] port trunk permit vlan 100
[DeviceD-Twenty-FiveGigE1/0/5] quit
5. Configure Device E:
# Disable the spanning tree feature.
<DeviceE> system-view
[DeviceE] undo stp global enable
# Create VLAN 100.
[DeviceE] vlan 100
[DeviceE-vlan100] quit
# Set the link type of Twenty-FiveGigE 1/0/1 and Twenty-FiveGigE 1/0/2 to trunk, and assign
them to VLAN 100.
[DeviceE] interface twenty-fivegige 1/0/1
[DeviceE-Twenty-FiveGigE1/0/1] port link-type trunk
[DeviceE-Twenty-FiveGigE1/0/1] port trunk permit vlan 100
[DeviceE-Twenty-FiveGigE1/0/1] quit
[DeviceE] interface twenty-fivegige 1/0/2
[DeviceE-Twenty-FiveGigE1/0/2] port link-type trunk
[DeviceE-Twenty-FiveGigE1/0/2] port trunk permit vlan 100
[DeviceE-Twenty-FiveGigE1/0/2] quit
11
ved on Bridge-Aggregation4.
%Aug 1 03:28:48:302 2019 Sysname LPDT/5/LPDT_VLAN_RECOVERED: A loop was rem
oved on Bridge-Aggregation5 in VLAN 100.
%Aug 1 03:28:48:304 2019 Sysname LPDT/5/LPDT_RECOVERED: All loops were remo
ved on Bridge-Aggregation5.
The output shows that the device has removed the loops from Bridge-Aggregation 4 and
Bridge-Aggregation 5 according to the shutdown action.
# Verify that Bridge-Aggregation 4 has been shut down by loop detection.
[DeviceA] display interface Bridge-Aggregation 4
Bridge-Aggregation4
The interface has assigned a DR group.
Current state: DOWN (Loopback detection down)
…
# Verify that loops have been removed on Device B. (Details not shown.)
12
Contents
Spanning tree protocol overview ···································································· 1
About STP ·························································································································································· 1
STP protocol frames ·································································································································· 1
Basic concepts in STP ······························································································································· 3
Calculation process of the STP algorithm ·································································································· 4
Example of STP calculation ······················································································································· 5
The configuration BPDU forwarding mechanism of STP ··········································································· 9
STP timers ················································································································································· 9
About RSTP ····················································································································································· 10
RSTP protocol frames ······························································································································ 10
Basic concepts in RSTP··························································································································· 11
How RSTP works ····································································································································· 11
RSTP BPDU processing ·························································································································· 11
About PVST ····················································································································································· 12
PVST protocol frames ······························································································································ 12
How PVST works ····································································································································· 13
About MSTP ····················································································································································· 13
MSTP features ········································································································································· 13
MSTP protocol frames ····························································································································· 13
Basic concepts in MSTP ·························································································································· 15
How MSTP works····································································································································· 18
MSTP implementation on devices············································································································ 19
Rapid transition mechanism ····························································································································· 19
Edge port rapid transition ························································································································· 19
Root port rapid transition ·························································································································· 20
P/A transition ············································································································································ 20
Protocols and standards ·································································································································· 21
Configuring spanning tree protocols ···························································· 23
Restrictions and guidelines: spanning tree protocol configuration ··································································· 23
Restrictions: Compatibility with other features ························································································· 23
Restrictions: Interface configuration ········································································································· 23
Spanning tree protocol tasks at a glance ········································································································· 24
STP tasks at a glance ······························································································································ 24
RSTP tasks at a glance···························································································································· 25
PVST tasks at a glance ···························································································································· 26
MSTP tasks at a glance ··························································································································· 27
Setting the spanning tree mode ······················································································································· 28
Configuring an MST region ······························································································································ 29
Configuring the root bridge or a secondary root bridge ··················································································· 30
Restrictions and guidelines ······················································································································ 30
Configuring the device as the root bridge of a spanning tree··································································· 30
Configuring the device as a secondary root bridge of a spanning tree ···················································· 30
Configuring the device priority ························································································································· 31
Configuring the maximum hops of an MST region ··························································································· 31
Configuring the network diameter of a switched network ················································································ 32
Setting spanning tree timers ···························································································································· 32
Setting the timeout factor ································································································································· 34
Configuring the BPDU transmission rate ········································································································· 34
Configuring edge ports ····································································································································· 35
Configuring path costs of ports ························································································································ 35
About path cost ········································································································································ 35
Specifying a standard for the default path cost calculation ······································································ 35
Configuring path costs of ports ················································································································ 38
Configuring the port priority ······························································································································ 39
Configuring the port link type ··························································································································· 39
Configuring the mode a port uses to recognize and send MSTP frames························································· 40
i
Enabling outputting port state transition information ························································································ 41
Enabling the spanning tree feature ·················································································································· 41
Restrictions and guidelines ······················································································································ 41
Enabling the spanning tree feature in STP/RSTP/MSTP mode ······························································· 41
Enabling the spanning tree feature in PVST mode ·················································································· 42
Performing mCheck ········································································································································· 42
About mCheck·········································································································································· 42
Restrictions and guidelines ······················································································································ 42
Performing mCheck globally ···················································································································· 43
Performing mCheck in interface view······································································································· 43
Disabling inconsistent PVID protection ············································································································ 43
Configuring Digest Snooping ··························································································································· 43
Configuring No Agreement Check ··················································································································· 45
Configuring TC Snooping ································································································································· 46
Configuring protection features ························································································································ 47
Spanning tree protection tasks at a glance ······························································································ 47
Configuring BPDU guard·························································································································· 48
Enabling root guard ·································································································································· 49
Enabling loop guard ································································································································· 49
Configuring port role restriction ················································································································ 50
Configuring TC-BPDU transmission restriction ························································································ 51
Enabling TC-BPDU guard ························································································································ 51
Enabling BPDU drop ································································································································ 52
Enabling PVST BPDU guard···················································································································· 52
Disabling dispute guard···························································································································· 52
Enabling the device to log events of detecting or receiving TC BPDUs··························································· 55
Disabling the device from reactivating edge ports shut down by BPDU guard ················································ 55
Enabling BPDU transparent transmission on a port ························································································ 55
Enabling SNMP notifications for new-root election and topology change events ············································ 56
Display and maintenance commands for the spanning tree protocols ···························································· 57
Spanning tree configuration examples ············································································································· 57
Example: Configuring MSTP ···················································································································· 57
Example: Configuring PVST ···················································································································· 61
Example: Configuring DRNI with PVST ··································································································· 64
ii
Spanning tree protocol overview
Spanning tree protocols eliminate loops in a physical link-redundant network by selectively blocking
redundant links and putting them in a standby state.
The recent versions of STP include the Rapid Spanning Tree Protocol (RSTP), the Per-VLAN
Spanning Tree (PVST), and the Multiple Spanning Tree Protocol (MSTP).
About STP
STP was developed based on the 802.1d standard of IEEE to eliminate loops at the data link layer in
a LAN. Networks often have redundant links as backups in case of failures, but loops are a very
serious problem. Devices running STP detect loops in the network by exchanging information with
one another. They eliminate loops by selectively blocking certain ports to prune the loop structure
into a loop-free tree structure. This avoids proliferation and infinite cycling of packets that would
occur in a loop network.
In a narrow sense, STP refers to IEEE 802.1d STP. In a broad sense, STP refers to the IEEE 802.1d
STP and various enhanced spanning tree protocols derived from that protocol.
1
• Protocol ID—Fixed at 0x0000, which represents IEEE 802.1d.
• Protocol version ID—Spanning tree protocol version ID. The protocol version ID for STP is
0x00.
• BPDU type—Type of the BPDU. The value is 0x00 for a configuration BPDU.
• Flags—An 8-bit field indicates the purpose of the BPDU. The lowest bit is the Topology Change
(TC) flag. The highest bit is the Topology Change Acknowledge (TCA) flag. All other bits are
reserved.
• Root ID—Root bridge ID formed by the priority and MAC address of the root bridge.
• Root path cost—Cost of the path to the root bridge.
• Bridge ID—Designated bridge ID formed by the priority and MAC address of the designated
bridge.
• Port ID—Designated port ID formed by the priority and global port number of the designated
port.
• Message age—Age of the configuration BPDU while it propagates in the network.
• Max age—Maximum age of the configuration BPDU stored on the switch.
• Hello time—Configuration BPDU transmission interval.
• Forward delay—Delay for STP bridges to transit port state.
Devices use the root bridge ID, root path cost, designated bridge ID, designated port ID, message
age, max age, hello time, and forward delay for spanning tree calculation.
TCN BPDUs
Devices use TCN BPDUs to announce changes in the network topology. Figure 2 shows the TCN
BPDU format.
Figure 2 TCN BPDU format
2
Basic concepts in STP
Root bridge
A tree network must have a root bridge. The entire network contains only one root bridge, and all the
other bridges in the network are called leaf nodes. The root bridge is not permanent, but can change
with changes of the network topology.
Upon initialization of a network, each device generates and periodically sends configuration BPDUs,
with itself as the root bridge. After network convergence, only the root bridge generates and
periodically sends configuration BPDUs. The other devices only forward the BPDUs.
Root port
On a non-root bridge, the port nearest to the root bridge is the root port. The root port communicates
with the root bridge. Each non-root bridge has only one root port. The root bridge has no root port.
Designated bridge and designated port
Port A1 Port A2
Device B Device C
Port B1 Port C1
Port B2 Port C2
LAN
Port states
Table 1 lists the port states in STP.
3
Table 1 STP port states
Path cost
Path cost is a reference value used for link selection in STP. To prune the network into a loop-free
tree, STP calculates path costs to select the most robust links and block redundant links that are less
robust.
Step Description
A non-root-bridge device regards the port on which it received the optimum configuration BPDU
1
as the root port. Table 2 describes how the optimum configuration BPDU is selected.
4
Step Description
Based on the configuration BPDU and the path cost of the root port, the device calculates a
designated port configuration BPDU for each of the other ports.
• The root bridge ID is replaced with that of the configuration BPDU of the root port.
2 • The root path cost is replaced with that of the configuration BPDU of the root port plus the
path cost of the root port.
• The designated bridge ID is replaced with the ID of this device.
• The designated port ID is replaced with the ID of this port.
The device compares the calculated configuration BPDU with the configuration BPDU on the
port whose port role will be determined. Then, the device acts depending on the result of the
comparison:
• If the calculated configuration BPDU is superior, the device performs the following
operations:
3 Considers this port as the designated port.
Replaces the configuration BPDU on the port with the calculated configuration BPDU.
Periodically sends the calculated configuration BPDU.
• If the configuration BPDU on the port is superior, the device blocks this port without
updating its configuration BPDU. The blocked port can receive BPDUs, but cannot send
BPDUs or forward data traffic.
When the network topology is stable, only the root port and designated ports forward user traffic.
Other ports are all in the blocking state to receive BPDUs but not to forward BPDUs or user traffic.
Table 2 Selecting the optimum configuration BPDU
Step Actions
Upon receiving a configuration BPDU on a port, the device compares the priority of the received
configuration BPDU with that of the configuration BPDU generated by the port.
• If the former priority is lower, the device discards the received configuration BPDU and
1
keeps the configuration BPDU the port generated.
• If the former priority is higher, the device replaces the content of the configuration BPDU
generated by the port with the content of the received configuration BPDU.
The device compares the configuration BPDUs of all the ports and chooses the optimum
2
configuration BPDU.
5
Figure 4 The STP algorithm
Device A
Priority = 0
Port A1 Port A2
Pa
=5
th
st
co
co
st
th
=1
Pa
0
Port B1 Port C1
Port B2 Port C2
Path cost = 4
Device B Device C
Priority = 1 Priority = 2
As shown in Figure 4, the priority values of Device A, Device B, and Device C are 0, 1, and 2,
respectively. The path costs of links among the three devices are 5, 10, and 4.
Device state initialization
In Table 3, each configuration BPDU contains the following fields: root bridge ID, root path cost,
designated bridge ID, and designated port ID.
Table 3 Initial state of each device
6
Table 4 Comparison process and result on each device
Configuration BPDU on
Device Comparison process
ports after comparison
Port A1 performs the following operations:
1. Receives the configuration BPDU of Port B1 {1, 0, 1,
Port B1}.
2. Determines that its existing configuration BPDU {0, 0,
0, Port A1} is superior to the received configuration
BPDU.
3. Discards the received one.
Port A2 performs the following operations:
1. Receives the configuration BPDU of Port C1 {2, 0, 2, • Port A1: {0, 0, 0, Port A1}
Device A Port C1}. • Port A2: {0, 0, 0, Port A2}
2. Determines that its existing configuration BPDU {0, 0,
0, Port A2} is superior to the received configuration
BPDU.
3. Discards the received one.
Device A determines that it is both the root bridge and
designated bridge in the configuration BPDUs of all its
ports. It considers itself as the root bridge. It does not
change the configuration BPDU of any port and starts to
periodically send configuration BPDUs.
7
Configuration BPDU on
Device Comparison process
ports after comparison
Port C1}.
3. Updates its configuration BPDU.
Port C2 performs the following operations:
1. Receives the original configuration BPDU of Port B2
{1, 0, 1, Port B2}.
2. Determines that the received configuration BPDU is
superior to the existing configuration BPDU {2, 0, 2,
Port C2}.
3. Updates its configuration BPDU.
8
Configuration BPDU on
Device Comparison process
ports after comparison
spanning tree calculation process: for example, the link
between Device B and Device C is down.
A
Root bridge
Root port
Designated port
Blocked port
Normal link
B C Blocked link
STP timers
The most important timing parameters in STP calculation are forward delay, hello time, and max age.
9
• Forward delay
Forward delay is the delay time for port state transition. By default, the forward delay is 15
seconds.
A path failure can cause spanning tree re-calculation to adapt the spanning tree structure to the
change. However, the resulting new configuration BPDU cannot propagate throughout the
network immediately. If the newly elected root ports and designated ports start to forward data
immediately, a temporary loop will likely occur.
The newly elected root ports or designated ports must go through the listening and learning
states before they transit to the forwarding state. This requires twice the forward delay time and
allows the new configuration BPDU to propagate throughout the network.
• Hello time
The device sends configuration BPDUs at the hello time interval to the neighboring devices to
ensure that the paths are fault-free. By default, the hello time is 2 seconds. If the device does
not receive configuration BPDUs within the timeout period, it recalculates the spanning tree.
The formula for calculating the timeout period is timeout period = timeout factor × 3 × hello time.
• Max age
The device uses the max age to determine whether a stored configuration BPDU has expired
and discards it if the max age is exceeded. By default, the max age is 20 seconds. In the CIST
of an MSTP network, the device uses the max age timer to determine whether a configuration
BPDU received by a port has expired. If it is expired, a new spanning tree calculation process
starts. The max age timer does not take effect on MSTIs.
If a port does not receive any configuration BPDUs within the timeout period, the port transits to the
listening state. The device will recalculate the spanning tree. It takes the port 50 seconds to transit
back to the forwarding state. This period includes 20 seconds for the max age, 15 seconds for the
listening state, and 15 seconds for the learning state.
To ensure a fast topology convergence, make sure the timer settings meet the following formulas:
• 2 × (forward delay – 1 second) ≥ max age
• Max age ≥ 2 × (hello time + 1 second)
About RSTP
RSTP achieves rapid network convergence by allowing a newly elected root port or designated port
to enter the forwarding state much faster than STP.
10
Basic concepts in RSTP
Port roles
In addition to root port and designated port, RSTP also uses the following port roles:
• Alternate port—Acts as the backup port for a root port. When the root port is blocked, the
alternate port takes over.
• Backup port—Acts as the backup port of a designated port. When the designated port is
invalid, the backup port becomes the new designated port. A loop occurs when two ports of the
same spanning tree device are connected, so the device blocks one of the ports. The blocked
port is the backup port.
• Edge port—Directly connects to a user host rather than a network device or network segment.
Port states
RSTP uses the discarding state to replace the disabled, blocking, and listening states in STP. Table 5
shows the differences between the port states in RSTP and STP.
Table 5 Port state differences between RSTP and STP
11
failures. If a device fails to receive any RSTP BPDUs on a port within triple the hello time, the device
considers that a link failure has occurred. After the stored configuration BPDU expires, the device
floods RSTP BPDUs with the TC flag set to initiate a new RSTP calculation.
In RSTP, a port in blocking state can immediately respond to an RSTP BPDU with a lower priority
than its own BPDU.
As shown in Figure 6, Device A is the root bridge. The priority of Device B is higher than the priority of
Device C. Port C2 on Device C is blocked.
When the link between Device A and Device B fails, the following events occur:
1. Device B sends an RSTP BPDU with itself as the root bridge to Device C.
2. Device C compares the RSTP BPDU with its own BPDU.
3. Because the RSTP BPDU from Device B has a lower priority, Device C sends its own BPDU to
Device B.
4. Device B considers that Port B2 is the root port and stops sending RSTP BPDUs to Device C.
Figure 6 BPDU processing in RSTP
Device A Failed link
Root bridge
BID=0.MAC A RSTP BPDU with
low priority
RSTP BPDU with
Port A1 Port A2 high priority
Port B1
Device A is the root Port C1
Device B Device C
BID=4096.MAC B Port B2 Port C2 BID=8192.MAC C
Device B is the root
About PVST
In an STP- or RSTP-enabled LAN, all bridges share one spanning tree. Traffic from all VLANs is
forwarded along the spanning tree, and ports cannot be blocked on a per-VLAN basis to prune loops.
PVST allows every VLAN to have its own spanning tree, which increases usage of links and
bandwidth. Because each VLAN runs RSTP independently, a spanning tree only serves its VLAN.
A PVST-enabled H3C device can communicate with a third-party device that is running Rapid PVST
or PVST. The PVST-enabled H3C device supports fast network convergence like RSTP when
connected to PVST-enabled H3C devices or third-party devices enabled with Rapid PVST.
12
Figure 7 PVST BPDU format
Organization code
PID
A port's link type determines the type of BPDUs the port sends.
• An access port sends RSTP BPDUs.
• A trunk or hybrid port sends RSTP BPDUs in the default VLAN and sends PVST BPDUs in
other VLANs.
About MSTP
MSTP features
Developed based on IEEE 802.1s, MSTP overcomes the limitations of STP, RSTP, and PVST. In
addition to supporting rapid network convergence, it allows data flows of different VLANs to be
forwarded along separate paths. This provides a better load sharing mechanism for redundant links.
MSTP provides the following features:
• MSTP divides a switched network into multiple regions, each of which contains multiple
spanning trees that are independent of one another.
• MSTP supports mapping VLANs to spanning tree instances by means of a VLAN-to-instance
mapping table. MSTP can reduce communication overheads and resource usage by mapping
multiple VLANs to one instance.
• MSTP prunes a loop network into a loop-free tree, which avoids proliferation and endless
cycling of frames in a loop network. In addition, it supports load balancing of VLAN data by
providing multiple redundant paths for data forwarding.
• MSTP is compatible with STP and RSTP, and partially compatible with PVST.
13
Figure 8 MSTP BPDU format
Fields Byte
Protocol ID 2
Protocol version ID 1
BPDU type 1
Flags 1
Root ID 8
Root path cost 4
Bridge ID 8
Port ID 2
Message age 2
Max age 2
Hello time 2
Forward delay 2
Version1 length=0 1
Version3 length 2
MST configuration ID 51
CIST IRPC 4
MSTP-specific
CIST bridge ID 8 fields
CIST remaining ID 1
MSTI configuration messages LEN
The first 13 fields of an MSTP BPDU are the same as an RSTP BPDU. The other six fields are
unique to MSTP.
• Protocol version ID—The value is 0x03 for MSTP.
• BPDU type—The value is 0x02 for RSTP/MSTP BPDUs.
• Root ID—ID of the common root bridge.
• Root path cost—CIST external path cost.
• Bridge ID—ID of the regional root for the IST or an MSTI.
• Port ID—ID of the designated port in the CIST.
• Version3 length—Length of the MSTP-specific fields. Devices use this field for verification
upon receiving an MSTP BPDU.
• MST configuration ID—Includes the format selector, configuration name, revision level, and
configuration digest. The value for format selector is fixed at 0x00. The other parameters are
used to identify the MST region for the originating bridge.
• CIST IRPC—Internal root path cost (IRPC) from the originating bridge to the root of the MST
region.
• CIST bridge ID—ID of the bridge that sends the MSTP BPDU.
• CIST remaining ID—Remaining hop count. This field limits the scale of the MST region. The
regional root sends a BPDU with the remaining hop count set to the maximum value. Each
device that receives the BPDU decrements the hop count by one. When the hop count reaches
zero, the BPDU is discarded. Devices beyond the maximum hops of the MST region cannot
participate in spanning tree calculation. The default remaining hop count is 20.
• MSTI configuration messages—Contains MSTI configuration messages. Each MSTI
configuration message is 16 bytes. This field can contain 0 to 64 MSTI configuration messages.
The number of the MSTI configuration messages is determined by the number of MSTIs in the
MST region.
14
Basic concepts in MSTP
Figure 9 shows a switched network that contains four MST regions, each MST region containing four
MSTP devices. Figure 10 shows the networking topology of MST region 3.
Figure 9 Basic concepts in MSTP
A B A B
To MST region 2
MST region 3
Device A Device B
C D C D
MSTI 1 MSTI 2
A B
Regional root
15
MST region
A multiple spanning tree region (MST region) consists of multiple devices in a switched network and
the network segments among them. All these devices have the following characteristics:
• A spanning tree protocol enabled
• Same region name
• Same VLAN-to-instance mapping configuration
• Same MSTP revision level
• Physically linked together
Multiple MST regions can exist in a switched network. You can assign multiple devices to the same
MST region, as shown in Figure 9.
• The switched network contains four MST regions, MST region 1 through MST region 4.
• All devices in each MST region have the same MST region configuration.
MSTI
MSTP can generate multiple independent spanning trees in an MST region, and each spanning tree
is mapped to the specific VLANs. Each spanning tree is referred to as a multiple spanning tree
instance (MSTI).
In Figure 10, MST region 3 contains three MSTIs, MSTI 1, MSTI 2, and MSTI 0.
VLAN-to-instance mapping table
As an attribute of an MST region, the VLAN-to-instance mapping table describes the mapping
relationships between VLANs and MSTIs.
In Figure 10, the VLAN-to-instance mapping table of MST region 3 is as follows:
• VLAN 1 to MSTI 1.
• VLAN 2 and VLAN 3 to MSTI 2.
• Other VLANs to MSTI 0.
MSTP achieves load balancing by means of the VLAN-to-instance mapping table.
CST
The common spanning tree (CST) is a single spanning tree that connects all MST regions in a
switched network. If you regard each MST region as a device, the CST is a spanning tree calculated
by these devices through STP or RSTP.
The blue lines in Figure 9 represent the CST.
IST
An internal spanning tree (IST) is a spanning tree that runs in an MST region. It is also called MSTI 0,
a special MSTI to which all VLANs are mapped by default.
In Figure 9, MSTI 0 is the IST in MST region 3.
CIST
The common and internal spanning tree (CIST) is a single spanning tree that connects all devices in
a switched network. It consists of the ISTs in all MST regions and the CST.
In Figure 9, the ISTs (MSTI 0) in all MST regions plus the inter-region CST constitute the CIST of the
entire network.
Regional root
The root bridge of the IST or an MSTI within an MST region is the regional root of the IST or MSTI.
Based on the topology, different spanning trees in an MST region might have different regional roots,
as shown in MST region 3 in Figure 10.
16
• The regional root of MSTI 1 is Device B.
• The regional root of MSTI 2 is Device C.
• The regional root of MSTI 0 (also known as the IST) is Device A.
Common root bridge
The common root bridge is the root bridge of the CIST.
In Figure 9, the common root bridge is a device in MST region 1.
Port roles
A port can play different roles in different MSTIs. As shown in Figure 11, an MST region contains
Device A, Device B, Device C, and Device D. Port A1 and port A2 of Device A connect to the
common root bridge. Port B2 and Port B3 of Device B form a loop. Port C3 and Port C4 of Device C
connect to other MST regions. Port D3 of Device D directly connects to a host.
Figure 11 Port roles
To the common root
Boundary port
Port C1
Port C2
Normal link
Device C
Blocked link
Port C3 Port C4
17
CIST. However, that is not true with master ports. A master port on MSTIs is a root port on the
CIST.
Port states
In MSTP, a port can be in one of the following states:
• Forwarding—The port receives and sends BPDUs, learns MAC addresses, and forwards user
traffic.
• Learning—The port receives and sends BPDUs, learns MAC addresses, but does not forward
user traffic. Learning is an intermediate port state.
• Discarding—The port receives and sends BPDUs, but does not learn MAC addresses or
forward user traffic.
NOTE:
When in different MSTIs, a port can be in different states.
A port state is not exclusively associated with a port role. Table 6 lists the port states that each port
role supports. (A check mark [√] indicates that the port supports this state, while a dash [—] indicates
that the port does not support this state.)
Table 6 Port states that different port roles support
18
• Within an MST region, the frame is forwarded along the corresponding MSTI.
• Between two MST regions, the frame is forwarded along the CST.
19
Root port rapid transition
When a root port is blocked, the bridge will elect the alternate port with the highest priority as the new
root port. If the new root port's peer is in the forwarding state, the new root port immediately transits
to the forwarding state.
As shown in Figure 13, Port C2 on Device C is a root port and Port C1 is an alternate port. When Port
C2 transits to the blocking state, Port C1 is elected as the root port and immediately transits to the
forwarding state.
Figure 13 Root port rapid transition
Root port
Designated port
Alternate port
Normal link
Blocked link
Device A Device A
Root bridge Root bridge
P/A transition
The P/A transition enables a designated port to rapidly transit to the forwarding state after a
handshake with its peer. The P/A transition applies only to point-to-point links.
P/A transition for RSTP and PVST
In RSTP or PVST, the ports on a new link or recovered link are designated ports in blocking state.
When one of the designated ports transits to the discarding or learning state, it sets the proposal flag
in its BPDU. Its peer bridge receives the BPDU and determines whether the receiving port is the root
port. If it is the root port, the bridge blocks the other ports except edge ports. The bridge then replies
an agreement BPDU to the designated port. The designated port immediately transits to the
forwarding state upon receiving the agreement BPDU. If the designated port does not receive the
agreement BPDU, it waits for twice the forward delay to transit to the forwarding state.
As shown in Figure 14, the P/A transition operates as follows:
1. Device A sends a proposal BPDU to Device B through Port A1.
2. Device B receives the proposal BPDU on Port B2. Port B2 is elected as the root port.
3. Device B blocks its designated port Port B1 and alternate port Port B3 to eliminate loops.
4. The root port Port B2 transits to the forwarding state and sends an agreement BPDU to Device
A.
5. The designated port Port A1 on Device A immediately transits to the forwarding state after
receiving the agreement BPDU.
20
Figure 14 P/A transition for RSTP and PVST
Root port
Designated port
Alternate port
Edge port
Device A Device A
RID=0.MAC A RID=0.MAC A
Port A1 Port A1
Proposal Agreement
Port B2 Port B2
Device B Device B
RID=4096.MAC B RID=4096.MAC B
Port B3 Port B1 Port B3 Port B1
Agreement
21
• IEEE 802.1Q-REV/D1.3, Media Access Control (MAC) Bridges and Virtual Bridged Local Area
Networks —Clause 13: Spanning tree Protocols
22
Configuring spanning tree protocols
Restrictions and guidelines: spanning tree
protocol configuration
Restrictions: Compatibility with other features
• When the spanning tree protocol is enabled for a DR system, following these restrictions and
guidelines:
Make sure the DR member devices have the same spanning tree configuration, including:
− Global spanning tree configuration.
− Spanning tree configuration on the IPP.
− Spanning tree configuration on DR interfaces.
Violation of this rule might cause network flapping. IPPs in the DR system do not participate
in spanning tree calculation. To view the spanning tree information of DR interfaces, use
related display commands on the primary DR device.
If spanning tree is enabled on a DR system, the DR member devices still use the DR system
MAC address after the DR system splits, which will cause spanning tree calculation issues.
To avoid the issues, enable DRNI standalone mode on the DR member devices before the
DR system splits.
For more information about the DR system, DR interfaces, IPPs, and DRNI standalone mode,
see "Configuring DRNI."
• If both MVRP and a spanning tree protocol are enabled on a device, MVRP packets are
forwarded along MSTIs. To advertise a specific VLAN within the network through MVRP, make
sure this VLAN is mapped to an MSTI when you configure the VLAN-to-instance mapping table.
For more information about MVRP, see "Configuring MVRP."
• The spanning tree configurations are mutually exclusive with any of the following features on a
port: service loopback group, RRPP, Smart Link, and L2PT.
• Spanning tree protocols do not support eliminating loops from a VXLAN or EVPN network.
23
• The member ports of an aggregation group do not participate in spanning tree calculation.
However, the ports still reserve their spanning tree configurations for participating in spanning
tree calculation after leaving the aggregation group.
24
Enabling SNMP notifications for new-root election and topology change events
25
Disabling the device from reactivating edge ports shut down by BPDU guard
Enabling BPDU transparent transmission on a port
Enabling SNMP notifications for new-root election and topology change events
26
Performing mCheck
Disabling inconsistent PVID protection
Configuring protection features
Enabling the device to log events of detecting or receiving TC BPDUs
Disabling the device from reactivating edge ports shut down by BPDU guard
Enabling BPDU transparent transmission on a port
Enabling SNMP notifications for new-root election and topology change events
27
Setting the timeout factor
Configuring the BPDU transmission rate
Configuring edge ports
Configuring path costs of ports
Configuring the port priority
Configuring the port link type
5. (Optional.) Configuring the mode a port uses to recognize and send MSTP frames
6. (Optional.) Enabling outputting port state transition information
7. Enabling the spanning tree feature
8. (Optional.) Configuring advanced spanning tree features
Performing mCheck
Configuring Digest Snooping
Configuring No Agreement Check
Configuring TC Snooping
Configuring protection features
Disabling the device from reactivating edge ports shut down by BPDU guard
Enabling BPDU transparent transmission on a port
Enabling SNMP notifications for new-root election and topology change events
28
system-view
2. Set the spanning tree mode.
stp mode { mstp | pvst | rstp | stp }
The default setting is the MSTP mode.
29
Configuring the root bridge or a secondary root
bridge
Restrictions and guidelines
You can have the spanning tree protocol determine the root bridge of a spanning tree through
calculation. You can also specify a device as the root bridge or as a secondary root bridge.
When you specify a device as the root bridge or as a secondary root bridge, follow these restrictions
and guidelines:
• A device has independent roles in different spanning trees. It can act as the root bridge in one
spanning tree and as a secondary root bridge in another. However, one device cannot be the
root bridge and a secondary root bridge in the same spanning tree.
• If you specify the root bridge for a spanning tree, no new root bridge is elected according to the
device priority settings. Once you specify a device as the root bridge or a secondary root bridge,
you cannot change the priority of the device.
• You can configure a device as the root bridge by setting the device priority to 0. For the device
priority configuration, see "Configuring the device priority."
30
Configuring the device priority
About this task
Device priority is a factor in calculating the spanning tree. The priority of a device determines
whether the device can be elected as the root bridge of a spanning tree. A lower value indicates a
higher priority. You can set the priority of a device to a low value to specify the device as the root
bridge of the spanning tree. A spanning tree device can have different priorities in different spanning
trees.
During root bridge selection, if all devices in a spanning tree have the same priority, the one with the
lowest MAC address is selected. You cannot change the priority of a device after it is configured as
the root bridge or as a secondary root bridge.
Procedure
1. Enter system view.
system-view
2. Configure the priority of the device.
In STP/RSTP mode:
stp priority priority
In PVST mode:
stp vlan vlan-id-list priority priority
In MSTP mode:
stp [ instance instance-list ] priority priority
The default setting is 32768.
31
Configuring the network diameter of a switched
network
About this task
Any two terminal devices in a switched network can reach each other through a specific path, and
there are a series of devices on the path. The switched network diameter is the maximum number of
devices on the path for an edge device to reach another one in the switched network through the root
bridge. The network diameter indicates the network size. The bigger the diameter, the larger the
network size.
Based on the network diameter you configured, the system automatically sets an optimal hello time,
forward delay, and max age for the device.
In STP, RSTP, or MSTP mode, each MST region is considered a device. The configured network
diameter takes effect only on the CIST (or the common root bridge) but not on other MSTIs.
In PVST mode, the configured network diameter takes effect only on the root bridges of the specified
VLANs.
Procedure
1. Enter system view.
system-view
2. Configure the network diameter of the switched network.
In STP/RSTP/MSTP mode:
stp bridge-diameter diameter
In PVST mode:
stp vlan vlan-id-list bridge-diameter diameter
The default setting is 7.
32
As a best practice, specify the network diameter and letting spanning tree protocols automatically
calculate the timers based on the network diameter instead of manually setting the spanning tree
timers. If the network diameter uses the default value, the timers also use their default values.
Set the timers only on the root bridge. The timer settings on the root bridge apply to all devices on the
entire switched network.
Restrictions and guidelines
• The length of the forward delay is related to the network diameter of the switched network. The
larger the network diameter is, the longer the forward delay time should be. As a best practice,
use the automatically calculated value because inappropriate forward delay setting might cause
temporary redundant paths or increase the network convergence time.
• An appropriate hello time setting enables the device to promptly detect link failures on the
network without using excessive network resources. If the hello time is too long, the device
mistakes packet loss for a link failure and triggers a new spanning tree calculation process. If
the hello time is too short, the device frequently sends the same configuration BPDUs, which
wastes device and network resources. As a best practice, use the automatically calculated
value.
• If the max age timer is too short, the device frequently begins spanning tree calculations and
might mistake network congestion as a link failure. If the max age timer is too long, the device
might fail to promptly detect link failures and quickly launch spanning tree calculations, reducing
the auto-sensing capability of the network. As a best practice, use the automatically calculated
value.
Procedure
1. Enter system view.
system-view
2. Set the forward delay timer.
In STP/RSTP/MSTP mode:
stp timer forward-delay time
In PVST mode:
stp vlan vlan-id-list timer forward-delay time
The default setting is 15 seconds.
3. Set the hello timer.
In STP/RSTP/MSTP mode:
stp timer hello time
In PVST mode:
stp vlan vlan-id-list timer hello time
The default setting is 2 seconds.
4. Set the max age timer.
In STP/RSTP/MSTP mode:
stp timer max-age time
In PVST mode:
stp vlan vlan-id-list timer max-age time
The default setting is 20 seconds.
33
Setting the timeout factor
About this task
The timeout factor is a parameter used to decide the timeout period. The formula for calculating the
timeout period is: timeout period = timeout factor × 3 × hello time.
In a stable network, each non-root-bridge device forwards configuration BPDUs to the downstream
devices at the hello time interval to detect link failures. 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.
Then, it starts a new spanning tree calculation process.
Restrictions and guidelines
As a best practice, set the timeout factor to 5, 6, or 7 in the following situations:
• To prevent undesired spanning tree calculations. An upstream device might be too busy to
forward configuration BPDUs in time, for example, many Layer 2 interfaces are configured on
the upstream device. In this case, the downstream device fails to receive a BPDU within the
timeout period and then starts an undesired spanning tree calculation.
• To save network resources on a stable network.
Procedure
1. Enter system view.
system-view
2. Set the timeout factor of the device.
stp timer-factor factor
The default setting is 3.
34
Configuring edge ports
About this task
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 network topology change occurs, an edge port will not
cause a temporary loop. Because a device does not determine whether a port is directly connected
to a terminal, you must manually configure the port as an edge port. After that, the port can rapidly
transit from the blocking state to the forwarding state.
Restrictions and guidelines
• If BPDU guard is disabled on a port configured as an edge port, the port becomes a non-edge
port again if it receives a BPDU from another port. To restore the edge port, re-enable it.
• If a port directly connects to a user terminal, configure it as an edge port and enable BPDU
guard for it. This enables the port to quickly transit to the forwarding state when ensuring
network security.
• On a port, the loop guard feature and the edge port setting are mutually exclusive.
Procedure
1. Enter system view.
system-view
2. Enter interface view.
interface interface-type interface-number
3. Configure the port as an edge port.
stp edged-port
By default, all ports are non-edge ports.
35
Table 7 Mappings between the link speed (100M and below) and the path cost
Path cost
Link speed Port type IEEE Private
IEEE 802.1t
802.1d-1998 standard
0 N/A 65535 200000000 200000
Single port 2000000 2000
Aggregate interface
containing two Selected 1000000 1800
ports
Table 8 Mappings between the link speed (1000M) and the path cost
Path cost
Link speed Port type IEEE Private
IEEE 802.1t
802.1d-1998 standard
Single port 20000 20
Aggregate interface
containing two Selected 10000 18
ports
Table 9 Mappings between the link speed (10G) and the path cost
Path cost
Link speed Port type IEEE Private
IEEE 802.1t
802.1d-1998 standard
Single port 2000 2
10 Gbps 2
Aggregate interface 1000 1
36
Path cost
Link speed Port type IEEE Private
IEEE 802.1t
802.1d-1998 standard
containing two Selected
ports
Aggregate interface
containing three Selected 666 1
ports
Aggregate interface
containing four Selected 500 1
ports
Table 10 Mappings between the link speed (25G) and the path cost
Path cost
Link speed Port type IEEE Private
IEEE 802.1t
802.1d-1998 standard
Single port 800 1
Aggregate interface
containing two Selected 400 1
ports
Table 11 Mappings between the link speed (40G) and the path cost
Path cost
Link speed Port type IEEE Private
IEEE 802.1t
802.1d-1998 standard
Single port 500 1
Aggregate interface
containing two Selected 250 1
ports
Table 12 Mappings between the link speed (100G) and the path cost
Path cost
Link speed Port type IEEE Private
IEEE 802.1t
802.1d-1998 standard
100 Gbps Single port 1 200 1
37
Path cost
Link speed Port type IEEE Private
IEEE 802.1t
802.1d-1998 standard
Aggregate interface
containing two Selected 100 1
ports
Aggregate interface
containing three Selected 66 1
ports
Aggregate interface
containing four Selected 50 1
ports
38
In PVST mode:
stp vlan vlan-id-list cost cost-value
In MSTP mode:
stp [ instance instance-list ] cost cost-value
By default, the system automatically calculates the path cost of each port.
39
• In PVST or MSTP mode, the stp point-to-point force-false or stp
point-to-point force-true command configured on a port takes effect on all VLANs or
all MSTIs.
• Before you set the link type of a port to point-to-point, make sure the port is connected to a
point-to-point link. Otherwise, a temporary loop might occur.
Procedure
1. Enter system view.
system-view
2. Enter interface view.
interface interface-type interface-number
3. Configure the port link type.
stp point-to-point { auto | force-false | force-true }
By default, the link type is auto where the port automatically detects the link type.
40
Enabling outputting port state transition
information
About this task
In a large-scale spanning tree network, you can enable devices to output the port state transition
information. Then, you can monitor the port states in real time.
Procedure
1. Enter system view.
system-view
2. Enable outputting port state transition information.
In STP/RSTP mode:
stp port-log instance 0
In PVST mode:
stp port-log vlan vlan-id-list
In MSTP mode:
stp port-log { all | instance instance-list }
By default, outputting port state transition information is disabled.
41
interface interface-type interface-number
4. Enable the spanning tree feature for the port.
stp enable
By default, the spanning tree feature is enabled on all ports.
Performing mCheck
About mCheck
The mCheck feature enables user intervention in the port state transition process.
When a port on an MSTP, RSTP, or PVST device connects to an STP device and receives STP
BPDUs, the port automatically transits to the STP mode. However, the port cannot automatically
transit back to the original mode when the following conditions exist:
• The peer STP device is shut down or removed.
• The port cannot detect the change.
To forcibly transit the port to operate in the original mode, you can perform an mCheck operation.
For example, Device A, Device B, and Device C are connected in sequence. Device A runs STP,
Device B does not run any spanning tree protocol, and Device C runs RSTP, PVST, or MSTP. In this
case, when Device C receives an STP BPDU transparently transmitted by Device B, the receiving
port transits to the STP mode. If you configure Device B to run RSTP, PVST, or MSTP with Device C,
you must perform mCheck operations on the ports interconnecting Device B and Device C.
42
Performing mCheck globally
1. Enter system view.
system-view
2. Perform mCheck.
stp global mcheck
43
• Revision level.
• VLAN-to-instance mappings.
A spanning tree device identifies devices in the same MST region by determining the configuration
ID in BPDUs. The configuration ID includes the region name, revision level, and configuration digest.
It is 16-byte long and is the result calculated through the HMAC-MD5 algorithm based on
VLAN-to-instance mappings.
Because spanning tree implementations vary by vendor, the configuration digests calculated through
private keys are different. The devices of different vendors in the same MST region cannot
communicate with each other.
To enable communication between an H3C device and a third-party device in the same MST region,
enable Digest Snooping on the H3C device port connecting them.
Restrictions and guidelines
CAUTION:
Use caution with global Digest Snooping in the following situations:
• When you modify the VLAN-to-instance mappings.
• When you restore the default MST region configuration.
If the local device has different VLAN-to-instance mappings than its neighboring devices, loops or
traffic interruption will occur.
• Before you enable Digest Snooping, make sure associated devices of different vendors are
connected and run spanning tree protocols.
• With Digest Snooping enabled, in-the-same-region verification does not require comparison of
configuration digest. The VLAN-to-instance mappings must be the same on associated ports.
• To make Digest Snooping take effect, you must enable Digest Snooping both globally and on
associated ports. As a best practice, enable Digest Snooping on all associated ports first and
then enable it globally. This will make the configuration take effect on all configured ports and
reduce impact on the network.
• To prevent loops, do not enable Digest Snooping on MST region edge ports.
• As a best practice, enable Digest Snooping first and then enable the spanning tree feature. To
avoid traffic interruption, do not configure Digest Snooping when the network is already working
well.
Prerequisites
Before configuring Digest Snooping, you need to make sure your H3C device and the third-party
device both run spanning tree protocols properly.
Procedure
1. Enter system view.
system-view
2. Enter interface view.
interface interface-type interface-number
3. Enable Digest Snooping on the interface.
stp config-digest-snooping
By default, Digest Snooping is disabled on ports.
4. Return to system view.
quit
5. Enable Digest Snooping globally.
stp global config-digest-snooping
44
By default, Digest Snooping is disabled globally.
(1) Proposal for rapid transition The root port blocks non-edge
ports.
If the upstream device is a third-party device, the rapid state transition implementation might be
limited as follows:
• The upstream device uses a rapid transition mechanism similar to that of RSTP.
• The downstream device runs MSTP and does not operate in RSTP mode.
45
In this case, the following occurs:
1. The root port on the downstream device receives no agreement from the upstream device.
2. It sends no agreement to the upstream device.
As a result, the designated port of the upstream device can transit to the forwarding state only after a
period twice the forward delay.
To enable the designated port of the upstream device to transit its state rapidly, enable No
Agreement Check on the downstream device's port.
Restrictions and guidelines
Configure No Agreement Check on the root port of your device, because this feature takes effect
only if it's configured on root ports.
Prerequisites
Before you configure the No Agreement Check feature, complete the following tasks:
• Connect a device to a third-party upstream device that supports spanning tree protocols
through a point-to-point link.
• Configure the same region name, revision level, and VLAN-to-instance mappings on the two
devices.
Procedure
Enable the No Agreement Check feature on the root port.
1. Enter system view.
system-view
2. Enter interface view.
interface interface-type interface-number
3. Enable No Agreement Check.
stp no-agreement-check
By default, No Agreement Check is disabled.
Configuring TC Snooping
About this task
As shown in Figure 18, an IRF fabric connects to two user networks through double links.
• Device A and Device B form the IRF fabric.
• The spanning tree feature is disabled on Device A and Device B and enabled on all devices in
user network 1 and user network 2.
• The IRF fabric transparently transmits BPDUs for both user networks and is not involved in the
calculation of spanning trees.
When the network topology changes, it takes time for the IRF fabric to update its MAC address table
and ARP table. During this period, traffic in the network might be interrupted.
46
Figure 18 TC Snooping application scenario
IRF
Device A Device B
IRF link
To avoid traffic interruption, you can enable TC Snooping on the IRF fabric. After receiving a
TC-BPDU through a port, the IRF fabric updates MAC address table and ARP table entries
associated with the port's VLAN. In this way, TC Snooping prevents topology change from
interrupting traffic forwarding in the network. For more information about the MAC address table and
the ARP table, see "Configuring the MAC address table" and Layer 3—IP Services Configuration
Guide.
Restrictions and guidelines
• TC Snooping and the spanning tree feature are mutually exclusive. You must globally disable
the spanning tree feature before enabling TC Snooping.
• The priority of BPDU tunneling is higher than that of TC Snooping. When BPDU tunneling is
enabled on a port, the TC Snooping feature does not take effect on the port.
• TC Snooping does not support the PVST mode.
Procedure
1. Enter system view.
system-view
2. Globally disable the spanning tree feature.
undo stp global enable
When the device starts up with initial settings, the spanning tree feature is globally disabled.
When the device starts up with factory defaults, the spanning tree feature is globally enabled.
For more information about the initial settings and factory defaults, see Fundamentals
Configuration Guide.
3. Enable TC Snooping.
stp tc-snooping
By default, TC Snooping is disabled.
47
• Enabling root guard
• Enabling loop guard
• Configuring port role restriction
• Configuring TC-BPDU transmission restriction
• Enabling TC-BPDU guard
• Enabling BPDU drop
• Enabling PVST BPDU guard
• Disabling dispute guard
48
system-view
2. Enter interface view.
interface interface-type interface-number
3. Configure BPDU guard.
stp port bpdu-protection { enable | disable }
By default, the enabling status of BPDU guard on an edge port is the same as that of global
BPDU guard, and BPDU guard is not configured for non-edge ports.
49
• Those ports in forwarding state that failed to receive upstream BPDUs become designated
ports.
• The blocked ports transit to the forwarding state.
As a result, loops occur in the switched network. The loop guard feature can suppress the
occurrence of such loops.
The initial state of a loop guard-enabled port is discarding in every MSTI. When the port receives
BPDUs, it transits its state. Otherwise, it stays in the discarding state to prevent temporary loops.
Restrictions and guidelines
Do not enable loop guard on a port that connects user terminals. Otherwise, the port stays in the
discarding state in all MSTIs because it cannot receive BPDUs.
On a port, the loop guard feature is mutually exclusive with the root guard feature or the edge port
setting.
A loop guard-enabled interface can receive BPDUs and transit from the discarding state to the
forwarding state after two forward delays if one of the following events occurs:
• The state of the interface changes from down to up.
• The spanning tree feature is enabled on the up interface.
Procedure
1. Enter system view.
system-view
2. Enter interface view.
interface interface-type interface-number
3. Enable the loop guard feature.
stp loop-protection
By default, loop guard is disabled.
50
Configuring TC-BPDU transmission restriction
About this task
Make this configuration on the port that connects to the user access network.
The topology change to the user access network might cause the forwarding address changes to the
core network. When the user access network topology is unstable, the user access network might
affect the core network. To avoid this problem, you can enable TC-BPDU transmission restriction on
a port. With this feature enabled, when the port receives a TC-BPDU, it does not forward the
TC-BPDU to other ports.
Restrictions and guidelines
Enabling TC-BPDU transmission restriction on a port might cause the previous forwarding address
table to fail to be updated when the topology changes.
Procedure
1. Enter system view.
system-view
2. Enter interface view.
interface interface-type interface-number
3. Enable TC-BPDU transmission restriction.
stp tc-restriction
By default, TC-BPDU transmission restriction is disabled.
51
Enabling BPDU drop
About this task
In a spanning tree network, every BPDU arriving at the device triggers an STP calculation process
and is then forwarded to other devices in the network. Malicious attackers might use the vulnerability
to attack the network by forging BPDUs. By continuously sending forged BPDUs, they can make all
devices in the network continue performing STP calculations. As a result, problems such as CPU
overload and BPDU protocol status errors occur.
To avoid this problem, you can enable BPDU drop on ports. A BPDU drop-enabled port does not
receive any BPDUs and is invulnerable to forged BPDU attacks.
Restrictions and guidelines
This feature allows the device to drop BPDUs of STP, RSTP, MSTP, LACP, PVST, Ethernet OAM,
GVRP, and LLDP. Make sure you are fully aware of the impact of this feature when you use it on a
live network.
Procedure
1. Enter system view.
system-view
2. Enter Layer 2 Ethernet interface view.
interface interface-type interface-number
3. Enable BPDU drop on the interface.
bpdu-drop any
By default, BPDU drop is disabled.
52
• Device A is the root bridge, and Port A1 is a designated port.
• Port B1 is blocked.
When the link between Port A1 and Port B1 fails in the direction of Port A1 to Port B1 and becomes
unidirectional, the following events occur:
1. Port A1 can only receive BPDUs and cannot send BPDUs to Port B1.
2. Port B1 does not receive BPDUs from Port A1 for a certain period of time.
3. Device B determines itself as the root bridge.
4. Port B1 sends its BPDUs to Port A1.
5. Port A1 determines the received BPDUs are inferior to its own BPDUs. A dispute is detected.
6. Dispute guard is triggered and blocks Port A1 to prevent a loop.
Figure 19 Dispute guard triggering scenario (on a designated port)
As shown in Figure 20, in normal conditions, Device A is the root bridge, and Port B1 and Port C1 are
root ports. When the links between Device A and Device B become unidirectional (the links fail in the
direction of Port A1 to Port B1), the following events occur:
1. Device B cannot receive BPDUs from Device A.
2. Device B determines itself as the root bridge.
3. Port B1 sends BPDUs in which the root bridge is Device B to Port C1.
4. Port C1 receives BPDUs from two root bridges, Device A and Device B. A dispute is detected.
5. Dispute guard is triggered and blocks Port C1 to avoid a loop.
53
Figure 20 Dispute guard triggering scenario (on a root port)
Device A Device B Device A Device B Device A Device B
However, dispute guard might disrupt the network connectivity. You can disable dispute guard to
avoid connectivity loss in VLAN networks. As shown in Figure 21, the spanning tree feature is
disabled on Device B and enabled on Device A and device C. Device B transparently transmits
BPDUs.
Device C cannot receive superior BPDUs of VLAN 1 from Device A because Port B1 of Device B is
configured to deny packets of VLAN 1. Device C determines itself as the root bridge after a certain
period of time. Then, Port C1 sends an inferior BPDU of VLAN 100 to Device A.
When Device A receives the inferior BPDU, dispute guard blocks Port A1, which causes traffic
interruption. To ensure service continuity, you can disable dispute guard on Device A to prevent the
link from being blocked.
Figure 21 Disabling dispute guard application scenario
Device A Device B Device C
Port A1 Port B1 Port B2 Port C1
Root
54
Enabling the device to log events of detecting or
receiving TC BPDUs
About this task
This feature allows the device to generate logs when it detects or receives TC BPDUs. This feature
applies only to PVST mode.
Procedure
1. Enter system view.
system-view
2. Enable the device to log events of receiving or detecting TC BPDUs.
stp log enable tc
By default, the device does not generate logs when it detects or receives TC BPDUs.
55
If this feature and the spanning tree protocol are enabled on a port which is inferior to its downstream
port, the downstream port can receive BPDUs from that port. To prevent network flapping caused by
this problem, disable the spanning tree protocol before you enable BPDU transparent transmission
on the port.
Procedure
1. Enter system view.
system-view
2. Enter interface view.
interface interface-type interface-number
3. Enable BPDU transparent transmission.
stp transparent enable
By default, the BPDU transparent transmission feature is disabled on a port.
56
Display and maintenance commands for the
spanning tree protocols
IMPORTANT:
You can view DR system settings by using the display stp and display stp root
commands only in Release 6616 and later.
Execute display commands in any view and reset command in user view.
Task Command
display stp [ instance instance-list | vlan
Display the spanning tree status
and statistics.
vlan-id-list ] [ interface interface-list |
slot slot-number ] [ brief ]
Display the port role calculation display stp [ instance instance-list | vlan
history for the specified MSTI or all
MSTIs.
vlan-id-list ] history [ slot slot-number ]
57
• VLAN 40 frames are forwarded along MSTI 4.
• VLAN 20 frames are forwarded along MSTI 0.
VLAN 10 and VLAN 30 are terminated on the distribution layer devices, and VLAN 40 is terminated
on the access layer devices. The root bridges of MSTI 1 and MSTI 3 are Device A and Device B,
respectively, and the root bridge of MSTI 4 is Device C.
Figure 22 Network diagram
MST region
Device A Device B
Permit: all VLANs
WGE1/0/3 WGE1/0/3
WG
1
/2
WG
1/0
/0/
E1
/0/ E
E1
E1
2 WG
WG
/0/
1
Permit: VLANs 10 Permit: VLANs 20
and 20 d 20 Pe and 30
an rm
it:
10 VL
Ns
WG
AN
1
A
/0/
VL s2
it:
E1
0a
E1
WG
/0/2 rm nd
Pe
/0/
E1
WG
E1 30 /0/
1
WG 2
WGE1/0/3 WGE1/0/3
Permit: VLANs 20 and 40
Device C Device D
Procedure
1. Configure VLANs and VLAN member ports. (Details not shown.)
Create VLAN 10, VLAN 20, and VLAN 30 on both Device A and Device B.
Create VLAN 10, VLAN 20, and VLAN 40 on Device C.
Create VLAN 20, VLAN 30, and VLAN 40 on Device D.
Configure the ports on these devices as trunk ports and assign them to related VLANs.
2. Configure Device A:
# Enter MST region view, and configure the MST region name as example.
<DeviceA> system-view
[DeviceA] stp region-configuration
[DeviceA-mst-region] region-name example
# Map VLAN 10, VLAN 30, and VLAN 40 to MSTI 1, MSTI 3, and MSTI 4, respectively.
[DeviceA-mst-region] instance 1 vlan 10
[DeviceA-mst-region] instance 3 vlan 30
[DeviceA-mst-region] instance 4 vlan 40
# Configure the revision level of the MST region as 0.
[DeviceA-mst-region] revision-level 0
# Activate MST region configuration.
[DeviceA-mst-region] active region-configuration
[DeviceA-mst-region] quit
# Configure the Device A as the root bridge of MSTI 1.
[DeviceA] stp instance 1 root primary
# Enable the spanning tree feature globally.
[DeviceA] stp global enable
3. Configure Device B:
58
# Enter MST region view, and configure the MST region name as example.
<DeviceB> system-view
[DeviceB] stp region-configuration
[DeviceB-mst-region] region-name example
# Map VLAN 10, VLAN 30, and VLAN 40 to MSTI 1, MSTI 3, and MSTI 4, respectively.
[DeviceB-mst-region] instance 1 vlan 10
[DeviceB-mst-region] instance 3 vlan 30
[DeviceB-mst-region] instance 4 vlan 40
# Configure the revision level of the MST region as 0.
[DeviceB-mst-region] revision-level 0
# Activate MST region configuration.
[DeviceB-mst-region] active region-configuration
[DeviceB-mst-region] quit
# Configure Device B as the root bridge of MSTI 3.
[DeviceB] stp instance 3 root primary
# Enable the spanning tree feature globally.
[DeviceB] stp global enable
4. Configure Device C:
# Enter MST region view, and configure the MST region name as example.
<DeviceC> system-view
[DeviceC] stp region-configuration
[DeviceC-mst-region] region-name example
# Map VLAN 10, VLAN 30, and VLAN 40 to MSTI 1, MSTI 3, and MSTI 4, respectively.
[DeviceC-mst-region] instance 1 vlan 10
[DeviceC-mst-region] instance 3 vlan 30
[DeviceC-mst-region] instance 4 vlan 40
# Configure the revision level of the MST region as 0.
[DeviceC-mst-region] revision-level 0
# Activate MST region configuration.
[DeviceC-mst-region] active region-configuration
[DeviceC-mst-region] quit
# Configure the Device C as the root bridge of MSTI 4.
[DeviceC] stp instance 4 root primary
# Enable the spanning tree feature globally.
[DeviceC] stp global enable
5. Configure Device D:
# Enter MST region view, and configure the MST region name as example.
<DeviceD> system-view
[DeviceD] stp region-configuration
[DeviceD-mst-region] region-name example
# Map VLAN 10, VLAN 30, and VLAN 40 to MSTI 1, MSTI 3, and MSTI 4, respectively.
[DeviceD-mst-region] instance 1 vlan 10
[DeviceD-mst-region] instance 3 vlan 30
[DeviceD-mst-region] instance 4 vlan 40
# Configure the revision level of the MST region as 0.
[DeviceD-mst-region] revision-level 0
# Activate MST region configuration.
59
[DeviceD-mst-region] active region-configuration
[DeviceD-mst-region] quit
# Enable the spanning tree feature globally.
[DeviceD] stp global enable
60
Based on the output, you can draw each MSTI mapped to each VLAN, as shown in Figure 23.
Figure 23 MSTIs mapped to different VLANs
A B A B
C C D
A B
D C D
61
Figure 24 Network diagram
Device A Device B
Permit: all VLANs
WGE1/0/3 WGE1/0/3
WG
/1
2
WG
E1 /0/
1/0
/0/ E1
E
2 WG
1/0
WG
/1
Permit: VLANs 10 Permit: VLANs 20
and 20 20 P and 30
nd erm
0a it:
N s1 VL
AN
LA
WG
/1
V s2
it:
1/0
0a WG
E
0/2 rm nd
1/0
Pe E1
E
1/ 30
WG
E /0/
WG
/1
2
WGE1/0/3 WGE1/0/3
Permit: VLANs 20 and 40
Device C Device D
Procedure
1. Configure VLANs and VLAN member ports. (Details not shown.)
Create VLAN 10, VLAN 20, and VLAN 30 on both Device A and Device B.
Create VLAN 10, VLAN 20, and VLAN 40 on Device C.
Create VLAN 20, VLAN 30, and VLAN 40 on Device D.
Configure the ports on these devices as trunk ports and assign them to related VLANs.
2. Configure Device A:
# Set the spanning tree mode to PVST.
<DeviceA> system-view
[DeviceA] stp mode pvst
# Configure the device as the root bridge of VLAN 10 and VLAN 20.
[DeviceA] stp vlan 10 20 root primary
# Enable the spanning tree feature globally and in VLAN 10, VLAN 20, and VLAN 30.
[DeviceA] stp global enable
[DeviceA] stp vlan 10 20 30 enable
3. Configure Device B:
# Set the spanning tree mode to PVST.
<DeviceB> system-view
[DeviceB] stp mode pvst
# Configure the device as the root bridge of VLAN 30.
[DeviceB] stp vlan 30 root primary
# Enable the spanning tree feature globally and in VLAN 10, VLAN 20, and VLAN 30.
[DeviceB] stp global enable
[DeviceB] stp vlan 10 20 30 enable
4. Configure Device C:
# Set the spanning tree mode to PVST.
<DeviceC> system-view
[DeviceC] stp mode pvst
# Configure the device as the root bridge of VLAN 40.
[DeviceC] stp vlan 40 root primary
# Enable the spanning tree feature globally and in VLAN 10, VLAN 20, and VLAN 40.
62
[DeviceC] stp global enable
[DeviceC] stp vlan 10 20 40 enable
5. Configure Device D:
# Set the spanning tree mode to PVST.
<DeviceD> system-view
[DeviceD] stp mode pvst
# Enable the spanning tree feature globally and in VLAN 20, VLAN 30, and VLAN 40.
[DeviceD] stp global enable
[DeviceD] stp vlan 20 30 40 enable
63
30 Twenty-FiveGigE1/0/1 ROOT FORWARDING NONE
30 Twenty-FiveGigE1/0/2 ALTE DISCARDING NONE
40 Twenty-FiveGigE1/0/3 ROOT FORWARDING NONE
Based on the output, you can draw a topology for each VLAN spanning tree, as shown in Figure 25.
Figure 25 VLAN spanning tree topologies
A B A B
C C D
A B
D C D
NOTE:
• As a best practice, do not connect ports on Device A and Device B that have the same port ID with each
other, for example Layer 2 aggregate ports. Otherwise, when Device A and Device B communicate through
the link, the spanning tree protocol determines that the device receives its own BPDUs. Loop guard will
block the link, though spanning tree features are not affected.
• You can view port IDs of interfaces on the device by using the display stp interface command.
• The preceding restrictions do not apply to IPPs and their member ports.
64
Figure 26 Network diagram
Device A Device B
IPL
Permit: all VLANs
Device C Device D
Procedure
1. Configure VLANs and VLAN member ports. (Details not shown.)
Create VLAN 10, VLAN 20, and VLAN 30 on both Device A and Device B.
Create VLAN 10, and VLAN 20 on Device C.
Create VLAN 20, and VLAN 30 on Device D.
Configure the ports on these devices as trunk ports and assign them to related VLANs.
2. Configure DRNI on Device A and Device B. (Details not shown.)
For more information about DRNI, see "Configuring DRNI."
3. Configure Device A:
# Set the spanning tree mode to PVST.
<DeviceA> system-view
[DeviceA] stp mode pvst
# Configure the device as the root bridge of VLAN 10 and VLAN 20.
[DeviceA] stp vlan 10 20 root primary
# Enable the spanning tree feature globally and in VLAN 10, VLAN 20, and VLAN 30.
[DeviceA] stp global enable
[DeviceA] stp vlan 10 20 30 enable
4. Configure Device B in the same way Device A is configured. (Details not shown.)
5. Configure Device C:
# Set the spanning tree mode to PVST.
<DeviceC> system-view
[DeviceC] stp mode pvst
# Enable the spanning tree feature globally and in VLAN 10, and VLAN 20.
[DeviceC] stp global enable
[DeviceC] stp vlan 10 20 enable
6. Configure Device D:
# Set the spanning tree mode to PVST.
<DeviceD> system-view
[DeviceD] stp mode pvst
# Enable the spanning tree feature globally and in VLAN 20, and VLAN 30.
[DeviceD] stp global enable
[DeviceD] stp vlan 20 30 enable
65
Verifying the configuration
When the network is stable, you can use the display stp brief command to display brief
spanning tree information on each device.
# Display brief spanning tree information of the DR system on the primary DR device, Device A.
[DeviceA] display stp brief
VLAN ID Port Role STP State Protection
10 Bridge-Aggregation1 (DR) DESI FORWARDING NONE
20 Bridge-Aggregation1 (DR) DESI FORWARDING NONE
20 Bridge-Aggregation2 (DR) DESI FORWARDING NONE
30 Bridge-Aggregation2 (DR) DESI FORWARDING NONE
66
Contents
Configuring LLDP ·························································································· 1
About LLDP ························································································································································ 1
LLDP agents and bridge modes················································································································· 1
LLDP frame formats ··································································································································· 2
LLDPDUs ··················································································································································· 3
TLVs ··························································································································································· 3
Management address ································································································································ 6
LLDP operating modes ······························································································································ 6
Transmitting and receiving LLDP frames ··································································································· 7
Collaboration with Track····························································································································· 7
Protocols and standards ···························································································································· 7
Restrictions and guidelines: LLDP configuration································································································ 8
LLDP tasks at a glance ······································································································································ 8
Enabling LLDP ··················································································································································· 9
Setting the LLDP bridge mode ··························································································································· 9
Setting the LLDP operating mode ······················································································································ 9
Setting the LLDP reinitialization delay·············································································································· 10
Configuring the advertisable TLVs ··················································································································· 10
Configuring advertisement of the management address TLV ·········································································· 13
Setting the encapsulation format for LLDP frames ·························································································· 14
Setting LLDP frame transmission parameters ································································································· 15
Setting the timeout for receiving LLDP frames ································································································ 15
Enabling LLDP polling ······································································································································ 16
Disabling LLDP PVID inconsistency check ······································································································ 16
Configuring CDP compatibility ························································································································· 16
Configuring LLDP trapping and LLDP-MED trapping ······················································································ 18
Configuring LLDP neighbor validation and aging····························································································· 19
Configuring LLDP neighbor validation on an interface ············································································· 19
Configuring LLDP neighbor aging on an interface ··················································································· 19
Configuring MAC address borrowing ··············································································································· 20
Setting the source MAC address of LLDP frames ··················································································· 20
Enabling generation of ARP or ND entries for received management address TLVs······························ 20
Display and maintenance commands for LLDP ······························································································· 21
LLDP configuration examples ·························································································································· 22
Example: Configuring basic LLDP functions ···························································································· 22
Example: Configuring CDP-compatible LLDP·························································································· 26
Configuring DCBX ······················································································· 29
About DCBX ····················································································································································· 29
DCBX versions ········································································································································· 29
DCBX functions ········································································································································ 29
DCBX application scenario ······················································································································ 29
Protocols and standards ·························································································································· 30
DCBX tasks at a glance ··································································································································· 30
Enabling LLDP and DCBX TLV advertising ····································································································· 30
Setting the DCBX version ································································································································ 31
Configuring APP parameters ··························································································································· 31
Configuring ETS parameters···························································································································· 33
About ETS parameters····························································································································· 33
Restrictions and guidelines ······················································································································ 33
Configuring the 802.1p-to-local priority mapping ····················································································· 33
Configuring group-based WRR queuing ·································································································· 34
Configuring PFC parameters ··························································································································· 35
DCBX configuration examples ························································································································· 35
Example: Configuring DCBX ···················································································································· 35
i
Configuring LLDP
About LLDP
The Link Layer Discovery Protocol (LLDP) is a standard link layer protocol that allows network
devices from different vendors to discover neighbors and exchange system and configuration
information.
In an LLDP-enabled network, a device advertises local device information in LLDP Data Units
(LLDPDUs) to the directly connected devices. The information distributed through LLDP is stored by
its recipients in standard MIBs, making it possible for the information to be accessed by a Network
Management System (NMS) through SNMP.
Information that can be distributed through LLDP includes (but is not limited to):
• Major capabilities of the system.
• Management IP address of the system.
• Device ID.
• Port ID.
Nearest Nearest
customer customer
bridge bridge
Nearest Nearest Nearest
non-TPMR non-TPMR non-TPMR
bridge bridge bridge
Nearest Nearest Nearest Nearest
bridge bridge bridge bridge
CB 1 SB 1 TPMR CB 2
1
The types of supported LLDP agents vary with the bridge mode in which LLDP operates. LLDP
supports the following bridge modes: customer bridge (CB) and service bridge (SB).
• Customer bridge mode—LLDP supports nearest bridge agent, nearest non-TPMR bridge
agent, and nearest customer bridge agent. LLDP processes the LLDP frames with destination
MAC addresses for these agents and transparently transmits the LLDP frames with other
destination MAC addresses in VLANs.
• Service bridge mode—LLDP supports nearest bridge agent and nearest non-TPMR bridge
agent. LLDP processes the LLDP frames with destination MAC addresses for these agents and
transparently transmits the LLDP frames with other destination MAC addresses in VLANs.
Type
Data = LLDPDU
(1500 bytes)
FCS
Field Description
Type Ethernet type for the upper-layer protocol. This field is 0x88CC for LLDP.
Data LLDPDU.
Frame check sequence, a 32-bit CRC value used to determine the validity of
FCS
the received Ethernet frame.
2
LLDP frame encapsulated in SNAP
Figure 3 SNAP-encapsulated LLDP frame
0 15 31
Destination MAC address
Type
Data = LLDPDU
(n bytes)
FCS
Field Description
MAC address to which the LLDP frame is advertised. It is the same as that
Destination MAC address
for Ethernet II-encapsulated LLDP frames.
LLDPDUs
Each LLDP frame contains one LLDPDU. Each LLDPDU is a sequence of type-length-value (TLV)
structures.
Figure 4 LLDPDU encapsulation format
Chassis ID TLV Port ID TLV Time To Live TLV Optional TLV ... Optional TLV End of LLDPDU TLV
As shown in Figure 4, each LLDPDU starts with the following mandatory TLVs: Chassis ID TLV, Port
ID TLV, and Time to Live TLV. The mandatory TLVs are followed by a maxiumu of 29 optional TLVs.
TLVs
A TLV is an information element that contains the type, length, and value fields.
LLDPDU TLVs include the following categories:
• Basic management TLVs.
• Organizationally (IEEE 802.1 and IEEE 802.3) specific TLVs.
• LLDP-MED (media endpoint discovery) TLVs.
Basic management TLVs are essential to device management.
3
Organizationally specific TLVs and LLDP-MED TLVs are used for enhanced device management.
They are defined by standardization or other organizations and are optional for LLDPDUs.
Basic management TLVs
Table 3 lists the basic management TLV types. Some of them are mandatory for LLDPDUs.
Table 3 Basic management TLVs
End of LLDPDU Marks the end of the TLV sequence in the LLDPDU.
Port Description Specifies the description for the sending port.
System Name Specifies the assigned name of the sending device.
System Description Specifies the description for the sending device.
Identifies the primary features of the sending device and the
System Capabilities Optional.
enabled primary features.
Type Description
VLAN Name Specifies the textual name of any VLAN to which the port belongs.
Protocol Identity Indicates protocols supported on the port.
DCBX Data center bridging exchange protocol.
Edge Virtual Bridging module, including EVB TLV and CDCP TLV.
EVB module
EVB module TLVs are not supported in the current software version.
Indicates whether the port supports link aggregation, and if yes, whether link
Link Aggregation
aggregation is enabled.
Management VID Management VLAN ID.
4
Type Description
Type Description
Contains the bit-rate and duplex capabilities of the port, support for
MAC/PHY Configuration/Status autonegotiation, enabling status of autonegotiation, and the current
rate and duplex mode.
Indicates whether the port supports link aggregation, and if yes,
Link Aggregation
whether link aggregation is enabled.
Contains the power supply capabilities of the port:
• Port class (PSE or PD).
• Power supply mode.
• Whether PSE power supply is supported.
• Whether PSE power supply is enabled.
Power Via MDI • Whether pair selection can be controlled.
• Power supply type.
• Power source.
• Power priority.
• PD requested power.
• PSE allocated power.
Maximum Frame Size Indicates the supported maximum frame size.
Indicates the power state control configured on the sending port,
including the following:
Power Stateful Control • Power supply mode of the PSE/PD.
• PSE/PD priority.
• PSE/PD power.
Energy-Efficient Ethernet Indicates Energy Efficient Ethernet (EEE).
LLDP-MED TLVs
LLDP-MED TLVs provide multiple advanced applications for voice over IP (VoIP), such as basic
configuration, network policy configuration, and address and directory management. LLDP-MED
TLVs provide a cost-effective and easy-to-use solution for deploying voice devices in Ethernet.
LLDP-MED TLVs are shown in Table 6.
5
If the MAC/PHY configuration/status TLV is not advertisable, none of the LLDP-MED TLVs will be
advertised even if they are advertisable.
If the LLDP-MED capabilities TLV is not advertisable, the other LLDP-MED TLVs will not be
advertised even if they are advertisable.
Table 6 LLDP-MED TLVs
Type Description
Allows a terminal device to advertise its asset ID. The typical case is
Asset ID that the user specifies the asset ID for the endpoint to facilitate
directory management and asset tracking.
Management address
The network management system uses the management address of a device to identify and manage
the device for topology maintenance and network management. The management address is
encapsulated in the management address TLV.
6
Transmitting and receiving LLDP frames
Transmitting LLDP frames
An LLDP agent operating in TxRx mode or Tx mode sends LLDP frames to its directly connected
devices both periodically and when the local configuration changes. To prevent LLDP frames from
overwhelming the network during times of frequent changes to local device information, LLDP uses
the token bucket mechanism to rate limit LLDP frames. For more information about the token bucket
mechanism, see ACL and QoS Configuration Guide.
LLDP automatically enables the fast LLDP frame transmission mechanism in either of the following
cases:
• A new LLDP frame is received and carries device information new to the local device.
• The LLDP operating mode of the LLDP agent changes from Disable or Rx to TxRx or Tx.
The fast LLDP frame transmission mechanism successively sends the specified number of LLDP
frames at a configurable fast LLDP frame transmission interval. The mechanism helps LLDP
neighbors discover the local device as soon as possible. Then, the normal LLDP frame transmission
interval resumes.
Receiving LLDP frames
An LLDP agent operating in TxRx mode or Rx mode confirms the validity of TLVs carried in every
received LLDP frame. If the TLVs are valid, the LLDP agent saves the information and starts an
aging timer. The initial value of the aging timer is equal to the TTL value in the Time To Live TLV
carried in the LLDP frame. When the LLDP agent receives a new LLDP frame, the aging timer
restarts. When the aging timer decreases to zero, all saved information ages out.
7
Restrictions and guidelines: LLDP configuration
When you configure LLDP, follow these restrictions and guidelines:
• Some of the LLDP configuration tasks are available in different interface views (see Table 7).
Table 7 Support of LLDP configuration tasks in different views
Enabling LLDP
Setting the LLDP operating mode
Layer 2 Ethernet interface view
Configuring the advertisable TLVs Layer 3 Ethernet interface view
Configuring advertisement of the management Management Ethernet interface view
address TLV Layer 2 aggregate interface view
Setting the encapsulation format for LLDP frames Layer 3 aggregate interface view
IRF physical interface view
Enabling LLDP polling
Configuring LLDP trapping and LLDP-MED trapping
• To use LLDP together with OpenFlow, you must enable LLDP globally on OpenFlow switches.
To prevent LLDP from affecting topology discovery of OpenFlow controllers, disable LLDP on
ports of OpenFlow instances. For more information about OpenFlow, see OpenFlow
Configuration Guide.
• You can configure LLDP on an IRF physical interface to monitor the connection and link status
of the IRF physical link. An LLDP-enabled IRF physical interface supports only the nearest
bridge agent.
8
11. (Optional.) Configuring MAC address borrowing
(Optional.) Setting the source MAC address of LLDP frames
(Optional.) Enabling generation of ARP or ND entries for received management address
TLVs
Enabling LLDP
Restrictions and guidelines
For LLDP to take effect on specific ports, you must enable LLDP both globally and on these ports.
Procedure
1. Enter system view.
system-view
2. Enable LLDP globally.
lldp global enable
If the device is started with the software default settings, LLDP is disabled globally.
If the device is started with the factory default settings, LLDP is enabled globally.
3. Enter interface view.
interface interface-type interface-number
4. Enable LLDP.
lldp enable
By default, LLDP is enabled on a port.
9
In Ethernet interface view, if you do not specify an agent type, the command sets the
operating mode for the nearest bridge agent.
In Layer 2/Layer 3 aggregate interface view:
lldp agent { nearest-customer | nearest-nontpmr } admin-status
{ disable | rx | tx | txrx }
In aggregate interface view, you can set the operating mode only for the nearest customer
bridge agent and nearest non-TPMR bridge agent.
In IRF physical interface view:
lldp admin-status { disable | rx | tx | txrx }
In IRF physical interface view, you can set the operating mode only for the nearest bridge
agent.
By default:
The nearest bridge agent operates in TxRx mode.
The nearest customer bridge agent and nearest non-TPMR bridge agent operate in Disable
mode.
10
country-code { ca-type ca-value }&<1-10> | elin-address
tel-number } } }
By default, the nearest bridge agent advertises all supported TLVs except the following
TLVs:
− DCBX TLVs.
− Location identification TLVs.
− Port and protocol VLAN ID TLVs.
− VLAN name TLVs.
− Management VLAN ID TLVs.
lldp agent nearest-nontpmr tlv-enable { basic-tlv { all |
port-description | system-capability | system-description |
system-name | management-address-tlv [ ipv6 ] [ ip-address ] } |
dot1-tlv { all | port-vlan-id | link-aggregation } | dot3-tlv { all |
link-aggregation } }
lldp tlv-enable dot1-tlv { protocol-vlan-id [ vlan-id ] | vlan-name
[ vlan-id ] | management-vid [ mvlan-id ] }
By default, the nearest non-TPMR bridge agent does not advertise any TLVs.
lldp agent nearest-customer tlv-enable { basic-tlv { all |
port-description | system-capability | system-description |
system-name | management-address-tlv [ ipv6 ] [ ip-address ] } |
dot1-tlv { all | port-vlan-id | link-aggregation } | dot3-tlv { all
| link-aggregation } }
lldp tlv-enable dot1-tlv { protocol-vlan-id [ vlan-id ] | vlan-name
[ vlan-id ] | management-vid [ mvlan-id ] }
By default, the nearest customer bridge agent advertises all the supported basic
management TLVs and IEEE 802.1 organizationally specific TLVs.
In Layer 3 Ethernet interface view:
lldp tlv-enable { basic-tlv { all | port-description |
system-capability | system-description | system-name |
management-address-tlv [ ipv6 ] [ ip-address | interface loopback
interface-number ] } | dot1-tlv { all | link-aggregation } | dot3-tlv
{ all | link-aggregation | mac-physic | max-frame-size | power } |
med-tlv { all | capability | inventory | power-over-ethernet |
location-id { civic-address device-type country-code { ca-type
ca-value }&<1-10> | elin-address tel-number } } }
By default, the nearest bridge agent advertises the following TLVs:
− All supported basic management TLVs.
− Link aggregation TLVs in the 802.1 organizationally specific TLV set.
− All supported 802.3 organizationally specific TLVs.
− All supported LLDP-MED TLVs except the network policy TLVs.
lldp agent { nearest-nontpmr | nearest-customer } tlv-enable
{ basic-tlv { all | port-description | system-capability |
system-description | system-name | management-address-tlv [ ipv6 ]
[ ip-address ] } | dot1-tlv { all | link-aggregation } | dot3-tlv { all |
link-aggregation } }
By default:
− The nearest non-TPMR bridge agent does not advertise any TLVs.
− The nearest customer bridge agent advertises all supported basic management TLVs
and link aggregation TLVs in the IEEE 802.1 organizationally specific TLV set.
11
In management Ethernet interface view:
lldp tlv-enable { basic-tlv { all | port-description |
system-capability | system-description | system-name |
management-address-tlv [ ipv6 ] [ ip-address ] } | dot1-tlv { all |
link-aggregation } | dot3-tlv { all | link-aggregation | mac-physic |
max-frame-size | power } | med-tlv { all | capability | inventory |
power-over-ethernet | location-id { civic-address device-type
country-code { ca-type ca-value }&<1-10> | elin-address
tel-number } } }
By default, the nearest bridge agent advertises the following TLVs:
− All supported basic management TLVs.
− Link aggregation TLVs in the 802.1 organizationally specific TLV set.
− All supported 802.3 organizationally specific TLVs.
− All supported LLDP-MED TLVs except the network policy TLVs.
lldp agent { nearest-nontpmr | nearest-customer } tlv-enable
{ basic-tlv { all | port-description | system-capability |
system-description | system-name | management-address-tlv [ ipv6 ]
[ ip-address ] } | dot1-tlv { all | link-aggregation } | dot3-tlv { all |
link-aggregation } }
By default:
− The nearest non-TPMR bridge agent does not advertise anyTLVs.
− The nearest customer bridge agent advertises all supported basic management TLVs
and link aggregation TLVs in the IEEE 802.1 organizationally specific TLV set.
In Layer 2 aggregate interface view:
lldp tlv-enable dot1-tlv { protocol-vlan-id [ vlan-id ] | vlan-name
[ vlan-id ] | management-vid [ mvlan-id ]
lldp agent nearest-nontpmr tlv-enable { basic-tlv { all |
management-address-tlv [ ipv6 ] [ ip-address ] | port-description |
system-capability | system-description | system-name } | dot1-tlv
{ all | port-vlan-id } }
By default, the nearest non-TPMR bridge agent does not advertise any TLVs.
lldp agent nearest-customer tlv-enable { basic-tlv { all |
management-address-tlv [ ipv6 ] [ ip-address ] | port-description |
system-capability | system-description | system-name } | dot1-tlv
{ all | port-vlan-id } }
By default, the nearest customer bridge agent advertises all supported basic management
TLVs and Port VLAN ID TLVs in the IEEE 802.1 organizationally specific TLV set.
The nearest bridge agent is not supported.
In Layer 3 aggregate interface view:
lldp agent { nearest-customer | nearest-nontpmr } tlv-enable
basic-tlv { all | management-address-tlv [ ipv6 ] [ ip-address ] |
port-description | system-capability | system-description |
system-name }
By default:
− The nearest non-TPMR bridge agent does not advertise any TLVs.
− The nearest customer bridge agent advertises all supported basic management TLVs.
The nearest bridge agent is not supported.
In IRF physical interface view:
12
lldp tlv-enable basic-tlv { port-description | system-capability
| system-description | system-name }
By default, the nearest bridge agent advertises all supported basic management TLVs.
Only the nearest bridge agent is supported.
13
lldp [ agent { nearest-customer | nearest-nontpmr } ] tlv-enable
basic-tlv management-address-tlv [ ipv6 ] [ ip-address ] | interface
loopback interface-number ]
In Layer 2/Layer 3 aggregate interface view:
lldp agent { nearest-customer | nearest-nontpmr } tlv-enable
basic-tlv management-address-tlv [ ipv6 ] [ ip-address ]
By default:
The nearest bridge agent and nearest customer bridge agent advertise the management
address TLVs.
The nearest non-TPMR bridge agent does not advertise the management address TLV.
5. Set the encoding format of the management address to string.
In Layer 2/Layer 3 Ethernet interface view or management Ethernet interface view:
lldp [ agent { nearest-customer | nearest-nontpmr } ]
management-address-format string
In Layer 2/Layer 3 aggregate interface view:
lldp agent { nearest-customer | nearest-nontpmr }
management-address-format string
The default management address encoding format is numeric.
The device supports only the numeric encoding format for IPv6 management addresses.
14
Setting LLDP frame transmission parameters
About this task
The Time to Live TLV carried in an LLDPDU determines how long the device information carried in
the LLDPDU can be saved on a recipient device.
By setting the TTL multiplier, you can configure the TTL of locally sent LLDPDUs. The TTL is
expressed by using the following formula:
TTL = Min (65535, (TTL multiplier × LLDP frame transmission interval + 1))
As the expression shows, the TTL can be up to 65535 seconds. TTLs greater than 65535 will be
rounded down to 65535 seconds.
Procedure
1. Enter system view.
system-view
2. Set the TTL multiplier.
lldp hold-multiplier value
The default setting is 4.
3. Set the LLDP frame transmission interval.
lldp timer tx-interval interval
The default setting is 30 seconds.
4. Set the token bucket size for sending LLDP frames.
lldp max-credit credit-value
The default setting is 5.
5. Set the number of LLDP frames sent each time fast LLDP frame transmission is triggered.
lldp fast-count count
The default setting is 4.
6. Set the fast LLDP frame transmission interval.
lldp timer fast-interval interval
The default setting is 1 second.
15
By default, no timeout is set for receiving LLDP frames, and the device does not report no LLDP
neighbor events.
16
CDP compatibility enables your device to receive and recognize CDP packets from the neighboring
CDP device and send CDP packets to the neighboring device. The CDP packets sent to the
neighboring CDP device carry the following information:
• Device ID.
• ID of the port connecting to the neighboring device.
• Port IP address.
• TTL.
The port IP address is the primary IP address of a VLAN interface in up state. The VLAN ID of the
VLAN interface must be the lowest among the VLANs permitted on the port. If no VLAN interfaces of
the permitted VLANs are assigned an IP address or all VLAN interfaces are down, no port IP address
will be advertised.
You can view the neighboring CDP device information that can be recognized by the device in the
output of the display lldp neighbor-information command. For more information about
the display lldp neighbor-information command, see LLDP commands in Layer 2—LAN
Switching Command Reference.
To make your device work with Cisco IP phones, you must enable CDP compatibility.
If your LLDP-enabled device cannot recognize CDP packets, it does not respond to the requests of
Cisco IP phones for the voice VLAN ID configured on the device. As a result, a requesting Cisco IP
phone sends voice traffic without any tag to your device. Your device cannot differentiate the voice
traffic from other types of traffic.
CDP compatibility enables your device to receive and recognize CDP packets from a Cisco IP phone
and respond with CDP packets carrying TLVs with the configured voice VLAN. If no voice VLAN is
configured for CDP packets, CDP packets carry the voice VLAN of the port or the voice VLAN
assigned by the RADIUS server. The assigned voice VLAN has a higher priority. According to TLVs
with the voice VLAN configuration, the IP phone automatically configures the voice VLAN. As a result,
the voice traffic is confined in the configured voice VLAN and is differentiated from other types of
traffic.
For more information about voice VLANs, see "Configuring voice VLANs."
When the device is connected to a Cisco IP phone that has a host attached to its data port, the host
must access the network through the Cisco IP phone. If the data port goes down, the IP phone will
send a CDP packet to the device so the device can log out the user.
CDP-compatible LLDP operates in one of the following modes:
• TxRx—CDP packets can be transmitted and received.
• Rx—CDP packets can be received but cannot be transmitted.
• Disable—CDP packets cannot be transmitted or received.
Restrictions and guidelines
When you configure CDP compatibility for LLDP, follow these restrictions and guidelines:
• To make CDP-compatible LLDP take effect on a port, follow these steps:
a. Enable CDP-compatible LLDP globally.
b. Configure CDP-compatible LLDP to operate in TxRx mode on the port.
• The maximum TTL value that CDP allows is 255 seconds. To make CDP-compatible LLDP
work correctly with Cisco IP phones, configure the LLDP frame transmission interval to be no
more than 1/3 of the TTL value.
Prerequisites
Before you configure CDP compatibility, complete the following tasks:
• Globally enable LLDP.
• Enable LLDP on the port connecting to a CDP device.
17
• Configure LLDP to operate in TxRx mode on the port.
Procedure
1. Enter system view.
system-view
2. Enable CDP compatibility globally.
lldp compliance cdp
By default, CDP compatibility is disabled globally.
3. Enter Layer 2/Layer 3 Ethernet interface view or management Ethernet interface view.
interface interface-type interface-number
4. Configure CDP-compatible LLDP to operate in TxRx mode.
lldp compliance admin-status cdp txrx
By default, CDP-compatible LLDP operates in disable mode.
5. Set the voice VLAN ID carried in CDP packets.
cdp voice-vlan vlan-id
By default, no voice VLAN ID is configured to be carried in CDP packets.
18
5. Return to system view.
quit
6. (Optional.) Set the LLDP trap transmission interval.
lldp timer notification-interval interval
The default setting is 30 seconds.
19
Procedure
1. Enter system view.
system-view
2. Enter Layer 2 or Layer 3 Ethernet interface view.
interface interface-type interface-number
3. Enable LLDP neighbor aging on the interface.
lldp neighbor-protection aging { block | shutdown }
By default, neighbor aging is disabled on an interface.
20
You can enable generation of both ARP and ND entries on an interface. If the management address
TLV contains an IPv4 address, the device generates an ARP entry. If the management address TLV
contains an IPv6 address, the device generates an ND entry.
In Layer 2 Ethernet interface view, this feature sets the Layer 2 Ethernet interface to the output
interface in the generated entries. The VLAN to which the entries belong is the VLAN specified by
this feature. The device cannot generate ARP or ND entries in one of the following situations:
• The specified VLAN or the corresponding VLAN interface does not exist.
• The VLAN interface to which the VLAN ID belongs is physically down.
In Layer 3 Ethernet interface view, the Layer 3 Ethernet interface is always recorded as the output
interface.
Restrictions and guidelines
In Layer 2 Ethernet interface view, you must configure the interface to use the MAC address of a
VLAN interface instead of its own MAC address as the source MAC address of LLDP frames. This
ensures that the neighbor NE can generate correct ARP or ND entries.
Procedure
1. Enter system view.
system-view
2. Enter Layer 2 or Layer 3 Ethernet interface view.
interface interface-type interface-number
3. Enable generation of ARP or ND entries for management address TLVs received on the
interface.
In Layer 2 Ethernet interface view:
lldp management-address { arp-learning | nd-learning } vlan vlan-id
In Layer 3 Ethernet interface view:
lldp management-address { arp-learning | nd-learning } [ vlan
vlan-id ]
By default, generation of ARP or ND entries for received management address TLVs is
disabled on an interface.
In Layer 2 Ethernet interface view, the vlan vlan-id option specifies the ID of the VLAN to
which the generated ARP or ND entry belongs. To prevent the ARP or ND entries from
overwriting each other, do not specify the same VLAN ID for different Layer 2 Ethernet
interfaces.
You can enable generation of both ARP and ND entries on an interface.
Task Command
21
Task Command
MED
WGE1/0/1
NMS
WGE1/0/2 WGE1/0/1
Switch A Switch B
Procedure
1. Configure Switch A:
# Enable LLDP globally.
<SwitchA> system-view
[SwitchA] lldp global enable
# Enable LLDP on Twenty-FiveGigE 1/0/1. By default, LLDP is enabled on ports.
[SwitchA] interface twenty-fivegige 1/0/1
[SwitchA-Twenty-FiveGigE1/0/1] lldp enable
# Set the LLDP operating mode to Rx on Twenty-FiveGigE 1/0/1.
[SwitchA-Twenty-FiveGigE1/0/1] lldp admin-status rx
[SwitchA-Twenty-FiveGigE1/0/1] quit
22
# Enable LLDP on Twenty-FiveGigE 1/0/2. By default, LLDP is enabled on ports.
[SwitchA] interface gigabitethernet1/2
[SwitchA-Twenty-FiveGigE1/0/2] lldp enable
# Set the LLDP operating mode to Rx on Twenty-FiveGigE 1/0/2.
[SwitchA-Twenty-FiveGigE1/0/2] lldp admin-status rx
[SwitchA-Twenty-FiveGigE1/0/2] quit
2. Configure Switch B:
# Enable LLDP globally.
<SwitchB> system-view
[SwitchB] lldp global enable
# Enable LLDP on Twenty-FiveGigE 1/0/1. By default, LLDP is enabled on ports.
[SwitchB] interface twenty-fivegige 1/0/1
[SwitchB-Twenty-FiveGigE1/0/1] lldp enable
# Set the LLDP operating mode to Tx on Twenty-FiveGigE 1/0/1.
[SwitchB-Twenty-FiveGigE1/0/1] lldp admin-status tx
[SwitchB-Twenty-FiveGigE1/0/1] quit
23
Number of received unknown TLV : 0
24
Number of sent optional TLV : 16
Number of received unknown TLV : 0
25
Polling interval : 0s
Number of LLDP neighbors : 0
Number of MED neighbors : 0
Number of CDP neighbors : 0
Number of sent optional TLV : 0
Number of received unknown TLV : 0
26
Procedure
1. Configure a voice VLAN on Switch A:
# Create VLAN 2.
<SwitchA> system-view
[SwitchA] vlan 2
[SwitchA-vlan2] quit
# Set the link type of Twenty-FiveGigE 1/0/1 and Twenty-FiveGigE 1/0/2 to trunk, and enable
voice VLAN on them.
[SwitchA] interface twenty-fivegige 1/0/1
[SwitchA-Twenty-FiveGigE1/0/1] port link-type trunk
[SwitchA-Twenty-FiveGigE1/0/1] voice-vlan 2 enable
[SwitchA-Twenty-FiveGigE1/0/1] quit
[SwitchA] interface twenty-fivegige 1/0/2
[SwitchA-Twenty-FiveGigE1/0/2] port link-type trunk
[SwitchA-Twenty-FiveGigE1/0/2] voice-vlan 2 enable
[SwitchA-Twenty-FiveGigE1/0/2] quit
2. Configure CDP-compatible LLDP on Switch A:
# Enable LLDP globally, and enable CDP compatibility globally.
[SwitchA] lldp global enable
[SwitchA] lldp compliance cdp
# Enable LLDP on Twenty-FiveGigE 1/0/1. By default, LLDP is enabled on ports.
[SwitchA] interface twenty-fivegige 1/0/1
[SwitchA-Twenty-FiveGigE1/0/1] lldp enable
# Configure LLDP to operate in TxRx mode on Twenty-FiveGigE 1/0/1.
[SwitchA-Twenty-FiveGigE1/0/1] lldp admin-status txrx
# Configure CDP-compatible LLDP to operate in TxRx mode on Twenty-FiveGigE 1/0/1.
[SwitchA-Twenty-FiveGigE1/0/1] lldp compliance admin-status cdp txrx
[SwitchA-Twenty-FiveGigE1/0/1] quit
# Enable LLDP on Twenty-FiveGigE 1/0/2. By default, LLDP is enabled on ports.
[SwitchA] interface twenty-fivegige 1/0/2
[SwitchA-Twenty-FiveGigE1/0/2] lldp enable
# Configure LLDP to operate in TxRx mode on Twenty-FiveGigE 1/0/2.
[SwitchA-Twenty-FiveGigE1/0/2] lldp admin-status txrx
# Configure CDP-compatible LLDP to operate in TxRx mode on Twenty-FiveGigE 1/0/2.
[SwitchA-Twenty-FiveGigE1/0/2] lldp compliance admin-status cdp txrx
[SwitchA-Twenty-FiveGigE1/0/2] quit
27
Port ID : Port 1
28
Configuring DCBX
About DCBX
Data Center Ethernet (DCE), also known as Converged Enhanced Ethernet (CEE), is enhancement
and expansion of traditional Ethernet local area networks for use in data centers. DCE uses the Data
Center Bridging Exchange Protocol (DCBX) to negotiate and remotely configure the bridge capability
of network elements.
DCBX versions
DCBX has the following self-adaptable versions:
• DCB Capability Exchange Protocol Specification Rev 1.00.
• DCB Capability Exchange Protocol Base Specification Rev 1.01.
• IEEE Std 802.1Qaz-2011 (Media Access Control (MAC) Bridges and Virtual Bridged Local Area
Networks-Amendment 18: Enhanced Transmission Selection for Bandwidth Sharing Between
Traffic Classes).
DCBX functions
DCBX offers the following functions:
• Discovers the peer devices' capabilities and determines whether devices at both ends support
these capabilities.
• Detects configuration errors on peer devices.
• Remotely configures the peer device if the peer device accepts the configuration.
NOTE:
H3C devices support only the remote configuration feature.
DCBX TLV
Access switch
Server with FCoE card
29
Application Protocol (APP).
Enhanced Transmission Selection (ETS).
Priority-based Flow Control (PFC).
• In IEEE Std 802.1Qaz-2011:
ETS Configuration.
ETS Recommendation.
PFC.
APP.
H3C devices can send these types of DCBX information to a server or storage adapter supporting
FCoE. However, H3C devices cannot accept these types of DCBX information.
30
3. Enter Layer 2 Ethernet interface view.
interface interface-type interface-number
4. Enable LLDP on the interface.
lldp enable
By default, LLDP is enabled on an interface.
5. Enable the interface to advertise DCBX TLVs.
lldp tlv-enable dot1-tlv dcbx
By default, DCBX TLV advertisement is disabled on an interface.
31
• DCBX Rev 1.00 identifies application protocol packets only by frame type and advertises only
TLVs with frame type 0x8906 (FCoE).
• DCBX Rev 1.01 has the following attributes:
Supports identifying application protocol packets by both frame type and TCP/UDP port
number.
Does not restrict the frame type or TCP/UDP port number for advertising TLVs.
Can advertise up to 77 TLVs according to the remaining length of the current packet.
• In a QoS policy, you can configure multiple class-behavior associations. A packet might be
configured with multiple 802.1p priority marking or mapping actions, and the one configured first
takes effect.
Procedure
1. Enter system view.
system-view
2. Create an ACL and enter its view.
Create a Layer 2 ACL and configure a rule for the ACL.
acl mac { acl-number | name acl-name } [ match-order { auto | config } ]
rule [ rule-id ] permit type protocol-type ffff
Create an IPv4 advanced ACL and configure a rule for the ACL.
acl advanced { acl-number | name acl-name } [ match-order { auto |
config } ]
rule [ rule-id ] permit { tcp | udp } destination-port eq port
DCBX Rev 1.00 supports only Layer 2 ACLs. DCBX Rev 1.01 and IEEE Std 802.1Qaz-2011
support both Layer 2 ACLs and IPv4 advanced ACLs.
3. Return to system view.
quit
4. Configure a class:
a. Create a class, specify the operator of the class as OR, and enter class view.
traffic classifier classifier-name operator or
b. Use the previously configured ACL as the match criterion of the class.
if-match acl acl-number
c. Return to system view.
quit
5. Configure a traffic behavior:
a. Create a traffic behavior and enter its view.
traffic behavior behavior-name
b. Configure the behavior to mark packets with an 802.1p priority.
remark dot1p 8021p
c. Return to system view.
quit
6. Configure a QoS policy:
a. Create a QoS policy and enter its view.
qos policy policy-name
b. Associate the class with the traffic behavior in the QoS policy, and apply the association to
DCBX.
classifier classifier-name behavior behavior-name mode dcbx
32
c. Return to system view.
quit
7. Apply the QoS policy.
Choose one option as needed:
Apply the QoS policy to the outgoing traffic of all ports.
qos apply policy policy-name global outbound
Apply the QoS policy to the outgoing traffic of a Layer 2 Ethernet interface.
interface interface-type interface-number
qos apply policy policy-name outbound
The configuration in system view applies to all interfaces. The configuration in Layer 2 Ethernet
interface view applies only to the Layer 2 Ethernet interface.
33
By default, no match criterion is configured for the class to match packets.
4. Return to system view.
quit
5. Create a traffic behavior and enter traffic behavior view.
traffic behavior behavior-name
6. Configure the behavior to mark packets with the specified local precedence value.
remark local-precedence local-precedence
By default, no local precedence marking action is configured.
7. Return to system view.
quit
8. Create a QoS policy and enter its view.
qos policy policy-name
9. Associate the class with the traffic behavior in the QoS policy, and apply the association to
DCBX.
classifier classifier-name behavior behavior-name mode dcbx
By default, no class-behavior associations exist.
Configuring the 802.1p-to-local priority mapping in the priority mapping table method
1. Enter system view.
system-view
2. Enter 802.1p-to-local priority mapping table view for the outgoing traffic.
qos map-table dot1p-lp
3. Configure the priority mapping table to map the specified 802.1p priority values to a local
precedence value.
import import-value-list export export-value
For information about the default priority mapping tables, see ACL and QoS Configuration
Guide.
34
Configuring PFC parameters
About this task
To prevent packets with an 802.1p priority value from being dropped, enable PFC for the 802.1p
priority value. This feature reduces the sending rate of packets carrying this priority when network
congestion occurs.
The device uses PFC parameters to negotiate with the server adapter and to enable PFC for the
specified 802.1p priorities on the server adapter.
For more information about PFC commands, see Interface Command Reference.
Procedure
1. Enter system view.
system-view
2. Enter Layer 2 Ethernet interface view.
interface interface-type interface-number
3. Enable PFC in auto mode on the Ethernet interface.
priority-flow-control auto
By default, PFC is disabled.
To advertise the PFC data, you must enable PFC in auto mode.
4. Enable PFC for the specified 802.1p priorities.
priority-flow-control no-drop dot1p dot1p-list
By default, PFC is disabled for all 802.1p priorities.
NOTE:
In this example, both Switch A and the DC server support DCBX Rev 1.01.
WGE1/0/1
Switch A
DC server
Procedure
1. Enable LLDP and DCBX TLV advertising:
35
# Enable LLDP globally.
<SwitchA> system-view
[SwitchA] lldp global enable
# Enable LLDP and DCBX TLV advertising on Twenty-FiveGigE 1/0/1.
[SwitchA] interface twenty-fivegige 1/0/1
[SwitchA-Twenty-FiveGigE1/0/1] lldp enable
[SwitchA-Twenty-FiveGigE1/0/1] lldp tlv-enable dot1-tlv dcbx
2. Set the DCBX version to Rev. 1.01 on Twenty-FiveGigE 1/0/1.
[SwitchA-Twenty-FiveGigE1/0/1] dcbx version rev101
[SwitchA-Twenty-FiveGigE1/0/1] quit
3. Configure APP parameters:
# Create Layer 2 ACL 4000.
[SwitchA] acl mac 4000
# Configure ACL 4000 to permit FCoE frames (frame type is 0x8906) and FIP frames (frame
type is 0x8914) to pass through.
[SwitchA-acl-mac-4000] rule permit type 8906 ffff
[SwitchA-acl-mac-4000] rule permit type 8914 ffff
[SwitchA-acl-mac-4000] quit
# Create a class named app_c, set the operator of the class to OR, and use ACL 4000 as the
match criterion of the class.
[SwitchA] traffic classifier app_c operator or
[SwitchA-classifier-app_c] if-match acl mac 4000
[SwitchA-classifier-app_c] quit
# Create a traffic behavior named app_b, and configure the traffic behavior to mark packets
with 802.1p priority value 3.
[SwitchA] traffic behavior app_b
[SwitchA-behavior-app_b] remark dot1p 3
[SwitchA-behavior-app_b] quit
# Create a QoS policy named plcy, associate class app_c with traffic behavior app_b in the
QoS policy, and apply the association to DCBX.
[SwitchA] qos policy plcy
[SwitchA-qospolicy-plcy] classifier app_c behavior app_b mode dcbx
[SwitchA-qospolicy-plcy] quit
# Apply QoS policy plcy to the outgoing traffic of Twenty-FiveGigE 1/0/1.
[SwitchA] interface twenty-fivegige 1/0/1
[SwitchA-Twenty-FiveGigE1/0/1] qos apply policy plcy outbound
[SwitchA-Twenty-FiveGigE1/0/1] quit
4. Configure ETS parameters:
# Configure the 802.1p-to-local priority mapping table to map 802.1p priority value 3 to local
precedence 3. (This is the default mapping table. You can modify this configuration as needed.)
[SwitchA] qos map-table outbound dot1p-lp
[SwitchA-maptbl-out-dot1p-lp] import 3 export 3
[SwitchA-maptbl-out-dot1p-lp] quit
# Enable byte-count WRR queuing on Twenty-FiveGigE 1/0/1, and configure queue 3 on the
interface to use SP queuing.
[SwitchA] interface twenty-fivegige 1/0/1
[SwitchA-Twenty-FiveGigE1/0/1] qos wrr byte-count
[SwitchA-Twenty-FiveGigE1/0/1] qos wrr 3 group sp
36
5. Configure PFC:
# Enable PFC in auto mode on Twenty-FiveGigE 1/0/1.
[SwitchA-Twenty-FiveGigE1/0/1] priority-flow-control auto
# Enable PFC for 802.1 priority 3.
[SwitchA-Twenty-FiveGigE1/0/1] priority-flow-control no-drop dot1p 3
37
Number of Traffic Classes Supported: 8
38
Priority Group ID of Priority 7: 0
Priority Group ID of Priority 6: 0
The output shows that the DC server will use SP queuing (priority group ID 15) for 802.1p priority 3.
DCBX Parameter Type and Length
DCBX Parameter Length: 2
DCBX Parameter Type: 3
39
PFC Enabled on Priority 5: No
PFC Enabled on Priority 6: No
PFC Enabled on Priority 7: No
The output shows that the DC server will use PFC for 802.1p priority 3.
40
Contents
Configuring L2PT ··························································································· 1
About L2PT ························································································································································ 1
L2PT application scenario ·························································································································· 1
Supported protocols ··································································································································· 1
L2PT operating mechanism ······················································································································· 2
L2PT tasks at a glance······································································································································· 3
Enabling L2PT···················································································································································· 3
Restrictions and guidelines for L2PT ········································································································· 3
Enabling L2PT for a protocol in Layer 2 Ethernet interface view ······························································· 4
Enabling L2PT for a protocol in Layer 2 aggregate interface view····························································· 4
Setting the destination multicast MAC address for tunneled packets ································································ 4
Display and maintenance commands for L2PT ································································································· 5
L2PT configuration examples ···························································································································· 5
Example: Configuring L2PT for STP ·········································································································· 5
Example: Configuring L2PT for LACP········································································································ 6
i
Configuring L2PT
About L2PT
Layer 2 Protocol Tunneling (L2PT) can transparently send Layer 2 protocol packets from
geographically dispersed customer networks across a service provider network or drop them.
PE 1 PE 2
ISP network
CE 1 CE 2
Customer A Customer A
network 1 network 2
VLAN 100 VLAN 100
L2PT is introduced to resolve the problem. L2PT provides the following functions:
• Multicasts Layer 2 protocol packets from a customer network in a VLAN. Dispersed customer
networks can complete an independent Layer 2 protocol calculation, which is transparent to
the service provider network.
• Isolates Layer 2 protocol packets from different customer networks through different VLANs.
Supported protocols
H3C devices support L2PT for the following protocols:
• CDP.
• DLDP.
• EOAM.
• GVRP.
• LACP.
1
• LLDP.
• MVRP.
• PAgP.
• PVST.
• STP (including STP, RSTP, and MSTP).
• UDLD.
• VTP.
Customer Customer
Service provider network
network network
For example, as shown in Figure 3, PE 1 receives an STP packet (BPDU) from network 1 to
network 2. CEs are the edge devices on the customer network, and PEs are the edge devices on
the service provider network. L2PT processes the packet as follows:
1. PE 1 performs the following operations:
a. Encapsulates the packet with a specified destination multicast MAC address
(010f-e200-0003 by default).
b. Sends the tunneled packet out of all ISP-facing ports in the packet's VLAN.
2. Upon receiving the tunneled packet, PE 2 decapsulates the packet and sends the BPDU to CE
2.
Through L2PT, both the ISP network and Customer A's network can perform independent spanning
tree calculations.
2
Figure 3 L2PT network diagram
PE 1 ISP network PE 2
BPDU tunnel
CE 1 CE 2
Customer A Customer A
network 1 network 2
Enabling L2PT
Restrictions and guidelines for L2PT
• To enable L2PT for a Layer 2 protocol on a port, perform the following tasks:
Enable the protocol on the connected CE, and disable the protocol on the port.
When a PE establishes a connection to a network device within the service provider
network through CDP, you must enable CDP compatibility for LLDP on the PE. CDP
compatibility for LLDP can be enabled only globally, and cannot be disabled separately on
customer-facing interfaces. As a result, the CDP packets from the CE cannot be
transparently transmitted within the service provider network. In this case, as a best
practice, do not enable L2PT for CDP on the PE. For L2PT to take effect on CDP on the PE,
you must disable CDP compatibility for LLDP globally on the PE, which will cause the PE to
fail to communicate with the network devices within the service provider network through
CDP. Before you disable CDP compatibility for LLDP on the PE, make sure you know its
influence on the network. For more information about CDP compatibility of LLDP, see
"Configuring LLDP."
Disable the protocol (for example, STP) on the PE ports connecting to an aggregate
interface on a CE when the following conditions exist:
− The protocol is running on the aggregate interface on the CE.
− The aggregate interface on the CE connects to an L2PT-enabled port on the PE.
Enable L2PT on PE ports connected to a customer network. If you enable L2PT on ports
connected to the service provider network, L2PT determines that the ports are connected
to a customer network.
Make sure the VLAN tags of Layer 2 protocol packets are not changed or deleted for the
tunneled packets to be transmitted correctly across the service provider network.
• L2PT for LLDP supports LLDP packets from only nearest bridge agents.
• You can enable L2PT on a member port of a Layer 2 aggregation group, but the configuration
does not take effect.
3
• Do not enable L2PT on a port that is going to join a service loopback group.
4
Procedure
1. Enter system view.
system-view
2. Set the destination multicast MAC address for tunneled packets.
l2protocol tunnel-dmac mac-address
By default, 010f-e200-0003 is used for tunneled packets.
Task Command
display l2protocol statistics [ interface
Display L2PT statistics.
interface-type interface-number ]
reset l2protocol statistics [ interface
Clear L2PT statistics.
interface-type interface-number ]
PE 1 PE 2
ISP network
BPDU tunnel
WGE1/0/1 WGE1/0/1
VLAN 2 VLAN 2
CE 1 CE 2
Customer A Customer A
network 1 network 2
5
Procedure
1. Configure PE 1:
# Set the destination multicast address to 0100-0ccd-cdd0 for tunneled packets.
<PE1> system-view
[PE1] l2protocol tunnel-dmac 0100-0ccd-cdd0
# Create VLAN 2.
[PE1] vlan 2
[PE1-vlan2] quit
# Configure Twenty-FiveGigE 1/0/1 as an access port and assign the port to VLAN 2.
[PE1] interface twenty-fivegige 1/0/1
[PE1-Twenty-FiveGigE1/0/1] port access vlan 2
# Disable STP and enable L2PT for STP on Twenty-FiveGigE 1/0/1.
[PE1-Twenty-FiveGigE1/0/1] undo stp enable
[PE1-Twenty-FiveGigE1/0/1] l2protocol stp tunnel dot1q
[PE1-Twenty-FiveGigE1/0/1] quit
# Configure Twenty-FiveGigE 1/0/2 connected to the service provider network as a trunk port,
and assign the port to all VLANs.
[PE1] interface twenty-fivegige 1/0/2
[PE1-Twenty-FiveGigE1/0/2] port link-type trunk
[PE1-Twenty-FiveGigE1/0/2] port trunk permit vlan all
[PE1-Twenty-FiveGigE1/0/2] quit
2. Configure PE 2 in the same way PE 1 is configured. (Details not shown.)
Verifying the configuration
# Verify that the root bridge of Customer A's network is CE 1.
<CE2> display stp root
MST ID Root Bridge ID ExtPathCost IntPathCost Root Port
0 32768.00e0-fc02-5800 0 0
# Verify that the root bridge of the service provider network is not CE 1.
[PE1] display stp root
MST ID Root Bridge ID ExtPathCost IntPathCost Root Port
0 32768.0cda-41c5-ba50 0 0
6
Figure 5 Network diagram
PE 1 PE 2
ISP network
WGE1/0/1 BPDU tunnel
VLAN 2 WGE1/0/1
VLAN 2
WGE1/0/2 WGE1/0/2
WGE1/0/1 VLAN 3 VLAN 3
WGE1/0/1
CE 1 WGE1/0/2 WGE1/0/2 CE 2
Customer A Customer A
network 1 network 2
Requirements analysis
To meet the network requirements, perform the following tasks:
• For Ethernet link aggregation to operate correctly, configure VLANs on the PEs to ensure
point-to-point transmission between CE 1 and CE 2 in an aggregation group.
Set the PVIDs to VLAN 2 and VLAN 3 for Twenty-FiveGigE 1/0/1 and Twenty-FiveGigE
1/0/2 on PE 1, respectively.
Configure PE 2 in the same way PE 1 is configured.
Configure ports that connect to the CEs as trunk ports.
• To retain the VLAN tag of the customer network, enable QinQ on Twenty-FiveGigE 1/0/1 and
Twenty-FiveGigE 1/0/2 on both PE 1 and PE 2.
• For packets from any VLAN to be transmitted, configure all ports in the service provider
network as trunk ports.
Procedure
1. Configure CE 1:
# Configure Layer 2 aggregation group Bridge-Aggregation 1 to operate in dynamic
aggregation mode.
<CE1> system-view
[CE1] interface bridge-aggregation 1
[CE1-Bridge-Aggregation1] port link-type access
[CE1-Bridge-Aggregation1] link-aggregation mode dynamic
[CE1-Bridge-Aggregation1] quit
# Assign Twenty-FiveGigE 1/0/1 and Twenty-FiveGigE 1/0/2 to Bridge-Aggregation 1.
[CE1] interface twenty-fivegige 1/0/1
[CE1-Twenty-FiveGigE1/0/1] port link-aggregation group 1
[CE1-Twenty-FiveGigE1/0/1] quit
[CE1] interface twenty-fivegige 1/0/2
[CE1-Twenty-FiveGigE1/0/2] port link-aggregation group 1
[CE1-Twenty-FiveGigE1/0/2] quit
2. Configure CE 2 in the same way CE 1 is configured. (Details not shown.)
3. Configure PE 1:
# Create VLANs 2 and 3.
<PE1> system-view
[PE1] vlan 2
[PE1-vlan2] quit
7
[PE1] vlan 3
[PE1-vlan3] quit
# Configure Twenty-FiveGigE 1/0/1 as a trunk port, assign the port to VLAN 2, and set the
PVID to VLAN 2.
[PE1] interface twenty-fivegige 1/0/1
[PE1-Twenty-FiveGigE1/0/1] port link-mode bridge
[PE1-Twenty-FiveGigE1/0/1] port link-type trunk
[PE1-Twenty-FiveGigE1/0/1] port trunk permit vlan 2
[PE1-Twenty-FiveGigE1/0/1] port trunk pvid vlan 2
# Enable QinQ on Twenty-FiveGigE 1/0/1.
[PE1-Twenty-FiveGigE1/0/1] qinq enable
# Enable L2PT for LACP on Twenty-FiveGigE 1/0/1.
[PE1-Twenty-FiveGigE1/0/1] l2protocol lacp tunnel dot1q
[PE1-Twenty-FiveGigE1/0/1] quit
# Configure Twenty-FiveGigE 1/0/2 as a trunk port, assign the port to VLAN 3, and set the
PVID to VLAN 3.
[PE1] interface twenty-fivegige 1/0/2
[PE1-Twenty-FiveGigE1/0/2] port link-mode bridge
[PE1-Twenty-FiveGigE1/0/2] port link-type trunk
[PE1-Twenty-FiveGigE1/0/2] port trunk permit vlan 3
[PE1-Twenty-FiveGigE1/0/2] port trunk pvid vlan 3
# Enable QinQ on Twenty-FiveGigE 1/0/2.
[PE1-Twenty-FiveGigE1/0/2] qinq enable
# Enable L2PT for LACP on Twenty-FiveGigE 1/0/2.
[PE1-Twenty-FiveGigE1/0/2] l2protocol lacp tunnel dot1q
[PE1-Twenty-FiveGigE1/0/2] quit
4. Configure PE 2 in the same way PE 1 is configured. (Details not shown.)
Verifying the configuration
# Verify that CE 1 and CE 2 have completed Ethernet link aggregation successfully.
[CE1] display link-aggregation member-port
Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
Twenty-FiveGigE1/0/1:
Aggregate Interface: Bridge-Aggregation1
Local:
Port Number: 3
Port Priority: 32768
Oper-Key: 1
Flag: {ACDEF}
Remote:
System ID: 0x8000, 0004-0000-0000
Port Number: 3
Port Priority: 32768
Oper-Key: 1
Flag: {ACDEF}
8
Received LACP Packets: 23 packet(s)
Illegal: 0 packet(s)
Sent LACP Packets: 26 packet(s)
Twenty-FiveGigE1/0/2:
Aggregate Interface: Bridge-Aggregation1
Local:
Port Number: 4
Port Priority: 32768
Oper-Key: 1
Flag: {ACDEF}
Remote:
System ID: 0x8000, 0004-0000-0000
Port Number: 4
Port Priority: 32768
Oper-Key: 1
Flag: {ACDEF}
Received LACP Packets: 10 packet(s)
Illegal: 0 packet(s)
Sent LACP Packets: 13 packet(s)
[CE2] display link-aggregation member-port
Flags: A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
Twenty-FiveGigE1/0/1:
Aggregate Interface: Bridge-Aggregation1
Local:
Port Number: 3
Port Priority: 32768
Oper-Key: 1
Flag: {ACDEF}
Remote:
System ID: 0x8000, 0001-0000-0000
Port Number: 3
Port Priority: 32768
Oper-Key: 1
Flag: {ACDEF}
Received LACP Packets: 23 packet(s)
Illegal: 0 packet(s)
Sent LACP Packets: 26 packet(s)
Twenty-FiveGigE1/0/2:
Aggregate Interface: Bridge-Aggregation1
Local:
Port Number: 4
Port Priority: 32768
Oper-Key: 1
9
Flag: {ACDEF}
Remote:
System ID: 0x8000, 0001-0000-0000
Port Number: 4
Port Priority: 32768
Oper-Key: 1
Flag: {ACDEF}
Received LACP Packets: 10 packet(s)
Illegal: 0 packet(s)
Sent LACP Packets: 13 packet(s)
10
Contents
Configuring service loopback groups ····························································· 1
About service loopback groups ·························································································································· 1
Restrictions and guidelines: Service loopback group configuration ··································································· 1
Configuring a service loopback group ················································································································ 1
Display and maintenance commands for service loopback groups ··································································· 2
Service loopback group configuration examples ······························································································· 2
Example: Configuring a service loopback group ························································································ 2
i
Configuring service loopback groups
About service loopback groups
A service loopback group contains one or multiple Ethernet ports for looping packets sent out by the
device back to the device. This feature must work with other features, such as GRE. Member ports in
a service loopback group are load balanced.
A service loopback group provides one of the following services:
• Tunnel—Supports unicast tunnel services.
• Multicast tunnel—Supports multicast tunnel services.
• Multiport—Supports multiport ARP services.
• Telemetry stream—Supports Telemetry streaming services.
1
You can assign a maximum of 32 ports to a service loopback group.
Task Command
# Create service loopback group 1, and specify its service type as tunnel.
<Sysname> system-view
[Sysname] service-loopback group 1 type tunnel
2
# Create the interface Tunnel 1 and set it to GRE mode. The interface will automatically use service
loopback group 1.
[Sysname] interface tunnel 1 mode gre
[Sysname-Tunnel1]
3
Contents
Configuring cut-through Layer 2 forwarding ··················································· 1
About cut-through Layer 2 forwarding ················································································································ 1
Restrictions and guidelines for cut-through Layer 2 forwarding configuration ··················································· 1
Procedure··························································································································································· 1
i
Configuring cut-through Layer 2
forwarding
About cut-through Layer 2 forwarding
A cut-through forwarding-enabled device forwards a frame after it receives the first 64 bytes of the
frame. This feature reduces the transmission time of a frame and enhances forwarding performance.
Procedure
1. Enter system view.
system-view
2. Enable cut-through forwarding.
cut-through enable
By default, cut-through forwarding is disabled.