3com Switch 4510G Family: Configuration Guide
3com Switch 4510G Family: Configuration Guide
3com Switch 4510G Family: Configuration Guide
Configuration Guide
Product Version:
Release 2202
Manual Version:
6W100-20100112
www.3com.com
3Com Corporation
350 Campus Drive, Marlborough,
MA, USA 01752 3064
3Com Corporation reserves the right to revise this documentation and to make changes in content from time to
time without obligation on the part of 3Com Corporation to provide notification of such revision or change.
3Com Corporation provides this documentation without warranty, term, or condition of any kind, either implied
or expressed, including, but not limited to, the implied warranties, terms or conditions of merchantability,
satisfactory quality, and fitness for a particular purpose. 3Com may make improvements or changes in the
product(s) and/or the program(s) described in this documentation at any time.
If there is any software on removable media described in this documentation, it is furnished under a license
agreement included with the product as a separate document, in the hard copy documentation, or on the
removable media in a directory file named LICENSE.TXT or !LICENSE.TXT. If you are unable to locate a copy,
please contact 3Com and a copy will be provided to you.
ENVIRONMENTAL STATEMENT
It is the policy of 3Com Corporation to be environmentally-friendly in all operations. To uphold our policy, we
are committed to:
Establishing environmental performance standards that comply with national legislation and regulations.
Conserving energy, materials and natural resources in all operations.
Reducing the waste generated by all operations. Ensuring that all waste conforms to recognized environmental
standards. Maximizing the recyclable and reusable content of all products.
Ensuring that all products can be recycled, reused and disposed of safely.
Ensuring that all products are labelled according to recognized environmental standards.
Organization
3Com Switch 4510G Family Configuration Guide is organized as follows:
Volume Features
00-Product
Product Overview Acronyms
Overview
Ethernet Port Link Aggregation Port Isolation MSTP
Isolate-User-VL
01-Access LLDP VLAN Voice VLAN
AN
Volume
BPDU
GVRP QinQ Port Mirroring
Tunneling
ARP Attack
IP Addressing ARP Proxy ARP
Defense
DHCP Relay
02-IP Services DHCP Overview DHCP Client DHCP Snooping
Agent
Volume
IP Performance
BOOTP Client DNS UDP Helper
Optimization
Automatic
Configuration
Conventions
The manual uses the following conventions:
Command conventions
Convention Description
Boldface The keywords of a command line are in Boldface.
Convention Description
<> Button names are inside angle brackets. For example, click <OK>.
Window names, menu items, data table and field names are inside
[]
square brackets. For example, pop up the [New User] window.
Multi-level menus are separated by forward slashes. For example,
/
[File/Create/Folder].
Symbols
Convention Description
Means reader be extremely careful. Improper operation may cause
bodily injury.
Means reader be careful. Improper operation may cause data loss or
damage to equipment.
Related Documentation
In addition to this manual, each 3com Switch 4510G documentation set includes the following:
Manual Description
3Com Switch 4510G Family Command Provide detailed descriptions of command line interface
Reference Guide (CLI) commands, that you require to manage your switch.
3Com Switch 4510G Family Getting This guide provides all the information you need to install
Started Guide and use the 3Com Switch 4510G Family.
Obtaining Documentation
You can access the most up-to-date 3Com product documentation on the World Wide Web at this URL:
http://www.3com.com.
Introduction to Product
The 3Com Switches 4510G are Gigabit Ethernet switching products and have abundant service
features. They are designed as distribution and access devices for intranets and metropolitan area
networks (MANs). They can also be used for connecting server groups in data centers.
The 3Com Switches 4510G support the innovative Intelligent Resilient Framework (IRF) technology.
With IRF, multiple 4510G switches can be interconnected as a logical entity to form a new intelligent
network featuring high availability, scalability, and manageability.
Feature Lists
The Switch 4510G supports abundant features and the related documents are divided into the volumes
as listed in Table 1-1.
Volume Features
00-Product
Product Overview Acronyms
Overview
Ethernet Port Link Aggregation Port Isolation MSTP
Isolate-User-VL
01-Access LLDP VLAN Voice VLAN
AN
Volume
BPDU
GVRP QinQ Port Mirroring
Tunneling
ARP Attack
IP Addressing ARP Proxy ARP
Defense
DHCP Relay
02-IP Services DHCP DHCP Client DHCP Snooping
Agent
Volume
IP Performance
BOOTP Client DNS UDP Helper
Optimization
1-1
1-2
The following sections provide an overview of the main features of each module supported by the
Switch 4510G.
Access Volume
Table 2-1 Features in Access volume
Features Description
This document describes:
z Combo Port Configuration
z Basic Ethernet Interface Configuration
z Configuring Flow Control on an Ethernet Interface
z Configuring the Suppression Time of Physical-Link-State Change on
an Ethernet Interface
z Configuring Loopback Testing on an Ethernet Interface
z Configuring a Port Group
Ethernet Port
z Configuring an Auto-negotiation Transmission Rate
z Configuring Storm Suppression
z Setting the Interval for Collecting Ethernet Interface Statistics
z Enabling Forwarding of Jumbo Frames
z Enabling Loopback Detection on an Ethernet Interface
z Configuring the MDI Mode for an Ethernet Interface
z Testing the Cable on an Ethernet Interface
z Configuring the Storm Constrain Function on an Ethernet Interface
Link aggregation aggregates multiple physical Ethernet ports into one
logical link. This document describes:
z Basic Concepts of Link Aggregation
Link aggregation z Configuring a Static Aggregation Group
z Configuring a Dynamic Aggregation Group
z Configuring an Aggregate Interface
z Configuring a Load Sharing Mode for Load-Sharing Link Aggregation
Groups
The port isolation feature allows you to isolate different ports within the
same VLAN. This document describes:
Port Isolation
z Introduction to Port Isolation
z Configuring the Isolation Group
MSTP is used to eliminate loops in a LAN. It is compatible with STP and
RSTP. This document describes:
MSTP
z Introduction to MSTP
z Configuring MSTP
2-1
2-2
Features Description
An IP address is a 32-bit address allocated to a network interface on a
device that is attached to the Internet. This document describes:
IP Address
z Introduction to IP addresses
z IP address configuration
Address Resolution Protocol (ARP) is used to resolve an IP address into a
data link layer address. This document describes:
z ARP Overview
ARP
z Configuring ARP
z Configuring Gratuitous ARP
z Proxy ARP and Local Proxy ARP configuration
If a host sends an ARP request for the MAC address of another host that
actually resides on another network , the device in between must be able
to respond to the request with the MAC address of the receiving interface
Proxy ARP to allow Layer 3 communication between the two hosts. This is achieved
by proxy ARP. This document describes:
z Proxy ARP Overview
z Configuring Proxy ARP
Currently, ARP attacks and viruses are threatening LAN security. The
device can provide multiple features to detect and prevent such attacks.
This document describes:
z Configuring ARP Source Suppression
z Configuring ARP Defense Against IP Packet Attacks
ARP Attack Defense
z Configuring ARP Active Acknowledgement
z Configuring Source MAC Address Based ARP Attack Detection
z Configuring ARP Packet Source MAC Address Consistency Check
z Configuring ARP Packet Rate Limit
z Configuring ARP Detection
DHCP is built on a client-server model, in which the client sends a
configuration request and then the server returns a reply to send
configuration parameters such as an IP address to the client. This
document describes:
DHCP Overview z Introduction to DHCP
z DHCP Address Allocation
z DHCP Message Format
z DHCP Options
z Protocols and Standards
Via a relay agent, DHCP clients communicate with a DHCP server on
another subnet to obtain configuration parameters. Thus, DHCP clients on
different subnets can contact the same DHCP server for ease of
DHCP Relay Agent centralized management and cost reduction. This document describes:
z Introduction to DHCP Relay Agent
z Configuring the DHCP Relay Agent
With the DHCP client enabled on an interface, the interface will use DHCP
to obtain configuration parameters such as an IP address from the DHCP
DHCP Client server. This document describes:
z Introduction to DHCP Client
z Enabling the DHCP Client on an Interface
2-3
2-4
Features Description
This document describes:
IP Routing Overview z Introduction to IP routing and routing table
z Routing protocol overview
A static route is manually configured by the administrator. The proper
configuration and usage of static routes can improve network
performance and ensure bandwidth for important network applications.
Static Routing This document describes:
z Static route configuration
z Detecting Reachability of the Static Routes Nexthop
Routing Information Protocol (RIP) is a simple Interior Gateway Protocol
(IGP), mainly used in small-sized networks. This document describes:
RIP z RIP basic functions configuration
z RIP advanced functions configuration
z RIP network optimization configuration
Static routes are special routes that are manually configured by network
administrators. Similar to IPv4 static routes, IPv6 static routes work well in
IPv6 Static Routing simple IPv6 network environments. This document describes:
z IPv6 static route configuration
RIP next generation (RIPng) is an extension of RIP-2 for IPv4. RIPng for
IPv6 is IPv6 RIPng. This document describes:
RIPng z Configuring RIPng Basic Functions
z Configuring RIPng Route Control
z Tuning and Optimizing the RIPng Network
Policy routing is to make forwarding decisions based on user-defined
policies. Different from the normal destination-based routing, policy
routing can make routing decisions based on the source address and
Policy Routing other criteria in addition to the destination IP address.
The Switch 4510G implements policy routing through QoS policies. For
details about traffic classification, traffic behavior and QoS policy
configuration commands, refer to QoS Commands in the QoS Volume.
Multicast Volume
Table 2-4 Features in Multicast volume
Features Description
This document describes the main concepts in multicast:
z Introduction to Multicast
Multicast Overview z Multicast Models
z Multicast Architecture
z Multicast Packets Forwarding Mechanism
2-5
QoS Volume
Table 2-5 Features in the QoS ACL volume
Features Description
For network traffic, the Quality of Service (QoS) involves bandwidth, delay,
and packet loss rate during traffic forwarding process. This document
describes:
QoS Overview
z Introduction to QoS
z Introduction to QoS Service Models
z QoS Techniques Overview
Two approaches are available for you to configure QoS: policy-based and
QoS Configuration non policy-based. This document describes:
Approaches z QoS Configuration Approach Overview
z Configuring a QoS Policy
The priorities of a packet determine its transmission priority. There are two
types of priority: priorities carried in packets and priorities locally assigned
for scheduling only.
Priority Mapping When a packet enters the device from a port, the device assigns a set of
QoS priority parameters to the packet based on a certain priority and
sometimes may modify its priority, according to certain rules depending on
device status. This process is called priority mapping.
This document describes:
Traffic Policing, Traffic z Traffic Policing, Traffic Shaping, and Line Rate Overview
Shaping, and Line z Configuring Traffic Policing
Rate z Configuring GTS
z Configuring the Line Rate
2-6
Appendix z Acronym
z Default Priority Mapping Tables
z Introduction to Packet Precedences
Security Volume
Table 2-6 Features in the Security volume
Features Description
Authentication, Authorization and Accounting (AAA) provide a uniform
framework used for configuring these three security functions to
implement the network security management. This document describes:
AAA z Introduction to AAA, RADIUS and HWTACACS
z AAA configuration
z RADIUS configuration
z HWTACACS configuration
IEEE 802.1X (hereinafter simplified as 802.1X) is a port-based network
access control protocol that is used as the standard for LAN user access
authentication. This document describes:
802.1X
z 802.1X overview
z 802.1X configuration
z 802.1X Guest-VLAN configuration
2-7
2-8
Features Description
Smart Link is a solution for active-standby link redundancy backup and
rapid transition in dual-uplink networking. This document describes:
Smart Link z Smart Link Overview
z Configuring a Smart Link Device
z Configuring an Associated Device
Monitor link is a port collaboration function used to enable a device to be
aware of the up/down state change of the ports on an indirectly connected
Monitor Link link. This document describes:
z Monitor Link Overview
z Configuring Monitor Link
2-9
2-10
Features Description
Switch supports two types of user interfaces. This document describes:
z Supported User Interfaces
Logging In to an
Ethernet Switch z Users and User Interfaces
z User Interface Number
z Common User Interface Configuration
To log in through the Console port is the most common way to log in to a
switch. It is also the prerequisite to configure other login methods. This
document describes:
Logging In Through the z Introduction
Console Port z Setting Up the Connection to the Console Port
z Console Port Login Configuration
z Configuring Command Authorization
z Configuring Command Accounting
You can telnet to a remote switch to manage and maintain the switch. To
achieve this, you need to configure both the switch and the Telnet
terminal properly. This document describes:
Logging In Through
z Introduction
Telnet/SSH
z Logging In Through SSH
z Configuring Command Authorization
z Configuring Command Accounting
This document describes:
User Interface z User Authentication Configuration Example
Configuration Examples z Command Authorization Configuration Example
z Command Accounting Configuration Example
An switch 4510G has a built-in Web server. You can log in to an switch
4510G through a Web browser and manage and maintain the switch
intuitively by interacting with the built-in Web server. This document
Logging in Through describes:
Web-based Network
z Introduction
Management System
z Web Server Configuration
z Displaying Web Users
z Configuration Example
You can also log in to a switch through an NMS (network management
station), and then configure and manage the switch through the agent
Logging In Through module on the switch. This document describes:
NMS
z Introduction
z Connection Establishment Using NMS
To improve security and make it easier to manage services, you can
specify source IP addresses/interfaces for Telnet clients. This document
describes:
Specifying Source for
Telnet Packets z Introduction
z Specifying Source IP address/Interface for Telnet Packets
z Displaying the source IP address/Interface Specified for Telnet
Packets
2-11
2-12
2-13
2-14
#ABCDEFGHIKLMNOPQRSTUVWXZ
Acronyms Full spelling
# Return
10GE Ten-GigabitEthernet
A Return
AAA Authentication, Authorization and Accounting
ABC Activity Based Costing
ABR Area Border Router
AC Alternating Current
ACK ACKnowledgement
ACL Access Control List
ADSL Asymmetric Digital Subscriber Line
AFI Address Family Identifier
AP Access Point
ARP Address Resolution Protocol
AS Autonomous System
ASBR Autonomous System Border Router
ASCII American Standard Code for Information Interchange
ASE Application service element
B Return
BC Bearer Control
A-1
C Return
CA Call Appearance
CA Certificate Authority
CAR Committed Access Rate
A-2
D Return
DAR Deeper Application Recognition
E Return
EACL Enhanced ACL
EAD Endpoint Admission Defense
EAP Extensible Authentication Protocol
EAPOL Extensible Authentication Protocol over LAN
EBGP External Border Gateway Protocol
FC Forwarding Class
FCS Frame Check Sequence
FDDI Fiber Distributed Data Interface
A-3
FG Forwarding Group
FIB Forwarding information base
FIFO First In First Out
FQDN Full Qualified Domain Name
FR Frame Relay
FRR Fast ReRoute
FRTT Fairness Round Trip Time
FT Functional Test
FTP File Transfer Protocol
G Return
GARP Generic Attribute Registration Protocol
GE Gigabit Ethernet
GR Graceful Restart
GRE Generic Routing Encapsulation
GTS Generic Traffic Shaping
GVRP GARP VLAN Registration Protocol
H Return
HA High Availability
HABP HW Authentication Bypass Protocol
HDLC High-level Data Link Control
HEC Header Error Control
HoPE Hiberarchy of PE
HoVPN Hiberarchy of VPN
HQoS Hierarchical Quality of Service
I Return
IA Incoming Access
A-4
ID IDentification/IDentity
IEEE Institute of Electrical and Electronics Engineers
IETF Internet Engineering Task Force
IGMP Internet Group Management Protocol
IGMP-Snooping Internet Group Management Protocol Snooping
IGP Interior Gateway Protocol
ILM Incoming Label Map
ILS Internet Locator Service
IN Intelligent Network
IP Internet Protocol
IPng IP Next Generation
IPSec IP Security
IPTN IP Phone Telephony Network
IPv6 Internet protocol version 6
IPX Internet Packet Exchange
IRF Intelligent Resilient Framework
IS Intermediate System
ISATAP Intra-Site Automatic Tunnel Addressing Protocol
ISDN Integrated Services Digital Network
Intermediate System-to-Intermediate System intra-domain
IS-IS
routing information exchange protocol
ISO International Organization for Standardization
ISP Internet service provider
L Return
L2TP Layer 2 Tunneling Protocol
L2VPN Layer 2 VPN
L3VPN Layer 3 VPN
A-5
M Return
MAC Media Access Control
MAN Metropolitan Area Network
MaxBC Max Bandwidth Constraints
A-6
MODEM MOdulator-DEModulator
MP Multilink PPP
MP-BGP Multiprotocol extensions for BGP-4
MPE Middle-level PE
MP-group Multilink Point to Point Protocol group
MPLS Multiprotocol Label Switching
MPLSFW Multi-protocol Label Switch Forward
MPM Multicast Port Management
MSC Mobile Switching Center
N Return
NAPT Network Address Port Translation
NAS Network Access Server
NAT Net Address Translation
NBMA Non Broadcast Multi-Access
NBT NetBIOS over TCP/IP
A-7
O Return
OAM Operation Administration and Maintenance
P Return
P2MP Point to MultiPoint
P2P Point To Point
PAP Password Authentication Protocol
PCB Printed Circuit Board
PCM Pulse Code Modulation
PD Powered Device
PDU Protocol Data Unit
PE Provider Edge
A-8
RM Route management
RMON Remote Monitoring
ROM Read Only Memory
RP Rendezvous Point
RPC Remote Procedure Call
RPF Reverse Path Forwarding
A-9
S Return
SA Source Active
SBM Subnetwork Bandwidth Management
SCFF Single Choke Fairness Frame
SD Signal Degrade
SDH Synchronous Digital Hierarchy
SETS Synchronous Equipment Timing Source
SF Sampling Frequency
SFM Source-Filtered Multicast
SFTP Secure FTP
Share-MDT Share-Multicast Distribution Tree
SIP Session Initiation Protocol
Site-of-Origin Site-of-Origin
SLA Service Level Agreement
SMB Standby Main Board
SMTP Simple Mail Transfer Protocol
SOO Site-of-Origin
SP Strict Priority Queueing
SPE Superstratum PE/Sevice Provider-end PE
A-10
T Return
TA Terminal Adapter
TACACS Terminal Access Controller Access Control System
TDM Time Division Multiplexing
TCP Transmission Control Protocol
TE Traffic Engineering
TEDB TE DataBase
TFTP Trivial File Transfer Protocol
TLS Transparent LAN Service
TLV Type-Length-Value
ToS Type of Service
TPID Tag Protocol Identifier
TRIP Trigger RIP
TS Traffic Shaping
A-11
V Return
VBR Variable Bit Rate
VCI Virtual Channel Identifier
VE Virtual Ethernet
VFS Virtual File System
VLAN Virtual Local Area Network
VLL Virtual Leased Lines
VOD Video On Demand
VoIP Voice over IP
VOS Virtual Operate System
VPDN Virtual Private Dial-up Network
VPDN Virtual Private Data Network
WTR Wait-to-Restore
WWW World Wide Web
X Return
XGE Ten-GigabitEthernet
Z Return
ZBR Zone Border Router
A-12
5 LLDP Configuration5-1
Overview 5-1
Background 5-1
Basic Concepts5-1
Operating Modes of LLDP5-5
How LLDP Works 5-6
Protocols and Standards 5-6
LLDP Configuration Task List 5-6
Performing Basic LLDP Configuration 5-7
ii
iii
iv
GE and 10GE ports on the Switch 4510G Family are numbered in the following format: interface type
A/B/C.
z A: Number of a member device in an IRF. If no IRF is formed, this value is 1.
z B: Slot number on the device. A value of 0 represents the slot where the fixed ports of the device
are located; a value of 1 represents the slot where the ports of interface expansion card 1 are
located; a value of 2 represents the slot where the ports of interface expansion card 2 are located.
z C: Number of a port on a slot.
For more information about interface expansion card, see 3Com Switch 4510G Family Getting Started
Guide.
A Combo port can operate as either an optical port or an electrical port. Inside the device there is only
one forwarding interface. For a Combo port, the electrical port and the corresponding optical port are
TX-SFP multiplexed. You can specify a Combo port to operate as an electrical port or an optical port.
That is, a Combo port cannot operate as both an electrical port and an optical port simultaneously.
When one is enabled, the other is automatically disabled.
interface interface-type
Enter Ethernet interface view
interface-number
Optional
Enable a specified Combo port undo shutdown By default, of the two ports in a
Combo port, the one with a
smaller port ID is enabled.
1-1
1-2
z 10GE ports can be displayed only when 10GE interface module expansion cards are available on
the device.
z 10GE ports do not support the duplex command or the speed command.
When flow control is enabled on both sides, if traffic congestion occurs at the ingress interface, it will
send a Pause frame notifying the egress interface to temporarily suspend the sending of packets. The
egress interface is expected to stop sending any new packet when it receives the Pause frame. In this
way, flow control helps to avoid dropping of packets. Note that this will be possible only after flow
control is enabled on both the ingress and egress interfaces.
Follow these steps to enable flow control on an Ethernet interface:
An Ethernet interface operates in one of the two physical link states: up or down. During the
suppression time, physical-link-state changes will not be propagated to the system. Only after the
suppression time has elapsed will the system be notified of the physical-link-state changes by the
physical layer. This functionality reduces the extra overhead occurred due to frequent
physical-link-state changes within a short period of time.
Follow these steps to configure the suppression time of physical-link-state changes on an Ethernet
interface:
interface interface-type
Enter Ethernet interface view
interface-number
1-3
You can enable loopback testing to check whether the Ethernet interface functions properly. Note that
no data packets can be forwarded during the testing. Loopback testing falls into the following two
categories:
z Internal loopback testing, which is performed within switching chips to test the functions related to
the Ethernet interfaces.
z External loopback testing, which is used to test the hardware functions of an Ethernet interface.
To perform external loopback testing on an Ethernet interface, you need to install a loopback plug
on the Ethernet interface. In this case, packets sent from the interface are received by the same
interface.
Follow these steps to enable Ethernet interface loopback testing:
z As for the internal loopback test and external loopback test, if an interface is down, only the former
is available on it; if the interface is shut down, both are unavailable.
z The speed, duplex, mdi, and shutdown commands are not applicable during loopback testing.
z With the loopback testing enabled, the Ethernet interface operates in full duplex mode. With the
loopback testing disabled, the original configurations will be restored.
The devices allow you to configure some functions on multiple interfaces at a time by assigning the
interfaces to a port group in addition to configuring them on a per-interface basis. This is helpful when
you have to configure a feature in the same way on multiple interfaces.
A port group is created manually and the settings you made on it apply to all group member interfaces.
Note that even though the settings are made on the port group, they are saved on an interface basis
rather than on a port group basis. Thus, you can only view the settings in the view of each interface
with the display current-configuration command or the display this command.
1-4
Usually, the transmission rate on an Ethernet port is determined through negotiation with the peer end,
which can be any rate within the capacity range. With auto-negotiation rate configured, you can enable
the Ethernet port to negotiate only part of the transmission rates within its capacity.
Figure 1-1 An application diagram of auto-negotiation transmission rate
As shown in Figure 1-1, the network card transmission rate of the server group (Server 1, Server 2,
and Server 3) is 1000 Mbps, and the transmission rate of GigabitEthernet 1/0/4, which provides access
to the external network for the server group, is 1000 Mbps too. If you do not specify an
auto-negotiation range, the transmission rate on GigabitEthernet 1/0/1, GigabitEthernet 1/0/2 and
GigabitEthernet 1/0/3 through negotiation with the servers is 1000 Mbps, which may cause congestion
on the egress port GigabitEthernet 1/0/4. To solve the problem, you can specify the auto-negotiation
transmission rate on GigabitEthernet 1/0/1, GigabitEthernet 1/0/2, and GigabitEthernet 1/0/3 to 100
Mbps.
Follow these steps to configure an auto-negotiation transmission rate:
1-5
You can use the following commands to suppress the broadcast, multicast, and unknown unicast traffic.
In interface configuration mode, the suppression ratio indicates the maximum broadcast, multicast or
unknown unicast traffic that is allowed to pass through an interface. When the broadcast, multicast, or
unknown unicast traffic over the interface exceeds the threshold, the system will discard the extra
packets so that the broadcast, multicast or unknown unicast traffic ratio can drop below the limit to
ensure that the network functions properly.
The storm suppression ratio settings configured for an Ethernet interface may get invalid if you enable
the storm constrain for the interface. For information about the storm constrain function, see
Configuring the Storm Constrain Function on an Ethernet Interface.
Follow these steps to set storm suppression ratios for one or multiple Ethernet interfaces:
Optional
Set the broadcast storm broadcast-suppression By default, all broadcast traffic is
suppression ratio { ratio | pps max-pps } allowed to pass through an interface,
that is, broadcast traffic is not
suppressed.
Optional
Set the multicast storm multicast-suppression By default, all multicast traffic is
suppression ratio { ratio | pps max-pps } allowed to pass through an interface,
that is, multicast traffic is not
suppressed.
1-6
If you set storm suppression ratios in Ethernet interface view or port group view repeatedly for an
Ethernet interface that belongs to a port group, only the latest settings take effect.
Follow these steps to configure the interval for collecting interface statistics:
Due to tremendous amount of traffic occurring on an Ethernet interface, it is likely that some frames
greater than the standard Ethernet frame size are received. Such frames (called jumbo frames) will be
dropped. With forwarding of jumbo frames enabled, the system does not drop all the jumbo frames.
Instead, it continues to process jumbo frames with a size greater than the standard Ethernet frame size
and yet within the specified parameter range.
In interface configuration mode (Ethernet interface view/port-group view), you can enable jumbo
frames that can pass through the Ethernet interface.
z If you execute the command in Ethernet interface view, the configurations take effect only on the
current interface.
z If you execute the command in port-group view, the configurations take effect on all ports in the
port group.
Follow these steps to enable the forwarding of jumbo frames:
1-7
If a port receives a packet that it sent out, a loop occurs. Loops may cause broadcast storms. The
purpose of loopback detection is to detect loops on an interface.
When loopback detection is enabled on an Ethernet interface, the device periodically checks whether
the ports have any external loopback. If it detects a loopback on a port, the device will set that port to
be under loopback detection mode.
z If loops are detected on an access port, the port will be blocked. Meanwhile, trap messages will be
sent to the terminal, and the corresponding MAC address forwarding entries will be removed.
z If loops are detected on a trunk port or a hybrid port, trap messages are sent to the terminal. If the
loopback detection control function is also enabled on the port, the port will be blocked, trap
messages will be sent to the terminal, and the corresponding MAC address forwarding entries will
be removed.
Follow these steps to configure loopback detection:
1-8
10-Gigabit Ethernet ports and optical interfaces of SFP ports do not support this function.
Two types of Ethernet cables can be used to connect Ethernet devices: crossover cable and
straight-through cable. To accommodate these two types of cables, an Ethernet interface on a device
can operate in one of the following three Medium Dependent Interface (MDI) modes:
z Across mode
z Normal mode
z Auto mode
An Ethernet interface is composed of eight pins. By default, each pin has its particular role. For
example, pin 1 and pin 2 are used for transmitting signals; pin 3 and pin 6 are used for receiving
signals. You can change the pin roles through setting the MDI mode. For an Ethernet interface in
normal mode, the pin roles are not changed. For an Ethernet interface in across mode, pin 1 and pin 2
are used for receiving signals; pin 3 and pin 6 are used for transmitting signals. To enable normal
communication, you should connect the local transmit pins to the remote receive pins. Therefore, you
should configure the MDI mode depending on the cable types.
z Normally, the auto mode is recommended. The other two modes are useful only when the device
cannot determine the cable type.
z When straight-through cables are used, the local MDI mode must be different from the remote
MDI mode.
z When crossover cables are used, the local MDI mode must be the same as the remote MDI mode,
or the MDI mode of at least one end must be set to auto.
Follow these steps to configure the MDI mode for an Ethernet interface:
interface interface-type
Enter Ethernet interface view
interface-number
1-9
z 10-Gigabit Ethernet ports and optical interfaces of SFP ports do not support this feature.
z A link in the up state goes down and then up automatically if you perform the operation described
in this section on one of the Ethernet interfaces forming the link.
Follow these steps to test the current operating state of the cable connected to an Ethernet interface:
The storm constrain function suppresses packet storms in an Ethernet. With this function enabled on
an interface, the system detects the multicast traffic, or broadcast traffic passing through the interface
periodically and takes corresponding actions (that is, blocking or shutting down the interface and
sending trap messages and logs) when the traffic detected exceeds the threshold.
Alternatively, you can configure the storm suppression function to control a specific type of traffic. As
the function and the storm constrain function are mutually exclusive, do not enable them at the same
time on an Ethernet interface. For example, with broadcast storm suppression ratio set on an Ethernet
interface, do not enable the storm constrain function for broadcast traffic on the interface. Refer to
Configuring Storm Suppression for information about the storm suppression function.
With the storm constrain function enabled on an Ethernet interface, you can specify the system to act
as follows when the traffic detected exceeds the threshold.
1-10
1-11
display storm-constrain
Display the information about [ broadcast | multicast ]
Available in any view
storm constrain [ interface interface-type
interface-number ]
1-12
When configuring link aggregation, go to these sections for information you are interested in:
z Overview
z Link Aggregation Configuration Task List
z Configuring an Aggregation Group
z Configuring an Aggregate Interface
z Configuring a Load Sharing Mode for Load-Sharing Link Aggregation Groups
z Displaying and Maintaining Link Aggregation
z Link Aggregation Configuration Examples
Overview
Link aggregation aggregates multiple physical Ethernet ports into one logical link, also called an
aggregation group.
It allows you to increase bandwidth by distributing traffic across the member ports in the aggregation
group. In addition, it provides reliable connectivity because these member ports can dynamically back
up each other.
Aggregate interface
Aggregation group
An aggregation group is a collection of Ethernet interfaces. When you create an aggregate interface,
an aggregation group numbered the same is created automatically depending on the type of the
aggregate interface:
z If the aggregate interface is a Layer 2 interface, a Layer 2 aggregation group is created. You can
assign only Layer 2 Ethernet interfaces to the group.
z If the aggregate interface is a Layer-3 interface, a Layer-3 aggregation group is created. You can
assign only Layer-3 Ethernet interfaces to the group.
A member port in an aggregation group can be in one of the following two states:
2-1
The IEEE 802.3ad Link Aggregation Control Protocol (LACP) enables the dynamic aggregation of
physical links and uses link aggregation control protocol data units (LACPDUs) for information
exchange between LACP-enabled devices. With the usage of expansion fields in LACPDUs, LACP
can deliver extended functions in addition to its basic functions.
1) Basic LACP functions
Basic LACP functions are achieved with the basic fields in LACPDUs, which cover information
including system LACP priority, system MAC address, port LACP priority, port number, and operational
key. With LACP enabled on a port, LACP sends the above information of the port to its peer via
LACPDUs. Upon receiving an LACPDU, the peer compares the received information with the
information received on other ports. This allows the two systems to reach an agreement on which link
aggregation member ports should be placed in the selected state.
2) Extended LACP functions
By using expansion fields in LACPDUs, you can expand the functions of LACP. For example, by
defining a new Type/Length/Value (TLV) data field among the expansion fields of the LACPDUs, you
can deliver the LACP multi-active detection (MAD) mechanism in an Intelligent Resilient Framework
(IRF).
z Switches of the Switch 4510G Family that support extended LACP functions can function as both
member devices and intermediate devices in LACP MAD implementation.
z For details about IRF, member devices, intermediate devices, and the LACP MAD mechanism,
see IRF in the System Volume.
Marker protocol
During a session, if member ports are added to or removed from a dynamic link aggregation group,,
service traffic will need to be redistributed among all the new member ports of the link aggregation
group. The Marker protocol can be employed to quickly redistribute service traffic within link
aggregation groups and ensure the orderly transmission of data frames. The process is as follows:
z The device stops transmitting service traffic and starts a timer during which no data frames will
be transmitted on the links.
z The local end uses the Marker protocol to send a Marker Protocol Data Unit (PDU).
2-2
Currently, the Switch 4510G Family support returning Marker Response PDUs only after dynamic link
aggregation member ports receive Marker PDUs.
Operational key
When aggregating ports, link aggregation control automatically assigns each port an operational key
based on the port attributes, including the configurations of the port rate, duplex mode and link state.
In a link aggregation group, all member ports in the selected state have the same operation key.
Class-two configurations
Class-two configurations are listed in Table 2-1. In an aggregation group, if the configurations of a
member port are different from the class-two configurations, that member port cannot be a selected
port.
Type Considerations
Port isolation Whether a port has joined an isolation group
QinQ enable state (enable/disable), outer VLAN tags to be added, inner-to-outer
QinQ VLAN priority mappings, inner-to-outer VLAN tag mappings, inner VLAN ID
substitution mappings
Permitted VLAN IDs, default VLAN, link type (trunk, hybrid, or access), IP
VLAN
subnet-based VLAN configuration, protocol-based VLAN configuration, tag mode
MAC address learning capability, MAC address learning limit, forwarding of frames
MAC address
with unknown destination MAC addresses after the upper limit of the MAC address
learning
table is reached
z Some configurations are called class-one configurations. Such configurations, for example, GVRP
and MSTP, can be configured on aggregate interfaces and member ports but are not considered
during operational key calculation.
z The change of a class-two configuration setting may affect the select state of link aggregation
member ports and thus the ongoing service. To prevent unconsidered change, a message
warning of the hazard will be displayed when you attempt to change a class-two setting, upon
which you can decide whether to continue your change operation.
2-3
Depending on the link aggregation procedure, link aggregation operates in one of the following two
modes:
z Static aggregation mode
z Dynamic aggregation mode
LACP is disabled on the member ports in a static aggregation group. In a static aggregation group, the
system sets a port to selected or unselected state by the following rules:
z Select a port as the reference port from the ports that are in up state and with the same class-two
configurations as the corresponding aggregate interface. These ports are selected in the order of
full duplex/high speed, full duplex/low speed, half duplex/high speed, and half duplex/low speed,
with full duplex/high speed being the most preferred. If two ports with the same duplex
mode/speed pair are present, the one with the lower port number wins out.
z Consider the ports in up state with the same port attributes and class-two configurations as the
reference port as candidate selected ports, and set all others in the unselected state.
z Static aggregation limits the number of selected ports in an aggregation group. When the number
of the candidate selected ports is under the limit, all the candidate selected ports become selected
ports. When the limit is exceeded, set the candidate selected ports with smaller port numbers in
the selected state and those with greater port numbers in the unselected state.
z If all the member ports are down, set their states to unselected.
z Set the ports that cannot aggregate with the reference port to the unselected state.
A port that joins the aggregation group after the limit on the number of selected ports has been
reached will not be placed in the selected state even if it should be in normal cases. This can prevent
the ongoing traffic on the current selected ports from being interrupted. You should avoid the situation
however, as this may cause the selected/unselected state of a port to change after a reboot.
2-4
The link aggregation groups created on the Switch 4510G Family always operate in load sharing mode,
even when they contain only one member port.
Task Remarks
2-5
z The following ports cannot be assigned to an aggregation group: Stack ports, RRPP-enabled
ports, MAC address authentication-enabled ports, port security-enabled ports, IP source
guard-enabled ports, and 802.1x-enabled ports.
z You are recommended not to assign reflector ports of port mirroring to an aggregation group. For
details about reflector ports, refer to Port Mirroring Configuration in the Access Volume.
Required
Create a Layer 2
aggregate interface and When you create a Layer 2
interface bridge-aggregation aggregate interface, a Layer 2
enter the Layer 2
interface-number static aggregation group
aggregate interface
view numbered the same is created
automatically.
Exit to system view quit
2-6
2-7
Optional
Configure the description of By default, the description of an
description text interface is interface-name
the aggregate interface
Interface, such as
Bridge-Aggregation1 Interface.
To enable an aggregate interface to generate linkUp/linkDown trap messages when the state of the
interface changes, you should enable linkUp/linkDown trap generation on the aggregate interface.
Follow these steps to enable linkUp/linkDown trap generation for an aggregate interface:
2-8
Shutting down or bringing up an aggregate interface affects the selected state of the ports in the
corresponding aggregation group. When an aggregate interface is shut down, all selected ports in its
aggregation group become unselected; when the aggregate interface is brought up, the selected state
of the ports in the corresponding aggregation group is re-calculated.
Follow these steps to shut down an aggregate interface:
After shutting down an aggregate interface, you are recommended not to use the shutdown command
and then the undo shutdown command on the member interfaces of the corresponding link
aggregation group. Otherwise, the member interfaces may be brought up.
Configuring the global load sharing mode for link aggregation groups
Follow these steps to configure the global load sharing mode for link aggregation groups:
2-9
Follow these steps to configure a load sharing mode specific to a link aggregation group:
Required
By default, the load
sharing mode of an
aggregation group is the
Configure the load link-aggregation load-sharing mode
global load sharing mode.
sharing mode for the { destination-ip | destination-mac |
aggregation group source-ip | source-mac } * After you configure this
command, the load
sharing modes in current
link aggregation group
change accordingly.
display link-aggregation
Display the global or
load-sharing mode [ interface
aggregation group-specific Available in any view
[ bridge-aggregation
load sharing mode
interface-number ] ]
display link-aggregation
Display link aggregation details member-port [ interface-type
Available in any view
of ports interface-number [ to interface-type
interface-number ] ]
Display the summary
display link-aggregation
information of all aggregation Available in any view
summary
groups
2-10
Network requirements
As shown in Figure 2-1, Device A and Device B are connected through their respective Ethernet ports
GigabitEthernet1/0/1 to GigabitEthernet1/0/3.
Aggregate the ports on each device to form a static link aggregation group, thus balancing outgoing
traffic across the member ports. In addition, perform load sharing based on source and destination
MAC addresses.
Figure 2-1 Network diagram for Layer 2 static aggregation
Configuration procedure
1) Configure Device A
# Configure the device to perform load sharing based on source and destination MAC addresses for
link aggregation groups.
<DeviceA> system-view
[DeviceA] link-aggregation load-sharing mode source-mac destination-mac
2-11
Network requirements
As shown in Figure 2-2, Device A and Device B are connected through their respective Ethernet ports
GigabitEthernet1/0/1 to GigabitEthernet1/0/3.
Aggregate the ports on each device to form a dynamic link aggregation group, thus balancing outgoing
traffic across the member ports. In addition, perform load sharing based on source and destination
MAC addresses.
Figure 2-2 Network diagram for Layer 2 dynamic aggregation
Configuration procedure
1) Configure Device A
# Configure the device to perform load sharing based on source and destination MAC addresses for
link aggregation groups.
<DeviceA> system-view
[DeviceA] link-aggregation load-sharing mode source-mac destination-mac
# Create a Layer 2 aggregate interface Bridge-Aggregation 1 and configure the interface to work in
dynamic aggregation mode.
[DeviceA] interface bridge-aggregation 1
[DeviceA-Bridge-Aggregation1] link-aggregation mode dynamic
[DeviceA-Bridge-Aggregation1] quit
2-12
Network requirements
As shown in Figure 2-3, Device A is connection to Device B by their Ethernet ports GigabitEthernet
1/0/1 through GigabitEthernet 1/0/4.
Configure the global load sharing mode and aggregation group-specific load sharing mode to enable
aggregation group 1 to use source MAC-based load sharing mode and aggregation group 2 to use
destination MAC-based load sharing mode.
Figure 2-3 Network diagram for Layer 2 aggregation load sharing mode configuration
GE1/0/1
GE1/0/4
GE1/0/2
GE1/0/3
GE1/0/1
GE1/0/2
GE1/0/3
GE1/0/4
Configuration procedure
1) Configure Device A
# Configure the global link aggregation load sharing mode as the source MAC-based load sharing
mode.
<DeviceA> system-view
[DeviceA] link-aggregation load-sharing mode source-mac
# Create a Layer 2 aggregate interface Bridge-Aggregation 2 and configure the load sharing mode of
aggregation group 2 as the destination MAC-based load sharing mode.
2-13
2-14
When configuring port isolation, go to these sections for information you are interested in:
z Introduction to Port Isolation
z Configuring the Isolation Group
z Displaying and Maintaining Isolation Groups
z Port Isolation Configuration Example
3-1
z Users Host A, Host B, and Host C are connected to GigabitEthernet 1/0/1, GigabitEthernet 1/0/2,
and GigabitEthernet 1/0/3 of Device.
z Device is connected to the Internet through GigabitEthernet 1/0/4.
z GigabitEthernet 1/0/1, GigabitEthernet 1/0/2, GigabitEthernet1/0/3 and GigabitEthernet1/0/4
belong to the same VLAN. It is desired that Host A, Host B, and Host C cannot communicate with
one another at Layer 2, but can access the Internet.
Figure 3-1 Networking diagram for port isolation configuration
Configuration procedure
# Add ports GigabitEthernet 1/0/1, GigabitEthernet 1/0/2 and GigabitEthernet 1/0/3 to the isolation
group.
<Device> system-view
[Device] interface GigabitEthernet 1/0/1
[Device-GigabitEthernet1/0/1] port-isolate enable
[Device-GigabitEthernet1/0/1] quit
[Device] interface GigabitEthernet 1/0/2
[Device-GigabitEthernet1/0/2] port-isolate enable
[Device-GigabitEthernet1/0/2] quit
[Device] interface GigabitEthernet 1/0/3
[Device-GigabitEthernet1/0/3] port-isolate enable
3-2
3-3
When configuring MSTP, go to these sections for information you are interested in:
z Overview
z Introduction to STP
z Introduction to RSTP
z Introduction to MSTP
z MSTP Configuration Task List
z Configuring MSTP
z Displaying and Maintaining MSTP
z MSTP Configuration Example
Overview
As a Layer 2 management protocol, the Spanning Tree Protocol (STP) eliminates Layer 2 loops by
selectively blocking redundant links in a network, and in the mean time, allows for link redundancy.
Like many other protocols, STP evolves as the network grows. The later versions of STP are the Rapid
Spanning Tree Protocol (RSTP) and the Multiple Spanning Tree Protocol (MSTP). This chapter
describes the characteristics of STP, RSTP, and MSTP and the relationship among them.
Introduction to STP
Why STP
STP was developed based on the 802.1d standard of IEEE to eliminate loops at the data link layer in a
local area network (LAN). Devices running this protocol detect loops in the network by exchanging
information with one another and 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 and prevents decreased performance of network devices caused by
duplicate packets received.
In the narrow sense, STP refers to IEEE 802.1d STP; in the broad sense, STP refers to the IEEE
802.1d STP and various enhanced spanning tree protocols derived from that protocol.
STP uses bridge protocol data units (BPDUs), also known as configuration messages, as its protocol
packets.
STP-enabled network devices exchange BPDUs to establish a spanning tree. BPDUs contain
sufficient information for the network devices to complete spanning tree calculation.
In STP, BPDUs come in two types:
z Configuration BPDUs, used for calculating a spanning tree and maintaining the spanning tree
topology.
4-1
Root bridge
A tree network must have a root; hence the concept of root bridge was introduced in STP.
There is one and only one root bridge in the entire network, and the root bridge can change along with
changes of the network topology. Therefore, the root bridge is not fixed.
Upon initialization of a network, each device generates and sends out BPDUs periodically with itself as
the root bridge; after network convergence, only the root bridge generates and sends out configuration
BPDUs at a certain interval, and the other devices just forward the BPDUs.
Root port
On a non-root bridge, the port nearest to the root bridge is called the root port. The root port is
responsible for communication with the root bridge. Each non-root bridge has one and only one root
port. The root bridge has no root port.
As shown in Figure 4-1, AP1 and AP2, BP1 and BP2, and CP1 and CP2 are ports on Device A, Device
B, and Device C respectively.
z If Device A forwards BPDUs to Device B through AP1, the designated bridge for Device B is
Device A, and the designated port of Device B is port AP1 on Device A.
z Two devices are connected to the LAN: Device B and Device C. If Device B forwards BPDUs to
the LAN, the designated bridge for the LAN is Device B, and the designated port for the LAN is the
port BP2 on Device B.
4-2
Path cost
Path cost is a reference value used for link selection in STP. By calculating path costs, STP selects
relatively robust links and blocks redundant links, and finally prunes the network into a loop-free tree.
The devices on a network exchange BPDUs to identify the network topology. Configuration BPDUs
contain sufficient information for the network devices to complete spanning tree calculation. Important
fields in a configuration BPDU include:
z Root bridge ID: consisting of the priority and MAC address of the root bridge.
z Root path cost: the cost of the path to the root bridge denoted by the root identifier from the
transmitting bridge.
z Designated bridge ID: consisting of the priority and MAC address of the designated bridge.
z Designated port ID: designated port priority plus port name.
z Message age: age of the configuration BPDU while it propagates in the network.
z Max age: maximum age of the configuration BPDU.
z Hello time: configuration BPDU transmission interval.
z Forward delay: the delay used by STP bridges to transit the state of the root and designated ports
to forwarding.
4-3
z Initial state
Upon initialization of a device, each port generates a BPDU with itself as the root bridge, in which the
root path cost is 0, designated bridge ID is the device ID, and the designated port is the local port.
z Selection of the optimum configuration BPDU
Each device sends out its configuration BPDU and receives configuration BPDUs from other devices.
Table 4-2 describes the process of selecting the optimum configuration BPDU.
Step Actions
Upon receiving a configuration BPDU on a port, the device performs the following:
z If the received configuration BPDU has a lower priority than that of the configuration
BPDU generated by the port, the device discards the received configuration BPDU
1 and does not process the configuration BPDU of this port.
z If the received configuration BPDU has a higher priority than that of the
configuration BPDU generated by the port, 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
2
optimum configuration BPDU.
4-4
Step Description
A non-root-bridge device regards the port on which it received the optimum
1
configuration BPDU as the root port.
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 rest ports.
z The root bridge ID is replaced with that of the configuration BPDU of the root port.
2 z The root path cost is replaced with that of the configuration BPDU of the root port
plus the path cost of the root port.
z The designated bridge ID is replaced with the ID of this device.
z 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 of which the port role is to be defined, and acts depending on the
comparison result:
z If the calculated configuration BPDU is superior, the device considers this port as
3 the designated port, and replaces the configuration BPDU on the port with the
calculated configuration BPDU, which will be sent out periodically.
z 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 not send
BPDUs or forward data.
When the network topology is stable, only the root port and designated ports forward traffic, while other
ports are all in the blocked state they receive BPDUs but do not forward BPDUs or user traffic.
A tree-shape topology forms upon successful election of the root bridge, the root port on each non-root
bridge and the designated ports.
The following is an example of how the STP algorithm works. As shown in Figure 4-2, assume that the
priority of Device A is 0, the priority of Device B is 1, the priority of Device C is 2, and the path costs of
these links are 5, 10 and 4 respectively.
4-5
Device A
With priority 0
AP1 AP2
5
10
BP1
BP2
4 CP1
CP2
Device B
With priority 1
Device C
With priority 2
BPDU of port
Device Comparison process
after comparison
z Port AP1 receives the configuration BPDU of Device B {1, 0,
1, BP1}. Device A finds that the configuration BPDU of the
local port {0, 0, 0, AP1} is superior to the received
configuration BPDU, and therefore discards the received
configuration BPDU.
z Port AP2 receives the configuration BPDU of Device C {2, 0,
2, CP1}. Device A finds that the BPDU of the local port {0, 0, AP1: {0, 0, 0, AP1}
Device A
0, AP2} is superior to the received configuration BPDU, and AP2: {0, 0, 0, AP2}
therefore discards the received configuration BPDU.
z Device A finds that both the root bridge and designated
bridge in the configuration BPDUs of all its ports are itself, so
it assumes itself to be the root bridge. In this case, it does not
make any change to the configuration BPDU of each port,
and starts sending out configuration BPDUs periodically.
4-6
4-7
After the comparison processes described in the table above, a spanning tree with Device A as the root
bridge is established as shown in Figure 4-3.
Figure 4-3 The final calculated spanning tree
Device A
With priority 0
AP1 AP2
BP1
BP2
4
CP2
Device B
With priority 1
Device C
With priority 2
The spanning tree calculation process in this example is only simplified process.
z Upon network initiation, every switch regards itself as the root bridge, generates configuration
BPDUs with itself as the root, and sends the configuration BPDUs at a regular hello interval.
z If it is the root port that received a configuration BPDU and the received configuration BPDU is
superior to the configuration BPDU of the port, the device increases the message age carried in
the configuration BPDU following a certain rule and starts a timer to time the configuration BPDU
while sending out this configuration BPDU through the designated port.
z If the configuration BPDU received on a designated port has a lower priority than the configuration
BPDU of the local port, the port immediately sends out its own configuration BPDU in response.
4-8
STP timers
STP calculation involves three important timing parameters: forward delay, hello time, and max age.
z Forward delay is the delay time for device state transition.
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 right away, a
temporary loop is likely to occur.
For this reason, as a mechanism for state transition in STP, the newly elected root ports or designated
ports require twice the forward delay time before transiting to the forwarding state to ensure that the
new configuration BPDU has propagated throughout the network.
z Hello time is the time interval at which a device sends hello packets to the surrounding devices to
ensure that the paths are fault-free.
z Max age is a parameter used to determine whether a configuration BPDU held by the device has
expired. A configuration BPDU beyond the max age will be discarded.
Introduction to RSTP
Developed based on the 802.1w standard of IEEE, RSTP is an optimized version of STP. It achieves
rapid network convergence by allowing a newly elected root port or designated port to enter the
forwarding state much quicker under certain conditions than in STP.
z In RSTP, a newly elected root port can enter the forwarding state rapidly if this condition is met:
the old root port on the device has stopped forwarding data and the upstream designated port has
started forwarding data.
z In RSTP, a newly elected designated port can enter the forwarding state rapidly if this condition is
met: the designated port is an edge port or a port connected with a point-to-point link. If the
designated port is an edge port, it can enter the forwarding state directly; if the designated port is
connected with a point-to-point link, it can enter the forwarding state immediately after the device
undergoes handshake with the downstream device and gets a response.
4-9
STP does not support rapid state transition of ports. A newly elected root port or designated port must
wait twice the forward delay time before transiting to the forwarding state, even if it is a port on a
point-to-point link or an edge port, which directly connects to a user terminal rather than to another
device or a shared LAN segment.
Although RSTP supports rapid network convergence, it has the same drawback as STP does: All
bridges within a LAN share the same spanning tree, so redundant links cannot be blocked based on
VLAN, and the packets of all VLANs are forwarded along the same spanning tree.
Features of MSTP
Developed based on IEEE 802.1s, MSTP overcomes the shortcomings of STP and RSTP. In addition
to the support for rapid network convergence, it allows data flows of different VLANs to be forwarded
along separate paths, thus providing a better load sharing mechanism for redundant links. For
description about VLANs, refer to VLAN Configuration in the Access Volume.
MSTP features the following:
z 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.
z MSTP divides a switched network into multiple regions, each containing multiple spanning trees
that are independent of one another.
z MSTP prunes a loop network into a loop-free tree, thus avoiding proliferation and endless cycling
of packets in a loop network. In addition, it provides multiple redundant paths for data forwarding,
thus supporting load balancing of VLAN data.
z MSTP is compatible with STP and RSTP.
4-10
Region A0
VLAN 1 mapped to instance 1
VLAN 2 mapped to instance 2
Other VLANs mapped to CIST
BPDU BPDU
B CST
C
D
Region D0
VLAN 1 mapped to instance 1, BPDU Region B0
B as regional root bridge VLAN 1 mapped to instance 1
VLAN 2 mapped to instance 2, VLAN 2 mapped to instance 2
C as regional root bridge Other VLANs mapped to CIST
Other VLANs mapped to CIST
Region C0
VLAN 1 mapped to instance 1
VLAN 2 and 3 mapped to
instance 2
Other VLANs mapped to CIST
Assume that all devices in Figure 4-4 are running MSTP. This section explains some basic concepts of
MSTP.
MST region
A multiple spanning tree region (MST region) consists of multiple devices in a switched network and
the network segments among them. These devices have the following characteristics:
z All are MSTP-enabled,
z They have the same region name,
z They have the same VLAN-to-instance mapping configuration,
z They have the same MSTP revision level configuration, and
z They are physically linked with one another.
For example, all the devices in region A0 in Figure 4-4 have the same MST region configuration:
z The same region name,
z The same VLAN-to-instance mapping configuration (VLAN 1 is mapped to MSTI 1, VLAN 2 to
MSTI 2, and the rest to the common and internal spanning tree (CIST, that is, MSTI 0), and
z The same MSTP revision level (not shown in the figure).
Multiple MST regions can exist in a switched network. You can use an MSTP command to assign
multiple devices to the same MST region.
4-11
As an attribute of an MST region, the VLAN-to-instance mapping table describes the mapping
relationships between VLANs and MSTIs. In Figure 4-4, for example, the VLAN-to-instance mapping
table of region A0 is as follows: VLAN 1 is mapped to MSTI 1, VLAN 2 to MSTI 2, and the rest to CIST.
MSTP achieves load balancing by means of the VLAN-to-instance mapping table.
IST
An internal spanning tree (IST) is a spanning tree that runs in an MST region.
ISTs in all MST regions and the common spanning tree (CST) jointly constitute the common and
internal spanning tree (CIST) of the entire network. An IST is the section of the CIST in an MST region,
as shown in Figure 4-4.
CST
The 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. For example, the red lines in Figure 4-4 represent the CST.
CIST
Jointly constituted by ISTs and the CST, the CIST is a single spanning tree that connects all devices in
a switched network.
In Figure 4-4, for example, the ISTs in all MST regions plus the inter-region CST constitute the CIST of
the entire network.
MSTI
Multiple spanning trees can be generated in an MST region through MSTP, one spanning tree being
independent of another. Each spanning tree is referred to as a multiple spanning tree instance (MSTI).
In Figure 4-4, for example, multiple spanning trees can exist in each MST region, each spanning tree
corresponding to the specific VLAN(s). These spanning trees are called MSTIs.
The root bridge of the IST or an MSTI within an MST region is the regional root bridge of the IST or the
MSTI. Based on the topology, different spanning trees in an MST region may have different regional
roots.
For example, in region D0 in Figure 4-4, the regional root of MSTI 1 is device B, while that of MSTI 2 is
device C.
Boundary port
A boundary port is a port that connects an MST region to another MST region, or to a single
spanning-tree region running STP, or to a single spanning-tree region running RSTP. In Figure 4-4, for
example, if a device in region A0 is interconnected with the first port of a device in region D0 and the
common root bridge of the entire switched network is located in region A0, the first port of that device
in region D0 is the boundary port of region D0.
4-12
Roles of ports
MSTP calculation involves these port roles: root port, designated port, master port, alternate port,
backup port, and so on.
z Root port: a port responsible for forwarding data to the root bridge.
z Designated port: a port responsible for forwarding data to the downstream network segment or
device.
z Master port: A port on the shortest path from the current region to the common root bridge,
connecting the MST region to the common root bridge. If the region is seen as a node, the master
port is the root port of the region on the CST. The master port is a root port on IST/CIST and still a
master port on the other MSTIs.
z Alternate port: The standby port for a root port or master port. When the root port or master port is
blocked, the alternate port becomes the new root port or master port.
z Backup port: The backup port of a designated port. When the designated port is blocked, the
backup port becomes a new designated port and starts forwarding data without delay. A loop
occurs when two ports of the same MSTP device are interconnected. Therefore, the device will
block either of the two ports, and the backup port is that port to be blocked.
A port can play different roles in different MSTIs.
Figure 4-5 Port roles
Connecting to the
common root bridge
B C
Port 6
Port 5
Backup port
D
Designated port
Port 3 Port 4
4-13
A port state is not exclusively associated with a port role. Table 4-6 lists the port state(s) supported by
each port role ( indicates that the port supports this state, while indicates that the port does not
support this state).
Port role
(right) Root port/master
Designated port Alternate port Backup port
Port state port
(below)
Forwarding
Learning
Discarding
MSTP divides an entire Layer 2 network into multiple MST regions, which are interconnected by a
calculated CST. Inside an MST region, multiple spanning trees are calculated, each being called an
MSTI. Among these MSTIs, MSTI 0 is the IST, while all the others are MSTIs. Similar to STP, MSTP
uses configuration BPDUs to calculate spanning trees. The only difference between the two protocols
is that an MSTP BPDU carries the MSTP configuration on the device from which this BPDU is sent.
CIST calculation
The calculation of a CIST tree is also the process of configuration BPDU comparison. During this
process, the device with the highest priority is elected as the root bridge of the CIST. MSTP generates
an IST within each MST region through calculation, and, at the same time, MSTP regards each MST
region as a single device and generates a CST among these MST regions through calculation. The
CST and ISTs constitute the CIST of the entire network.
MSTI calculation
Within an MST region, MSTP generates different MSTIs for different VLANs based on the
VLAN-to-instance mappings. MSTP performs a separate calculation process, which is similar to
spanning tree calculation in STP, for each spanning tree. For details, refer to How STP works.
In MSTP, a VLAN packet is forwarded along the following paths:
4-14
MSTP is compatible with STP and RSTP. STP and RSTP protocol packets can be recognized by
devices running MSTP and used for spanning tree calculation.
In addition to basic MSTP functions, many special functions are provided for ease of management, as
follows:
z Root bridge hold
z Root bridge backup
z Root guard
z BPDU guard
z Loop guard
z TC-BPDU guard
z BPDU dropping
Task Remarks
Configuring the Configuring an MST Region Required
root bridge
Configuring the Root Bridge or a Secondary Root Bridge Optional
Configuring the Work Mode of an MSTP Device Optional
Configuring the Priority of a Device Optional
4-15
z If GVRP and MSTP are both enabled on a device at the same time, GVRP packets will be
forwarded along the CIST. Therefore, if you wish to advertise a certain VLAN within the network
through GVRP in this case, make sure that this VLAN is mapped to the CIST (MSTI 0) when you
configure the VLAN-to-instance mapping table. For the detailed information of GVRP, refer to
GVRP Configuration of the Access Volume.
z MSTP is mutually exclusive with any of the following functions on a port: service loopback, RRPP,
Smart Link, and BPDU tunnel.
z Configurations made in system view take effect globally; configurations made in Ethernet interface
view take effect on the current interface only; configurations made in port group view take effect
on all member ports in the port group; configurations made in Layer 2 aggregate interface view
take effect only on the aggregate interface; configurations made on an aggregation member port
can take effect only after the port is removed from the aggregation group.
z After you enable MSTP on a Layer 2 aggregate interface, the system performs MSTP calculation
on the Layer 2 aggregate interface but not on the aggregation member ports. The MSTP enable
state and forwarding state of each selected port in an aggregation group is consistent with those
of the corresponding Layer 2 aggregate interface.
z Though the member ports of an aggregation group do not participate in MSTP calculation, the
ports still reserve its MSTP configurations for participating MSTP calculation after leaving the
aggregation group.
4-16
Make the following configurations on the root bridge and on the leaf nodes separately.
Follow these steps to configure an MST region:
Optional
instance instance-id vlan vlan-list
Configure the Use either command.
VLAN-to-instance mapping All VLANs in an MST region
table are mapped to MSTI 0 by
vlan-mapping modulo modulo
default.
z Two or more MSTP-enabled devices belong to the same MST region only if they are configured to
have the same format selector (0 by default, not configurable), MST region name, the same
VLAN-to-instance mapping entries in the MST region and the same MST region revision level, and
they are interconnected via a physical link.
z The configuration of MST regionrelated parameters, especially the VLAN-to-instance mapping
table, will cause MSTP to launch a new spanning tree calculation process, which may result in
network topology instability. To reduce the possibility of topology instability caused by
configuration, MSTP will not immediately launch a new spanning tree calculation process when
processing MST regionrelated configurations; instead, such configurations will take effect only
after you activate the MST regionrelated parameters using the active region-configuration
command, or enable MSTP using the stp enable command in the case that MSTP is not enabled.
4-17
MSTP can determine the root bridge of a spanning tree through MSTP calculation. Alternatively, you
can specify the current device as the root bridge or a secondary root bridge using the commands
provided by the system.
Note that:
z A device has independent roles in different MSTIs. It can act as the root bridge or a secondary
root bridge of one MSTI while being the root bridge or a secondary root bridge of another MSTI.
However, the same device cannot be the root bridge and a secondary root bridge in the same
MSTI at the same time.
z There is only one root bridge in effect in a spanning tree instance. If two or more devices have
been designated to be root bridges of the same spanning tree instance, MSTP will select the
device with the lowest MAC address as the root bridge.
z When the root bridge of an instance fails or is shut down, the secondary root bridge (if you have
specified one) can take over the role of the primary root bridge. However, if you specify a new
primary root bridge for the instance then, the secondary root bridge will not become the root bridge.
If you have specified multiple secondary root bridges for an instance, when the root bridge fails,
MSTP will select the secondary root bridge with the lowest MAC address as the new root bridge.
Configuring the current device as the root bridge of a specific spanning tree
Follow these steps to configure the current device as the root bridge of a specific spanning tree:
Configuring the current device as a secondary root bridge of a specific spanning tree
Follow these steps to configure the current device as a secondary root bridge of a specific spanning
tree:
4-18
Being mutually compatible, MSTP and RSTP can recognize each others protocol packets. However,
STP is unable to recognize MSTP packets. For hybrid networking with legacy STP devices and for full
interoperability with RSTP-enabled devices, MSTP supports three work modes: STP-compatible mode,
RSTP mode, and MSTP mode.
z In STP-compatible mode, all ports of the device send out STP BPDUs,
z In RSTP mode, all ports of the device send out RSTP BPDUs. If the device detects that it is
connected with a legacy STP device, the port connecting with the legacy STP device will
automatically migrate to STP-compatible mode.
z In MSTP mode, all ports of the device send out MSTP BPDUs. If the device detects that it is
connected with a legacy STP device, the port connecting with the legacy STP device will
automatically migrate to STP-compatible mode.
Make this configuration on the root bridge and on the leaf nodes separately.
Follow these steps to configure the MSTP work mode:
Device priorities participate in spanning tree calculation. The priority of a device determines whether it
can be elected as the root bridge of a spanning tree. A lower value indicates a higher priority. By setting
the priority of a device to a low value, you can specify the device as the root bridge of the spanning tree.
An MSTP-enabled device can have different priorities in different MSTIs.
Make this configuration on the root bridge only.
Follow these steps to configure the priority of a device in a specified MSTI:
4-19
By setting the maximum hops of an MST region, you can restrict the region size. The maximum hops
configured on the regional root bridge will be used as the maximum hops of the MST region.
The regional root bridge always sends a configuration BPDU with a hop count set to the maximum
value. When a switch receives this configuration BPDU, it decrements the hop count by 1 and uses the
new hop count in the BPDUs it propagates. When the hop count of a BPDU reaches 0, it is discarded
by the device that received it. Thus, devices beyond the reach of the maximum hop can no longer take
part in spanning tree calculation, and thereby the size of the MST region is confined.
Make this configuration on the root bridge only. All the devices other than the root bridge in the MST
region use the maximum hop value set for the root bridge.
Follow these steps to configure the maximum number of hops of an MST region:
Any two terminal devices in a switched network are interconnected through a specific path composed
of a series of devices. The network diameter is the number of devices on the path composed of the
most devices. The network diameter is a parameter that indicates the network size. A bigger network
diameter indicates a larger network size.
Make this configuration on the root bridge only.
Follow these steps to configure the network diameter of a switched network:
4-20
MSTP involves three timers: forward delay, hello time and max age. You can configure these three
parameters for MSTP to calculate spanning trees.
z To prevent temporary loops on a network, MSTP sets an intermediate port state called learning
between the discarding state and the forwarding state, that is, before a port in the discarding state
can transit to the forwarding state, it needs to go through the learning state. Forward delay is the
delay time for port state transition. This is to ensure that the state transition of the local port and
that of the peer occur in a synchronized manner.
z Hello time is the time interval at which a device sends configuration BPDUs to the surrounding
devices to ensure that the paths are fault-free. If a device fails to receive configuration BPDUs
within a certain period of time, it starts a new spanning tree calculation process.
z MSTP can detect link failures and automatically restore blocked redundant links to the forwarding
state. A device on the CIST determines whether a configuration BPDU received by a port has
expired according to the max age parameter. If yes, it starts a new spanning tree calculation
process. The max age set for an MSTI does not take effect.
These three timers set on the root bridge of the CIST apply on all the devices on the entire switched
network.
Optional
Configure the forward delay
stp timer forward-delay time 1,500 centiseconds (15
timer
seconds) by default
Optional
Configure the hello timer stp timer hello time 200 centiseconds (2 seconds)
by default
4-21
z The length of the forward delay time is related to the network diameter of the switched network.
Typically, the larger the network diameter is, the longer the forward delay time should be. Note
that if the forward delay setting is too small, temporary redundant paths may be introduced; if the
forward delay setting is too big, it may take a long time for the network to converge. We
recommend that you use the default setting.
z An appropriate hello time setting enables the device to timely detect link failures on the network
without using excessive network resources. If the hello time is set too long, the device will take
packet loss as a link failure and trigger a new spanning tree calculation process; if the hello time is
set too short, the device will send repeated configuration BPDUs frequently, which adds to the
device burden and causes waste of network resources. We recommend that you use the default
setting.
z If the max age time setting is too small, the network devices will frequently launch spanning tree
calculations and may take network congestion as a link failure; if the max age setting is too large,
the network may fail to timely detect link failures and fail to timely launch spanning tree
calculations, thus reducing the auto-sensing capability of the network. We recommend that you
use the default setting.
The settings of hello time, forward delay and max age must meet the following formulae; otherwise,
network instability will frequently occur.
z 2 (forward delay 1 second) max age
z Max age 2 (hello time + 1 second)
We recommend that you specify the network diameter with the stp bridge-diameter command and let
MSTP automatically calculate optimal settings of these three timers based on the network diameter.
The timeout factor is a parameter used to decide the timeout time, as shown in the following formula:
Timeout time = timeout factor 3 hello time.
After the network topology is stabilized, each non-root-bridge device forwards configuration BPDUs to
the downstream devices at the interval of hello time to check whether any link is faulty. Typically, if a
device does not receive a BPDU from the upstream device within nine times the hello time, it assumes
that the upstream device has failed and starts a new spanning tree calculation process.
Sometimes a device may fail to receive a BPDU from the upstream device because the upstream
device is busy. A spanning tree calculation that occurs in this case not only is unnecessary, but also
wastes the network resources. In a very stable network, you can avoid such unwanted spanning tree
calculations by setting the timeout factor to 5, 6, or 7.
Follow these steps to configure the timeout factor:
4-22
The maximum rate of a port refers to the maximum number of BPDUs the port can send within each
hello time. The maximum rate of a port is related to the physical status of the port and the network
structure.
Make this configuration on the root bridge and on the leaf nodes separately.
Follow these steps to configure the maximum rate of a port or a group of ports:
The higher the maximum port rate is, the more BPDUs will be sent within each hello time, and the
more system resources will be used. By setting an appropriate maximum port rate, you can limit the
rate at which the port sends BPDUs and prevent MSTP from using excessive network resources when
the network becomes instable. We recommend that you use the default setting.
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 a network topology change occurs, an edge port will not cause
a temporary loop. Because a device does not know whether a port is directly connected to a terminal,
you need to manually configure the port to be an edge port. After that, this port can transition rapidly
from the blocked state to the forwarding state without delay.
Make this configuration on the root bridge and on the leaf nodes separately.
Follow these steps to specify a port or a group of ports as edge port or ports:
4-23
z With BPDU guard disabled, when a port set as an edge port receives a BPDU from another port, it
will become a non-edge port again. To restore the edge port, re-enable it.
z 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 transition to the forwarding state fast while ensuring network
security.
Path cost is a parameter related to the rate of a port. On an MSTP-enabled device, a port can have
different path costs in different MSTIs. Setting appropriate path costs allows VLAN traffic flows to be
forwarded along different physical links, thus achieving VLAN-based load balancing.
The device can automatically calculate the default path cost; alternatively, you can also configure the
path cost for ports.
Make the following configurations on the leaf nodes only.
Specifying a standard that the device uses when calculating the default path cost
You can specify a standard for the device to use in automatic calculation for the default path cost. The
device supports the following standards:
z dot1d-1998: The device calculates the default path cost for ports based on IEEE 802.1d-1998.
z dot1t: The device calculates the default path cost for ports based on IEEE 802.1t.
z legacy: The device calculates the default path cost for ports based on a private standard.
Follow these steps to specify a standard for the device to use when calculating the default path cost:
4-24
When calculating path cost for an aggregate interface, 802.1d-1998 does not take into account the
number of member ports in its aggregation group as 802.1t does. The calculation formula of 802.1t is:
Path Cost = 200,000,000/link speed (in 100 kbps), where link speed is the sum of the link speed values
of the non-blocked ports in the aggregation group.
4-25
Configuration example
# Specify that the device use 802.1d-1998 when calculating the default path costs of its ports.
<Sysname> system-view
[Sysname] stp pathcost-standard dot1d-1998
The priority of a port is an important factor in determining whether the port can be elected as the root
port of a device. If all other conditions are the same, the port with the highest priority will be elected as
the root port.
On an MSTP-enabled device, a port can have different priorities in different MSTIs, and the same port
can play different roles in different MSTIs, so that data of different VLANs can be propagated along
different physical paths, thus implementing per-VLAN load balancing. You can set port priority values
based on the actual networking requirements.
Make this configuration on the leaf nodes only.
Follow these steps to configure the priority of a port or a group of ports:
4-26
A point-to-point link is a link directly connecting two devices. If the two ports across a point-to-point link
are root ports or designated ports, the ports can rapidly transition to the forwarding state after a
proposal-agreement handshake process.
Make this configuration on the root bridge and on the leaf nodes separately.
Follow these steps to configure the link type of a port or a group of ports:
Enter Ethernet
interface view, or
Enter interface interface-type
Layer 2
interface view interface-number Required
aggregate
or port group interface view Use either command.
view
Enter port group port-group manual
view port-group-name
Optional
The default setting is
stp point-to-point { auto | auto; namely the port
Configure the link type of ports
force-false | force-true } automatically detects
whether its link is
point-to-point.
z A Layer 2 aggregate interface can be configured to connect to a point-to-point link. If a port works
in auto-negotiation mode and the negotiation result is full duplex, this port can be configured as
connecting to a point-to-point link.
z If a port is configured as connecting to a point-to-point link, the setting takes effect for the port in
all MSTIs. If the physical link to which the port connects is not a point-to-point link and you force it
to be a point-to-point link by configuration, the configuration may incur a temporary loop.
4-27
Enter Ethernet
Enter interface view, or
interface interface-type
interface Layer 2
interface-number Required
view or aggregate
port group interface view Use either command.
view Enter port group port-group manual
view port-group-name
Configure the mode the port Required
stp compliance { auto | dot1s |
uses to recognize/send MSTP
legacy } auto by default
packets
z MSTP provides the MSTP packet format incompatibility guard function. In MSTP mode, if a port is
configured to recognize/send MSTP packets in a mode other than auto, and receives a packet in
a format different from the specified type, the port will become a designated port and remain in the
discarding state to prevent the occurrence of a loop.
z MSTP provides the MSTP packet format frequent change guard function. If a port receives MSTP
packets of different formats frequently, this means that the MSTP packet format configuration
contains errors. In this case, if the port is working in MSTP mode, it will be disabled for protection.
Those ports closed thereby can be restored only by the network administrators.
In a large-scale, MSTP-enabled network, there are a large number of MSTIs, so ports may frequently
transition from one state to another. In this situation, you can enable devices to output the port state
transition information of all MSTIs or the specified MSTI so as to monitor the port states in real time.
Make this configuration on the root bridge and on the leaf nodes separately.
Follow these steps to enable output of port state transition information:
4-28
You must enable MSTP for the device before any other MSTP-related configurations can take effect.
Make this configuration on the root bridge and on the leaf nodes separately.
Follow these steps to enable the MSTP feature:
z MSTP takes effect when it is enabled both globally and on the port.
z To control MSTP flexibly, you can use the undo stp enable command to disable the MSTP
feature for certain ports so that they will not take part in spanning tree calculation and thus to save
the CPU resources of the device.
Performing mCheck
MSTP has three working modes: STP compatible mode, RSTP mode, and MSTP mode.
If a port on a device running MSTP (or RSTP) connects to a device running STP, this port will
automatically migrate to the STP-compatible mode. However, it will not be able to migrate
automatically back to the MSTP (or RSTP) mode, but will remain working in the STP-compatible mode
under the following circumstances:
z The device running STP is shut down or removed.
z The device running STP migrates to the MSTP (or RSTP) mode.
4-29
An mCheck operation takes effect on a device only when MSTP operates in RSTP or MSTP mode.
As defined in IEEE 802.1s, interconnected devices are in the same region only when the MST
region-related configurations (domain name, revision level, VLAN-to-instance mappings) on them are
identical. An MSTP-enabled device identifies devices in the same MST region by checking the
configuration ID in BPDU packets. The configuration ID includes the region name, revision level,
configuration digest that is in 16-byte length and is the result calculated via the HMAC-MD5 algorithm
based on VLAN-to-instance mappings.
Since MSTP implementations vary with vendors, the configuration digests calculated using private
keys is different; hence different vendors devices in the same MST region can not communicate with
each other.
Enabling the Digest Snooping feature on the port connecting the local device to a third-party device in
the same MST region can make the two devices communicate with each other.
4-30
You can enable Digest Snooping only on a device that is connected to a third-party device that uses its
private key to calculate the configuration digest.
Follow these steps to configure Digest Snooping:
z With the Digest Snooping feature enabled, comparison of configuration digest is not needed for
in-the-same-region check, so the VLAN-to-instance mappings must be the same on associated
ports.
z With global Digest Snooping enabled, modification of VLAN-to-instance mappings and removing
of the current region configuration using the undo stp region-configuration command are not
allowed. You can only modify the region name and revision level.
z You need to enable this feature both globally and on associated ports to make it take effect. It is
recommended to enable the feature on all associated ports first and then globally, thus making the
configuration take effect on all configured ports and reducing impact on the network, and disable
the feature globally to disable it on all associated ports.
z You are recommended not to enable Digest Snooping on MST region edge ports, thus avoiding
loops.
z You are recommended to enable Digest Snooping first and then MSTP. Do not configure Digest
Snooping when the network works well, thus avoiding traffic interruption.
4-31
1) Network requirements
z Device A and Device B connect to Device C, a third-party device, and all these devices are in the
same region.
z Enable Digest Snooping on Device A and Device B so that the three devices can communicate
with one another.
Figure 4-6 Digest Snooping configuration
2) Configuration procedure
# Enable Digest Snooping on GigabitEthernet 1/0/1 of Device A and enable global Digest Snooping on
Device A.
<DeviceA> system-view
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] stp config-digest-snooping
[DeviceA-GigabitEthernet1/0/1] quit
[DeviceA] stp config-digest-snooping
# Enable Digest Snooping on GigabitEthernet 1/0/1 of Device B and enable global Digest Snooping on
Device B.
<DeviceB> system-view
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] stp config-digest-snooping
[DeviceB-GigabitEthernet1/0/1] quit
[DeviceB] stp config-digest-snooping
In RSTP and MSTP, two types of messages are used for rapid state transition on designated ports:
z Proposal: sent by designated ports to request rapid transition
z Agreement: used to acknowledge rapid transition requests
Both RSTP and MSTP devices can perform rapid transition on a designated port only when the port
receives an agreement packet from the downstream device. The differences between RSTP and
MSTP devices are:
z For MSTP, the downstream devices root port sends an agreement packet only after it receives an
agreement packet from the upstream device.
z For RSTP, the down stream device sends an agreement packet regardless of whether an
agreement packet from the upstream device is received.
4-32
n t
eme
Agre
Designated port
changes to
forwarding state Root port
Designated port
If the upstream device is a third-party device, the rapid state transition implementation may be limited.
For example, when the upstream device uses a rapid transition mechanism similar to that of RSTP,
and the downstream device adopts MSTP and does not work in RSTP mode, the root port on the
downstream device receives no agreement packet from the upstream device and thus sends no
agreement packets to the upstream device. As a result, the designated port of the upstream device
fails to transit rapidly and can only change to the forwarding state after a period twice the Forward
Delay.
In this case, you can enable the No Agreement Check feature on the downstream devices port to
enable the designated port of the upstream device to transit its state rapidly.
Configuration Prerequisites
z A device is connected to a third-party upstream device supporting MSTP via a point-to-point link.
z Configure the same region name, revision level and VLAN-to-instance mappings on the two
devices, thus assigning them to the same region.
To make the No Agreement Check feature take effect, enable it on the root port.
Follow these steps to configure No Agreement Check:
4-33
Required
Enable No Agreement Check stp no-agreement-check
Disabled by default
1) Network requirements
z Device A connects to Device B, a third-party device that has different MSTP implementation. Both
devices are in the same region.
z Device B is the regional root bridge, and Device A is the downstream device.
Figure 4-9 No Agreement Check configuration
2) Configuration procedure
# Enable No Agreement Check on GigabitEthernet 1/0/1 of Device A.
<DeviceA> system-view
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] stp no-agreement-check
Among loop guard, root guard and edge port settings, only one function can take effect on a port at the
same time.
4-34
For access layer devices, the access ports generally connect directly with user terminals (such as PCs)
or file servers. In this case, the access ports are configured as edge ports to allow rapid transition.
When these ports receive configuration BPDUs, the system will automatically set these ports as
non-edge ports and start a new spanning tree calculation process. This will cause a change of network
topology. Under normal conditions, these ports should not receive configuration BPDUs. However, if
someone forges configuration BPDUs maliciously to attack the devices, network instability will occur.
MSTP provides the BPDU guard function to protect the system against such attacks. With the BPDU
guard function enabled on the devices, when edge ports receive configuration BPDUs, MSTP will
close these ports and notify the NMS that these ports have been closed by MSTP. Those ports closed
thereby can be restored only by the network administers.
Make this configuration on a device with edge ports configured.
Follow these steps to enable BPDU guard:
BPDU guard does not take effect on loopback test-enabled ports. For information about loopback test,
refer to Ethernet Interface Configuration in the Access Volume.
The root bridge and secondary root bridge of a spanning tree should be located in the same MST
region. Especially for the CIST, the root bridge and secondary root bridge are generally put in a
high-bandwidth core region during network design. However, due to possible configuration errors or
malicious attacks in the network, the legal root bridge may receive a configuration BPDU with a higher
priority. In this case, the current legal root bridge will be superseded by another device, causing an
undesired change of the network topology. As a result, the traffic that should go over high-speed links
is switched to low-speed links, resulting in network congestion.
To prevent this situation from happening, MSTP provides the root guard function. If the root guard
function is enabled on a port of a root bridge, this port will keep playing the role of designated port on
all MSTIs. Once this port receives a configuration BPDU with a higher priority from an MSTI, it
immediately sets that port to the listening state in the MSTI, without forwarding the packet (this is
equivalent to disconnecting the link connected with this port in the MSTI). If the port receives no
BPDUs with a higher priority within twice the forwarding delay, it will revert to its original state.
Make this configuration on a designated port.
4-35
By keeping receiving BPDUs from the upstream device, a device can maintain the state of the root port
and blocked ports. However, due to link congestion or unidirectional link failures, these ports may fail to
receive BPDUs from the upstream devices. In this case, the downstream device will reselect the port
roles: Those ports in forwarding state that failed to receive upstream BPDUs will become designated
ports, and the blocked ports will transition to the forwarding state, resulting in loops in the switched
network. The loop guard function can suppress the occurrence of such loops.
If a loop guardenabled port fails to receive BPDUs from the upstream device, and if the port takes
part in STP calculation, all the instances on the port, no matter what roles the port plays, will be set to,
and stay in, the Discarding state.
Make this configuration on the root port or an alternate port of a device.
Follow these steps to enable loop guard:
When receiving topology change (TC) BPDUs (the BPDUs used to notify topology changes), a switch
flushes its forwarding address entries. If someone forges TC-BPDUs to attack the switch, the switch
will receive a large number of TC-BPDUs within a short time and be busy with forwarding address
entry flushing. This affects network stability.
4-36
In a STP-enabled network, some users may send BPDU packets to the switch continuously in order to
destroy the network. When a switch receives the BPDU packets, it will forward them to other switches.
As a result, STP calculation is performed repeatedly, which may occupy too much CPU of the switches
or cause errors in the protocol state of the BPDU packets.
In order to avoid this problem, you can enable BPDU dropping on Ethernet ports. Once the function is
enabled on a port, the port will not receive or forward any BPDU packets. In this way, the switch is
protected against the BPDU packet attacks so that the STP calculation is assured to be right.
Follow these steps to enable BPDU dropping:
4-37
z All devices on the network are in the same MST region. Device A and Device B work on the
distribution layer, while Device C and Device D work on the access layer.
z Configure MSTP so that packets of different VLANs are forwarded along different spanning trees:
Packets of VLAN 10 are forwarded along MSTI 1, those of VLAN 30 are forwarded along MSTI 3,
those of VLAN 40 are forwarded along MSTI 4, and those of VLAN 20 are forwarded along MSTI
0.
z VLAN 10 and VLAN 30 are terminated on the distribution layer devices, and VLAN 40 is
terminated on the access layer devices, so the root bridges of MSTI 1 and MSTI 3 are Device A
and Device B respectively, while the root bridge of MSTI 4 is Device C.
4-38
GE
/1
1/0
1/0
GE
/1
/1
GE
1/0
1/0
GE
/1
Configuration procedure
3) Configuration on Device B
# Enter MST region view, configure the MST region name as example, map VLAN 10, VLAN 30, and
VLAN 40 to MSTI 1, MSTI 3, and MSTI 4 respectively, and configure the revision level of the MST
region as 0.
4-39
4) Configuration on Device C.
# Enter MST region view, configure the MST region name as example, map VLAN 10, VLAN 30, and
VLAN 40 to MSTI 1, MSTI 3, and MSTI 4 respectively, and configure the revision level of the MST
region as 0.
<DeviceC> system-view
[DeviceC] stp region-configuration
[DeviceC-mst-region] region-name example
[DeviceC-mst-region] instance 1 vlan 10
[DeviceC-mst-region] instance 3 vlan 30
[DeviceC-mst-region] instance 4 vlan 40
[DeviceC-mst-region] revision-level 0
5) Configuration on Device D.
# Enter MST region view, configure the MST region name as example, map VLAN 10, VLAN 30, and
VLAN 40 to MSTI 1, MSTI 3, and MSTI 4 respectively, and configure the revision level of the MST
region as 0.
<DeviceD> system-view
[DeviceD] stp region-configuration
[DeviceD-mst-region] region-name example
[DeviceD-mst-region] instance 1 vlan 10
[DeviceD-mst-region] instance 3 vlan 30
[DeviceD-mst-region] instance 4 vlan 40
[DeviceD-mst-region] revision-level 0
4-40
4-41
Based on the above information, you can draw the MSTI corresponding to each VLAN, as shown in
Figure 4-11.
Figure 4-11 MSTIs corresponding to different VLANs
4-42
When configuring LLDP, go to these sections for information you are interested in:
z Overview
z LLDP Configuration Task List
z Performing Basic LLDP Configuration
z Configuring CDP Compatibility
z Configuring LLDP Trapping
z Displaying and Maintaining LLDP
z LLDP Configuration Examples
Overview
Background
In a heterogeneous network, it is important that different types of network devices from different
vendors can discover one other and exchange configuration for interoperability and management sake.
This calls for a standard configuration exchange platform.
To address the needs, the IETF drafted the Link Layer Discovery Protocol (LLDP) in IEEE 802.1AB.
The protocol operates on the data link layer to exchange device information between directly
connected devices. With LLDP, a device sends local device information (including its major functions,
management IP address, device ID, and port ID) as TLV (type, length, and value) triplets in LLDPDUs
to the directly connected devices, and at the same time, stores the device information received in
LLDPDUs sent from the LLDP neighbors in a standard management information base (MIB). It allows
a network management system to fast detect Layer-2 network topology change and identify what the
change is.
For more information about MIBs, refer to SNMP Configuration in the System Volume.
Basic Concepts
LLDP frames
LLDP sends device information in LLDP data units (LLDPDUs). LLDPDUs are encapsulated in
Ethernet II or SNAP frames.
1) Ethernet II-encapsulated LLDP frame format
5-1
Field Description
The MAC address to which the LLDPDU is advertised. It is fixed to
Destination MAC address
0x0180-C200-000E, a multicast MAC address.
The MAC address of the sending port. If the port does not have a MAC
Source MAC address
address, the MAC address of the sending bridge is used.
Type The Ethernet type for the upper layer protocol. It is 0x88CC for LLDP.
0 15 31
Destination MAC address
Type
Data = LLDPU
(n bytes)
FCS
Field Description
The MAC address to which the LLDPDU is advertised. It is fixed to
Destination MAC address
0x0180-C200-000E, a multicast MAC address.
5-2
LLDPDUs
LLDP uses LLDPDUs to exchange information. An LLDPDU comprises multiple type, length, and value
(TLV) sequences, each carrying a type of device information, as shown in Figure 5-3.
Figure 5-3 An LLDPDU
An LLDPDU can carry up to 28 types of TLVs, of which the chassis ID TLV, port ID TLV, TTL TLV, and
end of LLDPDU TLV (end TLV in the figure) are mandatory TLVs that must be carried and other TLVs
are optional.
TLVs
TLVs are type, length, and value sequences that carry information elements, where the type field
identifies the type of information, the length field indicates the length of the information field in octets,
and the value field contains the information itself.
LLDPDU TLVs fall into these categories: basic management TLVs, organizationally (IEEE 802.1 and
IEEE 802.3) specific TLVs, and LLDP-MED (media endpoint discovery) TLVs. Basic management
TLVs are essential to device management. Organizationally specific TLVs and LLDP-MED TLVs are
used for enhanced device management; they are defined by standardization or other organizations
and thus are optional to LLDPDUs.
1) Basic management TLVs
Table 5-1 lists the basic management TLV types currently in use. Some of them are mandatory to
LLDPDUs, that is, must be included in every LLDPDU.
5-3
Type Description
Port VLAN ID PVID of the sending port
Port And Protocol VLAN ID Port and protocol VLAN IDs
Currently, 3Com switches 4510G support receiving but not sending protocol identity TLVs.
Type Description
Contains the rate and duplex capabilities of the sending port,
MAC/PHY Configuration/Status support for auto negotiation, enabling status of auto
negotiation, and the current rate and duplex mode.
Power Via MDI Contains Power supply capability of the port.
Indicates the support of the port for link aggregation, the
Link Aggregation aggregation capability of the port, and the aggregation status
(that is, whether the link is in an aggregation).
Indicates the supported maximum frame size. It is now the
Maximum Frame Size
MTU of the port.
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
satisfy the voice device vendors requirements for cost effectiveness, ease of deployment, and ease of
5-4
Type Description
Allows a MED endpoint to advertise the supported LLDP-MED
LLDP-MED Capabilities
TLVs and its device type.
Allows a network device or MED endpoint to advertise LAN
Network Policy type and VLAN ID of the specific port, and the Layer 2 and
Layer 3 priorities for a specific set of applications.
Allows a network device or MED endpoint to advertise
Extended Power-via-MDI
power-related information (according to IEEE 802.3AF).
Allows a MED endpoint device to advertise its hardware
Hardware Revision
version.
Firmware Revision Allows a MED endpoint to advertise its firmware version.
Software Revision Allows a MED endpoint to advertise its software version.
Allows an LLDP-MED endpoint device to advertise its serial
Serial Number
number.
Manufacturer Name Allows a MED endpoint to advertise its vendor name.
Model Name Allows a MED endpoint to advertise its model name.
Management address
The management address of a device is used by the network management system to identify and
manage the device for topology maintenance and network management. The management address is
encapsulated in the management address TLV.
5-5
An LLDP-enabled port 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 the network
from being overwhelmed by LLDP frames at times of frequent local device information change, an
interval is introduced between two successive LLDP frames.
This interval is shortened to 1 second in either of the following two cases:
z A new neighbor is discovered, that is, a new LLDP frame is received carrying device information
new to the local device.
z The LLDP operating mode of the port changes from Disable/Rx to TxRx or Tx.
This is the fast sending mechanism of LLDP. With this mechanism, a specific number of LLDP frames
are sent successively at the 1-second interval to help LLDP neighbors discover the local device as
soon as possible. Then, the normal LLDP frame transmit interval resumes.
An LLDP-enabled port operating in TxRx mode or Rx mode checks the TLVs carried in every LLDP
frame it receives for validity violation. If valid, the information is saved and an aging timer is set for it
based on the time to live (TTL) TLV carried in the LLDPDU. If the TTL TLV is zero, the information is
aged out immediately.
Task Remarks
Enabling LLDP Required
5-6
To make LLDP take effect on certain ports, you need to enable LLDP both globally and on these ports.
Follow these steps to enable LLDP:
Optional
Enable LLDP lldp enable By default, LLDP is enabled on
a port.
5-7
When LLDP operating mode changes on a port, the port initializes the protocol state machines after a
certain delay. By adjusting the LLDP re-initialization delay, you can avoid frequent initializations caused
by frequent LLDP operating mode changes on a port.
Follow these steps to set the LLDP re-initialization delay for ports:
With LLDP polling enabled, a device checks for local configuration changes periodically. Upon
detecting a configuration change, the device sends LLDP frames to inform the neighboring devices of
the change.
Follow these steps to enable LLDP polling:
Enter
Enter Ethernet interface interface-type
Ethernet
interface view interface-number Required
interface view
or port group Use either command.
view Enter port
port-group manual port-group-name
group view
Follow these steps to configure the LLDPDU TLVs to be advertised out the specified port or ports:
5-8
LLDP encodes management addresses in numeric or character string format in management address
TLVs.
By default, management addresses are encoded in numeric format. If a neighbor encoded its
management address in character string format, you can configure the encoding format of the
management address as string on the connecting port to guarantee normal communication with the
neighbor.
Follow these steps to configure a management address to be advertised and its encoding format on
one or a group of ports:
Enter Enter
interface interface-type
Ethernet Ethernet
interface-number Required
interface interface view
view or port Use either command.
Enter port port-group manual
group view group view port-group-name
Optional
By default, the management
Enable LLDP to advertise address is sent through
management address TLVs, LLDPDUs, and the
lldp management-address-tlv management address is the
and optionally, configure a
[ ip-address ] main IP address of the
management IP address if
needed lowest-ID VLAN carried on the
interface. If the VLAN is not
assigned a main IP address,
127.0.0.1 is used.
Optional
Configure the encoding lldp
format of the management management-address-format By default, the management
address to character string string address is encapsulated in the
numeric format.
5-9
The TTL TLV carried in an LLDPDU determines how long the device information carried in the
LLDPDU can be saved on a recipient device.
You can configure the TTL of locally sent LLDP frames to determine how long information about the
local device can be saved on a neighbor device by setting the TTL multiplier. The TTL is expressed as
follows:
TTL = Min (65535, (TTL multiplier LLDPDU transmit interval))
As the expression shows, the TTL can be up to 65535 seconds. TTLs greater than it will be rounded
down to 65535 seconds.
Follow these steps to change the TTL multiplier:
Both the LLDPDU transmit interval and delay must be less than the TTL to ensure that the LLDP
neighbors can receive LLDP frames to update information about the device you are configuring before
it is aged out.
5-10
LLDP-CDP (CDP is short for the Cisco Discovery Protocol) packets use only SNAP encapsulation.
For detailed information about voice VLAN, refer to VLAN Configuration in the Access Volume.
You need to enable CDP compatibility for your device to work with Cisco IP phones.
As 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. This can cause a requesting Cisco IP
phone to send voice traffic without any tag to your device, disabling your device to differentiate the
voice traffic from other types of traffic.
By configuring CDP compatibility, you can enable LLDP on your device to receive and recognize CDP
packets from Cisco IP phones and respond with CDP packets carrying the voice VLAN configuration
TLV for the IP phones to configure the voice VLAN automatically. Thus, the voice traffic is confined in
the configured voice VLAN to be differentiated from other types of traffic.
Configuration Prerequisites
5-11
Required
Configure CDP-compatible
lldp compliance admin-status cdp By default,
LLDP to operate in TxRx
txrx CDP-compatible LLDP
mode
operates in disable mode.
As the maximum TTL allowed by CDP is 255 seconds, ensure that the product of the TTL multiplier
and the LLDPDU transmit interval is less than 255 seconds for CDP-compatible LLDP to work properly
with Cisco IP phones.
5-12
Network requirements
As shown in Figure 5-4, the NMS and Switch A are located in the same Ethernet. An MED device and
Switch B are connected to GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 of Switch A.
Enable LLDP on the ports of Switch A and Switch B to monitor the link between Switch A and Switch B
and the link between Switch A and the MED device on the NMS.
Figure 5-4 Network diagram for basic LLDP configuration
MED
GE1/0/1
NMS
GE1/0/2 GE1/0/1
Switch A Switch B
5-13
1) Configure Switch A.
# Enable LLDP globally.
<SwitchA> system-view
[SwitchA] lldp enable
# Enable LLDP on GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 (you can skip this step because
LLDP is enabled on ports by default), and set the LLDP operating mode to Rx.
[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] lldp enable
[SwitchA-GigabitEthernet1/0/1] lldp admin-status rx
[SwitchA-GigabitEthernet1/0/1] quit
[SwitchA] interface gigabitethernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] lldp enable
[SwitchA-GigabitEthernet1/0/2] lldp admin-status rx
[SwitchA-GigabitEthernet1/0/2] quit
2) Configure Switch B.
# Enable LLDP globally.
<SwitchB> system-view
[SwitchB] lldp enable
# Enable LLDP on GigabitEthernet1/0/1 (you can skip this step because LLDP is enabled on ports by
default), and set the LLDP operating mode to Tx.
[SwitchB] interface gigabitethernet 1/0/1
[SwitchB-GigabitEthernet1/0/1] lldp enable
[SwitchB-GigabitEthernet1/0/1] lldp admin-status tx
[SwitchB-GigabitEthernet1/0/1] quit
Port 1 [GigabitEthernet1/0/1]:
Port status of LLDP : Enable
Admin status : Rx_Only
Trap flag : No
5-14
Number of neighbors : 1
Number of MED neighbors : 1
Number of CDP neighbors : 0
Number of sent optional TLV : 0
Number of received unknown TLV : 0
Port 2 [GigabitEthernet1/0/2]:
Port status of LLDP : Enable
Admin status : Rx_Only
Trap flag : No
Roll time : 0s
Number of neighbors : 1
Number of MED neighbors : 0
Number of CDP neighbors : 0
Number of sent optional TLV : 0
Number of received unknown TLV : 3
As the sample output shows, GigabitEthernet 1/0/1 of Switch A connects a MED device, and
GigabitEthernet 1/0/2 of Switch A connects a non-MED device. Both ports operate in Rx mode, that is,
they only receive LLDP frames.
# Tear down the link between Switch A and Switch B and then display the global LLDP status and port
LLDP status on Switch A.
[SwitchA] display lldp status
Global status of LLDP : Enable
The current number of LLDP neighbors : 1
The current number of CDP neighbors : 0
LLDP neighbor information last changed time: 0 days,0 hours,5 minutes,20 seconds
Transmit interval : 30s
Hold multiplier : 4
Reinit delay : 2s
Transmit delay : 2s
Trap interval : 5s
Fast start times : 3
Port 1 [GigabitEthernet1/0/1]:
Port status of LLDP : Enable
Admin status : Rx_Only
Trap flag : No
Roll time : 0s
Number of neighbors : 1
Number of MED neighbors : 1
Number of CDP neighbors : 0
Number of sent optional TLV : 0
Number of received unknown TLV : 5
5-15
Number of neighbors : 0
Number of MED neighbors : 0
Number of CDP neighbors : 0
Number of sent optional TLV : 0
Number of received unknown TLV : 0
As the sample output shows, GigabitEthernet 1/0/2 of Switch A does not connect any neighboring
devices.
Network requirements
Configuration procedure
# Set the link type of GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 to trunk and enable voice VLAN
on them.
[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port link-type trunk
[SwitchA-GigabitEthernet1/0/1] voice vlan 2 enable
[SwitchA-GigabitEthernet1/0/1] quit
[SwitchA] interface gigabitethernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] port link-type trunk
[SwitchA-GigabitEthernet1/0/2] voice vlan 2 enable
[SwitchA-GigabitEthernet1/0/2] quit
5-16
# Enable LLDP (you can skip this step because LLDP is enabled on ports by default), configure LLDP
to operate in TxRx mode, and configure CDP-compatible LLDP to operate in TxRx mode on
GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2.
[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] lldp enable
[SwitchA-GigabitEthernet1/0/1] lldp admin-status txrx
[SwitchA-GigabitEthernet1/0/1] lldp compliance admin-status cdp txrx
[SwitchA-GigabitEthernet1/0/1] quit
[SwitchA] interface gigabitethernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] lldp enable
[SwitchA-GigabitEthernet1/0/2] lldp admin-status txrx
[SwitchA-GigabitEthernet1/0/2] lldp compliance admin-status cdp txrx
[SwitchA-GigabitEthernet1/0/2] quit
As the sample output shows, Switch A has discovered the IP phones connected to GigabitEthernet
1/0/1 and GigabitEthernet 1/0/2, and has obtained their LLDP device information.
5-17
When configuring VLAN, go to these sections for information you are interested in:
z Introduction to VLAN
z Configuring Basic VLAN Settings
z Configuring Basic Settings of a VLAN Interface
z Port-Based VLAN Configuration
z MAC-Based VLAN Configuration
z Protocol-Based VLAN Configuration
z Displaying and Maintaining VLAN
z VLAN Configuration Example
Introduction to VLAN
VLAN Overview
Ethernet is a network technology based on the Carrier Sense Multiple Access/Collision Detect
(CSMA/CD) mechanism. As the medium is shared, collisions and excessive broadcasts cannot be
avoided on an Ethernet. To address the issue, virtual LAN (VLAN) was introduced.
The idea is to break a LAN down into separate VLANs, that is, Layer 2 broadcast domains whereby
frames are switched between ports assigned to the same VLAN. VLANs are isolated from each other
at Layer 2. A VLAN is a bridging domain, and all broadcast traffic is contained within it, as shown in
Figure 6-1.
Figure 6-1 A VLAN diagram
VLAN 2
Switch A Switch B
Router
VLAN 5
A VLAN is logically divided on an organizational basis rather than on a physical basis. For example, all
workstations and servers used by a particular workgroup can be connected to the same LAN,
regardless of their physical locations.
VLAN technology delivers the following benefits:
6-1
VLAN Fundamentals
To enable a network device to identify frames of different VLANs, a VLAN tag field is inserted into the
data link layer encapsulation.
The format of VLAN-tagged frames is defined in IEEE 802.1Q issued by IEEE in 1999.
In the header of a traditional Ethernet data frame, the field after the destination MAC address and the
source MAC address is the Type field indicating the upper layer protocol type, as shown in Figure 6-2.
Figure 6-2 The format of a traditional Ethernet frame
IEEE 802.1Q inserts a four-byte VLAN tag after the DA&SA field, as shown in Figure 6-3.
Figure 6-3 The position and format of VLAN tag
A VLAN tag comprises four fields: tag protocol identifier (TPID), priority, canonical format indicator
(CFI), and VLAN ID.
z The 16-bit TPID field with a value of 0x8100 indicates that the frame is VLAN-tagged.
z The 3-bit priority field indicates the 802.1p priority of the frame. For information about frame
priority, refer to QoS Configuration in the QoS Volume.
z The 1-bit CFI field specifies whether the MAC addresses are encapsulated in the standard format
when packets are transmitted across different media. Value 0 indicates that MAC addresses are
encapsulated in the standard format; value 1 indicates that MAC addresses are encapsulated in a
non-standard format. The filed is 0 by default.
z The 12-bit VLAN ID field identifies the VLAN the frame belongs to. The VLAN ID range is 0 to
4095. As 0 and 4095 are reserved by the protocol, a VLAN ID actually ranges from 1 to 4094.
When receiving a frame, a network device handles the frame depending on whether the frame is VLAN
tagged and the value of the VLAN tag, if any. For more information, refer to section Introduction to
Port-Based VLAN.
6-2
Types of VLAN
6-3
6-4
Port-based VLANs group VLAN members by port. A port forwards traffic for a VLAN only after it is
assigned to the VLAN.
You can configure the link type of a port as access, trunk, or hybrid. The three link types use different
VLAN tag handling methods. When configuring the link type of a port, note that:
z An access port can belong to only one VLAN. Usually, ports directly connected to PCs are
configured as access ports.
z A trunk port can carry multiple VLANs to receive and send traffic for them. Except traffic of the
default VLAN, traffic passes through a trunk port will be VLAN tagged. Usually, ports connecting
network devices are configured as trunk ports to allow members of the same VLAN to
communicate with each other across multiple network devices.
z Like a trunk port, a hybrid port can carry multiple VLANs to receive and send traffic for them.
Unlike a trunk port, a hybrid port allows traffic of all VLANs to pass through VLAN untagged. You
can configure a port connected to a network device or user terminal as a hybrid port for access
link connectivity or trunk connectivity.
Default VLAN
By default, VLAN 1 is the default VLAN for all ports. You can configure the default VLAN for a port as
required.
Use the following guidelines when configuring the default VLAN on a port:
z Because an access port can join only one VLAN, its default VLAN is the VLAN to which it belongs
and cannot be configured.
z Because a trunk or hybrid port can join multiple VLANs, you can configure a default VLAN for the
port.
z You can use a nonexistent VLAN as the default VLAN for a hybrid or trunk port but not for an
access port. Therefore, after you remove the VLAN that an access port resides in with the undo
vlan command, the default VLAN of the port changes to VLAN 1. The removal of the VLAN
specified as the default VLAN of a trunk or hybrid port, however, does not affect the default VLAN
setting on the port.
6-5
You can assign an access port to a VLAN in VLAN view, interface view, or port group view.
1) In VLAN view
Follow these steps to assign one or multiple access ports to a VLAN in VLAN view:
6-6
In VLAN view, you only assign the access ports to the current VLAN.
6-7
A trunk port can carry multiple VLANs. You can assign it to a VLAN in interface view or port group view.
Follow these steps to assign a trunk port to one or multiple VLANs:
Enter Required
interface interface-type
Ethernet Use either command.
interface-number
interface view
z In Ethernet interface view, the
Enter Layer-2 subsequent configurations
interface bridge-aggregation
aggregate apply to the current port.
interface-number
Enter interface view z In port group view, the
interface view subsequent configurations
or port group apply to all ports in the port
view group.
z In Layer-2 aggregate
Enter port port-group manual
interface view, the
group view port-group-name
subsequent configurations
apply to the Layer-2
aggregate interface and all its
member ports.
Configure the link type of the
port link-type trunk Required
port or ports as trunk
Required
Assign the trunk port(s) to the port trunk permit vlan
specified VLAN(s) { vlan-id-list | all } By default, a trunk port carries
only VLAN 1.
Optional
Configure the default VLAN of
port trunk pvid vlan vlan-id VLAN 1 is the default VLAN by
the trunk port(s)
default.
6-8
A hybrid port can carry multiple VLANs. You can assign it to a VLAN in interface view or port group
view.
Follow these steps to assign a hybrid port to one or multiple VLANs:
6-9
MAC-based VLANs group VLAN members by MAC address. They are mostly used in conjunction with
security technologies such as 802.1X to provide secure, flexible network access for terminal devices.
With MAC-based VLAN configured, the device processes received packets as follows:
z When receiving an untagged frame, the device looks up the list of MAC-to-VLAN mappings based
on the source MAC address of the frame for a match. Two matching modes are available: exact
matching and fuzzy matching. In exact matching mode, the device searches the MAC-to-VLAN
mappings whose masks are all-Fs. If the MAC address in a MAC-to-VLAN mapping matches the
source MAC address of the untagged frame exactly, the device ends the search and adds a VLAN
tag containing the corresponding VLAN ID to the packet. In fuzzy matching mode, the device
searches the MAC-to-VLAN mappings whose masks are not all-Fs and performs a logical AND
operation on the keyword and each mask. If the result of an AND operation matches the
corresponding MAC address exactly, the device ends the search the adds a VLAN tag containing
the corresponding VLAN ID to the packet. If no match is found, the system looks up other types of
VLANs to make the forwarding decision.
z When receiving a tagged frame, the receiving port forwards the frame if it is assigned to the
corresponding VLAN or drops the frame if it is not. In this case, port-based VLAN applied.
In addition to creating MAC address-to-VLAN mappings at the CLI, you can use an authentication
server to automatically issue MAC address-to-VLAN mappings.
z Manually Static configuration (through CLI)
You can associate MAC addresses with VLANs by using corresponding commands.
z Automatic configuration through the authentication server (that is, VLAN issuing)
6-10
Required
Enable MAC-based VLAN mac-vlan enable
Disabled by default
Optional
Configure VLAN matching vlan precedence { mac-vlan | By default, VLANs are
precedence ip-subnet-vlan } preferentially matched based
on MAC addresses.
6-11
In this approach, inbound packets are assigned to different VLANs based on their protocol types and
encapsulation formats. The protocols that can be used for VLAN assignment include IP, IPX, and
AppleTalk (AT). The encapsulation formats include Ethernet II, 802.3 raw, 802.2 LLC, and 802.2 SNAP.
A protocol-based VLAN is defined by a protocol template comprised of encapsulation format and
protocol type. A port can be associated with multiple protocol templates. An untagged packet reaching
a port associated with protocol-based VLANs will be processed as follows.
z If the packet matches a protocol template, the packet will be tagged with the VLAN tag
corresponding to the protocol template.
z If the packet matches no protocol template, the packet will be tagged with the default VLAN ID of
the port.
The port processes a tagged packet as it processes tagged packets of a port-based VLAN.
z If the port permits the VLAN ID of the packet to pass through, the port forwards the packet.
z If the port does not permit the VLAN ID of the packet to pass through, the port drops the packet.
This feature is mainly used to assign packets of the specific service type to a specific VLAN.
6-12
z Do not configure both the dsap-id and ssap-id arguments in the protocol-vlan command as 0xe0
or 0xff when configuring the user-defined template for llc encapsulation. Otherwise, the
encapsulation format of the matching packets will be the same as that of the ipx llc or ipx raw
packets respectively.
z When you use the mode keyword to configure a user-defined protocol template, do not set
etype-id in ethernetii etype etype-id to 0x0800, 0x8137, 0x809b, or 0x86dd. Otherwise, the
encapsulation format of the matching packets will be the same as that of the IPv4, IPX, AppleTalk,
and IPv6 packets respectively.
z A protocol-based VLAN on a hybrid port can process only untagged inbound packets, whereas the
voice VLAN in automatic mode on a hybrid port can process only tagged voice traffic. Therefore,
do not configure a VLAN as both a protocol-based VLAN and a voice VLAN. For more information,
refer to Voice VLAN Configuration.
z After you configure a command on a Layer-2 aggregate interface, the system starts applying the
configuration to the aggregate interface and its aggregation member ports. If the system fails to do
that on the aggregate interface, it stops applying the configuration to the aggregation member
ports. If it fails to do that on an aggregation member port, it simply skips the port and moves to the
next port.
6-13
In this approach, packets are assigned to VLANs based on their source IP addresses and subnet
masks. A port configured with IP subnet-based VLANs assigns a received untagged packet to a VLAN
based on the source address of the packet.
This feature is used to assign packets from the specified network segment or IP address to a specific
VLAN.
6-14
After you configure a command on a Layer-2 aggregate interface, the system starts applying the
configuration to the aggregate interface and its aggregation member ports. If the system fails to do that
on the aggregate interface, it stops applying the configuration to the aggregation member ports. If it
fails to do that on an aggregation member port, it simply skips the port and moves to the next port.
display protocol-vlan
Display protocol-based VLAN interface { interface-type
information on specified interface-number [ to Available in any view
interfaces interface-type
interface-number ] | all }
Display IP subnet-based VLAN
display ip-subnet-vlan vlan
information and IP subnet Available in any view
{ vlan-id [ to vlan-id ] | all }
indexes of specified VLANs
Display the IP subnet-based
VLAN information and IP display ip-subnet-vlan
Available in any view
subnet indexes of specified interface { interface-list | all }
ports
6-15
The reset counters interface command can be used to clear statistics on a VLAN interface. For more
information, refer to Ethernet Interface Commands in the Access Volume.
Configuration procedure
1) Configure Device A
# Create VLAN 2, VLAN 6 through VLAN 50, and VLAN 100.
<DeviceA> system-view
[DeviceA] vlan 2
[DeviceA-vlan2] quit
[DeviceA] vlan 100
[DeviceA-vlan100] vlan 6 to 50
Please wait... Done.
# Configure GigabitEthernet 1/0/1 as a trunk port and configure its default VLAN ID as 100.
[DeviceA-GigabitEthernet1/0/1] port link-type trunk
[DeviceA-GigabitEthernet1/0/1] port trunk pvid vlan 100
# Configure GigabitEthernet 1/0/1 to deny the packets of VLAN 1 (by default, the packets of VLAN 1
are permitted to pass through on all the ports).
[DeviceA-GigabitEthernet1/0/1] undo port trunk permit vlan 1
6-16
Verification
Verifying the configuration on Device A is similar to that of Device B. So only Device A is taken for
example here.
# Display the information about GigabitEthernet 1/0/1 of Device A to verify the above configurations.
<DeviceA> display interface gigabitethernet 1/0/1
GigabitEthernet1/0/1 current state: UP
IP Packet Frame Type: PKTFMT_ETHNT_2, Hardware Address: 001e-c16f-ae68
Description: GigabitEthernet1/0/1 Interface
Loopback is not set
Media type is twisted pair
Port hardware type is 1000_BASE_T
Unknown-speed mode, unknown-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
Flow-control is not enabled
The Maximum Frame Length is 9216
Broadcast MAX-ratio: 100%
Unicast MAX-ratio: 100%
Multicast MAX-ratio: 100%
Allow jumbo frame to pass
PVID: 100
Mdi type: auto
Link delay is 0(sec)
Port link-type: trunk
VLAN passing : 2, 6-50, 100
VLAN permitted: 2, 6-50, 100
Trunk port encapsulation: IEEE 802.1q
Port priority: 0
Peak value of input: 0 bytes/sec, at 2000-04-26 12:01:40
Peak value of output: 0 bytes/sec, at 2000-04-26 12:01:40
Last 300 seconds input: 0 packets/sec 0 bytes/sec -%
Last 300 seconds output: 0 packets/sec 0 bytes/sec -%
Input (total): 0 packets, 0 bytes
0 unicasts, 0 broadcasts, 0 multicasts
Input (normal): 0 packets, - bytes
0 unicasts, 0 broadcasts, 0 multicasts
Input: 0 input errors, 0 runts, 0 giants, 0 throttles
0 CRC, 0 frame, - overruns, 0 aborts
- ignored, - parity errors
Output (total): 0 packets, 0 bytes
6-17
6-18
When configuring an isolate-user VLAN, go to these sections for information you are interested in:
z Overview
z Configuring Isolate-User-VLAN
z Displaying and Maintaining Isolate-User-VLAN
z Isolate-User-VLAN Configuration Example
Overview
An isolate-user-VLAN adopts a two-tier VLAN structure. In this approach, two types of VLANs,
isolate-user-VLAN and secondary VLAN, are configured on the same device.
The following are the characteristics of the isolate-user-VLAN implementation:
z Isolate-user-VLANs are mainly used for upstream data exchange. An isolate-user-VLAN can be
associated with multiple secondary VLANs. As the upstream device is aware of only the
isolate-user-VLAN but not the secondary VLANs, network configuration is simplified and VLAN
resources are saved.
z You can isolate the Layer 2 traffic of different users by assigning the ports connected to them to
different secondary VLANs. To enable communication between secondary VLANs associated with
the same isolate-user-VLAN, you can enable local proxy ARP on the upstream device to realize
Layer 3 communication between the secondary VLANs.
As illustrated in the following figure, the isolate-user-VLAN function is enabled on Switch B. VLAN 10 is
the isolate-user-VLAN, and VLAN 2, VLAN 5, and VLAN 8 are secondary VLANs associated with
VLAN 10 and are invisible to Switch A.
Figure 7-1 An isolate-user-VLAN example
Configuring Isolate-User-VLAN
Configure the isolate-user-VLAN through the following steps:
1) Configure the isolate-user-VLAN;
2) Configure the secondary VLANs;
7-1
Assign ports to
each secondary Refer to Assigning an Access Port to a
VLAN and Access port
VLAN
ensure that at
least one port in Required to choose
a secondary either
VLAN takes the
secondary VLAN Refer to Assigning a Hybrid Port to a
Hybrid port
VLAN
as its default
VLAN
Return to system view quit
After associating an isolate-user-VLAN with the specified secondary VLANs, you cannot add/remove a
access port to/from each involved VLAN or remove each involved VLAN. To do that, you must cancel
the association first.
7-2
Configuration procedure
The following part provides only the configuration on Device B and Device C.
1) Configure Device B
# Configure the isolate-user-VLAN.
<DeviceB> system-view
[DeviceB] vlan 5
[DeviceB-vlan5] isolate-user-vlan enable
[DeviceB-vlan5] port gigabitethernet 1/0/5
[DeviceB-vlan5] quit
7-3
Verification
VLAN ID: 5
VLAN Type: static
Isolate-user-VLAN type : isolate-user-VLAN
Route Interface: not configured
Description: VLAN 0005
Name: VLAN 0005
Tagged Ports: none
Untagged Ports:
gigabitethernet 1/0/1 gigabitethernet 1/0/2 gigabitethernet 1/0/5
VLAN ID: 2
VLAN Type: static
Isolate-user-VLAN type : secondary
Route Interface: not configured
Description: VLAN 0002
Name: VLAN 0002
Tagged Ports: none
Untagged Ports:
7-4
VLAN ID: 3
VLAN Type: static
Isolate-user-VLAN type : secondary
Route Interface: not configured
Description: VLAN 0003
Name: VLAN 0003
Tagged Ports: none
Untagged Ports:
gigabitethernet 1/0/1 gigabitethernet 1/0/5
7-5
When configuring a voice VLAN, go to these sections for information you are interested in:
z Overview
z Configuring a Voice VLAN
z Displaying and Maintaining Voice VLAN
z Voice VLAN Configuration
Overview
A voice VLAN is configured specially for voice traffic. After assigning the ports connecting to voice
devices to a voice VLAN, you can configure quality of service (QoS) parameters for the voice traffic,
thus improving transmission priority and ensuring voice quality.
OUI Addresses
A device determines whether a received packet is a voice packet by checking its source MAC address.
A packet whose source MAC address complies with the voice device Organizationally Unique Identifier
(OUI) address is regarded as voice traffic.
You can configure the OUI addresses in advance or use the default OUI addresses. Table 8-1 lists the
default OUI address for each vendors devices.
8-1
A port can be assigned to a voice VLAN in one of the following two modes:
z In automatic mode, the system matches the source MAC addresses in the untagged packets sent
when the IP phone is powered on against the OUI addresses. If a match is found, the system
automatically assigns the port to the voice VLAN, issues ACL rules and configures the packet
precedence. You can configure voice VLAN aging time on the device. The system will remove a
port from the voice VLAN if no packet is received from the port after the aging time expires.
Assigning/removing ports to/from a voice VLAN are automatically performed by the system.
z In manual mode, you should assign an IP phone connecting port to a voice VLAN manually. Then,
the system matches the source MAC addresses in the packets against the OUI addresses. If a
match is found, the system issues ACL rules and configures the packet precedence. In this mode,
assigning/removing ports to/from a voice VLAN are performed manually.
z Both modes forward tagged packets according to their tags.
The following table lists the co-relation between the port voice VLAN mode, the voice traffic type of an
IP phone, and the port link type.
8-2
If an IP phone sends tagged voice traffic and its connecting port is configured with 802.1X
authentication and Guest VLAN, you should assign different VLAN IDs for the voice VLAN, the default
VLAN of the connecting port, and the 802.1X Guest VLAN.
z The default VLANs for all ports are VLAN 1. You can configure the default VLAN of a port and
configure a port to permit a certain VLAN to pass through with commands. For more information,
refer to Port-Based VLAN Configuration.
z Use the display interface command to display the default VLAN of a port and the VLANs
permitted to pass through the port.
Voice VLAN-enabled ports can operate in security mode or normal mode based on their inbound
packet filtering mechanisms.
In a safe network, you can configure the voice VLANs to operate in normal mode, thus reducing the
consumption of system resources due to source MAC addresses checking. It is recommended not to
transmit both voice packets and non-voice packets in a voice VLAN. If you have to, please ensure that
the voice VLAN security mode is disabled.
8-3
Voice VLAN
Packet type Packet processing mode
working mode
Untagged packets If the source MAC address of a packet matches an OUI
Packets carrying the address configured for the device, it is forwarded in the
Security mode voice VLAN tag voice VLAN; otherwise, it is dropped.
Untagged packets The port does not check the source MAC addresses of
inbound packets. All types of packets can be
Packets carrying the transmitted in the voice VLAN.
Normal mode voice VLAN tag
Before configuring a VLAN as a voice VLAN, create the VLAN first. Note that you cannot configure
VLAN 1 (the system-default VLAN) as a voice VLAN.
Follow these steps to set a port to operate in automatic voice VLAN assignment mode:
8-4
Follow these steps to set a port to operate in manual voice VLAN assignment mode:
8-5
Network requirements
8-6
Device A Device B
Internet
GE1/0/1
GE1/0/2 GE1/0/1
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
Configuration procedure
# Since GigabitEthernet 1/0/1 may receive both voice traffic and data traffic at the same time, to ensure
the quality of voice packets and effective bandwidth use, configure voice VLANs to work in security
mode, that is, configure the voice VLANs to transmit only voice packets. (Optional. By default, voice
VLANs work in security mode.)
[DeviceA] voice vlan security enable
# Configure GigabitEthernet 1/0/1 to operate in automatic voice VLAN assignment mode. (Optional. By
default, a port operates in automatic voice VLAN assignment mode.)
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] voice vlan mode auto
8-7
Verification
# Display the OUI addresses, OUI address masks, and description strings supported currently.
<DeviceA> display voice vlan oui
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
0011-1100-0000 ffff-ff00-0000 IP phone A
0011-2200-0000 ffff-ff00-0000 IP phone B
00d0-1e00-0000 ffff-ff00-0000 Pingtel phone
0060-b900-0000 ffff-ff00-0000 Philips/NEC phone
00e0-7500-0000 ffff-ff00-0000 Polycom phone
00e0-bb00-0000 ffff-ff00-0000 3com phone
Network requirements
z Create VLAN 2 and configure it as a voice VLAN permitting only voice traffic to pass through.
z The IP phones send untagged voice traffic. Configure GigabitEthernet 1/0/1 as a hybrid port.
z Configure GigabitEthernet 1/0/1 to operate in manual voice VLAN assignment mode. Configure
GigabitEthernet 1/0/1 to allow voice traffic with an OUI address of 0011-2200-0000, a mask of
ffff-ff00-0000, and a description string test to be forwarded through the voice VLAN.
8-8
Configuration procedure
# Configure the voice VLAN to operate in security mode. (Optional. A voice VLAN operates in security
mode by default.)
<DeviceA> system-view
[DeviceA] voice vlan security enable
# Configure the voice VLAN (VLAN 2) as the default VLAN of GigabitEthernet 1/0/1 and configure
GigabitEthernet 1/0/1 to permit the voice traffic of VLAN 2 to pass through untagged.
[DeviceA-GigabitEthernet1/0/1] port hybrid pvid vlan 2
[DeviceA-GigabitEthernet1/0/1] port hybrid vlan 2 untagged
Verification
# Display the OUI addresses, OUI address masks, and description strings supported currently.
<DeviceA> display voice vlan oui
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
8-9
8-10
The GARP VLAN Registration Protocol (GVRP) is a GARP application. It functions based on the
operating mechanism of GARP to maintain and propagate dynamic VLAN registration information for
the GVRP devices on the network.
When configuring GVRP, go to these sections for information you are interested in:
z Introduction to GVRP
z GVRP Configuration Task List
z Configuring GVRP Functions
z Configuring GARP Timers
z Displaying and Maintaining GVRP
z GVRP Configuration Examples
Introduction to GVRP
GARP
The Generic Attribute Registration Protocol (GARP) provides a mechanism that allows participants in a
GARP application to distribute, propagate, and register with other participants in a LAN the attributes
specific to the GARP application, such as the VLAN or multicast address attribute.
GARP itself does not exist on a device as an entity. GARP-compliant participants are known as GARP
applications. One example is GVRP. When a GARP participant is present on a port on your device, the
port is regarded as a GARP participant.
1) GARP messages
A GARP application entity exchanges information with other GARP application entities by:
z Sending Join messages to register with other entities its attributes, the attributes received from
other GARP application entities, and the attributes manually configured on it.
z Sending Leave messages to have its attributes deregistered on other devices. A GARP participant
also sends Leave messages when it receives Leave messages from other GARP participants or
when attributes are manually deregistered on it.
z Sending LeaveAll messages to deregister all the attributes so that all GARP participants can
re-register all attributes with each other. A LeaveAll message is sent upon expiration of a LeaveAll
timer, which starts upon the startup of a GARP application entity.
Join messages, Leave messages, and LeaveAll message make sure the reregistration and
deregistration of GARP attributes are performed in an orderly way.
Through message exchange, all attribute information that needs registration propagates to all GARP
participants on the LAN.
2) GARP timers
GARP uses the following four timers to set the interval for sending GARP messages:
9-1
z The settings of GARP timers apply to all GARP applications, such as GVRP, on a LAN.
z On a GARP-enabled network, a device may send LeaveAll messages at the interval set by its
LeaveAll timer or the LeaveAll timer on another device on the network, whichever is smaller. This
is because each time a device on the network receives a LeaveAll message it resets its LeaveAll
timer.
The GARP mechanism allows the configuration of a GARP application entity to propagate throughout
a LAN quickly. In GARP, a GARP application entity registers or deregisters its attributes with other
entities by making or withdrawing declarations of attributes and at the same time, based on received
declarations or withdrawals, handles attributes of other entities. When a port receives an attribute
declaration, it registers the attribute; when a port receives an attribute withdrawal, it deregisters the
attribute.
GARP application entities send protocol data units (PDUs) with a particular multicast MAC address as
destination. Based on this address, a device can identify to which GVRP application (GVRP for
example) a GARP PDU will be delivered.
9-2
Figure 9-1 illustrates the GARP message format. Table 9-1 describes the GARP message fields.
9-3
GVRP enables a device to propagate local VLAN registration information to other participant devices
and dynamically update the VLAN registration information from other devices to its local database
about active VLAN members and through which port they can be reached. It thus ensures that all
GVRP participants on a bridged LAN maintain the same VLAN registration information. The VLAN
registration information propagated by GVRP includes both manually configured local static entries
and dynamic entries from other devices.
GVRP provides the following three registration types on a port:
z Normal Enables the port to dynamically register and deregister VLANs, and to propagate both
dynamic and static VLAN information.
z Fixed Disables the port to dynamically register and deregister VLANs or propagate information
about dynamic VLANs, but allows the port to propagate information about static VLANs. A trunk
port with fixed registration type thus allows only manually configured VLANs to pass through even
though it is configured to carry all VLANs.
z Forbidden Disables the port to dynamically register and deregister VLANs and to propagate
VLAN information except information about VLAN 1. A trunk port with forbidden registration type
thus allows only VLAN 1 to pass through even though it is configured to carry all VLANs.
Task Remarks
Configuring GVRP Functions Required
Configuring GARP Timers Optional
z GVRP configuration made in Ethernet interface view or Layer-2 aggregate interface view takes
effect on the current interface only; .GVRP configuration made in port group view takes effect on
all the member ports in the group.
z GVRP configuration made on a member port in an aggregation group takes effect only after the
port is removed from the aggregation group.
9-4
Required
Enable GVRP globally gvrp Globally disabled by
default.
Enter Ethernet Enter Ethernet
interface view, interface view or Layer interface interface-type
Layer 2 2 aggregate interface interface-number Required
aggregate view Perform either of the
interface view, commands.
or port-group Enter port-group view
port-group manual
view port-group-name
Required
Enable GVRP on the port or port group gvrp
Disabled by default.
9-5
Optional
Configure the Hold timer garp timer hold timer-value
10 centiseconds by default.
Optional
Configure the Join timer garp timer join timer-value
20 centiseconds by default.
Optional
Configure the Leave timer garp timer leave timer-value
60 centiseconds by default.
As shown in Table 9-2, the values of GARP timers are dependent on each other:
z If you want to set a value beyond the value range for a timer, you may change the value range by
tuning the value of another related timer.
z If you want to restore the default settings of the timers, restore the Hold timer first, and then the
Join, Leave, and LeaveAll timers.
9-6
Network requirements
Configure GVRP for dynamic VLAN information registration and update among devices, adopting the
normal registration mode on ports.
Figure 9-2 Network diagram for GVRP configuration
Configuration procedure
1) Configure Device A
# Enable GVRP globally.
<DeviceA> system-view
[DeviceA] gvrp
# Configure port GigabitEthernet 1/0/1 as a trunk port, allowing all VLANs to pass through.
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] port link-type trunk
[DeviceA-GigabitEthernet1/0/1] port trunk permit vlan all
9-7
# Configure port GigabitEthernet 1/0/1 as a trunk port, allowing all VLANs to pass through.
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] port link-type trunk
[DeviceB-GigabitEthernet1/0/1] port trunk permit vlan all
Network requirements
Configure GVRP for dynamic VLAN information registration and update among devices. Specify fixed
GVRP registration on Device A and normal GVRP registration on Device B.
Figure 9-3 Network diagram for GVRP configuration
Configuration procedure
1) Configure Device A
# Enable GVRP globally.
<DeviceA> system-view
[DeviceA] gvrp
# Configure port GigabitEthernet 1/0/1 as a trunk port, allowing all VLANs to pass through.
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] port link-type trunk
[DeviceA-GigabitEthernet1/0/1] port trunk permit vlan all
# Enable GVRP on GigabitEthernet 1/0/1 and set the GVRP registration type to fixed on the port.
[DeviceA-GigabitEthernet1/0/1] gvrp
[DeviceA-GigabitEthernet1/0/1] gvrp registration fixed
9-8
# Configure port GigabitEthernet 1/0/1 as a trunk port, allowing all VLANs to pass through.
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] port link-type trunk
[DeviceB-GigabitEthernet1/0/1] port trunk permit vlan all
Network requirements
To prevent dynamic VLAN information registration and update among devices, set the GVRP
registration mode to forbidden on Device A and normal on Device B.
Figure 9-4 Network diagram for GVRP configuration
Configuration procedure
1) Configure Device A
# Enable GVRP globally.
<DeviceA> system-view
[DeviceA] gvrp
# Configure port GigabitEthernet 1/0/1 as a trunk port, allowing all VLANs to pass through.
9-9
# Enable GVRP on GigabitEthernet 1/0/1 and set the GVRP registration type to forbidden on the port.
[DeviceA-GigabitEthernet1/0/1] gvrp
[DeviceA-GigabitEthernet1/0/1] gvrp registration forbidden
[DeviceA-GigabitEthernet1/0/1] quit
# Configure port GigabitEthernet 1/0/1 as a trunk port, allowing all VLANs to pass through.
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] port link-type trunk
[DeviceB-GigabitEthernet1/0/1] port trunk permit vlan all
9-10
When configuring QinQ, go to these sections for information you are interested in:
z Introduction to QinQ
z QinQ Configuration Task List
z Configuring Basic QinQ
z Configuring Selective QinQ
z Configuring the TPID Value in VLAN Tags
z QinQ Configuration Examples
Throughout this document, customer network VLANs (CVLANs), also called inner VLANs, refer to the
VLANs that a customer uses on the private network; and service provider network VLANs (SVLANs),
also called outer VLANs, refer to the VLANs that a service provider uses to carry VLAN tagged traffic
for customers.
Introduction to QinQ
Background
In the VLAN tag field defined in IEEE 802.1Q, only 12 bits are used for VLAN IDs, so a device can
support a maximum of 4094 VLANs. In actual applications, however, a large number of VLANs are
required to isolate users, especially in metropolitan area networks (MANs), and 4094 VLANs are far
from satisfying such requirements.
The QinQ feature is a flexible, easy-to-implement Layer 2 VPN technique. It enables the edge device
on the service provider network to encapsulate an outer VLAN tag in Ethernet frames from customer
networks (private networks), so that the Ethernet frames will travel across the service provider network
(public network) with double VLAN tags. QinQ enables a service provider to use a single SVLAN to
serve customers who have multiple CVLANs.
The devices in the public network forward a frame only according to its outer VLAN tag and learn its
source MAC address into the MAC address table of the outer VLAN. The inner VLAN tag of the frame
is transmitted as the payload.
10-1
Customer network A
VLAN 1~10
Customer network A
VLAN 1~10
VLAN 3 VLAN 3
Network
VLAN 4 VLAN 4
As shown in Figure 10-1, customer network A has CVLANs 1 through 10, while customer network B
has CVLANs 1 through 20. The SVLAN allocated by the service provider for customer network A is
SVLAN 3, and that for customer network B is SVLAN 4. When a tagged Ethernet frame of customer
network A enters the service provider network, it is tagged with outer VLAN 3; when a tagged Ethernet
frame of customer network B enters the service provider network, it is tagged with outer VLAN 4. In this
way, there is no overlap of VLAN IDs among customers, and traffic from different customers does not
become mixed.
By tagging tagged frames, QinQ expands the available VLAN space from 4094 to 4094 4094 and
thus satisfies the requirement for VLAN space in MAN. It mainly addresses the following issues:
z Releases the stress on the SVLAN resource.
z Enables customers to plan their CVLANs without conflicting with SVLANs.
z Provides an easy-to-implement Layer 2 VPN solution for small-sized MANs or intranets.
A QinQ frame is transmitted double-tagged over the service provider network. The inner VLAN tag is
the CVLAN tag while the outer one is the SVLAN tag that the service provider has allocated to the
customer. Figure 10-2 shows the structure of single-tagged and double-tagged Ethernet frames.
10-2
The default maximum transmission unit (MTU) of an interface is 1500 bytes. The size of an outer
VLAN tag is 4 bytes. Therefore, you are recommended to increase the MTU of each interface on the
service provider network. The recommended minimum MTU is 1504 bytes.
Implementations of QinQ
There are two types of QinQ implementations: basic QinQ and selective QinQ.
1) Basic QinQ
Basic QinQ is a port-based feature. When a frame arrives at a basic QinQ-enabled port, the port tags it
with the ports default VLAN tag, regardless of whether the frame is tagged or untagged. If the received
frame is already tagged, it becomes a double-tagged frame; if it is untagged, it becomes a frame
tagged with the ports default VLAN tag.
2) Selective QinQ
Selective QinQ is a more flexible, VLAN-based implementation of QinQ. In addition to all the functions
of basic QinQ, selective QinQ can tag frames with different outer VLAN tags based on different inner
VLAN IDs.
A VLAN tag uses the tag protocol identifier (TPID) field to identify the protocol type of the tag. The
value of this field, as defined in IEEE 802.1Q, is 0x8100.
0 shows the 802.1Q-defined tag structure of an Ethernet frame.
10-3
The device determines whether a received frame carries a SVLAN tag or a CVLAN tag by checking the
corresponding TPID value. Upon receiving a frame, the device compares the configured TPID value
with the value of the TPID field in the frame. If the two match, the devices considers that the frame
carries the VLAN tag. For example, if a frame carries a VLAN tag with the TPID value 0x9100 while the
configured TPID value of the VLAN tag is 0x8100, the device considers that the frame carries no VLAN
tag.
In addition, the systems of different vendors may set the TPID of the outer VLAN tag of QinQ frames to
different values. For compatibility with these systems, you can modify the TPID value so that the QinQ
frames, when sent to the public network, carry the TPID value identical to the value of a particular
vendor to allow interoperability with the devices of that vendor.
The TPID in an Ethernet frame has the same position with the protocol type field in a frame without a
VLAN tag. To avoid problems in packet forwarding and handling in the network, you cannot set the
TPID value to any of the values in the table below.
IP 0x0800
IPv6 0x86DD
PPPoE 0x8863/0x8864
MPLS 0x8847/0x8848
IPX/SPX 0x8137
IS-IS 0x8000
LACP 0x8809
802.1x 0x888E
Cluster 0x88A7
Reserved 0xFFFD/0xFFFE/0xFFFF
10-4
z QinQ requires configurations only on the service provider network, not on the customer network.
z QinQ configurations made in Ethernet interface view take effect on the current interface only;
those made in Layer-2 aggregate interface view take effect on the current aggregate interface and
all the member ports in the aggregation group; those made in port group view take effect on all
member ports in the current port group.
z Basic and selective QinQ should both be configured on the ports connecting customer networks.
z Do not configure QinQ on a reflector port. For information about reflector ports, refer to Port
Mirroring Configuration in the Access Volume.
Enter Ethernet or
Enter interface interface-type
Layer-2 aggregate
interface interface-number Required
interface view
view or port Use either command.
group view Enter port group view
port-group manual
port-group-name
Required
Enable QinQ on the port(s) qinq enable
Disabled by default.
10-5
Switch 4510G series switches support the configuration of basic QinQ and selective QinQ at the same
time on a port and when the two features are both enabled on the port, frames that meet the selective
QinQ condition are handled with selective QinQ on this port first, and the left frames are handled with
basic QinQ.
Follow these steps to configure an outer VLAN tagging policy:
Enter
Ethernet or
interface interface-type
Enter interface Layer-2
interface-number Required
view or port aggregate
group view interface view Use either command
Enter port port-group manual
group view port-group-name
Required
Enter QinQ view and configure
the SVLAN tag for the port to qinq vid vlan-id By default, the SVLAN tag to
add be added is the default VLAN
tag of the receiving port.
Tag frames of the specified raw-vlan-id inbound { all |
Required
CVLANs with the current SVLAN vlan-list }
The Switch 4510G series switches support configuring selective QinQ through QoS policies. To
implement adding outer VLAN tags according to inner VLAN tags, you can configure a class to match
packets with the specified inner VLAN tags, configure an outer VLAN tagging behavior, associate the
class with the behavior in a QoS policy, and then apply the QoS policy to the port connecting to users.
Follow these steps to configure an outer VLAN tagging policy though QoS policies:
10-6
Enter
Ethernet
Enter the port view
interface interface-type
Ethernet port or Layer 2
interface-number
view of the aggregate Enter the Ethernet port view of
customer interface the customer network-side port
network-side view
port Enter port
port-group { manual
group
port-group-name }
view
Enable basic QinQ qing enable Required
z For detailed information about QoS policies, refer to the part talking about QoS in the QoS
Volume.
z By configuring different match criteria, you can add outer VLAN tags to packets more flexibly. For
example, you can add an outer VLAN tag to packets with the specified source IP/source MAC,
add different outer VLAN tags to packets of different protocols (matched through ACL), or add
different outer VLAN tags to packets with different priorities.
10-7
Network requirements
Configuration procedure
10-8
1) Configuration on Provider A
z Configure GigabitEthernet 1/0/1
# Configure VLAN 10 as the default VLAN of GigabitEthernet 1/0/1.
<ProviderA> system-view
[ProviderA] interface gigabitethernet 1/0/1
[ProviderA-GigabitEthernet1/0/1] port access vlan 10
10-9
Network requirements
10-10
Configuration procedure
Make sure that the devices in the service provider network have been configured to allow QinQ
packets to pass through.
1) Configuration on Provider A
z Configure GigabitEthernet 1/0/1
# Configure GigabitEthernet 1/0/1 as a hybrid port to permit frames of VLAN 1000 and VLAN 2000 to
pass through, and configure GigabitEthernet 1/0/1 to send packets of these VLANs with tags removed.
<ProviderA> system-view
[ProviderA] interface gigabitethernet 1/0/1
[ProviderA-GigabitEthernet1/0/1] port link-type hybrid
[ProviderA-GigabitEthernet1/0/1] port hybrid vlan 1000 2000 untagged
10-11
10-12
Configuration procedure
Make sure that the devices in the service provider network have been configured to allow QinQ
packets to pass through.
1) Configuration on Provider A
# Enter system view.
10-13
# Configure VLAN 3000 as the default VLAN of GigabitEthernet 1/0/1, and enable basic QinQ on
GigabitEthernet 1/0/1. As a result, the frames received on the port are tagged with the outer VLAN tag
3000.
[ProviderA-GigabitEthernet1/0/1] port hybrid pvid vlan 3000
[ProviderA-GigabitEthernet1/0/1] qinq enable
[ProviderA-GigabitEthernet1/0/1] quit
# Create a traffic behavior P1000 and configure the action of tagging frames with the outer VLAN tag
1000 for the traffic behavior.
[ProviderA] traffic behavior P1000
[ProviderA-behavior-P1000] nest top-most vlan-id 1000
[ProviderA-behavior-P1000] quit
# Create a traffic behavior P2000 and configure the action of tagging frames with the outer VLAN tag
2000 for the traffic behavior.
[ProviderA] traffic behavior P2000
[ProviderA-behavior-P2000] nest top-most vlan-id 2000
[ProviderA-behavior-P2000] quit
# Create a QoS policy qinq. Associate the class A10 with the traffic behavior P1000, and associate the
class A20 with the traffic behavior P2000 in the QoS policy qinq.
[ProviderA] qos policy qinq
[ProviderA-qospolicy-qinq] classifier A10 behavior P1000
[ProviderA-qospolicy-qinq] classifier A20 behavior P2000
[ProviderA-qospolicy-qinq] quit
# Apply the QoS policy qinq in the inbound direction of GigabitEthernet 1/0/1.
[ProviderA] interface GigabitEthernet 1/0/1
[ProviderA-GigabitEthernet1/0/1] qos apply policy qinq inbound
z Configuration on GigabitEthernet 1/0/2
# Configure VLAN 1000 as the default VLAN.
[ProviderA] interface gigabitethernet 1/0/2
10-14
# Enable basic QinQ. Tag frames from VLAN 10 with the outer VLAN tag 1000.
[ProviderA-GigabitEthernet1/0/2] qinq enable
[ProviderA-GigabitEthernet1/0/2] quit
z Configuration on GigabitEthernet 1/0/3.
# Configure the port as a trunk port permitting frames of VLAN 1000, VLAN 2000 and VLAN 3000 to
pass through.
[ProviderA] interface gigabitethernet 1/0/3
[ProviderA-GigabitEthernet1/0/3] port link-type trunk
[ProviderA-GigabitEthernet1/0/3] port trunk permit vlan 1000 2000 3000
# To enable interoperability with the third-party devices in the public network, set the TPID of the
service provider network VLAN tags to 0x8200. Therefore, the port tags the frames with the outer
VLAN tag whose TPID is 0x8200.
[ProviderA-GigabitEthernet1/0/3] quit
[ProviderA] qinq ethernet-type 8200
2) Configuration on Provider B
z Configuration on GigabitEthernet 1/0/1
# Configure the port as a trunk port permitting frames of VLAN 1000, VLAN 2000 and VLAN 3000 to
pass through.
<ProviderB> system-view
[ProviderB] interface gigabitethernet 1/0/1
[ProviderB-GigabitEthernet1/0/1] port link-type trunk
[ProviderB-GigabitEthernet1/0/1] port trunk permit vlan 1000 2000 3000
# To enable interoperability with the third-party devices in the public network, set the TPID of the
service provider network VLAN tags to 0x8200. Therefore, the port tags the received frames with the
outer VLAN tag whose TPID is 0x8200.
[ProviderB-GigabitEthernet1/0/1] quit
[ProviderB] qinq ethernet-type 8200
z Configuration on GigabitEthernet 1/0/2
# Configure VLAN 2000 as the default VLAN.
[ProviderB] interface GigabitEthernet 1/0/2
[ProviderB-GigabitEthernet1/0/2] port access vlan 2000
# Enable basic QinQ. Tag frames from VLAN 20 with the outer VLAN tag 2000.
[ProviderB-GigabitEthernet1/0/2] qinq enable
[ProviderB-GigabitEthernet1/0/2] quit
z Configuration on GigabitEthernet 1/0/3
# Configure VLAN 3000 as the default VLAN.
[ProviderB] interface GigabitEthernet 1/0/3
[ProviderB-GigabitEthernet1/0/3] port access vlan 3000
# Enable basic QinQ to tag frames of all customer VLANs with the outer VLAN tag 3000.
[ProviderB-GigabitEthernet1/0/3] qinq enable
3) Configuration on devices on the public network
10-15
10-16
When configuring BPDU tunneling, go to these sections for information you are interested in:
z Introduction to BPDU Tunneling
z Configuring BPDU Tunneling
z BPDU Tunneling Configuration Examples
Background
Customers usually use dedicated lines in a service provider network to build their own Layer 2
networks. As a result, very often, a customer network is broken down into parts located at different
sides of the service provider network. As shown in Figure 11-1, User A has two devices: CE 1 and CE 2,
both of which belong to VLAN 100. User As network is divided into network 1 and network 2, which are
connected by the service provider network. When Layer 2 protocol packets cannot be transparently
transmitted in the service provider network, User As network cannot implement independent Layer 2
protocol calculation (for example, STP spanning tree calculation). In this case, the Layer 2 protocol
calculation in User As network is mixed with that in the service provider network.
Figure 11-1 BPDU tunneling application scenario
PE 1 PE 2
ISP network
CE 1 CE 2
With BPDU tunneling, Layer 2 protocol packets from customer networks can be transparently
transmitted in the service provider network:
2) After receiving a Layer 2 protocol packet from User A network 1, PE 1 in the service provider
network encapsulates the packet, replaces its destination MAC address with a specific multicast
MAC address, and then forwards the packet in the service provider network;
3) The encapsulated Layer 2 protocol packet (called bridge protocol data unit, BPDU) is forwarded to
PE 2 at the other end of the service provider network, which decapsulates the packet, restores the
original destination MAC address of the packet, and then sends the packet to User A network 2.
11-1
The BPDU tunneling implementations for different protocols are all similar. This section describes how
BPDU tunneling is implemented by taking the Spanning Tree Protocol (STP) as an example.
z The term STP in this document is in a broad sense. It includes STP, RSTP, and MSTP.
z STP calculates the topology of a network by transmitting BPDUs among devices in the network.
For details, refer to MSTP Configuration in the Access Volume.
To avoid loops in your network, you can enable STP on your devices. When the topology changes at
one side of the customer network, the devices at this side of the customer network send BPDUs to
devices on the other side of the customer network to ensure consistent spanning tree calculation in the
whole customer network. However, because BPDUs are Layer 2 packets, all STP-enabled devices,
both in the customer network and in the service provider network, can receive and process these
BPDUs. In this case, neither the service provider network nor the customer network can correctly
calculate its independent spanning tree.
To allow each network to calculate an independent spanning tree with STP, BPDU tunneling was
introduced.
BPDU tunneling delivers the following benefits:
z BPDUs can be transparently transmitted. BPDUs of the same customer network can be broadcast
in a specific VLAN across the service provider network, so that the geographically dispersed
11-2
PE 1 ISP network PE 2
BPDU tunnel
CE 1 CE 2
As shown in Figure 11-2, the upper part is the service provider network (ISP network), and the lower
part represents two different parts of a customer network: User A network 1 and User A network 2.
Enabling the BPDU tunneling function on the edge devices (PE 1 and PE 2) in the service provider
network allows BPDUs of the customer network to be transparently transmitted in the service provider
network, thus ensuring consistent spanning tree calculation of User A network, without affecting the
spanning tree calculation of the service provider network.
Assume a BPDU is sent from User A network 1 to User A network 2:
z At the ingress of the service provider network, PE 1 changes the destination MAC address of the
BPDU from 0x0180-C200-0000 to a special multicast MAC address, 0x010F-E200-0003 (the
default multicast MAC address) for example. In the service provider network, the modified BPDU
is forwarded as a data packet in the VLAN assigned to User A.
z At the egress of the service provider network, PE 2 recognizes the BPDU with the destination
MAC address 0x010F-E200-0003, restores its original destination MAC address
0x0180-C200-0000, and then sends the BPDU to User A network 2.
Make sure, through configuration, that the VLAN tags carried in BPDUs are neither changed nor
removed during the transparent transmission in the service provider network; otherwise, the devices in
the service provider network will fail to transparently transmit the customer network BPDUs correctly.
z Before configuring BPDU tunneling for a protocol, enable the protocol in the customer network
first.
11-3
You can enable BPDU tunneling for different protocols in different views.
z Settings made in Ethernet interface view or Layer 2 aggregate interface view take effect only on
the current port; settings made in port group view take effect on all ports in the port group.
z Before enabling BPDU tunneling for DLDP, EOAM, GVRP, HGMP, LLDP, or STP on a port,
disable the protocol on the port first. Because PVST is a special STP protocol, before enabling
BPDU tunneling for PVST on a port, you need to disable STP and then enable BPDU tunneling for
STP on the port first.
z Before enabling BPDU tunneling for LACP on a dynamic aggregation group member port, remove
the port from the dynamic aggregation group first.
Enabling BPDU tunneling for a protocol in Ethernet interface view or port group view
Follow these steps to enable BPDU tunneling for a protocol in Ethernet interface view or port group
view:
Follow these steps to enable BPDU tunneling for a protocol in Layer 2 aggregate interface view:
11-4
By default, the destination multicast MAC address for BPDUs is 0x010F-E200-0003. You can change it
to 0x0100-0CCD-CDD0, 0x0100-0CCD-CDD1 or 0x0100-0CCD-CDD2 through the following
configuration.
Follow these steps to configure destination multicast MAC address for BPDUs:
For BPDUs to be recognized, the destination multicast MAC addresses configured for BPDU tunneling
must be the same on the edge devices on the service provider network.
Network requirements
11-5
Configuration procedure
1) Configuration on PE 1
# Configure the destination multicast MAC address for BPDUs as 0x0100-0CCD-CDD0.
<PE1> system-view
[PE1] bpdu-tunnel tunnel-dmac 0100-0ccd-cdd0
# Disable STP on GigabitEthernet 1/0/1, and then enable BPDU tunneling for STP on it.
[PE1-GigabitEthernet1/0/1] undo stp enable
[PE1-GigabitEthernet1/0/1] bpdu-tunnel dot1q stp
2) Configuration on PE 2
# Configure the destination multicast MAC address for BPDUs as 0x0100-0CCD-CDD0.
<PE2> system-view
[PE2] bpdu-tunnel tunnel-dmac 0100-0ccd-cdd0
# Disable STP on GigabitEthernet 1/0/2, and then enable BPDU tunneling for STP on it.
[PE2-GigabitEthernet1/0/2] undo stp enable
[PE2-GigabitEthernet1/0/2] bpdu-tunnel dot1q stp
Network requirements
11-6
Configuration procedure
1) Configuration on PE 1
# Configure the destination multicast MAC address for BPDUs as 0x0100-0CCD-CDD0.
<PE1> system-view
[PE1] bpdu-tunnel tunnel-dmac 0100-0ccd-cdd0
# Disable STP on GigabitEthernet 1/0/1, and then enable BPDU tunneling for STP and PVST on it.
[PE1-GigabitEthernet1/0/1] undo stp enable
[PE1-GigabitEthernet1/0/1] bpdu-tunnel dot1q stp
[PE1-GigabitEthernet1/0/1] bpdu-tunnel dot1q pvst
2) Configuration on PE 2
# Configure the destination multicast MAC address for BPDUs as 0x0100-0CCD-CDD0.
<PE2> system-view
[PE2] bpdu-tunnel tunnel-dmac 0100-0ccd-cdd0
# Disable STP on GigabitEthernet 1/0/2, and then enable BPDU tunneling for STP and PVST on it.
[PE2-GigabitEthernet1/0/2] undo stp enable
[PE2-GigabitEthernet1/0/2] bpdu-tunnel dot1q stp
[PE2-GigabitEthernet1/0/2] bpdu-tunnel dot1q pvst
11-7
When configuring port mirroring, go to these sections for information you are interested in:
z Introduction to Port Mirroring
z Configuring Local Port Mirroring
z Configuring Remote Port Mirroring
z Displaying and Maintaining Port Mirroring
z Port Mirroring Configuration Examples
As a monitor port can monitor multiple ports, it may receive multiple duplicates of a packet in some
cases. Suppose that port P 1 is monitoring bidirectional traffic on ports P 2 and P 3 on the same device.
If a packet travels from P 2 to P 3, two duplicates of the packet will be received on P 1.
Port mirroring is implemented through port mirroring groups. There are three types of mirroring groups:
local, remote source, and remote destination.
The following subsections describe how local port mirroring and remote port mirroring are
implemented.
In local port mirroring, all packets passing through a port can be mirrored. Local port mirroring is
implemented through a local mirroring group.
12-1
Traffic
mirrored to
Mirroring port Monitor port
Monitor port
Mirroring port
Data monitoring device
PC
Remote port mirroring can mirror all packets but protocol packets.
Remote port mirroring is implemented through the cooperation of a remote source mirroring group and
a remote destination mirroring group as shown Figure 12-2.
Figure 12-2 Remote port mirroring implementation
12-2
To make the port mirroring function work properly, before configuring bidirectional traffic mirroring on a
port in a mirroring group, you need to use the mac-address mac-learning disable command on the
source device, intermediate devices, and destination device to disable the MAC address learning
function for the remote port mirroring VLAN. For more information about the mac-address
mac-learning disable command, refer to MAC Address Table Management Commands in the
System Volume.
12-3
z A local port mirroring group takes effect only after its mirroring and monitor ports are configured.
z To ensure operation of your device, do not enable STP, MSTP, or RSTP on the monitor port.
z A port mirroring group can have multiple mirroring ports, but only one monitor port.
z A mirroring or monitor port to be configured cannot belong to an existing port mirroring group.
z You are recommended to use a monitor port only for port mirroring. This is to ensure that the data
monitoring device receives and analyzes only the mirrored traffic rather than a mix of mirrored
traffic and normally forwarded traffic.
If GVRP is enabled, GVRP may register the remote probe VLAN to unexpected ports, resulting in
undesired duplicates. For information on GVRP, refer to GVRP Configuration in the Access Volume.
Configuration Prerequisites
Create a static VLAN for the probe VLAN on the source and destination device. To ensure correct
packet handling, ensure that the VLANs you created on the two devices use the same ID and function
only for remote port mirroring.
Follow these steps to configure a remote port mirroring group with an egress port:
12-4
mirroring-group groupid
Configure the probe VLAN Required
remote-probe vlan rprobe-vlan-id
12-5
A remote destination mirroring group comprises a remote probe VLAN and a monitor port. You must
ensure that the remote probe VLAN is the same as the one configured in the remote source mirroring
group.
Follow these steps to configure a remote destination port mirroring group:
12-6
Network requirements
12-7
Switch A
R&D
department GE1/0/1
GE1/0/3
GE1/0/2
Switch C
Data monitoring
device
Switch B
Marketing
department
Configuration procedure
Configure Switch C.
# Create a local port mirroring group.
<SwitchC> system-view
[SwitchC] mirroring-group 1 local
# Add port GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 to the port mirroring group as source ports.
Add port GigabitEthernet 1/0/3 to the port mirroring group as the destination port.
[SwitchC] mirroring-group 1 mirroring-port GigabitEthernet 1/0/1 GigabitEthernet 1/0/2 both
[SwitchC] mirroring-group 1 monitor-port GigabitEthernet 1/0/3
After finishing the configuration, you can monitor all the packets received and sent by R&D department
and Marketing department on the Data monitoring device.
Network requirements
12-8
Configuration procedure
# Create VLAN 2.
[SwitchA] vlan 2
[SwitchA-vlan2] quit
# Configure VLAN 2 as the remote port mirroring VLAN of the remote port mirroring group. Add port
GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 to the remote port mirroring group as source ports.
Configure port GigabitEthernet 1/0/3 as the outbound mirroring port.
[SwitchA] mirroring-group 1 remote-probe vlan 2
[SwitchA] mirroring-group 1 mirroring-port GigabitEthernet 1/0/1 GigabitEthernet 1/0/2
inbound
[SwitchA] mirroring-group 1 monitor-egress GigabitEthernet 1/0/3
12-9
# Configure port GigabitEthernet 1/0/2 as a trunk port and configure the port to permit the packets of
VLAN 2.
[SwitchB] interface GigabitEthernet 1/0/2
[SwitchB-GigabitEthernet1/0/2] port link-type trunk
[SwitchB-GigabitEthernet1/0/2] port trunk permit vlan 2
3) Configure Switch C (the destination device).
# Configure port GigabitEthernet 1/0/1 as a trunk port and configure the port to permit the packets of
VLAN 2.
<SwitchC> system-view
[SwitchC] interface GigabitEthernet 1/0/1
[SwitchC-GigabitEthernet1/0/1] port link-type trunk
[SwitchC-GigabitEthernet1/0/1] port trunk permit vlan 2
[SwitchC-GigabitEthernet1/0/1] quit
# Create VLAN 2.
[SwitchC] vlan 2
[SwitchC-vlan2] quit
# Configure VLAN 2 as the remote port mirroring VLAN of the remote destination port mirroring group.
Add port GigabitEthernet 1/0/2 to the remote destination port mirroring group as the destination port.
[SwitchC] mirroring-group 1 remote-probe vlan 2
[SwitchC] mirroring-group 1 monitor-port GigabitEthernet 1/0/2
[SwitchC] interface GigabitEthernet 1/0/2
[SwitchC-GigabitEthernet1/0/2] port access vlan 2
After finishing the configuration, you can monitor all the packets sent by Department 1 and Department
2 on the Data monitoring device.
12-10
1 IP Addressing Configuration1-1
IP Addressing Overview1-1
IP Address Classes 1-1
Special IP Addresses 1-2
Subnetting and Masking 1-2
Configuring IP Addresses 1-3
Assigning an IP Address to an Interface 1-3
IP Addressing Configuration Example1-4
Displaying and Maintaining IP Addressing 1-5
2 ARP Configuration2-1
ARP Overview2-1
ARP Function 2-1
ARP Message Format 2-1
ARP Address Resolution Process2-2
ARP Table 2-3
Configuring ARP 2-3
Configuring a Static ARP Entry 2-3
Configuring the Maximum Number of ARP Entries for a Interface 2-4
Setting the Aging Time for Dynamic ARP Entries 2-4
Enabling the ARP Entry Check 2-5
ARP Configuration Example2-5
Configuring Gratuitous ARP2-5
Introduction to Gratuitous ARP2-5
Configuring Gratuitous ARP 2-6
Displaying and Maintaining ARP2-6
5 DHCP Overview5-1
Introduction to DHCP 5-1
DHCP Address Allocation 5-2
Allocation Mechanisms5-2
Dynamic IP Address Allocation Process 5-2
IP Address Lease Extension 5-3
DHCP Message Format 5-3
DHCP Options5-4
DHCP Options Overview 5-4
Introduction to DHCP Options 5-4
Self-Defined Options 5-5
Protocols and Standards5-8
ii
10 DNS Configuration10-1
DNS Overview10-1
Static Domain Name Resolution 10-1
Dynamic Domain Name Resolution 10-1
DNS Proxy10-3
Configuring the DNS Client10-4
Configuring Static Domain Name Resolution10-4
Configuring Dynamic Domain Name Resolution10-4
Configuring the DNS Proxy10-5
Displaying and Maintaining DNS 10-5
DNS Configuration Examples 10-5
Static Domain Name Resolution Configuration Example10-5
Dynamic Domain Name Resolution Configuration Example10-6
DNS Proxy Configuration Example 10-9
Troubleshooting DNS Configuration 10-10
iii
iv
When assigning IP addresses to interfaces on your device, go to these sections for information you are
interested in:
z IP Addressing Overview
z Configuring IP Addresses
z Displaying and Maintaining IP Addressing
IP Addressing Overview
This section covers these topics:
z IP Address Classes
z Special IP Addresses
IP Address Classes
1-1
Special IP Addresses
The following IP addresses are for special use, and they cannot be used as host IP addresses:
z IP address with an all-zero net ID: Identifies a host on the local network. For example, IP address
0.0.0.16 indicates the host with a host ID of 16 on the local network.
z IP address with an all-zero host ID: Identifies a network.
z IP address with an all-one host ID: Identifies a directed broadcast address. For example, a packet
with the destination address of 192.168.1.255 will be broadcasted to all the hosts on the network
192.168.1.0.
Subnetting was developed to address the risk of IP address exhaustion resulting from fast expansion
of the Internet. The idea is to break a network down into smaller networks called subnets by using
some bits of the host ID to create a subnet ID. To identify the boundary between the host ID and the
combination of net ID and subnet ID, masking is used.
Each subnet mask comprises 32 bits related to the corresponding bits in an IP address. In a subnet
mask, the part containing consecutive ones identifies the combination of net ID and subnet ID whereas
the part containing consecutive zeros identifies the host ID.
Figure 1-2 shows how a Class B network is subnetted.
Figure 1-2 Subnet a Class B network
1-2
Configuring IP Addresses
An interface needs an IP address to communicate with other devices. You can assign an IP address to
a VLAN interface or a loopback interface on a switch. Besides directly assigning an IP address to the
VLAN interface, you may configure the VLAN interface to obtain one through BOOTP, or DHCP as
alternatives. If you change the way an interface obtains an IP address, from manual assignment to
BOOTP for example, the IP address obtained from BOOTP will overwrite the old one manually
assigned.
This chapter only covers how to assign an IP address manually. For the other two approaches, refer to
DHCP Configuration in the IP Services Volume.
You may assign an interface on the Switch 4510G multiple IP addresses, one primary and multiple
secondaries, to connect multiple logical subnets on the same physical subnet.
Follow these steps to assign an IP address to an interface:
interface interface-type
Enter interface view
interface-number
1-3
Network requirements
As shown in Figure 1-3, a port in VLAN 1 on a switch is connected to a LAN comprising two segments:
172.16.1.0/24 and 172.16.2.0/24.
To enable the hosts on the two network segments to communicate with the external network through
the switch, and the hosts on the LAN can communicate with each other, do the following:
z Assign two IP addresses to VLAN-interface 1 on the switch.
z Set the switch as the gateway on all PCs in the two networks.
Figure 1-3 Network diagram for IP addressing configuration
Configuration procedure
# Set the gateway address to 172.16.1.1 on the PCs attached to subnet 172.16.1.0/24, and to
172.16.2.1 on the PCs attached to subnet 172.16.2.0/24.
# Ping a host on subnet 172.16.1.0/24 from the switch to check the connectivity.
1-4
The output information shows that the switch can communicate with the hosts on subnet
172.16.1.0/24.
# Ping a host on subnet 172.16.2.0/24 from the switch to check the connectivity.
<Switch> ping 172.16.2.2
PING 172.16.2.2: 56 data bytes, press CTRL_C to break
Reply from 172.16.2.2: bytes=56 Sequence=1 ttl=255 time=25 ms
Reply from 172.16.2.2: bytes=56 Sequence=2 ttl=255 time=26 ms
Reply from 172.16.2.2: bytes=56 Sequence=3 ttl=255 time=26 ms
Reply from 172.16.2.2: bytes=56 Sequence=4 ttl=255 time=26 ms
Reply from 172.16.2.2: bytes=56 Sequence=5 ttl=255 time=26 ms
The output information shows that the switch can communicate with the hosts on subnet
172.16.2.0/24.
# Ping a host on subnet 172.16.1.0/24 from a host on subnet 172.16.2.0/24 to check the connectivity.
Host B can be successfully pinged from Host A.
1-5
2 ARP Configuration
When configuring ARP, go to these sections for information you are interested in:
z ARP Overview
z Configuring ARP
z Configuring Gratuitous ARP
z Displaying and Maintaining ARP
ARP Overview
ARP Function
The Address Resolution Protocol (ARP) is used to resolve an IP address into an Ethernet MAC
address (or physical address).
In a LAN, when a host or other network device is to send data to another host or device, the sending
host or device must know the network layer address (that is, the IP address) of the destination host or
device. Because IP datagrams must be encapsulated within Ethernet frames before they can be
transmitted over physical networks, the sending host or device also needs to know the physical
address of the destination host or device. Therefore, a mapping between the IP address and the
physical address is needed. ARP is the protocol to implement the mapping function.
2-1
Suppose that Host A and Host B are on the same subnet and Host A sends a packet to Host B, as
shown in Figure 2-2. The resolution process is as follows:
1) Host A looks into its ARP table to see whether there is an ARP entry for Host B. If yes, Host A
uses the MAC address in the entry to encapsulate the IP packet into a data link layer frame and
sends the frame to Host B.
2) If Host A finds no entry for Host B, Host A buffers the packet and broadcasts an ARP request, in
which the sender IP address and the sender MAC address are the IP address and the MAC
address of Host A respectively, and the target IP address and the target MAC address are the IP
address of Host B and an all-zero MAC address respectively. Because the ARP request is a
broadcast, all hosts on this subnet can receive the request, but only the requested host (namely,
Host B) will respond to the request.
3) Host B compares its own IP address with the destination IP address in the ARP request. If they
are the same, Host B saves the source IP address and source MAC address in its ARP table,
encapsulates its MAC address into an ARP reply, and unicasts the reply to Host A.
4) After receiving the ARP reply, Host A adds the MAC address of Host B to its ARP table.
Meanwhile, Host A encapsulates the IP packet and sends it out.
Figure 2-2 ARP address resolution process
If Host A is not on the same subnet with Host B, Host A first sends an ARP request to the gateway. The
target IP address in the ARP request is the IP address of the gateway. After obtaining the MAC
address of the gateway from an ARP reply, Host A sends the packet to the gateway. If the gateway
maintains the ARP entry of Host B, it forwards the packet to Host B directly; if not, it broadcasts an ARP
2-2
ARP Table
After obtaining the MAC address for the destination host, the device puts the IP-to-MAC mapping into
its own ARP table. This mapping is used for forwarding packets with the same destination in future.
An ARP table contains ARP entries, which fall into one of two categories: dynamic or static.
A dynamic entry is automatically created and maintained by ARP. It can get aged, be updated by a new
ARP packet, or be overwritten by a static ARP entry. When the aging timer expires or the interface
goes down, the corresponding dynamic ARP entry will be removed.
A static ARP entry is manually configured and maintained. It cannot get aged or be overwritten by a
dynamic ARP entry.
Using static ARP entries enhances communication security. You can configure a static ARP entry to
restrict an IP address to communicate with the specified MAC address only. After that, attack packets
cannot modify the IP-to-MAC mapping specified in the static ARP entry. Thus, communications
between the protected device and the specified device are ensured.
Static ARP entries can be classified into permanent or non-permanent.
z A permanent static ARP entry can be directly used to forward packets. When configuring a
permanent static ARP entry, you must configure a VLAN and an outbound interface for the entry
besides the IP address and the MAC address.
z A non-permanent static ARP entry has only an IP address and a MAC address configured. If a
non-permanent static ARP entry matches an IP packet to be forwarded, the device sends an ARP
request first. If the sender IP and MAC addresses in the received ARP reply are the same as
those in the non-permanent static ARP entry, the device adds the interface receiving the ARP
reply to the non-permanent static ARP entry. Then the entry can be used for forwarding IP
packets.
Usually ARP dynamically resolves IP addresses to MAC addresses, without manual intervention.
Configuring ARP
Configuring a Static ARP Entry
A static ARP entry is effective when the device works normally. However, when a VLAN or VLAN
interface to which a static ARP entry corresponds is deleted, the entry, if permanent, will be deleted,
and if non-permanent and resolved, will become unresolved.
Follow these steps to configure a static ARP entry:
2-3
Configure a Required
non-permanent static ARP arp static ip-address mac-address No non-permanent static ARP
entry entry is configured by default.
The vlan-id argument must be the ID of an existing VLAN which corresponds to the ARP entries. In
addition, the Ethernet interface following the argument must belong to that VLAN. A VLAN interface
must be created for the VLAN.
Follow these steps to set the maximum number of dynamic ARP entries that a interface can learn:
To keep pace with the network changes, the ARP table is refreshed. Each dynamic ARP entry in the
ARP table has a limited lifetime rather than is always valid. Dynamic ARP entries that are not refreshed
before expiring are deleted from the ARP table. The lifetime is called the aging time. The aging time is
reset each time the dynamic ARP entry is used within the lifetime. You can adjust the aging time for
dynamic ARP entries according to the actual network condition.
Follow these steps to set the aging time for dynamic ARP entries:
2-4
The ARP entry check function disables the device from learning multicast MAC addresses. With the
ARP entry check enabled, the device cannot learn any ARP entry with a multicast MAC address, and
configuring such a static ARP entry is not allowed; otherwise, the system displays error messages.
After the ARP entry check is disabled, the device can learn the ARP entry with a multicast MAC
address, and you can also configure such a static ARP entry on the device.
Follow these steps to enable the ARP entry check:
Network requirements
Configuration procedure
<Sysname> system-view
[Sysname] arp check enable
[Sysname] arp timer aging 10
[Sysname] vlan 10
[Sysname-vlan10] quit
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port access vlan 10
[Sysname-GigabitEthernet1/0/1] quit
[Sysname] interface vlan-interface 10
[Sysname-vlan-interface10] arp max-learning-num 1000
[Sysname-vlan-interface10] quit
[Sysname] arp static 192.168.1.1 000f-e201-0000 10 gigabitethernet 1/0/1
A gratuitous ARP packet is a special ARP packet, in which the sender IP address and the target IP
address are both the IP address of the sender, the sender MAC address is the MAC address of the
sender, and the target MAC address is the broadcast address ff:ff:ff:ff:ff:ff.
A device implements the following functions by sending gratuitous ARP packets:
2-5
2-6
When configuring proxy ARP, go to these sections for information you are interested in:
z Proxy ARP Overview
z Enabling Proxy ARP
z Displaying and Maintaining Proxy ARP
The term proxy ARP in the following sections of this chapter refers to common proxy ARP unless
otherwise specified.
Proxy ARP
A proxy ARP enabled device allows hosts that reside on different subnets to communicate.
As shown in Figure 3-1, Switch connects to two subnets through VLAN-interface 1 and VLAN-interface
2. The IP addresses of the two interfaces are 192.168.10.99/24 and 192.168.20.99/24. Host A and
Host B have the same prefix 192.168.0.0 assigned and connect to VLAN-interface 1 and
VLAN-interface 2, respectively.
Figure 3-1 Application environment of proxy ARP
Because Host A considers that Host B is on the same network, it directly sends an ARP request for the
MAC address of Host B. Host B, however, cannot receive this request because it locates in a different
broadcast domain.
3-1
As shown in Figure 3-2, Host A and Host B belong to VLAN 2, but are isolated at Layer 2. Host A
connects to GigabitEthernet 1/0/3 while Host B connects to GigabitEthernet 1/0/1. Enable local proxy
ARP on Switch to allow Layer 3 communication between the two hosts.
Figure 3-2 Application environment of local proxy ARP
Switch
Vlan-int2
192.168.10.100/24
VLAN 2
port-isolate group
GE1/0/2
GE1/0/3
GE1/0/1
In one of the following cases, you need to enable local proxy ARP:
z Hosts connecting to different isolated Layer 2 ports in the same VLAN need to communicate at
Layer 3.
z If an isolate-user-vlan is configured, hosts in different secondary VLANs of the isolate-user-vlan
need to communicate at Layer 3.
Follow these steps to enable local proxy ARP in VLAN interface view:
3-2
Network requirements
Host A and Host D have the same IP prefix and mask. Host A belongs to VLAN 1; Host D belongs to
VLAN 2. Configure proxy ARP on the switch to enable the communication between the two hosts.
Figure 3-3 Network diagram for proxy ARP
Configuration procedure
# Configure Proxy ARP on Switch to enable the communication between Host A and Host D.
<Switch> system-view
[Switch] vlan 2
[Switch-vlan2] quit
[Switch] interface vlan-interface 1
[Switch-Vlan-interface1] ip address 192.168.10.99 255.255.255.0
[Switch-Vlan-interface1] proxy-arp enable
3-3
Network requirements
z Host A and Host B belong to the same VLAN, and connect to Switch B via GigabitEthernet 1/0/2
and GigabitEthernet 1/0/3, respectively.
z Switch B connects to Switch A via GigabitEthernet 1/0/1.
z On Switch B, Layer 2 and Layer 3 port isolation are configured on GigabitEthernet 1/0/2 and
GigabitEthernet 1/0/3. Enable proxy ARP on Switch A to allow communication between Host A
and Host B.
Figure 3-4 Network diagram for local proxy ARP between isolated ports
Switch A
GE1/0/2
VLAN 2
Vlan-int2
192.168.10.100/24
GE1/0/1
GE1/0/2 GE1/0/3
Configuration procedure
1) Configure Switch B
# Add GigabitEthernet 1/0/3, GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 to VLAN 2. Host A and
Host B are isolated and unable to exchange Layer 2 packets.
<SwitchB> system-view
[SwitchB] vlan 2
[SwitchB-vlan2] port gigabitethernet 1/0/1
[SwitchB-vlan2] port gigabitethernet 1/0/2
[SwitchB-vlan2] port gigabitethernet 1/0/3
[SwitchB-vlan2] quit
[SwitchB] interface gigabitethernet 1/0/2
[SwitchB-GigabitEthernet1/0/2] port-isolate enable
[SwitchB-GigabitEthernet1/0/2] quit
[SwitchB] interface gigabitethernet 1/0/3
[SwitchB-GigabitEthernet1/0/3] port-isolate enable
[SwitchB-GigabitEthernet1/0/3] quit
2) Configure Switch A
3-4
The ping operation from Host A to Host B is unsuccessful because they are isolated at Layer 2.
# Configure local proxy ARP to let Host A and Host B communicate at Layer 3.
[SwitchA-Vlan-interface2] local-proxy-arp enable
[SwitchA-Vlan-interface2] quit
The ping operation from Host A to Host B is successful after the configuration.
Network requirements
Switch A
GE1/0/1
VLAN 5
Vlan-int5
192.168.10.100/16 Isolate-uer-vlan 5
Secondary VLAN 2 3
GE1/0/1
VLAN 5
GE1/0/2 GE1/0/3
VLAN 2 VLAN 3
Host A Host B
Switch B
192.168.10.99/16 192.168.10.200/16
Configuration procedure
1) Configure Switch B
# Create VLAN 2, VLAN 3, and VLAN 5 on Switch B. Add GigabitEthernet 1/0/2 to VLAN 2,
GigabitEthernet 1/0/3 to VLAN 3, and GigabitEthernet 1/0/1 to VLAN 5. Configure VLAN 5 as the
isolate-user-vlan, and VLAN 2 and VLAN 3 as secondary VLANs. Configure the mappings between
isolate-user-vlan and the secondary VLANs.
<SwitchB> system-view
[SwitchB] vlan 2
3-5
2) Configure Switch A
# Create VLAN 5 and add GigabitEthernet 1/0/1 to it.
<SwitchA> system-view
[SwitchA] vlan 5
[SwitchA-vlan5] port gigabitethernet 1/0/1
[SwitchA-vlan5] interface vlan-interface 5
[SwitchA-Vlan-interface5] ip address 192.168.10.100 255.255.0.0
The ping operation from Host A to Host B is unsuccessful because they are isolated at Layer 2.
# Configure local proxy ARP to implement communication between VLAN 2 and VLAN 3.
[SwitchA-Vlan-interface5] local-proxy-arp enable
[SwitchA-Vlan-interface5] quit
The ping operation from Host A to Host B is successful after the configuration.
3-6
When configuring ARP attack defense, go to these sections for information you are interested in:
z Configuring ARP Source Suppression
z Configuring ARP Defense Against IP Packet Attacks
z Configuring ARP Active Acknowledgement
z Configuring Source MAC Address Based ARP Attack Detection
z Configuring ARP Packet Source MAC Address Consistency Check
z Configuring ARP Packet Rate Limit
z Configuring ARP Detection
Although ARP is easy to implement, it provides no security mechanism and thus is prone to network
attacks. Currently, ARP attacks and viruses are threatening LAN security. The device can provide
multiple features to detect and prevent such attacks. This chapter mainly introduces these features.
Required
Enable ARP source suppression arp source-suppression enable
Disabled by default.
Set the maximum number of packets
with the same source IP address but Optional
arp source-suppression limit
unresolvable destination IP
limit-value 10 by default.
addresses that the device can
receive in five consecutive seconds
4-1
When forwarding an IP packet, a device depends on ARP to resolve the MAC address of the next hop.
If the address resolution is successful, the forwarding chip forwards the packet directly. Otherwise, the
device runs software for further processing. If the device cannot resolve the next hops for large
numbers of incoming packets, the CPU of the device will be exhausted. This is called IP packet
attacks.
To protect a device against IP packet attacks, you can enable the ARP defense against IP packet
attacks function. After receiving an IP packet whose next hop cannot be resolved by ARP, a device with
this function enabled creates a black hole route immediately and the forwarding chip simply drops all
packets matching the next hop during the age time of the black hole route.
The ARP defense against IP packet attack function applies to packets to be forwarded and those
originated by the device.
Follow these steps to configure ARP defense against IP packet attacks:
Typically, the ARP active acknowledgement feature is configured on gateway devices to identify invalid
ARP packets.
With this feature enabled, the gateway, upon receiving an ARP packet with a different source MAC
address from that in the corresponding ARP entry, checks whether the ARP entry has been updated
within the last minute:
z If yes, the gateway does not update the ARP entry;
z If not, the gateway unicasts an ARP request to the source MAC address of the ARP entry.
Then,
z If an ARP reply is received within five seconds, the ARP packet is ignored;
z If not, the gateway unicasts an ARP request to the MAC address of the ARP packet.
4-2
This feature allows the device to check the source MAC address of ARP packets. If the number of ARP
packets sent from a MAC address within five seconds exceeds the specified value, the device
considers this an attack.
Only the ARP packets delivered to the CPU are detected.
Configuration Procedure
After this feature is enabled for a device, if the number of ARP packets it receives from a MAC address
within five seconds exceeds the specified value, it generates an alarm and filters out ARP packets
sourced from that MAC address (in filter mode), or only generates an alarm (in monitor mode).
Follow these steps to configure source MAC address based ARP attack detection:
A protected MAC address is excluded from ARP attack detection even though it is an attacker. You can
specify certain MAC addresses, such as that of a gateway or important servers, as protected MAC
addresses.
4-3
Follow these steps to configure the aging timer for protected MAC addresses:
Displaying and Maintaining Source MAC Address Based ARP Attack Detection
A protected MAC address is no longer excluded from detection after the specified aging time expires.
This feature enables a gateway device to filter out ARP packets with the source MAC address in the
Ethernet header different from the sender MAC address in the ARP message, so that the gateway
device can learn correct ARP entries.
4-4
Follow these steps to enable ARP packet source MAC address consistency check:
This feature allows you to limit the rate of ARP packets to be delivered to the CPU.
interface interface-type
Enter Ethernet port view
interface-number
Required
arp rate-limit { disable | rate
Configure ARP packet rate limit By default, the ARP packet rate
pps drop }
limit is enabled and is 100 pps.
z For information about DHCP snooping, refer to DHCP Configuration in the IP Services Volume.
z For information about 802.1X, refer to 802.1X Configuration in the Security Volume.
The ARP detection feature allows only the ARP packets of authorized clients to be forwarded.
4-5
With this feature enabled, the device compares the source IP and MAC addresses of an ARP packet
received from the VLAN against the DHCP snooping entries, 802.1X security entries, or static
IP-to-MAC binding entries. You can specify a detection type or types as needed. If all the detection
types are specified, the system uses static IP-to-MAC binding entries first, then DHCP snooping
entries, and then 802.1X security entries.
1) After you enable ARP detection based on DHCP snooping entries for a VLAN,
z Upon receiving an ARP packet from an ARP untrusted port, the device compares the ARP packet
against the DHCP snooping entries. If a match is found, that is, the parameters (such as IP
address, MAC addresses, port index, and VLAN ID) are consistent, the ARP packet passes the
check; if not, the ARP packet cannot pass the check.
z Upon receiving an ARP packet from an ARP trusted port, the device does not check the ARP
packet.
z If ARP detection is not enabled for the VLAN, the ARP packet is not checked even if it is received
from an ARP untrusted port.
ARP detection based on DHCP snooping entries involves both dynamic DHCP snooping entries and
static IP Source Guard binding entries. Dynamic DHCP snooping entries are automatically generated
through the DHCP snooping function. For details, refer to DHCP Configuration in the IP Service
Volume. Static IP Source Guard binding entries are created by using the user-bind command. For
details, refer to IP Source Guard Configuration in the Security Volume.
2) After you enable ARP detection based on 802.1X security entries, the device, upon receiving an
ARP packet from an ARP untrusted port, compares the ARP packet against the 802.1X security
entries.
z If an entry with matching source IP and MAC addresses, port index, and VLAN ID is found, the
ARP packet is considered valid.
z If an entry with no matching IP address but with a matching OUI MAC address is found, the ARP
packet is considered valid.
Otherwise, the packet is considered invalid and discarded.
3) After you enable ARP detection based on static IP-to-MAC bindings, the device, upon receiving an
ARP packet from an ARP trusted/untrusted port, compares the source IP and MAC addresses of
the ARP packet against the static IP-to-MAC bindings.
z If an entry with a matching IP address but a different MAC address is found, the ARP packet is
considered invalid and discarded.
z If an entry with both matching IP and MAC addresses is found, the ARP packet is considered valid
and can pass the detection.
z If no match is found, the ARP packet is considered valid and can pass the detection.
Follow these steps to enable ARP detection for a VLAN and specify a trusted port:
4-6
Required
arp detection mode
Specify an ARP attack No ARP attack detection mode is
{ dhcp-snooping |
detection mode specified by default; that is, all packets
dot1x | static-bind }
are considered to be invalid by default.
Optional
arp detection Not configured by default.
Configure a static IP-to-MAC
static-bind ip-address If the ARP attack detection mode is
binding for ARP detection
mac-address static-bind, you need to configure static
IP-to-MAC bindings for ARP detection.
z If all the detection types are specified, the system uses IP-to-MAC bindings first, then DHCP
snooping entries, and then 802.1X security entries. If an ARP packet fails to pass ARP detection
based on static IP-to-MAC bindings, it is discarded. If the packet passes this detection, it will be
checked against DHCP snooping entries. If a match is found, the packet is considered to be valid
and will not be checked against 802.1X security entries; otherwise, the packet is checked against
802.1X security entries. If a match is found, the packet is considered to be valid; otherwise, the
packet is discarded.
z Before enabling ARP detection based on DHCP snooping entries, make sure that DHCP snooping
is enabled.
z Before enabling ARP detection based on 802.1X security entries, make sure that 802.1X is
enabled and the 802.1X clients are configured to upload IP addresses.
4-7
You can also specify objects in ARP packets to be detected. The objects involve:
z src-mac: Checks whether the sender MAC address of an ARP packet is identical to the source
MAC address in the Ethernet header. If they are identical, the packet is forwarded; otherwise, the
packet is discarded.
z dst-mac: Checks the target MAC address of ARP replies. If the target MAC address is all-zero,
all-one, or inconsistent with the destination MAC address in the Ethernet header, the packet is
considered invalid and discarded.
z ip: Checks both the source and destination IP addresses in an ARP packet. The all-zero, all-one
or multicast IP addresses are considered invalid and the corresponding packets are discarded.
With this object specified, the source and destination IP addresses of ARP replies, and the source
IP address of ARP requests are checked.
Before performing the following configuration, make sure you have configured the arp detection
enable command.
Follow these steps to configure ARP detection based on specified objects:
4-8
Network requirements
z Enable DHCP snooping on Switch B. Enable ARP detection for VLAN 10 to allow only packets
from valid clients to pass.
z Configure Host A and Host B as DHCP clients.
Figure 4-1 Network diagram for ARP detection configuration
4-9
1) Add all the ports on Switch B into VLAN 10, and configure the IP address of VLAN-interface 10 on
Switch A (the configuration procedure is omitted).
2) Configure a DHCP server (the configuration procedure is omitted).
3) Configure Host A and Host B as DHCP clients (the configuration procedure is omitted).
4) Configure Switch B
# Enable DHCP snooping.
<SwitchB> system-view
[SwitchB] dhcp-snooping
[SwitchB] interface gigabitethernet 1/0/1
[SwitchB-GigabitEthernet1/0/1] dhcp-snooping trust
[SwitchB-GigabitEthernet1/0/1] quit
# Enable ARP detection for VLAN 10. Configure the upstream port as a trusted port and the
downstream ports as untrusted ports (a port is an untrusted port by default).
[SwitchB] vlan 10
[SwitchB-vlan10] arp detection enable
[SwitchB-vlan10] interface gigabitethernet 1/0/1
[SwitchB-GigabitEthernet1/0/1] arp detection trust
[SwitchB-GigabitEthernet1/0/1] quit
# Enable ARP detection based on both DHCP snooping entries and static IP-to-MAC bindings.
[SwitchB] arp detection mode dhcp-snooping
[SwitchB] arp detection mode static-bind
# Enable the checking of the MAC addresses and IP addresses of ARP packets.
[SwitchB] arp detection validate dst-mac ip src-mac
Network requirements
z Enable 802.1X on Switch B. Enable ARP detection for VLAN 10 to allow only packets from valid
clients to pass.
z Configure Host A and Host B as local 802.1X access users.
4-10
Configuration procedure
1) Add all the ports on Switch B into VLAN 10, and configure the IP address of VLAN-interface 10 on
Switch A (the configuration procedure is omitted).
2) Configure a DHCP server (the configuration procedure is omitted).
3) Configure Host A and Host B as 802.1x clients (the configuration procedure is omitted) and
configure them to upload IP addresses for ARP detection.
4) Configure Switch B
# Enable the 802.1x function.
<SwitchB> system-view
[SwitchB] dot1x
[SwitchB] interface gigabitethernet 1/0/1
[SwitchB-GigabitEthernet1/0/1] dot1x
[SwitchB-GigabitEthernet1/0/1] quit
[SwitchB] interface gigabitethernet 1/0/2
[SwitchB-GigabitEthernet1/0/2] dot1x
[SwitchB-GigabitEthernet1/0/2] quit
# Enable ARP detection for VLAN 10. Configure the upstream port as a trusted port and the
downstream ports as untrusted ports (a port is an untrusted port by default).
[SwitchB] vlan 10
[SwitchB-vlan10] arp detection enable
[SwitchB-vlan10] interface gigabitethernet 1/0/3
[SwitchB-GigabitEthernet1/0/3] arp detection trust
[SwitchB-GigabitEthernet1/0/3] quit
4-11
5 DHCP Overview
Introduction to DHCP
The fast expansion and growing complexity of networks result in scarce IP addresses assignable to
hosts. Meanwhile, as many people need to take their laptops across networks, the IP addresses need
to be changed accordingly. Therefore, related configurations on hosts become more complex. The
Dynamic Host Configuration Protocol (DHCP) was introduced to solve these problems.
DHCP is built on a client-server model, in which a client sends a configuration request and then the
server returns a reply to send configuration parameters such as an IP address to the client.
A typical DHCP application, as shown in Figure 5-1, includes a DHCP server and multiple clients (PCs
and laptops).
Figure 5-1 A typical DHCP application
A DHCP client can get an IP address and other configuration parameters from a DHCP server on
another subnet via a DHCP relay agent. For information about the DHCP relay agent, refer to
Introduction to DHCP Relay Agent.
5-1
As shown in Figure 5-2, a DHCP client obtains an IP address from a DHCP server via four steps:
2) The client broadcasts a DHCP-DISCOVER message to locate a DHCP server.
3) A DHCP server offers configuration parameters including an IP address to the client in a
DHCP-OFFER message. The sending mode of the DHCP-OFFER message is determined by the
flag field in the DHCP-DISCOVER message. Refer to DHCP Message Format for related
information.
4) If several DHCP servers send offers to the client, the client accepts the first received offer, and
broadcasts it in a DHCP-REQUEST message to formally request the IP address.
5) All DHCP servers receive the DHCP-REQUEST message, but only the server from which the
client accepts the offered IP address responds. The server returns a DHCP-ACK message to the
client, confirming that the IP address has been allocated to the client, or a DHCP-NAK unicast
message, denying the IP address allocation.
5-2
The IP address dynamically allocated by a DHCP server to a client has a lease. When the lease
expires, the IP address is reclaimed by the DHCP server. If the client wants to use the IP address
longer, it has to extend the lease duration.
When the half lease duration elapses, the DHCP client sends to the DHCP server a DHCP-REQUEST
unicast to extend the lease duration. Upon availability of the IP address, the DHCP server returns a
DHCP-ACK unicast confirming that the clients lease duration has been extended, or a DHCP-NAK
unicast denying the request.
If the client receives no reply, it broadcasts another DHCP-REQUEST message for lease extension
after 7/8 lease duration elapses. The DHCP server handles the request as above mentioned.
5-3
DHCP Options
DHCP Options Overview
The DHCP message adopts the same format as the Bootstrap Protocol (BOOTP) message for
compatibility, but differs from it in the option field, which identifies new features for DHCP.
DHCP uses the option field in DHCP messages to carry control information and network configuration
parameters, implementing dynamic address allocation and providing more network configuration
information for clients.
Figure 5-4 shows the DHCP option format.
Figure 5-4 DHCP option format
5-4
Self-Defined Options
Some options, such as Option 43, have no unified definitions in RFC 2132. The formats of some
self-defined options are introduced as follows.
DHCP servers and clients exchange vendor-specific information through messages containing the
vendor-specific option (Option 43). Upon receiving a DHCP message requesting Option 43 (in Option
55), the DHCP server returns a response message containing Option 43 to assign vendor-specific
information to the DHCP client.
The DHCP client can obtain the following information through Option 43:
z Auto-Configuration Server (ACS) parameters, including the ACS URL, username, and password.
z Service provider identifier acquired by the customer premises equipment (CPE) from the DHCP
server and sent to the ACS for selecting vender-specific configurations and parameters.
z Preboot Execution Environment (PXE) server address for further obtaining the bootfile or other
control information from the PXE server.
1) Format of Option 43
Figure 5-5 Format of Option 43
For the sake of scalability, network configuration parameters are carried in different sub-options of
Option 43 so that the DHCP client can obtain more information through Option 43 as shown in Figure
5-5. The sub-option fields are described as follows:
z Sub-option type: Type of a sub-option. The field value can be 0x01, 0x02, or 0x80. 0x01 indicates
an ACS parameter sub-option. 0x02 indicates a service provider identifier sub-option. 0x80
indicates a PXE server address sub-option.
z Sub-option length: Length of a sub-option excluding the sub-option type and sub-option length
fields.
z Sub-option value: Value of a sub-option.
2) Format of the sub-option value field of Option 43
z As shown in Figure 5-6, the value field of the ACS parameter sub-option is filled in with variable
ACS URL, username, and password separated with a space (0x20) in between.
5-5
z The value field of the service provider identifier sub-option contains the service provider identifier.
z Figure 5-7 shows the format of the value field of the PXE server address sub-option. Currently, the
value of the PXE server type can only be 0. The server number field indicates the number of PXE
servers contained in the sub-option. The server IP addresses filed contains the IP addresses of
the PXE servers.
Figure 5-7 Format of the value field of the PXE server address sub-option
Option 82 is the relay agent option in the option field of the DHCP message. It records the location
information of the DHCP client. When a DHCP relay agent or DHCP snooping device receives a
clients request, it adds Option 82 to the request message before forwarding the message to the
server.
The administrator can locate the DHCP client to further implement security control and accounting.
The Option 82 supporting server can also use such information to define individual assignment policies
of IP address and other parameters for the clients.
Option 82 involves at most 255 sub-options. At least one sub-option is defined. Currently the DHCP
relay agent supports two sub-options: sub-option 1 (Circuit ID) and sub-option 2 (Remote ID).
Option 82 has no unified definition. Its padding formats vary with vendors.
You can use the following methods to configure Option 82:
z User-defined method: Manually specify the content of Option 82.
z Non-user-defined method: Pad Option 82 in the default normal or verbose format.
If you choose the second method, specify the code type for the sub-options as ASCII or HEX.
1) Normal padding format
The padding contents for sub-options in the normal padding format are as follows:
z Sub-option 1: Padded with the VLAN ID and interface number of the interface that received the
clients request. The following figure gives its format. The value of the sub-option type is 1, and
that of the circuit ID type is 0.
5-6
z Sub-option 2: Padded with the MAC address of the DHCP relay agent interface or the MAC
address of the DHCP snooping device that received the clients request. The following figure gives
its format. The value of the sub-option type is 2, and that of the remote ID type is 0.
Figure 5-9 Sub-option 2 in normal padding format
In Figure 5-10, except that the VLAN ID field has a fixed length of 2 bytes, all the other padding
contents of sub-option 1 are length variable.
z Sub-option 2: Padded with the MAC address of the DHCP relay agent interface or the MAC
address of the DHCP snooping device that received the clients request. It has the same format as
that in normal padding format, as shown in Figure 5-9.
Option 184
Option 184 is a reserved option, and parameters in the option can be defined as needed. The device
supports Option 184 carrying the voice related parameters, so a DHCP client with voice functions can
get an IP address along with specified voice parameters from the DHCP server.
Option 184 involves the following sub-options:
5-7
5-8
When configuring the DHCP relay agent, go to these sections for information you are interested in:
z Introduction to DHCP Relay Agent
z DHCP Relay Agent Configuration Task List
z Configuring the DHCP Relay Agent
z Displaying and Maintaining DHCP Relay Agent Configuration
z DHCP Relay Agent Configuration Examples
z Troubleshooting DHCP Relay Agent Configuration
Since DHCP clients request IP addresses via broadcast messages, the DHCP server and clients must
be on the same subnet. Therefore, a DHCP server must be available on each subnet, which is not
practical.
DHCP relay agent solves the problem. Via a relay agent, DHCP clients communicate with a DHCP
server on another subnet to obtain configuration parameters. Thus, DHCP clients on different subnets
can contact the same DHCP server for ease of centralized management and cost reduction.
Fundamentals
6-1
IP network
No matter whether a relay agent exists or not, the DHCP server and client interact with each other in a
similar way (see section Dynamic IP Address Allocation Process). The following describes the
forwarding process on the DHCP relay agent.
Figure 6-2 DHCP relay agent work process
Option 82 records the location information of the DHCP client. The administrator can locate the DHCP
client to further implement security control and accounting. For more information, refer toRelay agent
option (Option 82).
If the DHCP relay agent supports Option 82, it will handle a clients request according to the contents
defined in Option 82, if any. The handling strategies are described in the table below.
If a reply returned by the DHCP server contains Option 82, the DHCP relay agent will remove the
Option 82 before forwarding the reply to the client.
6-2
Task Remarks
Enabling DHCP Required
6-3
With this task completed, upon receiving a DHCP request from the enabled interface, the relay agent
will forward the request to a DHCP server for address allocation.
Follow these steps to enable the DHCP relay agent on an interface:
If the DHCP client obtains an IP address via the DHCP relay agent, the address pool of the subnet to
which the IP address of the DHCP relay agent belongs must be configured on the DHCP server.
Otherwise, the DHCP client cannot obtain a correct IP address.
To improve reliability, you can specify several DHCP servers as a group on the DHCP relay agent and
correlate a relay agent interface with the server group. When the interface receives requesting
messages from clients, the relay agent will forward them to all the DHCP servers of the group.
Follow these steps to correlate a DHCP server group with a relay agent interface:
6-4
z You can specify up to twenty DHCP server groups on the relay agent and eight DHCP server
addresses for each DHCP server group.
z The IP addresses of DHCP servers and those of relay agents interfaces cannot be on the same
subnet. Otherwise, the client cannot obtain an IP address.
z A DHCP server group can correlate with one or multiple DHCP relay agent interfaces, while a
relay agent interface can only correlate with one DHCP server group. Using the dhcp relay
server-select command repeatedly overwrites the previous configuration. However, if the
specified DHCP server group does not exist, the interface still uses the previous correlation.
z The group-id argument in the dhcp relay server-select command was specified by the dhcp
relay server-group command.
The DHCP relay agent can dynamically record clients IP-to-MAC bindings after clients get IP
addresses. It also supports static bindings, which means you can manually configure IP-to-MAC
bindings on the DHCP relay agent, so that users can access external network using fixed IP
addresses.
For avoidance of invalid IP address configuration, you can configure the DHCP relay agent to check
whether a requesting clients IP and MAC addresses match a binding (both dynamic and static
bindings) on the DHCP relay agent. If not, the client cannot access outside networks via the DHCP
relay agent.
Follow these steps to create a static binding and enable IP address check:
6-5
Via the DHCP relay agent, a DHCP client sends a DHCP-RELEASE unicast message to the DHCP
server to relinquish its IP address. In this case the DHCP relay agent simply conveys the message to
the DHCP server, thus it does not remove the IP address from its bindings. To solve this problem, the
DHCP relay agent can update dynamic bindings at a specified interval.
The DHCP relay agent uses the IP address of a client and the MAC address of the DHCP relay
interface to periodically send a DHCP-REQUEST message to the DHCP server.
z If the server returns a DHCP-ACK message or does not return any message within a specified
interval, which means the IP address is assignable now, the DHCP relay agent will update its
bindings by aging out the binding entry of the IP address.
z If the server returns a DHCP-NAK message, which means the IP address is still in use, the relay
agent will not age it out.
Follow these steps to configure dynamic binding update interval:
There are unauthorized DHCP servers on networks, which reply DHCP clients with wrong IP
addresses.
With this feature enabled, upon receiving a DHCP request, the DHCP relay agent will record the IP
address of the DHCP server which assigned an IP address to the DHCP client and the receiving
interface. The administrator can use this information to check out any DHCP unauthorized servers.
6-6
With the unauthorized DHCP server detection enabled, the device puts a record once for each DHCP
server. The administrator needs to find unauthorized DHCP servers from the log information. After the
information of recorded DHCP servers is cleared, the relay agent will re-record server information
following this mechanism.
This task allows you to release a clients IP address manually on the DHCP relay agent. After you
configure this task, the DHCP relay agent actively sends a DHCP-RELEASE request that contains the
clients IP address to be released. Upon receiving the DHCP-RELEASE request, the DHCP server
then releases the IP address for the client; meanwhile, the clients IP-to-MAC binding entry is removed
from the DHCP relay agent.
Follow these steps to configure the DHCP relay agent in system view to send a DHCP-RELEASE
request:
Prerequisites
You need to complete the following tasks before configuring the DHCP relay agent to support Option
82.
z Enabling DHCP
z Enabling the DHCP relay agent on the specified interface
z Correlating a DHCP server group with relay agent interfaces
6-7
Follow these steps to configure the DHCP relay agent to support Option 82:
z To support Option 82, it is required to perform related configuration on both the DHCP server and
relay agent.
z If the handling strategy of the DHCP relay agent is configured as replace, you need to configure a
padding format for Option 82. If the handling strategy is keep or drop, you need not configure any
padding format.
z If sub-option 1 (node identifier) of Option 82 is padded with the device name (sysname) of a node,
6-8
Network requirements
VLAN-interface 1 on the DHCP relay agent (Switch A) connects to the network where DHCP clients
reside. The IP address of VLAN-interface 1 is 10.10.1.1/24 and IP address of VLAN-interface 2 is
10.1.1.2/24 that communicates with the DHCP server 10.1.1.1/24. As shown in Figure 6-3, Switch A
forwards messages between DHCP clients and the DHCP server.
6-9
Configuration procedure
Because the DHCP relay agent and server are on different subnets, you need to configure a static
route or dynamic routing protocol to make them reachable to each other.
Network requirements
z As shown in Figure 6-3, Enable Option 82 on the DHCP relay agent (Switch A).
z Configure the handling strategy for DHCP requests containing Option 82 as replace.
z Configure the padding content for the circuit ID sub-option as company001 and for the remote ID
sub-option as device001.
z Switch A forwards DHCP requests to the DHCP server after replacing Option 82 in the requests,
so that the DHCP clients can obtain IP addresses.
6-10
# Enable the DHCP relay agent to support Option 82, and perform Option 82-related configurations.
[SwitchA-Vlan-interface1] dhcp relay information enable
[SwitchA-Vlan-interface1] dhcp relay information strategy replace
[SwitchA-Vlan-interface1] dhcp relay information circuit-id string company001
[SwitchA-Vlan-interface1] dhcp relay information remote-id string device001
You need to perform corresponding configurations on the DHCP server to make the Option 82
configurations function normally.
DHCP clients cannot obtain any configuration parameters via the DHCP relay agent.
Analysis
Some problems may occur with the DHCP relay agent or server configuration. Enable debugging and
execute the display command on the DHCP relay agent to view the debugging information and
interface state information for locating the problem.
Solution
Check that:
z The address pool on the same subnet where DHCP clients reside is available on the DHCP
server.
z The routes between the DHCP server and DHCP relay agent are reachable.
z The relay agent interface connected to DHCP clients is correlated with correct DHCP server group
and IP addresses for the group members are correct.
6-11
When configuring the DHCP client, go to these sections for information you are interested in:
z Introduction to DHCP Client
z Enabling the DHCP Client on an Interface
z Displaying and Maintaining the DHCP Client
z DHCP Client Configuration Example
7-1
As shown in Figure 7-1, on a LAN, Switch A contacts the DHCP server via VLAN-interface 2 to obtain
an IP address, DNS server address, and static route information. The IP address resides on network
10.1.1.0/24. The DNS server address is 20.1.1.1. The next hop of the static route to network
20.1.1.0/24 is 10.1.1.2.
The DHCP server uses Option 121 to assign static route information to DHCP The destination
descriptor field comprises two parts, subnet mask length and destination network address. In this
example, the value of the destination descriptor field takes 18 14 01 01, a hexadecimal number
indicating that the subnet mask length is 24 and destination network address is 20.1.1.0, and the value
of the next hop address field takes 0A 01 01 02, a hexadecimal number indicating that the next hop is
10.1.1.2.
Figure 7-1 Network diagram for DHCP client configuration example
7-2
1) Configure Switch A
# Enable the DHCP client on VLAN-interface 2.
<SwitchA> system-view
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] ip address dhcp-alloc
2) Verification
# Use the display dhcp client command to view the IP address and other network parameters
assigned to Switch A.
[SwitchA-Vlan-interface2] display dhcp client verbose
Vlan-interface2 DHCP client information:
Current machine state: BOUND
Allocated IP: 10.1.1.3 255.255.255.0
Allocated lease: 864000 seconds, T1: 432000 seconds, T2: 756000 seconds
Lease from 2009.02.20 11:06:35 to 2009.03.02 11:06:35
DHCP server: 10.1.1.1
Transaction ID: 0x410090f0
Classless static route:
Destination: 20.1.1.0, Mask: 255.255.255.0, NextHop: 10.1.1.2
DNS server: 20.1.1.1
Client ID: 3030-3066-2e65-3230-
302e-3030-3032-2d45-
7468-6572-6e65-7430-
2f30
T1 will timeout in 4 days 23 hours 59 minutes 50 seconds.
# Use the display ip routing-table command to view the route information on Switch A. A static route
to network 20.1.1.0/24 is added to the routing table.
[SwitchA-Vlan-interface2] display ip routing-table
Routing Tables: Public
Destinations : 5 Routes : 5
7-3
When configuring DHCP snooping, go to these sections for information you are interested in:
z DHCP Snooping Overview
z Configuring DHCP Snooping Basic Functions
z Configuring DHCP Snooping to Support Option 82
z Displaying and Maintaining DHCP Snooping
z DHCP Snooping Configuration Examples
z The DHCP snooping enabled device does not work if it is between the DHCP relay agent and
DHCP server, and it can work when it is between the DHCP client and relay agent or between the
DHCP client and server.
z You are not recommended to enable the DHCP client, BOOTP client, and DHCP snooping on the
same device. Otherwise, DHCP snooping entries may fail to be generated, or the BOOTP
client/DHCP client may fail to obtain an IP address.
If there is an unauthorized DHCP server on a network, the DHCP clients may obtain invalid IP
addresses and network configuration parameters, and cannot normally communicate with other
network devices. With DHCP snooping, the ports of a device can be configured as trusted or untrusted,
ensuring the clients to obtain IP addresses from authorized DHCP servers.
z Trusted: A trusted port forwards DHCP messages normally.
z Untrusted: An untrusted port discards the DHCP-ACK or DHCP-OFFER messages from any
DHCP server.
You should configure ports that connecting to authorized DHCP servers and other DHCP snooping
devices as trusted, and other ports as untrusted. With such configurations, DHCP clients obtain IP
addresses from authorized DHCP servers only, while unauthorized DHCP servers cannot assign IP
addresses to DHCP clients.
8-1
DHCP snooping reads DHCP-REQUEST messages and DHCP-ACK messages from trusted ports to
record DHCP snooping entries, including MAC addresses of clients, IP addresses obtained by the
clients, ports that connect to DHCP clients, and VLANs to which the ports belong. With DHCP
snooping entries, DHCP snooping can implement the following:
z ARP detection: Whether ARP packets are sent from an authorized client is determined based on
DHCP snooping entries. This feature prevents ARP attacks from unauthorized clients. For details,
refer to ARP Configuration in the IP Services Volume.
z IP Source Guard: IP Source Guard uses dynamic binding entries generated by DHCP snooping to
filter packets on a per-port basis, and thus prevents unauthorized packets from traveling through.
For details, refer to IP Source Guard Configuration in the Security Volume.
DHCP server
Trusted
DHCP snooping
Untrusted Untrusted
As shown in Figure 8-1, a DHCP snooping devices port that is connected to an authorized DHCP
server should be configured as a trusted port to forward reply messages from the DHCP server, so that
the DHCP client is guaranteed to obtain IP addresses from the authorized DHCP server.
In a cascaded network involving multiple DHCP snooping devices, the ports connected to other DHCP
snooping devices should be configured as trusted ports.
To save system resources, you can disable the trusted ports, which are indirectly connected to DHCP
clients, from recording clients IP-to-MAC bindings upon receiving DHCP requests.
8-2
Option 82 records the location information of the DHCP client. The administrator can locate the DHCP
client to further implement security control and accounting. For more information, refer to Relay agent
option (Option 82).
If DHCP snooping supports Option 82, it will handle a clients request according to the contents defined
in Option 82, if any. The handling strategies are described in the table below.
If a reply returned by the DHCP server contains Option 82, the DHCP snooping device will remove the
Option 82 before forwarding the reply to the client. If the reply contains no Option 82, the DHCP
snooping device forwards it directly.
8-3
The handling strategy and padding format for Option 82 on the DHCP snooping device are the same
as those on the relay agent.
Required
Enable DHCP snooping dhcp-snooping
Disabled by default.
interface interface-type
Enter Ethernet interface view
interface-number
8-4
You need to enable the DHCP snooping function before configuring DHCP snooping to support Option
82.
interface interface-type
Enter interface view
interface-number
8-5
z You can enable DHCP snooping to support Option 82 on Layer 2 Ethernet interfaces only.
z To support Option 82, it is required to perform related configuration on both the DHCP server and
the device enabled with DHCP snooping.
z If the handling strategy of the DHCP-snooping-enabled device is configured as replace, you need
to configure a padding format for Option 82. If the handling strategy is keep or drop, you need not
configure any padding format.
z If the Option 82 is padded with the device name (sysname) of a node, the device name must
contain no spaces. Otherwise, the DHCP-snooping-enabled device will drop the message.
8-6
Network requirements
z As shown in Figure 8-3, Switch B is connected to a DHCP server through GigabitEthernet 1/0/1,
and to two DHCP clients through GigabitEthernet 1/0/2 and GigabitEthernet 1/0/3.
z GigabitEthernet 1/0/1 forwards DHCP server responses while the other two do not.
z Switch B records clients IP-to-MAC address bindings in DHCP-REQUEST messages and
DHCP-ACK messages received from trusted ports.
Figure 8-3 Network diagram for DHCP snooping configuration
Configuration procedure
8-7
Network requirements
z As shown in Figure 8-3, enable DHCP snooping and Option 82 support on Switch B.
z Configure the handling strategy for DHCP requests containing Option 82 as replace.
z On GigabitEthernet 1/0/2, configure the padding content for the circuit ID sub-option as
company001 and for the remote ID sub-option as device001.
z On GigabitEthernet 1/0/3, configure the padding format as verbose, access node identifier as
sysname, and code type as ascii for Option 82.
z Switch B forwards DHCP requests to the DHCP server after replacing Option 82 in the requests,
so that the DHCP clients can obtain IP addresses.
Configuration procedure
8-8
While configuring a BOOTP client, go to these sections for information you are interested in:
z Introduction to BOOTP Client
z Configuring an Interface to Dynamically Obtain an IP Address Through BOOTP
z Displaying and Maintaining BOOTP Client Configuration
BOOTP Application
After you specify an interface of a device as a BOOTP client, the interface can use BOOTP to get
information (such as IP address) from the BOOTP server, which simplifies your configuration.
Before using BOOTP, an administrator needs to configure a BOOTP parameter file for each BOOTP
client on the BOOTP server. The parameter file contains information such as MAC address and IP
address of a BOOTP client. When a BOOTP client originates a request to the BOOTP server, the
BOOTP server will search for the BOOTP parameter file and return the corresponding configuration
information.
Because you need to configure a parameter file for each client on the BOOTP server, BOOTP usually
runs under a relatively stable environment. If the network changes frequently, DHCP is more suitable.
9-1
A DHCP server can take the place of the BOOTP server in the following dynamic IP address
acquisition.
A BOOTP client dynamically obtains an IP address from a BOOTP server in the following steps:
1) The BOOTP client broadcasts a BOOTP request, which contains its own MAC address.
2) The BOOTP server receives the request and searches the configuration file for the corresponding
IP address and other information according to the MAC address of the BOOTP client. The BOOTP
server then returns a BOOTP response to the BOOTP client.
3) The BOOTP client obtains the IP address from the received response.
interface interface-type
Enter interface view
interface-number
Required
Configure an interface to
dynamically obtain IP address ip address bootp-alloc By default, an interface does
through BOOTP not use BOOTP to obtain an IP
address.
9-2
As shown in Figure 9-1, Switch Bs port belonging to VLAN 1 is connected to the LAN. VLAN-interface
1 obtains an IP address from the DHCP server by using BOOTP.
Figure 9-1 Network diagram for BOOTP
Client WINS server
10.1.1.4/25 Vlan-int1
10.1.1.126/25 10.1.1.1/25
Switch B
DNS server
Client
Configuration procedure
9-3
When configuring DNS, go to these sections for information you are interested in:
z DNS Overview
z Configuring the DNS Client
z Configuring the DNS Proxy
z Displaying and Maintaining DNS
z DNS Configuration Examples
z Troubleshooting DNS Configuration
This document only covers IPv4 DNS configuration. For information about IPv6 DNS configuration,
refer to IPv6 Basics Configuration in the IP Services Volume.
DNS Overview
Domain Name System (DNS) is a distributed database used by TCP/IP applications to translate
domain names into corresponding IP addresses. With DNS, you can use easy-to-remember domain
names in some applications and let the DNS server translate them into correct IP addresses.
There are two types of DNS services, static and dynamic. After a user specifies a name, the device
checks the local static name resolution table for an IP address. If no IP address is available, it contacts
the DNS server for dynamic name resolution, which takes more time than static name resolution.
Therefore, some frequently queried name-to-IP address mappings are stored in the local static name
resolution table to improve efficiency.
The static domain name resolution means setting up mappings between domain names and IP
addresses. IP addresses of the corresponding domain names can be found in the static domain
resolution table when you use applications such as Telnet.
Resolving procedure
Dynamic domain name resolution is implemented by querying the DNS server. The resolution
procedure is as follows:
1) A user program sends a name query to the resolver of the DNS client.
2) The DNS resolver looks up the local domain name cache for a match. If a match is found, it sends
the corresponding IP address back. If not, it sends a query to the DNS server.
10-1
Figure 10-1 shows the relationship between the user program, DNS client, and DNS server.
The resolver and cache comprise the DNS client. The user program and DNS client can run on the
same device or different devices, while the DNS server and the DNS client usually run on different
devices.
Dynamic domain name resolution allows the DNS client to store latest mappings between domain
names and IP addresses in the dynamic domain name cache. There is no need to send a request to
the DNS server for a repeated query next time. The aged mappings are removed from the cache after
some time, and latest entries are required from the DNS server. The DNS server decides how long a
mapping is valid, and the DNS client gets the aging information from DNS messages.
DNS suffixes
The DNS client normally holds a list of suffixes which can be defined by users. It is used when the
name to be resolved is incomplete. The resolver can supply the missing part. For example, a user can
configure com as the suffix for aabbcc.com. The user only needs to type aabbcc to get the IP address
of aabbcc.com. The resolver can add the suffix and delimiter before passing the name to the DNS
server.
z If there is no dot in the domain name (for example, aabbcc), the resolver will consider this a host
name and add a DNS suffix before query. If no match is found after all the configured suffixes are
used respectively, the original domain name (for example, aabbcc) is used for query.
z If there is a dot in the domain name (for example, www.aabbcc), the resolver will directly use this
domain name for query. If the query fails, the resolver adds a DNS suffix for another query.
z If the dot is at the end of the domain name (for example, aabbcc.com.), the resolver will consider it
a fully qualified domain name (FQDN) and return the query result, successful or failed. Hence, the
dot . at the end of the domain name is called the terminating symbol.
Currently, the device supports static and dynamic DNS services.
10-2
DNS Proxy
A DNS proxy forwards DNS requests and replies between DNS clients and a DNS server.
As shown in Figure 10-2, a DNS client sends a DNS request to the DNS proxy, which forwards the
request to the designated DNS server, and conveys the reply from the DNS server to the client.
The DNS proxy simplifies network management. When the DNS server address is changed, you only
need to change the configuration on the DNS proxy instead of on each DNS client.
Figure 10-2 DNS proxy networking application
1) A DNS client considers the DNS proxy as the DNS server, and sends a DNS request to the DNS
proxy, that is, the destination address of the request is the IP address of the DNS proxy.
2) The DNS proxy searches the local static domain name resolution table after receiving the request.
If the requested information exists in the table, the DNS proxy returns a DNS reply to the client.
3) If the requested information does not exist in the static domain name resolution table, the DNS
proxy sends the request to the designated DNS server for domain name resolution.
4) After receiving a reply from the DNS server, the DNS proxy forwards the reply to the DNS client.
10-3
The IP address you last assign to the host name will overwrite the previous one if there is any.
You may create up to 50 static mappings between domain names and IP addresses.
You may configure up to six DNS servers and ten DNS suffixes.
10-4
Required
Enable DNS proxy dns proxy enable
Disabled by default.
Network requirements
Switch uses the static domain name resolution to access Host with IP address 10.1.1.2 through
domain name host.com.
Figure 10-3 Network diagram for static domain name resolution
Configuration procedure
# Execute the ping host.com command to verify that the Switch can use the static domain name
resolution to get the IP address 10.1.1.2 corresponding to host.com.
[Sysname] ping host.com
PING host.com (10.1.1.2):
10-5
Network requirements
z The IP address of the DNS server is 2.1.1.2/16 and the name suffix is com. The mapping between
domain name Host and IP address 3.1.1.1/16 is stored in the com domain.
z Switch serves as a DNS client, and uses the dynamic domain name resolution and the suffix to
access the host with the domain name host.com and the IP address 3.1.1.1/16.
Figure 10-4 Network diagram for dynamic domain name resolution
Configuration procedure
z Before performing the following configuration, make sure that there is a route between the Switch
and the host, and the IP addresses of the interfaces are configured as shown Figure 10-4.
z This configuration may vary with different DNS servers. The following configuration is performed
on a Windows server 2000.
10-6
In Figure 10-6, right click zone com, and then select New Host to bring up a dialog box as shown in
Figure 10-7. Enter host name host and IP address 3.1.1.1.
10-7
3) Configuration verification
# Execute the ping host command on the Switch to verify that the communication between the Switch
and the host is normal and that the corresponding destination IP address is 3.1.1.1.
[Sysname] ping host
Trying DNS resolve, press CTRL_C to break
Trying DNS server (2.1.1.2)
PING host.com (3.1.1.1):
56 data bytes, press CTRL_C to break
Reply from 3.1.1.1: bytes=56 Sequence=1 ttl=126 time=3 ms
Reply from 3.1.1.1: bytes=56 Sequence=2 ttl=126 time=1 ms
Reply from 3.1.1.1: bytes=56 Sequence=3 ttl=126 time=1 ms
Reply from 3.1.1.1: bytes=56 Sequence=4 ttl=126 time=1 ms
Reply from 3.1.1.1: bytes=56 Sequence=5 ttl=126 time=1 ms
10-8
Network requirements
Configuration procedure
Before performing the following configuration, assume that Switch A, the DNS server, and the host are
reachable to each other and the IP addresses of the interfaces are configured as shown in Figure 10-8.
10-9
After enabling the dynamic domain name resolution, the user cannot get the correct IP address.
Solution
z Use the display dns dynamic-host command to verify that the specified domain name is in the
cache.
z If the specified domain name does not exist, check that dynamic domain name resolution is
enabled and the DNS client can communicate with the DNS server.
z If the specified domain name is in the cache, but the IP address is incorrect, check that the DNS
client has the correct IP address of the DNS server.
z Verify the mapping between the domain name and IP address is correct on the DNS server.
10-10
When optimizing IP performance, go to these sections for information you are interested in:
z IP Performance Overview
z Enabling Reception and Forwarding of Directed Broadcasts to a Directly Connected Network
z Configuring TCP Optional Parameters
z Configuring ICMP to Send Error Packets
z Displaying and Maintaining IP Performance Optimization
IP Performance Overview
In some network environments, you can adjust the IP parameters to achieve best network
performance. IP performance optimization configuration includes:
z Enabling the device to receive and forward directed broadcasts
z Configuring TCP timers
z Configuring the TCP buffer size
z Enabling ICMP error packets sending
If a device is enabled to receive directed broadcasts, the device will determine whether to forward
them according to the configuration on the outgoing interface.
Follow these steps to enable the device to receive directed broadcasts:
11-1
interface interface-type
Enter interface view
interface-number
Required
Enable the interface to forward ip forward-broadcast [ acl By default, the device is
directed broadcasts acl-number ] disabled from forwarding
directed broadcasts.
Configuration Example
Network requirements
As shown in Figure 11-1, the hosts interface and VLAN-interface 3 of Switch A are on the same
network segment (1.1.1.0/24). VLAN-interface 2 of Switch A and VLAN-interface 2 of Switch B are on
another network segment (2.2.2.0/24). The default gateway of the host is VLAN-interface 3 (IP address
1.1.1.2/24) of Switch A. Configure a static route on Switch B to enable the reachability between host
and Switch B.
Figure 11-1 Network diagram for receiving and forwarding directed broadcasts
Configuration procedure
z Configure Switch A
# Enable Switch A to receive directed broadcasts.
<SwitchA> system-view
[SwitchA] ip forward-broadcast
11-2
z Configure Switch B
# Enable Switch B to receive directed broadcasts.
<SwitchB> system-view
[SwitchB] ip forward-broadcast
After the above configurations, if you ping the subnet broadcast address (2.2.2.255) of VLAN-interface
2 of Switch A on the host, the ping packets can be received by VLAN-interface 2 of Switch B. However,
if you disable the ip forward-broadcast command, the ping packets cannot be received by the
VLAN-interface 2 of Switch B.
11-3
There are three kinds of ICMP error packets: redirect packets, timeout packets and destination
unreachable packets. Their sending conditions and functions are as follows.
1) Sending ICMP redirect packets
A host may have only a default route to the default gateway in its routing table after startup. The default
gateway will send ICMP redirect packets to the source host, telling it to reselect a correct next hop to
send the subsequent packets, if the following conditions are satisfied:
z The receiving and forwarding interfaces are the same.
z The selected route has not been created or modified by ICMP redirect packet.
z The selected route is not the default route of the device.
z There is no source route option in the packet.
ICMP redirect packets function simplifies host administration and enables a host to gradually establish
a sound routing table to find out the best route.
2) Sending ICMP timeout packets
If the device received an IP packet with a timeout error, it drops the packet and sends an ICMP timeout
packet to the source.
The device will send an ICMP timeout packet under the following conditions:
z If the device finds the destination of a packet is not itself and the TTL field of the packet is 1, it will
send a TTL timeout ICMP error message.
z When the device receives the first fragment of an IP datagram whose destination is the device
itself, it starts a timer. If the timer times out before all the fragments of the datagram are received,
the device will send a reassembly timeout ICMP error packet.
3) Sending ICMP destination unreachable packets
If the device receives an IP packet with the destination unreachable, it will drop the packet and send an
ICMP destination unreachable error packet to the source.
Conditions for sending this ICMP packet:
z If neither a route nor the default route for forwarding a packet is available, the device will send a
network unreachable ICMP error packet.
11-4
Although sending ICMP error packets facilitates network control and management, it still has the
following disadvantages:
z Sending a lot of ICMP packets will increase network traffic.
z If a device receives a lot of malicious packets that cause it to send ICMP error packets, its
performance will be reduced.
z As the redirection function increases the routing table size of a host, the hosts performance will be
reduced if its routing table becomes very large.
z If a host sends malicious ICMP destination unreachable packets, end users may be affected.
To prevent such problems, you can disable the device from sending ICMP error packets.
Follow these steps to disable sending of ICMP error packets:
The device stops sending TTL timeout ICMP error packets after sending ICMP timeout packets is
disabled. However, reassembly timeout error packets will be sent normally.
11-5
11-6
When configuring UDP Helper, go to these sections for information you are interested in:
z Introduction to UDP Helper
z Configuring UDP Helper
z Displaying and Maintaining UDP Helper
z UDP Helper Configuration Examples
12-1
z The UDP Helper enabled device cannot forward DHCP broadcast packets. That is to say, the
UDP port number cannot be set to 67 or 68.
z For the dns, netbios-ds, netbios-ns, tacacs, tftp, and time keywords, you can specify port
numbers or the corresponding parameters. For example, udp-helper port 53 and udp-helper
port dns specify the same UDP port number.
z The configuration of all UDP ports is removed if you disable UDP Helper.
z You can configure up to 256 UDP port numbers to enable the forwarding of packets with these
UDP port numbers.
z You can configure up to 20 destination servers on an interface.
Network requirements
On Switch A, configure UDP helper to forward broadcast packets (with UDP destination port number
55 and destination IP address 255.255.255.255 or 10.110.255.255 to the destination server
10.2.1.1/16.
12-2
Configuration procedure
The following configuration assumes that a route from Switch A to the network segment 10.2.0.0/16 is
available.
# Enable the forwarding broadcast packets with the UDP destination port 55.
[SwitchA] udp-helper port 55
12-3
When configuring IPv6 basics, go to these sections for information you are interested in:
z IPv6 Overview
z IPv6 Basics Configuration Task List
z Configuring Basic IPv6 Functions
z Configuring IPv6 NDP
z Configuring PMTU Discovery
z Configuring IPv6 TCP Properties
z Configuring ICMPv6 Packet Sending
z Configuring IPv6 DNS Client
z Displaying and Maintaining IPv6 Basics Configuration
z IPv6 Configuration Example
z Troubleshooting IPv6 Basics Configuration
The term router or the router icon in this document refers to a router in a generic sense or a Layer 3
Ethernet switch running a routing protocol.
IPv6 Overview
Internet Protocol Version 6 (IPv6), also called IP next generation (IPng), was designed by the Internet
Engineering Task Force (IETF) as the successor to Internet Protocol Version 4 (IPv4). The significant
difference between IPv6 and IPv4 is that IPv6 increases the IP address size from 32 bits to 128 bits.
This section covers the following:
z IPv6 Features
z Introduction to IPv6 Address
z Introduction to IPv6 Neighbor Discovery Protocol
z IPv6 PMTU Discovery
z Introduction to IPv6 DNS
z Protocols and Standards
IPv6 Features
IPv6 cuts down some IPv4 header fields or move them to the IPv6 extension headers to reduce the
length of the basic IPv6 header. IPv6 uses the basic header with a fixed length, thus making IPv6
packet handling simple and improving the forwarding efficiency. Although the IPv6 address size is four
13-1
The source and destination IPv6 addresses are both 128 bits (16 bytes) long. IPv6 can provide 3.4 x
1038 addresses to fully meet the requirements of hierarchical address division as well as allocation of
public and private addresses.
IPv6 adopts the hierarchical address structure to quicken route search and reduce the system sources
occupied by the IPv6 routing table by route aggregation.
To simplify host configuration, IPv6 supports stateful and stateless address configuration.
z Stateful address configuration means that a host acquires an IPv6 address and related
information from a server (for example, a DHCP server).
z Stateless address configuration means that a host automatically generates an IPv6 address and
related information on the basis of its own link-layer address and the prefix information advertised
by a router.
In addition, a host can generate a link-local address on the basis of its own link-layer address and the
default prefix (FE80::/10) to communicate with other hosts on the same link.
Built-in security
IPv6 uses IPSec as its standard extension header to provide end-to-end security. This feature provides
a standard for network security solutions and enhances the interoperability between different IPv6
applications.
QoS support
The Flow Label field in the IPv6 header allows the device to label packets of a flow and provide special
handling for these packets.
13-2
The IPv6 neighbor discovery protocol is implemented through a group of Internet Control Message
Protocol Version 6 (ICMPv6) messages that manage the information exchange between neighbor
nodes on the same link. The group of ICMPv6 messages takes the place of Address Resolution
Protocol (ARP) messages, Internet Control Message Protocol version 4 (ICMPv4) router discovery
messages, and ICMPv4 redirection messages and provides a series of other functions.
IPv6 cancels the Options field in the IPv4 header but introduces multiple extension headers to provide
scalability while improving efficiency. The Options field contains 40 bytes at most, while the size of
IPv6 extension headers is restricted to the maximum size of IPv6 packets.
An IPv6 address is represented as a set of 16-bit hexadecimals, separated by colons. An IPv6 address
is divided into eight groups, and the 16 bits of each group are represented by four hexadecimal
numbers, for example, 2001:0000:130F:0000:0000:09C0:876A:130B.
To simplify the representation of IPv6 addresses, zeros in IPv6 addresses can be handled as follows:
z Leading zeros in each group can be removed. For example, the above-mentioned address can be
represented in a shorter format as 2001:0:130F:0:0:9C0:876A:130B.
z If an IPv6 address contains two or more consecutive groups of zeros, they can be replaced by a
double-colon ::. For example, the above-mentioned address can be represented in the shortest
format as 2001:0:130F::9C0:876A:130B.
A double-colon can be used only once in an IPv6 address. Otherwise, the device is unable to
determine how many zeros that double-colons represent when converting them to zeros to restore a
128-bit IPv6 address.
An IPv6 address consists of two parts: address prefix and interface ID. The address prefix and the
interface ID are respectively equivalent to the network ID and the host ID in an IPv4 address.
An IPv6 address prefix is written in IPv6-address/prefix-length notation, where the IPv6-address is in
any of the notations above mentioned, and prefix-length is a decimal number indicating how many bits
from the left-most of an IPv6 address is the address prefix.
IPv6 addresses fall into three types: unicast address, multicast address, and anycast address.
z Unicast address: An identifier for a single interface, similar to an IPv4 unicast address. A packet
sent to a unicast address is delivered to the interface identified by that address.
13-3
There are no broadcast addresses in IPv6. Their function is replaced by multicast addresses.
The type of an IPv6 address is designated by the first several bits called format prefix. Table 13-1 lists
the mappings between address types and format prefixes.
Global unicast
other forms
address
Multicast address 11111111 FF00::/8
Anycast addresses are taken from unicast address space
Anycast address and are not syntactically distinguishable from unicast
addresses.
Unicast address
There are several types of unicast addresses, including aggregatable global unicast address, link-local
address, and site-local address.
z The aggregatable global unicast addresses, equivalent to public IPv4 addresses, are provided for
network service providers. This type of address allows efficient prefix aggregation to restrict the
number of global routing entries.
z The link-local addresses are used for communication between link-local nodes in neighbor
discovery and stateless autoconfiguration. Packets with link-local source or destination addresses
are not forwarded to other links.
z IPv6 unicast site-local addresses are similar to private IPv4 addresses. Packets with site-local
source or destination addresses are not forwarded out of the local site (a private network).
z Loopback address: The unicast address 0:0:0:0:0:0:0:1 (represented in the shortest format as ::1)
is called the loopback address and may never be assigned to any physical interface. Like the
loopback address in IPv4, it may be used by a node to send an IPv6 packet to itself.
13-4
Multicast address
IPv6 multicast addresses listed in Table 13-2 are reserved for special purpose.
Address Application
FF01::1 Node-local scope all nodes multicast address
Besides, there is another type of multicast address: solicited-node address. A solicited-node multicast
address is used to acquire the link-layer address of a neighbor node on the same link, and is also used
for duplicate address detection (DAD). Each IPv6 unicast or anycast address has a corresponding
solicited-node address. The format of a solicited-node multicast address is as follows:
FF02:0:0:0:0:1:FFXX:XXXX
Where, FF02:0:0:0:0:1:FF is permanent and consists of 104 bits, and XX:XXXX is the last 24 bits of an
IPv6 unicast or anycast address.
An interface identifier is used to identify a unique interface on a link and is 64 bits long. An interface
identifier in IEEE EUI-64 format is derived from the link-layer address (MAC) of an interface. A MAC
address is 48 bits long and therefore, to get the interface identifier, the hexadecimal number FFFE
needs to be inserted in the middle of the MAC address (behind the 24 high-order bits). To ensure the
interface identifier obtained from a MAC address is unique, it is necessary to set the universal/local
(U/L) bit (the seventh high-order bit) to 1. Thus, an interface identifier in IEEE EUI-64 format is
obtained.
Figure 13-2 Convert a MAC address into an EUI-64 interface identifier
13-5
The IPv6 Neighbor Discovery Protocol (NDP) uses five types of ICMPv6 messages to implement the
following functions:
z Address resolution
z Neighbor reachability detection
z Duplicate address detection
z Router/prefix discovery and address autoconfiguration
z Redirection
Table 13-3 lists the types and functions of ICMPv6 messages used by the NDP.
Address resolution
Similar to the ARP function in IPv4, a node acquires the link-layer addresses of neighbor nodes on the
same link through NS and NA messages. Figure 13-3 shows how node A acquires the link-layer
address of node B.
13-6
After node A acquires the link-layer address of its neighbor node B, node A can verify whether node B
is reachable according to NS and NA messages.
1) Node A sends an NS message whose destination address is the IPv6 address of node B.
2) If node A receives an NA message from node B, node A considers that node B is reachable.
Otherwise, node B is unreachable.
After node A acquires an IPv6 address, it will perform duplicate address detection (DAD) to determine
whether the address is being used by any other node (similar to the gratuitous ARP function of IPv4).
DAD is accomplished through NS and NA messages. Figure 13-4 shows the DAD procedure.
Figure 13-4 Duplicate address detection
13-7
Router/prefix discovery means that a node locates the neighboring routers, and learns the prefix of the
network where the host is located, and other configuration parameters from the received RA message.
Stateless address autoconfiguration means that a node automatically generates an IPv6 address
according to the information obtained through router/prefix discovery.
The router/prefix discovery is implemented through RS and RA messages. The router/prefix discovery
procedure is as follows:
1) After started, a node sends an RS message to request the router for the address prefix and other
configuration information for the purpose of autoconfiguration.
2) The router returns an RA message containing information such as prefix information option. (The
router also regularly sends an RA message.)
3) The node automatically generates an IPv6 address and other information for its interface
according to the address prefix and other configuration parameters in the RA message.
z In addition to an address prefix, the prefix information option also contains the preferred lifetime
and valid lifetime of the address prefix. After receiving a periodic RA message, the node updates
the preferred lifetime and valid lifetime of the address prefix accordingly.
z An automatically generated address is applicable within the valid lifetime and is removed when the
valid lifetime times out.
Redirection
When a host is started, its routing table may contain only the default route to the gateway. When
certain conditions are satisfied, the gateway sends an ICMPv6 redirect message to the source host so
that the host can select a better next hop to forward packets (similar to the ICMP redirection function in
IPv4).
The gateway sends an IPv6 ICMP redirect message when the following conditions are satisfied:
z The receiving interface is the forwarding interface.
z The selected route itself is not created or modified by an IPv6 ICMP redirect message.
z The selected route is not the default route.
z The forwarded IPv6 packet does not contain any routing extension header.
The links that a packet passes from the source to the destination may have different MTUs. In IPv6,
when the packet size exceeds the path MTU ( the minimum MTU of all links), the packet will be
fragmented at the source end so as to reduce the processing pressure of forwarding devices and
utilize network resources properly.
13-8
IPv6 Domain Name System (DNS) is responsible for translating domain names into IPv6 addresses,
instead of IPv4 addresses.
Like IPv4 DNS, IPv6 DNS also involves static domain name resolution and dynamic domain name
resolution. The function and implementation of these two types of domain name resolution are the
same as those of IPv4 DNS. For details, refer to DNS Configuration in the IP Services Volume.
Usually, the DNS server connecting IPv4 and IPv6 networks not only contains A records (IPv4
addresses), but also AAAA records (IPv6 addresses). The DNS server can convert domain names into
IPv4 addresses or IPv6 addresses. In this way, the DNS server implements the functions of both IPv6
DNS and IPv4 DNS.
13-9
Task Remarks
Configuring Basic IPv6 Functions Required
Configuring IPv6 NDP Optional
Configuring PMTU Discovery Optional
Configuring IPv6 TCP Properties Optional
Configuring ICMPv6 Packet Sending Optional
Configuring IPv6 DNS Client Optional
Before performing IPv6-related configurations, you need to Enable IPv6. Otherwise, an interface
cannot forward IPv6 packets even if it has an IPv6 address configured.
Follow these steps to Enable IPv6:
Required
Enable IPv6 ipv6
Disabled by default.
IPv6 site-local addresses and aggregatable global unicast addresses can be configured in the
following ways:
z EUI-64 format: When the EUI-64 format is adopted, the IPv6 address prefix of an interface is the
configured prefix, and the interface identifier is derived from the link-layer address of the interface.
z Manual configuration: IPv6 site-local addresses or aggregatable global unicast addresses are
configured manually.
IPv6 link-local addresses can be configured in either of the following ways:
z Automatic generation: The device automatically generates a link-local address for an interface
according to the link-local address prefix (FE80::/10) and the link-layer address of the interface.
13-10
z After an IPv6 site-local address or aggregatable global unicast address is configured for an
interface, a link-local address is generated automatically. The automatically generated link-local
address is the same as the one generated by using the ipv6 address auto link-local command. If
a link-local address is manually assigned to an interface, this manual link-local address takes
effect. If the manually assigned link-local address is removed, the automatically generated
link-local address takes effect.
z Manual assignment takes precedence over automatic generation. That is, if you first adopt
automatic generation and then manual assignment, the manually assigned link-local address will
overwrite the automatically generated one. If you first adopt manual assignment and then
automatic generation, the automatically generated link-local address will not take effect and the
link-local address of an interface is still the manually assigned one. If you delete the manually
assigned address, the automatically generated link-local address is validated.
z The undo ipv6 address auto link-local command can only remove the link-local addresses
generated through the ipv6 address auto link-local command. However, if an IPv6 site-local
address or aggregatable global unicast address is already configured for an interface, the
interface still has a link-local address because the system automatically generates one for the
interface. If no IPv6 site-local address or aggregatable global unicast address is configured, the
interface has no link-local address.
13-11
The IPv6 address of a neighbor node can be resolved into a link-layer address dynamically through NS
and NA messages or through a manually configured static neighbor entry.
The device uniquely identifies a static neighbor entry according to the neighbor IPv6 address and the
local Layer 3 interface ID. Currently, there are two configuration methods:
z Associate a neighbor IPv6 address and link-layer address with a Layer 3 interface.
z Associate a neighbor IPv6 address and link-layer address with a port in a VLAN.
Follow these steps to configure a static neighbor entry:
You can adopt either of the two methods above to configure a static neighbor entry.
z After a static neighbor entry is configured by using the first method, the device needs to resolve
the corresponding Layer 2 port information of the VLAN interface.
z If you adopt the second method, you should ensure that the corresponding VLAN interface exists
and that the Layer 2 port specified by port-type port-number belongs to the VLAN specified by
vlan-id. After a static neighbor entry is configured, the device relates the VLAN interface to the
IPv6 address to uniquely identify a static neighbor entry.
The device can dynamically acquire the link-layer address of a neighbor node through NS and NA
messages and add it into the neighbor table. Too large a neighbor table may reduce the forwarding
performance of the device. You can restrict the size of the neighbor table by setting the maximum
number of neighbors that an interface can dynamically learn. When the number of dynamically learned
neighbors reaches the threshold, the interface will stop learning neighbor information.
Follow these steps to configure the maximum number of neighbors dynamically learned:
13-12
You can enable an interface to send RA messages, and configure the interval for sending RA
messages and parameters in RA messages. After receiving an RA message, a host can use these
parameters to perform corresponding operations. Table 13-4 lists the configurable parameters in an RA
message and their descriptions.
Parameters Description
When sending an IPv6 packet, a host uses the value to fill the Cur Hop
Cur hop limit Limit field in IPv6 headers. The value is also filled into the Cur Hop Limit
field in response messages of a device.
Prefix information After receiving the prefix information advertised by the device, the hosts on
options the same link can perform stateless autoconfiguration.
This field determines whether hosts use the stateful autoconfiguration to
acquire IPv6 addresses.
If the M flag is set to 1, hosts use the stateful autoconfiguration to acquire
M flag IPv6 addresses (for example, through a DHCP server). Otherwise, hosts
use the stateless autoconfiguration to acquire IPv6 addresses, that is,
hosts generate IPv6 addresses according to their own link-layer addresses
and the prefix information issued by the router.
This field determines whether hosts use the stateful autoconfiguration to
acquire information other than IPv6 addresses.
O flag If the O flag is set to 1, hosts use the stateful autoconfiguration to acquire
information other than IPv6 addresses (for example, through a DHCP
server). Otherwise, hosts use the stateless autoconfiguration to acquire
information other than IPv6 addresses.
This field is used to set the lifetime of the router that sends RA messages
to serve as the default router of hosts. According to the router lifetime in
Router lifetime
the received RA messages, hosts determine whether the router sending
RA messages can serve as the default router.
If the device fails to receive a response message within the specified time
Retrans timer
after sending an NS message, the device will retransmit the NS message.
The values of the Retrans Timer and the Reachable Time configured for an interface are sent to hosts
via RA messages. Furthermore, this interface sends NS messages at the interval of Retrans Timer and
considers a neighbor reachable within the Reachable Time.
13-13
Optional
By default, the maximum interval for
sending RA messages is 600 seconds, and
Configure the the minimum interval is 200 seconds.
maximum and ipv6 nd ra interval
minimum intervals for max-interval-value The device sends RA messages at random
sending RA min-interval-value intervals between the maximum interval
messages and the minimum interval.
The minimum interval should be less than
or equal to 0.75 times the maximum
interval.
ipv6 nd ra prefix Optional
{ ipv6-address prefix-length |
Configure the prefix By default, no prefix information is
ipv6-address/prefix-length }
information in RA configured for RA messages, and the IPv6
valid-lifetime
messages address of the interface sending RA
preferred-lifetime
[ no-autoconfig | off-link ] * messages is used as the prefix information.
Optional
ipv6 nd autoconfig By default, the M flag bit is set to 0, that is,
Set the M flag bit to 1
managed-address-flag hosts acquire IPv6 addresses through
stateless autoconfiguration.
Optional
ipv6 nd autoconfig By default, the O flag bit is set to 0, that is,
Set the O flag bit to 1
other-flag hosts acquire other information through
stateless autoconfiguration.
Configure the router Optional
ipv6 nd ra router-lifetime
lifetime in RA
value 1800 seconds by default.
messages
Optional
By default, the local interface sends NS
Set the NS ipv6 nd ns retrans-timer messages at an interval of 1000
retransmission timer value milliseconds, and the value of the Retrans
Timer field in RA messages sent by the
local interface is 0.
Optional
Set the reachable ipv6 nd nud By default, the neighbor reachable time on
time reachable-time value the local interface is 30000 milliseconds,
and the value of the Reachable Timer field
in RA messages is 0.
13-14
An interface sends a neighbor solicitation (NS) message for duplicate address detection after acquiring
an IPv6 address. If the interface does not receive a response within a specified time (determined by
the ipv6 nd ns retrans-timer command), it continues to send an NS message. If it still does not
receive a response after the number of sent attempts reaches a configurable threshold, the acquired
address is considered usable.
Follow these steps to configure the attempts to send an NS message for DAD:
You can configure a static PMTU for a specified destination IPv6 address. When a source host sends a
packet through an interface, it compares the interface MTU with the static PMTU of the specified
destination IPv6 address. If the packet size is larger than the smaller one between the two values, the
host fragments the packet according to the smaller value.
Follow these steps to configure a static PMTU for a specified address:
Required
Configure a static PMTU for a ipv6 pathmtu ipv6-address
specified IPv6 address [ value ] By default, no static PMTU is
configured.
After the path MTU from a source host to a destination host is dynamically determined (refer to IPv6
PMTU Discovery), the source host sends subsequent packets to the destination host on basis of this
13-15
If too many ICMPv6 error packets are sent within a short time in a network, network congestion may
occur. To avoid network congestion, you can control the maximum number of ICMPv6 error packets
sent within a specified time, currently by adopting the token bucket algorithm.
You can set the capacity of a token bucket, namely, the number of tokens in the bucket. In addition,
you can set the update interval of the token bucket, namely, the interval for restoring the configured
capacity. One token allows one ICMPv6 error packet to be sent. Each time an ICMPv6 error packet is
sent, the number of tokens in a token bucket decreases by one. If the number of ICMPv6 error packets
13-16
Optional
By default, the capacity of a token bucket is 10
Configure the and the update interval is 100 milliseconds. That
Ipv6 icmp-error { bucket
capacity and is, at most 10 IPv6 ICMP error packets can be
bucket-size | ratelimit
update interval of sent within 100 milliseconds.
interval } *
the token bucket The update interval 0 indicates that the
number of ICMPv6 error packets sent is not
restricted.
If hosts are capable of answering multicast echo requests, Host A can attack Host B by sending an
echo request with the source being Host B to a multicast address, then all the hosts in the multicast
group will send echo replies to Host B. Therefore, to prevent such an attack, a device is disabled from
replying multicast echo requests by default.
Follow these steps to enable sending of multicast echo replies:
13-17
Configuring static IPv6 domain name resolution is to establish the mapping between a host name and
an IPv6 address. When using such applications as Telnet, you can directly input a host name and the
system will resolve the host name into an IPv6 address. Each host name can correspond to only one
IPv6 address.
Follow these steps to configure static IPv6 domain name resolution:
You can use the following command to enable the dynamic domain name resolution function. In
addition, you need to configure a DNS server so that a query request message can be sent to the
correct server for resolution. The system can support at most six DNS servers.
You can configure a DNS suffix so that you only need to enter part of a domain name, and the system
can automatically add the preset suffix for address resolution. The system can support at most 10 DNS
suffixes.
Follow these steps to configure dynamic IPv6 domain name resolution:
Required
dns server ipv6 If the IPv6 address of the DNS server is a
Configure an IPv6 DNS
ipv6-address [ interface-type link-local address, you need to specify
server
interface-number ] the interface-type and interface-number
argument.
Required
By default, no domain name suffix is
Configure a DNS suffix dns domain domain-name configured, that is, the domain name is
resolved according to the input
information.
The dns resolve and dns domain commands are the same as those of IPv4 DNS. For details about
the commands, refer to DNS Commands in the IP Services Volume.
13-18
13-19
The display dns domain command is the same as the one of IPv4 DNS. For details about the
commands, refer to DNS Commands in the IP Services Volume.
z Host, Switch A and Switch B are directly connected through Ethernet ports. Add the Ethernet ports
into corresponding VLANs, configure IPv6 addresses for the VLAN interfaces and verify the
connectivity between them.
z The aggregatable global unicast addresses of VLAN-interface 2 and VLAN-interface 1 on Switch
A are 3001::1/64 and 2001::1/64 respectively.
z The aggregatable global unicast address of VLAN-interface 2 on Switch B is 3001::2/64, and a
route to Host is available.
z IPv6 is enabled for Host to automatically get an IPv6 address through IPv6 NDP, and a route to
Switch B is available.
Figure 13-6 Network diagram for IPv6 address configuration
Configuration procedure
z Configure Switch A
# Enable IPv6.
<SwitchA> system-view
[SwitchA] ipv6
13-20
z Configure Switch B
# Enable IPv6.
<SwitchB> system-view
[SwitchB] ipv6
# Configure an IPv6 static route with destination IP address 2001::/64 and next hop address 3001::1.
[SwitchB-Vlan-interface2] ipv6 route-static 2001:: 64 3001::1
z Configure Host
Enable IPv6 for Host to automatically get an IPv6 address through IPv6 NDP.
[SwitchA-Vlan-interface1] display ipv6 neighbors interface gigabitethernet 1/0/2
Type: S-Static D-Dynamic
IPv6 Address Link-layer VID Interface State T Age
FE80::215:E9FF:FEA6:7D14 0015-e9a6-7d14 1 GE1/0/2 STALE D 1238
2001::15B:E0EA:3524:E791 0015-e9a6-7d14 1 GE1/0/2 STALE D 1248
The above information shows that the IPv6 aggregatable global unicast address that Host obtained is
2001::15B:E0EA:3524:E791.
Verification
13-21
13-22
13-23
# Ping Switch A and Switch B on Host, and ping Switch A and Host on Switch B to verify the
connectivity between them.
When you ping a link-local address, you should use the i parameter to specify an interface for the
link-local address.
13-24
As shown in the output information, Host can ping Switch B and Switch A.
Solution
z Use the display current-configuration command in any view or the display this command in
system view to verify that IPv6 is enabled.
z Use the display ipv6 interface command in any view to verify that the IPv6 address of the
interface is correct and the interface is up.
z Use the debugging ipv6 packet command in user view to enable the debugging for IPv6 packets
to help locate the cause.
13-25
When configuring dual stack, go to these sections for information you are interested in:
z Dual Stack Overview
z Configuring Dual Stack
Required
Enable the IPv6 packet forwarding function ipv6 Disabled by
default.
14-1
z For information about IPv4 addressing, refer to IP Addressing Configuration in the IP Services
Volume.
z For more information about IPv6 address, refer to IPv6 Basics Configuration in the IP Services
Volume.
z For how to enable IPv6 and configure an IPv6 address on an interface, refer to IPv6 Basics
Commands in the IP Services Volume.
14-2
When configuring sFlow, go to these sections for information you are interested in:
z sFlow Overview
z Configuring sFlow
z Displaying and Maintaining sFlow
z sFlow Configuration Example
z Troubleshooting sFlow Configuration
sFlow Overview
Introduction to sFlow
Sampled Flow (sFlow) is a traffic monitoring technology mainly used to collect and analyze traffic
statistics.
The sFlow system involves an sFlow agent embedded in a device and a remote sFlow collector. The
sFlow agent collects traffic statistics and packets from the sFlow enabled ports on the device,
encapsulates the information into sFlow packets, and sends the packets to the sFlow collector. The
sFlow collector analyzes the sFlow packets and displays the results.
sFlow has the following two sampling mechanisms:
z Packet-based sampling: An sFlow enabled port samples one packet out of a configurable number
of packets passing through it.
z Time-based sampling: The sFlow agent samples the statistics of all sFlow enabled ports at a
configurable interval.
As a traffic monitoring technology, sFlow has the following advantages:
z Supporting traffic monitoring on Gigabit and higher-speed networks.
z Providing scalability to allow one sFlow collector to monitor multiple or more sFlow agents.
z Implementing the low-cost sFlow agent.
Operation of sFlow
15-1
Configuring sFlow
The sFlow feature enables the remote sFlow collector to monitor the network and analyze sFlow
packet statistics.
Follow these steps to configure sFlow:
z The sFlow agent and sFlow collector must not have the same IP address.
z Currently, you can specify at most two sFlow collectors on the device.
15-2
z Host A and Server are connected to Switch through GigabitEthernet 1/0/1 and GigabitEthernet
1/0/2 respectively.
z Host B works as an sFlow collector with IP address 3.3.3.2 and port number 6343, and is
connected to Switch through GigabitEthernet 1/0/3.
z GigabitEthernet 1/0/3 belongs to VLAN 1, having an IP address of 3.3.3.1.
Run sFlow agent on Switch, and enable sFlow on GigabitEthernet 1/0/1 to monitor traffic on this
interface. Switch sends sFlow packets through GigabitEthernet 1/0/3 to Host B, which then analyzes
the sFlow packets and displays the results.
Network diagram
Configuration procedure
# Enable sFlow in both the inbound and outbound directions on GigabitEthernet 1/0/1.
[Switch] interface GigabitEthernet 1/0/1
[Switch-GigabitEthernet1/0/1] sflow enable inbound
[Switch-GigabitEthernet1/0/1] sflow enable outbound
15-3
Symptom
Analysis
z sFlow is not enabled globally because the sFlow agent or/and the sFlow collector is/are not
specified.
z No port is enabled with sFlow to sample data.
z The IP address of the sFlow collector specified on the sFlow agent is different from that of the
remote sFlow collector.
z No IP address is configured for the Layer 3 interface on the device, or the IP address is configured,
but the UDP packets with the IP address being the source cannot reach the sFlow collector.
z The physical link between the device and the sFlow collector fails.
Solution
1) Check whether sFlow is correctly configured by displaying sFlow configuration with the display
sflow command.
2) Check whether the correct IP address is configured for the device to communicate with the sFlow
collector.
3) Check whether the physical link between the device and the sFlow collector is normal.
15-4
1 IP Routing Overview1-1
IP Routing and Routing Table1-1
Routing 1-1
Routing Table 1-1
Routing Protocol Overview 1-3
Static Routing and Dynamic Routing1-3
Routing Protocols and Routing Priority 1-3
Displaying and Maintaining a Routing Table 1-3
5 RIPng Configuration5-1
Introduction to RIPng 5-1
RIPng Working Mechanism 5-1
RIPng Packet Format 5-2
RIPng Packet Processing Procedure 5-3
Protocols and Standards 5-3
Configuring RIPng Basic Functions 5-3
Configuration Prerequisites 5-3
Configuration Procedure5-4
Configuring RIPng Route Control 5-4
Configuring an Additional Routing Metric 5-4
Configuring RIPng Route Summarization 5-5
Advertising a Default Route5-5
Configuring a RIPng Route Filtering Policy 5-6
Configuring a Priority for RIPng5-6
Configuring RIPng Route Redistribution 5-6
Tuning and Optimizing the RIPng Network5-7
Configuring RIPng Timers 5-7
Configuring Split Horizon and Poison Reverse 5-7
Configuring Zero Field Check on RIPng Packets5-8
Displaying and Maintaining RIPng 5-9
RIPng Configuration Example5-9
Configure RIPng Basic Functions 5-9
ii
iii
The term router in this document refers to a router in a generic sense or a Layer 3 switch.
Routing in the Internet is achieved through routers. Upon receiving a packet, a router finds an optimal
route based on the destination address and forwards the packet to the next router in the path until the
packet reaches the last router, which forwards the packet to the intended destination host.
Routing Table
Routing table
Routing tables play a key role in routing. Each router maintains a routing table, and each entry in the
table specifies which physical interface a packet destined for a certain destination should go out to
reach the next hop (the next router) or the directly connected destination.
Routes in a routing table can be divided into three categories by origin:
z Direct routes: Routes discovered by data link protocols, also known as interface routes.
z Static routes: Routes that are manually configured.
z Dynamic routes: Routes that are discovered dynamically by routing protocols.
1-1
Router A Router F
17.0.0.1 17.0.0.0 17.0.0.3
16.0.0.2 11.0.0.2
17.0.0.2
Router D
16.0.0.0 11.0.0.0
14.0.0.3
16.0.0.1 11.0.0.1
14.0.0.2 14.0.0.4
Router B 14.0.0.0 Router G
15.0.0.2 12.0.0.1
Router E 14.0.0.1
15.0.0.0 12.0.0.0
13.0.0.2
15.0.0.1 12.0.0.2
13.0.0.3 13.0.0.1
13.0.0.0
Router C Router H
1-2
Static routing is easy to configure and requires less system resources. It works well in small, stable
networks with simple topologies. Its major drawback is that you must perform routing configuration
again whenever the network topology changes; it cannot adjust to network changes by itself.
Dynamic routing is based on dynamic routing protocols, which can detect network topology changes
and recalculate the routes accordingly. Therefore, dynamic routing is suitable for large networks. Its
disadvantages are that it is difficult to configure, and that it not only imposes higher requirements on
the system, but also consumes a certain amount of network resources.
Different routing protocols may find different routes to the same destination. However, not all of those
routes are optimal. In fact, at a particular moment, only one protocol can uniquely determine the
current optimal route to the destination. For the purpose of route selection, each routing protocol
(including static routes) is assigned a priority. The route found by the routing protocol with the highest
priority is preferred.
The following table lists some routing protocols and the default priorities for routes found by them:
1-3
1-4
When configuring a static route, go to these sections for information you are interested in:
z Introduction
z Configuring a Static Route
z Detecting Reachability of the Static Routes Nexthop
z Displaying and Maintaining Static Routes
z Static Route Configuration Example
The term router in this document refers to a router in a generic sense or a Layer 3 switch.
Introduction
Static Route
A static route is a manually configured. If a networks topology is simple, you only need to configure
static routes for the network to work normally. The proper configuration and usage of static routes can
improve network performance and ensure bandwidth for important network applications.
The disadvantage of using static routes is that they cannot adapt to network topology changes. If a
fault or a topological change occurs in the network, the routes will be unreachable and the network
breaks. In this case, the network administrator has to modify the static routes manually.
Default Route
If the destination address of a packet fails to match any entry in the routing table, the packet will be
discarded.
After a default route is configured on a router, any packet whose destination IP address matches no
entry in the routing table can be forwarded to a designated upstream router.
A router selects the default route only when it cannot find any matching entry in the routing table.
z If the destination address of a packet fails to match any entry in the routing table, the router
selects the default route to forward the packet.
z If there is no default route and the destination address of the packet fails to match any entry in the
routing table, the packet will be discarded and an ICMP packet will be sent to the source to report
that the destination or the network is unreachable.
Default routes can be configured in two ways:
2-1
Before configuring a static route, you need to know the following concepts:
1) Destination address and mask
In the ip route-static command, an IPv4 address is in dotted decimal format and a mask can be either
in dotted decimal format or in the form of mask length (the digits of consecutive 1s in the mask).
2) Output interface and next hop address
While configuring a static route, you can specify either the output interface or the next hop address
depending on the specific occasion. For a NULL0 or loopback interface, if the output interface has
already been configured, there is no need to configure the next hop address
In fact, all the route entries must have a next hop address. When forwarding a packet, a router first
searches the routing table for the route to the destination address of the packet. The system can find
the corresponding link layer address and forward the packet only after the next hop address is
specified. The next hop address can not be a local interface IP address; otherwise, the route
configuration will not take effect.
3) Other attributes
You can configure different preferences for different static routes so that route management policies
can be applied more flexibly.
Before configuring a static route, you need to finish the following tasks:
z Configure the physical parameters for related interfaces
z Configure the link-layer attributes for related interfaces
z Configure the IP addresses for related interfaces
2-2
Required
By default,
ip route-static dest-address { mask | mask-length } preference for
Configure a static { next-hop-address | interface-type interface-number static routes is 60,
route next-hop-address } [ preference preference-value ] tag is 0, and no
[ tag tag-value ] [ description description-text ] description
information is
configured.
Configure the default Optional
ip route-static default-preference
preference for static
default-preference-value 60 by default
routes
z When configuring a static route, the static route does not take effect if you specify the next hop
address first and then configure it as the IP address of a local interface.
z If you do not specify the preference when configuring a static route, the default preference will be
used. Reconfiguring the default preference applies only to newly created static routes.
z You can flexibly control static routes by configuring tag values and using the tag values in the
routing policy.
z If the destination IP address and mask are both configured as 0.0.0.0 with the ip route-static
command, the route is the default route.
If you specify the nexthop but not outgoing interface when configuring a static route, you can associate
the static route with a track entry to check the static route validity:
z When the track entry is positive, the static route's nexthop is reachable and the static route takes
effect.
z When the track entry is negative, the static route's nexthop is unreachable and the static route is
invalid. For details about track, refer to Track Configuration in the System Volume.
2-3
To detect the reachability of a static route's nexthop through a Track entry, you need to create a Track
first. For detailed Track configuration procedure, refer to Track Configuration in the System Volume.
Configuration procedure
Follow these steps to detect the reachability of a static route's nexthop through Track:
z To configure this feature for an existing static route, simply associate the static route with a track
entry. For a non-existent static route, configure it and associate it with a Track entry.
z If a static route needs route recursion, the associated track entry must monitor the nexthop of the
recursive route instead of that of the static route; otherwise, a valid route may be mistakenly
considered invalid.
Network requirements
The IP addresses and masks of the switches and hosts are shown in the following figure. Static routes
are required for interconnection between any two hosts.
2-4
Configuration procedure
2-5
# Use the ping command on Host B to check reachability to Host A, assuming Windows XP runs on
the two hosts.
C:\Documents and Settings\Administrator>ping 1.1.2.2
Trace complete.
2-6
The term router in this document refers to a router in a generic sense or a Layer 3 switch.
When configuring RIP, go to these sections for information you are interested in:
z RIP Overview
z Configuring RIP Basic Functions
z Configuring RIP Route Control
z Configuring RIP Network Optimization
z Displaying and Maintaining RIP
z RIP Configuration Examples
z Troubleshooting RIP
RIP Overview
RIP is a simple Interior Gateway Protocol (IGP), mainly used in small-sized networks, such as
academic networks and simple LANs. RIP is not applicable to complex networks.
RIP is still widely used in practical networking due to easier implementation, configuration and
maintenance than OSPF and IS-IS.
Operation of RIP
Introduction
RIP is a distance vector routing protocol, using UDP packets for exchanging information through port
520.
RIP uses a hop count to measure the distance to a destination. The hop count from a router to a
directly connected network is 0. The hop count from a router to a directly connected router is 1. To limit
convergence time, the range of RIP metric value is from 0 to 15. A metric value of 16 (or greater) is
considered infinite, which means the destination network is unreachable. That is why RIP is not
suitable for large-scaled networks.
RIP prevents routing loops by implementing the split horizon and poison reverse functions.
A RIP router has a routing table containing routing entries of all reachable destinations, and each
routing entry contains:
z Destination address: IP address of a host or a network.
z Next hop: IP address of the adjacent routers interface to reach the destination.
3-1
RIP timers
RIP is a distance vector (D-V) routing protocol. Since a RIP router advertises its own routing table to
neighbors, routing loops may occur.
RIP uses the following mechanisms to prevent routing loops.
z Counting to infinity. The metric value of 16 is defined as unreachable. When a routing loop occurs,
the metric value of the route will increment to 16.
z Split horizon. A router does not send the routing information learned from a neighbor to the
neighbor to prevent routing loops and save bandwidth.
z Poison reverse. A router sets the metric of routes received from a neighbor to 16 and sends back
these routes to the neighbor to help delete such information from the neighbors routing table.
z Triggered updates. A router advertises updates once the metric of a route is changed rather than
after the update period expires to speed up network convergence.
Operation of RIP
RIP Version
3-2
RIPv2 has two types of message transmission: broadcast and multicast. Multicast is the default type
using 224.0.0.9 as the multicast address. The interface working in the RIPv2 broadcast mode can also
receive RIPv1 messages.
A RIPv1 message consists of a header and up to 25 route entries. (A RIPv2 authentication message
uses the first route entry as the authentication entry, so it has up to 24 route entries.)
z Command: Type of message. 1 indicates request, which is used to request all or part of the
routing information from the neighbor, and 2 indicates response, which contains all or part of the
routing information. A response message consists of up to 25 route entries.
z Version: Version of RIP, 0x01 for RIPv1.
z Must be zero: This field must be zero.
z AFI: Address Family Identifier, 2 for IP, and 0 for request messages.
z IP Address: Destination IP address of the route. It can be a natural network, subnet or a host
address.
z Metric: Cost of the route, 16 for request messages.
3-3
The format of RIPv2 message is similar to RIPv1. Figure 3-2 shows it.
Figure 3-2 RIPv2 Message Format
RIPv2 authentication
RIPv2 sets the AFI field of the first route entry to 0xFFFF to identify authentication information. See
Figure 3-3.
Figure 3-3 RIPv2 Authentication Message
3-4
Configuration Procedure
3-5
3-6
interface interface-type
Enter interface view
interface-number
Specify a RIP version for rip version { 1 | 2 [ broadcast |
Optional
the interface multicast ] }
An additional routing metric can be added to the metric of an inbound or outbound RIP route.
The outbound additional metric is added to the metric of a sent route, and the routes metric in the
routing table is not changed.
The inbound additional metric is added to the metric of a received route before the route is added into
the routing table, and the routes metric is changed. If the sum of the additional metric and the original
metric is greater than 16, the metric of the route will be 16.
Follow these steps to configure additional routing metrics:
3-7
Route summarization means that subnets in a natural network are summarized into a natural network
that is sent to other networks. This feature can reduce the size of routing tables.
You can disable RIPv2 route automatic summarization if you want to advertise all subnet routes.
Follow these steps to enable RIPv2 route automatic summarization:
You can configure RIPv2 to advertise a summary route on the specified interface.
To do so, use the following commands:
interface interface-type
Enter interface view
interface-number
rip summary-address ip-address
Advertise a summary route Required
{ mask | mask-length }
3-8
Sometimes a router may receive from the same network many host routes, which are not helpful for
routing and consume a large amount of network resources. In this case, you can disable RIP from
receiving host routes to save network resources.
Follow these steps to disable RIP from receiving host routes:
RIPv2 can be disabled from receiving host routes, but RIPv1 cannot.
You can configure RIP to advertise a default route with a specified metric to RIP neighbors.
z In RIP view, you can configure all the interfaces of the RIP process to advertise a default route; in
interface view, you can configure a RIP interface of the RIP process to advertise a default route.
The latter takes precedence over the former on the interface.
z If a RIP process is enabled to advertise a default route, to disable an interface of the RIP process
from default route advertisement, you can use the rip default-route no-originate command on
the interface.
Follow these steps to configure RIP to advertise a default route:
3-9
The router enabled to advertise a default route does not receive default routes from RIP neighbors.
The device supports route filtering. You can filter routes by configuring the inbound and outbound route
filtering policies by referencing an ACL or IP prefix list. You can also configure the router to receive only
routes from a specified neighbor.
Follow these steps to configure route filtering:
z Using the filter-policy import command filters incoming routes. Routes not passing the filtering
will be neither installed into the routing table nor advertised to neighbors.
z Using the filter-policy export command filters outgoing routes, including routes redistributed with
the import-route command.
Multiple IGP protocols may run in a router. If you want RIP routes to have a higher priority than those
learned by other routing protocols, you can assign RIP a smaller priority value to influence optimal
route selection.
Follow these steps to configure a priority for RIP:
3-10
If a router runs RIP and other routing protocols, you can configure RIP to redistribute static or direct
routes.
Follow these steps to configure RIP route redistribution:
Only active routes can be redistributed. You can use the display ip routing-table protocol command
to display route state information.
3-11
Based on network performance, you need to make RIP timers of RIP routers identical to each other to
avoid unnecessary traffic or route oscillation.
If both split horizon and poison reverse are configured, only the poison reverse function takes effect.
The split horizon function disables an interface from sending routes received from the interface to
prevent routing loops between adjacent routers.
Follow these steps to enable split horizon:
The poison reverse function allows an interface to advertise the routes received from it, but the metric
of these routes is set to 16, making them unreachable.
Follow these steps to enable poison reverse:
interface interface-type
Enter interface view
interface-number
3-12
Some fields in the RIPv1 message must be zero. These fields are called zero fields. You can enable
zero field check on received RIPv1 messages. If such a field contains a non-zero value, the RIPv1
message will not be processed. If you are sure that all messages are trusty, you can disable zero field
check to save CPU resources.
This task does not apply to RIPv2 packets that have no zero fields.
Follow these steps to enable zero field check on incoming RIPv1 messages:
The source IP address check feature should be disabled if the RIP neighbor is not directly connected.
3-13
This task does not apply to RIPv1 because RIPv1 does not support authentication. Although you can
specify authentication modes for RIPv1 in interface view, the configuration does not take effect.
Usually, RIP sends messages to broadcast or multicast addresses. On non broadcast or multicast links,
you need to manually specify RIP neighbors. If a specified neighbor is not directly connected, you must
disable source address check on incoming updates.
Follow these steps to specify a RIP neighbor:
z You need not use the peer ip-address command when the neighbor is directly connected;
otherwise the neighbor may receive both the unicast and multicast (or broadcast) of the same
routing information.
z If a specified neighbor is not directly connected, you need to disable source address check on
incoming updates.
This task allows you to enable a specific RIP process to receive SNMP requests.
3-14
Network requirements
As shown in Figure 3-4, enable RIPv2 on all interfaces on Switch A and Switch B.
3-15
Configuration procedure
1) Configure an IP address for each interface (only the IP address configuration for the VLAN
interfaces is given in the following examples)
# Configure Switch A.
<SwitchA> system-view
[SwitchA] interface vlan-interface 100
[SwitchA-Vlan-interface100] ip address 192.168.1.3 24
[SwitchA-Vlan-interface100] quit
[SwitchA] interface vlan-interface 101
[SwitchA-Vlan-interface101] ip address 172.17.1.1 24
[SwitchA-Vlan-interface101] quit
[SwitchA] interface vlan-interface 102
[SwitchA-Vlan-interface102] ip address 172.16.1.1 24
# Configure Switch B.
<SwitchB> system-view
[SwitchB] interface vlan-interface 100
[SwitchB-Vlan-interface100] ip address 192.168.1.2 24
[SwitchB-Vlan-interface100] quit
[SwitchB] interface vlan-interface 101
[SwitchB-Vlan-interface101] ip address 10.2.1.1 24
[SwitchB-Vlan-interface101] quit
2) Configure basic RIP functions
# Configure Switch A.
[SwitchA] rip
[SwitchA-rip-1] network 192.168.1.0
[SwitchA-rip-1] network 172.16.0.0
[SwitchA-rip-1] network 172.17.0.0
# Configure Switch B.
[SwitchB] rip
[SwitchB-rip-1] network 192.168.1.0
[SwitchB-rip-1] network 10.0.0.0
3-16
From the routing table, you can find that RIPv1 uses a natural mask.
3) On Switch A and Switch B, specify the RIP version as RIPv2, and disable RIPv2 route automatic
summarization to advertise all subnet routes.
# Configure RIPv2 on Switch A.
[SwitchA] rip
[SwitchA-rip-1] version 2
[SwitchA-rip-1] undo summary
From the routing table, you can see RIPv2 uses classless subnet mask.
Since the routing information advertised by RIPv1 has a long aging time, it will still exist until it ages out
after RIPv2 is configured.
Network requirements
3-17
Configuration procedure
# Enable RIP 100 and RIP 200 and specify RIP version 2 on Switch B.
<SwitchB> system-view
[SwitchB] rip 100
[SwitchB-rip-100] network 11.0.0.0
[SwitchB-rip-100] version 2
[SwitchB-rip-100] undo summary
[SwitchB-rip-100] quit
[SwitchB] rip 200
[SwitchB-rip-200] network 12.0.0.0
[SwitchB-rip-200] version 2
[SwitchB-rip-200] undo summary
[SwitchB-rip-200] quit
3-18
3-19
Network requirements
Configuration procedure
# Configure Switch B.
<SwitchB> system-view
[SwitchB] rip 1
[SwitchB-rip-1] network 1.0.0.0
[SwitchB-rip-1] version 2
[SwitchB-rip-1] undo summary
# Configure Switch C.
<SwitchC> system-view
[SwitchB] rip 1
[SwitchC-rip-1] network 1.0.0.0
[SwitchC-rip-1] version 2
[SwitchC-rip-1] undo summary
# Configure Switch D.
<SwitchD> system-view
3-20
# Configure Switch E.
<SwitchE> system-view
[SwitchE] rip 1
[SwitchE-rip-1] network 1.0.0.0
[SwitchE-rip-1] version 2
[SwitchE-rip-1] undo summary
The display shows that there are two RIP routes to network 1.1.5.0/24. Their next hops are Switch B
(1.1.1.2) and Switch C (1.1.2.2) respectively, with the same cost of 2. Switch C is the next hop router to
reach network 1.1.4.0/24, with a cost of 1.
3) Configure an additional metric for the RIP interface.
# Configure an additional metric of 3 for VLAN-interface 200 on Switch A.
[SwitchA] interface vlan-interface 200
[SwitchA-Vlan-interface200] rip metricin 3
[SwitchA-Vlan-interface200] display rip 1 database
1.0.0.0/8, cost 0, ClassfulSumm
1.1.1.0/24, cost 0, nexthop 1.1.1.1, Rip-interface
1.1.2.0/24, cost 0, nexthop 1.1.2.1, Rip-interface
1.1.3.0/24, cost 1, nexthop 1.1.1.2
1.1.4.0/24, cost 2, nexthop 1.1.1.2
1.1.5.0/24, cost 2, nexthop 1.1.1.2
The display shows that there is only one RIP route to network 1.1.5.0/24, with the next hop as Switch B
(1.1.1.2) and a cost of 2.
Troubleshooting RIP
No RIP Updates Received
Symptom:
No RIP updates are received when the links work well.
Analysis:
After enabling RIP, you must use the network command to enable corresponding interfaces. Make
sure no interfaces are disabled from handling RIP messages.
3-21
Symptom:
When all links work well, route oscillation occurs on the RIP network. After displaying the routing table,
you may find some routes appear and disappear in the routing table intermittently.
Analysis:
In the RIP network, make sure all the same timers within the whole network are identical and
relationships between timers are reasonable. For example, the timeout timer value should be greater
than the update timer value.
Solution:
z Use the display rip command to check the configuration of RIP timers
z Use the timers command to adjust timers properly.
3-22
When configuring IPv6 Static Routing, go to these sections for information you are interested in:
z Introduction to IPv6 Static Routing
z Configuring an IPv6 Static Route
z Displaying and Maintaining IPv6 Static Routes
z IPv6 Static Routing Configuration Example
The term router in this document refers to either a router in a generic sense or a Layer 3 switch
running routing protocols.
Similar to IPv4 static routes, IPv6 static routes work well in simple IPv6 network environments.
Their major difference lies in the destination and next hop addresses. IPv6 static routes use IPv6
addresses whereas IPv4 static routes use IPv4 addresses.
The IPv6 static route that has the destination address configured as ::/0 (indicating a prefix length of 0)
is the default IPv6 route. If the destination address of an IPv6 packet does not match any entry in the
routing table, this default route will be used to forward the packet.
Configuration prerequisites
Using the undo ipv6 route-static command can delete a single IPv6 static route, while using the
delete ipv6 static-routes all command deletes all IPv6 static routes including the default route.
With IPv6 static routes configured, all hosts and switches can interact with each other.
4-2
Configuration procedure
4-3
4-4
When configuring RIPng, go to these sections for information you are interested in:
z Introduction to RIPng
z Configuring RIPng Basic Functions
z Configuring RIPng Route Control
z Tuning and Optimizing the RIPng Network
z Displaying and Maintaining RIPng
z RIPng Configuration Example
The term router in this document refers to a router in a generic sense or a Layer 3 switch.
Introduction to RIPng
RIP next generation (RIPng) is an extension of RIP-2 for IPv4. Most RIP concepts are applicable in
RIPng.
RIPng for IPv6 has the following basic differences from RIP:
z UDP port number: RIPng uses UDP port 521 for sending and receiving routing information.
z Multicast address: RIPng uses FF02:9 as the link-local-router multicast address.
z Destination Prefix: 128-bit destination address prefix.
z Next hop: 128-bit IPv6 address.
z Source address: RIPng uses FE80::/10 as the link-local source address
RIPng is a routing protocol based on the distance vector (D-V) algorithm. RIPng uses UDP packets to
exchange routing information through port 521.
RIPng uses a hop count to measure the distance to a destination. The hop count is referred to as
metric or cost. The hop count from a router to a directly connected network is 0. The hop count
between two directly connected routers is 1. When the hop count is greater than or equal to 16, the
destination network or host is unreachable.
By default, the routing update is sent every 30 seconds. If the router receives no routing updates from
a neighbor within 180 seconds, the routes learned from the neighbor are considered as unreachable.
Within another 240 seconds, if no routing update is received, the router will remove these routes from
the routing table.
RIPng supports split horizon and poison reverse to prevent routing loops and route redistribution.
5-1
Basic format
A RIPng packet consists of a header and multiple route table entries (RTEs). The maximum number of
RTEs in a packet depends on the IPv6 MTU of the sending interface.
Figure 5-1 shows the packet format of RIPng.
Figure 5-1 RIPng basic packet format
RTE format
IPv6 next hop address is the IPv6 address of the next hop.
Figure 5-3 shows the format of the IPv6 prefix RTE.
5-2
0 7 15 31
Request packet
When a RIPng router first starts or needs to update some entries in its routing table, generally a
multicast request packet is sent to ask for needed routes from neighbors.
The receiving RIPng router processes RTEs in the request. If there is only one RTE with the IPv6
prefix and prefix length both being 0, and with a metric value of 16, the RIPng router will respond with
the entire routing table information in response messages. If there are multiple RTEs in the request
message, the RIPng router will examine each RTE, update its metric, and send the requested routing
information to the requesting router in the response packet.
Response packet
The response packet containing the local routing table information is generated as:
z A response to a request
z An update periodically
z A trigged update caused by route change
After receiving a response, a router checks the validity of the response before adding the route to its
routing table, such as whether the source IPv6 address is the link-local address and whether the port
number is correct. The response packet that failed the check will be discarded.
Configuration Prerequisites
5-3
Configuration Procedure
interface interface-type
Enter interface view
interface-number
Required
Enable RIPng on the interface ripng process-id enable
Disabled by default
If RIPng is not enabled on an interface, the interface will not send or receive any RIPng route.
An additional routing metric can be added to the metric of an inbound or outbound RIP route, namely,
the inbound and outbound additional metric.
The outbound additional metric is added to the metric of a sent route. The routes metric in the routing
table is not changed.
5-4
With this feature enabled, a default route is advertised through the specified interface regardless of
whether the default route is available in the local IPv6 routing table.
5-5
You can reference a configured IPv6 ACL or prefix list to filter received/advertised routing information
as needed. For filtering outbound routes, you can also specify a routing protocol from which to filter
routing information redistributed.
Follow these steps to configure a RIPng route filtering policy:
Required
filter-policy { acl6-number |
Configure a filter policy to filter By default, RIPng does not
ipv6-prefix ipv6-prefix-name }
incoming routes filter incoming routing
import
information.
Required
filter-policy { acl6-number |
Configure a filter policy to filter By default, RIPng does not
ipv6-prefix ipv6-prefix-name }
outgoing routes filter outgoing routing
export [ protocol [ process-id ] ]
information.
Any routing protocol has its own protocol priority used for optimal route selection. You can set a priority
for RIPng manually. The smaller the value is, the higher the priority is.
Follow these steps to configure a RIPng priority:
5-6
You can adjust RIPng timers to optimize the performance of the RIPng network.
Follow these steps to configure RIPng timers:
When adjusting RIPng timers, you should consider the network performance and perform unified
configurations on routers running RIPng to avoid unnecessary network traffic increase or route
oscillation.
If both split horizon and poison reverse are configured, only the poison reverse function takes effect.
The split horizon function disables a route learned from an interface from being advertised through the
5-7
Generally, you are recommended to enable split horizon to prevent routing loops.
The poison reverse function enables a route learned from an interface to be advertised through the
interface. However, the metric of the route is set to 16. That is to say, the route is unreachable.
Follow these steps to configure poison reverse:
Some fields in the RIPng packet must be zero. These fields are called zero fields. With zero field check
on RIPng packets enabled, if such a field contains a non-zero value, the entire RIPng packet will be
discarded. If you are sure that all packets are trusty, you can disable the zero field check to reduce the
CPU processing time.
Follow these steps to configure RIPng zero field check:
5-8
Network requirements
As shown in Figure 5-4, all switches run RIPng. Configure Switch B to filter the route (3::/64) learnt
from Switch C, which means the route will not be added to the routing table of Switch B, and Switch B
will not forward it to Switch A.
Figure 5-4 Network diagram for RIPng configuration
Configuration procedure
# Configure Switch B.
<SwitchB> system-view
[SwitchB] ripng 1
[SwitchB-ripng-1] quit
5-9
# Configure Switch C.
<SwitchC> system-view
[SwitchC] ripng 1
[SwitchC-ripng-1] quit
[SwitchC] interface vlan-interface 200
[SwitchC-Vlan-interface200] ripng 1 enable
[SwitchC-Vlan-interface200] quit
[SwitchC] interface vlan-interface 500
[SwitchC-Vlan-interface500] ripng 1 enable
[SwitchC-Vlan-interface500] quit
[SwitchC] interface vlan-interface 600
[SwitchC-Vlan-interface600] ripng 1 enable
[SwitchC-Vlan-interface600] quit
5-10
5-11
A route policy is used on a router for route filtering and attributes modification when routes are received,
advertised, or redistributed.
When configuring route policy, go to these sections for information you are interested in:
z Introduction to Route Policy
z Route Policy Configuration Task List
z Defining Filters
z Configuring a Route Policy
z Displaying and Maintaining the Route Policy
z Route Policy Configuration Example
z Troubleshooting Route Policy Configuration
Route policy in this chapter involves both IPv4 route policy and IPv6 route policy.
A route policy is used on a router for route filtering and attributes modification when routes are received,
advertised, or redistributed.
To configure a route policy, you need to define some filters based on the attributes of routing
information, such as destination address, advertising routers address and so on. The filters can be set
beforehand and then applied to the route policy.
Filters
There are six types of filters: ACL, IP prefix list, and route policy.
ACL
ACL involves IPv4 ACL and IPv6 ACL. An ACL is configured to match the destinations or next hops of
routing information.
For ACL configuration, refer to ACL configuration in the Security Volume.
IP prefix list
6-1
Route policy
A route policy is used to match routing information and modify the attributes of permitted routes. It can
reference the above mentioned filters to define its own match criteria.
A route policy can comprise multiple nodes, which are in logic OR relationship. Each route policy node
is a match unit, and a node with a smaller number is matched first. Once a node is matched, the route
policy is passed and the packet will not go to the next node.
A route policy node comprises a set of if-match and apply clauses. The if-match clauses define the
match criteria. The matching objects are some attributes of routing information. The if-match clauses
of a route policy node is in logical AND relationship. That is, a packet must match all the if-match
clauses of the node to pass it. The apply clauses of the node specify the actions to be taken on the
permitted packets, such as route attribute modification.
A route policy is applied on a router to filter routes when they are received, advertised or redistributed
and to modify some attributes of permitted routes.
Task
Defining Filters Defining an IP-prefix List
Creating a Route Policy
Configuring a Route Policy Defining if-match Clauses
Defining apply Clauses
Defining Filters
Prerequisites
6-2
Identified by name, an IPv4 prefix list can comprise multiple items. Each item specifies a prefix range
to match and is identified by an index number.
An item with a smaller index number is matched first. If one item is matched, the IP prefix list is passed,
and the routing information will not go to the next item.
Follow these steps to define an IPv4 prefix list:
If all the items are set to the deny mode, no routes can pass the IPv4 prefix list. Therefore, you need to
define the permit 0.0.0.0 0 less-equal 32 item following multiple deny items to allow other IPv4
routing information to pass.
For example, the following configuration filters routes 10.1.0.0/16, 10.2.0.0/16 and 10.3.0.0/16, but
allows other routes to pass.
<Sysname> system-view
[Sysname] ip ip-prefix abc index 10 deny 10.1.0.0 16
[Sysname] ip ip-prefix abc index 20 deny 10.2.0.0 16
[Sysname] ip ip-prefix abc index 30 deny 10.3.0.0 16
[Sysname] ip ip-prefix abc index 40 permit 0.0.0.0 0 less-equal 32
Identified by name, each IPv6 prefix list can comprise multiple items. Each item specifies a prefix
range to match and is identified by an index number.
An item with a smaller index number is matched first. If one item is matched, the IPv6 prefix list is
passed, and the routing information will not go to the next item.
Follow these steps to define an IPv6 prefix list:
6-3
For example, the following configuration filters routes 2000:1::/48, 2000:2::/48 and 2000:3::/48, but
allows other routes to pass.
<Sysname> system-view
[Sysname] ip ipv6-prefix abc index 10 deny 2000:1:: 48
[Sysname] ip ipv6-prefix abc index 20 deny 2000:2:: 48
[Sysname] ip ipv6-prefix abc index 30 deny 2000:3:: 16
[Sysname] ip ipv6-prefix abc index 40 permit :: 0 less-equal 128
Prerequisites
6-4
6-5
Optional
apply ip-address Not set by default.
for IPv4 routes
next-hop ip-address The setting does not apply to
Set the next redistributed routing information.
hop Optional
apply ipv6 next-hop Not set by default.
for IPv6 routes
ipv6-address The setting does not apply to
redistributed routing information.
z The difference between IPv4 and IPv6 apply clauses is the command for setting the next hop for
routing information.
z The apply ip-address next-hop and apply ipv6 next-hop commands do not apply to
redistributed IPv4 and IPv6 routes respectively.
6-6
Network Requirements
As shown in the following figure, Switch A and Switch B communicate with each other at the network
layer through RIPv2. Switch A has static routes to networks 20.0.0.0/8, 30.0.0.0/8, and 40.0.0.0/8.
Switch B needs to access these networks through Switch A, while Switch A allows Switch B to access
networks 20.0.0.0/8 and 40.0.0.0/8, but not 30.0.0.0/8.
Figure 6-1 Network diagram for route policy application to route redistribution
Configuration procedure
1) Configure Switch A.
# Configure IP addresses of the interfaces (omitted).
# Configure RIP basic functions.
<SwitchA> system-view
[SwitchA] rip
[SwitchA-rip-1] version 2
[SwitchA-rip-1] undo summary
[SwitchA-rip-1] network 192.168.1.0
[SwitchA-rip-1] quit
# Configure an ACL.
[SwitchA] acl number 2000
6-7
The display shows that Switch B has only the routing information permitted by ACL 2000. Therefore,
the configurations above can meet the configuration requirements.
Network requirements
6-8
Configuration procedure
1) Configure Switch A.
# Configure IPv6 addresses for VLAN-interface 100 and VLAN-interface 200.
<SwitchA> system-view
[SwitchA] ipv6
[SwitchA] interface vlan-interface 100
[SwitchA-Vlan-interface100] ipv6 address 10::1 32
[SwitchA-Vlan-interface100] quit
[SwitchA] interface vlan-interface 200
[SwitchA-Vlan-interface200] ipv6 address 11::1 32
[SwitchA-Vlan-interface200] quit
# Enable RIPng and apply the route policy to static route redistribution.
[SwitchA] ripng
[SwitchA-ripng-1] import-route static route-policy static2ripng
2) Configure Switch B.
# Configure the IPv6 address for VLAN-interface 100.
[SwitchB] ipv6
[SwitchB] interface vlan-interface 100
[SwitchB-Vlan-interface100] ipv6 address 10::2 32
6-9
# Enable RIPng.
[SwitchB] ripng
Symptom
Filtering routing information failed, while the routing protocol runs normally.
Analysis
At least one item of the IP prefix list should be configured as permit mode, and at least one node in the
Route policy should be configured as permit mode.
Solution
Symptom
Filtering routing information failed, while the routing protocol runs normally.
Analysis
At least one item of the IPv6 prefix list should be configured as permit mode, and at least one node of
the Route policy should be configured as permit mode.
Solution
6-10
ii
iii
This manual chiefly focuses on the IP multicast technology and device operations. Unless otherwise
stated, the term multicast in this document refers to IP multicast.
Introduction to Multicast
As a technique coexisting with unicast and broadcast, the multicast technique effectively addresses
the issue of point-to-multipoint data transmission. By allowing high-efficiency point-to-multipoint data
transmission over a network, multicast greatly saves network bandwidth and reduces network load.
With the multicast technology, a network operator can easily provide new value-added services, such
as live Webcasting, Web TV, distance learning, telemedicine, Web radio, real-time videoconferencing,
and other bandwidth- and time-critical information services.
Unicast
In unicast, the information source (Source in the figure) needs to send a separate copy of information
to each host (Receiver in the figure) that wants the information, as shown in Figure 1-1.
2-1
Host A
Receiver
Host B
Source
Host C
Receiver
Host D
IP network Receiver
Assume that Host B, Host D and Host E need the information. A separate transmission channel needs
to be established from the information source to each of these hosts.
In unicast transmission, the traffic transmitted over the network is proportional to the number of hosts
that need the information. If a large number of users need the information, the information source
needs to send a copy of the same information to each of these users. This means a tremendous
pressure on the information source and the network bandwidth.
As we can see from the information transmission process, unicast is not suitable for batch
transmission of information.
Broadcast
In broadcast, the information source sends information to all hosts on the subnet, even if some hosts
do not need the information, as shown in Figure 1-2.
2-2
Assume that only Host B, Host D, and Host E need the information. If the information is broadcast to
the subnet, Host A and Host C also receive it. In addition to information security issues, this also
causes traffic flooding on the same subnet.
Therefore, broadcast is disadvantageous in transmitting data to specific hosts; moreover, broadcast
transmission is a significant waste of network resources.
Multicast
As discussed above, unicast and broadcast techniques are unable to provide point-to-multipoint data
transmissions with the minimum network consumption.
Multicast can well solve this problem. When some hosts on the network need multicast information, the
information sender, or multicast source, sends only one copy of the information. Multicast distribution
trees are built through multicast routing protocols, and the packets are replicated only on nodes where
the trees branch. Figure 1-3 shows the delivery of a data stream to receiver hosts through multicast.
2-3
The multicast source (Source in the figure) sends only one copy of the information to a multicast group.
Host B, Host D and Host E, which are receivers of the information, need to join the multicast group.
The routers on the network duplicate and forward the information based on the distribution of the group
members. Finally, the information is correctly delivered to Host B, Host D, and Host E.
To sum up, the advantages of multicast are summarized as follows:
z Over unicast: As multicast traffic flows to the node the farthest possible from the source before it is
replicated and distributed, an increase of the number of hosts will not increase the load of the
source and will not remarkably add to network resource usage.
z Over broadcast: As multicast data is sent only to the receivers that need it, multicast uses the
network bandwidth reasonably and enhances network security. In addition, data broadcast is
confined to the same subnet, while multicast is not.
Features of Multicast
2-4
Advantages of multicast
Applications of multicast
Multicast Models
Based on how the receivers treat the multicast sources, there are three multicast models: any-source
multicast (ASM), source-filtered multicast (SFM), and source-specific multicast (SSM).
2-5
In the ASM model, any sender can send information to a multicast group as a multicast source, and
numbers of receivers can join a multicast group identified by a group address and obtain multicast
information addressed to that multicast group. In this model, receivers are not aware of the position of
multicast sources in advance. However, they can join or leave the multicast group at any time.
SFM model
The SFM model is derived from the ASM. From the view of a sender, the two models have the same
multicast membership architecture.
The SFM model functionally extends the ASM model: In the SFM model, the upper layer software
checks the source address of received multicast packets and permits or denies multicast traffic from
specific sources. Therefore, receivers can receive the multicast data from only part of the multicast
sources. From the view of a receiver, multicast sources are not all valid: they are filtered.
SSM model
In the practical life, users may be interested in the multicast data from only certain multicast sources.
The SSM model provides a transmission service that allows users to specify the multicast sources they
are interested in at the client side.
The radical difference between the SSM model and the ASM model is that in the SSM model, receivers
already know the locations of the multicast sources by some other means. In addition, the SSM model
uses a multicast address range that is different from that of the ASM/SFM model, and dedicated
multicast forwarding paths are established between receivers and the specified multicast sources.
Multicast Architecture
IP multicast addresses the following questions:
z Where should the multicast source transmit information to? (multicast addressing)
z What receivers exist on the network? (host registration)
z Where is the multicast source the receivers need to receive multicast data from? (multicast source
discovery)
z How should information be transmitted to the receivers? (multicast routing)
IP multicast falls in the scope of end-to-end service. The multicast architecture involves the following
four parts:
1) Addressing mechanism: Information is sent from a multicast source to a group of receivers
through a multicast address.
2) Host registration: Receiver hosts are allowed to join and leave multicast groups dynamically. This
mechanism is the basis for group membership management.
3) Multicast routing: A multicast distribution tree (namely a forwarding path tree for multicast data on
the network) is constructed for delivering multicast data from a multicast source to receivers.
4) Multicast applications: A software system that supports multicast applications, such as video
conferencing, must be installed on multicast sources and receiver hosts, and the TCP/IP stack
must support reception and transmission of multicast data.
2-6
To allow communication between multicast sources and multicast group members, network-layer
multicast addresses, namely, multicast IP addresses must be provided. In addition, a technique must
be available to map multicast IP addresses to link-layer multicast MAC addresses.
IP multicast addresses
z The membership of a group is dynamic. Hosts can join or leave multicast groups at any time.
z Glop is a mechanism for assigning multicast addresses between different autonomous systems
(ASs). By filling an AS number into the middle two bytes of 233.0.0.0, you get 255 multicast
addresses for that AS. For more information, refer to RFC 2770.
Address Description
224.0.0.1 All systems on this subnet, including hosts and routers
224.0.0.2 All multicast routers on this subnet
224.0.0.3 Unassigned
224.0.0.4 Distance Vector Multicast Routing Protocol (DVMRP) routers
224.0.0.5 Open Shortest Path First (OSPF) routers
224.0.0.6 OSPF designated routers/backup designated routers
2-7
Referring to Figure 1-4, the meanings of the fields of an IPv6 multicast address are as follows:
z 0xFF: The most significant 8 bits are 11111111, indicating that this address is an IPv6 multicast
address.
Figure 1-5 Format of the Flags field
z Flags: Referring to Figure 1-5, the following table describes the four bits of the Flags field.
Bit Description
0 Reserved, set to 0
z When set to 0, it indicates that this address is an IPv6 multicast address without
an embedded RP address
R
z When set to 1, it indicates that this address is an IPv6 multicast address with an
embedded RP address (The P and T bits must also be set to 1)
z When set to 0, it indicates that this address is an IPv6 multicast address not
based on a unicast prefix
P
z When set to 1, it indicates that this address is an IPv6 multicast address based
on a unicast prefix (the T bit must also be set to 1)
2-8
z Scope: 4 bits, indicating the scope of the IPv6 internetwork for which the multicast traffic is
intended. Possible values of this field are given in Table 1-5.
Value Meaning
0, 3, F Reserved
1 Interface-local scope
2 Link-local scope
4 Admin-local scope
5 Site-local scope
6, 7, 9 through D Unassigned
8 Organization-local scope
E Global scope
z Group ID: 112 bits, IPv6 multicast group identifier that uniquely identifies an IPv6 multicast group
in the scope defined by the Scope field.
When a unicast IP packet is transmitted over Ethernet, the destination MAC address is the MAC
address of the receiver. When a multicast packet is transmitted over Ethernet, however, the destination
address is a multicast MAC address because the packet is directed to a group formed by a number of
receivers, rather than to one specific receiver.
1) IPv4 multicast MAC addresses
As defined by IANA, the high-order 24 bits of an IPv4 multicast MAC address are 0x01005E, bit 25 is 0,
and the low-order 23 bits are the low-order 23 bits of a multicast IPv4 address. The IPv4-to-MAC
mapping relation is shown in Figure 1-6.
Figure 1-6 IPv4-to-MAC address mapping
5 bits lost
XXXX X
32-bit IPv4 address 1110 XXXX XXXX XXXX XXXX XXXX XXXX XXXX
23 bits
mapped
48-bit MAC address
0000 0001 0000 0000 0101 1110 0XXX XXXX XXXX XXXX XXXX XXXX
2-9
Multicast Protocols
z Generally, we refer to IP multicast working at the network layer as Layer 3 multicast and the
corresponding multicast protocols as Layer 3 multicast protocols, which include IGMP/MLD,
PIM/IPv6 PIM, MSDP, and MBGP/IPv6 MBGP; we refer to IP multicast working at the data link
layer as Layer 2 multicast and the corresponding multicast protocols as Layer 2 multicast
protocols, which include IGMP Snooping/MLD Snooping, and multicast VLAN/IPv6 multicast
VLAN.
z IGMP Snooping, IGMP, multicast VLAN, PIM, MSDP, and MBGP are for IPv4, MLD Snooping,
MLD, IPv6 multicast VLAN, IPv6 PIM, and IPv6 MBGP are for IPv6.
z This section provides only general descriptions about applications and functions of the Layer 2
and Layer 3 multicast protocols in a network.
Layer 3 multicast protocols include multicast group management protocols and multicast routing
protocols. Figure 1-8 describes where these multicast protocols are in a network.
2-10
Layer 2 multicast protocols include IGMP Snooping/MLD Snooping and multicast VLAN/IPv6 multicast
VLAN. Figure 1-9 shows where these protocols are in the network.
2-11
Source
Multicast VLAN
/IPv6 Multicast VLAN
IGMP Snooping
/MLD Snooping
Receiver Receiver
2-12
When configuring IGMP Snooping, go to the following sections for information you are interested in:
z IGMP Snooping Overview
z IGMP Snooping Configuration Task List
z Displaying and Maintaining IGMP Snooping
z IGMP Snooping Configuration Examples
z Troubleshooting IGMP Snooping Configuration
By analyzing received IGMP messages, a Layer 2 device running IGMP Snooping establishes
mappings between ports and multicast MAC addresses and forwards multicast data based on these
mappings.
As shown in Figure 2-1, when IGMP Snooping is not running on the switch, multicast packets are
broadcast to all devices at Layer 2. When IGMP Snooping is running on the switch, multicast packets
for known multicast groups are multicast to the receivers, rather than broadcast to all hosts, at Layer 2.
Figure 2-1 Before and after IGMP Snooping is enabled on the Layer 2 device
Source Source
Host B Host B
Multicast packets
IGMP Snooping forwards multicast data to only the receivers requiring it at Layer 2. It brings the
following advantages:
2-1
As shown in Figure 2-2, Router A connects to the multicast source, IGMP Snooping runs on Switch A
and Switch B, Host A and Host C are receiver hosts (namely, multicast group members).
Figure 2-2 IGMP Snooping related ports
Receiver
Router A Switch A
GE1/0/1 GE1/0/2
GE1/0/3 Host A
Host B
GE1/0/1 Receiver
Source GE1/0/2
Switch B Host C
Router port
Member port
Multicast packets
Host D
Ports involved in IGMP Snooping, as shown in Figure 2-2, are described as follows:
z Router port: A router port is a port on an Ethernet switch that leads switch towards a Layer 3
multicast device (DR or IGMP querier). In the figure, GigabitEthernet 1/0/1 of Switch A and
GigabitEthernet 1/0/1 of Switch B are router ports. The switch registers all its local router ports in
its router port list.
z Member port: A member port is a port on an Ethernet switch that leads the switch towards
multicast group members. In the figure, GigabitEthernet 1/0/2 and GigabitEthernet 1/0/3 of Switch
A and GigabitEthernet 1/0/2 of Switch B are member ports. The switch registers all the member
ports on the local device in its IGMP Snooping forwarding table.
z Whenever mentioned in this document, a router port is a port on the switch that leads the switch to
a Layer 3 multicast device, rather than a port on a router.
z Unless otherwise specified, router/member ports mentioned in this document include static and
dynamic ports.
z An IGMP-snooping-enabled switch deems that all its ports on which IGMP general queries with
the source IP address other than 0.0.0.0 or PIM hello messages are received to be dynamic router
ports.
2-2
Table 2-1 Aging timers for dynamic ports in IGMP Snooping and related messages and actions
Message before
Timer Description Action after expiry
expiry
For each dynamic
IGMP general query of
router port, the switch The switch removes
Dynamic router port which the source
sets a timer initialized this port from its router
aging timer address is not 0.0.0.0
to the dynamic router port list.
or PIM hello
port aging time.
When a port
dynamically joins a
multicast group, the The switch removes
Dynamic member port switch sets a timer for IGMP membership this port from the
aging timer the port, which is report IGMP Snooping
initialized to the forwarding table.
dynamic member port
aging time.
The port aging mechanism of IGMP Snooping works only for dynamic ports; a static port will never age
out.
A switch running IGMP Snooping performs different actions when it receives different IGMP messages,
as follows:
The description about adding or deleting a port in this section is only for a dynamic port. Static ports
can be added or deleted only through the corresponding configurations. For details, see Configuring
Static Ports.
The IGMP querier periodically sends IGMP general queries to all hosts and routers (224.0.0.1) on the
local subnet to find out whether active multicast group members exist on the subnet.
Upon receiving an IGMP general query, the switch forwards it through all ports in the VLAN except the
receiving port and performs the following to the receiving port:
z If the receiving port is a dynamic router port existing in its router port list, the switch resets the
aging timer of this dynamic router port.
z If the receiving port is not a dynamic router port existing in its router port list, the switch adds it into
its router port list and sets an aging timer for this dynamic router port.
2-3
A host sends an IGMP report to the IGMP querier in the following circumstances:
z Upon receiving an IGMP query, a multicast group member host responds with an IGMP report.
z When intended to join a multicast group, a host sends an IGMP report to the IGMP querier to
announce that it is interested in the multicast information addressed to that group.
Upon receiving an IGMP report, the switch forwards it through all the router ports in the VLAN,
resolves the address of the reported multicast group, and performs the following:
z If no forwarding table entry exists for the reported group, the switch creates an entry, adds the port
as a dynamic member port to the outgoing port list, and starts a member port aging timer for that
port.
z If a forwarding table entry exists for the reported group, but the port is not included in the outgoing
port list for that group, the switch adds the port as a dynamic member port to the outgoing port list,
and starts an aging timer for that port.
z If a forwarding table entry exists for the reported group and the port is included in the outgoing port
list, which means that this port is already a dynamic member port, the switch resets the aging
timer for that port.
A switch does not forward an IGMP report through a non-router port. The reason is as follows: Due to
the IGMP report suppression mechanism, if the switch forwards a report message through a member
port, all the attached hosts listening to the reported multicast address will suppress their own reports
upon receiving this report, and this will prevent the switch from knowing whether the reported multicast
group still has active members attached to that port.
When an IGMPv1 host leaves a multicast group, the host does not send an IGMP leave message, so
the switch cannot know immediately that the host has left the multicast group. However, as the host
stops sending IGMP reports as soon as it leaves a multicast group, the switch deletes the forwarding
entry for the dynamic member port corresponding to the host from the forwarding table when its aging
timer expires.
When an IGMPv2 or IGMPv3 host leaves a multicast group, the host sends an IGMP leave message
to the multicast router.
When the switch receives an IGMP leave message on a dynamic member port, the switch first checks
whether a forwarding table entry for the group address in the message exists, and, if one exists,
whether the outgoing port list contains the port.
z If the forwarding table entry does not exist or if the outgoing port list does not contain the port, the
switch discards the IGMP leave message instead of forwarding it to any port.
z If the forwarding table entry exists and the outgoing port list contains the port, the switch forwards
the leave message to all router ports in the native VLAN. Because the switch does not know
whether any other hosts attached to the port are still listening to that group address, the switch
does not immediately remove the port from the outgoing port list of the forwarding table entry for
that group; instead, it resets the aging timer for the port.
2-4
Task Remarks
2-5
Before configuring the basic functions of IGMP Snooping, complete the following task:
z Configure the corresponding VLANs.
Before configuring the basic functions of IGMP Snooping, prepare the following data:
z Version of IGMP Snooping.
2-6
By configuring an IGMP Snooping version, you actually configure the version of IGMP messages that
IGMP Snooping can process.
z IGMP Snooping version 2 can process IGMPv1 and IGMPv2 messages, but not IGMPv3
messages, which will be flooded in the VLAN.
z IGMP Snooping version 3 can process IGMPv1, IGMPv2 and IGMPv3 messages.
Follow these steps to configure the version of IGMP Snooping:
If you switch IGMP Snooping from version 3 to version 2, the system will clear all IGMP Snooping
forwarding entries from dynamic joins, and will:
z Keep forwarding entries for version 3 static (*, G) joins;
z Clear forwarding entries from version 3 static (S, G) joins, which will be restored when IGMP
Snooping is switched back to version 3.
For details about static joins, Refer to Configuring Static Ports.
Before configuring IGMP Snooping port functions, complete the following tasks:
z Enable IGMP Snooping in the VLAN
z Configure the corresponding port groups.
Before configuring IGMP Snooping port functions, prepare the following data:
z Aging time of dynamic router ports,
z Aging time of dynamic member ports, and
z Multicast group and multicast source addresses
2-7
If the switch receives no IGMP general queries or PIM hello messages on a dynamic router port, the
switch removes the port from the router port list when the aging timer of the port expires.
If the switch receives no IGMP reports for a multicast group on a dynamic member port, the switch
removes the port from the outgoing port list of the forwarding table entry for that multicast group when
the aging timer of the port for that group expires.
If multicast group memberships change frequently, you can set a relatively small value for the dynamic
member port aging timer, and vice versa.
Follow these steps to configure aging timers for dynamic ports globally:
Follow these steps to configure aging timers for dynamic ports in a VLAN:
If all the hosts attached to a port are interested in the multicast data addressed to a particular multicast
group or the multicast data that a particular multicast source sends to a particular group, you can
configure static (*, G) or (S, G) joining on that port, namely configure the port as a group-specific or
source-and-group-specific static member port.
You can configure a port of a switch to be a static router port, through which the switch can forward all
the multicast traffic it received.
2-8
z A static (S, G) joining can take effect only if a valid multicast source address is specified and IGMP
Snooping version 3 is currently running.
z A static member port does not respond to queries from the IGMP querier; when static (*, G) or (S,
G) joining is enabled or disabled on a port, the port does not send an unsolicited IGMP report or
an IGMP leave message.
z Static member ports and static router ports never age out. To remove such a port, you need to use
the corresponding undo command.
Generally, a host running IGMP responds to IGMP queries from the IGMP querier. If a host fails to
respond due to some reasons, the multicast router may deem that no member of this multicast group
exists on the network segment, and therefore will remove the corresponding forwarding path.
To avoid this situation from happening, you can enable simulated joining on a port of the switch,
namely configure the port as a simulated member host for a multicast group. When receiving an IGMP
query, the simulated host gives a response. Thus, the switch can continue receiving multicast data.
A simulated host acts like a real host, as follows:
z When a port is configured as a simulated member host, the switch sends an unsolicited IGMP
report through that port.
z After a port is configured as a simulated member host, the switch responds to IGMP general
queries by sending IGMP reports through that port.
z When the simulated joining function is disabled on a port, the switch sends an IGMP leave
message through that port.
2-9
z Each simulated host is equivalent to an independent host. For example, when receiving an IGMP
query, the simulated host corresponding to each configuration responds respectively.
z Unlike a static member port, a port configured as a simulated member host will age out like a
dynamic member port.
The fast leave processing feature allows the switch to process IGMP leave messages in a fast way.
With the fast leave processing feature enabled, when receiving an IGMP leave message on a port, the
switch immediately removes that port from the outgoing port list of the forwarding table entry for the
indicated group. Then, when receiving IGMP group-specific queries for that multicast group, the switch
will not forward them to that port.
In VLANs where only one host is attached to each port, fast leave processing helps improve bandwidth
and resource usage. However, if fast leave processing is enabled on a port to which more than one
host is attached, when one host leaves a multicast group, the other hosts attached to the port and
interested in the same multicast group will fail to receive multicast data for that group. Therefore, if the
function of dropping unknown multicast traffic is already enabled on the switch or in the VLANs, the
fast leave processing function should not be enabled.
Required
Enable fast leave processing fast-leave [ vlan vlan-list ]
Disabled by default
2-10
Follow these steps to configure fast leave processing on a port or a group of ports:
Required
Enable fast leave processing igmp-snooping fast-leave [ vlan vlan-list ]
Disabled by default
In an IP multicast network running IGMP, a multicast router or Layer 3 multicast switch is responsible
for sending IGMP general queries, so that all Layer 3 multicast devices can establish and maintain
multicast forwarding entries, thus to forward multicast traffic correctly at the network layer. This router
or Layer 3 switch is called IGMP querier.
However, a Layer 2 multicast switch does not support IGMP, and therefore cannot send general
queries by default. By enabling IGMP Snooping on a Layer 2 switch in a VLAN where multicast traffic
needs to be Layer-2 switched only and no multicast routers are present, the Layer 2 switch will act as
the IGMP Snooping querier to send IGMP queries, thus allowing multicast forwarding entries to be
established and maintained at the data link layer.
Follow these steps to enable IGMP Snooping querier:
2-11
You can tune the IGMP general query interval based on actual condition of the network.
Upon receiving an IGMP query (general query or group-specific query), a host starts a timer for each
multicast group it has joined. This timer is initialized to a random value in the range of 0 to the
maximum response time (the host obtains the value of the maximum response time from the Max
Response Time field in the IGMP query it received). When the timer value comes down to 0, the host
sends an IGMP report to the corresponding multicast group.
An appropriate setting of the maximum response time for IGMP queries allows hosts to respond to
queries quickly and avoids bursts of IGMP traffic on the network caused by reports simultaneously sent
by a large number of hosts when the corresponding timers expire simultaneously.
z For IGMP general queries, you can configure the maximum response time to fill their Max
Response time field.
z For IGMP group-specific queries, you can configure the IGMP last-member query interval to fill
their Max Response time field. Namely, for IGMP group-specific queries, the maximum response
time equals to the IGMP last-member query interval.
2-12
In the configuration, make sure that the IGMP general query interval is larger than the maximum
response time for IGMP general queries. Otherwise, multicast group members may be deleted by
mistake.
Upon receiving an IGMP query whose source IP address is 0.0.0.0 on a port, the switch does not enlist
that port as a dynamic router port. This may prevent multicast forwarding entries from being correctly
created at the data link layer and cause multicast traffic forwarding failure in the end. When a Layer 2
device acts as an IGMP-Snooping querier, to avoid the aforesaid problem, you are commended to
configure a non-all-zero IP address as the source IP address of IGMP queries.
Follow these steps to configure source IP address of IGMP queries:
The source address of IGMP query messages may affect IGMP querier selection within the segment.
2-13
On an IGMP Snoopingenabled switch, the configuration of a multicast group allows the service
provider to define restrictions on multicast programs available to different users.
In an actual application, when a user requests a multicast program, the users host initiates an IGMP
report. Upon receiving this report message, the switch checks the report against the configured ACL
rule. If the port on which the report was received can join this multicast group, the switch adds an entry
for this port in the IGMP Snooping forwarding table; otherwise the switch drops this report message.
Any multicast data that has failed the ACL check will not be sent to this port. In this way, the service
provider can control the VOD programs provided for multicast users.
Required
Configure a multicast group group-policy acl-number By default, no group filter is
filter [ vlan vlan-list ] globally configured, that is,
hosts in VLANs can join any
valid multicast group.
Follow these steps to configure a multicast group filter on a port or a group of ports:
interface interface-type
Enter Ethernet port/Layer 2 interface-number Required
aggregate port view or port
group view port-group manual Use either approach
port-group-name
Required
Configure a multicast group igmp-snooping group-policy By default, no group filter is
filter acl-number [ vlan vlan-list ] configured on the current port,
that is, hosts on this port can
join any valid multicast group.
With the multicast source port filtering feature enabled on a port, the port can be connected with
multicast receivers only rather than with multicast sources, because the port will block all multicast
data packets while it permits multicast protocol packets to pass.
2-14
Follow these steps to configure multicast source port filtering on a port or a group of ports:
interface interface-type
Enter Ethernet port view interface-number Required
or port group view Use either approach
port-group manual port-group-name
For the Switch 4510G Family, when enabled to filter IPv4 multicast data based on the source ports, are
automatically enabled to filter IPv6 multicast data based on the source ports.
Unknown multicast data refers to multicast data for which no entries exist in the IGMP Snooping
forwarding table. When receiving such multicast traffic, the switch floods it in the VLAN, incurring
network bandwidth waste and low forwarding efficiency.
With the function of dropping unknown multicast data enabled, the switch forwards unknown multicast
data to its router ports instead of flooding it in the VLAN. If no router ports exist, the switch drops the
unknown multicast data..
Follow these steps to configure the function of dropping unknown multicast data in a VLAN:
2-15
When a Layer 2 device receives an IGMP report from a multicast group member, the device forwards
the message to the Layer 3 device directly connected with it. Thus, when multiple members of a
multicast group are attached to the Layer 2 device, the Layer 3 device directly connected with it will
receive duplicate IGMP reports from these members.
With the IGMP report suppression function enabled, within each query cycle, the Layer 2 device
forwards only the first IGMP report per multicast group to the Layer 3 device and will not forward the
subsequent IGMP reports from the same multicast group to the Layer 3 device. This helps reduce the
number of packets being transmitted over the network.
Follow these steps to configure IGMP report suppression:
By configuring the maximum number of multicast groups that can be joined on a port, you can limit the
number of multicast programs on-demand available to users, thus to regulate traffic on the port.
Follow these steps to configure the maximum number of multicast groups allowed on a port or ports:
interface interface-type
Enter Ethernet port/Layer 2 interface-number Required
aggregate port view or port
group view port-group manual Use either approach
port-group-name
Optional
Configure the maximum
igmp-snooping group-limit By default, the maximum
number of multicast groups
limit [ vlan vlan-list ] number of multicast groups
allowed on the port(s)
allowed on the port(s) is 1000.
2-16
For some special reasons, the number of multicast groups that can be joined on the current switch or
port may exceed the number configured for the switch or the port. In addition, in some specific
applications, a multicast group newly joined on the switch needs to replace an existing multicast group
automatically. A typical example is channel switching, namely, by joining a new multicast group, a
user automatically switches from the current multicast group to the new one.
To address such situations, you can enable the multicast group replacement function on the switch or
certain ports. When the number of multicast groups joined on the switch or a port has joined reaches
the limit:
z If the multicast group replacement feature is enabled, the newly joined multicast group
automatically replaces an existing multicast group with the lowest address.
z If the multicast group replacement feature is not enabled, new IGMP reports will be automatically
discarded.
2-17
Follow these steps to configure multicast group replacement on a port or a group of ports:
interface interface-type
Enter Ethernet port/Layer 2 interface-number Required
aggregate port view or port
group view port-group manual Use either approach
port-group-name
Be sure to configure the maximum number of multicast groups allowed on a port (refer to Configuring
Maximum Multicast Groups that Can Be Joined on a Port) before enabling multicast group
replacement. Otherwise, the multicast group replacement functionality will not take effect.
z The reset igmp-snooping group command works only on an IGMP Snoopingenabled VLAN,
but not on a VLAN with IGMP enabled on its VLAN interface.
z The reset igmp-snooping group command cannot clear the IGMP Snooping multicast group
information for static joins.
2-18
Network requirements
z As shown in Figure 2-3, Router A connects to the multicast source through GigabitEthernet 1/0/2
and to Switch A through GigabitEthernet 1/0/1.
z IGMPv2 is required on Router A, IGMP Snooping version 2 is required on Switch A, and Router A
will act as the IGMP querier on the subnet.
z It is required that the receivers, Host A and Host B, attached to Switch A can receive multicast
traffic addressed to multicast group 224.1.1.1 only.
z It is required that multicast data for group 224.1.1.1 can be forwarded through GigabitEthernet
1/0/3 and GigabitEthernet 1/0/4 of Switch A even if Host A and Host B accidentally, temporarily
stop receiving multicast data.
Network diagram
Figure 2-3 Network diagram for group policy simulated joining configuration
Configuration procedure
1) Configure IP addresses
Configure an IP address and subnet mask for each interface as per Figure 2-3. The detailed
configuration steps are omitted.
2) Configure Router A
# Enable IP multicast routing, enable PIM-DM on each interface, and enable IGMP on GigabitEthernet
1/0/1.
<RouterA> system-view
[RouterA] multicast routing-enable
[RouterA] interface gigabitethernet 1/0/1
[RouterA-GigabitEthernet1/0/1] igmp enable
[RouterA-GigabitEthernet1/0/1] pim dm
[RouterA-GigabitEthernet1/0/1] quit
[RouterA] interface gigabitethernet 1/0/2
2-19
# Create VLAN 100, assign GigabitEthernet 1/0/1 through GigabitEthernet 1/0/4 to this VLAN, and
enable IGMP Snooping and the function of dropping unknown multicast traffic in the VLAN.
[SwitchA] vlan 100
[SwitchA-vlan100] port gigabitethernet 1/0/1 to gigabitethernet 1/0/4
[SwitchA-vlan100] igmp-snooping enable
[SwitchA-vlan100] igmp-snooping drop-unknown
[SwitchA-vlan100] quit
# Configure a multicast group filter so that the hosts in VLAN 100 can join only the multicast group
224.1.1.1.
[SwitchA] acl number 2001
[SwitchA-acl-basic-2001] rule permit source 224.1.1.1 0
[SwitchA-acl-basic-2001] quit
[SwitchA] igmp-snooping
[SwitchA-igmp-snooping] group-policy 2001 vlan 100
[SwitchA-igmp-snooping] quit
# Configure GigabitEthernet 1/0/3 and GigabitEthernet 1/0/4 as simulated hosts for multicast group
224.1.1.1.
[SwitchA] interface gigabitethernet 1/0/3
[SwitchA-GigabitEthernet1/0/3] igmp-snooping host-join 224.1.1.1 vlan 100
[SwitchA-GigabitEthernet1/0/3] quit
[SwitchA] interface gigabitethernet 1/0/4
[SwitchA-GigabitEthernet1/0/4] igmp-snooping host-join 224.1.1.1 vlan 100
[SwitchA-GigabitEthernet1/0/4] quit
4) Verify the configuration
# View the detailed IGMP Snooping multicast groups information in VLAN 100 on Switch A.
[SwitchA] display igmp-snooping group vlan 100 verbose
Total 1 IP Group(s).
Total 1 IP Source(s).
Total 1 MAC Group(s).
2-20
As shown above, GigabitEthernet 1/0/3 and GigabitEthernet 1/0/4 of Switch A has joined multicast
group 224.1.1.1.
Network requirements
z As shown in Figure 2-4, Router A connects to a multicast source (Source) through GigabitEthernet
1/0/2, and to Switch A through GigabitEthernet 1/0/1.
z IGMPv2 is to run on Router A, and IGMPv2 Snooping is to run on Switch A, Switch B and Switch
C, with Router A acting as the IGMP querier.
z Host A and host C are permanent receivers of multicast group 224.1.1.1. GigabitEthernet 1/0/3
and GigabitEthernet 1/0/5 on Switch C are required to be configured as static member ports for
multicast group 224.1.1.1 to enhance the reliability of multicast traffic transmission.
z Suppose STP runs on the network. To avoid data loops, the forwarding path from Switch A to
Switch C is blocked under normal conditions, and multicast traffic flows to the receivers attached
to Switch C only along the path of Switch ASwitch BSwitch C.
z It is required to configure GigabitEthernet 1/0/3 that connects Switch A to Switch C as a static
router port, so that multicast traffic can flow to the receivers nearly uninterruptedly along the path
of Switch ASwitch C in the case that the path of Switch ASwitch BSwitch C gets blocked.
If no static router port is configured, when the path of Switch ASwitch BSwitch C gets blocked, at
least one IGMP query-response cycle must be completed before the multicast data can flow to the
receivers along the new path of Switch ASwitch C, namely multicast delivery will be interrupted
during this process.
2-21
Source
Switch A
GE1/0/2 GE1/0/1
1.1.1.2/24 10.1.1.1/24 GE1/0/1
/3
GE
1/0
1.1.1.1/24 Router A
1/0
GE
/2
IGMP querier
/1
GE
1/0
1/0
Switch C
GE
/1
GE1/0/5 GE1/0/2 GE1/0/2
/4
GE
Host C
1/0
Switch B
1/0
GE
Receiver
/3
Host B Host A
Receiver
Configuration procedure
1) Configure IP addresses
Configure an IP address and subnet mask for each interface as per Figure 2-4. The detailed
configuration steps are omitted.
2) Configure Router A
# Enable IP multicast routing, enable PIM-DM on each interface, and enable IGMP on GigabitEthernet
1/0/1.
<RouterA> system-view
[RouterA] multicast routing-enable
[RouterA] interface gigabitethernet 1/0/1
[RouterA-GigabitEthernet1/0/1] igmp enable
[RouterA-GigabitEthernet1/0/1] pim dm
[RouterA-GigabitEthernet1/0/1] quit
[RouterA] interface gigabitethernet 1/0/2
[RouterA-GigabitEthernet1/0/2] pim dm
[RouterA-GigabitEthernet1/0/2] quit
3) Configure Switch A
# Enable IGMP Snooping globally.
<SwitchA> system-view
[SwitchA] igmp-snooping
[SwitchA-igmp-snooping] quit
# Create VLAN 100, assign GigabitEthernet 1/0/1 through GigabitEthernet 1/0/3 to this VLAN, and
enable IGMP Snooping in the VLAN.
[SwitchA] vlan 100
[SwitchA-vlan100] port gigabitethernet 1/0/1 to gigabitethernet 1/0/3
[SwitchA-vlan100] igmp-snooping enable
2-22
# Create VLAN 100, assign GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 to this VLAN, and enable
IGMP Snooping in the VLAN.
[SwitchB] vlan 100
[SwitchB-vlan100] port gigabitethernet 1/0/1 gigabitethernet 1/0/2
[SwitchB-vlan100] igmp-snooping enable
[SwitchB-vlan100] quit
5) Configure Switch C
# Enable IGMP Snooping globally.
<SwitchC> system-view
[SwitchC] igmp-snooping
[SwitchC-igmp-snooping] quit
# Create VLAN 100, assign GigabitEthernet 1/0/1 through GigabitEthernet 1/0/5 to this VLAN, and
enable IGMP Snooping in the VLAN.
[SwitchC] vlan 100
[SwitchC-vlan100] port gigabitethernet 1/0/1 to gigabitethernet 1/0/5
[SwitchC-vlan100] igmp-snooping enable
[SwitchC-vlan100] quit
# Configure GigabitEthernet 1/0/3 and GigabitEthernet 1/0/5 as static member ports for multicast
group 224.1.1.1.
[SwitchC] interface GigabitEthernet 1/0/3
[SwitchC-GigabitEthernet1/0/3] igmp-snooping static-group 224.1.1.1 vlan 100
[SwitchC-GigabitEthernet1/0/3] quit
[SwitchC] interface GigabitEthernet 1/0/5
[SwitchC-GigabitEthernet1/0/5] igmp-snooping static-group 224.1.1.1 vlan 100
[SwitchC-GigabitEthernet1/0/5] quit
6) Verify the configuration
# View the detailed IGMP Snooping multicast group information in VLAN 100 on Switch A.
[SwitchA] display igmp-snooping group vlan 100 verbose
Total 1 IP Group(s).
Total 1 IP Source(s).
Total 1 MAC Group(s).
2-23
As shown above, GigabitEthernet 1/0/3 of Switch A has become a static router port.
# View the detailed IGMP Snooping multicast group information in VLAN 100 on Switch C.
[SwitchC] display igmp-snooping group vlan 100 verbose
Total 1 IP Group(s).
Total 1 IP Source(s).
Total 1 MAC Group(s).
As shown above, GigabitEthernet 1/0/3 and GigabitEthernet 1/0/5 on Switch C have become static
member ports for multicast group 224.1.1.1.
2-24
Network requirements
z As shown in Figure 2-5, in a Layer 2only network environment, two multicast sources Source 1
and Source 2 send multicast data to multicast groups 224.1.1.1 and 225.1.1.1 respectively, Host A
and Host C are receivers of multicast group 224.1.1.1, while Host B and Host D are receivers of
multicast group 225.1.1.1.
z All the receivers are running IGMPv2, and all the switches need to run IGMP Snooping version 2.
Switch A, which is close to the multicast sources, is chosen as the IGMP-Snooping querier.
z To prevent flooding of unknown multicast traffic within the VLAN, it is required to configure all the
switches to drop unknown multicast data packets.
z Because a switch does not enlist a port that has heard an IGMP query with a source IP address of
0.0.0.0 (default) as a dynamic router port, configure a non-all-zero IP address as the source IP
address of IGMP queries to ensure normal creation of Layer 2 multicast forwarding entries.
Network diagram
Configuration procedure
1) Configure switch A
# Enable IGMP Snooping globally.
<SwitchA> system-view
[SwitchA] igmp-snooping
[SwitchA-igmp-snooping] quit
# Create VLAN 100 and assign GigabitEthernet 1/0/1 through GigabitEthernet 1/0/3 to the VLAN.
[SwitchA] vlan 100
[SwitchA-vlan100] port gigabitethernet 1/0/1 to gigabitethernet 1/0/3
# Enable IGMP Snooping and the function of dropping unknown multicast traffic in VLAN 100.
[SwitchA-vlan100] igmp-snooping enable
[SwitchA-vlan100] igmp-snooping drop-unknown
2-25
# Set the source IP address of IGMP general queries and group-specific queries to 192.168.1.1 in
VLAN 100.
[SwitchA-vlan100] igmp-snooping general-query source-ip 192.168.1.1
[SwitchA-vlan100] igmp-snooping special-query source-ip 192.168.1.1
[SwitchA-vlan100] quit
2) Configure Switch B
# Enable IGMP Snooping globally.
<SwitchB> system-view
[SwitchB] igmp-snooping
[SwitchB-igmp-snooping] quit
# Create VLAN 100, and assign GigabitEthernet 1/0/1 through GigabitEthernet 1/0/4 to the VLAN.
[SwitchB] vlan 100
[SwitchB-vlan100] port gigabitethernet 1/0/1 to gigabitethernet 1/0/4
# Enable IGMP Snooping and the function of dropping unknown multicast traffic in VLAN 100.
[SwitchB-vlan100] igmp-snooping enable
[SwitchB-vlan100] igmp-snooping drop-unknown
[SwitchB-vlan100] quit
2-26
Symptom
Analysis
Solution
1) Enter the display current-configuration command to view the running status of IGMP Snooping.
2) If IGMP Snooping is not enabled, use the igmp-snooping command to enable IGMP Snooping
globally, and then use igmp-snooping enable command to enable IGMP Snooping in VLAN
view.
3) If IGMP Snooping is disabled only for the corresponding VLAN, just use the igmp-snooping
enable command in VLAN view to enable IGMP Snooping in the corresponding VLAN.
Symptom
Although a multicast group policy has been configured to allow hosts to join specific multicast groups,
the hosts can still receive multicast data addressed to other multicast groups.
Analysis
Solution
1) Use the display acl command to check the configured ACL rule. Make sure that the ACL rule
conforms to the multicast group policy to be implemented.
2) Use the display this command in IGMP Snooping view or in the corresponding port view to check
whether the correct multicast group policy has been applied. If not, use the group-policy or
igmp-snooping group-policy command to apply the correct multicast group policy.
3) Use the display current-configuration command to check whether the function of dropping
unknown multicast data is enabled. If not, use the igmp-snooping drop-unknown command to
enable the function of dropping unknown multicast data.
2-27
When configuring multicast VLAN, go to these sections for information you are interested in:
z Introduction to Multicast VLAN
z Multicast VLAN Configuration Task List
z Configuring Sub-VLAN-Based Multicast VLAN
z Configuring Port-Based Multicast VLAN
z Displaying and Maintaining Multicast VLAN
z Multicast VLAN Configuration Examples
The multicast VLAN feature configured on the Layer 2 device is the solution to this issue. With the
multicast VLAN feature, the Layer 3 device needs to replicate the multicast traffic only in the multicast
VLAN instead of making a separate copy of the multicast traffic in each user VLAN. This saves the
network bandwidth and lessens the burden of the Layer 3 device.
The multicast VLAN feature can be implemented in two approaches, as described below:
As shown in Figure 3-2, Host A, Host B and Host C are in three different user VLANs. On Switch A,
configure VLAN 10 as a multicast VLAN, configure all the user VLANs as sub-VLANs of this multicast
VLAN, and enable IGMP Snooping in the multicast VLAN.
3-1
VLAN 3
Receiver
Host B
Source Router A Switch A
IGMP querier
VLAN 4
Receiver
Host C
After the configuration, IGMP Snooping manages router ports in the multicast VLAN and member ports
in the sub-VLANs. When forwarding multicast data to Switch A, Router A needs to send only one copy
of multicast traffic to Switch A in the multicast VLAN, and Switch A distributes the traffic to the multicast
VLANs sub-VLANs that contain receivers.
As shown in Figure 3-3, Host A, Host B and Host C are in three different user VLANs. All the user ports
(ports with attached hosts) on Switch A are hybrid ports. On Switch A, configure VLAN 10 as a
multicast VLAN, assign all the user ports to this multicast VLAN, and enable IGMP Snooping in the
multicast VLAN and all the user VLANs.
Figure 3-3 Port-based multicast VLAN
After the configuration, upon receiving an IGMP message on a user port, Switch A tags the message
with the multicast VLAN ID and relays it to the IGMP querier, so that IGMP Snooping can uniformly
manage the router ports and member ports in the multicast VLAN. When forwarding multicast data to
Switch A, Router A needs to send only one copy of multicast traffic to Switch A in the multicast VLAN,
and Switch A distributes the traffic to all the member ports in the multicast VLAN.
3-2
Task Remarks
Configuring Sub-VLAN-Based Multicast VLAN
Required
Configuring Port-Based Configuring User Port Attributes
Use either approach.
Multicast VLAN Configuring Multicast VLAN Ports
If you have configured both sub-VLAN-based multicast VLAN and port-based multicast VLAN on a
device, the port-based multicast VLAN configuration is given preference.
In this approach, you need to configure a VLAN as a multicast VLAN, and then configure user VLANs
as sub-VLANs of the multicast VLAN.
Follow these steps to configure sub-VLAN-based multicast VLAN:
3-3
z A user port can be configured as a multicast VLAN port only if it is of the Ethernet or Layer 2
aggregate port type.
z Configurations made in Ethernet port view are effective only for the current port; configurations
made in Layer 2 aggregate port view are effective only for the current port; configurations made in
port group view are effective for all the ports in the current port group.
Configuration Prerequisites
Configure the user ports as hybrid ports that permit packets of the specified user VLAN to pass, and
configure the user VLAN to which the user ports belong as the default VLAN.
Configure the user ports to permit packets of the multicast VLAN to pass and untag the packets. Thus,
upon receiving multicast packets tagged with the multicast VLAN ID from the upstream device, the
Layer 2 device untags the multicast packets and forwards them to its downstream device.
3-4
interface interface-type
interface-number
Enter port view or port group Required
view port-group { manual Use either command
port-group-name |
aggregation agg-id }
For details about the port link-type, port hybrid pvid vlan, and port hybrid vlan commands, refer to
VLAN Commands in the Access Volume.
In this approach, you need to configure a VLAN as a multicast VLAN and then assign user ports to this
multicast VLAN by either adding the user ports in the multicast VLAN or specifying the multicast VLAN
on the user ports. These two configuration methods give the same result.
Follow these steps to configure multicast VLAN ports in multicast VLAN view:
3-5
Follow these steps to configure multicast VLAN ports in port view or port group view:
interface interface-type
Enter port view or port group interface-number Required
view port-group manual Use either command.
port-group-name
Required
Configure the current port(s) as
port multicast-vlan vlan-id By default, a user port does not
port(s) of the multicast VLAN
belong to any multicast VLAN.
Network requirements
3-6
Network diagram
1.1.1.1/24 GE1/0/2
10.110.1.1/24
GE1/0/1
Switch A
GE1/0/2 GE1/0/4
GE1/0/3
Configuration procedure
1) Configure IP addresses
Configure an IP address and subnet mask for each interface as per Figure 3-4. The detailed
configuration steps are omitted here.
2) Configure Router A
# Enable IP multicast routing, enable PIM-DM on each interface and enable IGMP on the host-side
interface GigabitEthernet 1/0/2.
<RouterA> system-view
[RouterA] multicast routing-enable
[RouterA] interface gigabitethernet 1/0/1
[RouterA-GigabitEthernet1/0/1] pim dm
[RouterA-GigabitEthernet1/0/1] quit
[RouterA] interface gigabitethernet 1/0/2
[RouterA-GigabitEthernet1/0/2] pim dm
[RouterA-GigabitEthernet1/0/2] igmp enable
3) Configure Switch A
# Enable IGMP Snooping globally.
<SwitchA> system-view
[SwitchA] igmp-snooping
[SwitchA-igmp-snooping] quit
3-7
The configuration for VLAN 3 and VLAN 4 is similar to the configuration for VLAN 2.
# Create VLAN 10, assign GigabitEthernet 1/0/1 to this VLAN and enable IGMP Snooping in the
VLAN.
[SwitchA] vlan 10
[SwitchA-vlan10] port gigabitethernet 1/0/1
[SwitchA-vlan10] igmp-snooping enable
[SwitchA-vlan10] quit
# Configure VLAN 10 as a multicast VLAN and configure VLAN 2 through VLAN 4 as its sub-VLANs.
[SwitchA] multicast-vlan 10
[SwitchA-mvlan-10] subvlan 2 to 4
[SwitchA-mvlan-10] quit
4) Verify the configuration
# Display information about the multicast VLAN.
[SwitchA] display multicast-vlan
Total 1 multicast-vlan(s)
Multicast vlan 10
subvlan list:
vlan 2-4
port list:
no port
3-8
Vlan(id):4.
Total 1 IP Group(s).
Total 1 IP Source(s).
Total 1 MAC Group(s).
Router port(s):total 0 port.
IP group(s):the following ip group(s) match to one mac group.
IP group address:224.1.1.1
(0.0.0.0, 224.1.1.1):
Host port(s):total 1 port.
GE1/0/4 (D)
MAC group(s):
MAC group address:0100-5e01-0101
Host port(s):total 1 port.
GE1/0/4
Vlan(id):10.
Total 1 IP Group(s).
Total 1 IP Source(s).
Total 1 MAC Group(s).
Router port(s):total 1 port.
GE1/0/1 (D)
IP group(s):the following ip group(s) match to one mac group.
IP group address:224.1.1.1
(0.0.0.0, 224.1.1.1):
Host port(s):total 0 port.
MAC group(s):
MAC group address:0100-5e01-0101
Host port(s):total 0 port.
As shown above, IGMP Snooping is maintaining the router port in the multicast VLAN (VLAN 10) and
the member ports in the sub-VLANs (VLAN 2 through VLAN 4).
3-9
Network requirements
z As shown in Figure 3-5, Router A connects to a multicast source (Source) through GigabitEthernet
1/0/1, and to Switch A through GigabitEthernet 1/0/2.
z IGMPv2 is required on Router A. IGMPv2 Snooping is required on Switch A. Router A acts as the
IGMP querier.
z Switch As GigabitEthernet 1/0/1 belongs to VLAN 10, GigabitEthernet 1/0/2 through
GigabitEthernet 1/0/4 belong to VLAN 2 through VLAN 4 respectively, and Host A through Host C
are attached to GigabitEthernet 1/0/2 through GigabitEthernet1/0/4 of Switch A respectively.
z The multicast source sends multicast data to multicast group 224.1.1.1. Host A, Host B, and Host
C are receivers of the multicast group.
z Configure the port-based multicast VLAN feature so that Router A just sends multicast data to
Switch A through the multicast VLAN and Switch A forwards the multicast data to the receivers
that belong to different user VLANs.
Network diagram
1.1.1.1/24 GE1/0/2
10.110.1.1/24
GE1/0/1
Switch A
GE1/0/2 GE1/0/4
GE1/0/3
Configuration procedure
1) Configure IP addresses
Configure the IP address and subnet mask for each interface as per Figure 3-5. The detailed
configuration steps are omitted here.
2) Configure Router A
# Enable IP multicast routing, enable PIM-DM on each interface, and enable IGMP on the host-side
interface GigabitEthernet 1/0/2.
<RouterA> system-view
[RouterA] multicast routing-enable
[RouterA] interface gigabitethernet 1/0/1
[RouterA-GigabitEthernet1/0/1] pim dm
3-10
# Create VLAN 10, assign GigabitEthernet 1/0/1 to VLAN 10, and enable IGMP Snooping in this
VLAN.
[SwitchA] vlan 10
[SwitchA-vlan10] port gigabitethernet 1/0/1
[SwitchA-vlan10] igmp-snooping enable
[SwitchA-vlan10] quit
The configuration for VLAN 3 and VLAN 4 is similar. The detailed configuration steps are omitted.
# Configure GigabitEthernet 1/0/2 as a hybrid port. Configure VLAN 2 as the default VLAN. Configure
GigabitEthernet 1/0/2 to permit packets of VLAN 2 and VLAN 10 to pass and untag the packets when
forwarding them.
[SwitchA] interface gigabitethernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] port link-type hybrid
[SwitchA-GigabitEthernet1/0/2] port hybrid pvid vlan 2
[SwitchA-GigabitEthernet1/0/2] port hybrid vlan 2 untagged
[SwitchA-GigabitEthernet1/0/2] port hybrid vlan 10 untagged
[SwitchA-GigabitEthernet1/0/2] quit
The configuration for GigabitEthernet 1/0/3 and GigabitEthernet 1/0/4 is similar. The detailed
configuration steps are omitted.
# Configure VLAN 10 as a multicast VLAN.
[SwitchA] multicast-vlan 10
3-11
Multicast vlan 10
subvlan list:
no subvlan
port list:
GE1/0/2 GE1/0/3 GE1/0/4
As shown above, IGMP Snooping is maintaining the router ports and member ports in VLAN 10.
3-12
When configuring MLD Snooping, go to these sections for information you are interested in:
z MLD Snooping Overview
z MLD Snooping Configuration Task List
z Displaying and Maintaining MLD Snooping
z MLD Snooping Configuration Examples
z Troubleshooting MLD Snooping
By analyzing received MLD messages, a Layer 2 device running MLD Snooping establishes mappings
between ports and multicast MAC addresses and forwards IPv6 multicast data based on these
mappings.
As shown in Figure 4-1, when MLD Snooping is not running, IPv6 multicast packets are broadcast to
all devices at Layer 2. When MLD Snooping runs, multicast packets for known IPv6 multicast groups
are multicast to the receivers at Layer 2.
Figure 4-1 Before and after MLD Snooping is enabled on the Layer 2 device
Source Source
Host B Host B
MLD Snooping forwards multicast data to only the receivers requiring it at Layer 2. It brings the
following advantages:
4-1
As shown in Figure 4-2, Router A connects to the multicast source, MLD Snooping runs on Switch A
and Switch B, Host A and Host C are receiver hosts (namely, IPv6 multicast group members).
Figure 4-2 MLD Snooping related ports
Receiver
Router A Switch A
GE1/0/1 GE1/0/2
GE1/0/3 Host A
Host B
GE1/0/1 Receiver
Source GE1/0/2
Switch B Host C
Router port
Member port
IPv6 multicast packets
Host D
Ports involved in MLD Snooping, as shown in Figure 4-2, are described as follows:
z Router port: A router port is a port on the Ethernet switch that leads switch towards the Layer-3
multicast device (DR or MLD querier). In the figure, GigabitEthernet 1/0/1 of Switch A and
GigabitEthernet 1/0/1 of Switch B are router ports. The switch registers all its local router ports in
its router port list.
z Member port: A member port (also known as IPv6 multicast group member port) is a port on the
Ethernet switch that leads towards multicast group members. In the figure, GigabitEthernet 1/0/2
and GigabitEthernet 1/0/3 of Switch A and GigabitEthernet 1/0/2 of Switch B are member ports.
The switch registers all the member ports on the local device in its MLD Snooping forwarding
table.
4-2
Table 4-1 Aging timers for dynamic ports in MLD Snooping and related messages and actions
Message before
Timer Description Action after expiry
expiry
For each dynamic router MLD general query of
The switch removes
Dynamic router port, the switch sets a timer which the source
this port from its router
port aging timer initialized to the dynamic address is not 0::0 or
port list.
router port aging time. IPv6 PIM hello.
When a port dynamically
joins an IPv6 multicast The switch removes
Dynamic
group, the switch sets a this port from the MLD
member port MLD report message.
timer for the port, which is Snooping forwarding
aging timer
initialized to the dynamic table.
member port aging time.
The port aging mechanism of MLD Snooping works only for dynamic ports; a static port will never age
out.
A switch running MLD Snooping performs different actions when it receives different MLD messages,
as follows:
The description about adding or deleting a port in this section is only for a dynamic port. Static ports
can be added or deleted only through the corresponding configurations. For details, see Configuring
Static Ports.
4-3
The MLD querier periodically sends MLD general queries to all hosts and routers (FF02::1) on the local
subnet to find out whether IPv6 multicast group members exist on the subnet.
Upon receiving an MLD general query, the switch forwards it through all ports in the VLAN except the
port on which it received the MLD query and performs the following:
z If the port on which it the switch received the MLD query is a dynamic router port in its router port
list, the switch resets the aging timer for this dynamic router port.
z If the port is not included in its router port list, the switch adds it into its router port list as a dynamic
router port and sets an aging timer for it.
Membership reports
A host sends an MLD report to the MLD querier in the following circumstances:
z Upon receiving an MLD query, an IPv6 multicast group member host responds with an MLD
report.
z When intended to join an IPv6 multicast group, a host sends an MLD report to the MLD querier to
announce that it is interested in the multicast information addressed to that IPv6 multicast group.
Upon receiving an MLD report, the switch forwards it through all the router ports in the VLAN, resolves
the address of the reported IPv6 multicast group, and performs the following to the receiving port:
z If no forwarding table entry exists for the reported IPv6 multicast group, the switch creates an
entry, adds the port as a dynamic member port to the outgoing port list, and starts a member port
aging timer for that port.
z If a forwarding table entry exists for the reported IPv6 multicast group, but the port is not included
in the outgoing port list for that group, the switch adds the port as a dynamic member port to the
outgoing port list, and starts a member port aging timer for that port.
z If a forwarding table entry exists for the reported IPv6 multicast group and the port is included in
the outgoing port list, which means that this port is already a dynamic member port, the switch
resets the member port aging timer for that port.
A switch does not forward an MLD report through a non-router port. The reason is as follows: Due to
the MLD report suppression mechanism applied on hosts, if the switch forwards a report message
through a member port, all the attached hosts listening to the reported IPv6 multicast address will
suppress their own reports upon receiving this report, and this will prevent the switch from knowing
whether the reported multicast group still has active members attached to that port.
Done messages
When a host leaves an IPv6 multicast group, the host sends an MLD done message to the multicast
router.
When the switch receives an MLD done message on a dynamic member port, the switch first checks
whether a forwarding table entry for the IPv6 multicast group address in the message exists, and, if
one exists, whether the outgoing port list contains the port.
4-4
Task Remarks
4-5
z Configurations made in MLD Snooping view are effective for all VLANs, while configurations made
in VLAN view are effective only for ports belonging to the current VLAN. For a given VLAN, a
configuration made in MLD Snooping view is effective only if the same configuration is not made in
VLAN view.
z Configurations made in MLD Snooping view are effective for all ports; configurations made in
Ethernet port view are effective only for the current port; configurations made in Layer 2 aggregate
port view are effect only for the current port; configurations made in port group view are effective
only for all the ports in the current port group. For a given port, a configuration made in MLD
Snooping view is effective only if the same configuration is not made in Ethernet port view, Layer 2
aggregate port view or port group view.
z For MLD Snooping, configurations made on a Layer 2 aggregate port do not interfere with
configurations made on its member ports, nor do they take part in aggregation calculations;
configurations made on a member port of the aggregate group will not take effect until it leaves the
aggregate group.
Before configuring the basic functions of MLD Snooping, complete the following tasks:
z Configure the corresponding VLANs
Before configuring the basic functions of MLD Snooping, prepare the following data:
z The version of MLD Snooping
4-6
By configuring the MLD Snooping version, you actually configure the version of MLD messages that
MLD Snooping can process.
z MLD Snooping version 1 can process MLDv1 messages, but cannot analyze and process MLDv2
messages, which will be flooded in the VLAN.
z MLD Snooping version 2 can process MLDv1 and MLDv2 messages.
Follow these steps to configure the version of MLD Snooping:
If you switch MLD Snooping from version 2 to version 1, the system will clear all MLD Snooping
forwarding entries from dynamic joining, and will:
z Keep forwarding entries from version 2 static (*, G) joining;
z Clear forwarding entries from version 2 static (S, G) joining, which will be restored when MLD
Snooping is switched back to version 2.
For details about static joining, refer to Configuring Static Ports.
Before configuring MLD Snooping port functions, complete the following tasks:
z Enable MLD Snooping in the VLAN
4-7
If the switch receives no MLD general queries or IPv6 PIM hello messages on a dynamic router port,
the switch removes the port from the router port list when the aging timer of the port expires.
If the switch receives no MLD reports for an IPv6 multicast group on a dynamic member port, the
switch removes the port from the outgoing port list of the forwarding table entry for that IPv6 multicast
group when the port aging timer expires.
If IPv6 multicast group memberships change frequently, you can set a relatively small value for the
dynamic member port aging timer.
Follow these steps to configure aging timers for dynamic ports globally:
Follow these steps to configure aging timers for dynamic ports in a VLAN:
If all the hosts attached to a port is interested in the IPv6 multicast data addressed to a particular IPv6
multicast group, you can configure that port as a static member port for that IPv6 multicast group.
You can configure a port of a switch to be a static router port, through which the switch can forward all
IPv6 multicast data it received.
4-8
interface interface-type
Enter Ethernet port/Layer 2 interface-number Required
aggregate port view or port
group view port-group manual Use either approach
port-group-name
mld-snooping static-group
ipv6-group-address Required
Configure the port(s) as static
[ source-ip No static member ports by
member port(s)
ipv6-source-address ] vlan default
vlan-id
z An IPv6 static (S, G) join takes effect only if a valid IPv6 multicast source address is specified and
MLD Snooping version 2 is currently running.
z A static member port does not respond to queries from the MLD querier; when static (*, G) or (S,
G) joining is enabled or disabled on a port, the port does not send an unsolicited MLD report or an
MLD done message.
z Static member ports and static router ports never age out. To remove such a port, you need to use
the corresponding undo command.
Generally, a host running MLD responds to MLD queries from the MLD querier. If a host fails to
respond due to some reasons, the multicast router will deem that no member of this IPv6 multicast
group exists on the network segment, and therefore will remove the corresponding forwarding path.
To avoid this situation from happening, you can enable simulated joining on a port of the switch,
namely configure the port as a simulated member host for an IPv6 multicast group. When an MLD
query is received, simulated host gives a response. Thus, the switch can continue receiving IPv6
multicast data.
A simulated host acts like a real host, as follows:
z When a port is configured as a simulated member host, the switch sends an unsolicited MLD
report through that port.
z After a port is configured as a simulated member host, the switch responds to MLD general
queries by sending MLD reports through that port.
z When the simulated joining function is disabled on a port, the switch sends an MLD done
message through that port.
4-9
z Each simulated host is equivalent to an independent host. For example, when receiving an MLD
query, the simulated host corresponding to each configuration responds respectively.
z Unlike a static member port, a port configured as a simulated member host will age out like a
dynamic member port.
The fast leave processing feature allows the switch to process MLD done messages in a fast way. With
the fast leave processing feature enabled, when receiving an MLD done message on a port, the switch
immediately removes that port from the outgoing port list of the forwarding table entry for the indicated
IPv6 multicast group. Then, when receiving MLD done multicast-address-specific queries for that IPv6
multicast group, the switch will not forward them to that port.
In VLANs where only one host is attached to each port, fast leave processing helps improve bandwidth
and resource usage.
4-10
Follow these steps to configure fast leave processing on a port or a group of ports:
If fast leave processing is enabled on a port to which more than one host is connected, when one host
leaves an IPv6 multicast group, the other hosts connected to port and interested in the same IPv6
multicast group will fail to receive IPv6 multicast data addressed to that group.
In an IPv6 multicast network running MLD, a multicast router or Layer 3 multicast switch is responsible
for sending periodic MLD general queries, so that all Layer 3 multicast devices can establish and
maintain multicast forwarding entries, thus to forward multicast traffic correctly at the network layer.
This router or Layer 3 switch is called MLD querier.
However, a Layer 2 multicast switch does not support MLD, and therefore cannot send MLD general
queries by default. By enabling MLD Snooping querier on a Layer 2 switch in a VLAN where multicast
traffic needs to be Layer-2 switched only and no Layer 3 multicast devices are present, the Layer 2
switch will act as the MLD querier to send periodic MLD queries, thus allowing multicast forwarding
entries to be established and maintained at the data link layer.
Follow these steps to enable the MLD Snooping querier:
4-11
It is meaningless to configure an MLD Snooping querier in an IPv6 multicast network running MLD.
Although an MLD Snooping querier does not take part in MLD querier elections, it may affect MLD
querier elections because it sends MLD general queries with a low source IPv6 address.
You can tune the MLD general query interval based on actual condition of the network.
Upon receiving an MLD query (general query or multicast-address-specific query), a host starts a timer
for each IPv6 multicast group it has joined. This timer is initialized to a random value in the range of 0
to the maximum response time (the host obtains the value of the maximum response time from the
Max Response Time field in the MLD query it received). When the timer value comes down to 0, the
host sends an MLD report to the corresponding IPv6 multicast group.
An appropriate setting of the maximum response time for MLD queries allows hosts to respond to
queries quickly and avoids bursts of MLD traffic on the network caused by reports simultaneously sent
by a large number of hosts when the corresponding timers expire simultaneously.
z For MLD general queries, you can configure the maximum response time to fill their Max
Response time field.
z For MLD multicast-address-specific queries, you can configure the MLD last-member query
interval to fill their Max Response time field. Namely, for MLD multicast-address-specific queries,
the maximum response time equals to the MLD last-member query interval.
4-12
Make sure that the MLD query interval is greater than the maximum response time for MLD general
queries; otherwise undesired deletion of IPv6 multicast members may occur.
This configuration allows you to change the source IPv6 address of MLD queries.
Follow these steps to configure source IPv6 addresses of MLD queries:
The source IPv6 address of MLD query messages may affect MLD querier election within the
segment.
4-13
On a MLD Snoopingenabled switch, the configuration of an IPv6 multicast group filter allows the
service provider to define limits of multicast programs available to different users.
In an actual application, when a user requests a multicast program, the users host initiates an MLD
report. Upon receiving this report message, the switch checks the report against the configured ACL
rule. If the port on which the report was received can join this IPv6 multicast group, the switch adds an
entry for this port in the MLD Snooping forwarding table; otherwise the switch drops this report
message. Any IPv6 multicast data that fails the ACL check will not be sent to this port. In this way, the
service provider can control the VOD programs provided for multicast users.
Required
Configure an IPv6 multicast group-policy acl6-number By default, no group filter is globally
group filter [ vlan vlan-list ] configured, that is, hosts in VLANs
can join any valid IPv6 multicast
group.
Follow these steps to configure an IPv6 multicast group filer on a port or a group of ports:
4-14
With the IPv6 multicast source port filtering feature enabled on a port, the port can be connected with
IPv6 multicast receivers only rather than with multicast sources, because the port will block all IPv6
multicast data packets while it permits multicast protocol packets to pass.
If this feature is disabled on a port, the port can be connected with both multicast sources and IPv6
multicast receivers.
Follow these steps to configure IPv6 multicast source port filtering on a port or a group of ports:
Some models of devices, when enabled to filter IPv6 multicast data based on the source ports, are
automatically enabled to filter IPv4 multicast data based on the source ports.
4-15
When a Layer 2 device receives an MLD report from an IPv6 multicast group member, the Layer 2
device forwards the message to the Layer 3 device directly connected with it. Thus, when multiple
members belonging to an IPv6 multicast group exist on the Layer 2 device, the Layer 3 device directly
connected with it will receive duplicate MLD reports from these members.
With the MLD report suppression function enabled, within a query interval, the Layer 2 device forwards
only the first MLD report of an IPv6 group to the Layer 3 device and will not forward the subsequent
MLD reports from the same multicast group to the Layer 3 device. This helps reduce the number of
packets being transmitted over the network.
Follow these steps to configure MLD report suppression:
By configuring the maximum number of IPv6 multicast groups that can be joined on a port or a group of
ports, you can limit the number of multicast programs available to VOD users, thus to control the traffic
on the port.
Follow these steps configure the maximum number of IPv6 multicast groups that can be joined on a
port or a group of ports:
interface interface-type
Enter Ethernet port/Layer 2 interface-number Required
aggregate port view or port
group view port-group manual Use either approach
port-group-name
Configure the maximum
number of IPv6 multicast mld-snooping group-limit Optional
groups that can be joined on a limit [ vlan vlan-list ] 1000 by default.
port
4-16
For some special reasons, the number of IPv6 multicast groups passing through a switch or port may
exceed the number configured for the switch or the port. In addition, in some specific applications, an
IPv6 multicast group newly joined on the switch needs to replace an existing IPv6 multicast group
automatically. A typical example is channel switching, namely, by joining the new multicast group, a
user automatically switches from the current IPv6 multicast group to the new one.
To address this situation, you can enable the IPv6 multicast group replacement function on the switch
or certain ports. When the number of IPv6 multicast groups a switch or a port has joined exceeds the
limit.
z If the IPv6 multicast group replacement is enabled, the newly joined IPv6 multicast group
automatically replaces an existing IPv6 multicast group with the lowest IPv6 address.
z If the IPv6 multicast group replacement is not enabled, new MLD reports will be automatically
discarded.
4-17
Follow these steps to configure IPv6 multicast group replacement on a port or a group of ports:
interface interface-type
Enter Ethernet port/Layer 2 interface-number Required
aggregate port view or port
group view port-group manual Use either approach
port-group-name
Be sure to configure the maximum number of IPv6 multicast groups allowed on a port (refer to
Configuring Maximum Multicast Groups that Can Be Joined on a Port) before enabling IPv6 multicast
group replacement. Otherwise, the IPv6 multicast group replacement functionality will not take effect.
4-18
Network requirements
z As shown in Figure 4-3, Router A connects to the IPv6 multicast source through GigabitEthernet
1/0/2 and to Switch A through GigabitEthernet 1/0/1. Router A is the MLD querier on the subnet.
z MLDv1 is required on Router A, MLD Snooping version 1 is required on Switch A, and Router A
will act as the MLD querier on the subnet.
z It is required that the receivers, Host A and Host B, attached to Switch A can receive IPv6
multicast traffic addressed to IPv6 multicast group FF1E::101 only.
z It is required that IPv6 multicast data for group FF1E::101 can be forwarded through
GigabitEthernet 1/0/3 and GigabitEthernet 1/0/4 of Switch A even if Host A and Host B
accidentally, temporarily stop receiving IPv6 multicast data.
Network diagram
Figure 4-3 Network diagram for IPv6 group policy simulated joining configuration
Receiver
Host A
Source
GE1/0/4
Receiver
GE1/0/2 GE1/0/1
1::2/64 2001::1/64 GE1/0/1 GE1/0/3
Host C
Configuration procedure
4-19
# Create VLAN 100, assign GigabitEthernet 1/0/1 through GigabitEthernet 1/0/4 to this VLAN, and
enable MLD Snooping in the VLAN.
[SwitchA] vlan 100
[SwitchA-vlan100] port gigabitethernet 1/0/1 to gigabitethernet 1/0/4
[SwitchA-vlan100] mld-snooping enable
[SwitchA-vlan100] quit
# Configure an IPv6 multicast group filter so that the hosts in VLAN 100 can join only the IPv6 multicast
group FF1E::101.
[SwitchA] acl ipv6 number 2001
[SwitchA-acl6-basic-2001] rule permit source ff1e::101 128
[SwitchA-acl6-basic-2001] quit
[SwitchA] mld-snooping
[SwitchAmld-snooping] group-policy 2001 vlan 100
[SwitchAmld-snooping] quit
# Configure GigabitEthernet 1/0/3 and GigabitEthernet 1/0/4 as simulated hosts for IPv6 multicast
group FF1E::101.
[SwitchA] interface gigabitethernet 1/0/3
[SwitchA-GigabitEthernet1/0/3] mld-snooping host-join ff1e::101 vlan 100
[SwitchA-GigabitEthernet1/0/3] quit
[SwitchA] interface gigabitethernet 1/0/4
[SwitchA-GigabitEthernet1/0/4] mld-snooping host-join ff1e::101 vlan 100
[SwitchA-GigabitEthernet1/0/4] quit
4) Verify the configuration
# View the detailed MLD Snooping multicast group information in VLAN 100 on Switch A.
[SwitchA] display mld-snooping group vlan 100 verbose
Total 1 IP Group(s).
Total 1 IP Source(s).
Total 1 MAC Group(s).
4-20
As shown above, GigabitEthernet 1/0/3 and GigabitEthernet 1/0/4 of Switch A have joined IPv6
multicast group FF1E::101.
Network requirements
z As shown in Figure 4-4, Router A connects to an IPv6 multicast source (Source) through
GigabitEthernet 1/0/2, and to Switch A through GigabitEthernet 1/0/1.
z MLDv1 is to run on Router A, and MLDv1 Snooping is to run on Switch A, Switch B and Switch C,
with Router A acting as the MLD querier.
z Host A and host C are permanent receivers of IPv6 multicast group FF1E::101. GigabitEthernet
1/0/3 and GigabitEthernet 1/0/5 on Switch C are required to be configured as static member ports
for multicast group 224.1.1.1 to enhance the reliability of multicast traffic transmission.
z Suppose STP runs on the network. To avoid data loops, the forwarding path from Switch A to
Switch C is blocked under normal conditions, and IPv6 multicast traffic flows to the receivers
attached to Switch C only along the path of Switch ASwitch BSwitch C.
z It is required to configure GigabitEthernet 1/0/3 that connects Switch A to Switch C as a static
router port, so that IPv6 multicast traffic can flow to the receivers nearly uninterruptedly along the
path of Switch ASwitch C in the case that the path of Switch ASwitch BSwitch C gets
blocked.
If no static router port is configured, when the path of Switch ASwitch BSwitch C gets blocked, at
least one MLD query-response cycle must be completed before the IPv6 multicast data can flow to the
receivers along the new path of Switch ASwitch C, namely IPv6 multicast delivery will be interrupted
during this process.
4-21
Source
Switch A
GE1/0/2 GE1/0/1
1::2/64 2001::1/64 GE1/0/1
/3
GE
1/0
1::1/64 Router A
1/0
GE
/2
MLD querier
/1
GE
1/0
1/0
Switch C
GE
/1
GE1/0/5 GE1/0/2 GE1/0/2
/4
GE
Host C
1/0 Switch B
1/0
GE
Receiver
/3
Host B Host A
Receiver
Configuration procedure
# Create VLAN 100, assign GigabitEthernet 1/0/1 through GigabitEthernet 1/0/3 to this VLAN, and
enable MLD Snooping in the VLAN.
[SwitchA] vlan 100
[SwitchA-vlan100] port gigabitethernet 1/0/1 to gigabitethernet 1/0/3
[SwitchA-vlan100] mld-snooping enable
4-22
# Create VLAN 100, assign GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 to this VLAN, and enable
MLD Snooping in the VLAN.
[SwitchB] vlan 100
[SwitchB-vlan100] port gigabitethernet 1/0/1 gigabitethernet 1/0/2
[SwitchB-vlan100] mld-snooping enable
[SwitchB-vlan100] quit
5) Configure Switch C
# Enable MLD Snooping globally.
<SwitchC> system-view
[SwitchC] mld-snooping
[SwitchC-mld-snooping] quit
# Create VLAN 100, assign GigabitEthernet 1/0/1 through GigabitEthernet 1/0/5 to this VLAN, and
enable MLD Snooping in the VLAN.
[SwitchC] vlan 100
[SwitchC-vlan100] port gigabitethernet 1/0/1 to gigabitethernet 1/0/5
[SwitchC-vlan100] mld-snooping enable
[SwitchC-vlan100] quit
# Configure GigabitEthernet 1/0/3 and GigabitEthernet 1/0/5 as static member ports for IPv6 multicast
group FF1E::101.
[SwitchC] interface GigabitEthernet 1/0/3
[SwitchC-GigabitEthernet1/0/3] mld-snooping static-group ff1e::101 vlan 100
[SwitchC-GigabitEthernet1/0/3] quit
[SwitchC] interface GigabitEthernet 1/0/5
[SwitchC-GigabitEthernet1/0/5] mld-snooping static-group ff1e::101 vlan 100
[SwitchC-GigabitEthernet1/0/5] quit
6) Verify the configuration
# View the detailed MLD Snooping multicast group information in VLAN 100 on Switch A.
[SwitchA] display mld-snooping group vlan 100 verbose
Total 1 IP Group(s).
Total 1 IP Source(s).
Total 1 MAC Group(s).
4-23
As shown above, GigabitEthernet 1/0/3 of Switch A has become a static router port.
# View the detailed MLD Snooping multicast group information in VLAN 100 on Switch C.
[SwitchC] display mld-snooping group vlan 100 verbose
Total 1 IP Group(s).
Total 1 IP Source(s).
Total 1 MAC Group(s).
As shown above, GigabitEthernet 1/0/3 and GigabitEthernet 1/0/5 on Switch C have become static
member ports for IPv6 multicast group FF1E::101.
4-24
Network requirements
z As shown in Figure 4-5, in a Layer-2-only network environment, two multicast sources Source 1
and Source 2 send IPv6 multicast data to multicast groups FF1E::101 and FF1E::102 respectively,
Host A and Host C are receivers of multicast group FF1E::101, while Host B and Host D are
receivers of multicast group FF1E::102.
z MLDv1 is enabled on all the receivers and MLDv1 Snooping is enabled on all the switches. Switch
A, which is close to the multicast sources, is chosen as the MLD Snooping querier.
Network diagram
Configuration procedure
1) Configure Switch A
# Enable IPv6 forwarding and enable MLD Snooping globally.
<SwitchA> system-view
[SwitchA] ipv6
[SwitchA] mld-snooping
[SwitchA-mld-snooping] quit
# Create VLAN 100 and assign GigabitEthernet 1/0/1 through GigabitEthernet 1/0/3 to VLAN 100.
[SwitchA] vlan 100
[SwitchA-vlan100] port gigabitethernet 1/0/1 to gigabitethernet 1/0/3
# Enable MLD Snooping and configure MLD Snooping querier feature in VLAN 100.
[SwitchA-vlan100] mld-snooping enable
[SwitchA-vlan100] mld-snooping querier
[SwitchA-vlan100] quit
2) Configure Switch B
# Enable IPv6 forwarding and enable MLD Snooping globally.
<SwitchB> system-view
4-25
# Create VLAN 100, add GigabitEthernet 1/0/1 through GigabitEthernet 1/0/4 into VLAN 100.
[SwitchB] vlan 100
[SwitchB-vlan100] port gigabitethernet 1/0/1 to gigabitethernet 1/0/4
Symptom
Analysis
Solution
1) Enter the display current-configuration command to view the running status of MLD Snooping.
2) If MLD Snooping is not enabled, use the mld-snooping command to enable MLD Snooping
globally, and then use mld-snooping enable command to enable MLD Snooping in VLAN view.
3) If MLD Snooping is disabled only for the corresponding VLAN, just use the mld-snooping enable
command in VLAN view to enable MLD Snooping in the corresponding VLAN.
4-26
Symptom
Although an IPv6 multicast group policy has been configured to allow hosts to join specific IPv6
multicast groups, the hosts can still receive IPv6 multicast data addressed to other groups.
Analysis
Solution
1) Use the display acl ipv6 command to check the configured IPv6 ACL rule. Make sure that the
IPv6 ACL rule conforms to the IPv6 multicast group policy to be implemented.
2) Use the display this command in MLD Snooping view or the corresponding port view to check
whether the correct IPv6 multicast group policy has been applied. If not, use the group-policy or
mld-snooping group-policy command to apply the correct IPv6 multicast group policy.
4-27
When configuring IPv6 multicast VLAN, go to these sections for information you are interested in:
z Introduction to IPv6 Multicast VLAN
z Multicast VLAN Configuration Task List
z Configuring IPv6 Sub-VLAN-Based IPv6 Multicast VLAN
z Configuring Port-Based IPv6 Multicast VLAN
z Displaying and Maintaining IPv6 Multicast VLAN
z IPv6 Multicast VLAN Configuration Examples
The IPv6 multicast VLAN feature configured on the Layer 2 device is the solution to this issue. With the
IPv6 multicast VLAN feature, the Layer 3 device needs to replicate the multicast traffic only in the IPv6
multicast VLAN instead of making a separate copy of the multicast traffic in each user VLAN. This
saves the network bandwidth and lessens the burden of the Layer 3 device.
The IPv6 multicast VLAN feature can be implemented in two approaches, as described below:
As shown in Figure 5-2, Host A, Host B and Host C are in three different user VLANs. On Switch A,
configure VLAN 10 as an IPv6 multicast VLAN, configure all the user VLANs as sub-VLANs of this
IPv6 multicast VLAN, and enable MLD snooping in the IPv6 multicast VLAN.
5-1
VLAN 3
Receiver
Host B
Source Router A Switch A
MLD querier
VLAN 4
Receiver
Host C
After the configuration, MLD snooping manages router ports in the IPv6 multicast VLAN and member
ports in the sub-VLANs. When forwarding multicast data to Switch A, Router A needs to send only one
copy of multicast traffic to Switch A in the IPv6 multicast VLAN, and Switch A distributes the traffic to
the IPv6 multicast VLANs sub-VLANs that contain receivers.
As shown in Figure 5-3, Host A, Host B and Host C are in three different user VLANs. All the user ports
are hybrid ports. On Switch A, configure VLAN 10 as an IPv6 multicast VLAN, assign all the user ports
to this IPv6 multicast VLAN, and enable MLD Snooping in the IPv6 multicast VLAN and all the user
VLANs.
Figure 5-3 Port-based IPv6 multicast VLAN
After the configuration, upon receiving an MLD message on a user port, Switch A tags the message
with the IPv6 multicast VLAN ID and relays it to the MLD querier, so that MLD Snooping can uniformly
manage the router ports and member ports in the IPv6 multicast VLAN. When forwarding multicast
data to Switch A, Router A needs to send only one copy of multicast traffic to Switch A in the IPv6
multicast VLAN, and Switch A distributes the traffic to all the member ports in the IPv6 multicast VLAN.
5-2
If you have configured both sub-VLAN-based IPv6 multicast VLAN and port-based IPv6 multicast
VLAN on a device, the port-based IPv6 multicast VLAN configuration is given preference.
Before configuring sub-VLAN-based IPv6 multicast VLAN, complete the following tasks:
z Create VLANs as required
z Enable MLD Snooping in the VLAN to be configured as an IPv6 multicast VLAN
In this approach, you configure a VLAN as an IPv6 multicast VLAN, and configure user VLANs as
sub-VLANs of the IPv6 multicast VLAN.
Follow these steps to configure sub-VLAN-based IPv6 multicast VLAN:
5-3
z A user port can be configured as a multicast VLAN port only if it is of the Ethernet or Layer 2
aggregate port type.
z Configurations made in Ethernet port view are effective only for the current port; configurations
made in Layer 2 aggregate port view are effective only for the current port; configurations made in
port group view are effective for all the ports in the current port group.
Configuration Prerequisites
Before configuring port-based IPv6 multicast VLAN, complete the following tasks:
z Create VLANs as required
z Enable MLD Snooping in the VLAN to be configured as an IPv6 multicast VLAN
z Enable MLD Snooping in all the user VLANs
Configure the user ports as hybrid ports to permit packets of the specified user VLAN to pass and
configure the user VLAN to which the user ports belong as the default VLAN.
Configure the user ports to permit packets of the IPv6 multicast VLAN to pass and untag the packets.
Thus, upon receiving multicast packets tagged with the IPv6 multicast VLAN ID from the upstream
device, the Layer 2 device untags the multicast packets and forwards them to its downstream device.
Follow these steps to configure user port attributes:
5-4
For details about the port link-type, port hybrid pvid vlan, and port hybrid vlan commands, refer to
VLAN Commands in the Access Volume.
In this approach, you need to configure a VLAN as an IPv6 multicast VLAN and then assign user ports
to this IPv6 multicast VLAN by either adding the user ports in the IPv6 multicast VLAN or specifying the
IPv6 multicast VLAN on the user ports. These two methods give the same result.
Follow these steps to configure IPv6 multicast VLAN ports in IPv6 multicast VLAN view:
Required
Assign port(s) to the IPv6
port interface-list By default, an IPv6 multicast
multicast VLAN
VLAN has no ports.
5-5
Follow these steps to configure IPv6 multicast VLAN ports in port view or port group view:
interface interface-type
Enter port view or port interface-number Required
group view Use either command.
port-group manual port-group-name
Required
Configure the port(s) as
port(s) of the IPv6 muticast port multicast-vlan ipv6 vlan-id By default, a user port
VLAN does not belong to any
IPv6 multicast VLAN.
Network requirements
z As shown in Figure 3-4, Router A connects to an IPv6 multicast source through GigabitEthernet
1/0/1 and to Switch A, through GigabitEthernet 1/0/2.
z MLDv1 is required on Router A, and MLD Snooping is required on Switch A. Router A is the MLD
querier.
z Switch As GigabitEthernet 1/0/1 belongs to VLAN 10, GigabitEthernet 1/0/2 through
GigabitEthernet 1/0/4 belong to VLAN 2 through VLAN 4 respectively, and Host A through Host C
are attached to GigabitEthernet 1/0/2 through GigabitEthernet 1/0/4 of Switch A.
z The IPv6 multicast source sends IPv6 multicast data to the IPv6 multicast group FF1E::101. Host
A, Host B, and Host C are receivers of the IPv6 multicast group.
5-6
1::1/64 GE1/0/2
2001::1/64
GE1/0/1
Switch A
GE1/0/2 GE1/0/4
GE1/0/3
Configuration procedure
5-7
# Configure VLAN 10 as an IPv6 multicast VLAN and configure VLAN 2 through VLAN 4 as its
sub-VLANs.
[SwitchA] multicast-vlan ipv6 10
[SwitchA-ipv6-mvlan-10] subvlan 2 to 4
[SwitchA-ipv6-mvlan-10] quit
4) Verify the configuration
# Display information about the IPv6 multicast VLAN.
[SwitchA] display multicast-vlan ipv6
Total 1 IPv6 multicast-vlan(s)
IPv6 Multicast vlan 10
subvlan list:
vlan 2-4
port list:
no port
5-8
As shown above, MLD Snooping is maintaining the router port in the IPv6 multicast VLAN (VLAN 10)
and the member ports in the sub-VLANs (VLAN 2 through VLAN 4).
Network requirements
z As shown in Figure 5-5, Router A connects to an IPv6 multicast source (Source) through
GigabitEthernet 1/0/1, and to Switch A through GigabitEthernet 1/0/2.
z MLDv1 is required on Router A. MLDv1 Snooping is required on Switch A. Router A acts as the
MLD querier.
5-9
1::1/64 GE1/0/2
2001::1/64
GE1/0/1
Switch A
GE1/0/2 GE1/0/4
GE1/0/3
Configuration procedure
5-10
The configuration for VLAN 3 and VLAN 4 is similar. The detailed configuration steps are omitted.
# Configure GigabitEthernet 1/0/2 as a hybrid port. Configure VLAN 2 as the default VLAN. Configue
GigabitEthernet 1/0/2 to permit packets of VLAN 2 to pass and untag the packets when forwarding
them.
[SwitchA] interface gigabitethernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] port link-type hybrid
[SwitchA-GigabitEthernet1/0/2] port hybrid pvid vlan 2
[SwitchA-GigabitEthernet1/0/2] port hybrid vlan 2 untagged
[SwitchA-GigabitEthernet1/0/2] port hybrid vlan 10 untagged
[SwitchA-GigabitEthernet1/0/2] quit
The configuration for GigabitEthernet 1/0/3 and GigabitEthernet 1/0/4 is similar. The detailed
configuration steps are omitted.
# Configure VLAN 10 as an IPv6 multicast VLAN.
[SwitchA] multicast-vlan ipv6 10
# Assign GigabitEthernet 1/0/2 and GigabitEthernet 1/0/3 to IPv6 multicast VLAN 10.
[SwitchA-ipv6-mvlan-10] port gigabitethernet 1/0/2 to gigabitethernet 1/0/3
[SwitchA-ipv6-mvlan-10] quit
5-11
As shown above, MLD Snooping is maintaining router ports and member ports in VLAN 10.
5-12
ii
12 Appendix 12-1
Appendix A Acronym12-1
Appendix B Default Priority Mapping Tables 12-2
Uncolored Priority Mapping Tables 12-2
Appendix C Introduction to Packet Precedences 12-3
IP Precedence and DSCP Values12-3
802.1p Priority 12-5
iii
Introduction to QoS
For network traffic, the Quality of Service (QoS) involves bandwidth, delay, and packet loss rate during
traffic forwarding process. In a network, you can improve the QoS by guaranteeing the bandwidth, and
reducing the delay, jitter, and packet loss rate.
The network resources are always scarce. QoS requirements exist on any occasion where traffic flows
contend for network resources. QoS is a relative concept for traffic flows, that is, guaranteeing QoS for
a certain traffic flow may damage QoS of other traffic flows. For example, in the case of fixed
bandwidth, if a traffic flow gets more bandwidth, the other traffic flows will get less bandwidth and may
be affected. Therefore, the network administrator should reasonably plan and allocate network
resources based on the characteristics of various traffic flows, thus utilizing the network resources
effectively.
The following part introduces the QoS service models, and some mature QoS techniques used most
widely. Using these techniques reasonably in the specific environments, you can improve the QoS
effectively.
Best effort is a single service model and also the simplest service model. In the best effort service
model, the network delivers the packets at its best effort but does not guarantee delay or reliability.
The best-effort service model is the default model in the Internet and is applicable to most network
applications. It is implemented through FIFO queuing.
IntServ is a multiple services model that can accommodate multiple QoS requirements. In this model,
an application must request a specific kind of service from the network before it can send data. The
request is made by RSVP signaling. RSVP runs on each device from the source end to the destination
end, and monitors each data flow to prevent each data flow from consuming more resources than the
1-1
DiffServ is a multiple services model that can satisfy diverse QoS requirements. Unlike IntServ,
DiffServ does not require an application to signal the network to reserve resources before sending data.
DiffServ is easy to implement and extend.
All QoS techniques mentioned in this document are based on the Diff-Serv model.
As shown in Figure 1-1, traffic classification, traffic shaping, traffic policing, congestion management,
and congestion avoidance mainly implement the following functions:
z Traffic classification uses certain match criteria to organize packets with different characteristics
into different classes. Traffic classification is the basis for providing differentiated services.
z Traffic policing polices particular flows entering or leaving a device according to configured
specifications and can be applied in both inbound and outbound directions of a port. When a flow
exceeds the specification, some restriction or punishment measures can be taken to prevent
overconsumption of network resources.
z Traffic shaping proactively adjusts the output rate of traffic to adapt traffic to the network resources
of the downstream device and avoid unnecessary packet drop and congestion. Traffic shaping is
usually applied to the outgoing traffic of a port.
1-2
1-3
In the non policy-based approach, you configure QoS service parameters without using a QoS policy.
For example, to rate limit an interface, you can use the line rate feature to directly configure a rate limit
on the interface rather than using a QoS policy.
Policy-Based Configuration
In the policy-based approach, QoS service parameters are configured through configuring QoS
policies. A QoS policy defines what QoS actions to take on what class of traffic for purposes such as
traffic shaping or traffic policing.
Before configuring a QoS policy, be familiar with these concepts: class, traffic behavior, and policy.
Class
Traffic behavior
A traffic behavior defines a set of QoS actions to take on packets, such as priority marking and traffic
redirecting.
Policy
A policy associates a class with a traffic behavior to define what actions to take on which class of
traffic.
You can configure multiple class-behavior associations in a policy.
Define a class
Define a behavior
Define a policy
Defining a Class
To define a class, you need to specify a name for it and then configure match criteria in class view.
Follow these steps to define a class:
Required
Create a class and enter class traffic classifier tcl-name
view [ operator { and | or } ] By default, the relationship
between match criteria is AND.
Configure match criteria if-match match-criteria Required
Table 2-1 The keyword and argument combinations for the match-criteria argument
Form Description
Specifies to match an IPv4 ACL specified by its
number or name. The access-list-number
acl { access-list-number | name acl-name } argument specifies an ACL by its number, which
ranges from 2000 to 4999; the name acl-name
keyword-argument combination specifies an
ACL by its name.
customer-dot1p 8021p-list
Even though you can provide up to eight
space-separated CoS values for this argument,
the Switch 4510G series switches support only
one CoS value in a rule. If you configure multiple
CoS values in a rule, the rule cannot be issued.
Specifies to match the packets of specified
VLANs of user networks. The vlan-id-list
argument specifies a list of VLAN IDs, in the
form of vlan-id to vlan-id or multiple
discontinuous VLAN IDs (separated by space).
You can specify up to eight VLAN IDs for this
customer-vlan-id vlan-id-list argument at a time. VLAN ID is in the range 1 to
4094.
In a class configured with the operator and, the
logical relationship between the customer VLAN
IDs specified for the customer-vlan-id keyword
is or.
Specifies to match the packets with a specified
destination-mac mac-address
destination MAC address.
Specifies to match packets by DSCP
precedence. The dscp-list argument is a list of
DSCP values in the range of 0 to 63.
service-dot1p 8021p-list
Even though you can provide up to eight
space-separated CoS values for this argument,
the Switch 4510G series switches support only
one CoS value in a rule. If you configure multiple
CoS values in a rule, the rule cannot be issued.
Specifies to match the packets of the VLANs of
the operators network. The vlan-id-list argument
is a list of VLAN IDs, in the form of vlan-id to
vlan-id or multiple discontinuous VLAN IDs
(separated by space). You can specify up to
service-vlan-id vlan-id-list eight VLAN IDs for this argument at a time.
VLAN ID is in the range of 1 to 4094.
In a class configured with the operator and, the
logical relationship between the service VLAN
IDs specified for the service-vlan-id keyword is
or.
Specifies to match the packets with a specified
source-mac mac-address
source MAC address.
Suppose the logical relationship between classification rules is and. Note the following when using the
if-match command to define matching rules.
z If multiple matching rules with the acl or acl ipv6 keyword specified are defined in a class, the
actual logical relationship between these rules is or when the policy is applied.
z If multiple matching rules with the customer-vlan-id or service-vlan-id keyword specified are
defined in a class, the actual logical relationship between these rules is or.
To define a traffic behavior, you must first create it and then configure QoS actions such as priority
marking and redirect in traffic behavior view.
Follow these steps to define a traffic behavior:
In a policy, you can define multiple class-behavior associations. A behavior is performed for the
associated class of packets. In this way, various QoS features can be implemented.
Follow these steps to associate a class with a behavior in a policy:
z If an ACL is referenced by a QoS policy for defining traffic match criteria, packets matching the
ACL are organized as a class and the behavior defined in the QoS policy applies to the class
regardless of whether the match mode of the if-match clause is deny or permit.
z In a QoS policy with multiple class-to-traffic-behavior associations, if the action of creating an
outer VLAN tag, the action of setting customer network VLAN ID, or the action of setting service
provider network VLAN ID is configured in a traffic behavior, we recommend you not to configure
any other action in this traffic behavior. Otherwise, the QoS policy may not function as expected
after it is applied.
A policy can be applied to multiple ports. Only one policy can be applied in inbound direction of a
port/port group.
Follow these steps to apply the QoS policy to an interface:
You can apply a QoS policy to multiple online users, but in one direction of each online user only one
policy can be applied. To modify a QoS policy already applied in a certain direction, remove the QoS
policy application first.
Follow these steps to apply the QoS policy to online users:
z If a user profile is active, the QoS policy, except ACLs referenced in the QoS policy, applied to it
cannot be configured or removed. If the user profile is being used by online users, the referenced
ACLs cannot be modified either.
z The QoS policies applied in user profile view support only the remark, car, and filter actions.
z Do not apply an empty policy in user profile view because a user profile with an empty policy
applied cannot be activated.
z Refer to User Profile Configuration in the QoS Volume for more information about user profiles.
You can apply a QoS policy to a VLAN to regulate traffic of the VLAN.
Follow these steps to apply the QoS policy to a VLAN:
You can apply a QoS policy globally to the inbound or outbound direction of all ports.
Follow these steps to apply the QoS policy globally:
A QoS policy containing any of the nest, remark customer-vlan-id, and remark service-vlan-id
Actions cannot be applied globally.
When configuring priority mapping, go to these sections for information you are interested in:
z Priority Mapping Overview
z Priority Mapping Configuration Tasks
z Configuring Priority Mapping
z Displaying and Maintaining Priority Mapping
z Priority Mapping Configuration Examples
The priorities of a packet determine its transmission priority. There are two types of priority: priorities
carried in packets and priorities locally assigned for scheduling only.
The packet-carried priorities include 802.1p priority, DSCP precedence, IP precedence, EXP, and so
on. These priorities have global significance and affect the forwarding priority of packets across the
network.
The locally assigned priorities have only local significance. They are assigned by the device for
scheduling only. These priorities include the local precedence and drop precedence, as follows.
z Local precedence is used for queuing. A local precedence value corresponds to an output queue.
A packet with higher local precedence is assigned to a higher priority output queue to be
preferentially scheduled.
z Drop precedence is used for making packet drop decisions. Packets with the highest drop
precedence are dropped preferentially.
When a packet enters the device from a port, the device assigns a set of QoS priority parameters to
the packet based on a certain priority and sometimes may modify its priority, according to certain rules
depending on device status. This process is called priority mapping. The priority based on which
priority mapping is performed depends on the priority trust mode configured on the port (see section
Priority Trust Mode on a Port. The set of QoS priority parameters decides the scheduling priority and
forwarding priority of the packet.
Priority mapping is implemented with priority mapping tables. The device provides various types of
priority mapping tables, or rather, priority mappings. By looking up a priority mapping table, the device
decides which priority value is to assign to a packet for subsequent packet processing.
z dot1p-dp: 802.1p-to-drop priority mapping table.
z dot1p-lp: 802.1p-to-local priority mapping table.
z dscp-dot1p: DSCP-to-802.1p priority mapping table, which is applicable to only IP packets.
z dscp-dp: DSCP-to-drop priority mapping table, which is applicable to only IP packets.
z dscp-dscp: DSCP-to-DSCP priority mapping table, which is applicable to only IP packets.
3-1
The priority trust mode on a port decides which priority is used for priority mapping table lookup. For
the priority mapping purpose, port priority was introduced so that you can use it for priority mapping in
addition to priority fields carried in packets. There are three priority trust modes on Switch 4510G
series :
z dot1p: Uses the 802.1p priority carried in packets for priority mapping.
z dscp: Uses the DSCP carried in packets for priority mapping.
z undo qos trust: Uses the port priority as the 802.1p priority for priority mapping. The port priority
is user configurable.
The priority mapping procedure varies with the priority modes, as described in the next section Priority
Mapping Procedure.
3-2
Receive a packet
on a port
Which priority is
802.1p
trusted on the Port priority
in packets
port?
The priority mapping procedure presented above applies in the absence of priority marking. If priority
marking is configured, the device performs priority marking before priority mapping, and then uses the
re-marked packet-carried priority for priority mapping or directly uses the re-marked scheduling priority
for traffic scheduling depending on your configuration. In this case, neither priority trust mode
configuration on the port nor port priority configuration takes effect.
3-3
Follow these steps to configure the trusted packet priority type on an interface/port group:
3-4
You can change the port priority of a port used for priority mapping. For the priority mapping procedure,
see Figure 3-1.
Follow these steps to configure the port priority of a port for priority mapping:
Required
Configure the port priority qos priority priority-value
The default port priority is 0.
3-5
As shown in Figure 3-2, the enterprise network of a company interconnects all departments through
Device. The network is described as follows:
z The marketing department connects to GigabitEthernet 1/0/1 of Device, which sets the 802.1p
priority of traffic from the marketing department to 3.
z The R&D department connects to GigabitEthernet 1/0/2 of Device, which sets the 802.1p priority
of traffic from the R&D department to 4.
z The management department connects to GigabitEthernet 1/0/3 of Device, which sets the 802.1p
priority of traffic from the management department to 5.
Configure port priority, 802.1p-to-local priority mapping table, and priority marking to implement the
plan as described in Table 3-1.
Queuing plan
Traffic
Traffic Priority order Output Queue
destination Traffic source
queue priority
R&D department 6 High
R&D department > Management
4 Medium
Public servers management department > department
marketing department
Marketing
2 Low
department
R&D department 2 Low
management department > Management
Internet 6 High
marketing department > R&D department
through HTTP
department
Marketing
4 Medium
department
3-6
Internet
Host Host
Server Server
GE1/0/5
GE1/0/4 GE1/0/1
Device Host
Server
Configuration procedure
3-7
# Configure a priority marking policy for the management department and apply the policy to the
incoming traffic of GigabitEthernet 1/0/3.
[Device] traffic behavior admin
[Device-behavior-admin] remark dot1p 4
[Device-behavior-admin] quit
[Device] qos policy admin
[Device-qospolicy-admin] classifier http behavior admin
[Device-qospolicy-admin] quit
[Device] interface gigabitethernet 1/0/3
[Device-GigabitEthernet1/0/3] qos apply policy admin inbound
# Configure a priority marking policy for the marketing department and apply the policy to the incoming
traffic of GigabitEthernet 1/0/1.
[Device] traffic behavior market
[Device-behavior-market] remark dot1p 5
[Device-behavior-market] quit
[Device] qos policy market
[Device-qospolicy-market] classifier http behavior market
[Device-qospolicy-market] quit
[Device] interface gigabitethernet 1/0/1
[Device-GigabitEthernet1/0/1] qos apply policy market inbound
# Configure a priority marking policy for the R&D department and apply the policy to the incoming
traffic of GigabitEthernet 1/0/2.
[Device] traffic behavior rd
[Device-behavior-rd] remark dot1p 3
[Device-behavior-rd] quit
[Device] qos policy rd
[Device-qospolicy-rd] classifier http behavior rd
[Device-qospolicy-rd] quit
[Device] interface gigabitethernet 1/0/2
[Device-GigabitEthernet1/0/2] qos apply policy rd inbound
3-8
When configuring traffic policing, traffic shaping and line rate, go to these sections for information you
are interested in:
z Traffic Policing, Traffic Shaping, and Line Rate Overview
z Configuring Traffic Policing
z Configuring GTS
z Configuring the Line Rate
z Displaying and Maintaining Traffic Policing, GTS, and Line Rate
A token bucket is analogous to a container holding a certain number of tokens. The system puts tokens
into the bucket at a set rate. When the token bucket is full, the extra tokens overflows.
The evaluation of traffic specifications is based on whether the number of tokens in the bucket can
meet the need of packet forwarding. Generally, one token is associated with a 1-bit forwarding
authority. If the number of tokens in the bucket is enough for forwarding the packets, the traffic
conforms to the specification and is called conforming traffic; otherwise, the traffic does not conform to
the specification and is called excess traffic.
A token bucket has the following configurable parameters:
z Mean rate: At which tokens are put into the bucket, namely, the permitted average rate of traffic. It
is usually set to the committed information rate (CIR).
z Burst size: the capacity of the token bucket, namely, the maximum traffic size that is permitted in
each burst. It is usually set to the committed burst size (CBS). The set burst size must be greater
than the maximum packet size.
4-1
Complicated evaluation
You can set two token buckets (referred to as the C bucket and E bucket respectively) in order to
evaluate more complicated conditions and implement more flexible regulation policies. For example,
traffic policing uses four parameters:
z CIR: Rate at which tokens are put into the C bucket, that is, the average packet transmission or
forwarding rate allowed by the C bucket.
z CBS: Size of the C bucket, that is, transient burst of traffic that the C bucket can forward.
z Peak information rate (PIR): Rate at which tokens are put into the E bucket, that is, the average
packet transmission or forwarding rate allowed by the E bucket.
z Excess burst size (EBS): Size of the E bucket, that is, transient burst of traffic that the E bucket
can forward.
CBS and EBS are carried by two different token buckets. In each evaluation, packets are measured
against the buckets:
z If the C bucket has enough tokens, packets are colored green.
z If the C bucket does not have enough tokens but the E bucket has enough tokens, packets are
colored yellow.
z If neither the C bucket nor the E bucket has sufficient tokens, packets are colored red.
Traffic Policing
The typical application of traffic policing is to supervise the specification of certain traffic entering a
network and limit it within a reasonable range, or to "discipline" the extra traffic. In this way, the network
resources and the interests of the carrier are protected. For example, you can limit bandwidth
consumption of HTTP packets to less than 50% of the total. If the traffic of a certain session exceeds
the limit, traffic policing can drop the packets or reset the IP precedence of the packets.
Figure 4-1 Schematic diagram for traffic policing
Packets sent
Packet
classification
Token
bucket
Queue
Packets dropped
4-2
Traffic Shaping
Traffic shaping provides measures to adjust the rate of outbound traffic actively. A typical traffic
shaping application is to limit the local traffic output rate according to the downstream traffic policing
parameters.
The difference between traffic policing and GTS is that packets to be dropped in traffic policing are
cached in a buffer or queue in GTS, as shown in Figure 4-2. When there are enough tokens in the
token bucket, these cached packets are sent at an even rate. Traffic shaping may result in an
additional delay while traffic policing does not.
Figure 4-2 Schematic diagram for GTS
For example, in Figure 4-3, Switch A sends packets to Switch B. Switch B performs traffic policing on
packets from Switch A and drops packets exceeding the limit.
4-3
You can perform traffic shaping for the packets on the outgoing interface of Switch A to avoid
unnecessary packet loss. Packets exceeding the limit are cached in Switch A. Once resources are
released, traffic shaping takes out the cached packets and sends them out. In this way, all the traffic
sent to Switch B conforms to the traffic specification defined in Switch B.
Line Rate
The line rate of a physical interface specifies the maximum rate for forwarding packets (including
critical packets).
Line rate also uses token buckets for traffic control. With line rate configured on an interface, all
packets to be sent through the interface are firstly handled by the token bucket at line rate. If there are
enough tokens in the token bucket, packets can be forwarded; otherwise, packets are put into QoS
queues for congestion management. In this way, the traffic passing the physical interface is controlled.
Figure 4-4 Line rate implementation
In the token bucket approach to traffic control, bursty traffic can be transmitted so long as enough
tokens are available in the token bucket; if tokens are inadequate, packets cannot be transmitted until
4-4
Configuration Example
Configure traffic policing on GigabitEthernet 1/0/1 to limit the rate of received HTTP traffic to 512 kbps
and drop the exceeding traffic.
# Enter system view.
<Sysname> system-view
4-5
# Create a class named http, and reference ACL 3000 in the class to match HTTP traffic.
[Sysname] traffic classifier http
[Sysname-classifier-http] if-match acl 3000
[Sysname-classifier-http] quit
# Configure a traffic policing QoS policy, and apply the QoS policy to the incoming packets of
GigabitEthernet 1/0/1.
[Sysname] traffic behavior http
[Sysname-behavior-http] car cir 512
[Sysname-behavior-http] quit
[Sysname] qos policy http
[Sysname-qospolicy-http] classifier http behavior http
[Sysname-qospolicy-http] quit
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] qos apply policy http inbound
Configuring GTS
Configuration Procedure
On the Switch 4510G series, traffic shaping is implemented as queue-based GTS, that is, configuring
GTS parameters for packets of a certain queue.
Follow these steps to configure queue-based GTS:
Configuration Example
Configure GTS on GigabitEthernet1/0/1, shaping the packets of queue 1 when the sending rate
exceeds 512 kbps.
# Enter system view.
<Sysname> system-view
4-6
Configuration Example
On the Switch 4510G series, you can configure traffic policing in policy-based approach. For related
displaying and maintaining commands, refer to Displaying and Maintaining QoS Policies.
4-7
When configuring hardware congestion management, go to these sections for information you are
interested in:
z Congestion Management Overview
z Congestion Management Configuration Approaches
z Configuring Congestion Management
z Displaying and Maintaining Congestion Management
Network congestion is a major factor contributed to service quality degrading on a traditional network.
Congestion is a situation where the forwarding rate decreases due to insufficient resources, resulting
in extra delay.
Congestion easily occurs in complex packet switching circumstances in the Internet. The following
figure shows two common cases:
Figure 5-1 Traffic congestion causes
100M
100M>10M
50M
100M+10M+50M>100M
1 2
In general, congestion management uses queuing technology. The system uses a certain queuing
algorithm for traffic classification, and then uses a certain precedence algorithm to send the traffic.
5-1
SP queuing
SP queuing is specially designed for mission-critical applications, which require preferential service to
reduce the response delay when congestion occurs.
Figure 5-2 Schematic diagram for SP queuing
As shown in Figure 5-2, SP queuing classifies eight queues on a port into eight classes, numbered 7 to
0 in descending priority order.
SP queuing schedules the eight queues strictly according to the descending order of priority. It sends
packets in the queue with the highest priority first. When the queue with the highest priority is empty, it
sends packets in the queue with the second highest priority, and so on. Thus, you can assign
mission-critical packets to the high priority queue to ensure that they are always served first and
common service packets to the low priority queues and transmitted when the high priority queues are
empty.
The disadvantage of SP queuing is that packets in the lower priority queues cannot be transmitted if
there are packets in the higher priority queues. This may cause lower priority traffic to starve to death.
WRR queuing
WRR queuing schedules all the queues in turn to ensure that every queue can be served for a certain
time, as shown in Figure 5-3.
5-2
Assume there are eight output queues on a port. WRR assigns each queue a weight value
(represented by w7, w6, w5, w4, w3, w2, w1, or w0) to decide the proportion of resources assigned to
the queue. On a 100 Mbps port, you can configure the weight values of WRR queuing to 5, 3, 1, 1, 5, 3,
1, and 10 (corresponding to w7, w6, w5, w4, w3, w2, w1, and w0 respectively). In this way, the queue
with the lowest priority is assured of 5 Mbps of bandwidth at least, thus avoiding the disadvantage of
SP queuing that packets in low-priority queues may fail to be served for a long time.
Another advantage of WRR queuing is that while the queues are scheduled in turn, the service time for
each queue is not fixed, that is, if a queue is empty, the next queue will be scheduled immediately. This
improves bandwidth resource use efficiency.
WFQ queuing
Interface
Queue N-1 Band width N-1
Sending queue
Packet Queue
classification scheduling
Queue N Band width N
WFQ is derived from fair queuing (FQ), which is designed for fairly sharing network resources,
reducing the delay and jitter of all traffic. FQ fully consider the interests of all queues to ensure that:
z Different queues have fair dispatching opportunities, preventing a single queue from being
delayed for too long.
5-3
SP+WRR queuing
By assigning some queues on the port to the SP scheduling group and the others to the WRR
scheduling group (that is, group 1), you implement SP + WRR queue scheduling on the port. Packets
in the SP scheduling group are scheduled preferentially. When the SP scheduling group is empty,
packets in the WRR scheduling group are scheduled. Queues in the SP scheduling group are
scheduled with the SP queue scheduling algorithm. Queues in the WRR scheduling group are
scheduled with WRR.
Task Remarks
Configuring SP Queuing Optional
5-4
Configuration procedure
Required
By default, all the ports adopt the
Configure SP queuing qos sp WRR queue scheduling algorithm,
with the weight values assigned to
queue 0 through queue 7 being 1, 2,
3, 4, 5, 9, 13, and 15.
Configuration example
1) Network requirements
Configure GigabitEthernet 1/0/1 to use SP queuing.
2) Configuration procedure
# Enter system view
<Sysname> system-view
Configuration procedure
5-5
Configuration example
1) Network requirements
z Enable WRR queuing on the interface GigabitEthernet 1/0/1.
z Assign queues 0 through 7 to the WRR group, with their weights being 1, 2, 4, 6, 8, 10, 12, and 14.
2) Configuration procedure
# Enter system view.
<Sysname> system-view
Configuration procedure
5-6
Configuration example
1) Network requirements
z Enable WFQ on GigabitEthernet 1/0/1, and set the weights of queues 0 through 7 to 1, 2, 4, 6, 8,
10, 12, and 14 respectively.
z Set the minimum guaranteed bandwidth of queue 0 to 128 kbps.
2) Configuration procedure
# Enter system view.
<Sysname> system-view
Configuration Procedure
5-7
Configuration Example
Network requirements
Configuration procedure
5-8
5-9
When configuring traffic filtering, go to these sections for information you are interested in:
z Traffic Filtering Overview
z Configuring Traffic Filtering
z Traffic Filtering Configuration Example
6-1
With filter deny configured for a traffic behavior, the other actions (except class-based accounting) in
the traffic behavior do not take effect.
Network requirements
Configuration procedure
# Create advanced ACL 3000, and configure a rule to match packets whose source port number is 21.
<DeviceA> system-view
[DeviceA] acl number 3000
[DeviceA-acl-basic-3000] rule 0 permit tcp source-port eq 21
[DeviceA-acl-basic-3000] quit
# Create a class named classifier_1, and reference ACL 3000 in the class.
[DeviceA] traffic classifier classifier_1
[DeviceA-classifier-classifier_1] if-match acl 3000
[DeviceA-classifier-classifier_1] quit
# Create a behavior named behavior_1, and configure the traffic filtering action for the behavior.
[DeviceA] traffic behavior behavior_1
[DeviceA-behavior-behavior_1] filter deny
[DeviceA-behavior-behavior_1] quit
# Create a policy named policy, and associate class classifier_1 with behavior behavior_1 in the
policy.
[DeviceA] qos policy policy
[DeviceA-qospolicy-policy] classifier classifier_1 behavior behavior_1
6-2
# Apply the policy named policy to the incoming traffic of GigabitEthernet 1/0/1.
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] qos apply policy policy inbound
6-3
When configuring priority marking, go to these sections for information you are interested in:
z Priority Marking Overview
z Configuring Priority Marking
z Priority Marking Configuration Example
Priority marking can be used together with priority mapping. For details, refer to Priority Mapping Table
and Priority Marking Configuration Example.
Priority marking sets the priority fields or flag bits of packets to modify the priority of traffic. For example,
you can use priority marking to set IP precedence or DSCP for a class of IP traffic to change its
transmission priority in the network.
To configure priority marking, you can associate a class with a behavior configured with the priority
marking action to set the priority fields or flag bits of the class of packets.
7-1
Network requirements
As shown in Figure 7-1, the enterprise network of a company interconnects hosts with servers through
Device. The network is described as follows:
z Host A and Host B are connected to GigabitEthernet 1/0/1 of Device.
z The data server, mail server, and file server are connected to GigabitEthernet 1/0/2 of Device.
Configure priority marking on Device to satisfy the following requirements:
7-2
Internet
File server
192.168.0.3/24
Configuration procedure
# Create advanced ACL 3000, and configure a rule to match packets with destination IP address
192.168.0.1.
<Device> system-view
[Device] acl number 3000
[Device-acl-adv-3000] rule permit ip destination 192.168.0.1 0
[Device-acl-adv-3000] quit
# Create advanced ACL 3001, and configure a rule to match packets with destination IP address
192.168.0.2.
[Device] acl number 3001
[Device-acl-adv-3001] rule permit ip destination 192.168.0.2 0
[Device-acl-adv-3001] quit
# Create advanced ACL 3002, and configure a rule to match packets with destination IP address
192.168.0.3.
[Device] acl number 3002
[Device-acl-adv-3002] rule permit ip destination 192.168.0.3 0
[Device-acl-adv-3002] quit
# Create a class named classifier_dbserver, and reference ACL 3000 in the class.
[Device] traffic classifier classifier_dbserver
[Device-classifier-classifier_dbserver] if-match acl 3000
[Device-classifier-classifier_dbserver] quit
# Create a class named classifier_mserver, and reference ACL 3001 in the class.
[Device] traffic classifier classifier_mserver
[Device-classifier-classifier_mserver] if-match acl 3001
[Device-classifier-classifier_mserver] quit
# Create a class named classifier_fserver, and reference ACL 3002 in the class.
[Device] traffic classifier classifier_fserver
[Device-classifier-classifier_fserver] if-match acl 3002
[Device-classifier-classifier_fserver] quit
# Create a behavior named behavior_dbserver, and configure the action of setting the local
precedence value to 4 for the behavior.
7-3
# Create a behavior named behavior_mserver, and configure the action of setting the local
precedence value to 3 for the behavior.
[Device] traffic behavior behavior_mserver
[Device-behavior-behavior_mserver] remark local-precedence 3
[Device-behavior-behavior_mserver] quit
# Create a behavior named behavior_fserver, and configure the action of setting the local
precedence value to 2 for the behavior.
[Device] traffic behavior behavior_fserver
[Device-behavior-behavior_fserver] remark local-precedence 2
[Device-behavior-behavior_fserver] quit
# Create a policy named policy_server, and associate classes with behaviors in the policy.
[Device] qos policy policy_server
[Device-qospolicy-policy_server] classifier classifier_dbserver behavior behavior_dbserver
[Device-qospolicy-policy_server] classifier classifier_mserver behavior behavior_mserver
[Device-qospolicy-policy_server] classifier classifier_fserver behavior behavior_fserver
[Device-qospolicy-policy_server] quit
# Apply the policy named policy_server to the incoming traffic of GigabitEthernet 1/0/1.
[Device] interface gigabitethernet 1/0/1
[Device-GigabitEthernet1/0/1] qos apply policy policy_server inbound
[Device-GigabitEthernet1/0/1] quit
7-4
When configuring traffic redirecting, go to these sections for information you are interested in:
z Traffic Redirecting Overview
z Configuring Traffic Redirecting
Traffic redirecting is the action of redirecting the packets matching the specific match criteria to a
certain location for processing.
Currently, the following two traffic redirecting actions are supported:
z Redirecting traffic to the CPU: redirects packets which require processing by CPU to the CPU.
z Redirecting traffic to an interface: redirects packets which require processing by an interface to the
interface. Note that this action is applicable to only Layer 2 packets, and the target interface
should be a Layer 2 interface.
8-1
z Generally, the action of redirecting traffic to the CPU and the action of redirecting traffic to an
interface are mutually exclusive with each other in the same traffic behavior.
z You can use the display traffic behavior command to view the traffic redirecting configuration.
z A QoS policy that contains a traffic redirecting action can be applied only to the incoming traffic.
8-2
When configuring traffic mirroring, go to these sections for information you are interested in:
z Traffic Mirroring Overview
z Configuring Traffic Mirroring
z Displaying and Maintaining Traffic Mirroring
z Traffic Mirroring Configuration Examples
In a traffic behavior, the action of mirroring traffic to an interface and the action of mirroring traffic to a
CPU is mutually exclusive.
9-1
9-2
Network requirements
On the network as shown in Figure 9-1, Host A (with the IP address 192.168.0.1) and Host B are
connected to GigabitEthernet1/0/1 of the switch; a data monitoring device is connected to
GigabitEthernet1/0/2 of the switch.
Monitor and analyze packets sent by Host A on the data monitoring device.
Figure 9-1 Network diagram for configuring traffic mirroring to a port
Configuration Procedure
Configure Switch:
# Enter system view.
<Sysname> system-view
# Configure basic IPv4 ACL 2000 to match packets with the source IP address 192.168.0.1.
[Sysname] acl number 2000
[Sysname-acl-basic-2000] rule permit source 192.168.0.1 0
[Sysname-acl-basic-2000] quit
# Create class 1 and configure the class to use ACL 2000 for traffic classification.
[Sysname] traffic classifier 1
[Sysname-classifier-1] if-match acl 2000
[Sysname-classifier-1] quit
# Create behavior 1 and configure the action of mirroring traffic to GigabitEthernet1/0/2 in the traffic
behavior.
9-3
# Create QoS policy 1 and associate traffic behavior 1 with class 1 in the QoS policy.
[Sysname] qos policy 1
[Sysname-policy-1] classifier 1 behavior 1
[Sysname-policy-1] quit
After the configurations, you can monitor all packets sent from Host A on the data monitoring device.
9-4
When configuring class-based accounting, go to these sections for information you are interested in:
z Class-Based Accounting Overview
z Configuring Class-Based Accounting
z Displaying and Maintaining Traffic Accounting
z Class-Based Accounting Configuration Example
10-1
Network requirements
Configuration procedure
# Create basic ACL 2000, and configure a rule to match packets with source IP address 1.1.1.1.
<DeviceA> system-view
[DeviceA] acl number 2000
[DeviceA-acl-basic-2000] rule permit source 1.1.1.1 0
[DeviceA-acl-basic-2000] quit
# Create a class named classifier_1, and reference ACL 2000 in the class.
[DeviceA] traffic classifier classifier_1
[DeviceA-classifier-classifier_1] if-match acl 2000
[DeviceA-classifier-classifier_1] quit
# Create a policy named policy, and associate class classifier_1 with behavior behavior_1 in the
policy.
[DeviceA] qos policy policy
[DeviceA-qospolicy-policy] classifier classifier_1 behavior behavior_1
[DeviceA-qospolicy-policy] quit
# Apply the policy named policy to the incoming traffic of GigabitEthernet 1/0/1.
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] qos apply policy policy inbound
10-2
Interface: GigabitEthernet1/0/1
Direction: Inbound
Policy: policy
Classifier: classifier_1
Operator: AND
Rule(s) : If-match acl 2000
Behavior: behavior_1
Accounting Enable:
28529 (Packets)
10-3
When configuring user profile, go to these sections for information you are interested in:
z User Profile Overview
z User Profile Configuration
z Displaying and Maintaining User Profile
Task Remarks
Creating a User Profile Required
Applying a QoS Policy to User Profile Required
Enabling a User Profile Required
11-1
Configuration Prerequisites
Before creating a user profile, you need to configure authentication parameters. User profile supports
802.1X authentications. You need to perform the related configurations (for example, username,
password, authentication scheme, domain and binding between a user profile and user) on the client,
the device and authentication server.
Required
If the specified user profile
already exists, you will directly
enter the corresponding user
Create a user profile, and enter the user-profile profile view.
corresponding user profile view profile-name dot1x The configuration made in user
profile view takes effect when
the user profile is enabled and
the corresponding users are
online.
Refer to 802.1x Configuration in the Security Volume for detailed information about 802.1x
authentication.
After a user profile is created, you need to configure detailed items in user profile view to implement
restrictions on the online users. Currently supported configurations are as follows:
Follow these steps to apply a QoS policy to traffic of online users:
11-2
z Only an enabled user profile can be used by a user. You cannot modify or remove the
configuration items in a user profile until the user profile is disabled.
z Disabling a user profile logs out the users using the user profile.
11-3
Appendix A Acronym
Table 12-1 Appendix A Acronym
CQ Custom Queuing
12-1
PQ Priority Queuing
QoS Quality of Service
RED Random Early Detection
TE Traffic Engineering
TP Traffic Policing
TS Traffic Shaping
For the default dscp-dscp priority mapping table, an input value yields a target value that is equal to it.
Table 12-2 The default dot1p-lp, dot1p-dp, dot1p-dscp, and dot1p-rpr priority mapping tables
12-2
5 5 0
6 6 0
7 7 0
Table 12-3 The default dscp-lp, dscp-dp, dscp-dot1p, and dscp-exp priority mapping tables
16 to 23 0 2
24 to 31 0 3
32 to 39 0 4
40 to 47 0 5
48 to 55 0 6
56 to 63 0 7
As shown in Figure 12-1, the ToS field of the IP header contains eight bits, and the first three bits (0 to
2) represent IP precedence from 0 to 7. According to RFC 2474, the ToS field of the IP header is
redefined as the differentiated services (DS) field, where a DSCP value is represented by the first six
bits (0 to 5) and is in the range 0 to 63. The remaining two bits (6 and 7) are reserved.
12-3
4 100 flash-override
5 101 critical
6 110 internet
7 111 network
12 001100 af12
14 001110 af13
18 010010 af21
20 010100 af22
22 010110 af23
26 011010 af31
28 011100 af32
30 011110 af33
34 100010 af41
36 100100 af42
38 100110 af43
8 001000 cs1
16 010000 cs2
24 011000 cs3
32 100000 cs4
40 101000 cs5
48 110000 cs6
56 111000 cs7
0 000000 be (default)
12-4
802.1p priority lies in Layer 2 packet headers and is applicable to occasions where Layer 3 header
analysis is not needed and QoS must be assured at Layer 2.
Figure 12-2 An Ethernet frame with an 802.1Q tag header
As shown in Figure 12-2, the 4-byte 802.1Q tag header consists of the tag protocol identifier (TPID,
two bytes in length), whose value is 0x8100, and the tag control information (TCI, two bytes in length).
Figure 12-3 presents the format of the 802.1Q tag header. The Priority field in the 802.1Q tag header is
called the 802.1p priority, because its use is defined in IEEE 802.1p. Table 12-6 presents the values for
802.1p priority.
Figure 12-3 802.1Q tag header
CFI
1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 Priority VLAN ID
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
12-5
2 802.1X Configuration2-1
802.1X Overview2-1
Architecture of 802.1X 2-1
Authentication Modes of 802.1X 2-2
Basic Concepts of 802.1X 2-2
EAP over LANs2-3
EAP over RADIUS2-5
802.1X Authentication Triggering 2-5
Authentication Process of 802.1X 2-6
802.1X Timers 2-9
Extensions to 802.1X2-10
Features Working Together with 802.1X2-10
Configuring 802.1X 2-12
Configuration Prerequisites 2-12
Configuring 802.1X Globally2-12
Configuring 802.1X for a Port2-14
Configuring an 802.1X Port-based Guest VLAN 2-15
Displaying and Maintaining 802.1X2-16
802.1X Configuration Example 2-16
Guest VLAN and VLAN Assignment Configuration Example 2-18
ACL Assignment Configuration Example2-21
ii
iii
8 SSH2.0 Configuration8-1
SSH2.0 Overview8-1
Introduction to SSH2.0 8-1
Operation of SSH 8-1
Configuring the Device as an SSH Server8-4
SSH Server Configuration Task List8-4
Generating a DSA or RSA Key Pair 8-4
Enabling SSH Server8-5
Configuring the User Interfaces for SSH Clients8-5
Configuring a Client Public Key8-6
Configuring an SSH User 8-7
Setting the SSH Management Parameters 8-8
Configuring the Device as an SSH Client 8-9
SSH Client Configuration Task List 8-9
Specifying a Source IP address/Interface for the SSH client 8-9
Configuring Whether First-time Authentication is Supported 8-10
Establishing a Connection Between the SSH Client and the Server 8-11
Displaying and Maintaining SSH8-11
SSH Server Configuration Examples8-12
When Switch Acts as Server for Password Authentication 8-12
When Switch Acts as Server for Publickey Authentication 8-14
SSH Client Configuration Examples 8-19
When Switch Acts as Client for Password Authentication 8-19
When Switch Acts as Client for Publickey Authentication8-22
iv
vi
vii
When configuring AAA, go to these sections for information you are interested in:
z Introduction to AAA
z Introduction to RADIUS
z Introduction to HWTACACS
z Protocols and Standards
z AAA Configuration Task List
z Configuring AAA
z Configuring RADIUS
z Configuring HWTACACS
z AAA Configuration Examples
z Troubleshooting AAA
Introduction to AAA
Authentication, Authorization, and Accounting (AAA) provides a uniform framework for configuring
these three security functions to implement network security management.
AAA usually uses a client/server model, where the client runs on the network access server (NAS) and
the server maintains user information centrally. In an AAA network, a NAS is a server for users but a
client for the AAA servers, as shown in Figure 1-1.
Figure 1-1 AAA networking diagram
When a user tries to establish a connection to the NAS and to obtain the rights to access other
networks or some network resources, the NAS authenticates the user or the corresponding connection.
The NAS can transparently pass the users AAA information to the server (RADIUS server or
HWTACACS server). The RADIUS/HWTACACS protocol defines how a NAS and a server exchange
user information between them.
In the AAA network shown in Figure 1-1, there is a RADIUS server and a HWTACACS server. You can
determine the authentication, authorization and accounting methods according to the actual
1-1
Introduction to RADIUS
Remote Authentication Dial-In User Service (RADIUS) is a distributed information interaction protocol
in a client/server model. RADIUS can protect networks against unauthorized access and is often used
in network environments where both high security and remote user access are required. Based on
UDP, RADIUS uses UDP port 1812 for authentication and 1813 for accounting. RADIUS defines the
RADIUS packet format and message transfer mechanism.
RADIUS was originally designed for dial-in user access. With the diversification of access methods,
RADIUS has been extended to support more access methods, for example, Ethernet access and
ADSL access. It uses authentication and authorization in providing access services and uses
accounting to collect and record usage information of network resources.
Client/Server Model
z Client: The RADIUS client runs on the NASs located throughout the network. It passes user
information to designated RADIUS servers and acts on the responses (for example, rejects or
accepts user access requests).
z Server: The RADIUS server runs on the computer or workstation at the network center and
maintains information related to user authentication and network service access. It listens to
connection requests, authenticates users, and returns the processing results (for example,
rejecting or accepting the user access request) to the clients.
In general, the RADIUS server maintains three databases, namely, Users, Clients, and Dictionary, as
shown in Figure 1-2:
1-2
z Users: Stores user information such as the usernames, passwords, applied protocols, and IP
addresses.
z Clients: Stores information about RADIUS clients, such as the shared keys and IP addresses.
z Dictionary: Stores information about the meanings of RADIUS protocol attributes and their values.
Information exchanged between a RADIUS client and the RADIUS server is authenticated with a
shared key, which is never transmitted over the network. This enhances the information exchange
security. In addition, to prevent user passwords from being intercepted in non-secure networks,
RADIUS encrypts passwords before transmitting them.
A RADIUS server supports multiple user authentication methods, for example, the Password
Authentication Protocol (PAP) and Challenge Handshake Authentication Protocol (CHAP). Moreover, a
RADIUS server can act as the client of another AAA server to provide authentication proxy services.
Figure 1-3 illustrates the interaction of the host, the RADIUS client, and the RADIUS server.
Figure 1-3 Basic message exchange process of RADIUS
3) Access-Accept/Reject
4) Accounting-Request (start)
5) Accounting-Response
7) Accounting-Request (stop)
8) Accounting-Response
1-3
RADIUS uses UDP to transmit messages. It ensures the smooth message exchange between the
RADIUS server and the client through a series of mechanisms, including the timer management
mechanism, retransmission mechanism, and slave server mechanism. Figure 1-4 shows the RADIUS
packet format.
Figure 1-4 RADIUS packet format
1-4
From the client to the server. A packet of this type carries user
information for the server to start/stop accounting for the user. It
4 Accounting-Request contains the Acct-Status-Type attribute, which indicates
whether the server is requested to start the accounting or to
end the accounting.
From the server to the client. The server sends to the client a
packet of this type to notify that it has received the
5 Accounting-Response
Accounting-Request and has correctly started recording the
accounting information.
3) The Identifier field (1-byte long) is for matching request packets and response packets and
detecting retransmitted request packets. The request and response packets of the same type
have the same identifier.
4) The Length field (2-byte long) indicates the length of the entire packet, including the Code,
Identifier, Length, Authenticator, and Attribute fields. The value of the field is in the range 20 to
4096. Bytes beyond the length are considered the padding and are neglected upon reception. If
the length of a received packet is less than that indicated by the Length field, the packet is
dropped.
5) The Authenticator field (16-byte long) is used to authenticate replies from the RADIUS server, and
is also used in the password hiding algorithm. There are two kinds of authenticators: request
authenticator and response authenticator.
6) The Attribute field, with a variable length, carries the specific authentication, authorization, and
accounting information for defining configuration details of the request or response. This field is
represented in triplets of Type, Length, and Value.
z Type: One byte, in the range 1 to 255. It indicates the type of the attribute. Commonly used
attributes for RADIUS authentication, authorization and accounting are listed in Table 1-2.
z Length: One byte for indicating the length of the attribute in bytes, including the Type, Length, and
Value fields.
z Value: Value of the attribute, up to 253 bytes. Its format and content depend on the Type and
Length fields.
4 NAS-IP-Address 48 Acct-Output-Packets
5 NAS-Port 49 Acct-Terminate-Cause
6 Service-Type 50 Acct-Multi-Session-Id
7 Framed-Protocol 51 Acct-Link-Count
1-5
15 Login-Service 62 Port-Limit
16 Login-TCP-Port 63 Login-LAT-Port
17 (unassigned) 64 Tunnel-Type
18 Reply_Message 65 Tunnel-Medium-Type
19 Callback-Number 66 Tunnel-Client-Endpoint
20 Callback-ID 67 Tunnel-Server-Endpoint
21 (unassigned) 68 Acct-Tunnel-Connection
22 Framed-Route 69 Tunnel-Password
23 Framed-IPX-Network 70 ARAP-Password
24 State 71 ARAP-Features
25 Class 72 ARAP-Zone-Access
26 Vendor-Specific 73 ARAP-Security
27 Session-Timeout 74 ARAP-Security-Data
28 Idle-Timeout 75 Password-Retry
29 Termination-Action 76 Prompt
30 Called-Station-Id 77 Connect-Info
31 Calling-Station-Id 78 Configuration-Token
32 NAS-Identifier 79 EAP-Message
33 Proxy-State 80 Message-Authenticator
34 Login-LAT-Service 81 Tunnel-Private-Group-id
35 Login-LAT-Node 82 Tunnel-Assignment-id
36 Login-LAT-Group 83 Tunnel-Preference
37 Framed-AppleTalk-Link 84 ARAP-Challenge-Response
38 Framed-AppleTalk-Network 85 Acct-Interim-Interval
39 Framed-AppleTalk-Zone 86 Acct-Tunnel-Packets-Lost
40 Acct-Status-Type 87 NAS-Port-Id
41 Acct-Delay-Time 88 Framed-Pool
42 Acct-Input-Octets 89 (unassigned)
43 Acct-Output-Octets 90 Tunnel-Client-Auth-id
1-6
The attribute types listed in Table 1-2 are defined by RFC 2865, RFC 2866, RFC 2867, and RFC 2568.
The RADIUS protocol features excellent extensibility. Attribute 26 (Vender-Specific) defined by RFC
2865 allows a vender to define extended attributes to implement functions that the standard RADIUS
protocol does not provide.
A vendor can encapsulate multiple type-length-value (TLV) sub-attributes in RADIUS packets for
extension in applications. As shown in Figure 1-5, a sub-attribute that can be encapsulated in Attribute
26 consists of the following four parts:
z Vendor-ID (four bytes): Indicates the ID of the vendor. Its most significant byte is 0 and the other
three bytes contain a code complying with RFC 1700.
z Vendor-Type: Indicates the type of the sub-attribute.
z Vendor-Length: Indicates the length of the sub-attribute.
z Vendor-Data: Indicates the contents of the sub-attribute.
Figure 1-5 Segment of a RADIUS packet containing an extended attribute
Introduction to HWTACACS
HW Terminal Access Controller Access Control System (HWTACACS) is an enhanced security
protocol based on TACACS (RFC 1492). Similar to RADIUS, it uses a client/server model for
information exchange between NAS and HWTACACS server.
HWTACACS is mainly used to provide AAA services for terminal users. In a typical HWTACACS
application, a terminal user needs to log into the device for operations, and HWTACACS authenticates,
authorizes and keeps accounting for the user. Working as the HWTACACS client, the device sends the
username and password to the HWTACACS sever for authentication. After passing authentication and
being authorized, the user can log into the device to perform operations.
1-7
HWTACACS and RADIUS have many common features, like implementing AAA, using a client/server
model, using shared keys for user information security and having good flexibility and extensibility.
Meanwhile, they also have differences, as listed in Table 1-3.
HWTACACS RADIUS
Uses TCP, providing more reliable network
Uses UDP, providing higher transport efficiency.
transmission.
Encrypts the entire packet except for the Encrypts only the user password field in an
HWTACACS header. authentication packet.
Protocol packets are complicated and
authorization is independent of authentication. Protocol packets are simple and authorization is
Authentication and authorization can be combined with authentication.
deployed on different HWTACACS servers.
Supports authorized use of configuration
Does not support authorized use of
commands. For example, an authenticated login
configuration commands.
user can be authorized to configure the device.
The following takes a Telnet user as an example to describe how HWTACACS performs user
authentication, authorization, and accounting. Figure 1-6 illustrates the basic message exchange
process of HWTACACS.
1-8
2) Start-authentication packet
1-9
For login users, it is necessary to configure the authentication mode for logging into the user interface
as scheme. For detailed information, refer to Login Configuration of the System Volume.
1-10
Task Remarks
Creating an ISP Domain Required
Task Remarks
Creating a RADIUS Scheme Required
Specifying the RADIUS Authentication/Authorization Servers Required
Specifying the RADIUS Accounting Servers and Relevant Parameters Optional
1-11
Task Remarks
Creating a HWTACACS scheme Required
Configuring AAA
By configuring AAA, you can provide network access service for legal users, protect the networking
devices, and avoid unauthorized access and repudiation. In addition, you can configure ISP domains
to perform AAA on accessing users.
The AAA feature allows you to manage users based on their access types:
z LAN users: Users on a LAN who access through, for example, 802.1X authentication or MAC
address authentication.
z Login users: Users who log in using, for example, SSH, Telnet, FTP, or HyperTerminal.
You can configure separate authentication/authorization/accounting policies for all the other types of
users.
For a user who has logged in to the device, AAA can provide the command authorization service to
enhance device security: Allows the authorization server to check each command executed by the
login user and only authorized commands can be successfully executed.
Configuration Prerequisites
For remote authentication, authorization, or accounting, you must create the RADIUS or HWTACACS
scheme first. For RADIUS scheme configuration, refer to Configuring RADIUS. For HWTACACS
scheme configuration, refer to Configuring HWTACACS.
An Internet service provider (ISP) domain represents a group of users belonging to it. For a username
in the userid@isp-name format, the access device considers the userid part the username for
authentication and the isp-name part the domain name.
In a networking scenario with multiple ISPs, an access device may connect users of different ISPs. As
users of different ISPs may have different user attributes (such as username and password structure,
service type, and rights), you need to configure ISP domains to distinguish the users. In addition, you
need to configure different attribute sets including AAA methods for the ISP domains.
1-12
z You cannot delete the default ISP domain unless you change it to a non-default ISP domain (with
the domain default disable command) first.
z If a user enters a username without an ISP domain name, the device uses the authentication
method configured for the default ISP domain to authenticate the user.
1-13
In AAA, authentication, authorization, and accounting are separate processes. Authentication refers to
the interactive authentication process of username/password/user information during access or
service request. The authentication process neither sends authorization information to a supplicant nor
triggers any accounting.
AAA supports the following authentication methods:
z No authentication: All users are trusted and no authentication is performed. Generally, this
method is not recommended.
z Local authentication: Authentication is performed by the NAS, which is configured with the user
information, including the usernames, passwords, and attributes. Local authentication features
high speed and low cost, but the amount of information that can be stored is limited by the
hardware.
z Remote authentication: The access device cooperates with a RADIUS or HWTACACS server to
authenticate users. As for RADIUS, the device can use the standard RADIUS protocol or
extended RADIUS protocol in collaboration with systems like iMC to implement user
authentication. Remote authentication features centralized information management, high
capacity, high reliability, and support for centralized authentication for multiple devices. You can
configure local authentication as the backup method in case the remote server is not available.
You can configure AAA authentication to work alone without authorization and accounting. By default,
an ISP domain uses the local authentication method.
Before configuring authentication methods, complete these three tasks:
z For RADIUS or HWTACACS authentication, configure the RADIUS or HWTACACS scheme to be
referenced first. The local and none authentication methods do not require any scheme.
z Determine the access mode or service type to be configured. With AAA, you can configure an
authentication method specifically for each access mode and service type, limiting the
authentication protocols that can be used for access.
z Determine whether to configure an authentication method for all access modes or service types.
Follow these steps to configure AAA authentication methods for an ISP domain:
1-14
z The authentication method specified with the authentication default command is for all types of
users and has a priority lower than that for a specific access mode.
z With an authentication method that references a RADIUS scheme, AAA accepts only the
authentication result from the RADIUS server. The Access-Accept message from the RADIUS
server does include the authorization information, but the authentication process ignores the
information.
z With the radius-scheme radius-scheme-name local or hwtacacs-scheme
hwtacacs-scheme-name local keyword and argument combination configured, local
authentication is the backup method and is used only when the remote server is not available.
z If the primary authentication method is local or none, the system performs local authentication or
does not perform any authentication, and will not use any RADIUS or HWTACACS authentication
scheme.
In AAA, authorization is a separate process at the same level as authentication and accounting. Its
responsibility is to send authorization requests to the specified authorization server and to send
authorization information to users. Authorization method configuration is optional in AAA configuration.
AAA supports the following authorization methods:
z No authorization: Every user is trusted and has the corresponding default rights of the system.
z Local authorization: Users are authorized by the access device according to the attributes
configured for them.
z Remote authorization: The access device cooperates with a RADIUS or HWTACACS server to
authorize users. RADIUS authorization is bound with RADIUS authentication. RADIUS
authorization can work only after RADIUS authentication is successful, and the authorization
information is carried in the Access-Accept message. HWTACACS authorization is separate from
HWTACACS authentication, and the authorization information is carried in the authorization
1-15
authorization default
{ hwtacacs-scheme
Specify the default Optional
hwtacacs-scheme-name
authorization method for all
[ local ] | local | none | local by default
types of users
radius-scheme
radius-scheme-name [ local ] }
authorization command Optional
Specify the command { hwtacacs-scheme
authorization method hwtacacs-scheme-name The default authorization
[ local | none ] | local | none } method is used by default.
1-16
In AAA, accounting is a separate process at the same level as authentication and authorization. Its
responsibility is to send accounting start/update/end requests to the specified accounting server.
Accounting is not required, and therefore accounting method configuration is optional.
AAA supports the following accounting methods:
z No accounting: The system does not perform accounting for the users.
z Local accounting: Local accounting is implemented on the access device. It is for collecting
statistics on the number of users and controlling the number of local user connections; it does not
provide statistics for user charge.
z Remote accounting: The access device cooperates with a RADIUS server or HWTACACS server
for accounting of users. You can configure local accounting as the backup method in case the
remote server is not available.
By default, an ISP domain uses the local accounting method.
Before configuring accounting methods, complete these three tasks:
1) For RADIUS or HWTACACS accounting, configure the RADIUS or HWTACACS scheme to be
referenced first. The local and none authentication methods do not require any scheme.
2) Determine the access mode or service type to be configured. With AAA, you can configure an
accounting method specifically for each access mode and service type, limiting the accounting
protocols that can be used for access.
3) Determine whether to configure an accounting method for all access modes or service types.
Follow these steps to configure AAA accounting methods for an ISP domain:
1-17
z With the accounting optional command configured, a user to be disconnected can still use the
network resources even when there is no available accounting server or communication with the
current accounting server fails.
z The local accounting is not used for accounting implementation, but together with the attribute
access-limit command for limiting the number of local user connections. However, with the
accounting optional command configured, the limit on the number of local user connections is
not effective.
z The accounting method specified with the accounting default command is for all types of users
and has a priority lower than that for a specific access mode.
z With the radius-scheme radius-scheme-name local or hwtacacs-scheme
hwtacacs-scheme-name local keyword and argument combination configured, local accounting is
the backup method and is used only when the remote server is not available.
z If the primary accounting method is local or none, the system performs local accounting or does
not perform any accounting, and will not use the RADIUS or HWTACACS accounting scheme.
z In login access mode, accounting is not supported for FTP services.
1-18
For local authentication, you need to create local users and configure user attributes on the device as
needed.
A local user represents a set of user attributes configured on a device, and such a user set is uniquely
identified by the username. For a user requesting network service to pass local authentication, you
must add an entry as required in the local user database of the device.
Each local user belongs to a local user group and bears all attributes of the group, such as the
password control attributes and authorization attributes. For details about local user group, refer to
Configuring User Group Attributes.
When configuring local users and local user groups, pay attention to the effective ranges and priority
relationship of user group attributes and user attributes:
z Authorization attributes
You can configure an authorization attribute in user group view or local user view, making the attribute
effective on all local users of the group or only the local user. An authorization attribute configured in
local user view takes precedence over the same attribute configured in user group view.
Follow these steps to configure the attributes for a local user:
1-19
Note that:
z With the local-user password-display-mode cipher-force command configured, a local user
password is always displayed in cipher text, regardless of the configuration of the password
command. In this case, if you use the save command to save the configuration, all existing local
user passwords will still be displayed in cipher text after the device restarts, even if you restore the
display mode to auto.
z The access-limit command configured for a local user takes effect only when local accounting is
used.
z Local authentication checks the service types of a local user. If the service types are not available,
the user cannot pass authentication.
z In the authentication method that requires the username and password, including local
authentication, RADIUS authentication and HWTACACS authentication, the commands that a
login user can use after logging in depend on the level of the user. In other authentication methods,
which commands are available depends on the level of the user interface. For an SSH user using
public key authentication, the commands that can be used depend on the level configured on the
user interface. For details regarding authentication method and commands accessible to user
interface, refer to Login Configuration in the System Volume.
z Binding attributes are checked upon authentication of a local user. If the checking fails, the user
fails the authentication. Therefore, be cautious when deciding which binding attributes should be
configured for a local user.
z Every configurable authorization attribute has its definite application environments and purposes.
Therefore, when configuring authorization attributes for a local user, consider what attributes are
needed.
For simplification of local user configuration and manageability of local users, the concept of user
group is introduced. A user group consists of a group of local users and has a set of local user
attributes. You can configure local user attributes for a user group to implement centralized
1-20
1-21
Configuring RADIUS
The RADIUS protocol is configured on a per scheme basis. After creating a RADIUS scheme, you
need to configure the IP addresses and UDP ports of the RADIUS servers for the scheme. The servers
include authentication/authorization servers and accounting servers, or primary servers and secondary
servers. In other words, the attributes of a RADIUS scheme mainly include IP addresses of primary
and secondary servers, shared key, and RADIUS server type.
Actually, the RADIUS protocol configurations only set the parameters necessary for the information
interaction between a NAS and a RADIUS server. For these settings to take effect, you must reference
the RADIUS scheme containing those settings in ISP domain view. For information about the
commands for referencing a scheme, refer to Configuring AAA.
When there are users online, you cannot modify RADIUS parameters other than the retransmission
ones and the timers.
Before performing other RADIUS configurations, follow these steps to create a RADIUS scheme and
enter RADIUS scheme view:
A RADIUS scheme can be referenced by more than one ISP domain at the same time.
1-22
Follow these steps to specify the RADIUS accounting servers and perform related configurations:
1-23
z It is recommended to specify only the primary RADIUS accounting server if backup is not
required.
z If both the primary and secondary accounting servers are specified, the secondary one is used
when the primary one is not reachable.
z In practice, you can specify two RADIUS servers as the primary and secondary accounting
servers respectively, or specify one server to function as the primary accounting server in a
scheme and the secondary accounting server in another scheme. Besides, because RADIUS
uses different UDP ports to receive authentication/authorization and accounting packets, the port
for authentication/authorization must be different from that for accounting.
z You can set the maximum number of stop-accounting request transmission buffer, allowing the
device to buffer and resend a stop-accounting request until it receives a response or the number
of transmission retries reaches the configured limit. In the latter case, the device discards the
packet.
z You can set the maximum number of accounting request transmission attempts on the device,
allowing the device to disconnect a user when the number of accounting request transmission
attempts for the user reaches the limit but it still receives no response to the accounting request.
z The IP addresses of the primary and secondary accounting servers cannot be the same.
Otherwise, the configuration fails.
z Currently, RADIUS does not support keeping accounts on FTP users.
The RADIUS client and RADIUS server use the MD5 algorithm to encrypt packets exchanged between
them and a shared key to verify the packets. Only when the same key is used can they properly
receive the packets and make responses.
Follow these steps to set the shared key for RADIUS packets:
1-24
Because RADIUS uses UDP packets to carry data, the communication process is not reliable. If a NAS
receives no response from the RADIUS server before the response timeout timer expires, it is required
to retransmit the RADIUS request. If the number of transmission attempts exceeds the specified limit
but it still receives no response, it considers that the authentication has failed.
Follow these steps to set the upper limit of RADIUS request retransmission attempts:
z The maximum number of retransmission attempts of RADIUS packets multiplied by the RADIUS
server response timeout period cannot be greater than 75.
z Refer to the timer response-timeout command in the command manual for configuring RADIUS
server response timeout period.
1-25
When a primary server fails, the device automatically tries to communicate with the secondary server.
When both the primary and secondary servers are available, the device sends request packets to the
primary server.
Once the primary server fails, the primary server turns into the state of block, and the device turns to
the secondary server. In this case:
z If the secondary server is available, the device triggers the primary server quiet timer. After the
quiet timer times out, the status of the primary server is active again and the status of the
secondary server remains the same.
z If the secondary server fails, the device restores the status of the primary server to active
immediately.
If the primary server has resumed, the device turns to use the primary server and stops communicating
with the secondary server. After accounting starts, the communication between the client and the
secondary server remains unchanged.
Follow these steps to set the status of RADIUS servers:
1-26
Follow these steps to configure the attributes related to data to be sent to the RADIUS server:
1-27
When communicating with the RADIUS server, a device can enable the following three timers:
z RADIUS server response timeout (response-timeout): If a NAS receives no response from the
RADIUS server in a period of time after sending a RADIUS request (authentication/authorization
or accounting request), it has to resend the request so that the user has more opportunity to
obtain the RADIUS service. The NAS uses the RADIUS server response timeout timer to control
the transmission interval.
z Primary server quiet timer (timer quiet): If the primary server is not reachable, its state changes to
blocked, and the device will turn to the specified secondary server. If the secondary server is
reachable, the device starts this timer and communicates with the secondary server. After this
timer expires, the device turns the state of the primary server to active and tries to communicate
with the primary server while keeping the state of the secondary server unchanged. If the primary
server has come back into operation, the device interacts with the primary server and terminates
its communication with the secondary server.
z Real-time accounting interval (realtime-accounting): This timer defines the interval for
performing real-time accounting of users. After this timer is set, the switch will send accounting
information of online users to the RADIUS server at the specified interval.
Follow these steps to set timers regarding RADIUS servers:
1-28
z The maximum number of retransmission attempts of RADIUS packets multiplied by the RADIUS
server response timeout period cannot be greater than 75. This product is also the upper limit of
the timeout time of different access modules.
z For an access module, the maximum number of retransmission attempts multiplied by the
RADIUS server response timeout period must be smaller than the timeout time. Otherwise,
stop-accounting messages cannot be buffered, and the primary/secondary server switchover
cannot take place. For example, as the timeout time of voice access is 10 seconds, the product of
the two parameters cannot exceed 10 seconds; as the timeout time of Telnet access is 30
seconds, the product of the two parameters cannot exceed 30 seconds. For detailed information
about timeout time of a specific access module, refer to the corresponding part in the Access
Volume.
z To configure the maximum number of retransmission attempts of RADIUS packets, refer to the
command retry in the command manual.
The core of the EAD solution is integration and cooperation, and the security policy server system is
the management and control center. As a collection of software, the security policy server system can
run on Windows and Linux to provide functions such as user management, security policy
management, security status assessment, security cooperation control, and security event audit.
This task allows you to configure the IP address of a security policy server. If the security policy server
and the RADIUS server reside on the same host, you can omit this task. When the device receives a
control packet from the security policy server, it checks whether the source IP address of the packet is
the IP address of the security policy server or RADIUS server. If not, the device considers the packet
invalid.
Follow these steps to specify a security policy server:
1-29
Follow these steps to enable the listening port of the RADIUS client:
Configuring HWTACACS
Different from RADIUS, except for deleting HWTACACS schemes and changing the IP addresses of
the HWTACACS servers, you can make any changes to HWTACACS parameters, whether there are
users online or not.
1-30
The HWTACACS protocol is configured on a per scheme basis. Before performing other HWTACACS
configurations, follow these steps to create a HWTACACS scheme and enter HWTACACS scheme
view:
z It is recommended to specify only the primary HWTACACS authentication server if backup is not
required.
z If both the primary and secondary authentication servers are specified, the secondary one is used
when the primary one is not reachable.
z The IP addresses of the primary and secondary authentication servers cannot be the same.
Otherwise, the configuration fails.
z You can remove an authentication server only when no active TCP connection for sending
authentication packets is using it.
1-31
z It is recommended to specify only the primary HWTACACS authorization server if backup is not
required.
z If both the primary and secondary authorization servers are specified, the secondary one is used
when the primary one is not reachable.
z The IP addresses of the primary and secondary authorization servers cannot be the same.
Otherwise, the configuration fails.
z You can remove an authorization server only when no active TCP connection for sending
authorization packets is using it.
Follow these steps to specify the HWTACACS accounting servers and perform related configurations:
1-32
When using a HWTACACS server as an AAA server, you can set a key to secure the communications
between the device and the HWTACACS server.
The HWTACACS client and HWTACACS server use the MD5 algorithm to encrypt packets exchanged
between them and a shared key to verify the packets. Only when the same key is used can they
properly receive the packets and make responses.
Follow these steps to set the shared key for HWTACACS packets:
Follow these steps to configure the attributes related to the data sent to the HWTACACS server:
user-name-format Optional
Specify the format of the
{ keep-original | By default, the ISP domain
username to be sent to a
with-domain | name is included in the
HWTACACS server
without-domain } username.
1-33
z If a HWTACACS server does not support a username with the domain name, you can configure
the device to remove the domain name before sending the username to the server.
z The nas-ip command in HWTACACS scheme view is only for the current HWTACACS scheme,
while the hwtacacs nas-ip command in system view is for all HWTACACS schemes. However,
the nas-ip command in HWTACACS scheme view overwrites the configuration of the hwtacacs
nas-ip command.
1-34
Network requirements
As shown in Figure 1-7, configure the switch to use the HWTACACS server to provide authentication,
authorization, and accounting services to login users.
z The HWTACACS server is used for authentication, authentication, and accounting. Its IP address
is 10.1.1.1.
z On the switch, set the shared keys for authentication, authorization, and accounting packets to
expert. Configure the switch to remove the domain name from a user name before sending the
user name to the HWTACACS server.
z On the HWTACACS server, set the shared keys for packets exchanged with the switch to expert.
1-35
Authentication/Accounting server
10.1.1.1/24
Internet
Telnet user Switch
Configuration procedure
# You can achieve the same result by setting default AAA methods for all types of users.
[Switch] domain bbb
[Switch-isp-bbb] authentication default hwtacacs-scheme hwtac
[Switch-isp-bbb] authorization default hwtacacs-scheme hwtac
[Switch-isp-bbb] accounting default hwtacacs-scheme hwtac
When telneting into the switch, a user enters username userid@bbb for authentication using domain
bbb.
1-36
Network requirements
As shown in Figure 1-8, configure the switch to provide local authentication, HWTACACS authorization,
and RADIUS accounting services to Telnet users. The user name and the password for Telnet users
are both hello.
z The HWTACACS server is used for authorization. Its IP address is 10.1.1.2. On the switch, set the
shared keys for packets exchanged with the HWTACACS server to expert. Configure the switch
to remove the domain name from a user name before sending the user name to the HWTACACS
server.
z The RADIUS server is used for accounting. Its IP address is 10.1.1.1. On the switch, set the
shared keys for packets exchanged with the RADIUS server to expert.
Configuration of separate AAA for other types of users is similar to that given in this example. The only
difference lies in the access type.
Configuration procedure
1-37
When telneting into the switch, a user enters username telnet@bbb for authentication using domain
bbb.
Network requirements
As shown in Figure 1-9, configure the switch to use the RADIUS server to provide authentication,
authorization, and accounting services to SSH users.
z Configure an iMC server to act as the RADIUS server to provide authentication, authorization, and
accounting services for SSH users. The IP address of the RADIUS server is 10.1.1.1/24.
z Set both the shared keys for authentication and accounting packets exchanged with the RADIUS
server to expert; and specify that a username sent to the RADIUS server carries the domain
name. The RADIUS server provides different user services according to the domain names.
1-38
RADIUS server
10.1.1.1/24
Vlan-int2
192.168.1.70/24
Internet
SSH user Switch
Configuration procedure
This example assumes that the RADIUS server runs iMC PLAT 3.20-R2602 or iMC UAM 3.60-E6102.
1-39
1-40
# Configure the IP address of VLAN-interface 3, through which the switch access the server.
[Switch] interface vlan-interface 3
[Switch-Vlan-interface3] ip address 10.1.1.2 255.255.255.0
[Switch-Vlan-interface3] quit
# Generate RSA and DSA key pairs and enable the SSH server.
[Switch] public-key local create rsa
[Switch] public-key local create dsa
[Switch] ssh server enable
1-41
When using SSH to log in, a user enters a username in the form userid@bbb for authentication using
domain bbb.
3) Verify the configuration
After the above configuration, the SSH user should be able to use the configured account to access
the user interface of the switch. The commands that the user can access depend on the settings for
EXEC users on the iMC server.
Troubleshooting AAA
Troubleshooting RADIUS
1-42
Troubleshooting HWTACACS
1-43
When configuring 802.1X, go to these sections for information you are interested in:
z 802.1X Overview
z Configuring 802.1X
z Configuring an 802.1X Port-based Guest VLAN
z 802.1X Configuration Example
z Guest VLAN and VLAN Assignment Configuration Example
z ACL Assignment Configuration Example
802.1X Overview
The 802.1X protocol was proposed by IEEE802 LAN/WAN committee for security of wireless LANs
(WLAN). It has been widely used on Ethernet as a common port access control mechanism.
As a port-based access control protocol, 802.1X authenticates and controls accessing devices at the
port level. A device connected to an 802.1X-enabled port of an access control device can access the
resources on the LAN only after passing authentication.
The port security feature provides rich security modes that combine or extend 802.1X and MAC
address authentication. In a networking environment that requires flexible use of 802.1X and MAC
address authentication, you are recommended to configure the port security feature. In a network
environment that requires only 802.1X authentication, you are recommended to configure the 802.1X
directly rather than configure the port security feature for simplicity sake. For how to use the port
security feature, refer to Port Security Configuration in the Security Volume.
Architecture of 802.1X
802.1X operates in the typical client/server model and defines three entities: client, device, and server,
as shown in Figure 2-1.
2-1
z Client: An entity to be authenticated by the device residing on the same LAN. A client is usually a
user-end device and initiates 802.1X authentication through 802.1X client software supporting the
EAP over LANs (EAPOL) protocol.
z Device: The entity that authenticates connected clients residing on the same LAN. A device is
usually an 802.1X-enabled network device and provides ports (physical or logical) for clients to
access the LAN.
z Server: The entity providing authentication, authorization, and accounting services for the device.
The server usually runs the Remote Authentication Dial-in User Service (RADIUS).
The 802.1X authentication system employs the Extensible Authentication Protocol (EAP) to exchange
authentication information between the client, device, and authentication server.
z Between the client and the device, EAP protocol packets are encapsulated using EAPOL to be
transferred on the LAN.
z Between the device and the RADIUS server, EAP protocol packets can be handled in two modes:
EAP relay and EAP termination. In EAP relay mode, EAP protocol packets are encapsulated by
using the EAP over RADIUS (EAPOR) and then relayed to the RADIUS server. In EAP
termination mode, EAP protocol packets are terminated at the device, repackaged in the
Password Authentication Protocol (PAP) or Challenge Handshake Authentication Protocol (CHAP)
attributes of RADIUS packets, and then transferred to the RADIUS server.
These basic concepts are involved in 802.1X: controlled port/uncontrolled port, authorized
state/unauthorized state, and control direction.
A device provides ports for clients to access the LAN. Each port can be regarded as a unity of two
logical ports: a controlled port and an uncontrolled port.
z The uncontrolled port is always open in both the inbound and outbound directions to allow EAPOL
protocol frames to pass, guaranteeing that the client can always send and receive authentication
frames.
z The controlled port is open to allow data traffic to pass only when it is in the authorized state.
z The controlled port and uncontrolled port are two parts of the same port. Any frames arriving at the
port are visible to both of them.
The device uses the authentication server to authenticate a client trying to access the LAN and
controls the status of the controlled port depending on the authentication result, putting the controlled
port in the authorized state or unauthorized state, as shown in Figure 2-2.
2-2
You can set the access control mode of a specified port to control the authorization status. The access
control modes include:
z authorized-force: Places the port in the authorized state, allowing users of the ports to access
the network without authentication.
z unauthorized-force: Places the port in the unauthorized state, denying any access requests from
users of the ports.
z auto: Places the port in the unauthorized state initially to allow only EAPOL frames to pass, and
turns the ports into the authorized state to allow access to the network after the users pass
authentication. This is the most common choice.
Control direction
In the unauthorized state, the controlled port can be set to deny traffic to and from the client or just the
traffic from the client.
Currently, your device can only be set to deny traffic from the client.
EAPOL, defined in 802.1X, is intended to carry EAP protocol packets between clients and devices over
LANs. Figure 2-3 shows the EAPOL frame format.
2-3
Type Description
Frame for carrying authentication information, present between
a device and the authentication server.
EAP-Packet (a value of 0x00) A frame of this type is repackaged and transferred by RADIUS
to get through complex networks to reach the authentication
server.
Frame for initiating authentication, present between a client
EAPOL-Start (a value of 0x01)
and a device.
Frame for logoff request, present between a client and a
EAPOL-Logoff (a value of 0x02)
device.
z Length: Length of the data, that is, length of the Packet body field, in bytes. If the value of this field
is 0, no subsequent data field is present.
z Packet body: Content of the packet. The format of this field varies with the value of the Type field.
An EAPOL frame of the type of EAP-Packet carries an EAP packet in its Packet body field. The format
of the EAP packet is shown in Figure 2-4.
Figure 2-4 EAP packet format
z Code: Type of the EAP packet, which can be Request, Response, Success, or Failure.
An EAP packet of the type of Success or Failure has no Data field, and has a length of 4.
An EAP packet of the type of Request or Response has a Data field in the format shown in Figure 2-5.
The Type field indicates the EAP authentication type. A value of 1 represents Identity, indicating that
2-4
Two attributes of RADIUS are intended for supporting EAP authentication: EAP-Message and
Message-Authenticator. For information about RADIUS packet format, refer to AAA Configuration in
the Security Volume.
EAP-Message
The EAP-Message attribute is used to encapsulate EAP packets. Figure 2-6 shows its encapsulation
format. The value of the Type field is 79. The String field can be up to 253 bytes. If the EAP packet is
longer than 253 bytes, it can be fragmented and encapsulated into multiple EAP-Message attributes.
Figure 2-6 Encapsulation format of the EAP-Message attribute
Message-Authenticator
Figure 2-7 shows the encapsulation format of the Message-Authenticator attribute. The
Message-Authenticator attribute is used to prevent access requests from being snooped during EAP
authentication. It must be included in any packet with the EAP-Message attribute; otherwise, the
packet will be considered invalid and get discarded.
Figure 2-7 Encapsulation format of the Message-Authenticator attribute
2-5
A client initiates authentication by sending an EAPOL-Start frame to the device. The destination
address of the frame is 01-80-C2-00-00-03, the multicast address specified by the IEEE 802.1X
protocol.
Some devices in the network may not support multicast packets with the above destination address,
causing the authentication device unable to receive the authentication request of the client. To solve
the problem, the device also supports EAPOL-Start frames whose destination address is a broadcast
MAC address. In this case, the iNode 802.1X client is required.
An 802.1X device communicates with a remotely located RADIUS server in two modes: EAP relay and
EAP termination. The following description takes the EAP relay as an example to show the 802.1X
authentication process.
EAP relay
EAP relay is an IEEE 802.1X standard mode. In this mode, EAP packets are carried in an upper layer
protocol, such as RADIUS, so that they can go through complex networks and reach the authentication
server. Generally, EAP relay requires that the RADIUS server support the EAP attributes of
EAP-Message and Message-Authenticator, which are used to encapsulate EAP packets and protect
RADIUS packets carrying the EAP-Message attribute respectively.
Figure 2-8 shows the message exchange procedure with EAP-MD5.
2-6
EAPOL EAPOR
EAPOL-Start
EAP-Request / Identity
Port authorized
Handshake timer
Handshake request
[ EAP-Request / Identity ]
Handshake response
[ EAP-Response / Identity ]
......
EAPOL-Logoff
Port unauthorized
2) When a user launches the 802.1X client software and enters the registered username and
password, the 802.1X client software generates an EAPOL-Start frame and sends it to the device
to initiate an authentication process.
3) Upon receiving the EAPOL-Start frame, the device responds with an EAP-Request/Identity packet
for the username of the client.
4) When the client receives the EAP-Request/Identity packet, it encapsulates the username in an
EAP-Response/Identity packet and sends the packet to the device.
5) Upon receiving the EAP-Response/Identity packet, the device relays the packet in a RADIUS
Access-Request packet to the authentication server.
6) When receiving the RADIUS Access-Request packet, the RADIUS server compares the identify
information against its user information table to obtain the corresponding password information.
Then, it encrypts the password information using a randomly generated challenge, and sends the
challenge information through a RADIUS Access-Challenge packet to the device.
7) After receiving the RADIUS Access-Challenge packet, the device relays the contained
EAP-Request/MD5 Challenge packet to the client.
8) When receiving the EAP-Request/MD5 Challenge packet, the client uses the offered challenge to
encrypt the password part (this process is not reversible), creates an EAP-Response/MD5
Challenge packet, and then sends the packet to the device.
9) After receiving the EAP-Response/MD5 Challenge packet, the device relays the packet in a
RADIUS Access-Request packet to the authentication server.
2-7
In EAP relay mode, a client must use the same authentication method as that of the RADIUS server.
On the device, however, you only need to execute the dot1x authentication-method eap command
to enable EAP relay.
EAP termination
In EAP termination mode, EAP packets are terminated at the device and then repackaged into the PAP
or CHAP attributes of RADIUS and transferred to the RADIUS server for authentication, authorization,
and accounting. Figure 2-9 shows the message exchange procedure with CHAP authentication.
2-8
EAPOL EAPOR
EAPOL-Start
EAP-Request / Identity
EAP-Response / Identity
EAP-Success
Port authorized
Handshake timer
Handshake request
[ EAP-Request / Identity ]
Handshake response
[ EAP-Response / Identity ]
......
EAPOL-Logoff
Port unauthorized
Different from the authentication process in EAP relay mode, it is the device that generates the random
challenge for encrypting the user password information in EAP termination authentication process.
Consequently, the device sends the challenge together with the username and encrypted password
information from the client to the RADIUS server for authentication.
802.1X Timers
This section describes the timers used on an 802.1X device to guarantee that the client, the device,
and the RADIUS server can interact with each other in a reasonable manner.
z Username request timeout timer (tx-period): The device starts this timer when it sends an
EAP-Request/Identity frame to a client. If it receives no response before this timer expires, the
device retransmits the request. When cooperating with a client that sends EAPOL-Start requests
only when requested, the device multicasts EAP-Request/Identity frames to the client at an
interval set by this timer.
z Client timeout timer (supp-timeout): Once a device sends an EAP-Request/MD5 Challenge frame
to a client, it starts this timer. If this timer expires but it receives no response from the client, it
retransmits the request.
z Server timeout timer (server-timeout): Once a device sends a RADIUS Access-Request packet to
the authentication server, it starts this timer. If this timer expires but it receives no response from
the server, it retransmits the request.
2-9
Extensions to 802.1X
The devices extend and optimize the mechanism that the 802.1X protocol specifies by:
z Allowing multiple users to access network services through the same physical port.
z Supporting two authentication methods: portbased and macbased. With the portbased method,
after the first user of a port passes authentication, all other users of the port can access the
network without authentication, and when the first user goes offline, all other users get offline at
the same time. With the macbased method, each user of a port must be authenticated separately,
and when an authenticated user goes offline, no other users are affected.
After an 802.1X client passes authentication, the authentication server sends authorization information
to the device. If the authorization information contains VLAN authorization information, the device adds
the port connecting the client to the assigned VLAN. This neither changes nor affects the
configurations of the port. The only result is that the assigned VLAN takes precedence over the
manually configured one, that is, the assigned VLAN takes effect. After the client goes offline, the
configured one takes effect.
VLAN assignment
After an 802.1X user passes the authentication, the server will send an authorization message to the
device. If the server is enabled with the VLAN assignment function, the assigned VLAN information will
be included in the message. The device, depending on the link type of the port used to log in, adds the
port to the assigned VLAN according to the following rules:
z If the port link type is Access, the port leaves its initial VLAN, that is, the VLAN configured for it
and joins the assigned VLAN.
z If the port link type is Trunk, the assigned VLAN is allowed to pass the current trunk port. The
default VLAN ID of the port is that of the assigned VLAN.
z If the port link type is Hybrid, the assigned VLAN is allowed to pass the current port without
carrying the tag. The default VLAN ID of the port is that of the assigned VLAN. Note that if the
Hybrid port is assigned a MAC-based VLAN, the device will dynamically create a MAC-based
VLAN according to the VLAN assigned by the authentication server, and remain the default VLAN
ID of the port unchanged.
2-10
z With a Hybrid port, the VLAN assignment will fail if you have configured the assigned VLAN to
carry tags.
z With a Hybrid port, you cannot configure an assigned VLAN to carry tags after the VLAN has been
assigned.
Guest VLAN
Guest VLAN allows unauthenticated users and users failing the authentication to access a specified
VLAN, where the users can, for example, download or upgrade the client software, or execute some
user upgrade programs. This VLAN is called the guest VLAN.
Currently, on the S4510G series Ethernet switches, a guest VLAN can be only a port-based guest
VLAN (PGV), which is supported on a port that uses the access control method of portbased.
With PGV configured on a port, if no users are successfully authenticated on the port in a certain
period of time (90 seconds by default), the port will be added to the guest VLAN and all users
accessing the port will be authorized to access the resources in the guest VLAN.
The device adds a PGV-configured port into the guest VLAN according to the ports link type in the
similar way as described in VLAN assignment. When a user of a port in the guest VLAN initiates an
authentication, if the authentication is not successful, the port stays in the guest VLAN; if the
authentication is successful, the port leaves the guest VLAN, and:
z If the authentication server assigns a VLAN, the port joins the assigned VLAN. After the user goes
offline, the port returns to its initial VLAN, that is, the VLAN specified for it during port configuration,
or, in other words, the VLAN it was in before it joined the guest VLAN.
z If the authentication server does not assign any VLAN, the port returns to its initial VLAN. After the
client goes offline, the port just stays in its initial VLAN.
ACL assignment
ACLs provide a way of controlling access to network resources and defining access rights. When a
user logs in through a port, and the RADIUS server is configured with authorization ACLs, the device
will permit or deny data flows traversing through the port according to the authorization ACLs. Before
specifying authorization ACLs on the server, you need to configure the ACL rules on the device. You
can change the access rights of users by modifying authorization ACL settings on the RADIUS server
or changing the corresponding ACL rules on the device.
The online user handshake function allows the device to send handshake messages to online users to
check whether the users are still online at the interval specified by the dot1x timer handshake-period
command. If the device does not receive any response from an online user after the device has sent
2-11
The mandatory authentication domain function provides a security control mechanism for 802.1X
access. With a mandatory authentication domain specified for a port, the system uses the mandatory
authentication domain for authentication, authorization, and accounting of all 802.1X users on the port.
In this way, users accessing the port cannot use any account in other domains.
Meanwhile, for EAP relay mode 802.1X authentication that uses certificates, the certificate of a user
determines the authentication domain of the user. However, you can specify different mandatory
authentication domains for different ports even if the user certificates are from the same certificate
authority (that is, the user domain names are the same). This allows you to deploy 802.1X access
policies flexibly.
Configuring 802.1X
Configuration Prerequisites
802.1X provides a user identity authentication scheme. However, 802.1X cannot implement the
authentication scheme solely by itself. RADIUS or local authentication must be configured to work with
802.1X.
z Configure the ISP domain to which the 802.1X user belongs and the AAA scheme to be used (that
is, local authentication or RADIUS).
z For remote RADIUS authentication, the username and password information must be configured
on the RADIUS server.
z For local authentication, the username and password information must be configured on the
device and the service type must be set to lan-access.
For detailed configuration of the RADIUS client, refer to AAA Configuration in the Security Volume.
Required
Enable 802.1X globally dot1x
Disabled by default
2-12
Note that:
z For 802.1X to take effect on a port, you must enable it both globally in system view and for the port
in system view or Ethernet interface view.
z You can also enable 802.1X and set port access control parameters (that is, the port access
control mode, port access method, and the maximum number of users) for a port in Ethernet
interface view. For detailed configuration, refer to Configuring 802.1X for a Port. The only
difference between configuring 802.1X globally and configuring 802.1X for a port lies in the
applicable scope. If both a global setting and a local setting exist for an argument of a port, the last
configured one is in effect.
z 802.1X timers only need to be changed in special or extreme network environments. For example,
you can give the client timeout timer a higher value in a low-performance network, give the quiet
timer a higher value in a vulnerable network or a lower value for quicker authentication response,
or adjust the server timeout timer to suit the performance of the authentication server.
2-13
Note that:
z Enabling 802.1X on a port is mutually exclusive with adding the port to an aggregation group.
z In EAP relay authentication mode, the device encapsulates the 802.1X user information in the
EAP attributes of RADIUS packets and sends the packets to the RADIUS server for authentication.
In this case, you can configure the user-name-format command but it does not take effect. For
2-14
z Enable 802.1X.
z Create the VLAN to be specified as the guest VLAN.
z Set the port access control method to portbased.
z Ensure that the 802.1X multicast trigger function is enabled.
Configuration procedure
z Different ports can be configured with different guest VLANs, but a port can be configured with
only one guest VLAN.
z You cannot configure both the guest VLAN function and the free IP function in EAD fast
deployment.
2-15
z The access control method of macbased is required on the port GigabitEthernet 1/0/1 to control
clients.
z All clients belong to default domain aabbcc.net, which can accommodate up to 30 users. RADIUS
authentication is performed at first, and then local authentication when no response from the
RADIUS server is received. If the RADIUS accounting fails, the device gets users offline.
z A server group with two RADIUS servers is connected to the device. The IP addresses of the
servers are 10.1.1.1 and 10.1.1.2 respectively. Use the former as the primary
authentication/secondary accounting server, and the latter as the secondary
authentication/primary accounting server.
z Set the shared key for the device to exchange packets with the authentication server as name,
and that for the device to exchange packets with the accounting server as money.
z Specify the device to try up to five times at an interval of 5 seconds in transmitting a packet to the
RADIUS server until it receives a response from the server, and to send real time accounting
packets to the accounting server every 15 minutes.
z Specify the device to remove the domain name from the username before passing the username
to the RADIUS server.
z Set the username of the 802.1X user as localuser and the password as localpass and specify to
use clear text mode. Enable the idle cut function to get the user offline whenever the user remains
idle for over 20 minutes.
2-16
Configuration procedure
The following configuration procedure covers most AAA/RADIUS configuration commands for the
device, while configuration on the 802.1X client and RADIUS server are omitted. For information about
AAA/RADIUS configuration commands, refer to AAA Configuration in the Security Volume.
# Configure the IP addresses of the primary authentication and accounting RADIUS servers.
[Device-radius-radius1] primary authentication 10.1.1.1
[Device-radius-radius1] primary accounting 10.1.1.2
# Configure the IP addresses of the secondary authentication and accounting RADIUS servers.
[Device-radius-radius1] secondary authentication 10.1.1.2
[Device-radius-radius1] secondary accounting 10.1.1.1
# Specify the shared key for the device to exchange packets with the authentication server.
[Device-radius-radius1] key authentication name
# Specify the shared key for the device to exchange packets with the accounting server.
[Device-radius-radius1] key accounting money
2-17
# Set the interval for the device to send real time accounting packets to the RADIUS server.
[Device-radius-radius1] timer realtime-accounting 15
# Specify the device to remove the domain name of any username before passing the username to the
RADIUS server.
[Device-radius-radius1] user-name-format without-domain
[Device-radius-radius1] quit
# Set radius1 as the RADIUS scheme for users of the domain and specify to use local authentication
as the secondary scheme.
[Device-isp-aabbcc.net] authentication default radius-scheme radius1 local
[Device-isp-aabbcc.net] authorization default radius-scheme radius1 local
[Device-isp-aabbcc.net] accounting default radius-scheme radius1 local
# Enable the idle cut function and set the idle cut interval.
[Device-isp-aabbcc.net] idle-cut enable 20
[Device-isp-aabbcc.net] quit
# Set the port access control method. (Optional. The default settings meet the requirement.)
[Device] dot1x port-method macbased interface GigabitEthernet 1/0/1
2-18
VLAN 10 VLAN 2
GE1/0/1 GE1/0/4
VLAN 1 VLAN 5
GE1/0/2 GE1/0/3
Switch
Internet
Supplicant
Figure 2-12 Network diagram with the port in the guest VLAN
2-19
Configuration procedure
z The following configuration procedure uses many AAA/RADIUS commands. For detailed
configuration of these commands, refer to AAA Configuration in the Security Volume.
z Configurations on the 802.1X client and RADIUS server are omitted.
# Configure authentication domain system and specify to use RADIUS scheme 2000 for users of the
domain.
[Device] domain system
[Device-isp-system] authentication default radius-scheme 2000
[Device-isp-system] authorization default radius-scheme 2000
[Device-isp-system] accounting default radius-scheme 2000
[Device-isp-system] quit
2-20
You can use the display current-configuration or display interface GigabitEthernet 1/0/2
command to view your configuration. You can also use the display vlan 10 command in the following
cases to verify whether the configured guest VLAN functions:
z When no users log in.
z When a user goes offline.
After a user passes the authentication successfully, you can use the display interface
GigabitEthernet 1/0/2 command to verity that port GigabitEthernet 1/0/2 has been added to the
assigned VLAN 5.
As shown in Figure 2-14, a host is connected to port GigabitEthernet 1/0/1 of the device and must pass
802.1X authentication to access the Internet.
z Configure the RADIUS server to assign ACL 3000.
z Enable 802.1X authentication on port GigabitEthernet 1/0/1 of the device, and configure ACL
3000.
After the host passes 802.1X authentication, the RADIUS server assigns ACL 3000 to port
GigabitEthernet 1/0/1. As a result, the host can access the Internet but cannot access the FTP server,
whose IP address is 10.0.0.1.
Figure 2-14 Network diagram for ACL assignment
2-21
After logging in successfully, a user can use the ping command to verify whether the ACL 3000
assigned by the RADIUS server functions.
C:\>ping 10.0.0.1
C:\>
2-22
When configuring EAD fast deployment, go to these sections for information you are interested in:
z EAD Fast Deployment Overview
z Configuring EAD Fast Deployment
z Displaying and Maintaining EAD Fast Deployment
z EAD Fast Deployment Configuration Example
z Troubleshooting EAD Fast Deployment
Endpoint Admission Defense (EAD) is an integrated endpoint access control solution. By allowing the
security clients, access devices, security policy servers, and third-party servers in the network to
collaborate with each other, it can improve the overall defense capability of a network and implement
centralized management of users.
Normally, to use EAD on your network, you need to manually deploy the EAD client on each device,
which tends to be time consuming and inefficient. To address the issue, quick EAD deployment was
developed. In conjunction with 802.1X, it can have an access switch to force all attached devices to
download and install the EAD client before permitting them to access the network.
To support the fast deployment of EAD schemes, 802.1X provides the following two mechanisms:
1) Limit on accessible network resources
Before successful 802.1X authentication, a user can access only a specific IP segment, which may
have one or more servers. Users can download EAD client software or obtain dynamic IP address from
the servers.
2) URL redirection
Before successful 802.1X authentication, a user using a Web browser to access the network is
automatically redirected to a specified URL, for example, the EAD client software download page. The
server that provides the URL redirection must be in the specific network segment that users can
access before passing 802.1X authentication.
3-1
Currently, MAC authentication and port security cannot work together with EAD fast deployment. Once
MAC authentication or port security is enabled globally, the EAD fast deployment is disabled
automatically.
Configuration Prerequisites
Configuration Procedure
A freely accessible network segment, also called a free IP, is a network segment that users can access
before passing 802.1X authentication.
Once a free IP is configured, the fast deployment of EAD is enabled.
Follow these steps to configure a freely accessible network segment:
z You cannot configure both the free IP and the 802.1X guest VLAN function.
z If no freely accessible network segment is configured, a user cannot obtain a dynamic IP address
before passing 802.1X authentication. To solve this problem, you can configure a freely
accessible network segment that is on the same network segment with the DHCP server.
3-2
Required
Configure the IE redirect URL dot1x url url-string
No redirect URL is configured by default.
The redirect URL and the freely accessible network segment must belong to the same network
segment. Otherwise, the specified URL is unaccessible.
With the EAD fast deployment function, a user is authorized by an EAD rule (generally an ACL rule) to
access the freely accessible network segment before passing authentication. After successful
authentication, the occupied ACL will be released. If a large amount of users access the freely
accessible network segment but fail the authentication, ACLs will soon be used up and new users will
be rejected.
An EAD rule timeout timer is designed to solve this problem. When a user accesses the network, this
timer is started. If the user neither downloads client software nor performs authentication before the
timer expires, the occupied ACL will be released so that other users can use it. When there are a large
number of users, you can shorten the timeout time to improve the ACL usage efficiency.
Follow these steps to set the EAD rule timeout time:
3-3
As shown in Figure 3-1, the host is connected to the device, and the device is connected to the freely
accessible network segment and outside network.
It is required that:
z Before successful 802.1 authentication, the host using IE to access outside network will be
redirected to the WEB server, and it can download and install 802.1X client software.
z After successful 802.1X authentication, the host can access outside network.
Figure 3-1 Network diagram for EAD fast deployment
Internet
Free IP:
WEB server
192.168.2.3/24
GE1/0/1
192.168.2.0/24
192.168.1.1/24
Host Device
192.168.1.10/24
Configuration procedure
3-4
Besides, if the user uses IE to access any external website, the user will be taken to the WEB server,
which provides the client software download service.
Symptom
When a user enters an external website address in the IE browser, the user is not redirected to the
specified URL.
Analysis
z The address is in the string format. In this case, the operating system of the host regards the string
a website name and tries to have it resolved. If the resolution fails, the operating system sends an
ARP request with the address in the format other than X.X.X.X. The redirection function does
redirect this kind of ARP request.
z The address is within the freely accessible network segment. In this case, the device regards that
the user is trying to access a host in the freely accessible network segment, and redirection will
not take place, even if no host is present with the address.
z The redirect URL is not in the freely accessible network segment, no server is present with that
URL, or the server with the URL does not provide WEB services.
Solution
z Enter an IP address that is not within the freely accessible network segment in dotted decimal
notation (X.X.X.X).
z Ensure that the device and the server are configured correctly.
3-5
When configuring HABP, go to these sections for the information you are interested in:
z Introduction to HABP
z Configuring HABP
z Displaying and Maintaining HABP
z HABP Configuration Example
Introduction to HABP
The HW Authentication Bypass Protocol (HABP) is used to enable the downstream network devices of
an 802.1X or MAC authentication enabled access device to bypass 802.1X authentication and MAC
authentication.
HABP is usually adopted at the access layer of a campus or enterprise network. This feature is useful
when 802.1X authentication or MAC address authentication is adopted on the management switch of a
cluster, in which case you must configure HABP to allow the packets between the member devices of
the cluster to bypass 802.1X authentication because network devices usually do not support 802.1
client. Otherwise, the management device will fail to perform centralized management of the cluster
member devices. For more information about the cluster function, refer to Cluster Configuration in the
System Volume.
As shown in Figure 4-1, 802.1X authenticator Switch A has two switches attached to it: Switch B and
Switch C. On Switch A, 802.1X authentication is enabled globally and on the ports connecting the
downstream network devices. The end-user devices (the supplicants) run the 802.1X client software
for 802.1X authentication. For Switch B and Switch D, where 802.1X client is not supported (which is
typical of network devices), the communication between them will fail because they cannot pass
802.1X authentication and their packets will be blocked on Switch A. To allow the two switches to
communicate, you can use HABP.
4-1
Internet
Switch A
Authentication
server
Authenticator
Switch B Switch C
Switch D Switch E
Supplicant
Supplicant Supplicant
HABP is a link layer protocol that works above the MAC layer. It is built on the client-server model.
Generally, the HABP server is assumed by the management device (such as Switch A in the above
example), and the attached switches function as the HABP clients, such as Switch B through Switch E
in the example. No device can function as both an HABP server and a client at the same time. Typically,
the HABP server sends HABP requests to all its clients periodically to collect their MAC addresses,
and the clients respond to the requests. After the server learns the MAC addresses of all the clients, it
registers the MAC addresses as HABP entries. Then, link layer frames exchanged between the clients
can bypass the 802.1X authentication on ports of the server without affecting the normal operation of
the whole network. All HABP packets must travel in a VLAN, which is called the management VLAN.
Communication between the HABP server and the HABP clients is implemented through the
management VLAN.
Configuring HABP
Complete the following tasks to configure HABP:
z Configuring the HABP Server
z Configuring an HABP Client
With the HABP server function enabled, the administrative device starts to send HABP requests to the
attached switches. The HABP responses include the MAC addresses of the attached switches. This
makes it possible for the administrative device to manage the attached switches.
You can configure the interval of sending HABP requests on the administrative device.
Follow these steps to configure an HABP server:
4-2
Configure the HABP client function on each device that is attached to the administrative device and
needs to be managed. As the HABP client function is enabled by default, this configuration task is
optional.
Follow these steps to configure an HABP client:
Optional
Enable HABP habp enable
Enabled by default
Switch A is the administrative device and connects two access devices: Switch B and Switch C.
Configure HABP so that Switch A can manage Switch B and Switch C.
z Configure Switch A as the HABP server, allowing HABP packets to be transmitted in VLAN 2.
z Enable HABP client on Switch B and Switch C.
z On switch A, set the interval to send HABP request packets to 50 seconds.
4-3
Configuration procedure
1) Configure Switch A
# Enable HABP.
<SwitchA> system-view
[SwitchA] habp enable
# Configure HABP to work in server mode, allowing HABP packets to be transmitted in VLAN 2.
[SwitchA] habp server vlan 2
4-4
When configuring MAC authentication, go to these sections for information you are interested in:
z MAC Authentication Overview
z Related Concepts
z Configuring MAC Authentication
z Displaying and Maintaining MAC Authentication
z MAC Authentication Configuration Examples
In RADIUS-based MAC authentication, the device serves as a RADIUS client and requires a RADIUS
server to cooperate with it.
z If the type of username is MAC address, the device forwards a detected MAC address as the
username and password to the RADIUS server for authentication of the user.
z If the type of username is fixed username, the device sends the same username and password
configured locally to the RADIUS server for authentication of each user.
If the authentication succeeds, the user will be granted permission to access the network resources.
In local MAC authentication, the device performs authentication of users locally and different items
need to be manually configured for users on the device according to the specified type of username:
z If the type of username is MAC address, a local user must be configured for each user on the
device, using the MAC address of the accessing user as both the username and password.
z If the type of username is fixed username, a single username and optionally a single password are
required for the device to authenticate all users.
5-1
When a user fails MAC authentication, the MAC address becomes a quiet MAC address, which means
that any packets from the MAC address will be discarded silently by the device until the quiet timer
expires. This prevents the device from authenticating an illegal user repeatedly in a short time.
If a quiet MAC address is the same as a static MAC address configured or an MAC address that has
passed another type of authentication, the quiet function does not take effect.
VLAN Assigning
For separation of users from restricted network resources, users and restricted resources are usually
put into different VLANs. After a user passes identity authentication, the authorization server assigns to
the user the VLAN where the restricted resources reside as an authorized VLAN, and the port through
which the user accesses the device will be assigned to the authorized VLAN. As a result, the user can
access those restricted network resources.
ACL Assigning
ACLs assigned by an authorization server are referred to as authorization ACLs, which are designed to
control access to network resources. If the RADIUS server is configured with authorization ACLs, the
device will permit or deny data flows traversing through the port through which a user accesses the
device according to the authorization ACLs. You can change access rights of users by modifying
authorization ACL settings on the RADIUS server.
5-2
When adding usernames and passwords on the device or server, ensure that:
z The type of username and password must be consistent with that used for MAC authentication.
z All the letters in the MAC address to be used as the username and password must be in lower
case.
z The service type of the local users must be configured as lan-access.
Configuration Procedure
mac-authentication Optional
user-name-format { fixed
Configure the username By default, the users source
[ account name ] [ password
and password for MAC MAC address serves as the
{ cipher | simple } password ] |
authentication username and password, with
mac-address [ with-hyphen |
without-hyphen ] } - in the MAC address.
5-3
Network requirements
As illustrated in Figure 5-1, a supplicant is connected to the device through port GigabitEthernet 1/0/1.
z Local MAC authentication is required on every port to control user access to the Internet.
z All users belong to domain aabbcc.net.
z Local users use their MAC addresses as the usernames and passwords for authentication.
z Set the offline detect timer to 180 seconds and the quiet timer to 3 minutes.
Figure 5-1 Network diagram for local MAC authentication
Configuration procedure
5-4
# Configure ISP domain aabbcc.net, and specify that the users in the domain use local authentication.
[Device] domain aabbcc.net
[Device-isp-aabbcc.net] authentication lan-access local
[Device-isp-aabbcc.net] quit
# Specify the MAC authentication username format as MAC address, that is, using the MAC address
(with hyphens) of a user as the username and password for MAC authentication of the user.
[Device] mac-authentication user-name-format mac-address with-hyphen
2) Verify the configuration
# Display global MAC authentication information.
<Device> display mac-authentication
MAC address authentication is enabled.
User name format is MAC address, like xx-xx-xx-xx-xx-xx
Fixed username:mac
Fixed password:not configured
Offline detect period is 180s
Quiet period is 180s.
Server response timeout value is 100s
The max allowed user number is 1024 per slot
Current user number amounts to 1
Current domain is aabbcc.net
GigabitEthernet1/0/1 is link-up
MAC address authentication is enabled
Authenticate success: 1, failed: 0
Current online user number is 1
MAC Addr Authenticate state Auth Index
00e0-fc12-3456 MAC_AUTHENTICATOR_SUCCESS 29
5-5
Network requirements
As illustrated in Figure 5-2, a host is connected to the device through port GigabitEthernet 1/0/1. The
device authenticates, authorizes and keeps accounting on the host through the RADIUS server.
z MAC authentication is required on every port to control user access to the Internet.
z Set the offline detect timer to 180 seconds and the quiet timer to 3 minutes.
z All users belong to ISP domain 2000.
z The username type of fixed username is used for authentication, with the username being aaa
and password being 123456.
Figure 5-2 Network diagram for MAC authentication using RADIUS
Configuration procedure
It is required that the RADIUS server and the device are reachable to each other and the username
and password are configured on the server.
5-6
# Specify to use the username aaa and password 123456 for MAC authentication of all users.
[Device] mac-authentication user-name-format fixed account aaa password simple 123456
2) Verify the configuration
# Display global MAC authentication information.
<Device> display mac-authentication
MAC address authentication is enabled.
User name format is fixed account
Fixed username:aaa
Fixed password:123456
Offline detect period is 180s
Quiet period is 180s.
Server response timeout value is 100s
The max allowed user number is 1024 per slot
Current user number amounts to 1
Current domain is 2000
GigabitEthernet1/0/1 is link-up
MAC address authentication is enabled
Authenticate success: 1, failed: 0
Current online user number is 1
MAC Addr Authenticate state Auth Index
00e0-fc12-3456 MAC_AUTHENTICATOR_SUCCESS 29
Network requirements
As shown in Figure 5-3, a host is connected to port GigabitEthernet 1/0/1 of the switch and must pass
MAC authentication to access the Internet.
z Specify to use the MAC address of a user as the username and password for MAC authentication
of the user.
z Configure the RADIUS server to assign ACL 3000.
5-7
Configuration procedure
z Make sure that there is a route available between the RADIUS server and the switch.
z In this example, the switch uses the default username type (user MAC address) for MAC
authentication. Therefore, you need to add the username and password of each user on the
RADIUS server correctly.
z You need to configure the RADIUS server to assign ACL 3000 as the authorization ACL.
5-8
# Specify the MAC authentication username type as MAC address, that is, using the MAC address of a
user as the username and password for MAC authentication of the user.
[Sysname] mac-authentication user-name-format mac-address
After completing the above configurations, you can use the ping command to verify whether the ACL
3000 assigned by the RADIUS server functions.
C:\>ping 10.0.0.1
C:\>
5-9
When configuring port security, go to these sections for information you are interested in:
z Introduction to Port Security
z Port Security Configuration Task List
z Displaying and Maintaining Port Security
z Port Security Configuration Examples
z Troubleshooting Port Security
Port security is a MAC address-based security mechanism for network access controlling. It is an
extension to the existing 802.1X authentication and MAC authentication. It controls the access of
unauthorized devices to the network by checking the source MAC address of an inbound frame and
the access to unauthorized devices by checking the destination MAC address of an outbound frame.
With port security, you can define various port security modes to make a device learn only legal source
MAC addresses, so that you can implement different network security management as needed. When
a port security-enabled device detects an illegal frame, it triggers the corresponding port security
feature and takes a pre-defined action automatically. This reduces your maintenance workload and
greatly enhances system security.
The following types of frames are classified as illegal:
z Received frames with unknown source MAC addresses when MAC address learning is disabled.
z Received frames with unknown source MAC addresses when the number of MAC addresses
learned by the port has already reached the upper limit.
z Frames from unauthenticated users.
The security modes of the port security feature provide extended and combined use of 802.1X
authentication and MAC authentication and therefore apply to scenarios that require both 802.1X
authentication and MAC authentication. For scenarios that require only 802.1X authentication or MAC
authentication for access control, however, you are recommended to configure the 802.1X
authentication or MAC authentication for simplicity. For information about 802.1X and MAC
authentication, refer to 802.1X Configuration and MAC Authentication Configuration in the Security
Volume.
6-1
NTK
The need to know (NTK) feature checks the destination MAC addresses in outbound frames and
allows frames to be sent to only devices passing authentication, thus preventing illegal devices from
intercepting network traffic.
Intrusion protection
The intrusion protection feature checks the source MAC addresses in inbound frames and takes a
pre-defined action accordingly upon detecting illegal frames. The action may be disabling the port
temporarily, disabling the port permanently, or blocking frames from the MAC address for three
minutes (unmodifiable).
Trap
The trap feature enables the device to send trap messages upon detecting specified frames that result
from, for example, intrusion or user login/logout operations, helping you monitor special activities.
6-2
6-3
These security mode naming rules may help you remember the modes:
z userLogin specifies port-based 802.1X authentication.
z macAddress specifies MAC address authentication.
z Else specifies that the authentication method before Else is applied first. If the authentication fails,
the protocol type of the authentication request determines whether to turn to the authentication
method following the Else.
z In a security mode with Or, the protocol type of the authentication request determines which
authentication method is to be used. However, 802.1X authentication is preferred by wireless
users.
z userLogin with Secure specifies MAC-based 802.1X authentication.
z Ext indicates allowing multiple 802.1X users to be authenticated and get online. A security mode
without Ext allows only one 802.1X user to be authenticated and get online.
Task Remarks
Enabling Port Security Required
Setting the Maximum Number of Secure MAC Addresses Optional
Setting the Port Security Mode Required
6-4
Before enabling port security, you need to disable 802.1X and MAC authentication globally.
Configuration Procedure
Note that:
1) Enabling port security resets the following configurations on a port to the bracketed defaults. Then,
values of these configurations cannot be changed manually; the system will adjust them based on
the port security mode automatically:
z 802.1X (disabled), port access control method (macbased), and port access control mode (auto)
z MAC authentication (disabled)
2) Disabling port security resets the following configurations on a port to the bracketed defaults:
z Port security mode (noRestrictions)
z 802.1X (disabled), port access control method (macbased), and port access control mode (auto)
z MAC authentication (disabled)
3) Port security cannot be disabled if there is any user present on a port.
z For detailed 802.1X configuration, refer to 802.1X Configuration in the Security Volume.
z For detailed MAC-based authentication configuration, refer to MAC Authentication Configuration
in the Security Volume.
6-5
This configuration is different from that of the maximum number of MAC addresses that can be leaned
by the port in MAC address management.
z With port security disabled, you can configure the port security mode, but your configuration does
not take effect.
z You cannot change the port security mode of a port when any user is present on the port.
z Before configuring the port to operate in autoLearn mode, set the maximum number of secure
MAC addresses allowed on a port.
6-6
z You cannot change the maximum number of secure MAC addresses allowed on a port that
operates in autoLearn mode.
z OUI, defined by IEEE, is the first 24 bits of the MAC address and uniquely identifies a device
vendor.
z You can configure multiple OUI values. However, a port in userLoginWithOUI mode allows only
one 802.1X user and one user whose MAC address contains a specified OUI.
z After enabling port security, you can change the port security mode of a port only when the port is
operating in noRestrictions mode, the default mode. To change the port security mode of a port
operating in any other mode, use the undo port-security port-mode command to restore the
default port security mode at first.
z You cannot change the port security mode of a port with users online.
The need to know (NTK) feature checks the destination MAC addresses in outbound frames to allow
frames to be forwarded to only devices passing authentication. The NTK feature supports three
modes:
z ntkonly: Forwards only frames destined for authenticated MAC addresses.
z ntk-withbroadcasts: Forwards only frames destined for authenticated MAC addresses or the
broadcast address.
6-7
interface interface-type
Enter interface view
interface-number
Required
port-security ntk-mode
Configure the NTK feature { ntk-withbroadcasts | By default, NTK is disabled on
ntk-withmulticasts | ntkonly } a port and all frames are
allowed to be sent.
Support for the NTK feature depends on the port security mode.
The intrusion protection enables a device to perform either of the following security policies when it
detects illegal frames:
z blockmac: Adds the source MAC addresses of illegal frames to the blocked MAC addresses list
and discards frames with blocked source MAC addresses. A blocked MAC address is restored to
normal after being blocked for three minutes, which is fixed and cannot be changed.
z disableport: Disables the port permanently.
z disableport-temporarily: Disables the port for a specified period of time. Use the port-security
timer disableport command to set the period.
Follow these steps to configure the intrusion protection feature:
interface interface-type
Enter interface view
interface-number
6-8
Configuring Trapping
The trapping feature enables a device to send trap information in response to four types of events:
z addresslearned: A port learns a new address.
z dot1xlogfailure/dot1xlogon/dot1xlogoff: A port learns 802.1x authentication failure/successful
802.1x authentication/802.1x user logoff.
z ralmlogfailure/ralmlogoff: A port learns MAC authentication failure/MAC authentication user
logoff.
z intrusion: A port learns illegal frames.
Follow these steps to configure port security trapping:
Configuration Prerequisites
Configuration Procedure
6-9
The configured secure MAC addresses are saved in the configuration file and will not get lost when the
port goes up or goes down. After you save the configuration file, the secure MAC address saved in the
configuration file are maintained even after the device restarts.
6-10
Network requirements
Configuration procedure
# Set the maximum number of secure MAC addresses allowed on the port to 64.
[Switch-GigabitEthernet1/0/1] port-security max-mac-count 64
# Configure the port to be silent for 30 seconds after the intrusion protection feature is triggered.
[Switch-GigabitEthernet1/0/1] port-security intrusion-mode disableport-temporarily
[Switch-GigabitEthernet1/0/1] quit
[Switch] port-security timer disableport 30
2) Verify the configuration
After completing the above configurations, you can use the following command to view the port
security configuration information:
<Switch> display port-security interface gigabitethernet 1/0/1
6-11
GigabitEthernet1/0/1 is link-up
Port mode is autoLearn
NeedToKnow mode is disabled
Intrusion Protection mode is DisablePortTemporarily
Max MAC address number is 64
Stored MAC address number is 0
Authorization is permitted
As shown in the output, the maximum number of secure MAC addresses allowed on the port is 64, the
port security mode is autoLearn, the intrusion protection trap is enabled, and the intrusion protection
action is to disable the port (DisablePortTemporarily) for 30 seconds.
You can also use the above command repeatedly to track the number of MAC addresses learned by
the port, or use the display this command in interface view to display the secure MAC addresses
learned, as shown below:
<Switch> system-view
[Switch] interface gigabitethernet 1/0/1
[Switch-GigabitEthernet1/0/1] display this
#
interface GigabitEthernet1/0/1
port-security max-mac-count 64
port-security port-mode autolearn
port-security intrusion-mode disableport-temporarily
port-security mac-address security 0002-0000-0015 vlan 1
port-security mac-address security 0002-0000-0014 vlan 1
port-security mac-address security 0002-0000-0013 vlan 1
port-security mac-address security 0002-0000-0012 vlan 1
port-security mac-address security 0002-0000-0011 vlan 1
#
Issuing the display port-security interface command after the number of MAC addresses learned by
the port reaches 64, you will see that the port security mode has changed to secure. When any frame
with a new MAC address arrives, intrusion protection is triggered and you will see trap messages as
follows:
#May 2 03:15:55:871 2000 Switch PORTSEC/1/VIOLATION:Traph3cSecureViolation
A intrusion occurs!
IfIndex: 9437207
Port: 9437207
MAC Addr: 0.2.0.0.0.21
VLAN ID: 1
IfAdminStatus: 1
In addition, you will see that the port security feature has disabled the port if you issue the following
command:
[Switch-GigabitEthernet1/0/1] display interface gigabitethernet 1/0/1
6-12
Now, if you manually delete several secure MAC addresses, the port security mode of the port will be
restored to autoLearn, and the port will be able to learn MAC addresses again.
Network requirements
The client is connected to the switch through port GigabitEthernet 1/0/1. The switch authenticates the
client by the RADIUS server. If the authentication succeeds, the client is authorized to access the
Internet.
z RADIUS server 192.168.1.2 functions as the primary authentication server and the secondary
accounting server, and RADIUS server 192.168.1.3 functions as the secondary authentication
server and the primary accounting server. The shared key for authentication is name, and that for
accounting is money.
z All users belong to default domain sun, which can accommodate up to 30 users.
z The RADIUS server response timeout time is five seconds and the maximum number of RADIUS
packet retransmission attempts is five. The switch sends real-time accounting packets to the
RADIUS server at an interval of 15 minutes, and sends user names without domain names to the
RADIUS server.
Restrict port GigabitEthernet 1/0/1 of the switch as follows:
z Allow only one 802.1X user to be authenticated.
z Allow up to 16 OUI values to be configured and allow one additional user whose MAC address
has an OUI among the configured ones to access the port.
Figure 6-2 Network diagram for configuring the userLoginWithOUI mode
6-13
z The following configuration steps cover some AAA/RADIUS configuration commands. For details
about the commands, refer to AAA Configuration in the Security Volume.
z Configurations on the host and RADIUS servers are omitted.
6-14
Use the following command to view the configuration information of the ISP domain named sun:
<Switch> display domain sun
Domain = sun
State = Active
Access-limit = 30
Accounting method = Required
Default authentication scheme : radius=radsun
Default authorization scheme : radius=radsun
Default accounting scheme : radius=radsun
Domain User Template:
Idle-cut = Disabled
Self-service = Disabled
Use the following command to view the port security configuration information:
<Switch> display port-security interface gigabitethernet 1/0/1
Equipment port-security is enabled
Trap is disabled
Disableport Timeout: 20s
OUI value:
Index is 1, OUI value is 123401
Index is 2, OUI value is 123402
Index is 3, OUI value is 123403
Index is 4, OUI value is 123404
6-15
GigabitEthernet1/0/1 is link-up
Port mode is userLoginWithOUI
NeedToKnow mode is disabled
Intrusion Protection mode is NoAction
Max MAC address number is not configured
Stored MAC address number is 0
Authorization is permitted
After an 802.1X user gets online, you can see that the number of secure MAC addresses stored is 1.
You can also use the following command to view information about 802.1X users:
<Switch> display dot1x interface gigabitethernet 1/0/1
Equipment 802.1X protocol is enabled
CHAP authentication is enabled
EAD quick deploy is disabled
GigabitEthernet1/0/1 is link-up
802.1X protocol is enabled
Handshake is enabled
The port is an authenticator
Authentication Mode is Auto
Port Control Type is Mac-based
802.1X Multicast-trigger is enabled
Mandatory authentication domain: NOT configured
Guest VLAN: NOT configured
Max number of on-line users is 256
6-16
In addition, the port allows an additional user whose MAC address has an OUI among the specified
OUIs to access the port. You can use the following command to view the related information:
<Switch> display mac-address interface gigabitethernet 1/0/1
MAC ADDR VLAN ID STATE PORT INDEX AGING TIME(s)
1234-0300-0011 1 Learned GigabitEthernet1/0/1 AGING
Network requirements
The client is connected to the switch through GigabitEthernet 1/0/1. The switch authenticates the client
by the RADIUS server. If the authentication succeeds, the client is authorized to access the Internet.
Restrict port GigabitEthernet 1/0/1 of the switch as follows:
z Allow more than one MAC authenticated user to log on.
z For 802.1X users, perform MAC authentication first and then, if MAC authentication fails, 802.1X
authentication. Allow only one 802.1X user to log on.
z Set fixed username and password for MAC-based authentication. Set the total number of MAC
authenticated users and 802.1X-authenticated users to 64.
z Enable NTK to prevent frames from being sent to unknown MAC addresses.
See Figure 6-2.
Configuration procedure
# Configure a MAC authentication user, setting the user name and password to aaa and 123456
respectively.
[Switch] mac-authentication user-name-format fixed account aaa password simple 123456
# Set the 802.1X authentication method to CHAP. (This configuration is optional. By default, the
authentication method is CHAP for 802.1X.)
6-17
# Set the maximum number of secure MAC addresses allowed on the port to 64.
[Switch] interface gigabitethernet 1/0/1
[Switch-GigabitEthernet1/0/1] port-security max-mac-count 64
GigabitEthernet1/0/1 is link-up
Port mode is macAddressElseUserLoginSecure
NeedToKnow mode is NeedToKnowOnly
Intrusion Protection mode is NoAction
Max MAC address number is 64
Stored MAC address number is 0
Authorization is permitted
6-18
GigabitEthernet1/0/1 is link-up
802.1X protocol is enabled
Handshake is enabled
The port is an authenticator
Authentication Mode is Auto
Port Control Type is Mac-based
802.1X Multicast-trigger is enabled
Mandatory authentication domain: NOT configured
Guest VLAN: NOT configured
Max number of on-line users is 256
In addition, as NTK is enabled, frames with unknown destination MAC addresses, multicast addresses,
and broadcast addresses should be discarded.
Symptom
Analysis
For a port working in a port security mode other than noRestrictions, you cannot change the port
security mode by using the port-security port-mode command directly.
6-19
Symptom
Analysis
No secure MAC address can be configured on a port operating in a port security mode other than
autoLearn.
Solution
Symptom
Port security mode cannot be changed when an 802.1X-authenticated or MAC authenticated user is
online.
[Switch-GigabitEthernet1/0/1] undo port-security port-mode
Error:Cannot configure port-security for there is 802.1X user(s) on line on port
GigabitEthernet1/0/1.
Analysis
Changing port security mode is not allowed when an 802.1X-authenticated or MAC authenticated user
is online.
Solution
Use the cut command to forcibly disconnect the user from the port before changing the port security
mode.
[Switch-GigabitEthernet1/0/1] quit
[Switch] cut connection interface gigabitethernet 1/0/1
[Switch] interface gigabitethernet 1/0/1
[Switch-GigabitEthernet1/0/1] undo port-security port-mode
6-20
When configuring IP Source Guard, go to these sections for information you are interested in:
z IP Source Guard Overview
z Configuring a Static Binding Entry
z Configuring Dynamic Binding Function
z Displaying and Maintaining IP Source Guard
z IP Source Guard Configuration Examples
z Troubleshooting IP Source Guard
Enabling IP source guard on a port is mutually exclusive with adding the port to an aggregation group.
7-1
z The system does not support repeatedly binding a binding entry to one port.
z For products supporting multi-port binding, a binding entry can be configured to multiple ports; for
products that do not support multi-port binding, a binding entry can be configured to only one port.
z Supported binding entry types vary by device.
z In a valid binding entry, the MAC address cannot be all 0s, all Fs (a broadcast address), or a
multicast address, and the IP address can only be a Class A, Class B, or Class C address and can
be neither 127.x.x.x nor 0.0.0.0.
z A static binding entry can be configured on only Layer-2 Ethernet ports.
z The dynamic binding function can be configured on Layer-2 Ethernet ports and VLAN interfaces.
z A port takes only the latest dynamic binding entries configured on it.
7-2
Network requirements
As shown in Figure 7-1, Host A and Host B are connected to ports GigabitEthernet 1/0/2 and
GigabitEthernet 1/0/1 of Switch B respectively, Host C is connected to port GigabitEthernet 1/0/2 of
Switch A, and Switch B is connected to port GigabitEthernet 1/0/1 of Switch A.
Configure static binding entries on Switch A and Switch B to meet the following requirements:
z On port GigabitEthernet 1/0/2 of Switch A, only IP packets from Host C can pass.
z On port GigabitEthernet 1/0/1 of Switch A, only IP packets from Host A can pass.
z On port GigabitEthernet 1/0/2 of Switch B, only IP packets from Host A can pass.
z On port GigabitEthernet 1/0/1 of Switch B, only IP packets from Host B can pass.
Network diagram
GE1/0/1 GE1/0/2
Switch A
GE1/0/2 GE1/0/1
Switch B
Host C
IP: 192.168.0.3/24
MAC : 00-01-02-03-04-05
Host A Host B
IP: 192.168.0.1/24 IP: 192.168.0.2/24
MAC: 00-01-02-03-04-06 MAC: 00-01-02-03-04-07
Configuration procedure
1) Configure Switch A
# Configure the IP addresses of various interfaces (omitted).
# Configure port GigabitEthernet 1/0/2 of Switch A to allow only IP packets with the source MAC
address of 00-01-02-03-04-05 and the source IP address of 192.168.0.3 to pass.
<SwitchA> system-view
[SwitchA] interface gigabitethernet 1/0/2
7-3
# Configure port GigabitEthernet 1/0/1 of Switch A to allow only IP packets with the source MAC
address of 00-01-02-03-04-06 and the source IP address of 192.168.0.1 to pass.
[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] user-bind ip-address 192.168.0.1 mac-address 0001-0203-0406
2) Configure Switch B
# Configure the IP addresses of various interfaces (omitted).
# Configure port GigabitEthernet 1/0/2 of Switch B to allow only IP packets with the source MAC
address of 00-01-02-03-04-06 and the source IP address of 192.168.0.1 to pass.
<SwitchB> system-view
[SwitchB] interface gigabitethernet 1/0/2
[SwitchB-GigabitEthernet1/0/2] user-bind ip-address 192.168.0.1 mac-address 0001-0203-0406
[SwitchB-GigabitEthernet1/0/2] quit
# Configure port GigabitEthernet 1/0/1 of Switch B to allow only IP packets with the source MAC
address of 00-01-02-03-04-07 and the source IP address of 192.168.0.2 to pass.
[SwitchB] interface gigabitethernet 1/0/1
[SwitchB-GigabitEthernet1/0/1] user-bind ip-address 192.168.0.2 mac-address 0001-0203-0407
3) Verify the configuration
# On Switch A, static binding entries are configured successfully.
<SwitchA> display user-bind
Total entries found: 2
MAC IP Vlan Port Status
0001-0203-0405 192.168.0.3 N/A GigabitEthernet1/0/2 Static
0001-0203-0406 192.168.0.1 N/A GigabitEthernet1/0/1 Static
Network requirements
Switch A connects to Client A and the DHCP server through ports GigabitEthernet 1/0/1 and
GigabitEthernet 1/0/2 respectively. DHCP snooping is enabled on Switch A.
Detailed requirements are as follows:
z Client A (with the MAC address of 00-01-02-03-04-06) obtains an IP address through the DHCP
server.
z On Switch A, create a DHCP snooping entry for Client A.
z On port GigabitEthernet 1/0/1 of Switch A, enable dynamic binding function to prevent attackers
from using forged IP addresses to attack the server.
7-4
Network diagram
Configuration procedure
1) Configure Switch A
# Configure dynamic binding function on port GigabitEthernet 1/0/1.
<SwitchA> system-view
[SwitchA] interface gigabitethernet1/0/1
[SwitchA-GigabitEthernet1/0/1] ip check source ip-address mac-address
[SwitchA-GigabitEthernet1/0/1] quit
# Display the dynamic binding entries that port GigabitEthernet 1/0/1 has obtained from DHCP
snooping.
[SwitchA-GigabitEthernet1/0/1] display ip check source
Total entries found: 1
MAC IP Vlan Port Status
0001-0203-0406 192.168.0.1 1 GigabitEthernet 1/0/1 DHCP-SNP
# Display the dynamic entries of DHCP snooping and check it is identical with the dynamic entries that
port GigabitEthernet 1/0/1 has obtained.
7-5
As you see, port GigabitEthernet 1/0/1 has obtained the dynamic entries generated by DHCP snooping
after it is configured with dynamic binding function.
Symptom
Configuring static binding entries and dynamic binding function fails on a port.
Analysis
IP Source Guard is not supported on the port which has joined an aggregation group. Neither static
binding entries nor dynamic binding function can be configured on the port which has joined an
aggregation group.
Solution
7-6
When configuring SSH2.0, go to these sections for information you are interested in:
z SSH2.0 Overview
z Configuring the Device as an SSH Server
z Configuring the Device as an SSH Client
z Displaying and Maintaining SSH
z SSH Server Configuration Examples
z SSH Client Configuration Examples
SSH2.0 Overview
Introduction to SSH2.0
Secure Shell (SSH) offers an approach to securely logging into a remote device. By encryption and
strong authentication, it protects devices against attacks such as IP spoofing and plain text password
interception.
The device can not only work as an SSH server to support connections with SSH clients, but also work
as an SSH client to allow users to establish SSH connections with a remote device acting as the SSH
server.
Currently, when acting as an SSH server, the device supports two SSH versions: SSH2.0 and SSH1.
When acting as an SSH client, the device supports SSH2.0 only.
Operation of SSH
The session establishment and interaction between an SSH client and the SSH server involves the
following five stages:
Table 8-1 Stages in session establishment and interaction between an SSH client and the server
Stages Description
SSH1 and SSH2.0 are supported. The two parties negotiate a
Version negotiation
version to use.
SSH supports multiple algorithms. The two parties negotiate an
Key and algorithm negotiation
algorithm for communication.
The SSH server authenticates the client in response to the
Authentication
clients authentication request.
8-1
Version negotiation
All the packets involved in the above steps are transferred in plain text.
z The server and the client send key algorithm negotiation packets to each other, which include the
supported public key algorithm list, encryption algorithm list, Message Authentication Code (MAC)
algorithm list, and compression algorithm list.
z Based on the received algorithm negotiation packets, the server and the client figure out the
algorithms to be used. If the negotiation of any type of algorithm fails, the algorithm negotiation
fails and the server tears down the connection with the client.
z The server and the client use the DH key exchange algorithm and parameters such as the host
key pair to generate the session key and session ID and the client authenticates the identity of the
server.
Through the above steps, the server and client get the same session key and session ID. The session
key will be used to encrypt and decrypt data exchanged between the server and client later, and the
session ID will be used to identify the session established between the server and client and will be
used in the authentication stage.
8-2
Authentication
SSH provides two authentication methods: password authentication and publickey authentication.
z Password authentication: The server uses AAA for authentication of the client. During password
authentication, the client encrypts its username and password, encapsulates them into a
password authentication request, and sends the request to the server. Upon receiving the request,
the server decrypts the username and password, checks the validity of the username and
password locally or by a remote AAA server, and then informs the client of the authentication
result.
z Publickey authentication: The server authenticates the client by the digital signature. During
publickey authentication, the client sends to the server a publickey authentication request that
contains its username, public key, and publickey algorithm information. The server checks
whether the public key is valid. If the public key is invalid, the authentication fails; otherwise, the
server authenticates the client by the digital signature. Finally, the server sends a message to the
client to inform the success or failure of the authentication. Currently, the device supports two
publickey algorithms for digital signature: RSA and DSA.
The following gives the steps of the authentication stage:
1) The client sends to the server an authentication request, which includes the username,
authentication method (password authentication or publickey authentication), and information
related to the authentication method (for example, the password in the case of password
authentication).
2) The server authenticates the client. If the authentication fails, the server informs the client by
sending a message, which includes a list of available methods for re-authentication.
3) The client selects a method from the list to initiate another authentication.
4) The above process repeats until the authentication succeeds or the failed authentication times
exceed the maximum of authentication attempts and the session is torn down.
Besides password authentication and publickey authentication, SSH2.0 provides another two
authentication methods:
z password-publickey: Performs both password authentication and publickey authentication if the
client is using SSH2.0 and performs either if the client is running SSH1.
z any: Performs either password authentication or publickey authentication.
8-3
After passing authentication, the client sends a session request to the server, while the server listens to
and processes the request from the client. After successfully processing the request, the server sends
back to the client an SSH_SMSG_SUCCESS packet and goes on to the interactive session stage with
the client. Otherwise, the server sends back to the client an SSH_SMSG_FAILURE packet, indicating
that the processing fails or it cannot resolve the request.
Interaction
In this stage, the server and the client exchanges data in the following way:
z The client encrypts and sends the command to be executed to the server.
z The server decrypts and executes the command, and then encrypts and sends the result to the
client.
z The client decrypts and displays the result on the terminal.
z In the interaction stage, you can execute commands from the client by pasting the commands in
text format (the text must be within 2000 bytes). It is recommended that the commands are in the
same view; otherwise, the server may not be able to perform the commands correctly.
z If the command text exceeds 2000 bytes, you can execute the commands by saving the text as a
configuration file, uploading the configuration file to the server through SFTP, and then using the
configuration file to restart the server.
Task Remarks
Generating a DSA or RSA Key Pair Required
The DSA or RSA key pair will be used to generate the session ID in the key and algorithm negotiation
stage and used by the client to authenticate the server.
Follow these steps to generate a DSA or RSA key pair on the SSH server:
8-4
Required
Generate the local DSA or public-key local create { dsa |
RSA key pair rsa } By default, there is neither DSA
key pair nor RSA key pair.
z For details about the public-key local create command, refer to Public Key Commands in the
Security Volume.
z To ensure that all SSH clients can log into the SSH server successfully, you are recommended to
generate both DSA and RSA key pairs on the SSH server. This is because different SSH clients
may use different publickey algorithms, though a single client usually uses only one type of
publickey algorithm.
z The public-key local create rsa command generates two RSA key pairs: a server key pair and a
host key pair. Each of the key pairs consists of a public key and a private key. The public key in
the server key pair of the SSH server is used in SSH1 to encrypt the session key for secure
transmission of the key. As SSH2 uses the DH algorithm to generate the session key on the SSH
server and client respectively, no session key transmission is required in SSH2 and the server key
pair is not used.
z The length of the modulus of RSA server keys and host keys must be in the range 512 to 2048 bits.
Some SSH2 clients require that the length of the key modulus be at least 768 bits on the SSH
server side.
z The public-key local create dsa command generates only the host key pair. SSH1 does not
support the DSA algorithm.
z The length of the modulus of DSA host keys must be in the range 512 to 2048 bits. Some SSH2
clients require that the length of the key modulus be at least 768 bits on the SSH server side.
Required
Enable the SSH server function ssh server enable
Disabled by default
An SSH client accesses the device through a VTY user interface. Therefore, you need to configure the
user interfaces for SSH clients to allow SSH login. Note that the configuration takes effect only for
clients logging in after the configuration.
Follow these steps to configure the protocols for the current user interface to support:
8-5
z For detailed information about the authentication-mode and protocol inbound commands, refer
to User Interface Commands of the System Volume.
z If you configure a user interface to support SSH, be sure to configure the corresponding
authentication method with the authentication-mode scheme command.
z For a user interface configured to support SSH, you cannot change the authentication mode. To
change the authentication mode, undo the SSH support configuration first.
This configuration task is only necessary for SSH users using publickey authentication.
For each SSH user that uses publickey authentication to login, you must configure the clients DSA or
RSA host public key on the server, and configure the client to use the corresponding private key.
To configure the public key of an SSH client, you can:
z Configure it manually: You can input or copy the public key to the local host. The copied public key
must have not been converted and be in the distinguished encoding rules (DER) encoding format.
z Import it from the public key file: During the import process, the system will automatically convert
the public key to a string coded using the Public Key Cryptography Standards (PKCS). Before
importing the public key, you must upload the public key file (in binary) to the local host through
FTP or TFTP.
8-6
Follow these steps to import a public key from a public key file:
For information about client side public key configuration and the relevant commands, refer to Public
Key Configuration in the Security Volume.
This configuration allows you to create an SSH user and specify the service type and authentication
mode.
Follow these steps to configure an SSH user and specify the service type and authentication mode:
8-7
z A user without an SSH account can still pass password authentication and log into the server
through Stelnet or SFTP, as long as the user can pass AAA authentication and the service type is
SSH.
z An SSH server supports up to 1024 SSH users.
z The service type of an SSH user can be Stelnet (Secure Telnet) or SFTP (Secure FTP). For
information about Stelnet, refer to SSH2.0 Overview. For information about SFTP, refer to SFTP
Overview.
z For successful login through SFTP, you must set the user service type to sftp or all.
z As SSH1 does not support service type sftp, if the client uses SSH1 to log into the server, you
must set the service type to stelnet or all on the server. Otherwise, the client will fail to log in.
z The working folder of an SFTP user is subject to the user authentication method. For a user using
only password authentication, the working folder is the AAA authorized one. For a user using only
publickey authentication or using both the publickey and password authentication methods, the
working folder is the one set by using the ssh user command.
z The configured authentication method takes effect only for users logging in after the configuration.
8-8
Optional
Enable the SSH server to work ssh server compatible-ssh1x
with SSH1 clients enable By default, the SSH server can
work with SSH1 clients.
Optional
Set the RSA server key pair ssh server rekey-interval
update interval hours 0 by default, that is, the RSA
server key pair is not updated.
ssh server Optional
Set the SSH user
authentication-timeout
authentication timeout period 60 seconds by default
time-out-value
Authentication will fail if the number of authentication attempts (including both publickey and password
authentication) exceeds that specified in the ssh server authentication-retries command.
Task Remarks
Specifying a Source IP address/Interface for the SSH client Optional
Configuring Whether First-time Authentication is Supported Optional
Establishing a Connection Between the SSH Client and the Server Required
This configuration task allows you to specify a source IP address or interface for the client to access
the SSH server, improving service manageability.
8-9
Specify a source
ssh client source { ip ip-address | Required
Specify a IPv4 address or
interface interface-type
source IP interface for the By default, the
interface-number }
address or SSH client address of the
interface for interface decided
Specify a source by the routing is
the SSH ssh client ipv6 source { ipv6
IPv6 address or used to access
client ipv6-address | interface interface-type
interface for the the SSH server
interface-number }
SSH client
When the device connects to the SSH server as an SSH client, you can configure whether the device
supports first-time authentication.
z With first-time authentication, when an SSH client not configured with the server host public key
accesses the server for the first time, the user can continue accessing the server, and save the
host public key on the client. When accessing the server again, the client will use the saved server
host public key to authenticate the server.
z Without first-time authentication, a client not configured with the server host public key will deny to
access the server. To access the server, a user must configure in advance the server host public
key locally and specify the public key name for authentication.
For successful authentication of an SSH client not supporting first-time authentication, the server host
public key must be configured on the client and the public key name must be specified.
Follow these steps to disable first-time authentication:
8-10
Follow these steps to establish the connection between the SSH client and the server:
8-11
For information about the display public-key local and display public-key peer commands, refer to
Public Key Commands in the Security Volume.
Network requirements
z As shown in Figure 8-1, a local SSH connection is established between the host (the SSH client)
and the switch (the SSH server) for secure data exchange.
z Password authentication is required. The username and password are saved on the switch.
Figure 8-1 Switch acts as server for password authentication
Configuration procedure
# Configure an IP address for VLAN interface 1. This address will serve as the destination of the SSH
connection.
[Switch] interface vlan-interface 1
[Switch-Vlan-interface1] ip address 192.168.1.40 255.255.255.0
[Switch-Vlan-interface1] quit
8-12
# Create local user client001, and set the user command privilege level to 3
[Switch] local-user client001
[Switch-luser-client001] password simple aabbcc
[Switch-luser-client001] service-type ssh
[Switch-luser-client001] authorization-attribute level 3
[Switch-luser-client001] quit
# Specify the service type for user client001 as Stelnet, and the authentication mode as password.
This step is optional.
[Switch] ssh user client001 service-type stelnet authentication-type password
2) Configure the SSH client
There are many kinds of SSH client software, such as PuTTY, and OpenSSH. The following is an
example of configuring SSH client using Putty Version 0.58.
8-13
In the window shown in Figure 8-2, click Open. If the connection is normal, you will be prompted to
enter the username and password. After entering the correct username (client001) and password
(aabbcc), you can enter the configuration interface.
Network requirements
z As shown in Figure 8-3, a local SSH connection is established between the host (the SSH client)
and the switch (the SSH server) for secure data exchange.
z Publickey authentication is used, the algorithm is RSA.
Figure 8-3 Switch acts as server for publickey authentication
Host Switch
Configuration procedure
8-14
# Configure an IP address for VLAN interface 1. This address will serve as the destination of the SSH
connection.
[Switch] interface vlan-interface 1
[Switch-Vlan-interface1] ip address 192.168.1.40 255.255.255.0
[Switch-Vlan-interface1] quit
Before performing the following tasks, you must use the client software to generate an RSA key pair on
the client, save the public key in a file named key.pub, and then upload the file to the SSH server
through FTP or TFTP. For details, refer to Configure the SSH client below.
# Import the clients public key from file key.pub and name it Switch001.
[Switch] public-key peer Switch001 import sshkey key.pub
# Specify the authentication type for user client002 as publickey, and assign the public key Switch001
to the user.
[Switch] ssh user client002 service-type stelnet authentication-type publickey assign
publickey Switch001
2) Configure the SSH client
# Generate an RSA key pair.
Run PuTTYGen.exe, select SSH-2 RSA and click Generate.
8-15
While generating the key pair, you must move the mouse continuously and keep the mouse off the
green process bar shown in Figure 8-5. Otherwise, the process bar stops moving and the key pair
generating process will be stopped.
8-16
After the key pair is generated, click Save public key and specify the file name as key.pub to save the
public key.
Figure 8-6 Generate a client key pair 3)
8-17
After generating a key pair on a client, you need to transmit the saved public key file to the server
through FTP or TFTP and have the configuration on the server done before continuing configuration of
the client.
# Specify the private key file and establish a connection with the SSH server
Launch PuTTY.exe to enter the following interface. In the Host Name (or IP address) text box, enter
the IP address of the server (192.168.1.40).
Figure 8-8 SSH client configuration interface 1)
8-18
In the window shown in Figure 8-9, click Open. If the connection is normal, you will be prompted to
enter the username. After entering the correct username (client002), you can enter the configuration
interface.
Network requirements
z As shown in Figure 8-10, Switch A (the SSH client) needs to log into Switch B (the SSH server)
through the SSH protocol.
z The username of the SSH client is client001 and the password is aabbcc. Password
authentication is required.
Figure 8-10 Switch acts as client for password authentication
Configuration procedure
8-19
# Create an IP address for VLAN interface 1, which the SSH client will use as the destination for SSH
connection.
[SwitchB] interface vlan-interface 1
[SwitchB-Vlan-interface1] ip address 10.165.87.136 255.255.255.0
[SwitchB-Vlan-interface1] quit
# Specify the service type for user client001 as Stelnet, and the authentication type as password.
This step is optional.
[SwitchB] ssh user client001 service-type stelnet authentication-type password
2) Configure the SSH client
# Configure an IP address for VLAN interface 1.
<SwitchA> system-view
[SwitchA] interface vlan-interface 1
[SwitchA-Vlan-interface1] ip address 10.165.87.137 255.255.255.0
[SwitchA-Vlan-interface1] quit
[SwitchA] quit
z If the client support first-time authentication, you can directly establish a connection from the client
to the server.
# Establish an SSH connection to server 10.165.87.136.
<SwitchA> ssh2 10.165.87.136
Username: client001
Trying 10.165.87.136 ...
Press CTRL+K to abort
Connected to 10.165.87.136 ...
8-20
# Configure the host public key of the SSH server. You can get the server host public key by using the
display public-key local dsa public command on the server.
[SwitchA] public-key peer key1
[SwitchA-pkey-public-key] public-key-code begin
[SwitchA-pkey-key-code]308201B73082012C06072A8648CE3804013082011F0281810
0D757262C4584C44C211F18BD96E5F0
[SwitchA-pkey-key-code]61C4F0A423F7FE6B6B85B34CEF72CE14A0D3A5222FE08CECE
65BE6C265854889DC1EDBD13EC8B274
[SwitchA-pkey-key-code]DA9F75BA26CCB987723602787E922BA84421F22C3C89CB9B0
6FD60FE01941DDD77FE6B12893DA76E
[SwitchA-pkey-key-code]EBC1D128D97F0678D7722B5341C8506F358214B16A2FAC4B3
68950387811C7DA33021500C773218C
[SwitchA-pkey-key-code]737EC8EE993B4F2DED30F48EDACE915F0281810082269009E
14EC474BAF2932E69D3B1F18517AD95
[SwitchA-pkey-key-code]94184CCDFCEAE96EC4D5EF93133E84B47093C52B20CD35D02
492B3959EC6499625BC4FA5082E22C5
[SwitchA-pkey-key-code]B374E16DD00132CE71B020217091AC717B612391C76C1FB2E
88317C1BD8171D41ECB83E210C03CC9
[SwitchA-pkey-key-code]B32E810561C21621C73D6DAAC028F4B1585DA7F42519718CC
9B09EEF0381840002818000AF995917
[SwitchA-pkey-key-code]E1E570A3F6B1C2411948B3B4FFA256699B3BF871221CC9C5D
F257523777D033BEE77FC378145F2AD
[SwitchA-pkey-key-code]D716D7DB9FCABB4ADBF6FB4FDB0CA25C761B308EF53009F71
01F7C62621216D5A572C379A32AC290
[SwitchA-pkey-key-code]E55B394A217DA38B65B77F0185C8DB8095522D1EF044B465E
8716261214A5A3B493E866991113B2D
[SwitchA-pkey-key-code]485348
[SwitchA-pkey-key-code] public-key-code end
[SwitchA-pkey-public-key] peer-public-key end
# Specify the host public key for the SSH server (10.165.87.136) as key1.
[SwitchA] ssh client authentication server 10.165.87.136 assign publickey key1
[SwitchA] quit
After you enter the correct username and password, you can log into Switch B successfully.
8-21
Network requirements
z As shown in Figure 8-11, Switch A (the SSH client) needs to log into Switch B (the SSH server)
through the SSH protocol.
z Publickey authentication is used, and the public key algorithm is DSA.
Figure 8-11 Switch acts as client for publickey authentication
Configuration procedure
# Configure an IP address for VLAN interface 1, which the SSH client will use as the destination for
SSH connection.
[SwitchB] interface vlan-interface 1
[SwitchB-Vlan-interface1] ip address 10.165.87.136 255.255.255.0
[SwitchB-Vlan-interface1] quit
Before performing the following tasks, you must use the client software to generate an RSA key pair on
the client, save the public key in a file named key.pub, and then upload the file to the SSH server
through FTP or TFTP. For details, refer to Configure the SSH client below.
8-22
After generating a key pair on a client, you need to transmit the saved public key file to the server
through FTP or TFTP and have the configuration on the server done before continuing configuration of
the client.
Later, you will find that you have logged into Switch B successfully.
8-23
When configuring SFTP, go to these sections for information you are interested in:
z SFTP Overview
z Configuring an SFTP Server
z Configuring an SFTP Client
z SFTP Client Configuration Example
z SFTP Server Configuration Example
SFTP Overview
The secure file transfer protocol (SFTP) is a new feature in SSH2.0.
SFTP uses the SSH connection to provide secure data transfer. The device can serve as the SFTP
server, allowing a remote user to log into the SFTP server for secure file management and transfer.
The device can also server as an SFTP client, enabling a user to login from the device to a remote
device for secure file transfer.
z You have configured the SSH server. For the detailed configuration procedure, refer to
Configuring the Device as an SSH Server.
z You have used the ssh user service-type command to set the service type of SSH users to sftp or
all. For configuration procedure, refer to Configuring an SSH User.
This configuration task is to enable the SFTP service so that a client can log into the SFTP server
through SFTP.
Follow these steps to enable the SFTP server:
9-1
Once the idle period of an SFTP connection exceeds the specified threshold, the system automatically
tears the connection down, so that a user cannot occupy a connection for nothing.
Follow these steps to configure the SFTP connection idle timeout period:
You can configure a client to use only a specified source IP address or interface to access the SFTP
server, thus enhancing the service manageability.
Follow these steps to specify a source IP address or interface for the SFTP client:
This configuration task is to enable the SFTP client to establish a connection with the remote SFTP
server and enter SFTP client view.
Follow these steps to enable the SFTP client:
9-2
9-3
This configuration task is to display a list of all commands or the help information of an SFTP client
command, such as the command format and parameters.
9-4
Follow these steps to terminate the connection to the remote SFTP server:
As shown in Figure 9-1, an SSH connection is established between Switch A and Switch B. Switch A,
an SFTP client, logs in to Switch B for file management and file transfer. An SSH user uses publickey
authentication with the public key algorithm being RSA.
Figure 9-1 Network diagram for SFTP client configuration
9-5
# Configure an IP address for VLAN interface 1, which the SSH client uses as the destination for SSH
connection.
[SwitchB] interface vlan-interface 1
[SwitchB-Vlan-interface1] ip address 192.168.0.1 255.255.255.0
[SwitchB-Vlan-interface1] quit
Before performing the following tasks, you must generate use the client software to generate RSA key
pairs on the client, save the host public key in a file named pubkey, and then upload the file to the
SSH server through FTP or TFTP. For details, refer to Configure the SFTP client (Switch A) below.
# For user client001, set the service type as SFTP, authentication type as publickey, public key as
Switch001, and working folder as flash:/
[SwitchB] ssh user client001 service-type sftp authentication-type publickey assign publickey
Switch001 work-directory flash:/
2) Configure the SFTP client (Switch A)
# Configure an IP address for VLAN interface 1.
<SwitchA> system-view
[SwitchA] interface vlan-interface 1
[SwitchA-Vlan-interface1] ip address 192.168.0.2 255.255.255.0
[SwitchA-Vlan-interface1] quit
9-6
After generating key pairs on a client, you need to transmit the saved public key file to the server
through FTP or TFTP and have the configuration on the server done before continuing configuration of
the client.
# Establish a connection to the remote SFTP server and enter SFTP client view.
<SwitchA> sftp 192.168.0.1 identity-key rsa
Input Username: client001
Trying 192.168.0.1 ...
Press CTRL+K to abort
Connected to 192.168.0.1 ...
sftp-client>
# Display files under the current directory of the server, delete the file named z, and check if the file has
been deleted successfully.
sftp-client> dir
-rwxrwxrwx 1 noone nogroup 1759 Aug 23 06:52 config.cfg
-rwxrwxrwx 1 noone nogroup 225 Aug 24 08:01 pubkey2
-rwxrwxrwx 1 noone nogroup 283 Aug 24 07:39 pubkey
drwxrwxrwx 1 noone nogroup 0 Sep 01 06:22 new
-rwxrwxrwx 1 noone nogroup 225 Sep 01 06:55 pub
-rwxrwxrwx 1 noone nogroup 0 Sep 01 08:00 z
sftp-client> delete z
The following File will be deleted:
/z
Are you sure to delete it? [Y/N]:y
This operation may take a long time.Please wait...
# Add a directory named new1 and check if it has been created successfully.
9-7
# Rename directory new1 to new2 and check if the directory has been renamed successfully.
sftp-client> rename new1 new2
File successfully renamed
sftp-client> dir
-rwxrwxrwx 1 noone nogroup 1759 Aug 23 06:52 config.cfg
-rwxrwxrwx 1 noone nogroup 225 Aug 24 08:01 pubkey2
-rwxrwxrwx 1 noone nogroup 283 Aug 24 07:39 pubkey
drwxrwxrwx 1 noone nogroup 0 Sep 01 06:22 new
-rwxrwxrwx 1 noone nogroup 225 Sep 01 06:55 pub
drwxrwxrwx 1 noone nogroup 0 Sep 02 06:33 new2
# Download the file pubkey2 from the server and change the name to public.
sftp-client> get pubkey2 public
Remote file:/pubkey2 ---> Local file: public
Downloading file successfully ended
# Upload the local file pu to the server, save it as puk, and check if the file has been uploaded
successfully.
sftp-client> put pu puk
Local file:pu ---> Remote file: /puk
Uploading file successfully ended
sftp-client> dir
-rwxrwxrwx 1 noone nogroup 1759 Aug 23 06:52 config.cfg
-rwxrwxrwx 1 noone nogroup 225 Aug 24 08:01 pubkey2
-rwxrwxrwx 1 noone nogroup 283 Aug 24 07:39 pubkey
drwxrwxrwx 1 noone nogroup 0 Sep 01 06:22 new
drwxrwxrwx 1 noone nogroup 0 Sep 02 06:33 new2
-rwxrwxrwx 1 noone nogroup 283 Sep 02 06:35 pub
-rwxrwxrwx 1 noone nogroup 283 Sep 02 06:36 puk
sftp-client>
9-8
As shown in Figure 9-2, an SSH connection is established between the host and the switch. The host,
an SFTP client, logs into the switch for file management and file transfer. An SSH user uses password
authentication with the username being client002 and the password being aabbcc. The username
and password are saved on the switch.
Figure 9-2 Network diagram for SFTP server configuration
Configuration procedure
# Configure an IP address for VLAN-interface 1, which the client will use as the destination for SSH
connection.
[Switch] interface vlan-interface 1
[Switch-Vlan-interface1] ip address 192.168.1.45 255.255.255.0
[Switch-Vlan-interface1] quit
# Configure a local user named client002 with the password being aabbcc and the service type being
SSH.
[Switch] local-user client002
[Switch-luser-client002] password simple aabbcc
[Switch-luser-client002] service-type ssh
[Switch-luser-client002] quit
# Configure the user authentication type as password and service type as SFTP.
[Switch] ssh user client002 service-type sftp authentication-type password
2) Configure the SFTP client
9-9
Enter username client002 and password aabbcc as prompted to log into the SFTP server.
Figure 9-3 SFTP client interface
9-10
When configuring PKI, go to these sections for information you are interested in:
z Introduction to PKI
z PKI Configuration Task List
z Displaying and Maintaining PKI
z PKI Configuration Examples
z Troubleshooting PKI
Introduction to PKI
This section covers these topics:
z PKI Overview
z PKI Terms
z Architecture of PKI
z Applications of PKI
z Operation of PKI
PKI Overview
The Public Key Infrastructure (PKI) is a general security infrastructure for providing information
security through public key technologies.
PKI, also called asymmetric key infrastructure, uses a key pair to encrypt and decrypt the data. The
key pair consists of a private key and a public key. The private key must be kept secret while the public
key needs to be distributed. Data encrypted by one of the two keys can only be decrypted by the other.
A key problem of PKI is how to manage the public keys. Currently, PKI employs the digital certificate
mechanism to solve this problem. The digital certificate mechanism binds public keys to their owners,
helping distribute public keys in large networks securely.
With digital certificates, the PKI system provides network communication and e-commerce with
security services such as user authentication, data non-repudiation, data confidentiality, and data
integrity.
PKI Terms
Digital certificate
A digital certificate is a file signed by a certificate authority (CA) for an entity. It includes mainly the
identity information of the entity, the public key of the entity, the name and signature of the CA, and the
validity period of the certificate, where the signature of the CA ensures the validity and authority of the
certificate. A digital certificate must comply with the international standard of ITU-T X.509. Currently,
the most common standard is X.509 v3.
This manual involves two types of certificates: local certificate and CA certificate. A local certificate is a
digital certificate signed by a CA for an entity, while a CA certificate is the certificate of a CA. If multiple
CAs are trusted by different users in a PKI system, the CAs will form a CA tree with the root CA at the
10-1
CRL
An existing certificate may need to be revoked when, for example, the user name changes, the private
key leaks, or the user stops the business. Revoking a certificate is to remove the binding of the public
key with the user identity information. In PKI, the revocation is made through certificate revocation lists
(CRLs). Whenever a certificate is revoked, the CA publishes one or more CRLs to show all certificates
that have been revoked. The CRLs contain the serial numbers of all revoked certificates and provide
an effective way for checking the validity of certificates.
A CA may publish multiple CRLs when the number of revoked certificates is so large that publishing
them in a single CRL may degrade network performance, and it uses CRL distribution points to
indicate the URLs of these CRLs.
CA policy
A CA policy is a set of criteria that a CA follows in processing certificate requests, issuing and revoking
certificates, and publishing CRLs. Usually, a CA advertises its policy in the form of certification practice
statement (CPS). A CA policy can be acquired through out-of-band means such as phone, disk, and
e-mail. As different CAs may use different methods to check the binding of a public key with an entity,
make sure that you understand the CA policy before selecting a trusted CA for certificate request.
Architecture of PKI
A PKI system consists of entities, a CA, a registration authority (RA) and a PKI repository, as shown in
Figure 10-1.
Figure 10-1 PKI architecture
Entity
An entity is an end user of PKI products or services, such as a person, an organization, a device like a
router or a switch, or a process running on a computer.
10-2
A CA is a trusted authority responsible for issuing and managing digital certificates. A CA issues
certificates, specifies the validity periods of certificates, and revokes certificates as needed by
publishing CRLs.
RA
PKI repository
A PKI repository can be a Lightweight Directory Access Protocol (LDAP) server or a common database.
It stores and manages information like certificate requests, certificates, keys, CRLs and logs while
providing a simple query function.
LDAP is a protocol for accessing and managing PKI information. An LDAP server stores user
information and digital certificates from the RA server and provides directory navigation service. From
an LDAP server, an entity can retrieve local and CA certificates of its own as well as certificates of
other entities.
Applications of PKI
The PKI technology can satisfy the security requirements of online transactions. As an infrastructure,
PKI has a wide range of applications. Here are some application examples.
VPN
A virtual private network (VPN) is a private data communication network built on the public
communication infrastructure. A VPN can leverage network layer security protocols (for instance,
IPSec) in conjunction with PKI-based encryption and digital signature technologies for confidentiality.
Secure E-mail
E-mails require confidentiality, integrity, authentication, and non-repudiation. PKI can address these
needs. The secure E-mail protocol that is currently developing rapidly is Secure/Multipurpose Internet
Mail Extensions (S/MIME), which is based on PKI and allows for transfer of encrypted mails with
signature.
Web security
For Web security, two peers can establish a Secure Sockets Layer (SSL) connection first for
transparent and secure communications at the application layer. With PKI, SSL enables encrypted
communications between a browser and a server. Both the communication parties can verify the
identity of each other through digital certificates.
Operation of PKI
In a PKI-enabled network, an entity can request a local certificate from the CA and the device can
check the validity of certificates. Here is how it works:
1) An entity submits a certificate request to the RA.
10-3
Task Remarks
Configuring an Entity DN Required
Configuring a PKI Domain Required
Submitting a Certificate
Submitting a PKI Certificate Request in Auto Mode Required
Request Submitting a Certificate Use either approach
Request in Manual Mode
Retrieving a Certificate Manually Optional
Configuring PKI Certificate Optional
Destroying a Local RSA Key Pair Optional
Deleting a Certificate Optional
Configuring an Access Control Policy Optional
Configuring an Entity DN
A certificate is the binding of a public key and the identity information of an entity, where the identity
information is identified by an entity distinguished name (DN). A CA identifies a certificate applicant
uniquely by entity DN.
An entity DN is defined by these parameters:
z Common name of the entity.
z Country code of the entity, a standard 2-character code. For example, CN represents China and
US represents the United States of America.
z Fully qualified domain name (FQDN) of the entity, a unique identifier of an entity on the network. It
consists of a host name and a domain name and can be resolved to an IP address. For example,
www.whatever.com is an FQDN, where www is a host name and whatever.com a domain name.
z IP address of the entity.
z Locality where the entity resides.
z Organization to which the entity belongs.
z Unit of the entity in the organization.
z State where the entity resides.
10-4
10-5
Required
Create a PKI domain and enter
pki domain domain-name No PKI domain exists by
its view
default.
Required
Specify the trusted CA ca identifier name No trusted CA is specified by
default.
10-6
10-7
In auto mode, an entity automatically requests a certificate through the SCEP protocol when it has no
local certificate or the present certificate is about to expire.
Follow these steps to configure an entity to submit a certificate request in auto mode:
In manual mode, you need to retrieve a CA certificate, generate a local RSA key pair, and submit a
local certificate request for an entity.
The goal of retrieving a CA certificate is to verify the authenticity and validity of a local certificate.
Generating an RSA key pair is an important step in certificate request. The key pair includes a public
key and a private key. The private key is kept by the user, while the public key is transferred to the CA
along with some other information. For detailed information about RSA key pair configuration, refer to
Public Key Configuration in the Security Volume.
Follow these steps to submit a certificate request in manual mode:
pki request-certificate
Submit a local certificate domain domain-name
Required
request manually [ password ] [ pkcs10
[ filename filename ] ]
10-8
10-9
10-10
Required
Disable CRL checking crl check disable
Enabled by default
z The CRL update period refers to the interval at which the entity downloads CRLs from the CRL
server. The CRL update period configured manually is prior to that specified in the CRLs.
z The pki retrieval-crl domain configuration will not be saved in the configuration file.
z Currently, the URL of the CRL distribution point does not support domain name resolving.
For details about the public-key local destroy command, refer to Public Key Commands in the
Security Volume.
Deleting a Certificate
When a certificate requested manually is about to expire or you want to request a new certificate, you
can delete the current local certificate or CA certificate.
Follow these steps to delete a certificate:
10-11
10-12
z The SCEP plug-in is required when you use the Windows Server as the CA. In this case, when
configuring the PKI domain, you need to use the certificate request from ra command to specify
that the entity requests a certificate from an RA.
z The SCEP plug-in is not required when RSA Keon is used. In this case, when configuring a PKI
domain, you need to use the certificate request from ca command to specify that the entity
requests a certificate from a CA.
Network requirements
Configuration procedure
10-13
# Configure the URL of the registration server in the format of http://host:port/Issuing Jurisdiction ID,
where Issuing Jurisdiction ID is a hexadecimal string generated on the CA server.
[Switch-pki-domain-torsa] certificate request url
http://4.4.4.133:446/c95e970f632d27be5e8cbf80e971d9c4a9a93337
10-14
10-15
You can also use some other display commands to view detailed information about the CA certificate
and CRLs. Refer to the parts related to display pki certificate ca domain and display pki crl
domain commands in PKI Commands of the Security Volume.
The CA server runs the Windows 2003 server in this configuration example.
Network requirements
Configure PKI entity Switch to request a local certificate from the CA server.
10-16
Configuration procedure
10-17
10-18
1.3.6.1.4.1.311.20.2:
.0.I.P.S.E.C.I.n.t.e.r.m.e.d.i.a.t.e.O.f.f.l.i.n.e
Signature Algorithm: sha1WithRSAEncryption
81029589 7BFA1CBD 20023136 B068840B
(Omitted)
You can also use some other display commands to view detailed information about the CA certificate.
Refer to the display pki certificate ca domain command in PKI Commands of the Security Volume.
10-19
Network requirements
z The client accesses the remote HTTP Security (HTTPS) server through the HTTPS protocol.
z SSL is configured to ensure that only legal clients log into the HTTPS server.
z Create a certificate attribute-based access control policy to control access to the HTTPS server.
Figure 10-4 Configure a certificate attribute-based access control policy
Configuration procedure
z For detailed information about SSL configuration, refer to SSL Configuration in the Security
Volume.
z For detailed information about HTTPS configuration, refer to HTTP Configuration in the System
Volume.
z The PKI domain to be referenced by the SSL policy must be created in advance. For detailed
configuration of the PKI domain, refer to Configure the PKI domain.
10-20
# Apply the certificate attribute-based access control policy of myacp to HTTPS service.
[Switch] ip https certificate access-control-policy myacp
Troubleshooting PKI
Failed to Retrieve a CA Certificate
Symptom
Analysis
Solution
10-21
Symptom
Analysis
Solution
Symptom
Analysis
Solution
10-22
When configuring SSL, go to these sections for information you are interested in:
z SSL Overview
z SSL Configuration Task List
z Displaying and Maintaining SSL
z Troubleshooting SSL
SSL Overview
Secure Sockets Layer (SSL) is a security protocol providing secure connection service for TCP-based
application layer protocols, for example, HTTP protocol. It is widely used in E-business and online
bank fields to provide secure data transmission over the Internet.
11-1
As shown in Figure 11-2, the SSL protocol consists of two layers of protocols: the SSL record protocol
at the lower layer and the SSL handshake protocol, change cipher spec protocol, and alert protocol at
the upper layer.
Figure 11-2 SSL protocol stack
z SSL handshake protocol: As a very important part of the SSL protocol stack, it is responsible for
negotiating the cipher suite to be used during communication (including the symmetric encryption
algorithm, key exchange algorithm, and MAC algorithm), exchanging the key between the server
and client, and implementing identity authentication of the server and client. Through the SSL
handshake protocol, a session is established between a client and the server. A session consists
of a set of parameters, including the session ID, peer certificate, cipher suite, and master secret.
z SSL change cipher spec protocol: Used for notification between a client and the server that the
subsequent packets are to be protected and transmitted based on the newly negotiated cipher
suite and key.
z SSL alert protocol: Allowing a client and the server to send alert messages to each other. An alert
message contains the alert severity level and a description.
z SSL record protocol: Fragmenting and compressing data to be transmitted, calculating and adding
MAC to the data, and encrypting the data before transmitting it to the peer end.
Task Remarks
Configuring an SSL Server Policy Required
Configuring an SSL Client Policy Optional
11-2
Configuration Prerequisites
When configuring an SSL server policy, you need to specify the PKI domain to be used for obtaining
the server side certificate. Therefore, before configuring an SSL server policy, you must configure a
PKI domain. For details about PKI domain configuration, refer to PKI Configuration in the Security
Volume.
Configuration Procedure
11-3
Network requirements
In this instance, Windows Server works as the CA and the Simple Certificate Enrollment Protocol
(SCEP) plug-in is installed on the CA.
Configuration procedure
z For details about PKI configuration commands, refer to PKI Commands in the Security Volume.
z For details about the public-key local create rsa command, refer to Public Key Commands in the
Security Volume.
z For details about HTTPS, refer to HTTP Configuration in the System Volume.
11-5
If the SSL server is configured to authenticate the SSL client, when configuring the SSL client policy,
you need to specify the PKI domain to be used for obtaining the certificate of the client. Therefore,
before configuring an SSL client policy, you must configure a PKI domain. For details about PKI
domain configuration, refer to PKI Configuration in the Security Volume.
Configuration Procedure
If you enable client authentication on the server, you must request a local certificate for the client.
Troubleshooting SSL
SSL Handshake Failure
Symptom
As the SSL server, the device fails to handshake with the SSL client.
11-6
Solution
1) You can issue the debugging ssl command and view the debugging information to locate the
problem:
z If the SSL server has no certificate, request one for it.
z If the server certificate cannot be trusted, install on the SSL client the root certificate of the CA that
issues the local certificate to the SSL server, or let the server requests a certificate from the CA
that the SSL client trusts.
z If the SSL server is configured to authenticate the client, but the certificate of the SSL client does
not exist or cannot be trusted, request and install a certificate for the client.
2) You can use the display ssl server-policy command to view the cipher suite used by the SSL
server policy. If the cipher suite used by the SSL server does not match that used by the client,
use the ciphersuite command to modify the cipher suite of the SSL server.
11-7
When configuring public keys, go to these sections for information you are interested in:
z Asymmetric Key Algorithm Overview
z Configuring the Local Asymmetric Key Pair
z Configuring the Public Key of a Peer
z Displaying and Maintaining Public Keys
z Public Key Configuration Examples
As shown in Figure 12-1, the information is encrypted before being sent for confidentiality. The cipher
text is transmitted in the network, and then is decrypted by the receiver to obtain the original pain text.
Figure 12-1 Encryption and decryption
There are two types of key algorithms, based on whether the keys for encryption and decryption are
the same:
z Symmetric key algorithm: The same key is used for both encryption and decryption. Commonly
used symmetric key algorithms include Advanced Encryption Standard (AES) and Data
Encryption Standard (DES).
z Asymmetric key algorithm: Both ends have their own key pair, consisting of a private key and a
public key. The private key is kept secret while the public key may be distributed widely. The
information encrypted with the public key/private key can be decrypted only with the
corresponding private key/public key; however, the private key cannot be practically derived from
the public key.
12-1
Asymmetric key algorithms can be used for encryption/decryption and digital signature:
z Encryption/decryption: The information encrypted with a receiver's public key can be decrypted by
the receiver possessing the corresponding private key. This is used to ensure confidentiality.
z Digital signature: The information encrypted with a sender's private key can be decrypted by
anyone who has access to the sender's public key, thereby proving that the information is from the
sender and has not been tampered with. For example, user 1 adds a signature to the data using
the private key, and then sends the data to user 2. User 2 verifies the signature using the public
key of user 1. If the signature is correct, the data is considered from user 1.
Revest-Shamir-Adleman Algorithm (RSA), and Digital Signature Algorithm (DSA) are all asymmetric
key algorithms. RSA can be used for data encryption/decryption and signature, whereas DSA are used
for signature only.
Asymmetric key algorithms are usually used in digital signature applications for peer identity
authentication because they involve complex calculations and are time-consuming; symmetric key
algorithms are often used to encrypt/decrypt data for security.
12-2
You can display the local RSA or DSA host public key on the screen or export it to a specified file, so as
to configure the local RSA or DSA host public key on the remote end.
Follow these steps to display or export the local RSA or DSA host public key:
Display the local RSA host public key public-key local export rsa
on the screen in a specified format, or { openssh | ssh1 | ssh2 } Select a command
export it to a specified file [ filename ] according to the
Display the local DSA host public key type of the key to
public-key local export dsa be exported.
on the screen in a specified format, or
{ openssh | ssh2 } [ filename ]
export it to a specified file
An asymmetric key pair may expire or leak. In this case, you need to destroy it and generate a new
pair.
Follow these steps to destroy an asymmetric key pair:
z If you choose to input the public key, the public key must be in a correct format. The key data
displayed by the display public-key local public command can be used to meet the format
requirements. The public key displayed in other methods may not meet the format requirements,
and the format-incompliant key cannot be saved. Thus, you are recommended to configure the
public key of the peer by importing it from a public key file.
z The device supports up to 20 host pubic keys of peers.
Required
Configure a public key of the Spaces and carriage returns
Type or copy the key
peer are allowed between
characters.
Return to public key view public-key-code end When you exit public key code
view, the system automatically
saves the public key.
Return to system view peer-public-key end
Follow these steps to import the host public key of a peer from the public key file:
12-4
Network requirements
Device A is authenticated by Device B when accessing Device B, so the public key of Device A should
be configured on Device B in advance.
In this example:
z RSA is used.
z The host public key of Device A is configured manually on Device B.
Figure 12-2 Network diagram for manually configuring the public key of a peer
Configuration procedure
1) Configure Device A
# Create RSA key pairs on Device A.
<DeviceA> system-view
[DeviceA] public-key local create rsa
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
It will take a few minutes.
Press CTRL+C to abort.
Input the bits of the modulus[default = 1024]:
Generating Keys...
++++++
++++++
++++++++
++++++++
=====================================================
Time of Key pair created: 09:50:06 2007/08/07
Key name: HOST_KEY
Key type: RSA Encryption Key
=====================================================
Key code:
30819F300D06092A864886F70D010101050003818D0030818902818100D90003FA95F5A44A2A2CD3F814F985
4C4421B57CAC64CFFE4782A87B0360B600497D87162D1F398E6E5E51E5E353B3A9AB16C9E766BD995C669A78
4AD597D0FB3AA9F7202C507072B19C3C50A0D7AD3994E14ABC62DB125035EA326470034DC078B2BAA3BC3BCA
80AAB5EE01986BD1EF64B42F17CCAE4A77F1EF999B2BF9C4A10203010001
12-5
=====================================
Key Name : devicea
Key Type : RSA
Key Module: 1024
=====================================
Key Code:
30819F300D06092A864886F70D010101050003818D0030818902818100D90003FA95F5A44A2A2CD3F814F985
4C4421B57CAC64CFFE4782A87B0360B600497D87162D1F398E6E5E51E5E353B3A9AB16C9E766BD995C669A78
4AD597D0FB3AA9F7202C507072B19C3C50A0D7AD3994E14ABC62DB125035EA326470034DC078B2BAA3BC3BCA
80AAB5EE01986BD1EF64B42F17CCAE4A77F1EF999B2BF9C4A10203010001
Network requirements
Device A is authenticated when accessing Device B, so the public host public key of Device A should
be configured on Device B in advance.
In this example:
z RSA is used.
12-6
Configurtion procedure
1) Create key pairs on Device A and export the host public key
# Create RSA key pairs on Device A.
<DeviceA> system-view
[DeviceA] public-key local create rsa
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
It will take a few minutes.
Press CTRL+C to abort.
Input the bits of the modulus[default = 1024]:
Generating Keys...
++++++
++++++
++++++++
++++++++
=====================================================
Time of Key pair created: 09:50:06 2007/08/07
Key name: HOST_KEY
Key type: RSA Encryption Key
=====================================================
Key code:
30819F300D06092A864886F70D010101050003818D0030818902818100D90003FA95F5A44A2A2CD3F814F985
4C4421B57CAC64CFFE4782A87B0360B600497D87162D1F398E6E5E51E5E353B3A9AB16C9E766BD995C669A78
4AD597D0FB3AA9F7202C507072B19C3C50A0D7AD3994E14ABC62DB125035EA326470034DC078B2BAA3BC3BCA
80AAB5EE01986BD1EF64B42F17CCAE4A77F1EF999B2BF9C4A10203010001
=====================================================
Time of Key pair created: 09:50:07 2007/08/07
Key name: SERVER_KEY
Key type: RSA Encryption Key
=====================================================
Key code:
307C300D06092A864886F70D0101010500036B003068026100999089E7AEE9802002D9EB2D0433B87BB6158E
35000AFB3FF310E42F109829D65BF70F7712507BE1A3E0BC5C2C03FAAF00DFDDC63D004B4490DACBA3CFA9E8
4B9151BDC7EECE1C8770D961557D192DE2B36CAF9974B7B293363BB372771C2C1F0203010001
12-7
=====================================
Key Name : devicea
Key Type : RSA
Key Module: 1024
=====================================
Key Code:
30819F300D06092A864886F70D010101050003818D0030818902818100D90003FA95F5A44A2A2CD3F814F985
4C4421B57CAC64CFFE4782A87B0360B600497D87162D1F398E6E5E51E5E353B3A9AB16C9E766BD995C669A78
4AD597D0FB3AA9F7202C507072B19C3C50A0D7AD3994E14ABC62DB125035EA326470034DC078B2BAA3BC3BCA
80AAB5EE01986BD1EF64B42F17CCAE4A77F1EF999B2BF9C4A10203010001
12-8
In order to filter traffic, network devices use sets of rules, called access control lists (ACLs), to identify
and handle packets.
When configuring ACLs, go to these chapters for information you are interested in:
z ACL Overview
z IPv4 ACL Configuration
z IPv6 ACL Configuration
z ACL Application for Packet Filtering
Unless otherwise stated, ACLs refer to both IPv4 ACLs and IPv6 ACLs throughout this document.
Introduction to ACL
Introduction
As network scale and network traffic are increasingly growing, network security and bandwidth
allocation become more and more critical to network management. Packet filtering can be used to
efficiently prevent illegal users from accessing networks and to control network traffic and save
network resources. Access control lists (ACL) are often used to filter packets with configured matching
rules.
ACLs are sets of rules (or sets of permit or deny statements) that decide what packets can pass and
what should be rejected based on matching criteria such as source MAC address, destination MAC
address, source IP address, destination IP address, and port number.
13-1
z When an ACL is assigned to a piece of hardware and referenced by a QoS policy for traffic
classification, the switch does not take action according to the traffic behavior definition on a
packet that does not match the ACL.
z When an ACL is referenced by a piece of software to control Telnet, SNMP, and Web login users,
the switch denies all packets that do not match the ACL.
IPv4 ACLs, identified by ACL numbers, fall into three categories, as shown in Table 13-1.
When creating an IPv4 ACL, you can specify a unique name for it. Afterwards, you can identify the ACL
by its name.
An IPv4 ACL can have only one name. Whether to specify a name for an ACL is up to you. After
creating an ACL, you cannot specify a name for it, nor can you change or remove its name.
13-2
An ACL may consist of multiple rules, which specify different matching criteria. These criteria may have
overlapping or conflicting parts. The match order is for determining how packets should be matched
against the rules.
Two match orders are available for IPv4 ACLs:
z config: Packets are compared against ACL rules in the order the rules are configured.
z auto: Packets are compared against ACL rules in the depth-first match order.
The term depth-first match has different meanings for different types of ACLs:
The following shows how your device performs depth-first match in a basic IPv4 ACL:
1) Sort rules by VPN instance first and compare packets against the rule configured with a VPN
instance.
2) In case of a tie, sort rules by source IP address wildcard and compare packets against the rule
configured with more zeros in the source IP address wildcard.
3) If two rules are present with the same number of zeros in their source IP address wildcards,
compare packets against the rule configured first.
The following shows how your device performs depth-first match in an advanced IPv4 ACL:
1) Sort rules by VPN instance first and compare packets against the rule configured with a VPN
instance.
2) In case of a tie, look at the protocol carried over IP. A rule with no limit to the protocol type (that is,
configured with the ip keyword) has the lowest precedence. Rules each of which has a single
specified protocol type are of the same precedence level.
3) If the protocol types have the same precedence, look at the source IP address wildcards. Then,
compare packets against the rule configured with more zeros in the source IP address wildcard.
4) If the numbers of zeros in the source IP address wildcards are the same, look at the destination IP
address wildcards. Then, compare packets against the rule configured with more zeros in the
destination IP address wildcard.
5) If the numbers of zeros in the destination IP address wildcards are the same, look at the Layer 4
port number ranges, namely the TCP/UDP port number ranges. Then compare packets against
the rule configured with the smaller port number range.
6) If the port number ranges are the same, compare packets against the rule configured first.
The following shows how your device performs depth-first match in an Ethernet frame header ACL:
13-3
The step defines the difference between two neighboring numbers that are automatically assigned to
ACL rules by the device. For example, with a step of 5, rules are automatically numbered 0, 5, 10, 15,
and so on. By default, the step is 5.
Whenever the step changes, the rules are renumbered, starting from 0. For example, if four rules are
numbered 5, 10, 15, and 20 respectively, changing the step from 5 to 2 will cause the rules to be
renumbered 0, 2, 4, and 6.
With the step and rule numbering/renumbering mechanism, you do not need to assign numbers to
rules when defining them. The system will assign a newly defined rule a number that is the smallest
multiple of the step bigger than the current biggest number. For example, with a step of five, if the
biggest number is currently 28, the newly defined rule will get a number of 30. If the ACL has no rule
defined already, the first defined rule will get a number of 0.
Another benefit of using the step is that it allows you to insert new rules between existing ones as
needed. For example, after creating four rules numbered 0, 5, 10, and 15 in an ACL with a step of five,
you can insert a rule numbered 1.
You can control when a rule can take effect by referencing a time range in the rule.
A referenced time range can be one that has not been created yet. The rule, however, can take effect
only after the time range is defined and becomes active.
Traditional packet filtering performs match operation on, rather than all IP fragments, the first ones only.
All subsequent non-first fragments are handled in the way the first fragments are handled. This causes
security risk as attackers may fabricate non-first fragments to attack your network.
As for the configuration of a rule of an IPv4 ACL, the fragment keyword specifies that the rule applies
to non-first fragment packets only, and does not apply to non-fragment packets or the first fragment
packets. ACL rules that do not contain this keyword is applicable to both non-fragment packets and
fragment packets.
13-4
IPv6 ACLs, identified by ACL numbers, fall into three categories, as shown in Table 13-2.
When creating an IPv6 ACL, you can specify a unique name for it. Afterwards, you can identify the
IPv6 ACL by its name.
An IPv6 ACL can have only one name. Whether to specify a name for an ACL is up to you. After
creating an ACL, you cannot specify a name for it, nor can you change or remove its name.
The name of an IPv6 ACL must be unique among IPv6 ACLs. However, an IPv6 ACL and an IPv4 ACL
can share the same name.
Similar to IPv4 ACLs, an IPv6 ACL consists of multiple rules, each of which specifies different matching
criteria. These criteria may have overlapping or conflicting parts. The match order is for determining
how a packet should be matched against the rules.
Two match orders are available for IPv6 ACLs:
z config: Packets are compared against ACL rules in the order the rules are configured.
z auto: Packets are compared against ACL rules in the depth-first match order.
The term depth-first match has different meanings for different types of IPv6 ACLs:
The following shows how your device performs depth-first match in a basic IPv6 ACL:
13-5
The following shows how your device performs depth-first match in an advanced IPv6 ACL:
1) Look at the protocol type field in the rules first. A rule with no limit to the protocol type (that is,
configured with the ipv6 keyword) has the lowest precedence. Rules each of which has a single
specified protocol type are of the same precedence level. Compare packets against the rule with
the highest precedence.
2) In case of a tie, look at the source IPv6 address prefixes. Then, compare packets against the rule
configured with a longer prefix for the source IPv6 address.
3) If the prefix lengths for the source IPv6 addresses are the same, look at the destination IPv6
address prefixes. Then, compare packets against the rule configured with a longer prefix for the
destination IPv6 address.
4) If the prefix lengths for the destination IPv6 addresses are the same, look at the Layer 4 port
number ranges, namely the TCP/UDP port number ranges. Then compare packets against the
rule configured with the smaller port number range.
5) If the port number ranges are the same, compare packets against the rule configured first.
The comparison of a packet against an ACL stops immediately after a match is found. The packet is
then processed as per the rule.
ACL Application
ACLs are widely used in technologies. One typical application is to apply different types of ACLs for
traffic filtering. For details, refer to ACL Application for Packet Filtering.
In addition, ACLs can be used in such fields as routing, security, and QoS. For configuration details,
refer to the related parts of this configuration manual.
13-6
When configuring an IPv4 ACL, go to these sections for information you are interested in:
z Creating a Time Range
z Configuring a Basic IPv4 ACL
z Configuring an Advanced IPv4 ACL
z Configuring an Ethernet Frame Header ACL
z Copying an IPv4 ACL
z Displaying and Maintaining IPv4 ACLs
z IPv4 ACL Configuration Example
Configuration Procedure
time-range time-range-name
{ start-time to end-time days [ from
Create a time range time1 date1 ] [ to time2 date2 ] | from Required
time1 date1 [ to time2 date2 ] | to
time2 date2 }
Display the configuration Optional
display time-range
and status of one or all time
{ time-range-name | all } Available in any view
ranges
14-1
Configuration Example
# Create a time range that is active from 8:00 to 18:00 every working day.
<Sysname> system-view
[Sysname] time-range test 8:00 to 18:00 working-day
# Create an absolute time range from 15:00, Jan 28, 2006 to 15:00, Jan 28, 2008.
<Sysname> system-view
[Sysname] time-range test from 15:00 1/28/2006 to 15:00 1/28/2008
[Sysname] display time-range test
Current time is 22:20:18 1/5/2006 Thursday
Configuration Prerequisites
If you want to reference a time range in a rule, define it with the time-range command first.
14-2
Note that:
z You can only modify the existing rules of an ACL that uses the match order of config. When
modifying a rule of such an ACL, you may choose to change just some of the settings, in which
case the other settings remain the same.
z You cannot create a rule with, or modify a rule to have, the same permit/deny statement as an
existing rule in the ACL.
z When the ACL match order is auto, a newly created rule will be inserted among the existing rules
in the depth-first match order. Note that the IDs of the rules still remain the same.
z You can modify the match order of an ACL with the acl number acl-number [ name acl-name ]
match-order { auto | config } command, but only when the ACL does not contain any rules.
z The rule specified in the rule comment command must already exist.
Configuration Example
# Configure IPv4 ACL 2000 to deny packets with source address 1.1.1.1.
14-3
Configuration Prerequisites
If you want to reference a time range in a rule, define it with the time-range command first.
Configuration Procedure
Required
The default match order is config.
Create an advanced acl number acl-number [ name If you specify a name for an IPv4
IPv4 ACL and enter its acl-name ] [ match-order { auto | ACL when creating the ACL, you
view config } ] can use the acl name acl-name
command to enter the view of the
ACL later.
14-4
Note that:
z You can only modify the existing rules of an ACL that uses the match order of config. When
modifying a rule of such an ACL, you may choose to change just some of the settings, in which
case the other settings remain the same.
z You cannot create a rule with, or modify a rule to have, the same permit/deny statement as an
existing rule in the ACL.
z When the ACL match order is auto, a newly created rule will be inserted among the existing rules
in the depth-first match order. Note that the IDs of the rules still remain the same.
z You can modify the match order of an ACL with the acl number acl-number [ name acl-name ]
match-order { auto | config } command, but only when the ACL does not contain any rules.
z The rule specified in the rule comment command must already exist.
Configuration Example
# Configure IPv4 ACL 3000 to permit TCP packets with the destination port number of 80 from
129.9.0.0 to 202.38.160.0.
14-5
Configuration Prerequisites
If you want to reference a time range in a rule, define it with the time-range command first.
Configuration Procedure
Optional
Configure a rule
rule rule-id comment text By default, an Ethernet frame header
description
ACL rule has no rule description.
14-6
z You can modify the match order of an ACL with the acl number acl-number [ name acl-name ]
match-order { auto | config } command, but only when the ACL does not contain any rules.
z The rule specified in the rule comment command must already exist.
Configuration Example
Configuration Prerequisites
Make sure that the source IPv4 ACL exists while the destination IPv4 ACL does not.
Configuration Procedure
14-7
z The source IPv4 ACL and the destination IPv4 ACL must be of the same type.
z The destination ACL does not take the name of the source IPv4 ACL.
As shown in Figure 14-1, a company interconnects its departments through the switch.
Configure an ACL to deny access of all departments but the Presidents office to the salary query
server during office hours (from 8:00 to 18:00) in working days.
14-8
GE1/0/1 GE1/0/4
GE1/0/2 GE1/0/3
Switch
Configuration Procedure
# Configure a rule to control access of the Marketing Department to the salary query server.
[Switch] acl number 3001
[Switch-acl-adv-3001] rule deny ip source 192.168.3.0 0.0.0.255 destination 192.168.4.1
0.0.0.0 time-range trname
[Switch-acl-adv-3001] quit
3) Apply the IPv4 ACL
# Configure class c_rd for packets matching IPv4 ACL 3000.
[Switch] traffic classifier c_rd
[Switch-classifier-c_rd] if-match acl 3000
[Switch-classifier-c_rd] quit
14-9
# Configure QoS policy p_rd to use traffic behavior b_rd for class c_rd.
[Switch] qos policy p_rd
[Switch-qospolicy-p_rd] classifier c_rd behavior b_rd
[Switch-qospolicy-p_rd] quit
# Configure QoS policy p_market to use traffic behavior b_market for class c_market.
[Switch] qos policy p_market
[Switch-qospolicy-p_market] classifier c_market behavior b_market
[Switch-qospolicy-p_market] quit
14-10
When configuring IPv6 ACLs, go to these sections for information you are interested in:
z Creating a Time Range
z Configuring a Basic IPv6 ACL
z Configuring an Advanced IPv6 ACL
z Copying an IPv6 ACL
z Displaying and Maintaining IPv6 ACLs
z IPv6 ACL Configuration Example
Configuration Prerequisites
If you want to reference a time range in a rule, define it with the time-range command first.
Configuration Procedure
15-1
Note that:
z You can only modify the existing rules of an ACL that uses the match order of config. When
modifying a rule of such an ACL, you may choose to change just some of the settings, in which
case the other settings remain the same.
z You cannot create a rule with, or modify a rule to have, the same permit/deny statement as an
existing rule in the ACL.
z When the ACL match order is auto, a newly created rule will be inserted among the existing rules
in the depth-first match order. Note that the IDs of the rules still remain the same.
z You can modify the match order of an IPv6 ACL with the acl ipv6 number acl6-number [ name
acl6-name ] match-order { auto | config } command, but only when the ACL does not contain any
rules.
z The rule specified in the rule comment command must already exist.
Configuration Example
# Configure IPv6 ACL 2000 to permit IPv6 packets with the source address of 2030:5060::9050/64 and
deny IPv6 packets with the source address of fe80:5060::8050/96.
<Sysname> system-view
[Sysname] acl ipv6 number 2000
[Sysname-acl6-basic-2000] rule permit source 2030:5060::9050/64
[Sysname-acl6-basic-2000] rule deny source fe80:5060::8050/96
15-2
Configuration Prerequisites
If you want to reference a time range in a rule, define it with the time-range command first.
Configuration Procedure
Configure a Optional
description for the description text By default, an advanced IPv6 ACL
advanced IPv6 ACL has no ACL description.
Optional
Configure a rule
rule rule-id comment text By default, an IPv6 ACL rule has no
description
rule description.
Note that:
z You can only modify the existing rules of an ACL that uses the match order of config. When
modifying a rule of such an ACL, you may choose to change just some of the settings, in which
case the other settings remain the same.
z You cannot create a rule with, or modify a rule to have, the same permit/deny statement as an
existing rule in the ACL.
15-3
z You can modify the match order of an IPv6 ACL with the acl ipv6 number acl6-number [ name
acl6-name ] match-order { auto | config } command, but only when the ACL does not contain any
rules.
z The rule specified in the rule comment command must already exist.
Configuration Example
# Configure IPv6 ACL 3000 to permit TCP packets with the source address of 2030:5060::9050/64.
<Sysname> system-view
[Sysname] acl ipv6 number 3000
[Sysname-acl6-adv-3000] rule permit tcp source 2030:5060::9050/64
Configuration Prerequisites
Make sure that the source IPv6 ACL exists while the destination IPv6 ACL does not.
Configuration Procedure
15-4
As shown in Figure 15-1, a company interconnects its departments through the switch.
Configure an ACL to deny access of the R&D department to external networks.
Figure 15-1 Network diagram for IPv6 ACL configuration
Configuration Procedure
15-5
# Configure QoS policy p_rd to use traffic behavior b_rd for class c_rd.
[Switch] qos policy p_rd
[Switch-qospolicy-p_rd] classifier c_rd behavior b_rd
[Switch-qospolicy-p_rd] quit
15-6
When applying an ACL for packet filtering, go to these sections for information you are interested in:
z Filtering Ethernet Frames
z Filtering IPv4 Packets
z Filtering IPv6 Packets
z Configuring Packet Filtering Statistics Function
z ACL Application Examples
You can apply an ACL to the inbound or outbound direction of an ethernet interface or VLAN interface
to filter received or sent packets such as Ethernet frames, IPv4 packets, and IPv6 packets.
16-1
z The packet filtering statistics are managed and output as device log information by the information
center.
z The packet filtering statistics are of the severity level of 6, that is, informational. Informational
messages are not output to the console by default; therefore, you need to modify the log
information output rule for the informational message output to be sent to the console or other
destinations.
z For introduction and configuration of the information center, refer to Information Center
Configuration in the System Volume.
Follow the steps to set the intervals for packet filtering statistics so that the device outputs packet
filtering statistics at the end of every interval:
16-2
Network requirements
As shown in Figure 16-1, apply an ACL to the inbound direction of interface GigabitEthernet 1/0/1 on
Device A so that the interface denies IPv4 packets sourced from Host A from 8:00 to 18:00 everyday.
Configure the device to output log information about how many packets are filtered by this ACL to the
console at an interval of 10 minutes.
Figure 16-1 Network diagram for applying an ACL to an interface for filtering
Host A GE1/0/1
192.168.1.2/24 IP network
Device A
Host B
192.168.1.3/24
Configuration procedure
# Create a time range named study, setting it to become active from 08:00 to 18:00 everyday.
<DeviceA> system-view
[DeviceA] time-range study 8:00 to 18:00 daily
# Create a basic IPv4 ACL rule to deny packets sourced from 192.168.1.2/32 during time range study.
[DeviceA-acl-basic-2009] rule deny source 192.168.1.2 0 time-range study
[DeviceA-acl-basic-2009] quit
# Configure a system information output rule to output log information with severity being
informational to the console.
16-3
As shown in Figure 16-2, apply an ACL to the inbound direction of interface VLAN-interface 100 on
Device A so that the interface denies IPv4 packets sourced from Host A from 14:00 to 18:00 of the
working days, and allows packets traveling between Host A and Host B.
Figure 16-2 Network diagram for applying an ACL to a VLAN interface for filtering
Host A
192.168.1.2
Vlan-int100
192.168.1.1
Server
192.168.5.100
Host B
192.168.1.3
Configuration procedure
# Create a time range named study, setting it to become active from 08:00 to 18:00 of the working
days.
<DeviceA> system-view
[DeviceA] time-range study 14:00 to 18:00 working-day
# Create a basic IPv4 ACL rule to deny packets sourced from 192.168.1.2/32 during time range study.
[DeviceA-acl-basic-2009] rule deny source 192.168.1.2 0 time-range study
[DeviceA-acl-basic-2009] quit
16-4
ii
7 Track Configuration7-1
Track Overview 7-1
Collaboration Between the Track Module and the Detection Modules 7-1
Collaboration Between the Track Module and the Application Modules7-2
Track Configuration Task List 7-2
Configuring Collaboration Between the Track Module and the Detection Modules 7-2
Configuring Track-NQA Collaboration7-2
Configuring Collaboration Between the Track Module and the Application Modules7-3
Configuring Track-Static Routing Collaboration 7-3
Displaying and Maintaining Track Object(s) 7-4
Track Configuration Examples7-4
Static Routing-Track-NQA Collaboration Configuration Example7-4
iii
When configuring Smart Link, go to these sections for information that you are interested in:
z Smart Link Overview
z Configuring a Smart Link Device
z Configuring an Associated Device
z Displaying and Maintaining Smart Link
z Smart Link Configuration Examples
/1 GE
1/0 1/0
GE /2
/1 GE
1/0 1/0
/1
GE
GE /2
1/0 1/0
/2 GE
A dual uplink network demonstrates high reliability, but it may contain network loops. In most cases,
Spanning Tree Protocol (STP) or Rapid Ring Protection Protocol (RRPP) is used to remove network
loops. The problem with STP, however, is that STP convergence time is long, which makes it not
suitable for users who have high demand on convergence speed. RRPP can meet users demand on
1-1
For more information about STP and RRPP, refer to MSTP Configuration in the Access Volume and
RRPP Configuration in the High Availability Volume.
Smart Link is a feature developed to address the slow convergence issue with STP. It provides link
redundancy as well as fast convergence in a dual uplink network, allowing the backup link to take over
quickly when the primary link fails. To sum up, Smart Link features the following:
z Dedicated to dual uplink networks
z Subsecond convergence
z Easy to configure
Terminology
A smart link group consists of only two member ports: the master and the slave. At a time, only one
port is active for forwarding, and the other port is blocked, that is, in the standby state. When link failure
occurs on the active port due to port shutdown or presence of unidirectional link for example, the
standby port becomes active to take over while the original active port transits to the blocked state.
As shown in Figure 1-1, GE1/0/1 and GE1/0/2 of Device C and GE1/0/1 and GE1/0/2 of Device D each
form a smart link group, with GE1/0/1 being active and GE1/0/2 being standby.
Master/slave port
Master port and slave port are two port roles in a smart link group. When both ports in a smart link
group are up, the master port preferentially transits to the forwarding state, while the slave port stays in
the standby state. Once the master port fails, the slave port takes over to forward traffic.
As shown in Figure 1-1, you can configure GE1/0/1 of Device C and that of Device D as master ports,
and GE1/0/2 of Device C and that of Device D slave ports.
Master/slave link
The link that connects the master port in a smart link group is the master link; the link that connects the
slave port is the slave link.
Protected VLAN
A smart link group controls the forwarding state of some data VLANs, which are referred to as
protected VLANs. Different smart link groups on a port control different protected VLANs. The state of
the port in a protected VLAN is determined by the state of the port in the smart link group.
The transmit control VLAN is used for transmitting flush messages. When link switchover occurs, the
devices (such as Device C and Device D in Figure 1-1) broadcast flush messages within the transmit
control VLAN.
1-2
The receive control VLAN is used for receiving and processing flush messages. When link switchover
occurs, the devices (such as Device A, Device B, and Device E in Figure 1-1) receive and process
flush messages in the receive control VLAN and refresh their MAC address forwarding entries and
ARP/ND entries.
Flush message
Flush messages are used by a smart link group to notify other devices to refresh their MAC address
forwarding entries and ARP/ND entries when link switchover occurs in the smart link group. Flush
messages are common multicast data packets, and will be dropped by a blocked receiving port.
As shown in Figure 1-1, the link on GE1/0/1 of Device C is the master link, and the link on GE1/0/2 of
Device C is the slave link. Normally, GE1/0/1 is in the forwarding state, while GE1/0/2 is in the standby
state. When the master link fails, GE1/0/2 takes over to forward traffic while GE1/0/1 is blocked and
placed in the standby state.
z When a port switches to the forwarding state, the system outputs log information to notify the user
of the port state change.
z To keep traffic forwarding stable, the master port that has been blocked due to link failure does not
take over immediately upon its recovery. Instead, link switchover will occur at next link switchover.
As link switchover can outdate the MAC address forwarding entries and ARP/ND entries on all devices,
you need a forwarding entry update mechanism to ensure proper transmission. By far, the following
two update mechanisms are provided:
z Uplink traffic-triggered MAC address learning, where update is triggered by uplink traffic. This
mechanism is applicable to environments with devices not supporting smart link, including devices
of other vendors.
z Flush update where a Smart Link-enabled device updates its information by transmitting flush
messages over the backup link to its upstream devices. This mechanism requires the upstream
devices to be capable of recognizing smart link flush messages to update its MAC address
forwarding entries and ARP/ND entries.
As shown in Figure 1-1, the link on GE1/0/1 of Device C is the master link, and the link on GE1/0/2 of
Device C is the slave link. Once the master link fails, GE1/0/1 is automatically blocked and placed in
the standby state, while GE1/0/2 takes over to forward traffic. During this period, if the smart link group
is configured with role preemption, GE1/0/1 takes over to forward traffic as soon as the former master
link recovers, while GE1/0/2 is automatically blocked and placed in the standby state.
1-3
A ring network may carry traffic of multiple VLANs. Smart link can forward traffic of different VLANs in
different smart link groups, thus implementing load sharing.
To implement load sharing, you can assign a port to multiple smart link groups (each configured with
different protected VLANs), making sure that the state of the port is different in these smart link groups.
In this way, traffic of different VLANs can be forwarded along different paths.
You can configure protected VLANs for a smart link group by referencing MSTIs.
Task Remarks
Configuring Protected VLANs for a Smart Link Group Required
Configuring a Smart Configuring Member Ports for a Smart Link Group Required
Link Device Configuring Role Preemption for a Smart Link Group Optional
Enabling the Sending of Flush Messages Optional
Configuring an
Enabling the Receiving of Flush Messages Required
Associated Device
z A smart link device is a device that supports Smart Link and is configured with a smart link group
and a transmit control VLAN for flush message transmission. Device C and Device D in Figure 1-1
are two examples of smart link devices.
z An associated device is a device that supports Smart Link, and receives flush messages sent from
the specified control VLAN. Device A, Device B, and Device E in Figure 1-1 are examples of
associated devices.
z Before configuring a port as a smart link group member, shut down the port to prevent loops. You
can bring up the port only after completing the smart link group configuration.
z Disable STP and RRPP on the ports you want to add to the smart link group, and make sure that
the ports are not member ports of any aggregation group.
A loop may occur on the network during the time when STP is disabled but Smart Link has not yet
taken effect on a port.
1-4
Follow these steps to configure the protected VLANs for a smart link group:
The protected-vlan command configures protected VLANs for a smart link group by referencing
MSTIs. To view VLAN-to-MSTI mappings, use the display stp region-configuration command. For
VLAN-to-MSTI mapping configuration, refer to MSTP Configuration in the Access Volume.
You can configure member ports for a smart link group either in smart link group view or in interface
view. The configurations made in these two views have the same effect.
Follow these steps to configure member ports for a smart link group in smart link group view:
In interface view
Follow these steps to configure member ports for a smart link group in interface view:
1-5
Follow these steps to configure role preemption for a smart link group:
The preemption delay configuration takes effect only after role preemption is enabled.
Create a smart link group and enter smart-link group group-id Required
smart link group view
Optional
Enable flush update in the specified flush enable [ control-vlan By default, flush
control VLAN vlan-id ] update is enabled,
and VLAN 1 is the
control VLAN.
1-6
Network requirements
Configuration procedure
<Sysname> system-view
[Sysname] vlan 20
[Sysname-vlan20] quit
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] undo stp enable
[Sysname-GigabitEthernet1/0/1] port link-type trunk
[Sysname-GigabitEthernet1/0/1] port trunk permit vlan 20
[Sysname-GigabitEthernet1/0/1] quit
[Sysname] interface gigabitethernet 1/0/2
[Sysname-GigabitEthernet1/0/2] undo stp enable
[Sysname-GigabitEthernet1/0/2] port link-type trunk
[Sysname-GigabitEthernet1/0/2] port trunk permit vlan 20
[Sysname-GigabitEthernet1/0/2] quit
[Sysname] smart-link group 1
[Sysname-smlk-group1] protected-vlan reference-instance 0 to 8
[Sysname-smlk-group1] port gigabitethernet 1/0/1 master
[Sysname-smlk-group1] port gigabitethernet 1/0/2 slave
[Sysname-smlk-group1] flush enable control-vlan 20
[Sysname-smlk-group1] quit
You do not need to enable all ports on the associated devices to receive flush messages sent from the
transmit control VLAN, only those on the master and slave links between the smart link device and the
destination device.
Follow these steps to enable the receiving of flush messages:
1-7
Required
Configure the control VLANs for smart-link flush enable By default, no control
receiving flush messages [ control-vlan vlan-id-list ] VLAN exists for receiving
flush messages.
Network requirements
Configure GigabitEthernet 1/0/1 to receive and process flush messages in VLAN 20.
Configuration procedure
<Sysname> system-view
[Sysname] vlan 20
[Sysname-vlan20] quit
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type trunk
[Sysname-GigabitEthernet1/0/1] port trunk permit vlan 20
[Sysname-GigabitEthernet1/0/1] smart-link flush enable control-vlan 20
1-8
Network requirements
Device A
/1 GE
1/0 1/0
GE /2
/1 GE
1/0 1/0
/1
GE
Device B Device E
GE /2
1/0 1/0
GE1/0/3 /2 GE GE1/0/3
Master link
Slave link
Smart link group
GE1/0/1 GE1/0/1
GE1/0/2 GE1/0/2
Device C Device D
Configuration procedure
1) Configuration on Device C
# Create VLANs 1 through 30, map VLANs 1 through 10, VLANs 11 through 20, and VLANs 21
through 30 to MSTI 0, MSTI 1, and MSTI 2 respectively, and activate the MST region configuration.
<DeviceC> system-view
[DeviceC] vlan 1 to 30
[DeviceC] stp region-configuration
[DeviceC-mst-region] instance 0 vlan 1 to 10
[DeviceC-mst-region] instance 1 vlan 11 to 20
[DeviceC-mst-region] instance 2 vlan 21 to 30
[DeviceC-mst-region] active region-configuration
[DeviceC-mst-region] quit
# Disable STP on GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 separately, and configure them as
trunk ports that permit VLANs 1 through 30.
1-9
# Create smart link group 1 and configure all VLANs mapped to MSTIs 0 through 2 as the protected
VLANs.
[DeviceC] smart-link group 1
[DeviceC-smlk-group1] protected-vlan reference-instance 0 to 2
# Configure GigabitEthernet 1/0/1 as the master port and GigabitEthernet 1/0/2 as the slave port for
smart link group 1.
[DeviceC-smlk-group1] port gigabitethernet 1/0/1 master
[DeviceC-smlk-group1] port gigabitethernet 1/0/2 slave
# Disable STP on GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 separately, and configure them as
trunk ports that permit VLANs 1 through 30.
[DeviceD] interface gigabitethernet 1/0/1
[DeviceD-GigabitEthernet1/0/1] undo stp enable
[DeviceD-GigabitEthernet1/0/1] port link-type trunk
[DeviceD-GigabitEthernet1/0/1] port trunk permit vlan 1 to 30
[DeviceD-GigabitEthernet1/0/1] quit
[DeviceD] interface gigabitethernet 1/0/2
[DeviceD-GigabitEthernet1/0/2] undo stp enable
[DeviceD-GigabitEthernet1/0/2] port link-type trunk
[DeviceD-GigabitEthernet1/0/2] port trunk permit vlan 1 to 30
[DeviceD-GigabitEthernet1/0/2] quit
1-10
# Configure GigabitEthernet 1/0/1 as the master port and GigabitEthernet 1/0/2 as the slave port for
smart link group 1.
[DeviceD-smlk-group1] port gigabitethernet 1/0/1 master
[DeviceD-smlk-group1] port gigabitethernet 1/0/2 slave
# Configure GigabitEthernet 1/0/1, GigabitEthernet 1/0/2, and GigabitEthernet 1/0/3 as trunk ports that
permit VLANs 1 through 30 and enable flush message receiving on them.
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] port link-type trunk
[DeviceB-GigabitEthernet1/0/1] port trunk permit vlan 1 to 30
[DeviceB-GigabitEthernet1/0/1] smart-link flush enable
[DeviceB-GigabitEthernet1/0/1] quit
[DeviceB] interface gigabitethernet 1/0/2
[DeviceB-GigabitEthernet1/0/2] port link-type trunk
[DeviceB-GigabitEthernet1/0/2] port trunk permit vlan 1 to 30
[DeviceB-GigabitEthernet1/0/2] smart-link flush enable
[DeviceB-GigabitEthernet1/0/2] quit
[DeviceB] interface gigabitethernet 1/0/3
[DeviceB-GigabitEthernet1/0/3] port link-type trunk
[DeviceB-GigabitEthernet1/0/3] port trunk permit vlan 1 to 30
[DeviceB-GigabitEthernet1/0/3] smart-link flush enable
[DeviceB-GigabitEthernet1/0/3] quit
4) Configuration on Device E
# Create VLANs 1 through 30.
<DeviceE> system-view
[DeviceE] vlan 1 to 30
# Configure GigabitEthernet 1/0/1, GigabitEthernet 1/0/2, and GigabitEthernet 1/0/3 as trunk ports that
permit VLANs 1 through 30 and enable flush message receiving on them.
[DeviceE] interface gigabitethernet 1/0/1
[DeviceE-GigabitEthernet1/0/1] port link-type trunk
[DeviceE-GigabitEthernet1/0/1] port trunk permit vlan 1 to 30
[DeviceE-GigabitEthernet1/0/1] smart-link flush enable
[DeviceE-GigabitEthernet1/0/1] quit
[DeviceE] interface gigabitethernet 1/0/2
[DeviceE-GigabitEthernet1/0/2] port link-type trunk
1-11
# Configure GigabitEthernet 1/0/1, GigabitEthernet 1/0/2, and GigabitEthernet 1/0/3 as trunk ports that
permit VLANs 1 through 30 and enable flush message receiving on them.
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] port link-type trunk
[DeviceA-GigabitEthernet1/0/1] port trunk permit vlan 1 to 30
[DeviceA-GigabitEthernet1/0/1] smart-link flush enable
[DeviceA-GigabitEthernet1/0/1] quit
[DeviceA] interface gigabitethernet 1/0/2
[DeviceA-GigabitEthernet1/0/2] port link-type trunk
[DeviceA-GigabitEthernet1/0/2] port trunk permit vlan 1 to 30
[DeviceA-GigabitEthernet1/0/2] smart-link flush enable
[DeviceA-GigabitEthernet1/0/2] quit
6) Verifying the configurations
You can use the display smart-link group command to display the smart link group configuration on
each device. For example:
# Display the smart link group configuration on Device C.
[DeviceC] display smart-link group 1
Smart link group 1 information:
Device ID: 000f-e23d-5af0
Preemption mode: NONE
Control VLAN: 1
Protected VLAN: Reference Instance 0 to 2
Member Role State Flush-count Last-flush-time
-------------------------------------------------------------------------------
GigabitEthernet1/0/1 MASTER ACTVIE 5 16:37:20 2009/02/21
GigabitEthernet1/0/2 SLAVE STANDBY 1 17:45:20 2009/02/21
You can use the display smart-link flush command to display the flush messages received on each
device. For example:
# Display the flush messages received on Device B.
[DeviceB] display smart-link flush
Received flush packets : 5
Receiving interface of the last flush packet : GigabitEthernet1/0/3
Receiving time of the last flush packet : 16:25:21 2009/02/21
1-12
Network requirements
/1 GE
1/0 1/0
GE /2
/1 GE
1/0 1/0
GE /1
Device B Device D
GE /2
1/0 1/0
/2 GE /2 GE
1/0 1/0
/1 GE
Device C
Configuration procedure
1) Configuration on Device C
# Create VLAN 1 through VLAN 200, map VLAN 1 through VLAN 100 to MSTI 0 and VLAN 101
through VLAN 200 to MSTI 2, and activate MST region configuration.
<DeviceC> system-view
[DeviceC] vlan 1 to 200
[DeviceC] stp region-configuration
[DeviceC-mst-region] instance 0 vlan 1 to 100
[DeviceC-mst-region] instance 2 vlan 101 to 200
[DeviceC-mst-region] active region-configuration
[DeviceC-mst-region] quit
# Disable STP on GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 separately, configure the ports as
trunk ports, and assign them to VLAN 1 through VLAN 200.
[DeviceC] interface gigabitethernet 1/0/1
[DeviceC-GigabitEthernet1/0/1] undo stp enable
[DeviceC-GigabitEthernet1/0/1] port link-type trunk
[DeviceC-GigabitEthernet1/0/1] port trunk permit vlan 1 to 200
[DeviceC-GigabitEthernet1/0/1] quit
1-13
# Create smart link group 1, and configure all VLANs mapped to MSTI 0 as the protected VLANs for
smart link group 1.
[DeviceC] smart-link group 1
[DeviceC-smlk-group1] protected-vlan reference-instance 0
# Configure GigabitEthernet 1/0/1 as the master port and GigabitEthernet 1/0/2 as the slave port for
smart link group 1.
[DeviceC-smlk-group1] port gigabitethernet 1/0/1 master
[DeviceC-smlk-group1] port gigabitethernet 1/0/2 slave
# Enable role preemption in smart link group 1, enable flush message sending, and configure VLAN 10
as the transmit control VLAN.
[DeviceC-smlk-group1] preemption mode role
[DeviceC-smlk-group-1] flush enable control-vlan 10
[DeviceC-smlk-group-1] quit
# Create smart link group 2, and configure all VLANs mapped to MSTI 2 as the protected VLANs for
smart link group 2.
[DeviceC] smart-link group 2
[DeviceC-smlk-group2] protected-vlan reference-instance 2
# Configure GigabitEthernet 1/0/1 as the slave port and GigabitEthernet 1/0/2 as the master port for
smart link group 2.
[DeviceC-smlk-group2] port gigabitethernet 1/0/2 master
[DeviceC-smlk-group2] port gigabitethernet 1/0/1 slave
# Enable role preemption in smart link group 2, enable flush message sending, and configure VLAN
101 as the transmit control VLAN.
[DeviceC-smlk-group2] preemption mode role
[DeviceC-smlk-group2] flush enable control-vlan 101
[DeviceC-smlk-group2] quit
2) Configuration on Device B
# Create VLAN 1 through VLAN 200.
<DeviceB> system-view
[DeviceB] vlan 1 to 200
# Configure GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 as trunk ports and assign them to VLANs
1 through 200; enable flush message receiving on GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2
and configure VLAN 10 and VLAN 101 as the receive control VLANs.
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] port link-type trunk
[DeviceB-GigabitEthernet1/0/1] port trunk permit vlan 1 to 200
[DeviceB-GigabitEthernet1/0/1] smart-link flush enable control-vlan 10 101
[DeviceB-GigabitEthernet1/0/1] quit
[DeviceB] interface gigabitethernet 1/0/2
1-14
# Configure GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 as trunk ports and assign them to VLANs
1 through 200; enable flush message receiving on GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2
and configure VLAN 10 and VLAN 101 as the receive control VLANs.
[DeviceD] interface gigabitethernet 1/0/1
[DeviceD-GigabitEthernet1/0/1] port link-type trunk
[DeviceD-GigabitEthernet1/0/1] port trunk permit vlan 1 to 200
[DeviceD-GigabitEthernet1/0/1] smart-link flush enable control-vlan 10 101
[DeviceD-GigabitEthernet1/0/1] quit
[DeviceD] interface gigabitethernet 1/0/2
[DeviceD-GigabitEthernet1/0/2] port link-type trunk
[DeviceD-GigabitEthernet1/0/2] port trunk permit vlan 1 to 200
[DeviceD-GigabitEthernet1/0/2] smart-link flush enable control-vlan 10 101
[DeviceD-GigabitEthernet1/0/2] quit
4) Configuration on Device A
# Create VLAN 1 through VLAN 200.
<DeviceA> system-view
[DeviceA] vlan 1 to 200
# Configure GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 as trunk ports and assign them to VLANs
1 through 200; enable flush message receiving on GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2
and configure VLAN 10 and VLAN 101 as the receive control VLANs.
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] port link-type trunk
[DeviceA-GigabitEthernet1/0/1] port trunk permit vlan 1 to 200
[DeviceA-GigabitEthernet1/0/1] smart-link flush enable control-vlan 10 101
[DeviceA-GigabitEthernet1/0/1] quit
[DeviceA] interface gigabitethernet 1/0/2
[DeviceA-GigabitEthernet1/0/2] port link-type trunk
[DeviceA-GigabitEthernet1/0/2] port trunk permit vlan 1 to 200
[DeviceA-GigabitEthernet1/0/2] smart-link flush enable control-vlan 10 101
[DeviceA-GigabitEthernet1/0/2] quit
5) Verifying the configurations
You can use the display smart-link group command to display the smart link group configuration on
each device. For example:
# Display the smart link group configuration on Device C.
[DeviceC] display smart-link group all
Smart link group 1 information:
Device ID: 000f-e23d-5af0
1-15
You can use the display smart-link flush command to display the flush messages received on each
device. For example:
# Display the flush messages received on Device B.
[DeviceB] display smart-link flush
Received flush packets : 5
Receiving interface of the last flush packet : GigabitEthernet1/0/2
Receiving time of the last flush packet : 16:25:21 2009/02/21
Device ID of the last flush packet : 000f-e23d-5af0
Control VLAN of the last flush packet : 10
1-16
When configuring monitor link, go to these sections for information you are interested in:
z Overview
z Configuring Monitor Link
z Displaying and Maintaining Monitor Link
z Monitor Link Configuration Example
Overview
Monitor link is a port collaboration function. Monitor link is usually used in conjunction with Layer 2
topology protocols. The idea is to adapt the up/down state of downlink ports to the up/down state of
uplink ports, triggering link switchover on the downlink device in time.
Terminology
A monitor link group is a set of uplink ports and downlink ports. For the purpose of monitor link, uplink
ports refer to the monitored ports while downlink ports refer to the ports adapted to the up/down state
of the monitored ports. A port can be assigned to only one monitor link group. Both Layer 2 Ethernet
ports and Layer 2 aggregate interfaces can be assigned to a monitor link group.
Uplink
The uplink is the link monitored by the monitor link group. The monitor link group is down when the
group has no uplink ports or all uplink ports are down. The monitor link group is up when any uplink
port is up.
Downlink
The downlink is the state-adaptive link in the monitor link group. The state of the downlink ports is
always consistent with the up/down state of the monitor link group.
A monitor link group works independently of other monitor link groups. When a monitor link group
contains no uplink ports or all its uplink ports go down, the monitor link group goes down and forces all
downlink ports down at the same time. When any uplink port goes up, the monitor link group goes up
and brings up all the downlink ports.
Do not manually shut down or bring up the downlink ports in a monitor link group.
2-1
Before assigning a port to a monitor link group, make sure the port is not the member port of any
aggregation group.
Configuration Procedure
Network requirements
Configuration procedure
<Sysname> system-view
[Sysname] monitor-link group 1
[Sysname-mtlk-group1] port gigabitethernet 1/0/1 uplink
[Sysname-mtlk-group1] port gigabitethernet 1/0/2 downlink
2-2
For detailed information about smart link, refer to Smart Link Configuration in the High Availability
Volume.
Figure 2-1 Network diagram for smart link in combination with monitor link configuration
Device A
GE1/0/1 GE1/0/2
GE1/0/1 GE1/0/1
GE1/0/2 GE1/0/2
Device B Device D
GE1/0/1 GE1/0/2
Device C
Configuration procedure
1) Configuration on Device C
# Disable STP on GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 separately.
<DeviceC> system-view
[DeviceC] interface gigabitethernet 1/0/1
[DeviceC-GigabitEthernet1/0/1] undo stp enable
[DeviceC-GigabitEthernet1/0/1] quit
[DeviceC] interface gigabitethernet 1/0/2
[DeviceC-GigabitEthernet1/0/2] undo stp enable
2-3
# Create smart link group 1 and configure the smart link group to protect all the VLANs mapped to
MSTIs 0 through 15 for smart link group 1.
[DeviceC] smart-link group 1
[DeviceC-smlk-group1] protected-vlan reference-instance 0 to 15
# Configure GigabitEthernet 1/0/1 as the master port and GigabitEthernet 1/0/2 as the slave port for
smart link group 1.
[DeviceC-smlk-group1] port gigabitethernet 1/0/1 master
[DeviceC-smlk-group1] port gigabitethernet 1/0/2 slave
2) Configuration on Device A
# Enable flush message receiving on GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 separately.
<DeviceA> system-view
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] smart-link flush enable
[DeviceA-GigabitEthernet1/0/1] quit
[DeviceA] interface gigabitethernet 1/0/2
[DeviceA-GigabitEthernet1/0/2] smart-link flush enable
3) Configuration on Device B
# Create monitor link group 1.
<DeviceB> system-view
[DeviceB] monitor-link group 1
# Configure GigabitEthernet 1/0/1 as an uplink port and GigabitEthernet 1/0/2 as a downlink port for
monitor link group 1.
[DeviceB-mtlk-group1] port gigabitethernet 1/0/1 uplink
[DeviceB-mtlk-group1] port gigabitethernet 1/0/2 downlink
[DeviceB-mtlk-group-1] quit
# Enable flush message receiving on GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 separately.
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] smart-link flush enable
[DeviceB-GigabitEthernet1/0/1] quit
[DeviceB] interface gigabitethernet 1/0/2
[DeviceB-GigabitEthernet1/0/2] smart-link flush enable
4) Configuration on Device D
# Create monitor link group 1.
<DeviceD> system-view
[DeviceD] monitor-link group 1
# Configure GigabitEthernet 1/0/1 as the uplink port and GigabitEthernet 1/0/2 as the downlink port for
monitor link group 1.
[DeviceD-mtlk-group1] port gigabitethernet 1/0/1 uplink
[DeviceD-mtlk-group1] port gigabitethernet 1/0/2 downlink
[DeviceD-mtlk-group1] quit
2-4
2-5
When configuring RRPP, go to these sections for information you are interested in:
z RRPP Overview
z RRPP Configuration Task List
z Creating an RRPP Domain
z Configuring Control VLANs
z Configuring Protected VLANs
z Configuring RRPP Rings
z Activating an RRPP Domain
z Configuring RRPP Timers
z Configuring an RRPP Ring Group
z Displaying and Maintaining RRPP
z RRPP Configuration Examples
z Troubleshooting
RRPP Overview
The Rapid Ring Protection Protocol (RRPP) is a link layer protocol designed for Ethernet rings. RRPP
can prevent broadcast storms caused by data loops when an Ethernet ring is healthy, and rapidly
restore the communication paths between the nodes in the event that a link is disconnected on the
ring.
Compared with the IEEE spanning tree protocols, RRPP features the following:
z Fast topology convergence
z Convergence time independent of Ethernet ring size
Background
Metropolitan area networks (MANs) and enterprise networks usually use the ring structure to improve
reliability. However, services will be interrupted if any node in the ring network fails. A ring network
usually uses Resilient Packet Ring (RPR) or Ethernet rings. RPR is high in cost as it needs dedicated
hardware. Contrarily, the Ethernet ring technology is more mature and economical, so it is more and
more widely used in MANs and enterprise networks.
Currently, both Spanning Tree Protocol (STP) and RRPP can be used to eliminate Layer-2 loops. STP
is mature; however, it takes several seconds to converge. RRPP is an Ethernet ring-specific data link
layer protocol, and converges faster than STP. Additionally, the convergence time of RRPP is
independent of the number of nodes in the Ethernet ring, and therefore, RRPP can be applied to
large-diameter networks.
3-1
RRPP domain
The interconnected devices with the same domain ID and control VLANs constitute an RRPP domain.
An RRPP domain contains the following elements: primary ring, subring, control VLAN, master node,
transit node, primary port, secondary port, common port, and edge port.
As shown in Figure 3-1, Domain 1 is an RRPP domain, including two RRPP rings: Ring 1 and Ring 2.
All the nodes on the two RRPP rings belong to the RRPP domain.
RRPP ring
A ring-shaped Ethernet topology is called an RRPP ring. RRPP rings fall into two types: primary ring
and subring. You can configure a ring as either the primary ring or a subring by specifying its ring level.
The primary ring is of level 0, while a subring is of level 1. An RRPP domain contains one or multiple
RRPP rings, one serving as the primary ring and the others serving as subrings. A ring can be in one of
the following two states:
z Health state: All the physical links on the Ethernet ring are connected.
z Disconnect state: Some physical links on the Ethernet ring are broken.
As shown in Figure 3-1, Domain 1 contains two RRPP rings: Ring 1 and Ring 2. The level of Ring 1 is
set to 0, that is, Ring 1 is configured as the primary ring; the level of Ring 2 is set to 1, that is, Ring 2 is
configured as a subring.
1) Control VLAN
In an RRPP domain, a control VLAN is a VLAN dedicated to transferring RRPPDUs. On a device, the
ports accessing an RRPP ring belong to the control VLANs of the ring, and only such ports can join the
control VLANs.
An RRPP domain is configured with two control VLANs: one primary control VLAN, which is the control
VLAN for the primary ring; one secondary control VLAN, which is the control VLAN for subrings. All
subrings in the same RRPP domain share the same secondary control VLAN. After you specify a
VLAN as the primary control VLAN, the system automatically configures the VLAN whose ID is the
primary control VLAN ID plus one as the secondary control VLAN.
3-2
Node
Each device on an RRPP ring is referred to as a node. The role of a node is configurable. There are
the following node roles:
z Master node: Each ring has one and only one master node. The master node initiates the polling
mechanism and determines the operations to be performed after a change in topology.
z Transit node: Transit nodes include all the nodes except the master node on the primary ring and
all the nodes on subrings except the master nodes and the nodes where the primary ring
intersects with the subrings. A transit node monitors the state of its directly-connected RRPP links
and notifies the master node of the link state changes, if any. Based on the link state changes, the
master node decides the operations to be performed.
z Edge node: A node residing on both the primary ring and a subring at the same time. An edge
node is a special transit node that serves as a transit node on the primary ring and an edge node
on the subring.
z Assistant-edge node: A node residing on both the primary ring and a subring at the same time. An
assistant-edge node is a special transit node that serves as a transit node on the primary ring and
an assistant-edge node on the subring. This node works in conjunction with the edge node to
detect the integrity of the primary ring and perform loop guard.
As shown in Figure 3-1, Ring 1 is the primary ring and Ring 2 is a subring. Device A is the master node
of Ring 1, Device B, Device C and Device D are the transit nodes of Ring 1. Device E is the master
node of Ring 2, Device B is the edge node of Ring 2, and Device C is the assistant-edge node of Ring
2.
Each master node or transit node has two ports connected to an RRPP ring, one serving as the
primary port and the other serving as the secondary port. You can determine the role of a port.
1) In terms of functionality, the difference between the primary port and the secondary port of a
master node is:
z The primary port and the secondary port are designed to play the role of sending and receiving
loop-detect packets respectively.
z When an RRPP ring is in Health state, the secondary port of the master node will logically deny
data VLANs and permit only the packets of the control VLANs.
z When an RRPP ring is in Disconnect state, the secondary port of the master node will permit data
VLANs, that is, forward packets of data VLANs.
2) In terms of functionality, there is no difference between the primary port and the secondary port of
a transit node. Both are designed for transferring protocol packets and data packets over an
RRPP ring.
As shown in Figure 3-1, Device A is the master node of Ring 1. Port 1 and Port 2 are the primary port
and the secondary port of the master node on Ring 1 respectively. Device B, Device C, and Device D
are the transit nodes of Ring 1. Their Port 1 and Port 2 are the primary port and the secondary port on
Ring 1 respectively.
3-3
The ports connecting the edge node and assistant-edge node to the primary ring are common ports.
The ports connecting the edge node and assistant-edge node only to the subrings are edge ports.
As shown in Figure 3-1, Device B and Device C lie on Ring 1 and Ring 2. Device Bs Port 1 and Port 2
and Device Cs Port 1 and Port 2 access the primary ring, so they are common ports. Device Bs Port 3
and Device Cs Port 3 access only the subring, so they are edge ports.
To reduce Edge-Hello traffic, you can configure a group of subrings on the edge node or
assistant-edge node. For information about Edge-Hello packets, refer to RRPPDUs. You must
configure a device as the edge node of these subrings, and another device as the assistant-edge node
of these subrings. Additionally, the subrings of the edge node and assistant-edge node must connect
to the same subring packet tunnels in major ring (SRPTs), so that Edge-Hello packets of the edge node
of these subrings travel to the assistant-edge node of these subrings over the same link.
An RRPP ring group configured on the edge node is called an edge node RRPP ring group, and an
RRPP ring group configured on an assistant-edge node is called an assistant-edge node RRPP ring
group. Up to one subring in an edge node RRPP ring group is allowed to send Edge-Hello packets.
RRPPDUs
Type Description
The master node initiates Hello packets to detect the integrity of a ring in a
Hello
network.
The transit node, the edge node or the assistant-edge node initiates
Link-Down Link-Down packets to notify the master node of the disappearance of a ring
in case of a link failure.
The master node initiates Common-Flush-FDB (FDB stands for Forwarding
Database) packets to instruct the transit nodes to update their own MAC
Common-Flush-FDB
entries and ARP/ND entries when an RRPP ring transits to Disconnect
state.
The master node initiates Complete-Flush-FDB packets to instruct the
transit nodes to update their own MAC entries and ARP/ND entries, and
Complete-Flush-FDB
release blocked ports from being blocked temporarily when an RRPP ring
transits to Health state.
The edge node initiates Edge-Hello packets to examine the SRPTs
Edge-Hello
between the edge node and the assistant-edge node.
The assistant-edge node initiates Major-Fault packets to notify the edge
Major-Fault node of SRPT failure when an SRPT between edge node and
assistant-edge node is torn down.
RRPPDUs of subrings are transmitted as data packets in the primary ring, while RRPPDUs of the
primary ring can only be transmitted within the primary ring.
3-4
When RRPP checks the link state of an Ethernet ring, the master node sends Hello packets out the
primary port according to the Hello timer and determines whether its secondary port receives the Hello
packets based on the Fail timer.
z The Hello timer specifies the interval at which the master node sends Hello packets out the
primary port.
z The Fail timer specifies the maximum delay between the master node sending Hello packets out
the primary port and the secondary port receiving the Hello packets from the primary port. If the
secondary port receives the Hello packets sent by the local master node before the Fail timer
expires, the overall ring is in Health state. Otherwise, the ring transits into Disconnect state.
In an RRPP domain, a transit node learns the Hello timer value and the Fail timer value on the master
node through the received Hello packets, ensuring that all nodes in the ring network are consistent in
the two timer settings.
Polling mechanism
The polling mechanism is used by the master node of an RRPP ring to check the Health state of the
ring network.
The master node sends Hello packets out its primary port periodically, and these Hello packets travel
through each transit node on the ring in turn.
z If the ring is complete, the secondary port of the master node will receive Hello packets before the
Fail timer expires and the master node will keep the secondary port blocked.
z If the ring is torn down, the secondary port of the master node will fail to receive Hello packets
before the Fail timer expires. The master node will release the secondary port from blocking data
VLANs while sending Common-Flush-FDB packets to instruct all transit nodes to update their own
MAC entries and ARP/ND entries.
The transit node, the edge node or the assistant-edge node sends Link-Down packets to the master
node immediately when they find any of its own ports belonging to an RRPP domain is down. Upon the
receipt of a Link-Down packet, the master node releases the secondary port from blocking data VLANs
while sending Common-Flush-FDB packet to instruct all the transit nodes, the edge nodes and the
assistant-edge nodes to update their own MAC entries and ARP/ND entries. After each node updates
its own entries, traffic is switched to the normal link.
3-5
The master node may find the ring is restored after a period of time after the ports belonging to the
RRPP domain on the transit nodes, the edge nodes, or the assistant-edge nodes are brought up again.
A temporary loop may arise in the data VLAN during this period. As a result, broadcast storm occurs.
To prevent temporary loops, non-master nodes block them immediately (and permit only the packets of
the control VLAN to pass through) when they find their ports accessing the ring are brought up again.
The blocked ports are activated only when the nodes are sure that no loop will be brought forth by
these ports.
As shown in Figure 3-5, Ring 1 is the primary ring, and Ring 2 and Ring 3 are subrings. When the two
SRPTs between the edge node and the assistant-edge node are down, the master nodes of Ring 2
and Ring 3 will open their respective secondary ports, and thus a loop among Device B, Device C,
Device E, and Device F is generated. As a result, broadcast storm occurs.
In this case, to prevent generating this loop, the edge node will block the edge port temporarily. The
blocked edge port is activated only when the edge node is sure that no loop will be brought forth when
the edge port is activated.
Load balancing
In a ring network, maybe traffic of multiple VLANs is transmitted at the same time. RRPP can
implement load balancing for the traffic by transmitting traffic of different VLANs along different paths.
By configuring an individual RRPP domain for transmitting the traffic of the specified VLANs (referred
to as protected VLANs) in a ring network, traffic of different VLANs can be transmitted according to
different topologies in the ring network. In this way, load balancing is achieved.
As shown in Figure 3-6, Ring 1 is configured as the primary ring of Domain 1 and Domain 2, which are
configured with different protected VLANs. Device A is the master node of Ring 1 in Domain 1; Device
B is the master node of Ring 1 in Domain 2. With such configurations, traffic of different VLANs can be
transmitted on different links, and thus, load balancing is achieved in a single-ring network.
In an edge node RRPP ring group, only an activated subring with the lowest domain ID and ring ID can
send Edge-Hello packets. In an assistant-edge node RRPP ring group, any activated subring that has
received Edge-Hello packets will forward these packets to the other activated subrings. With an edge
node RRPP ring group and an assistant-edge node RRPP ring group configured, only one subring
sends and receives Edge-Hello packets, thus reducing CPU workload.
As shown in Figure 3-5, Device B is the edge node of Ring 2 and Ring 3, and Device C is the
assistant-edge node of Ring 2 and Ring 3. Device B and Device C need to send or receive Edge-Hello
packets frequently. If more subrings are configured or load balancing is configured for more multiple
domains, Device B and Device C will send or receive a mass of Edge-Hello packets.
To reduce Edge-Hello traffic, you can assign Ring 2 and Ring 3 to an RRPP ring group configured on
the edge node Device B, and assign Ring 2 and Ring 3 to an RRPP ring group configured on Device C.
After such configurations, if all rings are activated, only Ring 2 on Device B sends Edge-Hello packets.
3-6
As shown in Figure 3-2, there is only a single ring in the network topology. In this case, you only need
to define an RRPP domain.
Figure 3-2 Schematic diagram for a single-ring network
Tangent rings
As shown in Figure 3-3, there are two or more rings in the network topology and only one common
node between rings. In this case, you need to define an RRPP domain for each ring.
Figure 3-3 Schematic diagram for a tangent-ring network
Intersecting rings
As shown in Figure 3-4, there are two or more rings in the network topology and two common nodes
between rings. In this case, you only need to define an RRPP domain, and configure one ring as the
primary ring and the other rings as subrings.
3-7
As shown in Figure 3-5, there are two or more rings in the network topology and two similar common
nodes between rings. In this case, you only need to define an RRPP domain, and configure one ring as
the primary ring and the other rings as subrings.
Figure 3-5 Schematic diagram for a dual-homed-ring network
In a single-ring network, you can achieve load balancing by configuring multiple domains.
As shown in Figure 3-6, Ring 1 is configured as the primary ring of both Domain 1 and Domain 2.
Domain 1 and Domain 2 are configured with different protected VLANs. In Domain 1, Device A is
configured as the master node of Ring 1; in Domain 2, Device B is configured as the master node of
Ring 1. Such configurations enable the ring to block different links based on VLANs. Thus, single-ring
load balancing is achieved.
3-8
Device A Device B
Device D Device C
In an intersecting-ring network, you can also achieve load balancing by configuring multiple domains.
As shown in Figure 3-7, Ring 1 is the primary ring and Ring 2 is the subring in both Domain 1 and
Domain 2. Domain 1 and Domain 2 are configured with different protected VLANs. Device A is
configured as the master node of Ring 1 in Domain 1; Device D is configured as the master node of
Ring 1 in Domain 2. Device E is configured as the master node of Ring 2 in both Domain 1 and Domain
2. However, different ports on Device E are blocked in Domain 1 and Domain 2. With the
configurations, you can enable traffic of different VLANs to travel over different paths in the subring and
primary ring, thus achieving intersecting-ring load balancing.
Figure 3-7 Schematic diagram for an intersecting-ring load balancing network
RFC 3619 Extreme Networks' Ethernet Automatic Protection Switching (EAPS) Version 1 is related to
RRPP.
3-9
Task Remarks
Required
Creating an RRPP Domain
Perform this task on all nodes in the RRPP domain.
Required
Configuring Control VLANs
Perform this task on all nodes in the RRPP domain.
Required
Configuring Protected VLANs
Perform this task on all nodes in the RRPP domain.
Required
Configuring RRPP Ports
Configuring Perform this task on all nodes in the RRPP domain.
RRPP Rings Required
Configuring RRPP Nodes
Perform this task on all nodes in the RRPP domain
Required
Activating an RRPP Domain
Perform this task on all nodes in the RRPP domain.
Optional
Configuring RRPP Timers Perform this task on the master node in the RRPP
domain.
Optional
Configuring an RRPP Ring Group Perform this task on the edge node and
assistant-edge node in the RRPP domain.
z RRPP does not have an auto election mechanism, so you must configure each node in the ring
network properly for RRPP to monitor and protect the ring network.
z Before configuring RRPP, you need to construct a ring-shaped Ethernet topology physically.
3-10
z To ensure proper forwarding of RRPPDUs, do not enable QinQ or VLAN mapping on the control
VLANs.
z To ensure that RRPPDUs can be sent and received correctly, do not configure the default VLAN
of a port accessing an RRPP ring as the primary control VLAN or the secondary control VLAN.
z To transparently transmit RRPPDUs on a device not configured with RRPP, you must ensure only
the two ports connecting the device to the RRPP ring permit the packets of the control VLANs.
Otherwise, the packets from other VLANs may go into the control VLANs in transparent
transmission mode and strike the RRPP ring.
protected-vlan Required
Configure protected VLANs for
reference-instance By default, no protected VLAN is
the RRPP domain
instance-id-list configured for an RRPP domain.
When configuring load balancing, ensure that the protected VLANs configured for different RRPP
domains are different.
3-11
z RRPP ports, that is, ports connecting devices to an RRPP ring, must be Layer-2 GE ports, Layer-2
XGE ports, or Layer-2 aggregate interfaces and cannot be member ports of any aggregation
group, or smart link group.
z After configuring a Layer-2 aggregate interface as an RRPP port, you can still assign ports to or
remove ports from the aggregation group corresponding to the interface.
Perform this configuration on each nodes ports intended for accessing RRPP rings.
Follow these steps to configure RRPP ports:
3-12
z The maximum number of rings that can be configured on a device in all RRPP domains is 16.
z If a device carries multiple RRPP rings in an RRPP domain, only one ring can be configured as
the primary ring on the device and the role of the device on a subring can only be an edge node or
an assistant-edge node.
3-13
When configuring an edge node, you must first configure the primary ring before configuring the
subrings.
Perform this configuration on a device to be configured as an edge node.
Follow these steps to specify an edge node:
When configuring an assistant-edge node, you must first configure the primary ring before configuring
the subrings.
Perform this configuration on a device to be configured as an assistant-edge node.
Follow these steps to specify an assistant-edge node:
3-14
On an edge node or assistant-edge node, enable/disable the primary ring and subrings separately as
follows:
z Enable the primary ring of an RRPP domain before enabling subrings of the RRPP domain.
z Disable the primary ring of an RRPP domain after disabling all subrings of the RRPP domain.
3-15
z You can assign a subring to only one RRPP ring group. Make sure that the RRPP ring group
configured on the edge node and that configured on the assistant-edge node must contain the
same subrings. Otherwise, the RRPP ring group cannot operate normally.
z Ensure that the subrings in an RRPP ring group share the same edge node and assistant-edge
node, and the edge node and the assistant edge node have the same SRPTs.
z Ensure that a device plays the same role on the subrings in an RRPP ring group. The role can be
the edge node or the assistant-edge node.
z Ensure that the RRPP ring group on the edge node and that on the assistant-edge node have the
same configurations and activation status.
z Ensure that all subrings in an RRPP ring group have the same SRPTs. If the SRPTs of these
subrings are configured or modified differently, the RRPP ring group cannot operate normally.
3-16
Networking requirements
z Device A, Device B, Device C, and Device D constitute RRPP domain 1, specify the primary
control VLAN of RRPP domain 1 as VLAN 4092, and RRPP domain 1 protects all VLANs;
z Device A, Device B, Device C and Device D constitute primary ring 1;
z Specify Device A as the master node of primary ring 1, GigabitEthernet 1/0/1 as the primary port
and GigabitEthernet 1/0/2 as the secondary port;
z Specify Device B, Device C and Device D as the transit nodes of primary ring 1, their
GigabitEthernet 1/0/1 as the primary port and GigabitEthernet 1/0/2 as the secondary port;
Figure 3-8 Network diagram for single ring configuration
Configuration procedure
1) Configuration on Device A
# Configure the suppression time of physical-link-state changes on GigabitEthernet 1/0/1 and
GigabitEthernet 1/0/2 as zero, disable STP, configure the two ports as trunk ports, and assign them to
all VLANs, and configure them to trust the 802.1p precedence of the received packets.
3-17
# Create RRPP domain 1, configure VLAN 4092 as the primary control VLAN of RRPP domain 1, and
configure the VLANs mapped to MSTIs 0 through 16 as the protected VLANs of RRPP domain 1.
[DeviceA] rrpp domain 1
[DeviceA-rrpp-domain1] control-vlan 4092
[DeviceA-rrpp-domain1] protected-vlan reference-instance 0 to 16
# Configure Device A as the master node of primary ring 1, with GigabitEthernet 1/0/1 as the primary
port and GigabitEthernet 1/0/2 as the secondary port, and enable ring 1.
[DeviceA-rrpp-domain1] ring 1 node-mode master primary-port gigabitethernet 1/0/1
secondary-port gigabitethernet 1/0/2 level 0
[DeviceA-rrpp-domain1] ring 1 enable
[DeviceA-rrpp-domain1] quit
# Enable RRPP.
[DeviceA] rrpp enable
2) Configuration on Device B
# Configure the suppression time of physical-link-state changes on GigabitEthernet 1/0/1 and
GigabitEthernet 1/0/2 as zero, disable STP, configure the two ports as trunk ports, and assign them to
all VLANs, and configure them to trust the 802.1p precedence of the received packets.
<DeviceB> system-view
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] link-delay 0
[DeviceB-GigabitEthernet1/0/1] undo stp enable
[DeviceB-GigabitEthernet1/0/1] port link-type trunk
[DeviceB-GigabitEthernet1/0/1] port trunk permit vlan all
[DeviceB-GigabitEthernet1/0/1] qos trust dot1p
[DeviceB-GigabitEthernet1/0/1] quit
[DeviceB] interface gigabitethernet 1/0/2
[DeviceB-GigabitEthernet1/0/2] link-delay 0
[DeviceB-GigabitEthernet1/0/2] undo stp enable
[DeviceB-GigabitEthernet1/0/2] port link-type trunk
[DeviceB-GigabitEthernet1/0/2] port trunk permit vlan all
3-18
# Create RRPP domain 1, configure VLAN 4092 as the primary control VLAN of RRPP domain 1, and
configure the VLANs mapped to MSTIs 0 through 16 as the protected VLANs of RRPP domain 1.
[DeviceB] rrpp domain 1
[DeviceB-rrpp-domain1] control-vlan 4092
[DeviceB-rrpp-domain1] protected-vlan reference-instance 0 to 16
# Configure Device B as the transit node of primary ring 1, with GigabitEthernet 1/0/1 as the primary
port and GigabitEthernet 1/0/2 as the secondary port, and enable ring 1.
[DeviceB-rrpp-domain1] ring 1 node-mode transit primary-port gigabitethernet 1/0/1
secondary-port gigabitethernet 1/0/2 level 0
[DeviceB-rrpp-domain1] ring 1 enable
[DeviceB-rrpp-domain1] quit
# Enable RRPP.
[DeviceB] rrpp enable
3) Configuration on Device C
The configuration on Device C is similar to that on Device B and thus omitted here.
4) Configuration on Device D
The configuration on Device C is similar to that on Device B and thus omitted here.
5) Verification
After the above configuration, you can use the display command to view RRPP configuration and
operational information on each device.
Networking requirements
3-19
Configuration procedure
1) Configuration on Device A
# Configure the suppression time of physical-link-state changes on GigabitEthernet 1/0/1 and
GigabitEthernet 1/0/2 as zero, disable STP, configure the two ports as trunk ports, and assign them to
all VLANs, and configure them to trust the 802.1p precedence of the received packets.
<DeviceA> system-view
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] link-delay 0
[DeviceA-GigabitEthernet1/0/1] undo stp enable
[DeviceA-GigabitEthernet1/0/1] port link-type trunk
[DeviceA-GigabitEthernet1/0/1] port trunk permit vlan all
[DeviceA-GigabitEthernet1/0/1] qos trust dot1p
[DeviceA-GigabitEthernet1/0/1] quit
[DeviceA] interface gigabitethernet 1/0/2
[DeviceA-GigabitEthernet1/0/2] link-delay 0
[DeviceA-GigabitEthernet1/0/2] undo stp enable
[DeviceA-GigabitEthernet1/0/2] port link-type trunk
[DeviceA-GigabitEthernet1/0/2] port trunk permit vlan all
[DeviceA-GigabitEthernet1/0/2] qos trust dot1p
[DeviceA-GigabitEthernet1/0/2] quit
# Create RRPP domain 1, configure VLAN 4092 as the primary control VLAN of RRPP domain 1, and
configure the VLANs mapped to MSTIs 0 through 16 as the protected VLANs of RRPP domain 1.
[DeviceA] rrpp domain 1
[DeviceA-rrpp-domain1] control-vlan 4092
[DeviceA-rrpp-domain1] protected-vlan reference-instance 0 to 16
# Configure Device A as the master node of primary ring 1, with GigabitEthernet 1/0/1 as the primary
port and GigabitEthernet 1/0/2 as the secondary port, and enable ring 1.
[DeviceA-rrpp-domain1] ring 1 node-mode master primary-port gigabitethernet 1/0/1
secondary-port gigabitethernet 1/0/2 level 0
[DeviceA-rrpp-domain1] ring 1 enable
3-20
# Enable RRPP.
[DeviceA] rrpp enable
2) Configuration on Device B
# Configure the suppression time of physical-link-state changes on GigabitEthernet 1/0/1,
GigabitEthernet 1/0/2, and GigabitEthernet 1/0/3 as zero, disable STP, configure the ports as trunk
ports, and assign them to all VLANs, and configure them to trust the 802.1p precedence of the
received packets.
<DeviceB> system-view
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] link-delay 0
[DeviceB-GigabitEthernet1/0/1] undo stp enable
[DeviceB-GigabitEthernet1/0/1] port link-type trunk
[DeviceB-GigabitEthernet1/0/1] port trunk permit vlan all
[DeviceB-GigabitEthernet1/0/1] qos trust dot1p
[DeviceB-GigabitEthernet1/0/1] quit
[DeviceB] interface gigabitethernet 1/0/2
[DeviceB-GigabitEthernet1/0/2] link-delay 0
[DeviceB-GigabitEthernet1/0/2] undo stp enable
[DeviceB-GigabitEthernet1/0/2] port link-type trunk
[DeviceB-GigabitEthernet1/0/2] port trunk permit vlan all
[DeviceB-GigabitEthernet1/0/2] qos trust dot1p
[DeviceB-GigabitEthernet1/0/2] quit
[DeviceB] interface gigabitethernet 1/0/3
[DeviceB-GigabitEthernet1/0/3] link-delay 0
[DeviceB-GigabitEthernet1/0/3] undo stp enable
[DeviceB-GigabitEthernet1/0/3] port link-type trunk
[DeviceB-GigabitEthernet1/0/3] port trunk permit vlan all
[DeviceB-GigabitEthernet1/0/3] qos trust dot1p
[DeviceB-GigabitEthernet1/0/3] quit
# Create RRPP domain 1, configure VLAN 4092 as the primary control VLAN of RRPP domain 1, and
configure the VLANs mapped to MSTIs 0 through 16 as the protected VLANs of RRPP domain 1.
[DeviceB] rrpp domain 1
[DeviceB-rrpp-domain1] control-vlan 4092
[DeviceB-rrpp-domain1] protected-vlan reference-instance 0 to 16
# Configure Device B as a transit node of primary ring 1, with GigabitEthernet 1/0/1 as the primary port
and GigabitEthernet 1/0/2 as the secondary port, and enable ring 1.
[DeviceB-rrpp-domain1] ring 1 node-mode transit primary-port gigabitethernet 1/0/1
secondary-port gigabitethernet 1/0/2 level 0
[DeviceB-rrpp-domain1] ring 1 enable
# Configure Device B as the edge node of subring 2, with GigabitEthernet 1/0/3 as the edge port, and
enable ring 2.
[DeviceB-rrpp-domain1] ring 2 node-mode edge edge-port gigabitethernet 1/0/3
[DeviceB-rrpp-domain1] ring 2 enable
[DeviceB-rrpp-domain1] quit
3-21
# Create RRPP domain 1, configure VLAN 4092 as the primary control VLAN of RRPP domain 1, and
configure VLANs mapped to MSTIs 0 through 16 as the protected VLANs of RRPP domain 1.
[DeviceC] rrpp domain 1
[DeviceC-rrpp-domain1] control-vlan 4092
[DeviceC-rrpp-domain1] protected-vlan reference-instance 0 to 16
# Configure Device C as a transit node of primary ring 1, with GigabitEthernet 1/0/1 as the primary port
and GigabitEthernet 1/0/2 as the secondary port, and enable ring 1.
[DeviceC-rrpp-domain1] ring 1 node-mode transit primary-port gigabitethernet 1/0/1
secondary-port gigabitethernet 1/0/2 level 0
[DeviceC-rrpp-domain1] ring 1 enable
# Configure Device C as the assistant-edge node of subring 2, with GigabitEthernet 1/0/3 as the edge
port, and enable ring 2.
[DeviceC-rrpp-domain1] ring 2 node-mode assistant-edge edge-port gigabitethernet 1/0/3
[DeviceC-rrpp-domain1] ring 2 enable
[DeviceC-rrpp-domain1] quit
# Enable RRPP.
3-22
4) Configuration on Device D
# Configure the suppression time of physical-link-state changes on GigabitEthernet 1/0/1 and
GigabitEthernet 1/0/2 as zero, disable STP, configure the two ports as trunk ports, and assign them to
all VLANs, and configure them to trust the 802.1p precedence of the received packets.
<DeviceD> system-view
[DeviceD] interface gigabitethernet 1/0/1
[DeviceD-GigabitEthernet1/0/1] link-delay 0
[DeviceD-GigabitEthernet1/0/1] undo stp enable
[DeviceD-GigabitEthernet1/0/1] port link-type trunk
[DeviceD-GigabitEthernet1/0/1] port trunk permit vlan all
[DeviceD-GigabitEthernet1/0/1] qos trust dot1p
[DeviceD-GigabitEthernet1/0/1] quit
[DeviceD] interface gigabitethernet 1/0/2
[DeviceD-GigabitEthernet1/0/2] link-delay 0
[DeviceD-GigabitEthernet1/0/2] undo stp enable
[DeviceD-GigabitEthernet1/0/2] port link-type trunk
[DeviceD-GigabitEthernet1/0/2] port trunk permit vlan all
[DeviceD-GigabitEthernet1/0/2] qos trust dot1p
[DeviceD-GigabitEthernet1/0/2] quit
# Create RRPP domain 1, configure VLAN 4092 as the primary control VLAN of RRPP domain 1, and
configure VLANs mapped to MSTIs 0 through 16 as the protected VLANs of RRPP domain 1.
[DeviceD] rrpp domain 1
[DeviceD-rrpp-domain1] control-vlan 4092
[DeviceD-rrpp-domain1] protected-vlan reference-instance 0 to 16
# Configure Device D as the transit node of primary ring 1, with GigabitEthernet 1/0/1 as the primary
port and GigabitEthernet 1/0/2 as the secondary port, and enable ring 1.
[DeviceD-rrpp-domain1] ring 1 node-mode transit primary-port gigabitethernet 1/0/1
secondary-port gigabitethernet 1/0/2 level 0
[DeviceD-rrpp-domain1] ring 1 enable
[DeviceD-rrpp-domain1] quit
# Enable RRPP.
[DeviceD] rrpp enable
5) Configuration on Device E
# Configure the suppression time of physical-link-state changes on GigabitEthernet 1/0/1 and
GigabitEthernet 1/0/2 as zero, disable STP, configure the two ports as trunk ports, and assign them to
all VLANs, and configure them to trust the 802.1p precedence of the received packets.
<DeviceE> system-view
[DeviceE] interface gigabitethernet 1/0/1
[DeviceE-GigabitEthernet1/0/1] link-delay 0
[DeviceE-GigabitEthernet1/0/1] undo stp enable
[DeviceE-GigabitEthernet1/0/1] port link-type trunk
[DeviceE-GigabitEthernet1/0/1] port trunk permit vlan all
[DeviceE-GigabitEthernet1/0/1] qos trust dot1p
[DeviceE-GigabitEthernet1/0/1] quit
3-23
# Create RRPP domain 1, configure VLAN 4092 as the primary control VLAN of RRPP domain 1, and
configure VLANs mapped to MSTIs 0 through 16 as the protected VLANs of RRPP domain 1.
[DeviceE] rrpp domain 1
[DeviceE-rrpp-domain1] control-vlan 4092
[DeviceE-rrpp-domain1] protected-vlan reference-instance 0 to 16
# Configure Device E as the master node of subring 2, with GigabitEthernet 1/0/1 as the primary port
and GigabitEthernet 1/0/2 as the secondary port, and enable ring 2.
[DeviceE-rrpp-domain1] ring 2 node-mode master primary-port gigabitethernet 1/0/1
secondary-port gigabitethernet 1/0/2 level 1
[DeviceE-rrpp-domain1] ring 2 enable
[DeviceE-rrpp-domain1] quit
# Enable RRPP.
[DeviceE] rrpp enable
6) Verification
After the configuration, you can use the display command to view RRPP configuration and operational
information on each device.
Networking requirements
z Device A, Device B, Device C, Device D, and Device F constitute RRPP domain 1, and VLAN 100
is the primary control VLAN of the RRPP domain. Device A is the master node of the primary ring
Ring 1; Device D is the transit node of the primary ring Ring 1; Device F is the master node of the
subring Ring 3; Device C is the edge node of the subring Ring 3; Device B is the assistant-edge
node of the subring Ring 3.
z Device A, Device B, Device C, Device D, and Device E constitute RRPP domain 2, and VLAN 105
is the primary control VLAN of the RRPP domain. Device A is the master node of the primary ring
Ring 1; Device D is the transit node of the primary ring Ring 1; Device E is the master node of the
subring Ring 2; Device C is the edge node of the subring Ring 2; Device B is the assistant-edge
node of the subring Ring 2.
z Specify VLAN 10 as the protected VLAN of domain 1, and VLAN 20 as the protected VLAN of
domain 2. Thus, you can achieve VLAN-based load balancing on the primary ring.
z As the edge node and assistant-edge node of subring Ring 2 is the same as those of subring Ring
3, and the two subrings have the same SRPTs, you can add subrings Ring 2 and Ring 3 to the
RRPP ring group to reduce Edge-Hello traffic.
3-24
Configuration procedure
1) Configuration on Device A
# Create VLANs 10 and 20, map VLAN 10 to MSTI 1 and VLAN 20 to MSTI 2, and activate MST region
configuration.
<DeviceA> system-view
[DeviceA] vlan 10
[DeviceA-vlan10] quit
[DeviceA] vlan 20
[DeviceA-vlan20] quit
[DeviceA] stp region-configuration
[DeviceA-mst-region] instance 1 vlan 10
[DeviceA-mst-region] instance 2 vlan 20
[DeviceA-mst-region] active region-configuration
[DeviceA-mst-region] quit
3-25
# Create RRPP domain 1, configure VLAN 100 as the primary control VLAN of RRPP domain 1, and
configure the VLAN mapped to MSTI 1 as the protected VLAN of RRPP domain 1.
[DeviceA] rrpp domain 1
[DeviceA-rrpp-domain1] control-vlan 100
[DeviceA-rrpp-domain1] protected-vlan reference-instance 1
# Configure Device A as the master node of primary ring 1, with GigabitEthernet 1/0/1 as the primary
port and GigabitEthernet 1/0/2 as the secondary port, and enable ring 1.
[DeviceA-rrpp-domain1] ring 1 node-mode master primary-port gigabitethernet 1/0/1
secondary-port gigabitethernet 1/0/2 level 0
[DeviceA-rrpp-domain1] ring 1 enable
[DeviceA-rrpp-domain1] quit
# Create RRPP domain 2, configure VLAN 105 as the primary control VLAN of RRPP domain 2, and
configure the VLAN mapped to MSTI 2 as the protected VLAN of RRPP domain 2.
[DeviceA] rrpp domain 2
[DeviceA-rrpp-domain2] control-vlan 105
[DeviceA-rrpp-domain2] protected-vlan reference-instance 2
# Configure Device A as the master node of primary ring 1, with GigabitEthernet 1/0/2 as the master
port and GigabitEthernet 1/0/1 as the secondary port, and enable ring 1.
[DeviceA-rrpp-domain2] ring 1 node-mode master primary-port gigabitethernet 1/0/2
secondary-port gigabitethernet 1/0/1 level 0
[DeviceA-rrpp-domain2] ring 1 enable
[DeviceA-rrpp-domain2] quit
# Enable RRPP.
[DeviceA] rrpp enable
2) Configuration on Device B
# Create VLANs 10 and 20, map VLAN 10 to MSTI 1 and VLAN 20 to MSTI 2, and activate MST region
configuration.
<DeviceB> system-view
[DeviceB] vlan 10
[DeviceB-vlan10] quit
[DeviceB] vlan 20
[DeviceB-vlan20] quit
[DeviceB] stp region-configuration
[DeviceB-mst-region] instance 1 vlan 10
[DeviceB-mst-region] instance 2 vlan 20
[DeviceB-mst-region] active region-configuration
[DeviceB-mst-region] quit
3-26
# Create RRPP domain 1, configure VLAN 100 as the primary control VLAN of RRPP domain 1, and
configure the VLAN mapped to MSTI 1 as the protected VLAN of RRPP domain 1.
[DeviceB] rrpp domain 1
[DeviceB-rrpp-domain1] control-vlan 100
3-27
# Configure Device B as a transit node of primary ring 1 in RRPP domain 1, with GigabitEthernet 1/0/1
as the primary port and GigabitEthernet 1/0/2 as the secondary port, and enable ring 1.
[DeviceB-rrpp-domain1] ring 1 node-mode transit primary-port gigabitethernet 1/0/1
secondary-port gigabitethernet 1/0/2 level 0
[DeviceB-rrpp-domain1] ring 1 enable
# Configure Device B as the assistant-edge node of subring 3 in RRPP domain 1, with GigabitEthernet
1/0/4 as the edge port, and enable subring 3.
[DeviceB-rrpp-domain1] ring 3 node-mode assistant-edge edge-port gigabitethernet 1/0/4
[DeviceB-rrpp-domain1] ring 3 enable
[DeviceB-rrpp-domain1] quit
# Create RRPP domain 2, configure VLAN 105 as the primary control VLAN of RRPP domain 2, and
configure the VLAN mapped to MSTI 2 as the protected VLAN of RRPP domain 2.
[DeviceB] rrpp domain 2
[DeviceB-rrpp-domain2] control-vlan 105
[DeviceB-rrpp-domain2] protected-vlan reference-instance 2
# Configure Device B as the transit node of primary ring 1, with GigabitEthernet 1/0/1 as the primary
port and GigabitEthernet 1/0/2 as the secondary port, and enable ring 1.
[DeviceB-rrpp-domain2] ring 1 node-mode transit primary-port gigabitethernet 1/0/1
secondary-port gigabitethernet 1/0/2 level 0
[DeviceB-rrpp-domain2] ring 1 enable
# Configure Device B as the assistant-edge node of subring 2 in RRPP domain 2, with GigabitEthernet
1/0/3 as the edge port, and enable subring 2.
[DeviceB-rrpp-domain2] ring 2 node-mode assistant-edge edge-port gigabitethernet 1/0/3
[DeviceB-rrpp-domain2] ring 2 enable
[DeviceC-rrpp-domain2] quit
# Enable RRPP.
[DeviceB] rrpp enable
3) Configuration on Device C
# Create VLANs 10 and 20, map VLAN 10 to MSTI 1 and VLAN 20 to MSTI 2, and activate MST region
configuration.
<DeviceC> system-view
[DeviceC] vlan 10
[DeviceC-vlan10] quit
[DeviceC] vlan 20
[DeviceC-vlan20] quit
[DeviceC] stp region-configuration
[DeviceC-mst-region] instance 1 vlan 10
[DeviceC-mst-region] instance 2 vlan 20
[DeviceC-mst-region] active region-configuration
[DeviceC-mst-region] quit
3-28
# Create RRPP domain 1, configure VLAN 10 as the primary control VLAN of RRPP domain 1, and
configure the VLAN mapped to MSTI 1 as the protected VLAN of RRPP domain 1.
[DeviceC] rrpp domain 1
[DeviceC-rrpp-domain1] control-vlan 100
[DeviceC-rrpp-domain1] protected-vlan reference-instance 1
3-29
# Configure Device C as the edge node of subring 3 in RRPP domain 1, with GigabitEthernet 1/0/4 as
the edge port, and enable subring 3.
[DeviceC-rrpp-domain1] ring 3 node-mode edge edge-port gigabitethernet 1/0/4
[DeviceC-rrpp-domain1] ring 3 enable
[DeviceC-rrpp-domain1] quit
# Create RRPP domain 2, configure VLAN 105 as the primary control VLAN of RRPP domain 2, and
configure the VLAN mapped to MSTI 2 as the protected VLAN of RRPP domain 2.
[DeviceC] rrpp domain 2
[DeviceC-rrpp-domain2] control-vlan 105
[DeviceC-rrpp-domain2] protected-vlan reference-instance 2
# Configure Device C as the transit node of primary ring 1 in RRPP domain 2, with GigabitEthernet
1/0/1 as the primary port and GigabitEthernet 1/0/2 as the secondary port, and enable ring 1.
[DeviceC-rrpp-domain2] ring 1 node-mode transit primary-port gigabitethernet 1/0/1
secondary-port gigabitethernet 1/0/2 level 0
[DeviceC-rrpp-domain2] ring 1 enable
# Configure Device C as the edge node of subring 2 in RRPP domain 2, with GigabitEthernet 1/0/3 as
the edge port, and enable subring 2.
[DeviceC-rrpp-domain2] ring 2 node-mode edge edge-port gigabitethernet 1/0/3
[DeviceC-rrpp-domain2] ring 2 enable
[DeviceC-rrpp-domain2] quit
# Enable RRPP.
[DeviceC] rrpp enable
4) Configuration on Device D
# Create VLANs 10 and 20, map VLAN 10 to MSTI 1 and VLAN 20 to MSTI 2, and activate MST region
configuration.
<DeviceD> system-view
[DeviceD] vlan 10
[DeviceD-vlan10] quit
[DeviceD] vlan 20
[DeviceD-vlan20] quit
[DeviceD] stp region-configuration
[DeviceD-mst-region] instance 1 vlan 10
[DeviceD-mst-region] instance 2 vlan 20
[DeviceD-mst-region] active region-configuration
[DeviceD-mst-region] quit
3-30
# Create RRPP domain 1, configure VLAN 100 as the primary control VLAN of RRPP domain 1, and
configure the VLAN mapped to MSTI 1 as the protected VLAN of RRPP domain 1.
[DeviceD] rrpp domain 1
[DeviceD-rrpp-domain1] control-vlan 100
[DeviceD-rrpp-domain1] protected-vlan reference-instance 1
# Configure Device D as the transit node of primary ring 1 in RRPP domain 1, with GigabitEthernet
1/0/1 as the primary port and GigabitEthernet 1/0/2 as the secondary port, and enable ring 1.
[DeviceD-rrpp-domain1] ring 1 node-mode transit primary-port gigabitethernet 1/0/1
secondary-port gigabitethernet 1/0/2 level 0
[DeviceD-rrpp-domain1] ring 1 enable
[DeviceD-rrpp-domain1] quit
# Create RRPP domain 2, configure VLAN 105 as the primary control VLAN of RPPP domain 2, and
configure the VLAN mapped to MSTI 2 as the protected VLAN of RRPP domain 2.
[DeviceD] rrpp domain 2
[DeviceD-rrpp-domain2] control-vlan 105
[DeviceD-rrpp-domain2] protected-vlan reference-instance 2
# Configure Device D as the transit node of primary ring 1 in RRPP domain 2, with GigabitEthernet
1/0/1 as the primary port and GigabitEthernet 1/0/2 as the secondary port, and enable ring 1.
[DeviceD-rrpp-domain2] ring 1 node-mode transit primary-port gigabitethernet 1/0/1
secondary-port gigabitethernet 1/0/2 level 0
[DeviceD-rrpp-domain2] ring 1 enable
[DeviceD-rrpp-domain2] quit
# Enable RRPP.
[DeviceD] rrpp enable
5) Configuration on Device E
# Create VLAN 20, map VLAN 20 to MSTI 2, and activate MST region configuration.
<DeviceE> system-view
[DeviceE] vlan 20
3-31
# Create RRPP domain 2, configure VLAN 105 as the primary control VLAN, and configure the VLAN
mapped to MSTI 2 as the protected VLAN.
[DeviceE] rrpp domain 2
[DeviceE-rrpp-domain2] control-vlan 105
[DeviceE-rrpp-domain2] protected-vlan reference-instance 2
# Configure Device E as the master mode of subring 2 in RRPP domain 2, with GigabitEthernet 1/0/2
as the primary port and GigabitEthernet 1/0/1 as the secondary port, and enable ring 2.
[DeviceE-rrpp-domain2] ring 2 node-mode master primary-port gigabitethernet 1/0/2
secondary-port gigabitethernet 1/0/1 level 1
[DeviceE-rrpp-domain2] ring 2 enable
[DeviceE-rrpp-domain2] quit
# Enable RRPP.
[DeviceE] rrpp enable
6) Configuration on Device F
# Create VLAN 10, map VLAN 10 to MSTI 1, and activate MST region configuration.
<DeviceF> system-view
[DeviceF] vlan 10
[DeviceF-vlan10] quit
[DeviceF] stp region-configuration
[DeviceF-mst-region] instance 1 vlan 10
3-32
# Create RRPP domain 1, configure VLAN 100 as the primary control VLAN, and configure the VLAN
mapped to MSTI 1 as the protected VLAN.
[DeviceF] rrpp domain 1
[DeviceF-rrpp-domain1] control-vlan 100
[DeviceF-rrpp-domain1] protected-vlan reference-instance 1
# Configure Device F as the master node of subring 3 in RRPP domain 1, with GigabitEthernet 1/0/1
as the primary port and GigabitEthernet 1/0/2 as the secondary port, and enable subring 3.
[DeviceF-rrpp-domain1] ring 3 node-mode master primary-port gigabitethernet 1/0/1
secondary-port gigabitethernet 1/0/2 level 1
[DeviceF-rrpp-domain1] ring 3 enable
[DeviceF-rrpp-domain1] quit
# Enable RRPP.
[DeviceF] rrpp enable
7) RRPP ring group configurations on Device B and Device C after the configurations above
# Create RRPP ring group 1 on Device B, and add subrings 2 and 3 to the RRPP ring group.
[DeviceB] rrpp ring-group 1
[DeviceB-rrpp-ring-group1] domain 2 ring 2
[DeviceB-rrpp-ring-group1] domain 1 ring 3
# Create RRPP ring group 1 on Device C, and add subrings 2 and 3 to the RRPP ring group.
[DeviceC] rrpp ring-group 1
[DeviceC-rrpp-ring-group1] domain 2 ring 2
[DeviceC-rrpp-ring-group1] domain 1 ring 3
3-33
Troubleshooting
Symptom:
When the link state is normal, the master node cannot receive Hello packets, and the master node
unblocks the secondary port.
Analysis:
The reasons may be:
z RRPP is not enabled on some nodes in the RRPP ring.
z The domain ID or primary control VLAN ID is not the same for the nodes in the same RRPP ring.
z Some ports are abnormal.
Solution:
z Use the display rrpp brief command to check whether RRPP is enabled for all nodes. If not, use
the rrpp enable command and the ring enable command to enable RRPP and RRPP rings for all
nodes.
z Use the display rrpp brief command to check whether the domain ID and primary control VLAN
ID are the same for all nodes. If not, set the same domain ID and primary control VLAN ID for the
nodes.
z Use the display rrpp verbose command to check the link state of each port in each ring.
z Use the debugging rrpp command on each node to check whether a port receives or transmits
Hello packets. If not, Hello packets are lost.
3-34
When performing DLDP configuration, go to these sections for information you are interested in:
z Overview
z DLDP Configuration Task List
z Enabling DLDP
z Setting DLDP Mode
z Setting the Interval for Sending Advertisement Packets
z Setting the DelayDown Timer
z Setting the Port Shutdown Mode
z Configuring DLDP Authentication
z Resetting DLDP State
z Displaying and Maintaining DLDP
z DLDP Configuration Example
z Troubleshooting
Overview
Background
Sometimes, unidirectional links may appear in networks. On a unidirectional link, one end can receive
packets from the other end but the other end cannot. Unidirectional links result in problems such as
loops in an STP-enabled network.
As for fiber links, two kinds of unidirectional links exist. One occurs when fibers are cross-connected,
as shown in Figure 4-1. The other occurs when one end of a fiber is not connected or one fiber of a
fiber pair gets disconnected, as illustrated by the hollow arrows in Figure 4-2.
Figure 4-1 Unidirectional fiber link: cross-connected fibers
Device A
GE1/0/50 GE1/0/51
GE1/0/50 GE1/0/51
Device B
PC
4-1
Device A
GE1/0/50 GE1/0/51
GE1/0/50 GE1/0/51
Device B
PC
The Device Link Detection Protocol (DLDP) can detect the link status of a fiber cable or twisted pair.
On detecting a unidirectional link, DLDP, as configured, can shut down the related port automatically or
prompt users to take actions to avoid network problems.
As a data link layer protocol, DLDP cooperates with physical layer protocols to monitor link status.
While the auto-negotiation mechanism provided by the physical layer detects physical signals and
faults, DLDP performs operations such as identifying peer devices, detecting unidirectional links, and
shutting down unreachable ports. The cooperation of physical layer protocols and DLDP ensures that
physical/logical unidirectional links can be detected and shut down and prevents failure of other
protocols such as STP. If both ends of a link are operating normally at the physical layer, DLDP detects
whether the link is correctly connected at the link layer and whether the two ends can exchange
packets properly. This is beyond the capability of the auto-negotiation mechanism at the physical layer.
A device is in one of these DLDP link states: Initial, Inactive, Active, Advertisement, Probe, Disable,
and DelayDown, as described in Table 4-1.
State Indicates
Initial DLDP is disabled.
Inactive DLDP is enabled but the link is down.
DLDP is enabled and the link is up, or the neighbor entries have
Active
been cleared.
All neighbors are bi-directionally reachable or DLDP has been in
Advertisement active state for more than five seconds. This is a relatively state
where no unidirectional link has been detected.
4-2
DLDP timers
4-3
DLDP mode
DLDP can operate in two modes: normal mode and enhanced mode, as described below.
z In normal DLDP mode, when an entry timer expires, the device removes the corresponding
neighbor entry and sends an Advertisement packet with RSY tag.
z In enhanced DLDP mode, when an entry timer expires, the Enhanced timer is triggered and the
device sends up to eight Probe packets at a frequency of one packet per second to test the
neighbor. If no Echo packet is received from the neighbor when the Echo timer expires, the device
transits to the Disable state.
The enhanced DLDP mode is designed for addressing black holes. It prevents the cases where one
end of a link is up and the other is down. If you configure the speed and the duplex mode by force on a
device, the situation shown in Figure 4-3 may occur, where Port B is actually down but the state of Port
B cannot be detected by common data link protocols, so Port A is still up. In enhanced DLDP mode,
however, Port A tests Port B after the Entry timer concerning Port B expires. Port A then transits to the
Disable state if it receives no Echo packet from Port A when the Echo timer expires. As Port B is
physically down, it is in the Inactive DLDP state.
Figure 4-3 A case for Enhanced DLDP mode
4-4
You can prevent network attacks and illegal detect through DLDP authentication. Three DLDP
authentication modes exist, as described below.
z Non-authentication. In this mode, the sending side sets the Authentication field and the
Authentication type field of DLDP packets to 0. The receiving side checks the values of the two
fields of received DLDP packets and drops the packets with the two fields conflicting with the
corresponding local configuration.
z Plain text authentication. In this mode, before sending a DLDP packet, the sending side sets the
Authentication field to the password configured in plain text and sets the Authentication type field
to 1. The receiving side checks the values of the two fields of received DLDP packets and drops
the packets with the two fields conflicting with the corresponding local configuration.
z MD5 authentication. In this mode, before sending a packet, the sending side encrypts the user
configured password using MD5 algorithm, assigns the digest to the Authentication field, and sets
the Authentication type field to 2. The receiving side checks the values of the two fields of received
DLDP packets and drops the packets with the two fields conflicting with the corresponding local
configuration.
DLDP implementation
1) On a DLDP-enabled link that is in up state, DLDP sends DLDP packets to the peer device and
processes the DLDP packets received from the peer device. DLDP packets sent vary with DLDP
states. Table 4-4 lists DLDP states and the corresponding packets.
4-5
4-6
3) If no echo packet is received from the neighbor, DLDP performs the following processing.
Table 4-6 Processing procedure when no echo packet is received from the neighbor
If the port shutdown mode upon detection of a unidirectional link is set to auto, DLDP sets the state of
the port where a unidirectional link is detected to DLDP down automatically. A DLDP down port cannot
forward service traffic or send/receive any PDUs except DLDPDUs.
On a DLDP down port, DLDP monitors the unidirectional link. Once DLDP finds out that the state of the
link has restored to bidirectional, it brings up the port. The specific process is as follows:
The DLDP down port sends out a RecoverProbe packet, which carries only information about the local
port, every two seconds. Upon receiving the RecoverProbe packet, the remote end returns a
RecoverEcho packet. Upon receiving the RecoverEcho packet, the local port checks whether neighbor
information in the RecoverEcho packet is the same as the local port information. If they are the same,
the link between the local port and the neighbor is considered to have been restored to a bidirectional
link, and the port will transit from Disable state to Active state and re-establish neighborship with the
neighbor.
Only DLDP down ports can send and process Recover packets, including RecoverProbe packets and
RecoverEcho packets. The auto-recovery mechanism does not take effect on ports manually shut
down.
A DLDP neighbor can be in one of the three states described in Table 4-7.
4-7
Task Remarks
Enabling DLDP Required
Setting DLDP Mode Optional
Setting the Interval for Sending Advertisement Packets Optional
Setting the DelayDown Timer Optional
Setting the Port Shutdown Mode Optional
Configuring DLDP Authentication Optional
Resetting DLDP State Optional
Note that:
z DLDP takes effects only on Ethernet interfaces.
z DLDP can detect unidirectional links only after all links are connected. Therefore, before enabling
DLDP, make sure that optical fibers or copper twisted pairs are connected.
z To ensure unidirectional links can be detected, make sure these settings are the same on the both
sides: DLDP state (enabled/disabled), the interval for sending Advertisement packets,
authentication mode, and password.
z Keep the interval for sending Advertisement packets adequate to enable unidirectional links to be
detected in time. If the interval is too long, unidirectional links cannot be terminated in time; if the
interval is too short, network traffic may increase in vain.
z DLDP does not process any link aggregation control protocol (LACP) events. The links in an
aggregation group are treated individually in DLDP.
z When connecting two DLDP-enabled devices, make sure the DLDP software version ID fields of
the DLDP packets exchanged between the two devices are the same. Otherwise, DLDP may
operate improperly.
Enabling DLDP
To properly configure DLDP on the device, you need to first enable DLDP globally, and then enable it
on each port.
4-8
You can enable or disable DLDP on a Layer 2 Ethernet port (an optical port or electrical port).
4-9
z The interval for sending Advertisement packets applies to all DLDP-enabled ports.
z Set the interval for sending Advertisement packets to a value no longer than one-third of the STP
convergence time. If the interval is too long, STP loops may occur before unidirectional links are
torn down, and it takes a long time for the device to detect unidirectional links, thus causing more
traffic forwarding errors; if the interval is too short, unnecessary Advertisement packets can be
generated to consume bandwidth. Therefore, you are recommended to use the default value.
z To enable DLDP to operate properly, make sure the intervals for sending Advertisement packets
on both sides of a link are the same.
4-10
z On a port with both remote OAM loopback and DLDP enabled, if the port shutdown mode is auto
mode, the port will be shut down by DLDP when it receives a packet sent by itself, causing remote
OAM loopback to operate improperly. To prevent this, you need to set the port shutdown mode to
auto mode.
z If the device is busy, or the CPU utilization is high, normal links may be treated as unidirectional
links. In this case, you can set the port shutdown mode to manual mode to eliminate the effects
caused by false unidirectional link report.
To enable DLDP to operate properly, make sure the DLDP authentication modes and the passwords of
the both sides of a link are the same.
4-11
Resetting DLDP state in system view applies to all the ports shut down by DLDP.
Follow these steps to reset DLDP in system view:
Resetting DLDP state in port view or port group view applies to the current port or all the ports in the
port group shut down by DLDP.
Follow these steps to reset DLDP state in port view/port group view:
4-12
z Device A and Device B are connected through two fiber pairs, in which two fibers are
cross-connected, as shown in Figure 4-4.
z It is desired that the unidirectional links can be disconnected on being detected; and the ports shut
down by DLDP can be restored after the fiber connections are corrected.
Figure 4-4 Network diagram for DLDP configuration
Device A
GE1/0/50 GE1/0/51
GE1/0/50 GE1/0/51
Device B
PC
Configuration procedure
1) Configuration on Device A
# Enable DLDP on GigabitEthernet1/0/50 and GigabitEthernet 1/0/51.
<DeviceA> system-view
[DeviceA] interface gigabitethernet 1/0/50
[DeviceA-GigabitEthernet1/0/50] dldp enable
[DeviceA-GigabitEthernet1/0/50] quit
[DeviceA] interface gigabitethernet 1/0/51
[DeviceA-GigabitEthernet1/0/51] dldp enable
[DeviceA-GigabitEthernet1/0/51] quit
4-13
Interface GigabitEthernet1/0/50
DLDP port state : disable
DLDP link state : down
The neighbor number of the port is 0.
Interface GigabitEthernet1/0/51
DLDP port state : disable
DLDP link state : down
The neighbor number of the port is 0.
The output information indicates that both GigabitEthernet 1/0/50 and GigabitEthernet 1/0/51 are in
Disable state and the links are down, which means unidirectional links are detected and the two ports
are thus shut down.
Correct the fiber connections after detecting the problem, and perform the following operations:
# Reset DLDP state for the ports shut down by DLDP.
[DeviceA] dldp reset
# Display the DLDP configuration information on all the DLDP-enabled ports of Device A.
[DeviceA] display dldp
DLDP global status : enable
DLDP interval : 6s
DLDP work-mode : enhance
DLDP authentication-mode : none
DLDP unidirectional-shutdown : auto
DLDP delaydown-timer : 2s
The number of enabled ports is 2.
Interface GigabitEthernet1/0/50
DLDP port state : advertisement
DLDP link state : up
The neighbor number of the port is 1.
Neighbor mac address : 0000-0000-0101
Neighbor port index : 59
Neighbor state : two way
4-14
Interface GigabitEthernet1/0/51
DLDP port state : advertisement
DLDP link state : up
The neighbor number of the port is 1.
Neighbor mac address : 0000-0000-0102
Neighbor port index : 59
Neighbor state : two way
Neighbor aged time : 11
The output information indicates that both GigabitEthernet 1/0/50 and GigabitEthernet 1/0/51 are in
Advertisement state and the links are up, which means unidirectional links are not detected and the
two ports are restored.
Troubleshooting
Symptom:
Two DLDP-enabled devices, Device A and Device B, are connected through two fiber pairs, in which
two fibers are cross-connected. The unidirectional links cannot be detected; all the four ports involved
are in Advertisement state.
Analysis:
The problem can be caused by the following.
z The intervals for sending Advertisement packets on Device A and Device B are not the same.
z DLDP authentication modes/passwords on Device A and Device B are not the same.
Solution:
Make sure the interval for sending Advertisement packets, the authentication mode, and the password
on Device A and Device B are the same.
4-15
When configuring the Ethernet OAM function, go to these sections for information you are interested
in:
z Ethernet OAM Overview
z Ethernet OAM Configuration Task List
z Configuring Basic Ethernet OAM Functions
z Configuring Link Monitoring
z Enabling OAM Remote Loopback
z Displaying and Maintaining Ethernet OAM Configuration
z Ethernet OAM Configuration Example
With features such as ease of use and low price, Ethernet has gradually become the major underlying
technology for todays local area networks (LANs). Recently, with the emergence of Gigabit Ethernet
and 10-Gigabit Ethernet, Ethernet is gaining popularity in metropolitan area networks (MANs) and
wide area networks (WANs) as well.
In the beginning, Ethernet is mainly used in LANs, which have low reliability and stability requirements.
This is why an effective management and maintenance mechanism for Ethernet has been absent all
along, hindering the usage of Ethernet in MANs and WANs. Implementing Operation, Administration
and Maintenance (OAM) on Ethernet networks has now become an urgent matter.
As a tool monitoring Layer 2 link status, Ethernet OAM is mainly used to address common link-related
issues on the last mile. You can monitor the status of the point-to-point link between two directly
connected devices by enabling Ethernet OAM on them.
Ethernet OAM can effectively promote your management and maintenance capabilities over Ethernet
networks, guaranteeing the stability of the networks. Its major functions include:
z Link performance monitoring: Monitors the performance indices of a link, including packet loss,
delay, and jitter, and collects traffic statistics of various types.
z Fault detection and alarm: Checks the connectivity of a link by sending OAM protocol data units
(OAMPDUs) and reports to the network administrators when a link error occurs.
z Remote loopback: Detects link errors by looping back non-OAMPDUs.
Ethernet OAMPDUs
5-1
Field Description
Destination MAC address of the Ethernet OAMPDU.
Dest addr It is a slow protocol multicast address 0180c2000002. As slow
protocol packet cannot be forwarded by bridges, Ethernet
OAMPDUs cannot be forwarded.
Source MAC address of the Ethernet OAMPDU.
Source addr It is the bridge MAC address of the sending side and is a unicast
MAC address.
Type of the encapsulated protocol in the Ethernet OAMPDU.
Type
The value is 0x8809.
The specific protocol being encapsulated in the Ethernet
Subtype OAMPDU.
The value is 0x03.
Flags Status information of an Ethernet OAM entity.
Code Type of the Ethernet OAMPDU
Throughout this document, a port with Ethernet OAM enabled is called an Ethernet OAM entity or an
OAM entity.
5-2
Ethernet OAM connection is the base of all the other Ethernet OAM functions. OAM connection
establishment is also known as the Discovery phase, where an Ethernet OAM entity discovers remote
OAM entities and establishes sessions with them.
In this phase, interconnected OAM entities notify the peer of their OAM configuration information and
the OAM capabilities of the local nodes by exchanging Information OAMPDUs and determine whether
Ethernet OAM connections can be established. An Ethernet OAM connection can be established only
when the settings concerning Loopback, link detecting, and link event of the both sides match. After an
Ethernet OAM connection is established, Ethernet OAM takes effect on it.
As for Ethernet OAM connection establishment, a device can operate in active Ethernet OAM mode or
passive Ethernet OAM mode. Table 5-3 compares active Ethernet OAM mode with passive Ethernet
OAM mode.
Table 5-3 Active Ethernet OAM mode and passive Ethernet OAM mode
Passive Ethernet
Item Active Ethernet OAM mode
OAM mode
Initiating OAM Discovery Available Unavailable
Responding to OAM Discovery Available Available
Transmitting Information OAMPDUs Available Available
5-3
After an Ethernet OAM connection is established, the Ethernet OAM entities on both sides exchange
Information OAMPDUs periodically to keep the Ethernet OAM connection valid. If an Ethernet OAM
entity receives no Information OAMPDU for five seconds, the Ethernet OAM connection is
disconnected.
The interval to send Information OAMPDUs is determined by a timer. Up to ten Information OAMPDUs
can be sent in a second.
Link monitoring
Error detection in an Ethernet is difficult, especially when the physical connection in the network is not
disconnected but network performance is degrading gradually. Link monitoring is used to detect and
indicate link faults in various environments. Ethernet OAM implements link monitoring through the
exchange of Event Notification OAMPDUs. Upon detecting a link error event listed in Table 5-4, the
local OAM entity sends an Event Notification OAMPDU to notify the remote OAM entity. With the log
information, network administrators can keep track of network status in time. Table 5-4 describes the
link events.
5-4
In a network where traffic is interrupted due to device failures or unavailability, the flag field defined in
Ethernet OAMPDUs allows an Ethernet OAM entity to send error information to its peer. It can identify
the critical link error events listed in Table 5-5.
Remote loopback
Remote loopback is available only after the Ethernet OAM connection is established. With remote
loopback enabled, the Ethernet OAM entity operating in active Ethernet OAM mode sends
non-OAMPDUs to its peer. After receiving these PDUs, the peer does not forward them according to
their destination addresses. Instead, it returns them to the sender along the original path.
Remote loopback enables you to check the link status and locate link failures. Performing remote
loopback periodically helps to detect network faults in time. Furthermore, performing remote loopback
by network segments helps to locate network faults.
Ethernet OAM is defined in IEEE 802.3h (Carrier Sense Multiple Access with Collision Detection
(CSMA/CD) Access Method and Physical Layer Specifications. Amendment: Media Access Control
Parameters, Physical Layers, and Management Parameters for Subscriber Access Networks).
5-5
To change the Ethernet OAM operating mode on an Ethernet OAM-enabled port, you need to first
disable Ethernet OAM on the port.
After Ethernet OAM connections are established, the link monitoring periods and thresholds
configured in this section take effect on all Ethernet ports automatically.
5-6
An errored symbol event occurs when the number of detected symbol errors over a specific detection
interval exceeds the predefined threshold.
Follow these steps to configure errored symbol event detection:
An errored frame event occurs when the number of detected error frames over a specific interval
exceeds the predefined threshold.
Follow these steps to configure errored frame event detection:
An errored frame period event occurs if the number of frame errors in specific number of received
frames exceeds the predefined threshold.
Follow these steps to configure errored frame period event detection:
An errored frame seconds event occurs when the number of error frame seconds detected on a port
over a detection interval exceeds the error threshold.
5-7
Make sure the errored frame seconds triggering threshold is less than the errored frame seconds
detection interval. Otherwise, no errored frame seconds event can be generated.
interface interface-type
Enter Ethernet port view
interface-number
5-8
z Enable Ethernet OAM on Device A and Device B to auto-detect link errors between the two
devices.
z Monitor the performance of the link between Device A and Device B by collecting statistics about
the error frames received by Device A..
5-9
Configuration procedure
1) Configure Device A
# Configure GigabitEthernet 1/0/1 to operate in passive Ethernet OAM mode and enable Ethernet
OAM for it.
<DeviceA> system-view
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] oam mode passivez
[DeviceA-GigabitEthernet1/0/1] oam enable
[DeviceA-GigabitEthernet1/0/1] quit
# Set the errored frame detection interval to 20 seconds and set the errored frame event triggering
threshold to 10.
[DeviceA] oam errored-frame period 20
[DeviceA] oam errored-frame threshold 10
2) Configure Device B
# Configure GigabitEthernet 1/0/1 to operate in active Ethernet OAM mode (the default) and enable
Ethernet OAM for it.
<DeviceB> system-view
[DeviceB] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] oam mode active
[DeviceB-GigabitEthernet1/0/1] oam enable
[DeviceB-GigabitEthernet1/0/1] quit
3) Verify the configuration
Use the display oam configuration command to display the Ethernet OAM configuration. For
example:
# Display the Ethernet OAM configuration on Device A.
[DeviceA] display oam configuration
Configuration of the link event window/threshold :
--------------------------------------------------------------------------
Errored-symbol Event period(in seconds) : 1
Errored-symbol Event threshold : 1
Errored-frame Event period(in seconds) : 20
Errored-frame Event threshold : 10
Errored-frame-period Event period(in ms) : 1000
Errored-frame-period Event threshold : 1
Errored-frame-seconds Event period(in seconds) : 60
Errored-frame-seconds Event threshold : 1
According to the above output information, the detection period of errored frame events is 20 seconds,
the detection threshold is 10 seconds, and all the other parameters use the default values.
5-10
According to the above output information, no critical link event occurred on the link between Device A
and Device B.
# Display Ethernet OAM link event statistics of the remote end of Device B.
[DeviceB] display oam link-event remote
Port :GigabitEthernet1/0/1
Link Status :Up
OAMRemoteErrFrameEvent : (ms = milliseconds)
---------------------------------------------------------------------
Event Time Stamp : 5789 Errored FrameWindow : 10(100ms)
Errored Frame Threshold : 1 Errored Frame : 3
Error Running Total : 35 Event Running Total : 17
The above information indicates that 35 errors occurred since Ethernet OAM is enabled on Device A,
17 of which are caused by error frames. The link is instable.
5-11
When configuring CFD, go to these sections for information you are interested in:
z Overview
z CFD Configuration Task List
z Basic Configuration Tasks
z Configuring CC on MEPs
z Configuring LB on MEPs
z Configuring LT on MEPs
z Displaying and Maintaining CFD
z CFD Configuration Examples
Overview
Connectivity Fault Detection (CFD) is an end-to-end per-VLAN link layer Operations, Administration
and Maintenance (OAM) mechanism used for link connectivity detection, fault verification, and fault
location.
Maintenance domain
A maintenance domain (MD) defines the network where CFD plays its role. The MD boundary is
defined by some maintenance association end points MEPs configured on the ports. A MD is identified
by an MD name.
To locate faults exactly, CFD introduces eight levels (from 0 to 7) to MDs. The bigger the number, the
higher the level and the larger the area covered. Domains can touch or nest (if the outer domain has a
higher level than the nested one) but cannot intersect or overlap.
MD levels facilitate fault location and make fault location more accurate. As shown in Figure 6-1, MD_A
in light blue nests MD_B in dark blue. If a connectivity fault is detected at the boundary of MD_A, any of
the devices in MD_A, including Device A through Device E, may fail. In this case, if a connectivity fault
is also detected at the boundary of MD_B, the failure points may be any of Device B through Device D.
If the devices in MD_B operate normally, you can be sure that at least Device C is operational.
6-1
CFD exchanges messages and performs operations on a per-domain basis. By planning MDs properly
in a network, you can use CFD to locate failure points rapidly.
Maintenance association
Maintenance point
An MP is configured on a port and belongs to an MA. MPs fall into two types: maintenance association
end points (MEPs) and maintenance association intermediate points (MIPs).
z MEP
Each MEP is identified by an integer called a MEP ID. The MEPs of an MD define the range and
boundary of the MD. The MA and MD that a MEP belongs to define the VLAN attribute and level of the
packets sent by the MEP. MEPs fall into inward-facing MEPs and outward-facing MEPs.
The level of a MEP determines the levels of packets that the MEP can process. The packets
transmitted from a MEP carry the level of the MEP. An MEP forwards packets at a higher level and
processes packet of its level or lower. The processing procedure is specific to packets in the same
VLAN. Packets of different VLANs are independent.
The direction of a MEP determines the position of the MD relative to the port. In Figure 6-2,
outward-facing MEPs are configured on the two ports. In Figure 6-3, inward-facing MEPs are
configured on the two ports.
An outward-facing MEP communicates through the wire side connected to the port; an inward-facing
MEP communicates through the relay function side.
6-2
z MIP
A MIP is internal to an MD. It cannot send CFD packets actively; however, it can handle and respond to
CFD packets. The MA and MD that a MIP belongs to define the VLAN attribute and level of the packets
received.
By cooperating with MEPs, a MIP can perform a function similar to ping and traceroute. Like a MEP, a
MIP forwards packets at a higher level without any processing.
Figure 6-4 demonstrates a grading example of the CFD module. In the figure, there are six devices,
labeled 1 through 6 respectively. Suppose each device has two ports, and MEPs and MIPs are
configured on some of these ports. Four levels of MDs are designed in this example, the bigger the
number, the higher the level and the larger the area covered. In this example, the X port of device 2 is
configured with the following MPs: a level 5 MIP, a level 3 inward-facing MEP, a level 2 inward-facing
MEP, and a level 0 outward-facing MEP.
6-3
CFD works effectively only in properly-configured networks. Its functions, which are implemented
through the MPs, include:
z Continuity check (CC);
z Loopback (LB)
z Linktrace (LT)
Continuity check
Continuity check is responsible for checking the connectivity between MEPs. Connectivity faults are
usually caused by device faults or configuration errors. This function is implemented through periodic
sending of continuity check messages (CCMs) by the MEPs. As a multicast message, a CCM sent by
one MEP is intended to be received by all the other MEPs in the same MA. If a MEP fails to receive the
CCMs within 3.5 sending periods, the link is regarded as faulty and a corresponding log is generated.
When multiple MEPs send CCMs at the same time, the multipoint-to-multipoint link check is achieved.
Loopback
Similar to ping at the IP layer, loopback is responsible for verifying the connectivity between a local
device and a remote device. To implement this function, the local MEP sends loopback messages
(LBMs) to the remote MEP. Depending on whether the local MEP can receive a loopback reply
message (LBR) from the remote MEP, the link state between the two can be verified. LBMs and LBRs
are unicast messages. They are used to verify the connectivity between two points.
Linktrace
Linktrace is responsible for identifying the path between the source MEP and the destination MEP. This
function is implemented in the following way: the source MEP multicasts linktrace messages (LTMs) to
the destination MEP. After receiving the messages, the destination MEP and the MIPs that the LTMs
pass send back linktrace reply messages (LTRs) to the source MEP. Based on the reply messages,
6-4
Tasks Remarks
Required
Basic Configuration Tasks
These configurations are the foundation for other configuration tasks.
Required
Configuring CC on MEPs
Configuring the MEPs to send CCMs to manage link connectivity
Optional
Configuring LB on MEPs
Checking link state by testing link connectivity
Optional
Configuring LT on MEPs Tracing link fault and finding the path between the source MEP and
target MEP
z A port blocked by STP cannot receive, send, or respond to CFD messages, however, if the port is
configured as an outward-facing MEP, it can still receive and send CCM messages even if it is
blocked by STP.
z Only Ethernet ports support CFD.
6-5
A service instance is indicated by an integer to represent an MA in an MD. The MD and MA define the
level and VLAN attribute of the messages handled by the MPs in a service instance.
Follow these steps to configure a service instance:
z These configuration tasks are the foundation for other CFD configuration tasks.
z The last three steps in the table above must be performed strictly in order.
Configuring MEP
MEPs are functional entities in a service instance. CFD is implemented through operations on MEPs,
which provides such functions as CC, LB, LT and gives prompts on error CCMs and cross connections.
As a MEP is configured on a service instance, the MD level and VLAN attribute of the service instance
become the attribute of the MEP.
Follow these steps to configure a MEP:
interface interface-type
Enter Ethernet port view
interface-number
cfd mep mep-id Required
Configure a MEP service-instance instance-id
{ inbound | outbound } Not configured by default
6-6
As functional entities in a service instance, MIPs deal with LBM and LTM messages.
MIPs are generated on each port according to some rules. You can choose appropriate MIP
generation rules based on your network design.
Follow these steps to configure the rules for generating MIPs:
MIPs are generated on each port automatically according to the rules specified in the cfd mip-rule
command. If a port has no MIP, the system will check the MAs in each MD (from low to high levels),
and follow the rules in Table 6-1 to create or not create MIPs (within a single VLAN):
Each of the following actions or cases can cause MIPs to be created or deleted after you have
configured the cfd mip-rule command:
z Enabling CFD (use the cfd enable command)
z Creating or deleting the MEPs on a port
z Changes occur to the VLAN attribute of a port
z The rule specified in the cfd mip-rule command changes
6-7
Configuration Prerequisites
Before configuring this function, you should first complete the MEP configuration.
Configuring Procedure
The relationship between the interval field value in the CCM messages, the interval between CCM
messages and the timeout time of the remote MEP is illustrated in Table 6-2.
Table 6-2 Relationship of the interval field value, the interval between CCM messages and the timeout
time of the remote MEP
The interval between CCM The timeout time of the
The interval field value
messages remote MEP
4 1 second 3.5 seconds
5 10 second 35 seconds
6 60 seconds 210 seconds
On different devices, the MEPs belonging to the same MD and MA should be configured with the same
time interval for CCMs sending.
Configuring LB on MEPs
The LB function can verify the link state between two ends after CC detects a link fault.
6-8
Before configuring this function, you should first complete the MEP and MIP configuration tasks.
Configuration Procedure
Configuring LT on MEPs
LT can trace the path between the specified MEP and the target MEP, and can also locate link faults by
sending LT messages automatically. The two functions are implemented in the following way:
z To implement the first function, the specified MEP first sends LTM messages to the target MEP.
Based on the LTR messages in response to the LTM messages, the path between the two MEPs
can be identified.
z In the latter case, after LT messages automatic sending is enabled, if a MEP fails to receive the
CCMs from the remote MEP within 3.5 sending intervals, the link between the two is regarded as
faulty and LTMs will be sent out. Based on the LTRs that echo back, the fault source can be
located.
Configuration Prerequisites
Before configuring this function, you should first complete MEP and MIP configuration tasks.
Follow these steps to find the path between a source MEP and a target MEP:
To do... Use the command... Remarks
Enter system view system-view
6-9
Network requirements
As shown in Figure 6-5, there are five devices in the MDs. Each device has four ports belonging to
VLAN 100. The light blue square frame and the blue one specify two different MDs.
z Two MDs, MD_A (indicated by the light blue square frame, with level 5) and MD_B (indicated by
the blue square frame, with level 3)) are designed in this network.
z Define the edge ports of each MD, and define the MD of each port.
z The VLAN IDs of each MA in the two MDs are all 100.
According to the network diagram as shown in Figure 6-5, You should perform the following
configurations:
z Configure MD_A on Device A and Device E
z Configure MD_B on Device C
z Configure MD_A and MD_B on Device B and Device D
z Configure an MA in each MD
z Configure a service instance for each MA
6-10
Configuration procedure
After the above configuration, you can use the commands display cfd md, display cfd ma and
display cfd service-instance to verify your configuration.
Network requirements
After finishing service instance configuration, you can start to design the MEPs.
z MEPs are configured at the edge or border of MDs. Find the edge port of each MD.
z Decide the MEP direction (inward-facing or outward-facing) on each edge port based on the MD
position.
z Assign a unique ID to each MEP in an MA.
6-11
Configuration procedure
1) On Device A
<DeviceA> system-view
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] cfd mep 1001 service-instance 1 inbound
[DeviceA-GigabitEthernet1/0/1] cfd remote-mep 5001 service-instance 1 mep 1001
[DeviceA-GigabitEthernet1/0/1] cfd remote-mep 4002 service-instance 1 mep 1001
[DeviceA-GigabitEthernet1/0/1] cfd mep service-instance 1 mep 1001 enable
[DeviceA-GigabitEthernet1/0/1] cfd cc service-instance 1 mep 1001 enable
2) On Device B
<DeviceB> system-view
[DeviceB] interface gigabitethernet 1/0/3
[DeviceB-GigabitEthernet1/0/3] cfd mep 2001 service-instance 2 outbound
[DeviceB-GigabitEthernet1/0/3] cfd remote-mep 4001 service-instance 2 mep 2001
[DeviceB-GigabitEthernet1/0/3] cfd mep service-instance 2 mep 2001 enable
[DeviceB-GigabitEthernet1/0/3] cfd cc service-instance 2 mep 2001 enable
3) On Device D
<DeviceD> system-view
[DeviceD] interface gigabitethernet 1/0/1
[DeviceD-GigabitEthernet1/0/1] cfd mep 4001 service-instance 2 outbound
[DeviceD-GigabitEthernet1/0/1] cfd remote-mep 2001 service-instance 2 mep 4001
[DeviceD-GigabitEthernet1/0/1] cfd mep service-instance 2 mep 4001 enable
[DeviceD-GigabitEthernet1/0/1] cfd cc service-instance 2 mep 4001 enable
[DeviceD-GigabitEthernet1/0/1] interface gigabitethernet 1/0/3
[DeviceD-GigabitEthernet1/0/3] cfd mep 4002 service-instance 1 inbound
6-12
After the above configuration, you can use the commands display cfd mp and display cfd mep to
verify your configuration.
Network requirements
After finishing MEP configuration, you can continue to configure the MIPs.
MIPs, which are generated by some rules, are configured in the following way:
z Decide the device on which MIPs are to be configured.
z Choose suitable rules for MIP generation. By default, MIP is not configured on a device. If MIPs
are to be configured on each port in the MD, you should choose the default rule. If MIPs are to be
configured only when the low level MDs having MEP, you should choose the explicit rule.
According to the diagram as shown in Figure 6-7, perform the following configurations:
z In MD_A, Device B is designed to have MIPs when its port is configured with low level MEPs. In
this case, port GigabitEthernet 1/0/3 is configured with MEPs of MD_B, and the MIPs of MD_A
can be configured on this port. Based on the design, you should configure the MIP generation rule
of MD_A to explicit on Device B.
z The MIPs of MD_B are designed on Device C, and are configured on all ports. Based on this
design, the MIP generation rule should be configured as default.
Figure 6-7 Network diagram of MD and MP configuration
6-13
1) Configure Device B
<DeviceB> system-view
[DeviceB] cfd mip-rule explicit service-instance 1
2) Configure Device C
<DeviceC> system-view
[DeviceC] cfd mip-rule default service-instance 2
After the above operation, you can use the display cfd mp command to verify your configuration.
Configuring LB on MEPs
Network requirements
Use the LB function to trace the fault source after CC detects a link fault.
As shown in Figure 6-6, enable LB on Device A so that Device A can send LBM messages to MEPs on
Device D.
Configuration procedure
# Configure Device A
<DeviceA> system-view
[DeviceA] cfd loopback service-instance 1 mep 1001 target-mep 4002
Configuring LT on MEPs
Network requirements
Use the LT function to find the path and locate the fault after you obtain the state of the entire network
through the CC.
As shown in Figure 6-6, enable LT on Device A so that Device A can send LTM messages to the MEP
on Device D.
Configuration procedure
# Configure Device A
<DeviceA> system-view
[DeviceA] cfd linktrace service-instance 1 mep 1001 target-mep 4002
6-14
When configuring Track, go to these sections for information you are interested in:
z Track Overview
z Track Configuration Task List
z Configuring Collaboration Between the Track Module and the Detection Modules
z Configuring Collaboration Between the Track Module and the Application Modules
z Displaying and Maintaining Track Object(s)
z Track Configuration Examples
Track Overview
Figure 7-1 Collaboration through the Track module
Track
Static routing NQA
modules
You can establish the collaboration between the Track module and the detection modules through
configuration. A detection module probes the link status and informs the Track module of the probe
result. The Track module then changes the status of the Track object accordingly:
z If the probe succeeds, the status of the corresponding Track object is Positive;
z If the probe fails, the status of the corresponding Track object is Negative.
7-1
You can establish the collaboration between the Track module and the application modules through
configuration. If the status of the Track object changes, the Track module tells the application modules
to deal with the change accordingly.
At present, the application modules that can collaborate with the Track module is static routing
Task Remarks
Configuring Collaboration Between the Track Configuring Track-NQA
Required
Module and the Detection Modules Collaboration
Through the following configuration, you can establish the collaboration between the Track module and
the NQA, which probes the link status and informs the Track module of the probe result.
Follow these steps to configure Track-NQA collaboration:
When you configure a Track object, the specified NQA test group and Reaction entry can be
nonexistent. In this case, the status of the configured Track object is Invalid.
7-2
You can check the validity of a static route in real time by establishing collaboration between Track and
static routing.
If you specify the next hop but not the egress interface when configuring a static route, you can
associate the static route with a Track object and thus check the validity of the static route according to
the status of the Track object.
z If the status of the Track object is Positive, then the next hop of the static route is reachable, and
the configured static route is valid.
z If the status of the Track object is Negative, then the next hop of the static route is unreachable,
and the configured static route is invalid.
Follow these steps to configure the Track-Static Routing collaboration:
ip route-static dest-address
{ mask | mask-length }
Configure the Track-Static next-hop-address track
Routing collaboration, so as to track-entry-number Required
check the reachability of the [ preference Not configured by default.
next hop of the static route preference-value ] [ tag
tag-value ] [ description
description-text ]
z For the configuration of Track-Static Routing collaboration, the specified static route can be an
existent or nonexistent one. For an existent static route, the static route and the specified Track
object are associated directly; for a nonexistent static route, the system creates the static route
and then associates it with the specified Track object.
z The Track object to be associated with the static route can be a nonexistent one. After you use the
track command to create the Track object, the association takes effect.
z If a static route needs route recursion, the associated Track object must monitor the next hop of
the recursive route instead of that of the static route; otherwise, a valid route may be considered
invalid.
z For details of static route configuration, refer to Static Routing Configuration in the IP Routing
Volume.
7-3
Network requirements
z The next hop of the static route from Switch A to Switch C is Switch B.
z Configure Static Routing-Track-NQA collaboration on Switch A to implement real-time monitoring
of the validity of the static route to Switch C.
Figure 7-2 Network diagram for Static Routing-Track-NQA collaboration configuration
Switch B
Vlan-int3 Vlan-int2
10.2.1.1/24 10.1.1.1/24
Vlan-int3 Vlan-int2
10.2.1.2/24 10.1.1.2/24
Switch A Switch C
Configuration procedure
7-4
The output information above indicates the NQA test result, that is, the next hop 10.2.1.1 is reachable
(the status of the Track object is Positive), and the configured static route is valid.
# Remove the IP address of interface VLAN-interface 3 on Switch B.
<SwitchB> system-view
[SwitchB] interface vlan-interface 3
[SwitchB-Vlan-interface3] undo ip address
7-5
The output information above indicates the NQA test result, that is, the next hop 10.2.1.1 is
unreachable (the status of the Track object is Negative), and the configured static route is invalid.
7-6
ii
iii
14 HTTP Configuration...............................................................................................................................14-1
HTTP Overview.....................................................................................................................................14-1
How HTTP Works..........................................................................................................................14-1
Logging In to the Device Through HTTP.......................................................................................14-1
Protocols and Standards ...............................................................................................................14-1
Enabling the HTTP Service...................................................................................................................14-1
Configuring the Port Number of the HTTP Service...............................................................................14-2
Associating the HTTP Service with an ACL..........................................................................................14-2
Displaying and Maintaining HTTP.........................................................................................................14-2
iv
vi
viii
ix
When logging in to an Ethernet switch, go to these sections for information you are interested in:
z Logging In to an Ethernet Switch
z Introduction to User Interface
z Specifying Source for Telnet Packets
z Controlling Login Users
Switch 4510G supports two types of user interfaces: AUX and VTY.
z AUX port: Used to manage and monitor users logging in via the console port. The device provides
AUX ports of EIA/TIA-232 DTE type. The port is usually used for the first access to the switch.
z VTY (virtual type terminal): Used to manage and monitor users logging in via VTY. VTY port is
usually used when you access the device by means of Telnet or SSH.
As the AUX port and the Console port of a 3Com Switch 4510G family are the same one, you will be in
the AUX user interface if you log in through this port.
1-1
A device can support one Console ports and multiple Ethernet interfaces, and thus multiple user
interfaces are supported. These user interfaces do not associate with specific users.
z When the user initiates a connection request, based on the login type the system automatically
assigns a type of idle user interface with the smallest number to the user.
z During the login, the configuration in the user interface view takes effect. The user interface varies
depending on the login type and the login time.
At a time, only one user can use the user interface. The user interface configuration applies to the user
that has logged in. For example, if user A uses the console port to log in, the configuration in user
interface view of the console port applies to user A; if user A logs in through VTY 1, the configuration in
user interface view of VTY 1 applies.
User interfaces can be numbered in two ways: absolute numbering and relative numbering.
Absolute numbering
Absolute numbering allows you to uniquely specify a user interface or a group of user interfaces. The
numbering system starts from number 0 with a step of 1. The numbering approach numbers the two
types of user interfaces in the sequence of AUX port and VTY.
Relative numbering
Relative numbering can specify a user interface or a group of user interfaces of a specific type. The
number is valid only when used under that type of user interface. It makes no sense when used under
other types of user interfaces.
Relative numbering numbers a user interface in the form of user interface type + number. The rules
of relative numbering are as follows:
z AUX user interface number is 0.
z VTYs are numbered from 0 in ascending order, with a step of 1.
1-2
1-3
When logging in through the Console port, go to these sections for information you are interested in:
z Introduction
z Setting Up the Connection to the Console Port
z Console Port Login Configuration
z Console Port Login Configuration with Authentication Mode Being None
z Console Port Login Configuration with Authentication Mode Being Password
z Console Port Login Configuration with Authentication Mode Being Scheme
Introduction
To log in through the Console port is the most common way to log in to a switch. It is also the
prerequisite to configure other login methods. By default, you can log in to an 3Com Switch 4510G
family through its Console port only.
To log in to an Ethernet switch through its Console port, the related configuration of the user terminal
must be in accordance with that of the Console port.
Table 2-1 lists the default settings of a Console port.
Setting Default
Baud rate 19,200 bps
Data bits 8
After logging in to a switch, you can perform configuration for AUX users. Refer to Console Port Login
Configuration for details.
2-1
2-2
z Turn on the switch. The user will be prompted to press the Enter key if the switch successfully
completes POST (power-on self test). The prompt (such as <4510G>) appears after the user
presses the Enter key.
z You can then configure the switch or check the information about the switch by executing
commands. You can also acquire help by type the ? character. Refer to the following chapters for
information about the commands.
Configuration Description
Enter system view system-view
Enter AUX user interface view user-interface aux 0
2-3
Optional
Data bits databits { 5 | 6 | 7 | 8 } The default data bits of a
Console port is 8.
Changing of Console port configuration terminates the connection to the Console port. To establish the
connection again, you need to modify the configuration of the termination emulation utility running on
your PC accordingly. Refer to Setting Up the Connection to the Console Port for details.
2-4
Table 2-3 lists Console port login configurations for different authentication modes.
Table 2-3 Console port login configurations for different authentication modes
Authenticati
Configuration Description
on mode
Refer to Console Port Login
None Configure not to authenticate users Configuration with Authentication
Mode Being None for details.
Changes of the authentication mode of Console port login will not take effect unless you exit and enter
again the CLI.
Follow these steps to perform Console port login configuration (with authentication mode being none):
Required
Configure not to authenticate By default, users logging in through
authentication-mode none
users the Console port are not
authenticated.
2-5
Network requirements
Assume the switch is configured to allow you to login through Telnet, and your user level is set to the
administrator level (level 3). After you telnet to the switch, you need to limit the console user at the
following aspects.
z The user is not authenticated when logging in through the Console port.
z Commands of level 2 are available to user logging in to the AUX user interface.
z The baud rate of the Console port is 19200 bps.
z The screen can contain up to 30 lines.
z The history command buffer can contain up to 20 commands.
z The timeout time of the AUX user interface is 6 minutes.
Network diagram
Figure 2-5 Network diagram for AUX user interface configuration (with the authentication mode being
none)
Configuration procedure
# Specify not to authenticate the user logging in through the Console port.
[Sysname-ui-aux0] authentication-mode none
# Specify commands of level 2 are available to the user logging in to the AUX user interface.
[Sysname-ui-aux0] user privilege level 2
# Set the maximum number of lines the screen can contain to 30.
[Sysname-ui-aux0] screen-length 30
# Set the maximum number of commands the history command buffer can store to 20.
[Sysname-ui-aux0] history-command max-size 20
2-6
After the above configuration, to ensure a successful login, the console user needs to change the
corresponding configuration of the terminal emulation program running on the PC, to make the
configuration consistent with that on the switch. Refer to Setting Up the Connection to the Console
Port for details.
Follow these steps to perform Console port login configuration (with authentication mode being
password):
Configuration Example
Network requirements
Assume the switch is configured to allow you to login through Telnet, and your user level is set to the
administrator level (level 3). After you telnet to the switch, you need to limit the Console user at the
following aspects.
z The user is authenticated against the local password when logging in through the Console port.
z The local password is set to 123456 (in plain text).
z The commands of level 2 are available to users logging in to the AUX user interface.
z The baud rate of the Console port is 19,200 bps.
z The screen can contain up to 30 lines.
z The history command buffer can store up to 20 commands.
z The timeout time of the AUX user interface is 6 minutes.
2-7
Figure 2-6 Network diagram for AUX user interface configuration (with the authentication mode being
password)
Configuration procedure
# Specify to authenticate the user logging in through the Console port using the local password.
[Sysname-ui-aux0] authentication-mode password
# Specify commands of level 2 are available to the user logging in to the AUX user interface.
[Sysname-ui-aux0] user privilege level 2
# Set the maximum number of lines the screen can contain to 30.
[Sysname-ui-aux0] screen-length 30
# Set the maximum number of commands the history command buffer can store to 20.
[Sysname-ui-aux0] history-command max-size 20
After the above configuration, to ensure a successful login, the console user needs to change the
corresponding configuration of the terminal emulation program running on the PC, to make the
configuration consistent with that on the switch. Refer to Setting Up the Connection to the Console
Port for details.
2-8
Follow these steps to perform Console port login configuration (with authentication mode being
scheme):
2-9
For more information about AAA, RADIUS, and HWTACACS, see AAA Configuration in the Security
Volume.
Configuration Example
Network requirements
Assume the switch is configured to allow you to login through Telnet, and your user level is set to the
administrator level (level 3). After you telnet to the switch, you need to limit the console user at the
following aspects.
z Configure the name of the local user to be guest.
z Set the authentication password of the local user to 123456 (in plain text).
z Set the service type of the local user to Terminal.
z Configure to authenticate the user logging in through the Console port in the scheme mode.
z The baud rate of the Console port is 19,200 bps.
z The screen can contain up to 30 lines.
z The history command buffer can store up to 20 commands.
z The timeout time of the AUX user interface is 6 minutes.
Figure 2-7 Network diagram for AUX user interface configuration (with the authentication mode being
scheme)
GE1/0/1
Ethernet
Telnet client
Configuration procedure
2-10
# Configure to authenticate the user logging in through the Console port in the scheme mode.
[Sysname-ui-aux0] authentication-mode scheme
# Set the maximum number of lines the screen can contain to 30.
[Sysname-ui-aux0] screen-length 30
# Set the maximum number of commands the history command buffer can store to 20.
[Sysname-ui-aux0] history-command max-size 20
2-11
2-12
Introduction
You can telnet to a remote switch to manage and maintain the switch. To achieve this, you need to
configure both the switch and the Telnet terminal properly.
Item Requirement
Start the Telnet Server
The IP address of the VLAN of the switch is configured and the route
Switch between the switch and the Telnet terminal is available.
The authentication mode and other settings are configured. Refer to
Table 3-2 and Table 3-3.
Telnet is running.
Telnet terminal
The IP address of the management VLAN of the switch is available.
You can telnet to a switch and then configure the switch if the interface of the management VLAN of
the switch is assigned with an IP address. (By default, VLAN 1 is the management VLAN.)
Following are procedures to establish a Telnet connection to a switch:
Step 1: Log in to the switch through the Console port, enable the Telnet server function and assign an
IP address to the management VLAN interface of the switch.
z Connect to the Console port. Refer to Setting Up the Connection to the Console Port.
z Execute the following commands in the terminal window to enable the Telnet server function and
assign an IP address to the management VLAN interface of the switch.
# Enable the Telnet server function and configure the IP address of the management VLAN interface
as 202.38.160.92, and .the subnet mask as 255.255.255.0.
<Sysname> system-view
3-1
Step 2: Before Telnet users can log in to the switch, corresponding configurations should have been
performed on the switch according to different authentication modes for them. Refer to Telnet Login
Configuration with Authentication Mode Being None, Telnet Login Configuration with Authentication
Mode Being Password, and Telnet Login Configuration with Authentication Mode Being Scheme for
details. By default, Telnet users need to pass the password authentication to login.
Step 3: Connect your PC to the Switch, as shown in Figure 3-1. Make sure the Ethernet port to which
your PC is connected belongs to the management VLAN of the switch and the route between your PC
and the switch is available.
Figure 3-1 Network diagram for Telnet connection establishment
Workstation
Ethernet port
Ethernet
Step 4: Launch Telnet on your PC, with the IP address of the management VLAN interface of the
switch as the parameter, as shown in the following figure.
Figure 3-2 Launch Telnet
Step 5: Enter the password when the Telnet window displays Login authentication and prompts for
login password. The CLI prompt (such as <4510G>) appears if the password is correct. If all VTY user
interfaces of the switch are in use, you will fail to establish the connection and receive the message
that says All user interfaces are used, please try later!. A switch 4510G can accommodate up to five
Telnet connections at same time.
Step 6: After successfully Telnetting to a switch, you can configure the switch or display the information
about the switch by executing corresponding commands. You can also type ? at any time for help.
Refer to the following chapters for the information about the commands.
3-2
You can Telnet to another switch from the current switch. In this case, the current switch operates as
the client, and the other operates as the server. If the interconnected Ethernet ports of the two switches
are in the same LAN segment, make sure the IP addresses of the two management VLAN interfaces
to which the two Ethernet ports belong to are of the same network segment, or the route between the
two VLAN interfaces is available.
As shown in Figure 3-3, after Telnetting to a switch (labeled as Telnet client), you can Telnet to another
switch (labeled as Telnet server) by executing the telnet command and then to configure the later.
Figure 3-3 Network diagram for Telnetting to another switch from the current switch
Step 1: Configure the user name and password for Telnet on the switch operating as the Telnet server.
Refer to section Telnet Login Configuration with Authentication Mode Being None, section Telnet
Login Configuration with Authentication Mode Being Password, and Telnet Login Configuration with
Authentication Mode Being Scheme for details. By default, Telnet users need to pass the password
authentication to login.
Step 2: Telnet to the switch operating as the Telnet client.
Step 3: Execute the following command on the switch operating as the Telnet client:
<Sysname> telnet xxxx
Where xxxx is the IP address or the host name of the switch operating as the Telnet server. You can
use the ip host to assign a host name to a switch.
Step 4: Enter the password. If the password is correct, the CLI prompt (such as <4510G>) appears. If
all VTY user interfaces of the switch are in use, you will fail to establish the connection and receive the
message that says All user interfaces are used, please try later!.
Step 5: After successfully Telnetting to the switch, you can configure the switch or display the
information about the switch by executing corresponding commands. You can also type ? at any time
for help. Refer to the following chapters for the information about the commands.
Common Configuration
3-3
Configuration Remarks
Enter system view system-view
Telnet login configurations vary when different authentication modes are adopted.
3-4
Task Description
Telnet Login Configuration with Authentication Configure not to authenticate users logging in user
Mode Being None interfaces
Configure to authenticate users logging in to user
Telnet Login Configuration with Authentication
interfaces using a local password and configure
Mode Being Password
the local password
Configuration Procedure
Follow these steps to perform Telnet configuration (with authentication mode being none):
Note that if you configure not to authenticate the users, the command level available to users logging
in to a switch depends on both the authentication-mode none command and the user privilege
level level command.
Configuration Example
1) Network requirements
Assume that you are a level 3 AUX user and want to perform the following configuration for Telnet
users logging in to VTY 0:
z Do not authenticate users logging in to VTY 0.
z Commands of level 2 are available to users logging in to VTY 0.
z Telnet protocol is supported.
z The screen can contain up to 30 lines.
z The history command buffer can contain up to 20 commands.
z The timeout time of VTY 0 is 6 minutes.
2) Network diagram
3-5
3) Configuration procedure
# Enter system view, and enable the Telnet service.
<Sysname> system-view
[Sysname] telnet server enable
# Set the maximum number of lines the screen can contain to 30.
[Sysname-ui-vty0] screen-length 30
# Set the maximum number of commands the history command buffer can store to 20.
[Sysname-ui-vty0] history-command max-size 20
Configuration Procedure
Follow these steps to perform Telnet configuration (with authentication mode being password):
Note that if you configure to authenticate the users in the password mode, the command level
available to users logging in to a switch depends on both the authentication-mode password
command and the user privilege level level command.
3-6
1) Network requirements
Assume that you are a level 3 AUX user and want to perform the following configuration for Telnet
users logging in to VTY 0:
z Authenticate users logging in to VTY 0 using the local password.
z Set the local password to 123456 (in plain text).
z Commands of level 2 are available to users logging in to VTY 0.
z Telnet protocol is supported.
z The screen can contain up to 30 lines.
z The history command buffer can contain up to 20 commands.
z The timeout time of VTY 0 is 6 minutes.
2) Network diagram
Figure 3-5 Network diagram for Telnet configuration (with the authentication mode being password)
3) Configuration procedure
# Enter system view, and enable the Telnet service.
<Sysname> system-view
[Sysname] telnet server enable
# Set the maximum number of lines the screen can contain to 30.
[Sysname-ui-vty0] screen-length 30
# Set the maximum number of commands the history command buffer can store to 20.
[Sysname-ui-vty0] history-command max-size 20
3-7
Configuration Procedure
Follow these steps to perform Telnet configuration (with authentication mode being scheme):
Note that, when you log in to an Ethernet switch using the scheme authentication mode, your access
rights depend on your user level defined in the AAA scheme.
When the local authentication mode is used, the user levels are specified using the
authorization-attribute level level command.
When the RADIUS or HWTACACS authentication mode is used, the user levels are set on the
corresponding RADIUS or HWTACACS servers.
3-8
Configuration Example
1) Network requirements
Assume that you are a level 3 AUX user and want to perform the following configuration for Telnet
users logging in to VTY 0:
z Configure the name of the local user to be guest.
z Set the authentication password of the local user to 123456 (in plain text).
z Set the service type of VTY users to Telnet.
z Configure to authenticate users logging in to VTY 0 in scheme mode.
z The commands of level 2 are available to users logging in to VTY 0.
z Telnet protocol is supported in VTY 0.
z The screen can contain up to 30 lines.
z The history command buffer can store up to 20 commands.
z The timeout time of VTY 0 is 6 minutes.
2) Network diagram
Figure 3-6 Network diagram for Telnet configuration (with the authentication mode being scheme)
3) Configuration procedure
z Configure the switch
# Enter system view, and enable the Telnet service.
<Sysname> system-view
[Sysname] telnet server enable
# Create a local user named guest and enter local user view.
[Sysname] local-user guest
# Set the authentication password of the local user to 123456 (in plain text).
[Sysname-luser-guest] password simple 123456
3-9
# Set the maximum number of lines the screen can contain to 30.
[Sysname-ui-vty0] screen-length 30
# Set the maximum number of commands the history command buffer can store to 20.
[Sysname-ui-vty0] history-command max-size 20
3-10
user-interface vty
Enter AUX user interface view
first-number [ last-number ]
Required
Disabled by default, that is, the
Enable command accounting command accounting accounting server does not
record the commands the
users execute.
3-11
As shown in Figure 4-1, command levels should be configured for different users to secure Device:
z The device administrator accesses Device through the console port on Host A. When the
administrator logs in to the device, username and password are not required.
z Users access Device through an Ethernet interface on Host B. When a user logs in to Device,
both username and password are required. Only the authenticated users can log in and perform
configurations. RADIUS authentication is of higher priority, and local authentication is used when
the RADIUS server or the link fails. The local username is monitor and password is 123.
Figure 4-1 Network diagram for configuring user authentication
Configuration procedure
# Assign an IP address to Device to make Device be reachable from Host A, Host B, Host C, and
RADIUS server. The configuration is omitted.
# Enable telnet services on Device.
<Device> system-view
[Device] telnet server enable
# Set that no authentication is needed when users use the console port to log in to Device. Set the
privilege level of the administrator logging in from the console port to 3, that is, the administrator can
execute all the device commands.
[Device] user-interface aux 0
[Device-ui-aux0] authentication-mode none
[Device-ui-aux0] user privilege level 3
[Device-ui-aux0] quit
# Set to use username and password authentication when users use VTY interface to log in to Device
from Host B. The command level that a login user on VTY can access depends on the user
configuration on the AAA server.
[Device] user-interface vty 0 4
[Device-ui-vty0-4] authentication-mode scheme
4-1
# Create a RADIUS scheme and configure the IP address and UDP port for the primary authentication
server for the scheme. Ensure that the port number be consistent with that on the RADIUS server. Set
the shared key for authentication packets to expert for the scheme and the RADIUS server type of the
scheme to extended. Specify Device to remove the domain name in the username sent to the
RADIUS server for the RADIUS scheme.
[Device] radius scheme rad
[Device-radius-rad] primary authentication 192.168.2.20 1812
[Device-radius-rad] key authentication expert
[Device-radius-rad] server-type extended
[Device-radius-rad] user-name-format without-domain
[Device-radius-rad] quit
# Configure the default ISP domain system to use RADIUS authentication scheme rad for login users
and use local authentication as the backup.
[Device] domain system
[Device-isp-system] authentication login radius-scheme rad local
[Device-isp-system] authorization login radius-scheme rad local
[Device-isp-system] quit
# Add a local user named monitor, set the user password to 123, and specify to display the password
in cipher text. Authorize user monitor to use the telnet service and specify the level of the user as 1,
that is, the monitor level.
[Device] local-user monitor
[Device-luser-admin] password cipher 123
[Device-luser-admin] service-type telnet
[Device-luser-admin] authorization-attribute level 1
As shown in Figure 4-2, command levels should be configured for different users to secure Device:
After a user logs in to Device, the commands the user enter must be authorized by the HWTACACS
server first before being executed. If the HWTACACS server fails to authorize the commands, local
authorization is used.
Figure 4-2 Network diagram for configuring command authorization
4-2
# Assign an IP address to Device to make Device be reachable from Host A and HWTACACS server
respectively. The configuration is omitted.
# Enable the telnet service on Device.
<Device> system-view
[Device] telnet server enable
# Set to use username and password authentication when users use VTY 0 to log in to Device. The
command that the user can execute depends on the authentication result.
[Device] user-interface vty 0 4
[Device-ui-vty0-4] authentication-mode scheme
# Enable command authorization to restrict the command level for login users.
[Device-ui-vty0-4] command authorization
[Device-ui-vty0-4] quit
# Create a HWTACACS scheme named tac and configure the IP address and TCP port for the primary
authorization server for the scheme. Ensure that the port number be consistent with that on the
HWTACACS server. Set the shared key for authentication packets to expert for the scheme and the
HWTACACS server type of the scheme to standard. Specify Device to remove the domain name in
the username sent to the HWTACACS server for the scheme.
[Device] hwtacacs scheme tac
[Device-hwtacacs-tac] primary authentication 192.168.2.20 49
[Device-hwtacacs-tac] primary authorization 192.168.2.20 49
[Device-hwtacacs-tac] key authentication expert
[Device-hwtacacs-tac] key authorization expert
[Device-hwtacacs-tac] server-type standard
[Device-hwtacacs-tac] user-name-format without-domain
[Device-hwtacacs-tac] quit
# Configure the default ISP domain system to use HWTACACS scheme tac for login users and use
local authorization as the backup.
[Device] domain system
[Device-isp-system] authentication login hwtacacs-scheme tac local
[Device-isp-system] authorization command hwtacacs-scheme tac local
[Device-isp-system] quit
# Add a local user named monitor, set the user password to 123, and specify to display the password
in cipher text. Authorize user monitor to use the telnet service and specify the level of the user as 1,
that is, the monitor level.
[Device] local-user monitor
[Device-luser-admin] password cipher 123
[Device-luser-admin] service-type telnet
[Device-luser-admin] authorization-attribute level 1
4-3
As shown in Figure 4-3, configure the commands that the login users execute to be recorded on the
HWTACACS server to control and monitor user operations.
Figure 4-3 Network diagram for configuring command accounting
HWTACAS server
192.168.2.20/24
Console Connection
Internet
Device
Host A Host C
10.10.10.10/24
Intranet
Host B
192.168.1.20/24
Configuration procedure
# Enable command accounting for users logging in through the console port.
[Device] user-interface aux 0
[Device-ui-aux0] command accounting
[Device-ui-aux0] quit
# Create a HWTACACS scheme named tac and configure the IP address and TCP port for the primary
authorization server for the scheme. Ensure that the port number be consistent with that on the
HWTACACS server. Set the shared key for authentication packets to expert for the scheme. Specify
Device to remove the domain name in the username sent to the HWTACACS server for the scheme.
[Device] hwtacacs scheme tac
[Device-hwtacacs-tac] primary accounting 192.168.2.20 49
[Device-radius-rad] key accounting expert
[Device-radius-rad] user-name-format without-domain
4-4
# Create ISP domain system, and configure the ISP domain system to use HWTACACS scheme tac
for accounting of command line users
[Device] domain system
[Device-isp-system] accounting command hwtacacs-scheme tac
[Device-isp-system] quit
4-5
Introduction
An switch 4510G has a built-in Web server. You can log in to an switch 4510G through a Web browser
and manage and maintain the switch intuitively by interacting with the built-in Web server.
To log in to an switch 4510G through the built-in Web-based network management system, you need
to perform the related configuration on both the switch and the PC operating as the network
management terminal.
Table 5-1 Requirements for logging in to a switch through the Web-based network management
system
Item Requirement
Start the Web server
5-1
Configuration Example
Step 1: Log in to the switch through the console port and assign an IP address to the management
VLAN interface of the switch. By default, VLAN 1 is the management VLAN.
z Connect to the console port. Refer to section Setting Up the Connection to the Console Port.
z Execute the following commands in the terminal window to assign an IP address to the
management VLAN interface of the switch.
# Configure the IP address of the management VLAN interface to be 10.153.17.82 with the mask
255.255.255.0.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] ip address 10.153.17.82 255.255.255.0
Step 2: Configure the user name and the password for the Web-based network management system.
# Configure the user name to be admin.
[Sysname] local-user admin
Step 3: Establish an HTTP connection between your PC and the switch, as shown in the following
figure.
Figure 5-1 Establish an HTTP connection between your PC and the switch
5-2
5-3
When logging in through NMS, go to these sections for information you are interested in:
z Introduction
z Connection Establishment Using NMS
Introduction
You can also log in to a switch through an NMS (network management station), and then configure and
manage the switch through the agent module on the switch.
z The agent here refers to the software running on network devices (switches) and as the server.
z SNMP (simple network management protocol) is applied between the NMS and the agent.
To log in to a switch through an NMS, you need to perform related configuration on both the NMS and
the switch.
Item Requirement
The IP address of the management VLAN of the switch is configured. The
route between the NMS and the switch is available.
Switch
The basic SNMP functions are configured. (Refer to SNMP Configuration in
the System Volume for details.)
The NMS is properly configured. (Refer to the user manual of the NMS for
NMS
details.)
Switch
Network
NMS
6-1
When specifying source IP address/interface for Telnet packets, go to these sections for information
you are interested in:
z Introduction
z Specifying Source IP address/Interface for Telnet Packets
z Displaying the source IP address/Interface Specified for Telnet Packets
Introduction
To improve security and make it easier to manage services, you can specify source IP
addresses/interfaces for Telnet clients.
Usually, VLAN interface IP addresses and Loopback interface IP addresses are used as the source IP
addresses of Telnet packets. After you specify the IP address of a VLAN interface or a Loopback
interface as the source IP address of Telnet packets, all the packets exchanged between the Telnet
client and the Telnet server use the IP address as their source IP addresses, regardless of the ports
through which they are transmitted. In such a way, the actual IP addresses used are concealed. This
helps to improve security. Specifying source IP address/interfaces for Telnet packets also provides a
way to successfully connect to servers that only accept packets with specific source IP addresses.
Follow these steps to specify source IP address/interface for Telnet packets in user view:
Follow these steps to specify source IP address/interface for Telnet packets in system view:
7-1
7-2
When controlling login users, go to these sections for information you are interested in:
z Introduction
z Controlling Telnet Users
z Controlling Network Management Users by Source IP Addresses
Introduction
Multiple ways are available for controlling different types of login users, as listed in Table 8-1.
The controlling policy against Telnet users is determined, including the source and destination IP
addresses to be controlled and the controlling actions (permitting or denying).
This configuration needs to be implemented by basic ACL; a basic ACL ranges from 2000 to 2999. For
the definition of ACL, refer to ACL Configuration in the Security Volume.
Follow these steps to control Telnet users by source IP addresses:
8-1
This configuration needs to be implemented by advanced ACL; an advanced ACL ranges from 3000 to
3999. For the definition of ACL, refer to ACL Configuration in the Security Volume.
Follow these steps to control Telnet users by source and destination IP addresses:
8-2
This configuration needs to be implemented by Layer 2 ACL; a Layer 2 ACL ranges from 4000 to 4999.
For the definition of ACL, refer to ACL Configuration in the Security Volume.
Follow these steps to control Telnet users by source MAC addresses:
Layer 2 ACL is invalid for this function if the source IP address of the Telnet client and the interface IP
address of the Telnet server are not in the same subnet.
Configuration Example
Network requirements
Only the Telnet users sourced from the IP address of 10.110.100.52 and 10.110.100.46 are permitted
to log in to the switch.
Figure 8-1 Network diagram for controlling Telnet users using ACLs
10.110.100.46
Host A
IP network
Switch
Host B
10.110.100.52
8-3
Prerequisites
The controlling policy against network management users is determined, including the source IP
addresses to be controlled and the controlling actions (permitting or denying).
8-4
Configuration Example
Network requirements
Only SNMP users sourced from the IP addresses of 10.110.100.52 and 10.110.100.46 are permitted to
access the switch.
Figure 8-2 Network diagram for controlling SNMP users using ACLs
10.110.100.46
Host A
IP network
Switch
Host B
10.110.100.52
Configuration procedure
# Apply the ACL to only permit SNMP users sourced from the IP addresses of 10.110.100.52 and
10.110.100.46 to access the switch.
[Sysname] snmp-agent community read 3com acl 2000
[Sysname] snmp-agent group v2c 3comgroup acl 2000
[Sysname] snmp-agent usm-user v2c 3comuser 3comgroup acl 2000
8-5
The switch 4510G support Web-based remote management, which allows Web users to access the
switches using the HTTP protocol. By referencing access control lists (ACLs), you can control the
access of Web users to the switches.
Prerequisites
The control policies to be implemented on Web users are decided, including the source IP addresses
to be controlled and the control action, that is, whether to allow or deny the access.
This feature is achieved through the configuration of basic ACLs, the numbers of which are in the
range 2000 to 2999. For the definition of ACLs, see ACL Configuration in the Security Volume.
Follow these steps to configure controlling Web users by source IP addresses:
The network administrators can run a command to force online Web users offline.
Perform the following operation to force online Web users offline:
Configuration Example
Network requirements
Configure a basic ACL to allow only Web users using IP address 10.110.100.52 to access the switch.
8-6
10.110.100.46
Host A
IP network
Switch
Host B
10.110.100.52
Configuration procedure
# Reference the ACL to allow only Web users using IP address 10.110.100.52 to access the switch.
[Sysname] ip http acl 2030
8-7
While performing basic configurations of the system, go to these sections for information you are
interested in:
z Configuration Display
z Basic Configurations
z CLI Features
Configuration Display
To avoid duplicate configuration, you can use the display commands to view the current configuration
of the device before configuring the device. The configurations of a device fall into the following
categories:
z Factory defaults: When devices are shipped, they are installed with some basic configurations,
which are called factory defaults. These default configurations ensure that a device can start up
and run normally when it has no configuration file or the configuration file is damaged.
z Current configuration: The currently running configuration on the device.
z Saved configuration: Configurations saved in the startup configuration file.
Follow these steps to display device configurations:
display current-configuration
[ [ configuration [ configuration ] | interface
Display the current validated
[ interface-type ] [ interface-number ] ] Available in
configurations of the device
[ by-linenum ] [ | { begin | exclude | include } any view.
regular-expression ] ]
Display the configuration saved
on the storage media of the display saved-configuration [ by-linenum ]
device
For details of the display saved-configuration command, refer to File System Management
Commands in the System Volume.
Basic Configurations
This section covers the following topics:
z Entering/Exiting System View
9-1
With the quit command, you can return to the previous view. You can execute the return command or
press the hot key Ctrl+Z to return to user view.
The device name is used to identify a device in a network. Inside the system, the device name
corresponds to the prompt of the CLI. For example, if the device name is Sysname, the prompt of user
view is <Sysname>.
Follow these steps to configure the device name:
The system clock, displayed by system time stamp, is decided by the configured relative time, time
zone, and daylight saving time. You can view the system clock by using the display clock command.
Follow these steps to configure the system clock:
9-2
The system clock is decided by the commands clock datetime, clock timezone and clock
summer-time. If these three commands are not configured, the display clock command displays the
original system clock. If you combine these three commands in different ways, the system clock is
displayed in the ways shown in Table 9-1. The meanings of the parameters in the configuration column
are as follows:
z 1 indicates date-time has been configured with the clock datetime.
z 2 indicates time-zone has been configured with the clock timezone command and the offset time
is zone-offset.
z 3 indicates daylight saving time has been configured with the clock summer-time command and
the offset time is summer-offset.
z [1] indicates the clock datetime command is an optional configuration.
z The default system clock is 2005/1/1 1:00:00 in the example.
Table 9-1 Relationship between the configuration and display of the system clock
9-3
9-4
z With the display of copyright information enabled, the copyright information is displayed when a
user logs in through Telnet or SSH, or when a user quits user view after logging in to the device
through the console port, AUX port, or asynchronous serial interface. The copyright information
will not be displayed under other circumstances. The display format of copyright information is as
shown below:
******************************************************************************
* Copyright (c) 2004-2009 3Com Corp. and its licensors. All rights reserved. *
* This software is protected by copyright law and international treaties. *
* Without the prior written permission of 3Com Corporation and its licensors,*
* any reproduction republication, redistribution, decompiling, reverse *
* engineering is strictly prohibited. Any unauthorized use of this software *
* or any portion of it may result in severe civil and criminal penalties, and*
* will be prosecuted to the maximum extent possible under the applicable law.*
******************************************************************************
z With the display of copyright information disabled, under no circumstances will the copyright
information be displayed.
Follow these steps to enable/disable the display of copyright information:
9-5
Introduction to banners
Banners are prompt information displayed by the system when users are connected to the device,
perform login authentication, and start interactive configuration. The administrator can set
corresponding banners as needed.
At present, the system supports the following five kinds of welcome information.
z shell banner, also called session banner, displayed when a non TTY Modem user enters user
view.
z incoming banner, also called user interface banner, displayed when a user interface is activated
by a Modem user.
z login banner, welcome information at login authentications, displayed when password and
scheme authentications are configured.
z motd (Message of the Day) banner, welcome information displayed before authentication.
z legal banner, also called authorization information. The system displays some copyright or
authorization information, and then displays the legal banner before a user logs in, waiting for the
user to confirm whether to continue the authentication or login. If entering Y or pressing the Enter
key, the user enters the authentication or login process; if entering N, the user quits the
authentication or login process. Y and N are case insensitive.
Configuring a banner
When you configure a banner, the system supports two input modes. One is to input all the banner
information right after the command keywords. The start and end characters of the input text must be
the same but are not part of the banner information. In this case, the input text, together with the
command keywords, cannot exceed 510 characters. The other is to input all the banner information in
multiple lines by pressing the Enter key. In this case, up to 2000 characters can be input.
The latter input mode can be achieved in the following three ways:
z Press the Enter key directly after the command keywords, and end the setting with the %
character. The Enter and % characters are not part of the banner information.
z Input a character after the command keywords at the first line, and then press the Enter key. End
the setting with the character input at the first line. The character at the first line and the end
character are not part of the banner information.
z Input multiple characters after the command keywords at the first line (with the first and last
characters being different), then press the Enter key. End the setting with the first character at the
first line. The first character at the first line and the end character are not part of the banner
information.
Follow these steps to configure a banner:
9-6
By default, the Ctrl+G, Ctrl+L and Ctrl+O hotkeys are configured with command line and the Ctrl+T
and Ctrl+U commands are NULL.
z Ctrl+G corresponds to the display current-configuration command.
z Ctrl+L corresponds to the display ip routing-table command.
z Ctrl+O corresponds to the undo debugging all command.
Hotkey Function
Ctrl+A Moves the cursor to the beginning of the current line.
Ctrl+B Moves the cursor one character to the left.
Ctrl+C Stops performing a command.
Ctrl+D Deletes the character at the current cursor position.
Ctrl+E Moves the cursor to the end of the current line.
9-7
These hotkeys are defined by the device. When you interact with the device from terminal software,
these keys may be defined to perform other operations. If so, the definition of the terminal software will
dominate.
You can replace the first keyword of a command supported by the device with your preferred keyword
by configuring the command alias function. For example, if you configure show as the replacement of
the display keyword for each display command, you can input the command alias show xx to
execute the display xx command.
Note the following when you configure command aliases:
z When you input a command alias, the system displays and saves the command in its original
format instead of its alias. That is, you can define and use a command alias but the command is
not saved and restored in its alias.
z When you define a command alias, the cmdkey and alias arguments must be in complete form.
z With the command alias function enabled, when you input an incomplete keyword, which partially
matches both a defined alias and the keyword of a command, the alias wins; to execute the
command whose keyword partially matches your input, you need to input the complete keyword.
When you input a character string that matches multiple aliases partially, the system prompts you
for various matched information.
z If you press Tab after you input the keyword of an alias, the original format of the keyword will be
displayed.
z You can replace only the first keyword of a non-undo command instead of the complete command;
and you can replace only the second keyword of undo commands.
Follow these steps to configure command aliases:
9-8
Introduction
To restrict the different users access to the device, the system manages the users by their privilege
levels. User privilege levels correspond to command levels. After users at different privilege levels log
in, they can only use commands at their own, or lower, levels. All the commands are categorized into
four levels, which are visit, monitor, system, and manage from low to high, and identified respectively
by 0 through 3. Table 9-3 describes the levels of the commands.
User privilege level can be configured by using AAA authentication parameters or under a user
interface.
1) Configure user privilege level by using AAA authentication parameters
If the user interface authentication mode is scheme when a user logs in, and username and password
are needed at login, then the user privilege level is specified in the configuration of AAA authentication.
9-9
user-interface [ type ]
Enter user interface view
first-number [ last-number ]
Required
Configure the authentication
authentication-mode scheme By default, the authentication
mode for logging in to the user
[ command-authorization ] mode for VTY and AUX users
interface as scheme
is password.
Exit to system view quit
z For the description of user interface, refer to Login Configuration in the System Volume; for the
description of the user-interface, authentication-mode and user privilege level commands,
refer to User Interface Commands in the System Volume.
z For the introduction to AAA authentication, refer to AAA Configuration in the Security Volume; for
the description of the local-user and authorization-attribute commands, refer to AAA
Commands in the Security Volume.
z For the introduction to SSH, refer to SSH 2.0 Configuration in the Security Volume.
9-10
After the above configuration, when users telnet to the device through VTY 1, they need to input
username test and password 123. After passing the authentication, users can only use the commands
of level 0. If the users need to use commands of levels 0, 1, 2 and 3, the following configuration is
required:
[Sysname-luser-test] authorization-attribute level 3
3) Configure the user privilege level under a user interface
If the user interface authentication mode is scheme when a user logs in, and SSH publickey
authentication type (only username is needed for this authentication type) is adopted, then the user
privilege level is the user interface level; if a user logs in using the none or password mode (namely,
no username is needed), the user privilege level is the user interface level.
Follow these steps to configure the user privilege level under a user interface (SSH publickey
authentication type):
user-interface [ type ]
Enter user interface view
first-number [ last-number ]
Follow these steps to configure the user privilege level under a user interface (none or password
authentication mode):
9-11
By default, when users telnet to the device, they can only use the following commands after passing
the authentication:
<Sysname> ?
User view commands:
cluster Run cluster command
display Display current system information
ping Ping function
quit Exit from current command view
ssh2 Establish a secure shell client connection
super Set the current user priority level
telnet Establish one TELNET connection
tracert Trace route function
After you set the user privilege level under the user interface, users can log in to the device through
Telnet without any authentication and use the following commands:
<Sysname> ?
User view commands:
cluster Run cluster command
debugging Enable system debugging functions
display Display current system information
ipc Interprocess communication
ping Ping function
quit Exit from current command view
refresh Do soft reset
reset Reset operation
screen-length Specify the lines displayed on one screen
send Send information to other user terminal interface
ssh2 Establish a secure shell client connection
super Set the current user priority level
telnet Establish one TELNET connection
terminal Set the terminal line characteristics
tracert Trace route function
9-12
By default, when users log in to the device through Telnet, they can use the commands of level 0 after
passing the authentication. After you set the user privilege level under the user interface, when users
log in to the device through Telnet, they need to input password 123, and then they can use commands
of levels 0, 1, and 2.
Users can switch their user privilege level temporarily without logging out and disconnecting the
current connection; after the switch, users can continue to configure the device without the need of
relogin and reauthentication, but the commands that they can execute have changed. For example, if
the current user privilege level is 3, the user can configure system parameters; after switching the user
privilege level to 0, the user can only execute some simple commands, like ping and tracert, and only
a few display commands. The switching of user privilege level is temporary, and effective for the
current login; after the user relogs in, the user privilege restores to the original level.
To avoid misoperations, the administrators are recommended to log in to the device by using a lower
privilege level and view device operating parameters, and when they have to maintain the device, they
can switch to a higher level temporarily; when the administrators need to leave for a while or ask
someone else to manage the device temporarily, they can switch to a lower privilege level before they
leave to restrict the operation by others.
Users can switch from a high user privilege level to a low user privilege level without entering a
password; when switching from a low user privilege level to a high user privilege level, only the console
login users do not have to enter the password, and users that log in from VTY user interfaces need to
enter the password for securitys sake. This password is for level switching only and is different from
the login password. If the entered password is incorrect or no password is configured, the switching
fails. Therefore, before switching a user to a higher user privilege level, you should configure the
password needed.
Follow these steps to switch user privilege level:
9-13
All the commands in a view are defaulted to different levels, as shown in Table 9-3. The administrator
can modify the command level based on users needs to make users of a lower level use commands
with a higher level or improve device security.
Follow these steps to modify the command level:
Required
Configure the command level command-privilege level
in a specified view level view view command Refer to Table 9-3 for the
default settings.
You are recommended to use the default command level or modify the command level under the
guidance of professional staff; otherwise, the change of command level may bring inconvenience to
your maintenance and operation, or even potential security problem.
9-14
z For the detailed description of the display users command, refer to Login Commands in the
System Volume.
z Support for the display configure-user and display current-configuration command depends on the
device model.
z The display commands discussed above are for the global configuration. Refer to the
corresponding section for the display command for specific protocol and interface.
CLI Features
This section covers the following topics:
z Introduction to CLI
z Online Help with Command Lines
z Synchronous Information Output
z Undo Form of a Command
z Editing Features
z CLI Display
z Saving History Command
z Command Line Error Information
Introduction to CLI
CLI is an interaction interface between devices and users. Through CLI, you can configure your
devices by entering commands and view the output information and verify your configurations, thus
facilitating your configuration and management of your devices.
CLI provides the following features for you to configure and manage your devices:
z Hierarchical command protection where you can only execute the commands at your own or lower
levels. Refer to Configuring User Privilege Levels and Command Levels for details.
z Easy access to on-line help by entering ?
z Abundant debugging information for fault diagnosis
z Saving and executing commands that have been executed
z Fuzzy match for convenience of input. When you execute a command, you can input part of the
characters in a keyword. However, to enable you to confirm your operation, the command can be
executed only when you input enough characters to make the command unique. Take the
commands save, startup saved-configuration, and system-view which start with s as an
example. To save the current configuration, you need to input sa at least; to set the configuration
9-15
The following are the types of online help available with the CLI:
z Full help
z Fuzzy help
To obtain the desired help information, you can:
1) Enter ? in any view to access all the commands in this view and brief description about them as
well.
<Sysname> ?
User view commands:
backup Backup next startup-configuration file to TFTP server
boot-loader Set boot loader
bootrom Update/read/backup/restore bootrom
cd Change current directory
clock Specify the system clock
cluster Run cluster command
copy Copy from one file to another
debugging Enable system debugging functions
delete Delete a file
dir List files on a file system
display Show running system information
......omitted......
2) Enter a command and a ? separated by a space. If ? is at the position of a keyword, all the
keywords are given with a brief description.
<Sysname> terminal ?
debugging Send debug information to terminal
logging Send log information to terminal
monitor Send information output to current terminal
trapping Send trap information to terminal
3) Enter a command and a ? separated by a space. If ? is at the position of a parameter, the
description about this parameter is given.
<Sysname> system-view
[Sysname] interface vlan-interface ?
<1-4094> VLAN interface number
[Sysname] interface vlan-interface 1 ?
<cr>
[Sysname] interface vlan-interface 1
Where, <cr> indicates that there is no parameter at this position. The command is then repeated in the
next command line and executed if you press Enter.
4) Enter a character string followed by a ?. All the commands starting with this string are displayed.
<Sysname> c?
cd
clock
copy
9-16
Synchronous information output refers to the feature that if the users input is interrupted by system
output, then after the completion of system output the system will display a command line prompt and
your input so far, and you can continue your operations from where you were stopped.
You can use the info-center synchronous command to enable synchronous information output. For
the detailed description of this function, refer to Information Center Configuration in the System
Volume.
Adding the keyword undo can form an undo command. Almost every configuration command has an
undo form. undo commands are generally used to restore the system default, disable a function or
cancel a configuration. For example, the info-center enable command is used to enable the
information center, while the undo info-center enable command is used to disable the information
center. (By default, the information center is enabled.)
Editing Features
The CLI provides the basic command editing functions and supports multi-line editing. When you
execute a command, the system automatically goes to the next line if the maximum length of the
command is reached. You cannot press Enter to go to the next line; otherwise, the system will
automatically execute the command. The maximum length of each command is 510 characters. Table
9-4 lists these functions.
Key Function
If the editing buffer is not full, insert the character at the position
Common keys
of the cursor and move the cursor to the right.
Deletes the character to the left of the cursor and move the
Backspace
cursor back one character.
Left-arrow key or Ctrl+B The cursor moves one character space to the left.
Right-arrow key or Ctrl+F The cursor moves one character space to the right.
9-17
When editing the command line, you can use other shortcut keys (For details, see Table 9-2) besides
the shortcut keys defined in Table 9-4, or you can define shortcut keys by yourself. (For details, see
Configuring CLI Hotkeys.)
CLI Display
By filtering the output information, you can find the wanted information effectively. If there is a lot of
information to be displayed, the system displays the information in multiple screens. When the
information is displayed in multiple screens, you can also filter the output information to pick up the
wanted information.
The device provides the function to filter the output information. You can specify a regular expression
(that is, the output rule) to search information you need.
You can use one of the following two ways to filter the output information:
z Input the keyword begin, exclude, or include as well as the regular expression at the command
line to filter the output information.
z Input slash (/), minus (-), or plus (+) as well as the regular expression to filter the rest output
information. Slash (/) is equal to the keyword begin, minus (-) is equal to the keyword exclude,
and plus (+) is equal to the keyword include.
Keywords begin, exclude, and include have the following meanings:
z begin: Displays the line that matches the regular expression and all the subsequent lines.
z exclude: Displays the lines that do not match the regular expression.
z include: Displays only the lines that match the regular expression.
The regular expression is a string of 1 to 256 characters, case sensitive. It also supports special
characters as shown in Table 9-5.
9-18
9-19
Multiple-screen output
When there is a lot of information to be output, the system displays the information in multiple screens.
Generally, 24 lines are displayed on one screen, and you can also use the screen-length command to
set the number of lines displayed on the next screen. (For the details of this command, refer to Login
Commands in the System Volume.) You can follow the step below to disable the multiple-screen output
function of the current user.
Display functions
9-20
Action Function
Continues to display information of the next
Press Space when information display pauses
screen page.
Press Enter when information display pauses Continues to display information of the next line.
Press Ctrl+C when information display pauses Stops the display and the command execution.
Ctrl+E Moves the cursor to the end of the current line.
PageUp Displays information on the previous page.
The CLI can automatically save the commands that have been used lately to the history buffer. You
can know the operations that have been executed successfully, invoke and repeatedly execute them
as needed. By default, the CLI can save up to ten commands for each user. You can use the
history-command max-size command to set the capacity of the history commands buffer for the
current user interface (For the detailed description of the history-command max-size command, refer
to Login Commands in the System Volume). In addition:
z The CLI saves the commands in the format that you have input, that is, if you input a command in
its incomplete form, the saved history command is also incomplete.
z If you execute a command for multiple times successively, the CLI saves the earliest one.
However, if you execute the different forms of a command, the CLI saves each form of this
command. For example, if you execute the display cu command for multiple times successively,
the CLI saves only one history command; if you execute the display cu command and then the
display current-configuration command, the CLI saves two history commands.
Follow these steps to access history commands:
You may use arrow keys to access history commands in Windows 200X and XP Terminal or Telnet.
However, the up-arrow and down-arrow keys are invalid in Windows 9X HyperTerminal, because they
are defined in a different way. You can press Ctrl+P or Ctrl+N instead.
9-21
The commands are executed only if they have no syntax error. Otherwise, error information is reported.
Table 9-7 lists some common errors.
9-22
When configuring device management, go to these sections for information you are interested in:
z Device Management Overview
z Device Management Configuration Task List
z Configuring the Exception Handling Method
z Rebooting a Device
z Configuring the Scheduled Automatic Execution Function
z Upgrading Device Software
z Disabling Boot ROM Access
z Configuring a Detection Interval
z Clearing the 16-bit Interface Indexes Not Used in the Current System
z Identifying and Diagnosing Pluggable Transceivers
z Displaying and Maintaining Device Management Configuration
z Device Management Configuration Examples
Task Remarks
Configuring the Exception Handling Method Optional
Rebooting a Device Optional
Configuring the Scheduled Automatic Execution Function Optional
Upgrading Device Software Optional
Disabling Boot ROM Access Optional
10-1
z After this command is configured, all the member devices adopt the same method to handle
exceptions.
z The exception handling method is effective to the failed member device only, and does not
influence the operations of other IRF members.
Rebooting a Device
When a fault occurs to a running device, you can remove the fault by rebooting the device, depending
on the actual situation. This operation equals to powering on the device after powering it off. It is mainly
used to reboot a device in remote maintenance, without performing hardware reboot of the device.
According to the actual environment:
z You can reboot a member device or the whole system.
z You can trigger the immediate reboot through command lines, or set a time at which the device
can automatically reboot, or you can also set a delay so that the device can automatically reboot
in the delay.
Follow these steps to reboot a device:
10-2
Note that:
z At present, you can specify user view and system view only. To automatically execute the
specified command in another view or automatically execute multiple commands at a time, you
can configure the system to automatically execute a batch file at the specified time (note that you
must provide a complete file path for the system to execute the batch file.).
z The system does not check the values of the view and command arguments. Therefore, ensure
the correctness of the command argument (including the correct format of command and the
correct relationship between the command and view arguments).
10-3
Device software consists of the Boot ROM program and the system boot file. After the device is
powered on, the device runs the Boot ROM program, initializes the hardware, and displays the
hardware information. Then the device runs the boot file. The boot file provides drivers and adaption
for hardware, and implements service features. The Boot ROM program and system boot file are
required for the startup and running of a device. Figure 10-1 illustrates their relationship.
Figure 10-1 Relationship between the Boot ROM program and the system boot file
Select the Reboot option
to reboot the device
Start
Enter CLI
Finish
10-4
Optional
Enable the validity check
bootrom-update By default, the validity check
function when upgrading the
security-check enable function is enabled at the time
Boot ROM
of upgrading Boot ROM.
Return to user view quit
To execute the bootrom command successfully, you must save the Boot ROM file under the root
directory of the storage media on a member device.
10-5
Specify a boot file for the next boot-loader file file-url slot { all | Required
boot of a member device slot-number } { main | backup } Available in user view.
z To execute the boot-loader command successfully, you must save the file for the next device
boot under the root directory of the storage media on a member device.
z The names of the files for the next boot of the master and slaves may be different, but the versions
of the files must be the same; otherwise, a slave will reboot by using the master's boot file and join
the IRF again.
10-6
A confirmation is required when you execute this command. If you fail to make a confirmation within 30
seconds or enter N to cancel the operation, the command will not be executed.
At present, four types of pluggable transceivers are commonly used, as shown in Table 10-1. They can
be further divided into optical transceivers and electrical transceivers based on transmission medium.
10-7
As pluggable transceivers are of various types and from different vendors, you can use the following
commands to view the key parameters of the pluggable transceivers, including transceiver type,
connector type, central wavelength of the laser sent, transfer distance and vendor name or name of
the vendor who customizes the transceivers to identify the pluggable transceivers.
Follow these steps to identify pluggable transceivers:
z You can use the Vendor Name field in the prompt information of the display transceiver
command to identify an anti-spoofing pluggable transceiver customized by H3C. If the field is H3C,
it is considered an H3C-customized pluggable transceiver.
z Electrical label information is also called permanent configuration data or archive information,
which is written to the storage component of a board during device debugging or testing. The
information includes name of the board, device serial number, and vendor name or name of the
vendor who customizes the transceiver.
10-8
The system outputs alarm information for you to diagnose and troubleshoot faults of pluggable
transceivers. Optical transceivers customized by H3C also support the digital diagnosis function, which
monitors the key parameters of a transceiver, such as temperature, voltage, laser bias current, TX
power, and RX power. When these parameters are abnormal, you can take corresponding measures
to prevent transceiver faults.
Follow these steps to diagnose pluggable transceivers:
10-9
Network requirement
z As shown in Figure 10-2, the current software version is soft-version1 for Device. Upgrade the
software version of Device to soft-version2 and configuration file to new-config at a time when
few services are processed (for example, at 3 am) through remote operations.
z The newest application soft-version2.bin and the newest configuration file new-config.cfg are
both saved under the aaa directory of the FTP server.
z The IP address of Device is 1.1.1.1/24, the IP address of the FTP server is 2.2.2.2/24, and the
FTP server is reachable.
z User can log in to Device via Telnet and a route exists between User and Device.
Figure 10-2 Network diagram for remote scheduled automatic upgrade
FTP Server
2.2.2.2/24
Internet
Telnet
FTP Client
Device
User
1.1.1.1/24
Configuration procedure
1) Configuration on the FTP server (Note that configurations may vary with different types of servers)
z Set the access parameters for the FTP client (including enabling the FTP server function, setting
the FTP username to aaa and password to hello, and setting the user to have access to the
flash:/aaa directory).
<FTP-Server> system-view
[FTP-Server] ftp server enable
[FTP-Server] local-user aaa
[FTP-Server-luser-aaa] password cipher hello
[FTP-Server-luser-aaa] service-type ftp
[FTP-Server-luser-aaa] authorization-attribute work-directory flash:/aaa
10-10
To ensure correctness of the file, you can use the more command to view the content of the file.
# Execute the scheduled automatic execution function to enable the device to be automatically
upgraded at 3 am.
<Device> schedule job at 03:00 view system execute auto-update.bat
Info: Command execute auto-update.bat in system view will be executed at 03:00 12/11/2007(in
12 hours and 0 minutes).
Network requirement
z As shown in Figure 10-3, the current software version is soft-version1 for the IRF system.
Upgrade the software version of the IRF system to soft-version2 and configuration file to
new-config.
10-11
Configuration procedure
1) Configuration on the TFTP server (Note that configurations may vary with different types of
servers)
Obtain the boot file and configuration file through legitimate channels, such as the official website of
3COM, agents, and technical staff. Save these files under the working path of the TFTP server for the
access of the TFTP clients.
2) Configuration on the IRF members
# Download file new-config.cfg on the TFTP server to Master (Note that configurations may vary with
different types of servers).
<IRF> tftp 2.2.2.2 get new-config.cfg
..
File will be transferred in binary mode
Downloading file from remote TFTP server, please wait.....
TFTP: 917 bytes received in 1 second(s)
# Specify file new-config.cfg as the configuration file for the next boot for all members.
<IRF> startup saved-configuration new-config.cfg main
10-12
# Specify file soft-version2.bin as the boot file for the next boot for all members.
<IRF> boot-loader file soft-version2.bin slot all main
This command will set the boot file of the specified board. Continue? [Y/N]:y
The specified file will be used as the main boot file at the next reboot on slot 1!
The specified file will be used as the main boot file at the next reboot on slot 2!
10-13
When configuring file system management, go to these sections for information you are interested in:
z File System Management
z Configuration File Management
z Displaying and Maintaining Device Configuration
A major function of the file system is to manage storage media. It allows you to perform operations
such as directory create and delete, and file copy and display. If an operation, delete or overwrite for
example, causes problems such as data loss or corruption, the file system will prompt you to confirm
the operation by default.
Depending on the managed object, file system operations fall into Directory Operations, File
Operations, Batch Operations, Storage Medium Operations, and Setting File System Prompt Modes.
Filename Formats
When you specify a file, you must enter the filename in one of the following formats.
Filename formats:
11-1
For the S4510G series, when you specify a configuration file (.cfg file), startup file (.bin file), or Boot
ROM file by inputting its name in the format of drive:/[path]/file-name), the total length of the name
cannot exceed 63 characters.
Directory Operations
Directory operations include creating/removing a directory, displaying the current working directory,
displaying the specified directory or file information, and so on.
11-2
Creating a directory
Removing a directory
z The directory to be removed must be empty, meaning that before you remove a directory, you
must delete all the files and the subdirectory under this directory. For file deletion, refer to the
delete command; for subdirectory deletion, refer to the rmdir command.
z After you execute the rmdir command successfully, the files in the recycle bin under the directory
will be automatically deleted.
File Operations
File operations include displaying the specified directory or file information; displaying file contents;
renaming, copying, moving, removing, restoring, and deleting files.
You can create a file by copying, downloading or using the save command.
11-3
Renaming a file
Copying a file
Moving a file
Deleting a file
11-4
Batch Operations
A batch file is a set of executable commands. Executing a batch file equals executing the commands in
the batch file one by one.
The following steps are recommended to execute a batch file:
1) Edit the batch file on your PC.
2) Download the batch file to the device. If the suffix of the file is not .bat, use the rename command
to change the suffix to .bat.
3) Execute the batch file.
Follow the steps below to execute a batch file:
11-5
When some space of a storage medium becomes inaccessible due to abnormal operations for
example, you can use the fixdisk command to restore the space of the storage medium. The
execution of the format command will format the storage medium, and all the data on the storage
medium will be deleted.
Use the following commands to manage the storage medium space:
z When you format a storage medium, all the files stored on it are erased and cannot be restored. In
particular, if there is a startup configuration file on the storage medium, formatting the storage
medium results in loss of the startup configuration file.
z You can execute the fixdisk command for the storage medium on the master, but you cannot
execute the command for a storage medium on the slave.
11-6
# Display the files and the subdirectories under the current directory.
<Sysname> dir
Directory of flash:/
0 -rw- 10197108 Jul 17 2007 18:30:04 4510G.bin
1 -rw- 478164 Apr 26 2007 14:40:07 4510G_505.btm
2 -rw- 1586 Aug 24 2007 12:00:03 startup.cfg
3 -rw- 11053555 Aug 22 2007 17:25:16 4510GD.bin
4 drw- - Apr 26 2007 19:58:11 test
31496 KB total (9943 KB free)
# Display the files and the subdirectories under the test directory.
<Sysname> dir
Directory of flash:/test/
11-7
A configuration file saves the device configurations in command lines in text format. You can view
configuration information conveniently through configuration files.
Types of configuration
Multiple configuration files can be stored on a storage medium of a device. You can save the
configuration used in different environments as different configuration files. In this case, when the
device moves between these networking environments, you just need to specify the corresponding
configuration file as the startup configuration file for the next boot of the device and restart the device,
so that the device can adapt to the network rapidly, saving the configuration workload.
A device boots using only one configuration file. However, you can specify two startup configuration
files, main and backup startup configuration file, for the next startup of the device as needed and when
the device supports this feature. When the device boots, the system uses the main startup
configuration file, and if the main startup configuration file is corrupted or lost, the system will use the
backup startup configuration file for device boot and configuration. The devices supporting the
configuration of the main and backup startup configuration files, compared with the devices that do not
support this feature, are more secure and reliable.
11-8
Introduction
You can modify the current configuration on your device using command line interface. However, the
current configuration is temporary. To make the modified configuration take effect at the next boot of
the device, you must save the current configuration to the startup configuration file before the device
reboots.
Complete these tasks to save the current configuration:
Task Remarks
Enabling configuration file auto-save Optional
Modes in saving the configuration Required
z After the configuration file auto-save function is enabled, when you save the current configuration
by executing the save [ safely ] [ backup | main ] command or executing the save filename all
command and then pressing Enter, the master and a slave will automatically save the current
configuration to the specified configuration file, and use the file as the configuration file for the next
startup, thus keeping the consistency of the configuration files on the master and the slave.
z If the configuration file auto-save function is not enabled, when you save the current configuration
by executing the save [ safely ] [ backup | main ] command or executing the save filename all
command and then pressing Enter, only the master will automatically save the current
configuration to the specified configuration file, and use the file as the configuration file for the next
startup; the slaves will neither save the configuration file nor configure the file for the next startup.
Follow these steps to configure the configuration file auto-save function:
11-9
z Fast saving mode. This is the mode when you use the save command without the safely keyword.
The mode saves the file more quickly but is likely to lose the existing configuration file if the device
reboots or the power fails during the process.
z Safe mode. This is the mode when you use the save command with the safely keyword. The
mode saves the file more slowly but can retain the configuration file in the device even if the
device reboots or the power fails during the process.
The fast saving mode is suitable for environments where power supply is stable. The safe mode,
however, is preferred in environments where stable power supply is unavailable or remote
maintenance is involved.
11-10
Configuration rollback allows you to revert to a previous configuration state based on a specified
configuration file. The specified configuration file must be a valid .cfg file, namely, it can be generated
by using either the backup function (manually or automatically) or the save command, and even the
compatible configuration file of another device. You are recommended to use the configuration file that
is generated by using the backup function (manually or automatically). Configuration rollback is applied
in the following situations:
z The current configurations are wrong; and there are too many wrong configurations to locate or to
correct one by one. Rolling back the current configuration to a correct one is needed.
z The application environment has changed and the device has to run in a configuration state based
on a previous configuration file without being rebooted.
Set configuration rollback following these steps:
1) Specify the filename prefix and path for saving the current configuration.
2) Save the current running configuration with the specified filename (filename prefix + serial number)
to the specified path. The current running configuration can be saved in two ways: the system
saves the current running configuration at a specified interval; or you can save the current running
configuration as needed.
3) Roll back the current running configuration to the configuration state based on a saved
configuration file. When the related command is entered, the system first compares and then
processes the differences between the current running configuration and the specified
replacement configuration file:
z The rollback operation does not execute the commands that are the same in the replacement
configuration file and in the current configuration file.
z The rollback operation removes the commands only present in the current configuration file but
not in the replacement configuration file; namely, the corresponding undo form commands are
executed.
z The rollback operation executes the commands only present in the replacement configuration file
but not in the current configuration file.
z The rollback operation removes the commands that are different in the replacement configuration
file and in the current configuration file, and then executes them according to the replacement
configuration file.
The current running configuration is only saved to the master, and only the configuration on the master
can be rolled back. However, the related configuration will be synchronized to the slaves to ensure the
rollback of the configuration after the master is changed.
11-11
Task Remarks
Configuring parameters for saving the current running configuration Required
Saving the current running configuration automatically Required
Saving the current running configuration manually Use at least one approach
Before the current running configuration is saved manually or automatically, the file path and filename
prefix must be configured. After that, the system saves the current running configuration with the
specified filename (filename prefix_serial number.cfg) to the specified path. The filename of a saved
configuration file is like 20080620archive_1.cfg, or 20080620archive_2.cfg. The saved configuration
files are numbered automatically, from 1 to 1,000 (with increment of 1). If the serial number reaches
1,000, it restarts from 1. If you change the path or filename prefix, or reboot the device, the saved file
serial number restarts from 1, and the system recounts the saved configuration files. If you change the
path of the saved configuration files, the files in the original path become common configuration files,
and are not processed as saved configuration files.
The number of saved configuration files has an upper limit. After the maximum number of files is saved,
the system deletes the oldest files when the next configuration file is saved.
Follow these steps to configure parameters for saving the current running configuration:
11-12
You can configure the system to save the current running configuration at a specified interval, and use
the display archive configuration command to view the filenames and save time of the saved
configuration files, so as to roll back the current configuration to a previous configuration state.
Configure an automatic saving interval according to the storage medium performance and the
frequency of configuration modification:
z If the configuration of the device does not change frequently, you are recommended to save the
current running configuration manually as needed
z Because the S4510G uses a low-speed storage medium, you are recommended either to save
the current running configuration manually, or to configure automatic saving with an interval longer
than 1,440 minutes (24 hours).
Follow these steps to automatically save the current running configuration:
The path and filename prefix of a saved configuration file must be specified before you configure the
automatic saving period.
11-13
Automatic saving of the current running configuration occupies system resources, and frequent saving
greatly affects system performance. Therefore, if the system configuration does not change frequently,
you are recommended to disable the automatic saving of the current running configuration and save it
manually.
If the modification to the configuration fails, or is complicated, you can save the current running
configuration manually before you modify it. Therefore, if it really fails, the device can revert to the
configuration state before the modification.
Follow the step below to save the current running configuration manually:
The path and filename prefix of a saved configuration file must be specified before you save the
current running configuration manually; otherwise, the operation fails.
Configuration rollback may fail if one of the following situations is present (if a command cannot be
rolled back, the system skips it and processes the next one):
z The complete undo form of a command is not supported, namely, you cannot get the actual undo
form of the command by simply putting the keyword undo in front of the command, so the
complete undo form of the command cannot be recognized by the device.
z The configuration cannot be removed, such as hardware-related commands
z Commands in different views are dependent on each other
z If the replacement configuration file is not a complete file generated by using the save or archive
configuration command, or the file is copied from a different type of device, the configuration
cannot be rolled back. Ensure that the replacement configuration file is correct and compatible
with the current device.
11-14
A startup configuration file is the configuration file to be used at the next system startup. You can
specify a configuration file as the startup configuration file to be used at the next system startup in the
following two ways:
z Use the save command. If you save the current configuration to the specified configuration file in
the interactive mode, the system automatically sets the file as the main startup configuration file to
be used at the next system startup.
z Use the command dedicated to specify a startup configuration file, which is described in the
following table:
Follow the step below to specify a configuration file as the startup configuration file for the next system
startup:
A configuration file must use .cfg as its extension name and the startup configuration file must be
saved under the root directory of the storage medium.
The backup function allows you to copy the startup configuration file to be used at the next system
startup from the device to the TFTP server for backup.
The backup operation backs up the startup configuration file to the TFTP server.
Follow the step below to back up the startup configuration file to be used at the next system startup:
11-15
You can delete the startup configuration file to be used at the next system startup using commands. On
a device that has the main and backup startup configuration files, you can choose to delete either the
main or backup startup configuration file. However, in the case that the main and backup startup
configuration files are the same, if you perform the delete operation for once, the system will not delete
the configuration file but only set the corresponding startup configuration file (main or backup,
according to which one you specified in the command) to NULL.
You may need to delete the startup configuration file for the next startup for one of these reasons:
z After you upgrade system software, the existing configuration file does not match the new system
software.
z The configuration file is corrupted (often caused by loading a wrong configuration file).
After the startup configuration file is deleted, the system will use the null configuration when the device
reboots.
Follow the step below to delete the startup configuration file for the next startup:
This command will permanently delete the configuration file from all the member devices. Use it with
caution.
z The restore function allows you to copy a configuration file from TFTP server to the root directory
of the storage media of all the member devices and specify the file as the startup configuration file
to be used at the next system startup.
Follow the step below to restore the startup configuration file to be used at the next system startup:
11-16
display current-configuration
[ [ configuration [ configuration ] |
Display the current Available in any
interface [ interface-type ]
configuration view
[ interface-number ] ] [ by-linenum ] [ |
{ begin | include | exclude } text ] ]
For detailed description of the display this and display current-configuration commands, refer to
Basic System Configuration Commands in the System Volume.
11-17
When configuring FTP, go to these sections for information you are interested in:
z FTP Overview
z Configuring the FTP Client
z Configuring the FTP Server
z Displaying and Maintaining FTP
FTP Overview
Introduction to FTP
The File Transfer Protocol (FTP) is an application layer protocol for sharing files between server and
client over a TCP/IP network.
FTP uses TCP ports 20 and 21 for file transfer. Port 20 is used to transmit data, and port 21 to transmit
control commands. Refer to RFC 959 for details of FTP basic operation.
FTP transfers files in two modes:
z Binary mode for program file transmission, like files with the suffixes .app, .bin, or .btm.
z ASCII mode for text file transmission, like files with the suffixes .txt, .bat, or .cfg.
Operation of FTP
FTP adopts the client/server model. Your device can function either as the client or as the server (as
shown in Figure 12-1).
z When the device serves as the FTP client, the user first connects to the device from a PC through
Telnet or an emulation program, and then executes the ftp command to establish a connection to
the remote FTP server and gain access to the files on the server.
z When the device serves as the FTP server, FTP clients (users running the FTP client program) log
in to the device to access files on the device (the administrator must configure the IP address of
the device as the FTP server IP address before user login).
Figure 12-1 Network diagram for FTP
When the device serves as the FTP client, you need to perform the following configuration:
12-1
When the device serves as the FTP server, you need to perform the following configuration:
Table 12-2 Configuration when the device serves as the FTP server
z The FTP function is available when a reachable route exists between the FTP server and the FTP
client.
z When you use IE to log in to the device serving as the FTP server, part of the FTP functions is not
available. This is because multiple connections are established during the login process but the
device supports only one connection at a time.
12-2
To access an FTP server, an FTP client must establish a connection with the FTP server. Two ways are
available to establish a connection: using the ftp command to establish the connection directly; using
the open command in FTP client view.
Source address binding means to configure an IP address on a stable interface such as a loopback
interface or Dialer interface, and then use this IP address as the source IP address of an FTP
connection. The source address binding function simplifies the configuration of ACL rules and security
policies. You just need to specify the source or destination address argument in an ACL rule as this
address to filter inbound and outbound packets on the device, ignoring the difference between
interface IP addresses as well as the affect of interface statuses. You can configure the source address
by configuring the source interface or source IP address. The primary IP address configured on the
source interface is the source address of the transmitted packets. The source address of the
transmitted packets is selected following these rules:
z If no source address is specified, the FTP client uses the IP address of the interface determined
by the matched route as the source IP address to communicate with an FTP server.
z If the source address is specified with the ftp client source or ftp command, this source address
is used to communicate with an FTP server.
z If you use the ftp client source command and the ftp command to specify a source address
respectively, the source address specified with the ftp command is used to communicate with an
FTP server.
The source address specified with the ftp client source command is valid for all FTP connections and
the source address specified with the ftp command is valid only for the current FTP connection.
Follow these steps to establish an FTP connection (In IPv4 networking):
Optional
A device uses the IP address
ftp client source { interface of the interface determined by
Configure the source address
interface-type interface-number the matched route as the
of the FTP client
| ip source-ip-address } source IP address to
communicate with the FTP
server by default.
Exit to system view quit
ftp [ server-address
[ service-port ] [ source
Log in to the remote FTP
{ interface interface-type Use either approach.
server directly in user view
interface-number | ip The ftp command is available
source-ip-address } ] ] in user view; and the open
ftp command is available in FTP
Log in to the remote FTP client view.
server indirectly in FTP client open server-address
view [ service-port ]
12-3
After a device serving as the FTP client has established a connection with the FTP server (For how to
establish an FTP connection, refer to Establishing an FTP Connection.), you can perform the following
operations in the authorized directories of the FTP server:
12-4
z FTP uses two modes for file transfer: ASCII mode and binary mode.
z The Is command can only display the file/directory name, while the dir command can display
more information, such as the sizes of and date of creation of files or directories.
z The commands listed in the above table are only available for level 3 (manage level) users logging
in to the device which serves as the FTP client. However, whether the users can successfully
execute the commands depends on the FTP servers authorization.
12-5
Network requirements
z As shown in Figure 12-2, use Device as an FTP client and PC as the FTP server. Their IP
addresses are 10.2.1.1/16 and 10.1.1.1/16 respectively. An available route exists between Device
and PC.
z Device downloads a startup file from PC for device upgrade, and uploads the configuration file to
PC for backup.
z On PC, an FTP user account has been created for the FTP client, with the username being abc
and the password being pwd.
Figure 12-2 Network diagram for FTPing a startup file from an FTP server
Configuration procedure
If the available memory space of the device is not enough, use the fixdisk command to clear the
memory or use the delete /unreserved file-url command to delete the files not in use and then perform
the following operations.
# Upload the configuration file config.cfg of Device to the server for backup.
12-6
# Specify newest.bin as the main startup file to be used at the next startup.
<Sysname> boot-loader file newest.bin main
# Reboot the device, and the startup file is updated at the system reboot.
<Sysname> reboot
The startup file used for the next startup must be saved under the root directory of the storage medium.
You can copy or move a file to the root directory of the storage medium. For the details of the
boot-loader command, refer to Device Management Commands in the System Volume.
Network requirements
z As shown in Figure 12-3, use Device as an FTP client and PC as the FTP server. Their IP
addresses are 10.2.1.1/16 and 10.1.1.1/16 respectively. An available route exists between Device
and PC.
z Device downloads a startup file from PC for device upgrade, and uploads the configuration file to
PC for backup.
z On PC, an FTP user account has been created for the FTP client, with the username being abc
and the password being pwd.
Figure 12-3 Network diagram for FTPing a startup file from an FTP server
12-7
If the available memory space of the device is not enough, use the fixdisk command to clear the
memory or use the delete /unreserved file-url command to delete the files not in use and then perform
the following operations.
# Upload the configuration file config.cfg of the device to the server for backup.
[ftp] ascii
[ftp] put config.cfg back-config.cfg
227 Entering Passive Mode (10,1,1,1,4,2).
125 ASCII mode data connection already open, transfer starting for /config.cfg.
226 Transfer complete.
FTP: 3494 byte(s) sent in 5.646 second(s), 618.00 byte(s)/sec.
[ftp] bye
# Specify newest.bin as the main startup file to be used at the next startup for all the member devices.
<Sysname> boot-loader file newest.bin slot all main
This command will set the boot file of the specified board. Continue? [Y/N]:y
The specified file will be used as the main boot file at the next reboot on slot 1!
The specified file will be used as the main boot file at the next reboot on slot 2!
# Reboot the device, and the startup file is updated at the system reboot.
12-8
The startup file used for the next startup must be saved under the root directory of the storage medium.
You can copy or move a file to the root directory of the storage medium. For the details of the
boot-loader command, refer to Device Management Commands in the System Volume.
The FTP server uses one of the two modes to update a file when you upload the file (use the put
command) to the FTP server:
z In fast mode, the FTP server starts writing data to the storage medium after a file is transferred to
the memory. This prevents the existing file on the FTP server from being corrupted in the event
that anomaly, power failure for example, occurs during a file transfer.
z In normal mode, the FTP server writes data to the storage medium while receiving data. This
means that any anomaly, power failure for example, during file transfer might result in file
corruption on the FTP server. This mode, however, consumes less memory space than the fast
mode.
Follow these steps to configure the FTP server:
12-9
To allow an FTP user to access certain directories on the FTP server, you need to create an account
for the user, authorizing access to the directories and associating the username and password with the
account.
The following configuration is used when the FTP server authenticates and authorizes a local FTP user.
If the FTP server needs to authenticate a remote FTP user, you need to configure authentication,
authorization and accounting (AAA) policy instead of the local user. For detailed configuration, refer to
AAA Configuration in the Security Volume.
Follow these steps to configure authentication and authorization for FTP server:
12-10
Network requirements
z As shown in Figure 12-4, use Device as an FTP server, and the PC as the FTP client. Their IP
addresses are 1.2.1.1/16 and 1.1.1.1/16 respectively. An available route exists between Device
and PC.
z PC keeps the updated startup file of the device. Use FTP to upgrade the device and back up the
configuration file.
z Set the username to ftp and the password to pwd for the FTP client to log in to the FTP server.
Figure 12-4 Smooth upgrading using the FTP server
Configuration procedure
12-11
# Download the configuration file config.cfg of the device to the PC for backup.
ftp> get config.cfg back-config.cfg
z You can take the same steps to upgrade configuration file with FTP. When upgrading the
configuration file with FTP, put the new file under the root directory of the storage medium (For a
device that has been partitioned, the configuration file must be saved on the first partition.).
z After you finish upgrading the Boot ROM program through FTP, you must execute the bootrom
update command to upgrade the Boot ROM.
3) Upgrade Device
# Specify newest.bin as the main startup file to be used at the next startup.
12-12
# Reboot the device and the startup file is updated at the system reboot.
<Sysname> reboot
The startup file used for the next startup must be saved under the root directory of the storage medium.
You can copy or move a file to the root directory of the storage medium. For the details of the
boot-loader command, refer to Device Management Commands in the System Volume.
Network requirements
z As shown in Figure 12-5, use Device as an FTP server, and the PC as the FTP client. An available
route exists between Device and PC.
z PC keeps the updated startup file of the device. Use FTP to upgrade the device and back up the
configuration file.
z Set the username to ftp and the password to pwd for the FTP client to log in to the FTP server.
Figure 12-5 Smooth upgrading using the FTP server
Configuration procedure
# Authorize ftps access to the root directory of the flash on the master.
[Sysname-luser-ftp] authorization-attribute work-directory flash:/
# To access the root directory of storage medium of a slave (with the member ID 2):
[Sysname-luser-ftp] authorization-attribute work-directory slot2#flash:/
12-13
# Check files on your device. Remove those redundant to ensure adequate space for the startup file to
be uploaded.
<Sysname> dir
Directory of flash:/
# Download the configuration file config.cfg of the device to the PC for backup.
ftp> get config.cfg back-config.cfg
# Upload the configuration file newest.bin to the root directory of the storage medium on the master.
ftp> put newest.bin
ftp> bye
12-14
3) Upgrade Device
# Copy the startup file newest.bin to the root directory of the storage medium on a slave (with the
member ID 2).
<Sysname> copy newest.bin slot2#flash:/
# Specify newest.bin as the main startup file to be used at the next startup for all the member devices.
<Sysname> boot-loader file newest.bin slot all main
This command will set the boot file of the specified board. Continue? [Y/N]:y
The specified file will be used as the main boot file at the next reboot on slot 1!
The specified file will be used as the main boot file at the next reboot on slot 2!
# Reboot the device and the startup file is updated at the system reboot.
<Sysname> reboot
The startup file used for the next startup must be saved under the root directory of the storage medium.
You can copy or move a file to the root directory of the storage medium. For the details of the
boot-loader command, refer to Device Management Commands in the System Volume.
12-15
When configuring TFTP, go to these sections for information you are interested in:
z TFTP Overview
z Configuring the TFTP Client
z Displaying and Maintaining the TFTP Client
z TFTP Client Configuration Example
TFTP Overview
Introduction to TFTP
The Trivial File Transfer Protocol (TFTP) provides functions similar to those provided by FTP, but it is
less complex than FTP in interactive access interface and authentication. Therefore, it is more suitable
in environments where complex interaction is not needed between client and server.
TFTP uses the UDP port 69 for data transmission. For TFTP basic operation, refer to RFC 1986.
In TFTP, file transfer is initiated by the client.
z In a normal file downloading process, the client sends a read request to the TFTP server, receives
data from the server, and then sends the acknowledgement to the server.
z In a normal file uploading process, the client sends a write request to the TFTP server, sends data
to the server, and receives the acknowledgement from the server.
TFTP transfers files in two modes:
z Binary mode for program file transmission, like files with the suffixes .app, .bin, or .btm.
z ASCII mode for text file transmission, like files with the suffixes .txt, .bat, or .cfg.
Operation of TFTP
Only the TFTP client service is available with your device at present.
Before using TFTP, the administrator needs to configure IP addresses for the TFTP client and server,
and make sure that there is a reachable route between the TFTP client and server.
13-1
Table 13-1 Configuration when the device serves as the TFTP client
13-2
Optional
Control the access to the TFTP
tftp-server [ ipv6 ] acl By default, the access to the
servers from the device
acl-number TFTP servers from the device
through ACL
is not controlled.
Optional
tftp client source { interface A device uses the source
Configure the source address address determined by the
interface-type interface-number
of the TFTP client matched route to communicate
| ip source-ip-address }
with the TFTP server by
default.
Return to user view quit
13-3
Network requirements
z As shown in Figure 13-2, use a PC as the TFTP server and Device as the TFTP client. Their IP
addresses are 1.2.1.1/16 and 1.1.1.1/16 respectively. An available route exists between Device
and PC.
z Device downloads a startup file from PC for upgrading and uploads a configuration file named
config.cfg to PC for backup.
Figure 13-2 Smooth upgrading using the TFTP client function
Configuration procedure
If the available memory space of the device is not enough, use the fixdisk command to clear the
memory or use the delete /unreserved file-url command to delete the files not in use and then perform
the following operations.
# Specify newest.bin as the main startup file to be used at the next startup.
<Sysname> boot-loader file newest.bin main
13-4
Network requirements
z As shown in Figure 13-3, use a PC as the TFTP server and Device as the TFTP client. Their IP
addresses are 1.2.1.1/16 and 1.1.1.1/16 respectively. An available route exists between Device
and PC.
z Device downloads a startup file from PC for upgrading and uploads a configuration file named
config.cfg to PC for backup.
Figure 13-3 Smooth upgrading using the TFTP client function
Configuration procedure
If the available memory space of the device is not enough, use the fixdisk command to clear the
memory or use the delete /unreserved file-url command to delete the files not in use and then perform
the following operations.
13-5
# Specify newest.bin as the main startup file to be used at the next startup for all the member devices.
<Sysname> boot-loader file newest.bin slot all main
This command will set the boot file of the specified board. Continue? [Y/N]:y
The specified file will be used as the main boot file at the next reboot on slot 1!
The specified file will be used as the main boot file at the next reboot on slot 2!
The startup file used for the next startup must be saved under the root directory of the storage medium.
You can copy or move a file to the root directory of the storage medium. For the details of the
boot-loader command, refer to Device Management Commands in the System Volume.
13-6
When configuring HTTP, go to these sections for information you are interested in:
z HTTP Overview
z Enabling the HTTP Service
z HTTP Configuration
z Associating the HTTP Service with an ACL
z Displaying and Maintaining HTTP
HTTP Overview
The Hypertext Transfer Protocol (HTTP) is used for transferring web page information across the
Internet. It is an application-level protocol in the TCP/IP protocol suite. The connection-oriented
Transport Control Protocol (TCP) is adopted on the transport layer.
Currently, HTTP/1.0 is supported on the device.
In the HTTP, the client/server mode is used for communication. The client and the server exchange
messages following these procedures:
1) A TCP connection is created between the client and the server. Typically, the port number is 80.
2) The client sends a request to the server.
3) The server processes the request and sends back a response.
4) The TCP connection is closed.
You can log onto the device using the HTTP protocol with HTTP service enabled, accessing and
controlling the device with Web-based network management.
To implement security management on the device, you can use the following methods to enhance the
security of the device.
z Enable HTTP service only when necessary.
z Change the port number of the HTTP service as a port number not commonly used (8080), thus
reducing attacks from illegal users on the HTTP service.
z Associate the HTTP service with an ACL to let pass only the filtered clients.
14-1
If you execute the ip http port command for multiple times, the last configured port number is used.
14-2
When configuring HTTPS, go to these sections for information you are interested in:
z HTTPS Overview
z HTTPS Configuration Task List
z Associating the HTTPS Service with an SSL Server Policy
z Enabling the HTTPS Service
z Associating the HTTPS Service with a Certificate Attribute Access Control Policy
z Configuring the Port Number of the HTTPS Service
z Associating the HTTPS Service with an ACL
z Displaying and Maintaining HTTPS
z HTTPS Configuration Example
HTTPS Overview
The Secure HTTP (HTTPS) refers to the HTTP protocol that supports the Security Socket Layer (SSL)
protocol.
The SSL protocol of HTTPS enhances the security of the device in the following ways:
z Uses the SSL protocol to ensure the legal clients to access the device securely and prohibit the
illegal clients;
z Encrypts the data exchanged between the HTTPS client and the device to ensure the data
security and integrity, thus realizing the security management of the device;
z Defines certificate attribute-based access control policy for the device to control the access right of
the client, in order to further avoid attacks from illegal clients.
z The total number of HTTP connections and HTTPS connections on a device cannot exceed ten.
z For SSL details, refer to SSL Configuration in the Security Volume.
15-1
z If the ip https ssl-server-policy command is executed repeatedly, the HTTPS service is only
associated with the last specified SSL server policy.
z When the HTTPS service is disabled, the association between the HTTPS service and the SSL
server is automatically removed. To enable it again, you need to re-associate the HTTPS service
with an SSL server policy.
z When the HTTPS service is enabled, no modification of its associated SSL server policy takes
effect.
15-2
15-3
If you execute the ip https port command for multiple times, the last configured port number is used.
z Host acts as the HTTPS client and Device acts as the HTTPS server.
z Host accesses Device through Web to control Device.
z CA (Certificate Authority) issues certificate to Device. The common name of CA is new-ca.
In this configuration example, Windows Server serves as CA and you need to install Simple Certificate
Enrollment Protocol (SCEP) component.
15-4
Configuration procedure
15-5
z The URL of the HTTPS server starts with https://, and that of the HTTP server starts with http://.
z For details of PKI commands, refer to PKI Commands in the Security Volume.
z For details of the public-key local create rsa command, refer to Public Key Commands in the
Security Volume.
z For details of SSL commands, refer to SSL Commands in the Security Volume.
15-6
When configuring SNMP, go to these sections for information you are interested in:
z SNMP Overview
z SNMP Configuration
z Configuring SNMP Logging
z SNMP Trap Configuration
z Displaying and Maintaining SNMP
z SNMP Configuration Example
z SNMP Logging Configuration Example
SNMP Overview
Simple Network Management Protocol (SNMP) offers a framework to monitor network devices through
TCP/IP protocol suite. It provides a set of basic operations in monitoring and maintaining the Internet
and has the following characteristics:
z Automatic network management: SNMP enables network administrators to search and modify
information, find and diagnose network problems, plan for network growth, and generate reports
on network nodes.
z SNMP shields the physical differences between various devices and thus realizes automatic
management of products from different manufacturers. Offering only the basic set of functions,
SNMP makes the management tasks independent of both the physical features of the managed
devices and the underlying networking technology. Thus, SNMP achieves effective management
of devices from different manufacturers, especially in small, high-speed and low cost network
environments.
SNMP Mechanism
An SNMP enabled network comprises a Network Management Station (NMS) and an agent.
z An NMS is a station that runs the SNMP client software. It offers a user friendly interface, making it
easier for network administrators to perform most network management tasks.
z An agent is a program on the device. It receives and handles requests sent from the NMS. Only
under certain circumstances, such as interface state change, will the agent inform the NMS.
An NMS manages an SNMP enabled network, whereas agents are the managed network device. They
exchange management information through the SNMP protocol.
SNMP provides the following four basic operations:
z Get operation: The NMS gets the value of one or more objects of the agent through this operation.
z Set operation: The NMS can reconfigure the value of one or more objects in the agent MIB
(Management Information Base) by means of this operation.
z Trap operation: The agent sends traps to the NMS through this operation.
z Inform operation: The NMS sends traps to other NMSs through this operation.
16-1
Currently, SNMP agents support SNMPv3 and are compatible with SNMPv1 and SNMPv2c.
z SNMPv1 uses community name for authentication, which defines the relationship between an
SNMP NMS and an SNMP agent. SNMP packets with community names that did not pass the
authentication on the device will simply be discarded. A community name performs a similar role
as a key word and can be used to regulate access from NMS to agent.
z SNMPv2c uses community name for authentication. Compatible with SNMPv1, it extends the
functions of SNMPv1. SNMPv2c provides more operation modes such as GetBulk and
InformRequest; it supports more data types such as Counter64; and it provides various error
codes, thus being able to distinguish errors in more detail.
z SNMPv3 offers an authentication that is implemented with a User-Based Security Model (USM).
You can set the authentication and privacy functions. The former is used to authenticate the
validity of the sending end of the authentication packets, preventing access of illegal users; the
latter is used to encrypt packets between the NMS and agent, preventing the packets from being
intercepted. USM ensures a more secure communication between SNMP NMS and SNMP agent
by authentication with privacy, authentication without privacy, or no authentication no privacy.
Successful interaction between NMS and agent requires consistency of SNMP versions configured on
them. You can configure multiple SNMP versions for an agent to interact with different NMSs.
MIB Overview
Any managed resource can be identified as an object, which is known as the managed object.
Management Information Base (MIB) is a collection of all the managed objects. It defines a set of
characteristics associated with the managed objects, such as the object identifier (OID), access right
and data type of the objects. Each agent has its own MIB. NMS can read or write the managed objects
in the MIB. The relationship between an NMS, agent and MIB is shown in Figure 16-1.
Figure 16-1 Relationship between NMS, agent and MIB
MIB stores data using a tree structure. The node of the tree is the managed object and can be uniquely
identified by a path starting from the root node. As illustrated in the following figure, the managed
object B can be uniquely identified by a string of numbers {1.2.1.1}. This string of numbers is the OID
of the managed object B.
16-2
1 2
1 2
1 2
B
5 6
A
SNMP Configuration
As configurations for SNMPv3 differ substantially from those of SNMPv1 and SNMPv2c, their SNMP
functionalities is introduced separately below.
Follow these steps to configure SNMPv3:
16-3
16-4
The validity of a USM user depends on the engine ID of the SNMP agent. If the engine ID when the
USM user is created is not identical to the current engine ID, the USM user is invalid.
SNMP logs the GET and SET operations that the NMS performs on the SNMP agent. When the GET
operation is performed, the agent logs the IP address of the NMS, node name of the GET operation
and OID of the node. When the SET operation is performed, the agent logs the IP address of the NMS,
node name of the SET operation, OID of the node, the value set and the error code and error index of
the SET response. These logs will be sent to the information center, and the level of them is
informational, that is, they are taken as the system prompt information. With parameters for the
information center set, the output rules for SNMP logs are decided (that is, whether the logs are
permitted to output and the output destinations).
SNMP logs GET request, SET request and SET response, but does not log GET response.
Optional
info-center source
{ module-name | default } By default, SNMP logs are
channel { channel-number | output to loghost and logfile
Configure SNMP log output channel-name } [ debug { level only. To output SNMP logs to
rules severity | state state } * | log other destinations such as
{ level severity | state state } * | console or monitor terminal,
trap { level severity | state you need to set the output
state } * ] * destinations with this
command.
16-5
The SNMP agent sends traps to the NMS to inform the NMS of critical and important events (such as
reboot of a managed device). Two types of traps are available: generic traps and self-defined traps.
Generic traps supported on the device include: authentication, coldstart, linkdown, linkup and
warmstart. The others are self-defined traps, which are generated by different modules. As traps that
occupy large device memory affect device performance, it is recommended not to enable the trap
function for all the modules but for the specific modules as needed.
With the trap function enabled on a module, the traps generated by the module will be sent to the
information center. The information center has seven information output destinations. By default, traps
of all modules are allowed to be output to the console, monitor terminal (monitor), loghost, and logfile;
traps of all modules and with level equal to or higher than warnings are allowed to be output to the
trapbuffer and SNMP module (snmpagent); and traps cannot be sent to the logbuffer. You can set
parameters for the information center based on the levels of the traps generated by each module, and
thus decide the output rules of traps (that is, whether traps are allowed to be output and the output
destinations). For the configuration of the information center, refer to Information Center Configuration
in the System Volume.
Follow these steps to enable the trap function:
16-6
Configuration prerequisites
Configuration procedure
After traps are sent to the SNMP module, the SNMP module saves the traps in the trap queue. You can
set the size of the queue and the holding time of the traps in the queue, and you can also send the
traps to the specified destination host (usually the NMS).
Follow these steps to configure trap parameters:
16-7
16-8
Configuration procedure
# Configure VLAN-interface 2 (with the IP address of 1.1.1.1/24). Add the port GigabitEthernet 1/0/1 to
VLAN 2.
[Sysname] vlan 2
[Sysname-vlan2] port GigabitEthernet 1/0/1
[Sysname-Vlan2] quit
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] ip address 1.1.1.1 255.255.255.0
[Sysname-Vlan-interface2] quit
# Configure the contact person and physical location information of the switch.
[Sysname] snmp-agent sys-info contact Mr.Wang-Tel:3306
[Sysname] snmp-agent sys-info location telephone-closet,3rd-floor
# Enable the sending of traps to the NMS with an IP address of 1.1.1.2/24, using public as the
community name.
[Sysname] snmp-agent trap enable
[Sysname] snmp-agent target-host trap address udp-domain 1.1.1.2 udp-port 5000 params
securityname public
2) Configuring the SNMP NMS
16-9
Configuration procedure
# Enable logging display on the terminal. (This function is enabled by default, so that you can omit this
configuration).
<Sysname> terminal monitor
<Sysname> terminal logging
# Enable the information center to output the system information with the severity level equal to or
higher than informational to the console port.
<Sysname> system-view
[Sysname] info-center source snmp channel console log level informational
16-10
Field Description
Jan 1 02:49:40:566 2006 The time when SNMP log is generated
Value set when the SET operation is performed (This field is null,
meaning the value obtained with the GET operation is not logged.)
value When the value is a string of characters and the string contains
characters not in the range of ASCII 0 to 127 or invisible characters,
the string is displayed in hexadecimal. For example, value =
<81-43>[hex]
The system information of the information center can be output to the terminal or to the log buffer. In
this example, SNMP log is output to the terminal. For configuration of SNMP log output to other
destinations, see Information Center Configuration in the System Volume.
16-11
The modified MIB style takes effect only after you reboot the device. Therefore, you are recommended
to reboot the device after setting the MIB style to ensure that the modification of the MIB style takes
effect.
16-1
When configuring RMON, go to these sections for information you are interested in:
z RMON Overview
z Configuring RMON
z Displaying and Maintaining RMON
z RMON Configuration Example
RMON Overview
This section covers these topics:
z Introduction
z RMON Groups
Introduction
Remote Monitoring (RMON) is implemented based on the Simple Network Management Protocol
(SNMP) and is fully compatible with the existing SNMP framework without the need of any modification
on SNMP.
RMON provides an efficient means of monitoring subnets and allows SNMP to monitor remote network
devices in a more proactive and effective way. It reduces traffic between network management station
(NMS) and agent, facilitating large network management.
RMON comprises two parts: NMSs and agents running on network devices.
z Each RMON NMS administers the agents within its administrative domain.
z An RMON agent resides on a network monitor or a network probe. It monitors and collects
statistics on traffic over the network segments connected to its interfaces, such as the total
number of packets passed through a network segment over a specified period, or the total number
of good packets sent to a host.
Working Mechanism
RMON allows multiple monitors. A monitor provides two ways of data gathering:
z Using RMON probes. NMSs can obtain management information from RMON probes directly and
control network resources. In this approach, RMON NMSs can obtain all RMON MIB information.
z Embedding RMON agents in network devices such as routers, switches, and hubs to provide the
RMON probe function. RMON NMSs exchange data with RMON agents using basic SNMP
commands to gather network management information, which, due to system resources limitation,
may not cover all MIB information but four groups of information, alarm, event, history, and
statistics, in most cases.
The device adopts the second way. By using RMON agents on network monitors, an NMS can obtain
information about traffic size, error statistics, and performance statistics for network management.
17-1
Among the ten RMON groups defined by RMON specifications (RFC 1757), the device supports the
event group, alarm group, history group and statistics group. Besides, 3Com also defines and
implements the private alarm group, which enhances the functions of the alarm group. This section
describes the five kinds of groups in general.
Event group
The event group defines event indexes and controls the generation and notifications of the events
triggered by the alarms defined in the alarm group and the private alarm group. The events can be
handled in one of the following ways:
z Logging event related information in the event log table
z Sending traps to NMSs
z Logging event information in the event log table and sending traps to NMSs
z No action
Alarm group
The RMON alarm group monitors specified alarm variables, such as statistics on a port. If the sampled
value of the monitored variable is bigger than or equal to the upper threshold, an upper event is
triggered; if the sampled value of the monitored variable is lower than or equal to the lower threshold, a
lower event is triggered. The event is then handled as defined in the event group.
The following is how the system handles entries in the RMON alarm table:
1) Samples the alarm variables at the specified interval.
2) Compares the sampled values with the predefined threshold and triggers events if all triggering
conditions are met.
If a sampled alarm variable overpasses the same threshold multiple times, only the first one can cause
an alarm event. That is, the rising alarm and falling alarm are alternate.
The private alarm group calculates the sampled values of alarm variables and compares the result with
the defined threshold, thereby realizing a more comprehensive alarming function.
System handles the prialarm alarm table entry (as defined by the user) in the following ways:
z Periodically samples the prialarm alarm variables defined in the prialarm formula.
z Calculates the sampled values based on the prialarm formula.
z Compares the result with the defined threshold and generates an appropriate event.
17-2
History group
The history group periodically collects statistics on data at interfaces and saves the statistics in the
history record table for query convenience. The statistics data includes bandwidth utilization, number
of error packets, and total number of packets.
Once you successfully create a history entry in the specified interface, the history group starts to
periodically collect statistics on packet at the specified interface. Each statistical value is a cumulative
sum of packets sent/received on the interface during a sampling period.
The statistics group monitors port utilization. It provides statistics about network collisions, CRC
alignment errors, undersize/oversize packets, broadcasts, multicasts, bytes received, packets received,
bytes sent, packets sent, and so on.
After the creation of a statistics entry on an interface, the statistics group starts to collect traffic
statistics on the current interface. The result of the statistics is a cumulative sum.
Configuring RMON
Configuration Prerequisites
Before configuring RMON, configure the SNMP agent as described in SNMP Configuration in the
System Volume.
Configuration Procedure
17-3
z A new entry cannot be created if its parameters are identical with the corresponding parameters of
an existing entry Refer to Table 17-1 for the parameters to be compared for different entries.
z The system limits the total number of each type of entries (Refer to Table 17-1 for the detailed
numbers). When the total number of an entry reaches the maximum number of entries that can be
created, the creation fails.
z When you create an entry in the history table, if the specified buckets number argument exceeds
the history table size supported by the device, the entry will be created. However, the validated
value of the buckets number argument corresponding to the entry is the history table size
supported by the device.
Maximum number of
Entry Parameters to be compared entries that can be
created
Event description (description string), event type (log,
Event trap, logtrap or none) and community name 60
(trap-community or log-trapcommunity)
History Sampling interval (interval sampling-interval) 100
17-4
Agent is connected to a configuration terminal through its console port and to a remote NMS across
the Internet.
Create an entry in the RMON Ethernet statistics table to gather statistics on GigabitEthernet 1/0/1, and
enable logging after received bytes exceed the specified threshold.
Figure 17-1 Network diagram for RMON
Configuration procedure
17-5
# Configure an alarm group to sample received bytes on GigabitEthernet 1/0/1. When the received
bytes exceed the upper or below the lower limit, logging is enabled.
[Sysname] rmon alarm 1 1.3.6.1.2.1.16.1.1.1.4.1 10 delta rising-threshold 1000 1
falling-threshold 100 1 owner 1-rmon
[Sysname] display rmon alarm 1
Alarm table 1 owned by 1-rmon is VALID.
Samples type : delta
Variable formula : 1.3.6.1.2.1.16.1.1.1.4.1<etherStatsOctets.1>
Sampling interval : 10(sec)
Rising threshold : 1000(linked with event 1)
Falling threshold : 100(linked with event 1)
When startup enables : risingOrFallingAlarm
Latest value : 2552
17-6
When configuring MAC address table management, go to these sections for information you are
interested in:
z Introduction to MAC Address Table
z Configuring MAC Address Table Management
z MAC Address Table Management Configuration Example
z MAC Information Configuration
z MAC Information Configuration Example
z Interfaces that MAC address table management involves can only be Layer 2 Ethernet ports.
z This manual covers only the management of static, dynamic and blackhole MAC address table
entries (source and destination). For the management of multicast MAC address table entries,
refer to Multicast Routing and Forwarding Configuration in the IP Multicast Volume.
Usually, MAC address tables are automatically generated during the source MAC address learning
process of devices.
The following is how a device learns a MAC address after it receives a frame from a port, Port 1 for
example:
1) Check the source MAC address (MAC-SOURCE for example) of the frame, that is, the MAC
address of the device that sends the frame.
2) Look up the MAC address table for an entry corresponding to the MAC address and do the
following:
z If an entry is found for the MAC address, update the entry.
18-1
When a device dynamically learns MAC address table entries through source MAC address learning, it
cannot tell frames of legal users from those of hackers. This brings potential security hazards. For
example, if a hacker forges the MAC address of a legal user and uses it as the source MAC address of
the attack frames, and accesses the device from a different port than that used by the legal user, the
device will learn a forged MAC address entry, and forward frames destined for the legal user to the
hacker instead.
To enhance the security of a port, you can manually add MAC address entries into the MAC address
table of the device to bind specific user devices to the port, thus preventing hackers from stealing data
using forged MAC addresses. Manually configured MAC address table entries have a higher priority
than dynamically learned ones.
Dynamically-learned MAC addresses cannot overwrite static or blackhole MAC address entries, but
the latter can overwrite the former.
When forwarding a frame, the device adopts the following two forwarding modes based on the MAC
address table:
z Unicast mode: If an entry is available for the destination MAC address, the device forwards the
frame out the outgoing interface indicated by the MAC address table entry.
z Broadcast mode: If the device receives a frame with the destination address being all ones, or no
entry is available for the destination MAC address, the device broadcasts the frame to all the
interfaces except the receiving interface.
18-2
Follow these steps to add, modify, or remove entries in the MAC address table globally:
Follow these steps to add, modify, or remove entries in the MAC address table on an interface:
18-3
Once MAC learning is disabled in a VLAN, all MAC address entries learnt in the VLAN are removed.
The MAC address table on your device is available with an aging mechanism for dynamic entries to
prevent its resources from being exhausted. Set the aging timer appropriately: a long aging interval
may cause the MAC address table to retain outdated entries and fail to accommodate the latest
network changes; a short interval may result in removal of valid entries and hence unnecessary
broadcasts which may affect device performance.
Follow these steps to configure the aging timer for dynamic MAC address entries:
The aging timer for dynamic MAC address entries takes effect globally on dynamic MAC address
entries (learned or administratively configured) only.
To prevent a MAC address table from getting so large that it may degrade forwarding performance, you
may restrict the number of MAC addresses that can be learned on a per-port, port group basis.
Follow these steps to configure the MAC learning limit:
18-4
Log onto your device from the Console port to configure MAC address table management as follows:
z Set the aging timer to 500 seconds for dynamic MAC address entries.
z Add a static entry 000f-e235-dc71 for port GigabitEthernet 1/0/1 in VLAN 1.
Configuration procedure
# Set the aging timer for dynamic MAC address entries to 500 seconds.
[Sysname] mac-address timer aging 500
18-5
18-6
When configuring MAC Information, go to these sections for information you are interested in:
z Overview
z Configuring MAC Information
z MAC Information Configuration Example
Overview
Introduction to MAC Information
To monitor a network, you need to monitor users joining and leaving the network. Because a MAC
address uniquely identifies a network user, you can monitor users joining and leaving a network by
monitoring their MAC addresses.
With the MAC Information function, Layer-2 Ethernet interfaces send Syslog or Trap messages to the
monitor end in the network when they learn or delete MAC addresses. By analyzing these messages,
the monitor end can monitor users accessing the network.
When a new MAC address is learned or an existing MAC address is deleted on a device, the device
writes related information about the MAC address to the buffer area used to store user information.
When the timer set for sending MAC address monitoring Syslog or Trap messages expires, or when
the buffer is used up, the device sends the Syslog or Trap messages to the monitor end immediately.
19-1
interface interface-type
Enter interface view
interface-number
To enable MAC Information on an Ethernet interface, enable MAC Information globally first.
To prevent Syslog or Trap messages being sent too frequently and thus affecting system performance,
you can set the interval for sending Syslog or Trap messages.
Follow these steps to set the interval for sending Syslog or Trap messages:
To avoid losing user MAC address information, when the buffer storing user MAC address information
is used up, the user MAC address information in the buffer is sent to the monitor end in the network,
even if the timer set for sending MAC address monitoring Syslog or Trap messages has not expired
yet.
Follow these steps to configure the MAC Information queue length:
19-2
Setting the MAC Information queue length to 0 indicates that the device sends a Syslog or Trap
message to the network management device as soon as a new MAC address is learned or an existing
MAC address is deleted.
Network requirements
Configuration procedure
19-3
19-4
When maintaining and debugging the system, go to these sections for information you are interested
in:
z System Maintenance and Debugging
z Ping
z Tracert
z System Debugging
z Ping and Tracert Configuration Example
Ping
Introduction
You can use the ping command to verify whether a device with a specified address is reachable, and
to examine network connectivity.
The ping function is implemented through the Internet Control Message Protocol (ICMP):
1) The source device sends an ICMP echo request to the destination device.
2) The source device determines whether the destination is reachable based on whether it receives
an ICMP echo reply; if the destination is reachable, the source device determines the link quality
based on the numbers of ICMP echo requests sent and replies received, determines the distance
between the source and destination based on the round trip time of ping packets.
Configuring Ping
20-1
Network requirements
As shown in Figure 20-1, check whether an available route exists between Device A and Device C. If
there is an available route exists between the two devices, get the detailed information of routes from
Device A to Device C.
Figure 20-1 Ping network diagram
Configuration procedure
# Use the ping command to display whether an available route exists between Device A and Device C.
<DeviceA> ping 1.1.2.2
PING 1.1.2.2: 56 data bytes, press CTRL_C to break
Reply from 1.1.2.2: bytes=56 Sequence=1 ttl=254 time=205 ms
Reply from 1.1.2.2: bytes=56 Sequence=2 ttl=254 time=1 ms
Reply from 1.1.2.2: bytes=56 Sequence=3 ttl=254 time=1 ms
Reply from 1.1.2.2: bytes=56 Sequence=4 ttl=254 time=1 ms
Reply from 1.1.2.2: bytes=56 Sequence=5 ttl=254 time=1 ms
20-2
20-3
Tracert
Introduction
By using the tracert command, you can trace the Layer 3 devices involved in delivering an IP packet
from source to destination to check whether a network is available. This is useful for identification of
failed node(s) in the event of network failure.
Figure 20-2 Tracert diagram
Configuring Tracert
20-4
System Debugging
Introduction to System Debugging
The device provides various debugging functions. For the majority of protocols and features supported,
the system provides corresponding debugging information to help users diagnose errors.
The following two switches control the display of debugging information:
z Protocol debugging switch, which controls protocol-specific debugging information.
z Screen output switch, which controls whether to display the debugging information on a certain
screen.
As Figure 20-3 illustrates, suppose the device can provide debugging for the three modules 1, 2, and 3.
Only when both the protocol debugging switch and the screen output switch are turned on can
debugging information be output on a terminal.
Figure 20-3 The relationship between the protocol and screen debugging switch
Debugging
information Debugging
1 2 3 information 1 2 3
Protocol
Protocol
ON OFF ON debugging ON OFF ON
debugging
switch
switch
1 3 1 3
20-5
Output of the debugging information may reduce system efficiency. The debugging commands are
usually used by administrators in diagnosing network failure. After completing the debugging, disable
the corresponding debugging function, or use the undo debugging all command to disable all the
debugging functions.
Output of debugging information is related to the configurations of the information center and the
debugging commands of each protocol and functional module. Displaying the debugging information
on a terminal (including console or VTY) is a common way to output debugging information. You can
also output debugging information to other destinations. For the detailed configurations, refer to
Information Center Commands in the System Volume. By default, you can output debugging
information to a terminal by following these steps:
You must configure the debugging, terminal debugging and terminal monitor commands first to
display the detailed debugging information on the terminal. For the detailed description on the
terminal debugging and terminal monitor commands, refer to Information Center Commands in the
System Volume.
As shown in Figure 20-4, Device A failed to telnet Device C. Now it is required to determine whether an
available route exists between Device A and Device C. If no such a route exists, you need to locate the
failed nodes in the network.
20-6
Configuration procedure
# Use the ping command to display whether an available route exists between Device A and Device C.
<DeviceA> ping 1.1.2.2
PING 1.1.2.2: 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out
# No such a route exists. Use the tracert command to determine failed nodes.
<DeviceA> system-view
[DeviceA] ip ttl-expires enable
[DeviceA] ip unreachables enable
[DeviceA] tracert 1.1.2.2
traceroute to 1.1.2.2(1.1.2.2) 30 hops max,40 bytes packet, press CTRL_C to bre
ak
1 1.1.1.2 14 ms 10 ms 20 ms
2 * * *
3 * * *
4 * * *
5
<DeviceA>
The above output shows that no available route exists between Device A and Device C; an available
router exists between Device A and Device B; an error occurred on the connection between Device B
and Device C. In this case, you can use the debugging ip icmp command to enable ICMP debugging
on Device A and Device C to check whether the devices send or receive the specified ICMP packets,
or you can use the display ip routing-table command to display whether a route exists between the
two devices.
20-7
When configuring information center, go to these sections for information you are interested in:
z Information Center Configuration
z Configuring Information Center
z Displaying and Maintaining Information Center
z Information Center Configuration Examples
Acting as the system information hub, information center classifies and manages system information,
offering a powerful support for network administrators and developers in monitoring network
performance and diagnosing network problems.
The following describes the working process of information center:
z Receives the log, trap, and debugging information generated by each module.
z Outputs the above information to different information channels according to the user-defined
output rules.
z Outputs the information to different destinations based on the information channel-to-destination
associations.
To sum up, information center assigns the log, trap and debugging information to the ten information
channels according to the eight severity levels and then outputs the information to different
destinations. The following describes the working process in details.
By default, the information center is enabled. An enabled information center affects the system
performance in some degree due to information classification and output. Such impact becomes more
obvious in the event that there is enormous information waiting for processing.
The system information of the information center falls into three types:
z Log information
z Trap information
z Debugging information
21-1
The information is classified into eight levels by severity. The severity levels in the descending order
are emergency, alert, critical, error, warning, notice, informational and debug. When the system
information is output by level, the information with severity level higher than or equal to the specified
level is output. For example, in the output rule, if you configure to output information with severity level
being informational, the information with severity level being emergency through informational is all
allowed to be output.
The system supports six information output destinations, including the console, monitor terminal
(monitor), log buffer, log host, trap buffer and SNMP module. The specific destinations supported vary
with devices.
The system supports ten channels. The six channels 0 through 5 are configured with channel names,
output rules, and are associated with output destinations by default. The channel names, output rules
and the associations between the channels and output destinations can be changed through
commands. Besides, you can configure channels 6, 7, 8, and 9 without changing the default
configuration of the six channels.
Information channel
Default channel name Default output destination
number
Console (Receives log, trap and debugging
0 console
information)
Monitor terminal (Receives log, trap and
1 monitor debugging information, facilitating remote
maintenance)
Log host (Receives log, trap and debugging
2 loghost information and information will be stored in files
for future retrieval.)
Trap buffer (Receives trap information, a buffer
3 trapbuffer
inside the router for recording information.)
21-2
Configurations for the six output destinations function independently and take effect only after the
information center is enabled.
The system is composed of a variety of protocol modules, board drivers, and configuration modules.
The system information can be classified, filtered, and output according to source modules. You can
use the info-center source ? command to view the supported information source modules.
The default output rules define the source modules allowed to output information on each output
destination, the output information type, and the output information level as shown in Table 21-3, which
indicates that by default and in terms of all modules:
z Log information with severity level equal to or higher than informational is allowed to be output to
the log host; log information with severity level equal to or higher than warning is allowed to be
output to the console, monitor terminal, and log buffer; log information is not allowed to be output
to the trap buffer and the SNMP module.
z All trap information is allowed to be output to the console, monitor terminal and log host; trap
information with severity level equal to or higher than warning is allowed to be output to the trap
buffer and SNMP module; trap information is not allowed to be output to the log buffer.
z All debugging information is allowed to be output to the console and monitor terminal; debugging
information is not allowed to be output to the log host, log buffer, trap buffer and the SNMP
module.
21-3
For example, a monitor terminal connects to the device. When a terminal logs in to the device, the log
information in the following format is displayed on the monitor terminal:
%Jun 26 17:08:35:809 2008 Sysname SHELL/4/LOGIN: VTY login from 1.1.1.1
z If the output destination is the log host, the system information is in the following format according
to RFC 3164 (The BSD Syslog Protocol):
<Int_16>timestamp sysname %%nnmodule/level/digest: source content
z The closing set of angel brackets < >, the space, the forward slash /, and the colon are all required
in the above format.
z The format in the previous part is the original format of system information, so you may see the
information in a different format. The displayed format depends on the tools you use to view the
logs.
21-4
Int_16 (priority)
The priority is calculated using the following formula: facility*8+severity, in which facility represents the
logging facility name and can be configured when you set the log host parameters. The facility ranges
from local0 to local7 (16 to 23 in decimal integers) and defaults to local7. The facility is mainly used to
mark different log sources on the log host, query and filter the logs of the corresponding log source.
Severity ranges from 0 to 7. Table 21-1 details the value and meaning associated with each severity.
Note that the priority field takes effect only when the information has been sent to the log host.
timestamp
Timestamp records the time when system information is generated to allow users to check and identify
system events. You can use the info-center timestamp command to configure whether to include a
timestamp in the system information as well as the timestamp format if it is included. The time stamp of
the system information sent from the information center to the log host is with a precision of seconds,
whereas that of the system information sent from the information center to the other destinations is
with a precision of milliseconds.
sysname
Sysname is the system name of the current host. You can use the sysname command to modify the
system name. (Refer to Basic System Configuration Commands in the System Volume for details)
%%
This field is a preamble used to identify a vendor. It is displayed only when the output destination is log
host.
nn
This field is a version identifier of syslog. It is displayed only when the output destination is log host.
module
The module field represents the name of the module that generates system information. You can enter
the info-center source ? command in system view to view the module list.
level (severity)
System information can be divided into eight levels based on its severity, from 0 to 7. Refer to Table
21-1 for definition and description of these severity levels. The levels of system information generated
by modules are predefined by developers, and you cannot change the system information levels.
However, you can configure to output information of the specified level using the info-center source
command.
digest
21-5
source
This field indicates the source of the information, such as the IRF member ID, or the source IP
address of the log sender. This field is optional and is displayed only when the output destination is the
log host.
content
Task Remarks
Outputting System Information to the Console Optional
Outputting System Information to a Monitor Terminal Optional
Outputting System Information to a Log Host Optional
Outputting System Information to the Trap Buffer Optional
Outputting System Information to the Log Buffer Optional
21-6
After setting to output system information to the console, you need to enable the associated display
function to display the output information on the console.
Follow these steps in user view to enable the display of system information on the console:
System information can also be output to a monitor terminal, which is a user terminal that has login
connections through the AUX, VTY user interface.
21-7
After setting to output system information to a monitor terminal, you need to enable the associated
display function in order to display the output information on the monitor terminal.
Follow these steps to enable the display of system information on a monitor terminal:
21-8
The trap buffer receives the trap information only, and discards the log and debugging information
even if you have configured to output them to the trap buffer.
21-9
You can configure to output log, trap, and debugging information to the log buffer, but the log buffer
receives the log and debugging information only, and discards the trap information.
21-10
The SNMP module receives the trap information only, and discards the log and debugging information
even if you have configured to output them to the SNMP module.
To monitor the device running status, trap information is usually sent to the SNMP network
management station (NMS). In this case, you need to configure to send traps to the SNMP module,
and then set the trap sending parameters for the SNMP module to further process traps. For details,
refer to SNMP Configuration in the System Volume.
Follow these steps to configure to output system information to the SNMP module:
Synchronous information output refers to the feature that if the users input is interrupted by system
output such as log, trap, or debugging information, then after the completion of system output the
system will display a command line prompt (a prompt in command editing mode, or a [Y/N] string in
interaction mode) and your input so far.
This command is used in the case that your input is interrupted by a large amount of system output.
With this feature enabled, you can continue your operations from where you were stopped.
21-11
z If system information, such as log information, is output before you input any information under the
current command line prompt, the system will not display the command line prompt after the
system information output.
z If system information is output when you are inputting some interactive information (non Y/N
confirmation information), then after the system information output, the system will not display the
command line prompt but your previous input in a new line.
By default, all the ports of the device generate link up/down logging information when the port state
changes. Therefore, you may need to use this function in some cases, for example:
z You only concern the states of some of the ports. In this case, you can use this function to disable
the other ports from generating link up/down logging information.
z The state of a port is not stable, and therefore redundant logging information will be generated. In
this case, you can use this function to disable the port from generating link up/down logging
information.
Follow the steps below to disable a port from generating link up/down logging information:
With this feature applied to a port, when the state of the port changes, the system does not generate
port link up/down logging information. In this case, you cannot monitor the port state changes
conveniently. Therefore, it is recommended to use the default configuration in normal cases.
21-12
Network requirements
Configuration procedure
Before the configuration, make sure that there is a route between Device and PC.
1) Configure the device
# Enable information center.
<Sysname> system-view
21-13
# Specify the host with IP address 1.2.0.1/16 as the log host, use channel loghost to output log
information (optional, loghost by default), and use local4 as the logging facility.
[Sysname] info-center loghost 1.2.0.1 channel loghost facility local4
# Disable the output of log, trap, and debugging information of all modules on channel loghost.
[Sysname] info-center source default channel loghost debug state off log state off trap state
off
As the default system configurations for different channels are different, you need to disable the output
of log, trap, and debugging information of all modules on the specified channel (loghost in this
example) first and then configure the output rule as needed so that unnecessary information will not be
output.
# Configure the information output rule: allow log information of ARP and IP modules with severity
equal to or higher than informational to be output to the log host. (Note that the source modules
allowed to output information depend on the device model.)
[Sysname] info-center source arp channel loghost log level informational state on
[Sysname] info-center source ip channel loghost log level informational state on
2) Configure the log host
The following configurations were performed on SunOS 4.0 which has similar configurations to the
Unix operating systems implemented by other vendors.
Step 1: Log in to the log host as a root user.
Step 2: Create a subdirectory named Device under directory /var/log/, and create file info.log under
the Device directory to save logs of Device.
# mkdir /var/log/Device
# touch /var/log/Device/info.log
In the above configuration, local4 is the name of the logging facility used by the log host to receive
logs. info is the information level. The Unix system will record the log information with severity level
equal to or higher than informational to file /var/log/Device/info.log.
21-14
Step 4: After log file info.log is created and file /etc/syslog.conf is modified, you need to issue the
following commands to display the process ID of syslogd, kill the syslogd process and then restart
syslogd using the r option to make the modified configuration take effect.
# ps -ae | grep syslogd
147
# kill -HUP 147
# syslogd -r &
After the above configurations, the system will be able to record log information into the log file.
Network requirements
Configuration procedure
Before the configuration, make sure that there is a route between Device and PC.
1) Configure the device
# Enable information center.
<Sysname> system-view
[Sysname] info-center enable
# Specify the host with IP address 1.2.0.1/16 as the log host, use channel loghost to output log
information (optional, loghost by default), and use local5 as the logging facility.
[Sysname] info-center loghost 1.2.0.1 channel loghost facility local5
# Disable the output of log, trap, and debugging information of all modules on channel loghost.
21-15
As the default system configurations for different channels are different, you need to disable the output
of log, trap, and debugging information of all modules on the specified channel (loghost in this
example) first and then configure the output rule as needed so that unnecessary information will not be
output.
# Configure the information output rule: allow log information of all modules with severity equal to or
higher than informational to be output to the log host.
[Sysname] info-center source default channel loghost log level informational state on
2) Configure the log host
Step 1: Log in to the log host as a root user.
Step 2: Create a subdirectory named Device under directory /var/log/, and create file info.log under
the Device directory to save logs of Device.
# mkdir /var/log/Device
# touch /var/log/Device/info.log
In the above configuration, local5 is the name of the logging facility used by the log host to receive
logs. info is the information level. The Linux system will record the log information with severity level
equal to or higher than informational to file /var/log/Device/info.log.
Step 4: After log file info.log is created and file /etc/syslog.conf is modified, you need to issue the
following commands to display the process ID of syslogd, kill the syslogd process, and restart
syslogd using the -r option to make the modified configuration take effect.
# ps -ae | grep syslogd
147
# kill -9 147
21-16
Ensure that the syslogd process is started with the -r option on a Linux log host.
After the above configurations, the system will be able to record log information into the log file.
Network requirements
z Log information with a severity higher than informational will be output to the console;
z The source modules are ARP and IP.
Figure 21-3 Network diagram for sending log information to the console
Configuration procedure
# Use channel console to output log information to the console (optional, console by default).
[Sysname] info-center console channel console
# Disable the output of log, trap, and debugging information of all modules on channel console.
[Sysname] info-center source default channel console debug state off log state off trap state
off
As the default system configurations for different channels are different, you need to disable the output
of log, trap, and debugging information of all modules on the specified channel (console in this
example) first and then configure the output rule as needed so that unnecessary information will not be
output.
# Configure the information output rule: allow log information of ARP and IP modules with severity
equal to or higher than informational to be output to the console. (Note that the source modules
allowed to output information depend on the device model.)
[Sysname] info-center source arp channel console log level informational state on
[Sysname] info-center source ip channel console log level informational state on
21-17
# Enable the display of log information on a terminal. (Optional, this function is enabled by default.)
<Sysname> terminal monitor
% Current terminal monitor is on
<Sysname> terminal logging
% Current terminal logging is on
After the above configuration takes effect, if the specified module generates log information, the
information center automatically sends the log information to the console, which then displays the
information.
21-18
When configuring hotfix, go to these sections for information you are interested in:
z Hotfix Overview
z Hotfix Configuration Task List
z Displaying and Maintaining Hotfix
z Hotfix Configuration Examples
Hotfix Overview
Hotfix is a fast and cost-effective method to repair software defects of a device. Compared with another
method, software version upgrade, hotfix can upgrade the software without interrupting the running
services of the device, that is, it can repair the software defects of the current version without rebooting
the device.
A patch, also called patch unit, is a package to fix software defects. Generally, patches are released as
patch files A patch file may contain one or more patches for different defects. After loaded from the
Flash to the memory area, each patch is assigned a unique number, which starts from 1, for
identification, management, and operation. For example, if a patch file has three patch units, they will
be numbered as 1, 2, and 3 respectively.
Incremental patch
Patches in a patch file are all incremental patches. An incremental patch means that the patch is
dependent on the previous patch units. For example, if a patch file has three patch units, patch 3 can
be running only after patch 1 and 2 take effect. You cannot run patch 3 separately.
Patches fall into two types, common patches and temporary patches.
z Common patches are those formally released through the version release flow.
z Temporary patches are those not formally released through the version release flow, but
temporarily provided to solve the emergent problems.
The common patches always include the functions of the previous temporary patches, so as to replace
them. The patch type affects the patch loading process only: the system will delete all the temporary
patches before it loads the common patch.
Patch Status
Each patch has its status, which can be switched by command lines. The relationship between patch
state changes and command actions is shown in Figure 22-1. The patch can be in the state of IDLE,
DEACTIVE, ACTIVE, and RUNNING. Load, run temporarily, confirm running, stop running, delete,
22-1
Information about patch states is saved in file patchstate on the flash. It is recommended not to
operate this file.
IDLE state
Patches in the IDLE state are not loaded. You cannot install or run the patches, as shown in Figure
22-2 (suppose the memory patch area can load up to eight patches). The patches that are in the IDLE
state will be still in the IDLE state after system reboot.
22-2
DEACTIVE state
Patches in the DEACTIVE state have been loaded to the memory patch area but have not run in the
system yet. Suppose that there are seven patches in the patch file to be loaded. After the seven
patches successfully pass the version check and CRC check, they will be loaded to the memory patch
area and are in the DEACTIVE state. At this time, the patch states in the system are as shown in
Figure 22-3.
The patches that are in the DEACTIVE state will be still in the DEACTIVE state after system reboot.
Figure 22-3 A patch file is loaded to the memory patch area
ACTIVE state
Patches in the ACTIVE state are those that have run temporarily in the system and will become
DEACTIVE after system reboot. For the seven patches in Figure 22-3, if you activate the first five
patches, the state of them will change from DEACTIVE to ACTIVE. At this time, the patch states in the
system are as shown in Figure 22-4.
The patches that are in the ACTIVE state will be in the DEACTIVE state after system reboot.
22-3
RUNNING state
After you confirm the running of the ACTIVE patches, the state of the patches will become RUNNING
and will be in the RUNNING state after system reboot. For the five patches in Figure 22-4, if you
confirm the running the first three patches, their states will change from ACTIVE to RUNNING. At this
time, the patch states of the system are as shown in Figure 22-5.
Figure 22-5 Patches are running
The patches that are in the RUNNING state will be still in the RUNNING state after system reboot.
22-4
The loading and installation are performed on all member devices. Before these operations, save the
same patch files to the root directories in the storage media of all member devices.
22-5
Task Remarks
Configuring the Patch File Location Optional
Loading a Patch File Required
Activating Patches Required
z The directory specified by the patch-location argument must exist on each member device. If one
member device does not have such directory, the system cannot locate the patch file on the
member device.
z The patch install command changes patch file location specified with the patch location
command to the directory specified by the patch-location argument of the patch install command.
For example, if you execute the patch location xxx command and then the patch install yyy
command, the patch file location automatically changes from xxx to yyy.
Loading the right patch files is the basis of other hotfixing operations. The system loads a patch file
from the flash by default. It will failed if the system cannot find the patch file on the flash.
22-6
Activating Patches
After you activate a patch, the patch will take effect and is in the test-run stage. After the device is reset
or rebooted, the patch becomes invalid.
If you find that an ACTIVE patch is of some problem, you can reboot the device to deactivate the patch,
so as to avoid a series of running faults resulting from patch error.
Follow the steps below to activate patches:
After you confirm the running of a patch, the patch state becomes RUNNING, and the patch is in the
normal running stage. After the device is reset or rebooted, the patch is still valid.
Follow the steps below to confirm the running of patches:
22-7
Task Remarks
Stop Running Patches Required
Deleting Patches Required
After you stop running a patch, the patch state becomes DEACTIVE, and the system runs in the way
before it is installed with the patch.
Follow the steps below to stop running patches:
Deleting Patches
Deleting patches only removes the patches from the memory patch area, and does not delete them
from the storage medium. The patches turn to IDLE state after this operation. After a patch is deleted,
the system runs in the way before it is installed with the patch.
Follow the steps below to delete patches:
22-8
Network requirements
z The software running on Device is of some problem, and thus hotfixing is needed.
z The patch file patch_xxx.bin is saved on the TFTP server.
z The IP address of Device is 1.1.1.1/24, and IP address of TFTP Server is 2.2.2.2/24. An available
route exists between Device and TFTP server.
Figure 22-6 Network diagram of hotfix configuration
Configuration procedure
1) Configure TFTP Server. Note that the configuration varies depending on server type and the
configuration procedure is omitted.
z Enable the TFTP server function.
z Save the patch file patch_xxx.bin to the directory of the TFTP server.
2) Configure Device
Make sure the free flash space of the device is big enough to store the patch file.
# Before upgrading the software, use the save command to save the current system configuration.
The configuration procedure is omitted.
# Load the patch file patch_xxx.bin from the TFTP server to the root directory of the device storage
medium.
<Device> tftp 2.2.2.2 get patch_xxx.bin
22-9
Network requirements
z IRF refers to an IRF in this example and it consists of two IRF devices, Master and Slave. The
software running on the IRF devices are of some problem, and thus hotfixing is needed.
z The patch file patch_xxx.bin is saved on the TFTP server.
z The IP address of IRF is 1.1.1.1/24, and IP address of TFTP Server is 2.2.2.2/24. An available
route exists between IRF and TFTP server.
Figure 22-7 Network diagram for hotfix configuration
Configuration procedure
1) Configure the TFTP server. Note that the configuration varies depending on server type, and the
configuration procedure is omitted.
z Enable the TFTP server function.
z Save the patch file patch_xxx.bin to the directory of TFTP server.
2) Configure Device.
Make sure the free flash space of the device is big enough to store the patch files.
# Before upgrading the software, use the save command to save the current system configuration.
The configuration procedure is omitted.
# Load the patch file patch_xxx.bin from the TFTP server to the root directory of the Master's storage
medium.
<Device> tftp 2.2.2.2 get patch_xxx.bin
# Load the patch file patch_xxx.bin from the TFTP server to the root directory of the Slave's storage
medium.
<Device> tftp 2.2.2.2 get patch_xxx.bin slot2#flash:/patch_xxx.bin
22-10
22-11
When configuring NQA, go to these sections for information you are interested in:
z NQA Overview
z NQA Configuration Task List
z Configuring the NQA Server
z Enabling the NQA Client
z Creating an NQA Test Group
z Configuring an NQA Test Group
z Configuring the Collaboration Function
z Configuring Trap Delivery
z Configuring the NQA Statistics Function
z Configuring Optional Parameters Common to an NQA Test Group
z Scheduling an NQA Test Group
z Displaying and Maintaining NQA
z NQA Configuration Examples
NQA Overview
Introduction to NQA
Network Quality Analyzer (NQA) analyzes network performance, services and service quality through
sending test packets, and provides you with network performance and service quality parameters such
as jitter, TCP connection delay, FTP connection delay and file transfer rate.
With the NQA test results, you can:
1) Know network performance in time and then take corresponding measures.
2) Diagnose and locate network faults.
Features of NQA
Ping can use only the Internet Control Message Protocol (ICMP) to test the reachability of the
destination host and the roundtrip time of a packet to the destination. As an enhancement to the Ping
tool, NQA provides multiple test types and more functions.
At present, NQA supports ten test types: ICMP echo, DHCP, FTP, HTTP, UDP jitter, SNMP, TCP, UDP
echo, voice and DLSw.
In an NQA test, the client sends different types of test packets to the peer to detect the availability and
the response time of the peer, helping you know protocol availability and network performance based
on the test results.
The collaboration here involves three parts: the application modules, the Track module, and the
detection modules.
z The detection modules monitor the link status, network performance and so on, and inform the
Track module of the detection result.
z Upon receiving the detection result, the Track module changes the status of the Track object
accordingly and informs the application modules. The Track module works between the
application modules and the detection modules and is mainly used to obscure the difference of
various detection modules to provide a unified interface for application modules.
z The application modules then deal with the changes accordingly based on the status of the Track
object, and thus collaboration is implemented.
Take static routing as an example. You have configured a static route with the next hop 192.168.0.88. If
192.168.0.88 is reachable, the static route is valid; if 192.168.0.88 is unreachable, the static route is
invalid. With the collaboration between NQA, Track module and application modules, real time
monitoring of reachability of the static route can be implemented:
2) Monitor reachability of the destination 192.168.0.88 through NQA.
3) If 192.168.0.88 is detected to be unreachable, NQA will inform the static routing module through
Track module.
4) The static routing module then can know that the static route is invalid.
You can set whether to send traps to the network management server when an NQA test is performed.
When a probe fails or a test is completed, the network management server can be notified, and the
network administrator can know the network running status and performance in time through the traps
sent.
22-2
Test group
Before performing an NQA test, you need to create an NQA test group, and configure NQA test
parameters such as test type, destination address and destination port.
Each test group has an administrator name and operation tag, which can uniquely define a test group.
After an NQA test is started, one test is performed at a regular interval and you can set the interval as
needed.
One NQA test involves multiple consecutive probes and you can set the number of the probes.
NQA client is the device initiating an NQA test and the NQA test group is created on the NQA client.
NQA server processes the test packets sent from the NQA client, as shown in Figure 23-2. The NQA
server makes a response to the request originated by the NQA client by listening to the specified
destination address and port number.
Figure 23-2 Relationship between the NQA client and NQA server
In most NQA tests, you only need to configure the NQA client; while in TCP, UDP echo, UDP jitter, and
voice tests, you must configure the NQA server.
You can create multiple TCP or UDP listening services on the NQA server, with each listening service
corresponding to a specified destination address and port number. The IP address and port number
specified for a listening service on the server must be consistent with those on the client and must be
different from those of an existing listening service.
22-3
Task Remarks
Configuring the NQA Server Required for TCP, UDP echo, UDP jitter and voice tests
To perform an NQA test successfully, make the following configurations on the NQA client:
1) Enable the NQA client;
2) Create a test group and configure test parameters according to the test type. The test parameters
may vary with test types;
3) Start the NQA test;
After the test, you can view test results using the display or debug commands.
Complete these tasks to configure NQA client:
Task Remarks
Enabling the NQA Client Required
Creating an NQA Test Group Required
Configuring an ICMP Echo Test
Configuring a DHCP Test
Configuring an FTP Test
Configuring an HTTP Test
22-4
22-5
An ICMP echo test is used to test reachability of the destination host according to the ICMP echo reply
or timeout information. An ICMP echo test has the same function with the ping command but has more
abundant output information. You can use the ICMP echo test to locate connectivity problems in a
network.
Follow these steps to configure an ICMP echo test:
22-6
A DHCP test is mainly used to test the existence of a DHCP server on the network as well as the time
necessary for the DHCP server to respond to a client request and assign an IP address to the client.
Configuration prerequisites
Before performing a DHCP test, you need to configure the DHCP server. If the NQA (DHCP client) and
the DHCP server are not in the same network segment, you need to configure a DHCP relay. For the
configuration of DHCP server and DHCP relay, see DHCP Configuration in the IP Services Volume.
22-7
z As DHCP test is a process to simulate address allocation in DHCP, the IP address of the interface
performing the DHCP test will not be changed.
z After the DHCP test is completed, the NQA client will send a DHCP-RELEASE packet to release
the obtained IP address.
An FTP test is mainly used to test the connection between the NQA client and a specified FTP server
and the time necessary for the FTP client to transfer a file to or download a file from the FTP server.
Configuration prerequisites
Before an FTP test, you need to perform some configurations on the FTP server. For example, you
need to configure the username and password used to log onto the FTP server. For the FTP server
configuration, see File System Management Configuration in the System Volume.
22-8
z When you execute the put command, a file file-name with fixed size and content is created on the
FTP server; when you execute the get command, the device does not save the files obtained from
the FTP server.
z When you execute the get command, the FTP test cannot succeed if a file named file-name does
not exist on the FTP server.
z When you execute the get command, please use a file with a smaller size as a big file may result
in test failure because of timeout, or may affect other services because of occupying too much
network bandwidth.
An HTTP test is used to test the connection between the NQA client and a specified HTTP server and
the time required to obtain data from the HTTP server, thus detecting the connectivity and performance
of the HTTP server.
Configuration prerequisites
Before performing an HTTP test, you need to configure the HTTP server.
22-9
The TCP port number for the HTTP server must be 80 in an HTTP test. Otherwise, the test will fail.
It is recommended not to perform an NQA UDP jitter test on known ports, namely, ports from 1 to 1023.
Otherwise, the NQA test will fail or the corresponding services of this port will be unavailable.
Real-time services such as voice and video have high requirements on delay jitters. With the UDP jitter
test, uni/bi-directional delay jitters can be obtained to judge whether a network can carry real-time
services.
22-10
Configuration prerequisites
A UDP jitter test requires cooperation between the NQA server and the NQA client. Before the UDP
jitter test, make sure that the UDP listening function is configured on the NQA server. For the
configuration of the UDP listening function, see Configuring the NQA Server.
22-11
The number of probes made in a UDP jitter test depends on the probe count command, while the
number of probe packets sent in each probe depends on the configuration of the probe
packet-number command.
An SNMP query test is used to test the time the NQA client takes to send an SNMP query packet to the
SNMP agent and then receive a response packet.
Configuration prerequisites
The SNMP agent function must be enabled on the device serving as an SNMP agent before an SNMP
test. For the configuration of SNMP agent, see SNMP Configuration in the System Volume.
22-12
A TCP test is used to test the TCP connection between the client and the specified port on the NQA
server and the setup time for the connection, thus judge the availability and performance of the
services provided on the specified port on the server.
Configuration prerequisites
A TCP test requires cooperation between the NQA server and the NQA client. The TCP listening
function needs to be configured on the NQA server before the TCP test. For the configuration of the
TCP listening function, see Configuring the NQA Server.
22-13
A UDP echo test is used to test the connectivity and roundtrip time of a UDP echo packet from the
client to the specified UDP port on the NQA server.
Configuration prerequisites
A UDP echo test requires cooperation between the NQA server and the NQA client. The UDP listening
function needs to be configured on the NQA server before the UDP echo test. For the configuration of
the UDP listening function, see Configuring the NQA Server.
22-14
It is recommended not to perform an NQA UDP jitter test on known ports, namely, ports from 1 to 1023.
Otherwise, the NQA test will fail or the corresponding services of these ports will be unavailable.
A voice test is used to test voice over IP (VoIP) network status, and collect VoIP network parameters so
that users can adjust the network according the network status. The procedure of a voice test is as
follows:
1) The source (NQA client) sends voice packets of G.711 A-law, G.711 -law or G.729 A-law codec
type at regular intervals to the destination (NQA server).
2) The destination affixes a time stamp to each packet that it receives and then sends it back to the
source.
3) Upon receiving the packets, the source calculates the delay jitter and delay by calculating the
difference between the interval for the destination to receive two successive packets and the
22-15
Configuration prerequisites
A voice test requires cooperation between the NQA server and the NQA client. Before a voice test,
make sure that the UDP listening function is configured on the NQA server. For the configuration of
UDP listening function, see Configuring the NQA Server.
22-16
Only one probe can be made in one voice test, and the number of probe packets sent in each probe
depends on the configuration of the probe packet-number command.
A DLSw test is used to test the response time of the DLSw device.
22-17
Enable the DLSw function on the peer device before DLSw test.
22-18
z You cannot modify the content of a reaction entry using the reaction command after the
collaboration object is created.
z The collaboration function is not supported in a UDP jitter or voice test.
Configuration prerequisites
Before configuring trap delivery, you need to configure the destination address of the trap message
with the snmp-agent target-host command, create an NQA test group, and configure related
parameters. For the introduction to the snmp-agent target-host command, see SNMP Commands in
the System Volume.
Only the reaction trap test-complete command is supported in a voice test, namely, in a voice test,
traps are sent to the NMS only if the test succeeds.
22-19
Optional
Configure the maximum 2 by default.
number of statistics groups that statistics max-group number If the maximum number is 0, it
can be kept indicates that no statistics is
performed.
22-20
Optional
Configure the maximum
20 by default.
number of hops a probe packet ttl value
traverses in the network This parameter is not available
for a DHCP test.
Optional
Configure the ToS field in an IP
0 by default.
packet header in an NQA tos value
probe packet This parameter is not available
for a DHCP test.
Optional
Enable the routing table Disabled by default.
route-option bypass-route
bypass function This parameter is not available
for a DHCP test.
22-21
Configuration prerequisites
z After an NQA test group is scheduled, you cannot enter the test group view or test type view.
z A started test group or a test group that has completed tests will not be influenced by the system
time change; only a test group that is waiting to perform tests will be influenced by the system time
change.
22-22
Network requirements
Use the NQA ICMP function to test whether the NQA client (Device A) can send packets to the
specified destination (Device B) and test the roundtrip time of packets.
Figure 23-3 Network diagram for ICMP echo tests
Configuration procedure
# Create an ICMP echo test group and configure related test parameters.
<DeviceA> system-view
[DeviceA] nqa entry admin test
[DeviceA-nqa-admin-test] type icmp-echo
[DeviceA-nqa-admin-test-icmp-echo] destination ip 10.2.2.2
# Disable ICMP echo test after the test begins for a period of time.
[DeviceA] undo nqa schedule admin test
22-23
Network requirements
Use the NQA DHCP function to test the time necessary for Switch A to obtain an IP address from the
DHCP server Switch B.
Figure 23-4 Network diagram for DHCP
Switch A Switch B
Configuration procedure
22-24
# Disable DHCP test after the test begins for a period of time.
[SwitchA] undo nqa schedule admin test
Network requirements
Use the NQA FTP function to test the connection with a specified FTP server and the time necessary
for Device A to upload a file to the FTP server. The login username is admin, the login password is
systemtest, and the file to be transferred to the FTP server is config.txt.
Figure 23-5 Network diagram for FTP tests
Configuration procedure
22-25
# Disable FTP test after the test begins for a period of time.
[DeviceA] undo nqa schedule admin test
Network requirements
Use the HTTP function to test the connection with a specified HTTP server and the time required to
obtain data from the HTTP server.
22-26
Configuration procedure
# Disable HTTP test after the test begins for a period of time.
[DeviceA] undo nqa schedule admin test
22-27
Network requirements
Use the NQA UDP jitter function to test the delay jitter of packet transmission between Device A and
Device B.
Figure 23-7 Network diagram for UDP jitter tests
Configuration procedure
1) Configure Device B.
# Enable the NQA server and configure the listening IP address as 10.2.2.2 and port number as 9000.
<DeviceB> system-view
[DeviceB] nqa server enable
[DeviceB] nqa server udp-echo 10.2.2.2 9000
2) Configure Device A.
# Create a UDP jitter test group and configure related test parameters.
<DeviceA> system-view
[DeviceA] nqa entry admin test
[DeviceA-nqa-admin-test] type udp-jitter
[DeviceA-nqa-admin-test-udp-jitter] destination ip 10.2.2.2
[DeviceA-nqa-admin-test-udp-jitter] destination port 9000
[DeviceA-nqa-admin-test-udp-jitter] frequency 1000
[DeviceA-nqa-admin-test-udp-jitter] quit
# Disable UDP jitter test after the test begins for a period of time.
[DeviceA] undo nqa schedule admin test
22-28
22-29
The display nqa history command cannot show you the results of UDP jitter tests. Therefore, to know
the result of a UDP jitter test, you are recommended to use the display nqa result command to view
the probe results of the latest NQA test, or use the display nqa statistics command to view the
statistics of NQA tests.
Network requirements
Use the NQA SNMP query function to test the time it takes for Device A to send an SNMP query packet
to the SNMP agent and receive a response packet.
Figure 23-8 Network diagram for SNMP tests
Configuration procedure
22-30
# Disable SNMP query test after the test begins for a period of time.
[DeviceA] undo nqa schedule admin test
Network requirements
Use the NQA TCP function to test the time for establishing a TCP connection between Device A and
Device B. The port number used is 9000.
22-31
Configuration procedure
1) Configure Device B.
# Enable the NQA server and configure the listening IP address as 10.2.2.2 and port number as 9000.
<DeviceB> system-view
[DeviceB] nqa server enable
[DeviceB] nqa server tcp-connect 10.2.2.2 9000
2) Configure Device A.
# Create a TCP test group and configure related test parameters.
<DeviceA> system-view
[DeviceA] nqa entry admin test
[DeviceA-nqa-admin-test] type tcp
[DeviceA-nqa-admin-test-tcp] destination ip 10.2.2.2
[DeviceA-nqa-admin-test-tcp] destination port 9000
[DeviceA-nqa-admin-test-tcp] quit
# Disable TCP test after the test begins for a period of time.
[DeviceA] undo nqa schedule admin test
22-32
Network requirements
Use the NQA UDP echo function to test the round trip time between Device A and Device B. The port
number is 8000.
Figure 23-10 Network diagram for the UDP echo tests
Configuration procedure
1) Configure Device B.
# Enable the NQA server and configure the listening IP address as 10.2.2.2 and port number as 8000.
<DeviceB> system-view
[DeviceB] nqa server enable
[DeviceB] nqa server udp-echo 10.2.2.2 8000
2) Configure Device A.
# Create a UDP echo test group and configure related test parameters.
<DeviceA> system-view
[DeviceA] nqa entry admin test
[DeviceA-nqa-admin-test] type udp-echo
[DeviceA-nqa-admin-test-udp-echo] destination ip 10.2.2.2
[DeviceA-nqa-admin-test-udp-echo] destination port 8000
[DeviceA-nqa-admin-test-udp-echo] quit
# Disable UDP echo test after the test begins for a period of time.
[DeviceA] undo nqa schedule admin test
22-33
Network requirements
Use the NQA voice function to test the delay jitter of voice packet transmission and voice quality
between Device A and Device B.
Figure 23-11 Network diagram for voice tests
Configuration procedure
1) Configure Device B.
# Enable the NQA server and configure the listening IP address as 10.2.2.2 and port number as 9000.
<DeviceB> system-view
[DeviceB] nqa server enable
[DeviceB] nqa server udp-echo 10.2.2.2 9000
2) Configure Device A.
# Create a voice test group and configure related test parameters.
<DeviceA> system-view
[DeviceA] nqa entry admin test
[DeviceA-nqa-admin-test] type voice
[DeviceA-nqa-admin-test-voice] destination ip 10.2.2.2
[DeviceA-nqa-admin-test-voice] destination port 9000
[DeviceA-nqa-admin-test-voice] quit
# Disable the voice test after the test begins for a period of time.
[DeviceA] undo nqa schedule admin test
22-34
22-35
The display nqa history command cannot show you the results of voice tests. Therefore, to know the
result of a voice test, you are recommended to use the display nqa result command to view the probe
results of the latest NQA test, or use the display nqa statistics command to view the statistics of NQA
tests.
22-36
Network requirements
Use the NQA DLSw function to test the response time of the DLSw device.
Figure 23-12 Network diagram for the DLSw tests
Configuration procedure
# Disable DLSw test after the test begins for a period of time.
[DeviceA] undo nqa schedule admin test
22-37
Network requirements
As shown in Figure 23-13, configure a static route to Switch C on Switch A, with Switch B as the next
hop. Associate the static route, track entry, and NQA test group to verify whether static route is active
in real time.
Figure 23-13 Network diagram for NQA collaboration configuration example
Switch B
Vlan-int3 Vlan-int2
10.2.1.1/24 10.1.1.1/24
Vlan-int3 Vlan-int2
10.2.1.2/24 10.1.1.2/24
Switch A Switch C
Configuration procedure
# Configure the test type of the NQA test group as ICMP echo.
[SwitchA-nqa-admin-test] type icmp-echo
# Configure the destination IP address of the ICMP echo test operation as 10.2.1.1.
[SwitchA-nqa-admin-test-icmp-echo] destination ip 10.2.1.1
# Create collaboration entry 1. If the number of consecutive probe failures reaches 5, collaboration
with other modules is triggered.
[SwitchA-nqa-admin-test-icmp-echo] reaction 1 checked-element probe-fail threshold-type
consecutive 5 action-type trigger-only
[SwitchA-nqa-admin-test-icmp-echo] quit
# Configure the test start time and test duration for the test group.
[SwitchA] nqa schedule admin test start-time now lifetime forever
4) On Switch A, create the Track entry.
# Create Track entry 1 to associate it with Reaction entry 1 of the NQA test group (admin-test).
22-38
# Display brief information about active routes in the routing table on Switch A.
[SwitchA] display ip routing-table
Routing Tables: Public
Destinations : 5 Routes : 5
The above information shows that the static route with the next hop 10.2.1.1 is active, and the status of
the track entry is positive. The static route configuration works.
# Remove the IP address of VLAN-interface 3 on Switch B.
<SwitchB> system-view
[SwitchB] interface vlan-interface 3
[SwitchB-Vlan-interface3] undo ip address
# Display brief information about active routes in the routing table on Switch A.
[SwitchA] display ip routing-table
Routing Tables: Public
Destinations : 4 Routes : 4
22-39
The above information shows that the next hop 10.2.1.1 of the static route is not reachable, and the
status of the track entry is negative. The static route does not work.
22-40
When configuring NTP, go to these sections for information you are interested in:
z NTP Overview
z NTP Configuration Task List
z Configuring the Operation Modes of NTP
z Configuring Optional Parameters of NTP
z Configuring Access-Control Rights
z Configuring NTP Authentication
z Displaying and Maintaining NTP
z NTP Configuration Examples
NTP Overview
Defined in RFC 1305, the Network Time Protocol (NTP) synchronizes timekeeping among distributed
time servers and clients. NTP runs over the User Datagram Protocol (UDP), using UDP port 123.
The purpose of using NTP is to keep consistent timekeeping among all clock-dependent devices within
the network so that the devices can provide diverse applications based on the consistent time.
For a local system running NTP, its time can be synchronized by other reference sources and can be
used as a reference source to synchronize other clocks.
Applications of NTP
An administrator can by no means keep time synchronized among all the devices within a network by
changing the system clock on each station, because this is a huge amount of workload and cannot
guarantee the clock precision. NTP, however, allows quick clock synchronization within the entire
network while it ensures a high clock precision.
NTP is used when all devices within the network must be consistent in timekeeping, for example:
z In analysis of the log information and debugging information collected from different devices in
network management, time must be used as reference basis.
z All devices must use the same reference clock in a charging system.
z To implement certain functions, such as scheduled restart of all devices within the network, all
devices must be consistent in timekeeping.
z When multiple systems process a complex event in cooperation, these systems must use that
same reference clock to ensure the correct execution sequence.
z For incremental backup between a backup server and clients, timekeeping must be synchronized
between the backup server and all the clients.
Advantages of NTP
z NTP uses a stratum to describe the clock precision, and is able to synchronize time among all
devices within the network.
z NTP supports access control and MD5 authentication.
24-1
Figure 24-1 shows the basic workflow of NTP. Device A and Device B are interconnected over a
network. They have their own independent system clocks, which need to be automatically
synchronized through NTP. For an easy understanding, we assume that:
z Prior to system clock synchronization between Device A and Device B, the clock of Device A is set
to 10:00:00 am while that of Device B is set to 11:00:00 am.
z Device B is used as the NTP time server, namely, Device A synchronizes its clock to that of
Device B.
z It takes 1 second for an NTP message to travel from one device to the other.
Figure 24-1 Basic work flow of NTP
IP network
1. Device A Device B
IP network
2. Device A Device B
IP network
Device A Device B
3.
IP network
4. Device A Device B
24-2
NTP uses two types of messages, clock synchronization message and NTP control message. An NTP
control message is used in environments where network management is needed. As it is not a must for
clock synchronization, it will not be discussed in this document.
All NTP messages mentioned in this document refer to NTP clock synchronization messages.
A clock synchronization message is encapsulated in a UDP message, in the format shown in Figure
24-2.
Figure 24-2 Clock synchronization message format
0 1 4 7 15 23 31
LI VN Mode Stratum Poll Precision
24-3
Devices running NTP can implement clock synchronization in one of the following modes:
z Client/server mode
z Symmetric peers mode
z Broadcast mode
z Multicast mode
You can select operation modes of NTP as needed. In case that the IP address of the NTP server or
peer is unknown and many devices in the network need to be synchronized, you can adopt the
broadcast or multicast mode; while in the client/server and symmetric peers modes, a device is
synchronized from the specified server or peer, and thus clock reliability is enhanced.
Client/server mode
When working in the client/server mode, a client sends a clock synchronization message to servers,
with the Mode field in the message set to 3 (client mode). Upon receiving the message, the servers
automatically work in the server mode and send a reply, with the Mode field in the messages set to 4
(server mode). Upon receiving the replies from the servers, the client performs clock filtering and
selection, and synchronizes its local clock to that of the optimal reference source.
In this mode, a client can be synchronized to a server, but not vice versa.
24-4
A device working in the symmetric active mode periodically sends clock synchronization messages,
with the Mode field in the message set to 1 (symmetric active); the device that receives this message
automatically enters the symmetric passive mode and sends a reply, with the Mode field in the
message set to 2 (symmetric passive). By exchanging messages, the symmetric peers mode is
established between the two devices. Then, the two devices can synchronize, or be synchronized by
each other. If the clocks of both devices have been already synchronized, the device whose local clock
has a lower stratum level will synchronize the clock of the other device.
Broadcast mode
Server Client
Network
After receiving the first
Periodically broadcasts clock broadcast message, the
synchronization messages (Mode 5) client sends a request
In the broadcast mode, a server periodically sends clock synchronization messages to the broadcast
address 255.255.255.255, with the Mode field in the messages set to 5 (broadcast mode). Clients
listen to the broadcast messages from servers. After a client receives the first broadcast message, the
client and the server start to exchange messages, with the Mode field set to 3 (client mode) and 4
(server mode) to calculate the network delay between client and the server. Then, the client enters the
broadcast client mode and continues listening to broadcast messages, and synchronizes its local clock
based on the received broadcast messages.
24-5
Server Client
Network
After receiving the first
Periodically multicasts clock multicast message, the
synchronization messages (Mode 5) client sends a request
In the multicast mode, a server periodically sends clock synchronization messages to the
user-configured multicast address, or, if no multicast address is configured, to the default NTP
multicast address 224.0.1.1, with the Mode field in the messages set to 5 (multicast mode). Clients
listen to the multicast messages from servers. After a client receives the first multicast message, the
client and the server start to exchange messages, with the Mode field set to 3 (client mode) and 4
(server mode) to calculate the network delay between client and the server. Then, the client enters the
multicast client mode and continues listening to multicast messages, and synchronizes its local clock
based on the received multicast messages.
In symmetric peers mode, broadcast mode and multicast mode, the client (or the symmetric active
peer) and the server (the symmetric passive peer) can work in the specified NTP working mode only
after they exchange NTP messages with the Mode field being 3 (client mode) and the Mode field being
4 (server mode). During this message exchange process, NTP clock synchronization can be
implemented.
The client/server mode and symmetric mode support multiple instances of NTP and thus support clock
synchronization within more than one VPN network. Namely, network devices at different physical
location can get their clocks synchronized through NTP, as long as they are in the same VPN.
Task Remarks
Configuring the Operation Modes of NTP Required
Configuring Optional Parameters of NTP Optional
24-6
A single device can have a maximum of 128 associations at the same time, including static
associations and dynamic associations. A static association refers to an association that a user has
manually created by using an NTP command, while a dynamic association is a temporary association
created by the system during operation. A dynamic association will be removed if the system fails to
receive messages from it over a specific long time. In the client/server mode, for example, when you
carry out a command to synchronize the time to a server, the system will create a static association,
and the server will just respond passively upon the receipt of a message, rather than creating an
association (static or dynamic). In the symmetric mode, static associations will be created at the
symmetric-active peer side, and dynamic associations will be created at the symmetric-passive peer
side; in the broadcast or multicast mode, static associations will be created at the server side, and
dynamic associations will be created at the client side.
For devices working in the client/server mode, you only need to make configurations on the clients, but
not on the servers.
Follow these steps to configure an NTP client:
24-7
For devices working in the symmetric mode, you need to specify a symmetric-passive peer on a
symmetric-active peer.
Following these steps to configure a symmetric-active device:
z In the symmetric mode, you should use any NTP configuration command in Configuring the
Operation Modes of NTP to enable NTP; otherwise, a symmetric-passive peer will not process
NTP messages from a symmetric-active peer.
z In the ntp-service unicast-peer command, ip-address must be a unicast address, rather than a
broadcast address, a multicast address or the IP address of the local clock.
z When the source interface for NTP messages is specified by the source-interface argument, the
source IP address of the NTP messages will be configured as the primary IP address of the
specified interface.
z Typically, at least one of the symmetric-active and symmetric-passive peers has been
synchronized; otherwise the clock synchronization will not proceed.
z You can configure multiple symmetric-passive peers by repeating the ntp-service unicast-peer
command.
24-8
The broadcast server periodically sends NTP broadcast messages to the broadcast address
255.255.255.255. After receiving the messages, the device working in NTP broadcast client mode
sends a reply and synchronizes its local clock.
For devices working in the broadcast mode, you need to configure both the server and clients.
Because an interface needs to be specified on the broadcast server for sending NTP broadcast
messages and an interface also needs to be specified on each broadcast client for receiving broadcast
messages, the NTP broadcast mode can be configured only in the specific interface view.
A broadcast server can synchronize broadcast clients only after its clock has been synchronized.
The multicast server periodically sends NTP multicast messages to multicast clients, which send
replies after receiving the messages and synchronize their local clocks.
For devices working in the multicast mode, you need to configure both the server and clients. The NTP
multicast mode must be configured in the specific interface view.
24-9
ntp-service multicast-server
Configure the device to
[ ip-address ] [ authentication-keyid
work in the NTP Required
keyid | ttl ttl-number | version
multicast server mode
number ] *
z A multicast server can synchronize broadcast clients only after its clock has been synchronized.
z You can configure up to 1024 multicast clients, among which 128 can take effect at the same time.
If you specify the source interface for NTP messages, the device sets the source IP address of the
NTP messages as the primary IP address of the specified interface when sending the NTP messages.
When the device responds to an NTP request received, the source IP address of the NTP response is
always the IP address of the interface that received the NTP request.
Following these steps to specify the source interface for NTP messages:
24-10
When NTP is enabled, NTP messages can be received from all the interfaces by default, and you can
disable an interface from receiving NTP messages through the following configuration.
Configuration Prerequisites
Prior to configuring the NTP service access-control right to the local device, you need to create and
configure an ACL associated with the access-control right. For the configuration of ACL, refer to ACL
Configuration in the Security Volume.
Configuration Procedure
Follow these steps to configure the NTP service access-control right to the local device:
The access-control right mechanism provides only a minimum degree of security protection for the
system running NTP. A more secure method is identity authentication.
Configuration Prerequisites
The configuration of NTP authentication involves configuration tasks to be implemented on the client
and on the server.
When configuring the NTP authentication feature, pay attention to the following principles:
z For all synchronization modes, when you enable the NTP authentication feature, you should
configure an authentication key and specify it as a trusted key. Namely, the ntp-service
authentication enable command must work together with the ntp-service authentication-keyid
command and the ntp-service reliable authentication-keyid command. Otherwise, the NTP
authentication function cannot be normally enabled.
z For the client/server mode or symmetric mode, you need to associate the specified authentication
key on the client (symmetric-active peer if in the symmetric peer mode) with the corresponding
24-12
Configuration Procedure
After you enable the NTP authentication feature for the client, make sure that you configure for the
client an authentication key that is the same as on the server and specify that the authentication key is
trusted; otherwise, the client cannot be synchronized to the server.
24-13
ntp-service Required
Configure an NTP authentication-keyid keyid
authentication key authentication-mode md5 No NTP authentication key by
value default
Required
Configure the key as a trusted ntp-service reliable No authentication key is
key authentication-keyid keyid configured to be trusted by
default.
interface interface-type
Enter interface view
interface-number
Required
Broadcast server mode:
You can associate a
ntp-service broadcast-server
non-existing key with an NTP
authentication-keyid keyid
Associate the specified key server. To enable NTP
with an NTP server authentication, you must
Multicast server mode: configure the key and specify it
as a trusted key after
ntp-service multicast-server
associating the key with the
authentication-keyid keyid
NTP server.
The procedure of configuring NTP authentication on a server is the same as that on a client, and the
same authentication key must be configured on both the server and client sides.
24-14
Network requirements
z The local clock of Switch A is to be used as a master clock, with the stratum level of 2.
z Switch B works in the client/server mode and Switch A is to be used as the NTP server of Switch
B.
Figure 24-7 Network diagram for NTP client/server mode configuration
Configuration procedure
# Specify Switch A as the NTP server of Switch B so that Switch B is synchronized to Switch A.
<SwitchB> system-view
[SwitchB] ntp-service unicast-server 1.0.1.11
24-15
Network requirements
z The local clock of Switch A is to be used as the master clock, with a stratum level of 2.
z Switch B works in the client mode and Switch A is to be used as the NTP server of Switch B.
z Switch C works in the symmetric-active mode and Switch B will act as peer of Switch C. Switch C
is the symmetric-active peer while Switch B is the symmetric-passive peer.
Figure 24-8 Network diagram for NTP symmetric peers mode configuration
Switch A
3.0.1.31/24
3.0.1.32/24 3.0.1.33/24
Switch B Switch C
Configuration procedure
1) Configuration on Switch B:
# Specify Switch A as the NTP server of Switch B.
<SwitchB> system-view
[SwitchB] ntp-service unicast-server 3.0.1.31
2) Configuration on Switch C (after Switch B is synchronized to Switch A):
# Specify the local clock as the reference source, with the stratum level of 1.
<SwitchC> system-view
[SwitchC] ntp-service refclock-master 1
24-16
As shown above, Switch B has been synchronized to Switch C, and the clock stratum level of Switch B
is 2, while that of Switch C is 1.
# View the NTP session information of Switch B, which shows that an association has been set up
between Switch B and Switch C.
[SwitchB] display ntp-service sessions
source reference stra reach poll now offset delay disper
**************************************************************************
[245] 3.0.1.31 127.127.1.0 2 15 64 24 10535.0 19.6 14.5
[1234] 3.0.1.33 LOCL 1 14 64 27 -77.0 16.0 14.8
note: 1 source(master),2 source(peer),3 selected,4 candidate,5 configured
Total associations : 2
24-17
Network requirements
z The local clock of Switch C is to be used as the master clock, with a stratum level of 2.
z Switch C works in the broadcast server mode and sends out broadcast messages from
VLAN-interface 2.
z Switch A and Switch D work in the broadcast client mode. Switch A listens to broadcast messages
through its VLAN-interface 3 and Switch D from its VLAN-interface 2.
Figure 24-9 Network diagram for NTP broadcast mode configuration
Vlan-int2
3.0.1.31/24
Switch C
Switch A Switch B
Vlan-int2
3.0.1.32/24
Switch D
Configuration procedure
1) Configuration on Switch C:
# Configure Switch C to work in the broadcast server mode and send broadcast messages through
VLAN-interface 2.
<SwitchC> system-view
[SwitchC] interface vlan-interface 2
[SwitchC-Vlan-interface2] ntp-service broadcast-server
2) Configuration on Switch D:
# Configure Switch D to work in the broadcast client mode and receive broadcast messages on
VLAN-interface 2.
<SwitchD> system-view
[SwitchD] interface vlan-interface 2
[SwitchD-Vlan-interface2] ntp-service broadcast-client
3) Configuration on Switch A:
# Configure Switch A to work in the broadcast client mode and receive broadcast messages on
VLAN-interface 3.
<SwitchA> system-view
[SwitchA] interface vlan-interface 3
[SwitchA-Vlan-interface3] ntp-service broadcast-client
24-18
As shown above, Switch D has been synchronized to Switch C, and the clock stratum level of Switch D
is 3, while that of Switch C is 2.
# View the NTP session information of Switch D, which shows that an association has been set up
between Switch D and Switch C.
[SwitchD-Vlan-interface2] display ntp-service sessions
source reference stra reach poll now offset delay disper
**************************************************************************
[1234] 3.0.1.31 127.127.1.0 2 254 64 62 -16.0 32.0 16.6
note: 1 source(master),2 source(peer),3 selected,4 candidate,5 configured
Total associations : 1
Network requirements
z The local clock of Switch C is to be used as the master clock, with a stratum level of 2.
z Switch C works in the multicast server mode and sends out multicast messages from
VLAN-interface 2.
z Switch A and Switch D work in the multicast client mode and receive multicast messages through
VLAN-interface 3 and VLAN-interface 2 respectively.
In this example, Switch B is a L3 switch and it must support the IGMP function.
24-19
Configuration procedure
1) Configuration on Switch C:
# Configure Switch C to work in the multicast server mode and send multicast messages through
VLAN-interface 2.
<SwitchC> system-view
[SwitchC] interface vlan-interface 2
[SwitchC-Vlan-interface2] ntp-service multicast-server
2) Configuration on Switch D:
# Configure Switch D to work in the multicast client mode and receive multicast messages on
VLAN-interface 2.
<SwitchD> system-view
[SwitchD] interface vlan-interface 2
[SwitchD-Vlan-interface2] ntp-service multicast-client
Because Switch D and Switch C are on the same subnet, Switch D can receive the multicast
messages from Switch C without being enabled with the multicast functions and can be synchronized
to Switch C.
# View the NTP status of Switch D after clock synchronization.
[SwitchD-Vlan-interface2] display ntp-service status
Clock status: synchronized
Clock stratum: 3
Reference clock ID: 3.0.1.31
Nominal frequency: 64.0000 Hz
Actual frequency: 64.0000 Hz
Clock precision: 2^7
Clock offset: 0.0000 ms
Root delay: 31.00 ms
Root dispersion: 8.31 ms
Peer dispersion: 34.30 ms
Reference time: 16:01:51.713 UTC Sep 19 2005 (C6D95F6F.B6872B02)
24-20
# Configure Switch A to work in the multicast client mode and receive multicast messages on
VLAN-interface 3.
[SwitchA-Vlan-interface3] ntp-service multicast-client
24-21
As shown above, Switch A has been synchronized to Switch C, and the clock stratum level of Switch A
is 3, while that of Switch C is 2.
# View the NTP session information of Switch A, which shows that an association has been set up
between Switch A and Switch C.
[SwitchA-Vlan-interface3] display ntp-service sessions
source reference stra reach poll now offset delay disper
**************************************************************************
[1234] 3.0.1.31 127.127.1.0 2 255 64 26 -16.0 40.0 16.6
note: 1 source(master),2 source(peer),3 selected,4 candidate,5 configured
Total associations : 1
Refer to IGMP Configuration in the IP Multicast volume for how to configure IGMP and PIM.
Network requirements
z The local clock of Switch A is to be used as the master clock, with a stratum level of 2.
z Switch B works in the client mode and Switch A is to be used as the NTP server of Switch B, with
Switch B as the client.
z NTP authentication is to be enabled on both Switch A and Switch B.
Figure 24-11 Network diagram for configuration of NTP client/server mode with authentication
Configuration procedure
Configuration on Switch B:
# Enable NTP authentication on Switch B.
<SwitchB> system-view
[SwitchB] ntp-service authentication enable
24-22
As shown above, Switch B has been synchronized to Switch A, and the clock stratum level of Switch B
is 3, while that of Switch A is 2.
# View the NTP session information of Switch B, which shows that an association has been set up
Switch B and Switch A.
[SwitchB] display ntp-service sessions
source reference stra reach poll now offset delay disper
**************************************************************************
[12345] 1.0.1.11 127.127.1.0 2 63 64 3 -75.5 31.0 16.5
note: 1 source(master),2 source(peer),3 selected,4 candidate,5 configured
Total associations : 1
Network requirements
z The local clock of Switch C is to be used as the master clock, with a stratum level of 3.
24-23
Configuration procedure
1) Configuration on Switch C:
# Configure NTP authentication.
<SwitchC> system-view
[SwitchC] ntp-service authentication enable
[SwitchC] ntp-service authentication-keyid 88 authentication-mode md5 123456
[SwitchC] ntp-service reliable authentication-keyid 88
Now, Switch D can receive broadcast messages through VLAN-interface 2, and Switch C can send
broadcast messages through VLAN-interface 2. Upon receiving a broadcast message from Switch C,
Switch D synchronizes its clock to that of Switch C.
# View the NTP status of Switch D after clock synchronization.
[SwitchD-Vlan-interface2] display ntp-service status
24-24
As shown above, Switch D has been synchronized to Switch C, and the clock stratum level of Switch D
is 4, while that of Switch C is 3.
# View the NTP session information of Switch D, which shows that an association has been set up
between Switch D and Switch C.
[SwitchD-Vlan-interface2] display ntp-service sessions
source reference stra reach poll now offset delay disper
**************************************************************************
[1234] 3.0.1.31 127.127.1.0 3 254 64 62 -16.0 32.0 16.6
note: 1 source(master),2 source(peer),3 selected,4 candidate,5 configured
Total associations : 1
24-25
When configuring cluster management, go to these sections for information you are interested in:
z Cluster Management Overview
z Cluster Configuration Task List
z Configuring the Management Device
z Configuring the Member Devices
z Configuring Access Between the Management Device and Its Member Devices
z Adding a Candidate Device to a Cluster
z Configuring Advanced Cluster Functions
z Displaying and Maintaining Cluster Management
z Cluster Management Configuration Example
Roles in a Cluster
The devices in a cluster play different roles according to their different functions and status. You can
specify the following three roles for the devices:
z Management device (Administrator): The device providing management interfaces for all devices
in a cluster and the only device configured with a public IP address. You can specify one and only
one management device for a cluster. Any configuration, management, and monitoring of the
other devices in a cluster can only be implemented through the management device. When a
device is specified as the management device, it collects related information to discover and
define candidate devices.
z Member device (Member): A device managed by the management device in a cluster.
z Candidate device (Candidate): A device that does not belong to any cluster but can be added to a
cluster. Different from a member device, its topology information has been collected by the
management device but it has not been added to the cluster.
25-1
As shown in Figure 25-1, the device configured with a public IP address and performs the
management function is the management device, the other managed devices are member devices,
and the device that does not belong to any cluster but can be added to a cluster is a candidate device.
The management device and the member devices form the cluster.
Figure 25-2 Role change in a cluster
As shown in Figure 25-2, a device in a cluster changes its role according to the following rules:
z A candidate device becomes a management device when you create a cluster on it. A
management device becomes a candidate device only after the cluster is removed.
z A candidate device becomes a member device after being added to a cluster. A member device
becomes a candidate device after it is removed from the cluster.
25-2
NDP is used to discover the information about directly connected neighbors, including the device
name, software version, and connecting port of the adjacent devices. NDP works in the following ways:
z A device running NDP periodically sends NDP packets to its neighbors. An NDP packet carries
NDP information (including the device name, software version, and connecting port, etc.) and the
holdtime, which indicates how long the receiving devices will keep the NDP information. At the
same time, the device also receives (but does not forward) the NDP packets from its neighbors.
z A device running NDP stores and maintains an NDP table. The device creates an entry in the
NDP table for each neighbor. If a new neighbor is found, meaning the device receives an NDP
packet sent by the neighbor for the first time, the device adds an entry in the NDP table. If the
NDP information carried in the NDP packet is different from the stored information, the
corresponding entry and holdtime in the NDP table are updated; otherwise, only the holdtime of
the entry is updated. If no NDP information from the neighbor is received when the holdtime times
out, the corresponding entry is removed from the NDP table.
NDP runs on the data link layer, and therefore supports different network layer protocols.
Introduction to NTDP
NTDP provides information required for cluster management; it collects topology information about the
devices within the specified hop count. Based on the neighbor information stored in the neighbor table
maintained by NDP, NTDP on the management device advertises NTDP topology collection requests
to collect the NDP information of all the devices in a specific network range as well as the connection
information of all its neighbors. The information collected will be used by the management device or
the network management software to implement required functions.
When a member device detects a change on its neighbors through its NDP table, it informs the
management device through handshake packets. Then the management device triggers its NTDP to
collect specific topology information, so that its NTDP can discover topology changes timely.
The management device collects topology information periodically. You can also administratively
launch a topology information collection. The process of topology information collection is as follows:
z The management device periodically sends NTDP topology collection request from the
NTDP-enabled ports.
z Upon receiving the request, the device sends NTDP topology collection response to the
management device, copies this response packet on the NTDP-enabled port and sends it to the
adjacent device. Topology collection response includes the basic information of the NDP-enabled
device and NDP information of all adjacent devices.
z The adjacent device performs the same operation until the NTDP topology collection request is
sent to all the devices within specified hops.
When the NTDP topology collection request is advertised in the network, large numbers of network
devices receive the NTDP topology collection request and send NTDP topology collection response at
the same time, which may cause congestion and the management device busyness. To avoid such
case, the following methods can be used to control the speed of the NTDP topology collection request
advertisement:
z Upon receiving an NTDP topology collection request, each device does not forward it, instead, it
waits for a period of time and then forwards the NTDP topology collection request on the first
NTDP-enabled port.
z On the same device, except the first port, each NTDP-enabled port waits for a period of time and
25-3
Active
als ts
Dis
pa hake
erv acke
ts
c
cke
on
s
v e ak e p
me hand
ne
ct
i nt
nt
sta
na the
s
ns nd
t
ei
uti
ge
ma s
co h a
or ceive
sr
ec
ee eive
ec
Re
ov
i n o r ec
ere
th r
d
t
ils
Fa
Connect Disconnect
State holdtime exceeds
the specified value
z After a cluster is created, a candidate device is added to the cluster and becomes a member
device, the management device saves the state information of its member device and identifies it
as Active. And the member device also saves its state information and identifies itself as Active.
z After a cluster is created, its management device and member devices begin to send handshake
packets. Upon receiving the handshake packets from the other side, the management device or a
member device simply remains its state as Active, without sending a response.
z If the management device does not receive the handshake packets from a member device in an
interval three times of the interval to send handshake packets, it changes the status of the
member device from Active to Connect. Likewise, if a member device fails to receive the
handshake packets from the management device in an interval three times of the interval to send
handshake packets, the status of itself will also be changed from Active to Connect.
z If this management device, in information holdtime, receives the handshake or management
packets from its member device which is in Connect state, it changes the state of its member
device to Active; otherwise, it changes the state of its member device to Disconnect, in which case
the management device considers its member device disconnected. If this member device, which
is in Connect state, receives handshake or management packets from the management device in
information holdtime, it changes its state to Active; otherwise, it changes its state to Disconnect.
z If the communication between the management device and a member device is recovered, the
25-4
Management VLAN
The management VLAN is a VLAN used for communication in a cluster; it limits the cluster
management range. Through configuration of the management VLAN, the following functions can be
implemented:
z Management packets (including NDP, NTDP and handshake packets) are restricted within the
management VLAN, therefore isolated from other packets, which enhances security.
z The management device and the member devices communicate with each other through the
management VLAN.
For a cluster to work normally, you must set the packets from the management VLAN to pass the
ports connecting the management device and the member/candidate devices (including the cascade
ports). Therefore:
z If the packets from the management VLAN cannot pass a port, the device connected with the port
cannot be added to the cluster. Therefore, if the ports (including the cascade ports) connecting the
management device and the member/candidate devices prohibit the packets from the
management VLAN, you can set the packets from the management VLAN to pass the ports on
candidate devices with the management VLAN auto-negotiation function.
z Only when the default VLAN ID of the cascade ports and the ports connecting the management
device and the member/candidate devices is that of the management VLAN can you set the
packets without tags from the management VLAN to pass the ports; otherwise, only the packets
with tags from the management VLAN can pass the ports.
z If a candidate device is connected to a management device through another candidate device, the
ports between the two candidate devices are cascade ports.
z For information about VLAN, refer to VLAN Configuration in the Access Volume.
25-5
Task Remarks
Enabling NDP Globally and for Specific Ports Optional
25-6
For NDP to work normally, you must enable NTDP both globally and on specific ports.
Follow these steps to enable NDP globally and for specific ports:
In system
ndp enable interfaceinterface-list
view
Enable the Use either command
In Ethernet interface interface-type
NDP feature port view or interface-number By default, NDP is enabled
for the port(s) Layer 2 globally and also on all ports.
aggregate ndp enable
interface view
You are recommended to disable NDP on the port which connects with the devices that do not need to
join the cluster, preventing the management device from adding the device which needs not to join the
cluster and collecting the topology information of this device.
25-7
A port enabled with NDP periodically sends NDP packets to its neighbors. If no NDP information from
the neighbor is received when the holdtime times out, the corresponding entry is removed from the
NDP table.
Follow these steps to configure NDP parameters:
The time for the receiving device to hold NDP packets cannot be shorter than the interval for sending
NDP packets; otherwise, the NDP table may become instable.
For NTDP to work normally, you must enable NTDP both globally and on specific ports.
Follow these steps to enable NTDP globally and for specific ports:
You are recommended to disable NTDP on the port which connects with the devices that do not need
to join the cluster, preventing the management device from adding the device which needs not to join
the cluster and collecting the topology information of this device.
By configuring the maximum hops for collecting topology information, you can get topology information
25-8
The two delay values should be configured on the topology collecting device. A topology collection
request sent by the topology collecting device carries the two delay values, and a device that receives
the request forwards the request according to the delays.
The management device collects topology information periodically after a cluster is created. In addition,
you can configure to manually initiate topology information collection, thus managing and monitoring
the device on real time, regardless of whether a cluster is created.
Follow these steps to configure to manually collect topology information:
25-9
Establishing a Cluster
Before establishing a cluster, you need to specify the management VLAN, and you cannot modify the
management VLAN after a device is added to the cluster.
In addition, you need to configure a private IP address pool for the devices to be added to the cluster
on the device to be configured as the management device before establishing a cluster. Meanwhile,
the IP addresses of the VLAN interfaces of the management device and member devices cannot be in
the same network segment as that of the cluster address pool; otherwise, the cluster cannot work
normally. When a candidate device is added to a cluster, the management device assigns it a private
IP address for it to communicate with other devices in the cluster.
You can establish a cluster in two ways: manually and automatically. With the latter, you can establish
a cluster according to the prompt information. The system:
1) Prompts you to enter a name for the cluster you want to establish;
2) Lists all the candidate devices within your predefined hop count;
3) Starts to automatically add them to the cluster.
You can press Ctrl+C anytime during the adding process to exit the cluster auto-establishment
process. However, this will only stop adding new devices into the cluster, and devices already added
into the cluster are not removed.
Follow these steps to manually establish a cluster:
ip-pool Required
Configure the private IP address
administrator-ip-address
range for member devices Not configured by default.
{ mask | mask-length }
Manually
establish a build name Required
Establish a cluster Use either approach
cluster Automatically By default, the device is not
establish a auto-build [ recover ] the management device.
cluster
25-10
The management VLAN limits the cluster management range. If the device discovered by the
management device does not belong to the management VLAN, meaning the cascade ports and the
ports connecting with the management device do not allow the packets from the management VLAN to
pass, and the new device cannot be added to the cluster. Through the configuration of the
management VLAN auto-negotiation function, the cascade ports and the ports directly connected to
the management device can be automatically added to the management VLAN.
Follow these steps to configure management VLAN auto-negotiation:
In a cluster, the management device and member devices communicate by sending handshake
packets to maintain connection between them. You can configure interval of sending handshake
packets and the holdtime of a device on the management device. This configuration applies to all
member devices within the cluster. For a member device in Connect state:
z If the management device does not receive handshake packets from a member device within the
holdtime, it changes the state of the member device to Disconnect. When the communication is
recovered, the member device needs to be re-added to the cluster (this process is automatically
performed).
z If the management device receives handshake packets from the member device within the
holdtime, the state of the member device remains Active.
Follow these steps to configure communication between the management device and the member
devices within a cluster:
To do Use the command Remarks
Enter system view system-view
By default, the destination MAC address of cluster management protocol packets (including NDP,
NTDP and HABP packets) is a multicast MAC address 0180-C200-000A, which IEEE reserved for
later use. Since some devices cannot forward the multicast packets with the destination MAC address
25-11
When you configure the destination MAC address for cluster management protocol packets:
z If the interval for sending MAC address negotiation broadcast packets is 0, the system
automatically sets it to 1 minute.
z If the interval for sending MAC address negotiation broadcast packets is not 0, the interval
remains unchanged.
You can manually add a candidate device to a cluster, or remove a member device from a cluster.
If a member device needs to be rebooted for software upgrade or configuration update, you can
remotely reboot it through the management device.
add-member [ member-number ]
Add a candidate device to the
mac-address mac-address [ password Required
cluster
password ]
25-12
Enabling NTDP
25-13
Telnet connection is used in the switching between the management device and a member device.
Note the following when switching between them:
z Authentication is required when you switch from a member device to the management device.
The switching fails if authentication is not passed. Your user level is allocated according to the
predefined level by the management device if authentication is passed.
z When a candidate device is added to a cluster and becomes a member device, its super
password will be automatically synchronized to the management device. Therefore, after a cluster
is established, it is not recommended to modify the super password of any member (including the
management device and member devices) of the cluster; otherwise, the switching may fail
because of an authentication failure.
z If the member specified in this command does not exist, the system prompts error when you
execute the command; if the switching succeeds, your user level on the management device is
retained.
z If the Telnet users on the device to be logged in reach the maximum number, the switching fails.
z To prevent resource waste, avoid ring switching when configuring access between cluster
members. For example, if you switch from the operation interface of the management device to
that of a member device and then need to switch back to that of the management device, use the
quit command to end the switching, but not the cluster switch-to administrator command to
switch to the operation interface of the management device.
25-14
The concepts of blacklist and whitelist are used for topology management. An administrator can
diagnose the network by comparing the current topology (namely, the information of a node and its
neighbors in the cluster) and the standard topology.
z Topology management whitelist (standard topology): A whitelist is a list of topology information
that has been confirmed by the administrator as correct. You can get the information of a node
and its neighbors from the current topology. Based on the information, you can manage and
maintain the whitelist by adding, deleting or modifying a node.
z Topology management blacklist: Devices in a blacklist are not allowed to join a cluster. A blacklist
contains the MAC addresses of devices. If a blacklisted device is connected to a network through
another device not included in the blacklist, the MAC address and access port of the latter are also
included in the blacklist. The candidate devices in a blacklist can be added to a cluster only if the
administrator manually removes them from the list.
The whitelist and blacklist are mutually exclusive. A whitelist member cannot be a blacklist member,
and vice versa. However, a topology node can belong to neither the whitelist nor the blacklist. Nodes of
this type are usually newly added nodes, whose identities are to be confirmed by the administrator.
You can back up and restore the whitelist in the following two ways:
z Backing them up on the FTP server shared by the cluster. You can manually restore the whitelist
and blacklist from the FTP server.
z Backing them up in the Flash of the management device. When the management device restarts,
the whitelist and blacklist will be automatically restored from the Flash. When a cluster is
re-established, you can choose whether to restore the whitelist and blacklist from the Flash
automatically, or you can manually restore them from the Flash of the management device.
Follow these steps to configure cluster topology management:
25-15
After establishing a cluster, you can configure FTP/TFTP server, NM host and log host for the cluster
on the management device.
z After you configure an FTP/TFTP server for a cluster, the members in the cluster access the
FTP/TFTP server configured through the management device.
z After you configure a log host for a cluster, all the log information of the members in the cluster will
be output to the configured log host in the following way: first, the member devices send their log
information to the management device, which then converts the addresses of log information and
sends them to the log host.
z After you configure an NM host for a cluster, the member devices in the cluster send their Trap
messages to the shared SNMP NM host through the management device.
If the port of an access NM device (including FTP/TFTP server, NM host and log host) does not allow
the packets from the management VLAN to pass, the NM device cannot manage the devices in a
cluster through the management device. In this case, on the management device, you need to
configure the VLAN interface of the access NM device (including FTP/TFTP server, NM host and log
host) as the NM interface.
Follow these steps to configure the interaction for a cluster:
To do Use the command Remarks
Enter system view system-view
Required
Configure the TFTP server
tftp-server ip-address By default, no TFTP server is
shared by the cluster
configured for a cluster.
25-16
To isolate management protocol packets of a cluster from packets outside the cluster, you are
recommended to configure to prohibit packets from the management VLAN from passing the ports that
connect the management device with the devices outside the cluster and configure the NM interface
for the management device.
SNMP configuration synchronization function facilitates management of a cluster, with which you can
perform SNMP-related configurations on the management device and synchronize them to the
member devices on the whitelist. This operation is equal to configuring multiple member devices at
one time, simplifying the configuration process. Follow these steps to configure the SNMP
configuration synchronization function:
25-17
Configuring Web user accounts in batches enables you to configure on the management device the
username and password used to log in to the devices (including the management device and member
devices) within a cluster through Web and synchronize the configurations to the member devices in the
whitelist. This operation is equal to performing the configurations on the member devices. You need to
enter your username and password when you log in to the devices (including the management device
and member devices) in a cluster through Web.
Follow these steps to configure Web user accounts in batches:
If a cluster is dismissed or the member devices are removed from the whitelist, the configurations of
Web user accounts are still retained.
25-18
z Three switches form cluster abc, whose management VLAN is VLAN 10. In the cluster, Switch B
serves as the management device (Administrator), whose network management interface is
VLAN-interface 2; Switch A and Switch C are the member devices (Member).
z All the devices in the cluster use the same FTP server and TFTP server on host 63.172.55.1/24,
and use the same SNMP NMS and log services on host IP address: 69.172.55.4/24.
z Add the device whose MAC address is 000f-e201-0013 to the blacklist.
25-19
Configuration procedure
25-20
# Configure the period for the receiving device to keep NDP packets as 200 seconds.
[SwitchB] ndp timer aging 200
# Enable NTDP globally and for ports GigabitEthernet 1/0/2 and GigabitEthernet 1/0/3.
[SwitchB] ntdp enable
[SwitchB] interface gigabitethernet 1/0/2
[SwitchB-GigabitEthernet1/0/2] ntdp enable
[SwitchB-GigabitEthernet1/0/2] quit
[SwitchB] interface gigabitethernet 1/0/3
[SwitchB-GigabitEthernet1/0/3] ntdp enable
[SwitchB-GigabitEthernet1/0/3] quit
# Configure the delay to forward topology-collection request packets on the first port as 150 ms.
[SwitchB] ntdp timer hop-delay 150
# Configure the delay to forward topology-collection request packets on the first port as 15 ms.
[SwitchB] ntdp timer port-delay 15
# Configure ports GigabitEthernet 1/0/2 and GigabitEthernet 1/0/3 as Trunk ports and allow packets
from the management VLAN to pass.
[SwitchB] interface gigabitethernet 1/0/2
[SwitchB-GigabitEthernet1/0/2] port link-type trunk
[SwitchB-GigabitEthernet1/0/2] port trunk permit vlan 10
[SwitchB-GigabitEthernet1/0/2] quit
[SwitchB] interface gigabitethernet 1/0/3
[SwitchB-GigabitEthernet1/0/3] port link-type trunk
[SwitchB-GigabitEthernet1/0/3] port trunk permit vlan 10
[SwitchB-GigabitEthernet1/0/3] quit
# Configure a private IP address range for the member devices, which is from 172.16.0.1 to
172.16.0.7.
[SwitchB] cluster
[SwitchB-cluster] ip-pool 172.16.0.1 255.255.255.248
# Configure the current device as the management device, and establish a cluster named abc.
25-21
# Configure the FTP Server, TFTP Server, Log host and SNMP host for the cluster.
[abc_0.SwitchB-cluster] ftp-server 63.172.55.1
[abc_0.SwitchB-cluster] tftp-server 63.172.55.1
[abc_0.SwitchB-cluster] logging-host 69.172.55.4
[abc_0.SwitchB-cluster] snmp-host 69.172.55.4
# Add port GigabitEthernet 1/0/1 to VLAN 2, and configure the IP address of VLAN-interface 2.
[abc_0.SwitchB] vlan 2
[abc_0.SwitchB-vlan2] port gigabitethernet 1/0/1
[abc_0.SwitchB] quit
[abc_0.SwitchB] interface vlan-interface 2
[abc_0.SwitchB-Vlan-interface2] ip address 163.172.55.1 24
[abc_0.SwitchB-Vlan-interface2] quit
25-22
When configuring IRF, go to these sections for information you are interested in:
z IRF Overview
z IRF Working Process
z IRF Configuration Task List
z IRF Configuration
z Logging In to an IRF
z Displaying and Maintaining IRF
z IRF Configuration Examples
IRF Overview
Introduction
Intelligent Resilient Framework (IRF) allows you to build an IRF, namely a united device, by
interconnecting multiple devices through IRF ports. You can manage all the devices in the IRF by
managing the united device.
In an IRF, every single device is an IRF member, and plays one of the following two roles according to
its function:
z Master: A member device. It is elected to manage the entire IRF. An IRF has only one master at
one time.
z Slave: A member device. It is managed by the master and operates as a backup of the master. In
an IRF, except for the master, all the other devices are the slaves.
For details of role election, refer to Role Election.
Typically, you can use an IRF in the distribution layer; and you can also apply it in the access layer. An
IRF is a single logical device to the users and devices of the upper layer and lower layer, as shown in
Figure 26-1.
25-1
IP network IP network
Equals IRF
IRF Connections
To make an IRF operate normally, you need to connect the IRF members physically. Physical ports
that are dedicated to IRF connection on devices are called physical IRF ports. For the Switch 4510G
series, the 10 GE interface modules can be inserted into the expansion module slots on the rear panel
25-2
For the details of the interface modules, refer to the user manual.
You can connect physical IRF ports of the Switch 4510G series with either the CX4 dedicated cables
or fibers according to the interface type on the interface module. Dedicated cables provide higher
reliability and performance; whereas fibers connect physical devices located very far from each other
and provide flexible application.
The physical IRF ports are numbered according to their physical locations on the rear panel of the
Switch 4510G series. With the rear panel facing you, the physical IRF ports are numbered
successively from left to right: ports on the interface module in slot 1 are numbered 1 and 2, and ports
on the interface module in slot 2 are numbered 3 and 4, as shown in Figure 26-2, which illustrates an
example of inserting a CX4 dual-port interface module.
Figure 26-2 Numbering physical IRF ports
If you insert a one-port interface module into the slot, then the number of the physical IRF port
corresponding to the module in slot 1 is 1, and the number of the physical IRF port corresponding to
the module in slot 2 is 3. For the number of physical IRF ports, see Configuring IRF Ports.
Physical IRF ports can be used for both IRF connection and service data transmission. When
establishing an IRF, you need to specify that the physical IRF ports are used for the IRF, that is, bind
them with IRF port(s) to implement IRF connection and establishment.
IRF port
You can set a physical IRF port as an IRF port, which is used to transfer data and protocol packets
among IRF members. An Switch 4510G series can be configured with two IRF ports, which are
numbered 1 and 2, to connect other devices in an IRF.
25-3
A ring connection is more reliable than a bus connection. The failure of one link in a ring connection
does not affect the function and performance of the IRF, whereas the failure of one link in a bus
connection causes the split of the IRF.
You can connect at most four Switch 4510G series switches to form an IRF.
The connection of IRF ports is based on that of physical IRF ports; therefore, you need to bind an IRF
port with physical IRF port(s). AN IRF port can be bound to one physical IRF port or, to realize link
backup and bandwidth expansion, bound to two physical IRF ports (aggregated as an aggregate IRF
port).
You need to specify the correspondence between an IRF port and physical IRF port(s) through
command line. When you specify that an IRF port is bound to one physical IRF port, the serial number
of the physical IRF port bound to IRF port 1 must be smaller than that of the physical IRF port bound to
IRF port 2; when you specify that an IRF port is bound to two physical IRF ports (aggregate IRF port),
these two physical IRF ports must be on the same module.
As shown in Figure 26-4. Switch A connects to Switch B and Switch C through IRF ports IRF-port 1
and IRF-port 2 respectively.
25-4
Based on the type and number of the interface module inserted on Switch A, you can adopt one of the
following typical correspondences to establish an IRF connection.
z The dual-port 10 GE CX4 interface module is used in the following examples to introduce
correspondence between the IRF port and the physical IRF port(s).
z When the dual-port 10 GE SFP interface module is used, the correspondence between the IRF
port and the physical IRF port(s) is similar.
When a dual-port interface module is installed, you need to bind IRF-port 1 to physical IRF port 1, and
IRF-port 2 to physical IRF port 2 (as shown in Figure 26-5), because the serial number of the physical
IRF port bound to IRF-port 1 must be smaller than that of the physical IRF port bound to IRF-port 2.
Therefore, you cannot bind IRF-port 1 to physical IRF port 2, and IRF-port 2 to physical port 1.
z If only one single-port interface module is installed, the device can be used only as Switch B or
Switch C in Figure 26-4, that is, the device should be at either end of a bus connection.
z In this situation, because only one IRF port is needed on Switch B or Switch C, IRF-port 2 or
IRF-port 1 can be bound to any physical port on the device.
25-5
When two dual-port interface modules are installed, if the correspondence is not in the aggregate
mode, you can bind an IRF port to any physical IRF port (Figure 26-6 only shows one possibility).
However, you must ensure that the serial number of the physical IRF port bound to IRF-port 1 is
smaller than that of the physical IRF port bound to IRF-port 2, namely, the physical IRF port bound to
IRF-port 2 should be located on the right side of the physical IRF port bound to IRF-port 1. The two
physical IRF ports bound to the IRF ports can be located either on one interface module or on different
interface modules.
z If two single-port interface modules are installed, you need to bind IRF-port 1 to physical IRF port
1, and IRF-port 2 to physical IRF port 3.
z If one dual-port interface module and one single-port interface module are installed, the
correspondence is the same with that when you install two dual-port interface modules. In this
situation, IRF-port 2 or IRF-port 1 can be bound to any physical port on the device, because only
one IRF port is needed on Switch B or Switch C.
Because the two physical IRF ports bound to an aggregate IRF port must be located on the same
interface module, two IRF ports (that is, two aggregate IRF ports) can only be bound to the two
physical IRF ports on each of the two interface modules respectively (as shown in Figure 26-7). In
25-6
If one dual-port interface module and one single-port interface module are installed, you can bind two
physical IRF ports on the dual-port interface module to the IRF port in aggregate mode, and bind the
physical IRF port on the single-port interface module to the other IRF port in non-aggregate mode. In
this situation, IRF-port 2 or IRF-port 1 can be bound to any physical port on the device, because only
one IRF port is needed on Switch B or Switch C.
Topology Collection
Each device in an IRF exchanges hello packets with the directly connected neighbors to collect
topology of the entire IRF. The hello packets carry topology information, including IRF port connection
states, member IDs, priorities, and bridge MAC addresses.
Each member records its known topology information locally. At the initiation of the collection, the
members record their own topology information. When an IRF port of a member becomes up, the
member sends its known topology information from this port periodically. Upon receiving the topology
information, the directly connected neighbor updates the local topology information.
The collection process lasts for a period of time. When all members have obtained the complete
topology information (known as topology convergence), the IRF will enter the next stage: role election.
Role Election
An IRF is composed of multiple member devices; each member has a role, which is either master or
slave. The process of defining the role of IRF members is role election.
Role election is held when the topology is instable, such as, forming an IRF, adding a new member,
IRF split, or IRF merge. The master is elected according to the following principles one by one, until
the only winner is found out:
z The current master wins, even if a new member has a higher priority. (When an IRF is being
formed, there is no master, and all member devices consider themselves as the master, so this
principle will be skipped)
z A member with a higher priority wins.
z A member with the longest system up-time wins.
z A member with the lowest bridge MAC address wins.
In this stage, member ID collision, software version loading and IRF merging are also handled, which
are discussed in the later sections.
When a device is booted, it first collects topology information and then participates in the role election.
After that, the IRF system can run normally. When the role election is finished, the IRF enters the next
stage: IRF maintenance.
25-7
IRF Management
Member ID
An IRF uses member IDs to uniquely identify and manage member devices. For a device that does not
support IRF, an interface is named GigabitEthernet 1/0/1, where the first number is always 1; for a
device that supports IRF, if its member ID is 2, the name of the interface changes to GigabitEthernet
2/0/1, where the first number indicates the member ID of the device.
A member ID is a natural number in the range 1 to 10; the default member ID is 1. To ensure the
uniqueness of member IDs, you can plan and configure member IDs for IRF members before they join
the IRF.
After multiple devices form an IRF, a logical distributed device is formed. Each member device acts as
a card on the distributed device. The master acts as the active main board (AMB) and the slaves act as
the standby main boards (SMBs), and meantime, each member device also acts as an interface board.
As shown in Figure 26-8, an IRF system comprises four members, which are numbered 1, 2, 3 and 4.
After the IRF is established, the IRF system functions like a distributed device: slots 1,2, 3 and 4 are
inserted with boards, and each board has its own power supply unit (PSU), fan, CPU, console port and
Ethernet interfaces.
Figure 26-8 IRF
IRF link
Slave3
(member-id4)
25-8
For a device operating independently (that is, the device does not belong to any IRF), its interface
name is in the following format: member ID/slot number/interface serial number, where
z By default, member ID is 1.
z After a device leaves an IRF, it continues using the member ID when it was in the IRF as its
device ID.
z Subslot number is the number of the slot in which the LPU resides. For a box-type device, LPUs
are fixed on the device, so the slot number is a fixed value. On the Switch 4510G series, the
subslot on the front panel is numbered 0, and subslots of the two expansion slots on the rear
panel are numbered 1 and 2 from left to right.
z Interface serial number is dependent on the number of interfaces supported by the device. View
the silkscreen on the interface card for the number of supported interfaces.
For example, GigabitEthernet 1/0/1 is an interface on the independently operating device Sysname.
To set the link type of GigabitEthernet 1/0/1 to trunk, perform the following steps:
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type trunk
For an IRF member, the interface name also adopts the previously introduced format: member ID/slot
number/interface serial number, where
z The member ID identifies the IRF member on which the interface resides
z Meaning and value of the subslot number and the interface serial number are the same as those
on an independently operating device.
For example, GigabitEthernet 1/0/1 is an interface on IRF member slave 3 (member ID is 3). To set the
link type of GigabitEthernet 1/0/1 to trunk, perform the following steps:
<Master> system-view
[Master] interface gigabitethernet 3/0/1
[Master-GigabitEthernet3/0/1] port link-type trunk
You can use the name of the storage device to access the file system of an independently operating
device. For the naming rules of a storage device, refer to the File System Management Configuration
in the System Volume.
For example, flash is the storage device on the independently operating device Sysname. To back up
the file aa.cfg under the root directory of the flash to the test folder, perform the following steps:
<Sysname> mkdir test
...
%Created dir flash:/test.
25-9
To access the file system of the master, use the name of the storage device; to access the file system
of a slave, use the name in the following format: Member-ID#Storage-device-name.
For example:
1) To access the test folder under the root directory of the flash on the master, perform the following
steps:
<Master> mkdir test
...
%Created dir flash:/test.
<Master> dir
Directory of flash:/
0 -rw- 10105088 Apr 26 2000 13:44:57 test.bin
1 -rw- 2445 Apr 26 2000 15:18:19 config.cfg
2 drw- - Jul 14 2008 15:20:35 test
30861 KB total (20961 KB free)
2) To create and access the test folder under the root directory of the flash on IRF member slave 3,
perform the following steps:
<Master> mkdir slot3#flash:/test
%Created dir slot3#flash:/test.
<Master> cd slot3#flash:/test
<Master> pwd
slot3#flash:/test
Or:
<Master> cd slot3#flash:/
<Master> mkdir test
%Created dir slot3#flash:/test.
3) To copy the test.bin file on the master to the root directory of the flash on IRF member slave 3,
perform the following steps:
<Master> pwd
slot3#flash:
//The above information indicates that the current working path is the root directory of the flash on
slave 3.
<Master> cd flash:/
<Master> pwd
flash:
// The above operations indicate that the current working path is the root directory of the flash on the
master.
<Master> copy test.bin slot3#flash:/
Copy flash:/test.bin to slot3#flash:/test.bin?[Y/N]:y
%Copy file flash:/test.bin to slot3#flash:/test.bin...Done.
25-10
IRF maintenance
In an IRF, direct neighbors exchange hello packets periodically (the period is 200 ms). Without
receiving any hello packet from a direct neighbor for ten periods, a member considers that the hello
packets timed out, and the IRF isolates the expired device in the topology and updates its topology
database.
When an IRF port of a member becomes down, the member broadcasts the information to all the other
members immediately. If the IRF port of the master is down, an election is triggered.
25-11
Task Remarks
Configuring IRF Ports Required
Setting a Member ID for a Device Optional
Specifying a Priority for an IRF Member Required
IRF Configuration
Configuring IRF Ports
IRF can be enabled on a device only after the IRF ports are bound with physical IRF ports).
For how to bind the IRF port and physical IRF port(s) on an Switch 4510G series, see Correspondence
between an IRF port and a physical IRF port.
Follow these steps to configure IRF ports
25-12
The member ID of a device defaults to 1. During the establishment of an IRF, when the devices that
form the IRF have duplicated member IDs, the member ID of the master is decided first, and then the
member IDs of slaves are decided one by one according to their distances to the master, that is, the
nearest slave gets the smallest available ID, and the nearer slave gets the smaller available ID, and so
forth; after the IRF is established, if the newly added device and another member have duplicated IDs,
the IRF system assigns the smallest available ID for the new member. You can also set the member
IDs according to network planning.
For a device that is already in an IRF, you can use commands in Table 26-1 to modify the member ID
of the device, and this modification will be effective after the reboot of the device.
For a device that is not in an IRF, you are recommended to set its member ID in the following way:
1) Plan the member IDs in advance. You can view the member IDs of an IRF, and find out an unused
ID for the new device.
2) Log in to the device to be added into the IRF, and change its member ID to the unused ID found
out in step 1.
3) Save the current configuration. Power off the device, connect the device with IRF cables and
power it on. Use the configuration introduced in this section to enable IRF on the device and add it
into the IRF.
Optional
irf member member-id renumber
Set a member ID for a device The member ID of a device
new-id
defaults to 1
25-13
Each IRF member has a priority. During the master election, a member with the greatest priority will be
elected as the master.
The priority of a device defaults to 1. You can modify the priority through command lines. The greater
the priority value, the higher the priority. A member with a higher priority is more likely to be a master,
and more likely to preserve its ID in a member ID collision.
Follow these steps to specify a priority for an IRF member:
The setting of priority takes effect right after your configuration without the need of rebooting the
device.
A device uses the bridge MAC address when it communicates with the outside as a network bridge. A
bridge device on the network has its unique bridge MAC address. Some Layer 2 protocols (like LACP)
use bridge MAC addresses to identify different devices. During the forwarding of Layer 2 packets, if the
destination MAC address of a packet is the bridge MAC address of a device, it means that the packet
is sent to this device.
25-14
The change of the bridge MAC address may cause a temporary flow interruption.
If this function is disabled, when the boot files of slaves and that of the master are in different versions,
the new member or the member with a low priority will not boot normally. You need to update the
device version manually and add the device into the IRF again.
25-15
z Although IRF supports the auto upgrade of boot files, to shorten the time for IRF establishment
and reduce the influences caused by the IRF establishment to the network, you are recommended
to ensure that the device and the IRF master have the same software version before adding a
device into an IRF.
z After loading the masters boot file automatically, a slave configures the file as the boot file for the
next boot and reboots automatically.
z Because system boot file occupies large memory space, to make the auto upgrade succeed,
ensure that there is enough space on the storage media of the slave.
Setting the Delay Time for the Link Layer to Report a Link-Down Event
During the suppression time, the system cannot be aware of the switch between IRF link states; after
the suppression time, the link layer reports the link state changes to the system. Use this function to
avoid the reboots of devices caused by the frequent link state changes of IRF ports in a short time (for
example, an IRF splits and then merges quickly), preventing service interruption.
Follow these steps to set the delay time for the link layer to report a link-down event of an IRF:
Do not set the time interval to a very long time; otherwise, the IRF system will not be aware of the IRF
topology changes in time and thus the service will be recovered slowly.
25-16
After an IRF is formed, you can access the console of the IRF system through the AUX or console port
of any member device. Configure an IP address for the VLAN interface of a member device and make
sure that the route is reachable, and then you can access the IRF system remotely through Telnet,
Web, or SNMP.
When you log in to the IRF, actually you log in to the master device of the IRF. The master is the
configuration and control center of an IRF. After you configure the IRF on the master, the IRF system
synchronizes the configurations to the slaves.
Logging In to a Slave
When you log in to an IRF, actually you log in to the master device of the IRF. The operation interface
of the access terminal displays the master console. However, the device can redirect you to a specified
slave device. After you are redirected to a slave device, the user access terminal displays the console
of the slave device instead of that of the master device. The system enters user view of the salve
device and the command prompt is changed to <Sysname-member ID>, for example, <Sysname-2>.
What you have input on the access terminal will be redirected to the specified slave device for
processing. At present, only the following commands are allowed to be executed on a slave device:
z display
z quit
z return
z system-view
z debugging
z terminal debugging
z terminal trapping
z terminal logging
You can press Ctrl+K or use the quit or return command to return to the master console. At this time,
the master console is reactivated, and therefore it can output system information and logs.
Follow the steps below to log in to the specified slave device:
Because users login to the IRF system occupies large memory space, an IRF system allows at most
six users to log in at the same time. The permitted login user types are console and virtual type
terminal (VTY).
25-17
Network requirements
Three Switch 4510G series switches in an IRF form a bus connection. Their member IDs are 1, 2, and
3, as shown in Figure 26-9.
Figure 26-9 Network diagram for IRF
1 2 3 4 Switch 1
1 2 3 4 Switch 2
1 2 3 4 Switch 3
Configuration procedure
1) The three devices are not connected. Power them on and configure them separately.
# Configure Switch 1.
<Switch1> system-view
[Switch1] irf member 1 renumber 1
Warning: Renumbering the switch number may result in configuration change or loss.
Continue?[Y/N]:y
[Switch1] irf member 1 irf-port 1 port 2
# Configure Switch 2.
<Switch2>system-view
[Switch2] irf member 1 renumber 2
25-18
# Configure Switch 3.
<Switch3> system-view
[Switch3] irf member 1 renumber 3
Warning: Renumbering the switch number may result in configuration change or loss.
Continue?[Y/N]:y
[Switch3] irf member 1 irf-port 2 port 3
2) Power off the three devices. Connect them as shown in Figure 26-9 with IRF cables. Power them
on, and the IRF is formed.
25-19
When configuring IPC, go to these sections for information you are interested in:
z IPC Overview
z Enabling IPC Performance Statistics
z Displaying and Maintaining IPC
IPC Overview
Introduction to IPC
Node
An IPC node is an entity supporting IPC; it is an independent processing unit. In actual application, an
IPC node corresponds to one CPU.
z One centralized device has only one CPU, therefore corresponding to one node.
z An Intelligent Resilient Framework (IRF) is an interconnection of several centralized devices, with
each member device corresponding to one node. Therefore, an IRF corresponds to multiple
nodes.
z Typically a distributed device is available with multiple boards, each having one CPU, some
boards are available with multiple CPUs. Some distributed devices may be available with multiple
CPUs, for example service CPU and OAM CPU. Therefore, a distributed device corresponds to
multiple nodes.
Therefore, in actual application, IPC is mainly applied on an IRF or distributed device; it provides a
reliable transmission mechanism between different devices and boards.
Link
An IPC link is a connection between any two IPC nodes. There is one and only one link between any
two nodes for packet sending and receiving. All IPC nodes are fully connected.
IPC links are created when the system is initialized: When a node starts up, it sends handshake
packets to other nodes; a connection is established between them if the handshake succeeds.
The system identifies the link connectivity between two nodes using link status. An IPC node can have
multiple links, each having its own status.
Channel
27-1
Node 1
Application 2
2
a nn
el
el
nn
1
ha
C
Application 2
Node 2
IPC supports three packet sending modes: unicast, multicast (broadcast is considered as a special
multicast), and mixcast, each having a corresponding queue. The upper layer application modules can
select one as needed.
z Unicast: packet sending between two single nodes.
z Multicast: packet sending between a single node and multiple nodes. To use the multicast mode,
a multicast group needs to be created first. Multicasts will be sent to all the nodes in the multicast
group. An application can create multiple multicast groups. The creation and deletion of a
multicast group and multicast group members depend on the application module.
z Mixcast, namely, both unicast and multicast are supported.
27-2
27-3
When configuring automatic configuration, go to these sections for information you are interested in:
z Introduction to Automatic Configuration
z Typical Networking of Automatic Configuration
z How Automatic Configuration Works
As shown in Figure 28-1, the device implements automatic configuration with the cooperation of a
DHCP server, TFTP server and DNS server:
z DHCP server: Assigns an IP address, configure file name, TFTP server IP address, and DNS
server IP address for the device that performs automatic configuration.
z TFTP server: Saves files needed in automatic configuration. A device obtains files needed from a
TFTP server, for example, network intermediate file and the configuration file of the device.
z DNS server: Used for IP address-to-host name resolution. A device that performs automatic
configuration can resolve an IP address to a host name through a DNS server to get the
configuration file with the name hostname.cfg from a TFTP server; if the device gets the domain
28-1
z To implement auto-configuration, you need to configure some parameters on the DHCP server,
DNS server and TFTP server, but you do not need to perform any configuration on the device that
starts up without loading any configuration file. The configuration mode depends on the device
model; it is omitted here.
z If you need to use the automatic configuration function, you are recommended to connect only the
interfaces needed in automatic configuration to the network.
28-2
Yes
Yes
Is the TFTP server domain No
name contained in the
parameters?
Yes
Yes Succeeds
Fails Unicast a TFTP
request to obtain the
configuration file
Succeeds
Remove the temporary Remove the temporary
configurations and the device configurations and execute the
starts with null configuration obtained configuration file
Obtaining an IP address
When a device starts up without loading the configuration file, the system automatically configures the
first active interface (if an active Layer 2 Ethernet interface exists, this first interface is a virtual
interface corresponding with the default VLAN) of the device as obtaining its IP address through DHCP.
The device broadcasts a DHCP request through this interface. The Option 55 field specifies the
information (for example, the configuration file name, domain name and IP address of the TFTP server
and DNS server needed for obtaining the automatic configuration files) that the device can obtain from
the DHCP server.
Upon successfully obtaining its IP address through DHCP, the device resolves the Option 67 (or the file
field, configuration file name) field, Option 66 (domain name of the TFTP server) field, Option 150 (IP
address of the TFTP server) field and Option 6 (IP address of the DNS server) field. If failing to obtain
its IP address, the device removes the temporary configuration and starts up without loading the
configuration file.
28-3
The DHCP server selects IP addresses and other network configuration parameters from an address
pool when assigning an IP address to a client. DHCP supports two mechanisms for IP address
allocation.
z Dynamic address allocation: The DHCP server assigns an IP address and other configuration
parameters in an address pool to a client.
z Manual address allocation: The DHCP server will select an address pool where an IP address is
statically bound to the MAC address or ID of the client and assign the statically bound IP address
and other configuration parameters to the client.
You can configure an address allocation mode as needed:
z Different devices with the same configuration file: You can configure dynamic address allocation
on the DHCP server to assign IP addresses and the same configuration parameters (for example,
configuration file name) to the devices. If this address allocation mode is adopted, the
configuration file can only contain common configurations of the devices, and the specific
configurations of each device need to be performed in other ways. For example, you need to
specify to enable Telnet on a device through the configuration file obtained in automatic
configuration and create a local user to facilitate the administrator to Telnet to each device to
perform specific configurations (for example, configure the IP address of each interface).
z Different devices with different configuration files: You need to configure an address pool where
an IP address is statically bound to the MAC address or ID of the client, to ensure that a specific
client can be assigned with a fixed IP address and other configuration parameters. Through this
address allocation mode, you can specify different configuration commands for each device,
without the need to configure the device through other modes.
28-4
The device can obtain the following types of configuration file from the TFTP server with the automatic
configuration function enabled:
z The configuration file specified by the Option 67 or file field in the DHCP response
z The intermediate file, with the file name as network.cfg, used to save the mapping between the
IP address and the host name. The mapping is defined in the following format:
ip host hostname ip-address
For example, the intermediate file can include the following:
ip host host1 101.101.101.101
ip host host2 101.101.101.102
ip host client1 101.101.101.103
ip host client2 101.101.101.104
z The configuration file corresponding with the host name of the device, with its file name as
hostname.cfg. For example, if the host name of the device is aaa, then the configuration file
name is aaa.cfg.
z Default configuration file, with the name as device.cfg.
28-5
No
Yes
No
Resolve an IP No
address to a domain
name through DNS
Yes
No
No Yes
Remove the temporary
Remove the temporary
configurations and the device
configurations and execute the starts without loading the
obtained configuration file configuration file
The device obtains the configuration file from the TFTP server based on its resolution of the
configuration file name in the DHCP response:
z If the DHCP response contains information such as configuration file name, the device requests
the specified configuration file from the TFTP server.
z If no information such as configuration file name is contained in the DHCP response, the device
should obtain its host name first and then requests the configuration file corresponding with the
host name. The device can obtain its host name in two steps: obtaining the intermediate file from
the TFTP server and then searching in the intermediated file for its host name corresponding with
the IP address of the device; if fails, the device obtains the host name from the DNS server.
z If the device fails to obtain the specified configuration file and resolve its host name or fails to
obtain the configuration file corresponding with the host name, it requests the default configuration
file from the TFTP server.
The device selects the sending mode of the TFTP request based on its resolution of the TFTP servers
domain name and IP address in the DHCP response:
z If a legitimate TFTP server IP address is contained in the DHCP response, the device unicasts a
TFTP request to the TFTP server and does not resolve the domain name of the TFTP server.
Otherwise, the device resolves the TFTP domain name.
z If a legitimate TFTP server domain name is contained in the DHCP response, the device resolves
the IP address of the TFTP server through DNS server. If succeeds, the device unicasts a TFTP
request to the TFTP server; if fails, the device broadcasts a TFTP request to the TFTP server.
28-6
z When broadcasting a TFTP request, the device obtains the configuration file from the TFTP server
who responds the first. If the required configuration file does not exist on the TFTP server, then
obtaining the configuration file fails, and the device removes the temporary configuration and
starts up without loading the configuration file.
z When the device broadcasts a TFTP request to the TFTP server, you need to configure the UDP
Helper function on a gateway to transfer broadcasts to unicasts and forwards the unicasts to the
specified TFTP server if the device performs the automatic configuration and the TFTP server are
not in the same segment because broadcasts can only be transmitted in a segment. For the
detailed description of the UDP Helper function, refer to UDP Helper Configuration in the IP
Services Volume.
Upon successfully obtaining the configuration file, the device removes the temporary configuration and
executes the obtained configuration file; otherwise, it removes the temporary configuration and starts
up without loading the configuration file.
After the device executes the configuration file obtained, the configuration file will be deleted.
Therefore, you are recommended to save the configuration using the save command; otherwise, the
device needs to perform the automatic configuration function after system reboot. For the detailed
description of the save command, refer to File System Management Configuration in the System
Volume.
28-7