3com Stackable Switch Advanced Config Guide
3com Stackable Switch Advanced Config Guide
Manual Version:
20081010-C-1.01
www.3com.com
3Com Corporation
350 Campus Drive, Marlborough,
MA, USA 01752 3064
Copyright © 2006-2008, 3Com Corporation. All rights reserved. No part of this documentation may be
reproduced in any form or by any means or used to make any derivative work (such as translation,
transformation, or adaptation) without written permission from 3Com Corporation.
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.
UNITED STATES GOVERNMENT LEGEND
If you are a United States government agency, then this documentation and the software described herein are
provided to you subject to the following:
All technical data and computer software are commercial in nature and developed solely at private expense.
Software is delivered as “Commercial Computer Software” as defined in DFARS 252.227-7014 (June 1995) or
as a “commercial item” as defined in FAR 2.101(a) and as such is provided with only such rights as are
provided in 3Com’s standard commercial license for the Software. Technical data is provided with limited rights
only as provided in DFAR 252.227-7015 (Nov 1995) or FAR 52.227-14 (June 1987), whichever is applicable.
You agree not to remove or deface any portion of any legend provided on any licensed program or
documentation contained in, or delivered to you in conjunction with, this User Guide.
Unless otherwise indicated, 3Com registered trademarks are registered in the United States and may or may
not be registered in other countries.
3Com and the 3Com logo are registered trademarks of 3Com Corporation.
All other company and product names may be trademarks of the respective companies with which they are
associated.
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.
Improving our environmental record on a continual basis.
Always download the Release Notes for your product from the 3Com World Wide Web site and check
for the latest updates to software and product documentation:
http://www.3com.com
Organization
3Com Stackable Switch Family Advanced Configuration Guide is organized as follows:
Part Contents
z Logging In from the Console Port
01-Login Configuration Guide z Logging In Through Telnet
z Configuring Login Access Control
z Configuring Port-Based VLAN
02-VLAN Configuration Guide
z Configuring Protocol-Based VLAN
z IP Address Configuration Guide
03-IP Address Configuration Guide
z Sub IP Address Configuration Guide
04-Voice VLAN Configuration Guide Configuring Voice VLAN
05-GVRP Configuration Guide Configuring GVRP
Configuring the Basic Functions of an Ethernet
06-Ethernet Interface Basic Configuration Guide
Port
07-Link Aggregation Configuration Guide Configuring Link Aggregation
08-Port Isolation Configuration Guide Configuring Port Isolation
z Configuring Port Security autolearn Mode
z Configuring Port Security mac-authentication
Mode
09-Port Security Configuration Guide z Configuring Port Security userlogin-withoui
Mode
z Configuring Port Security
mac-else-userlogin-secure-ext Mode
10-Port Binding Configuration Guide Configuring a Port Binding
11-MAC Address Table Management
MAC Address Table Management
Configuration Guide
12-DLDP Configuration Guide Configuring DLDP
Part Contents
z Auto Detect Implementation in Static Routing
z Auto Detect Implementation in VRRP
13-Auto Detect Configuration Guide
z Auto Detect Implementation in VLAN
Interface Backup
z Configuring MSTP
z Configuring VLAN-VPN Tunneling
14-MSTP Configuration Guide z Configuring RSTP
z Configuring Digest Snooping and Rapid
Transition
z Configuring Static Routes
z Configuring RIP
z Configuring OSPF
z Configuring OSPF DR Election
z Configuring a (Totally) Stub Area
z Configuring a (Totally) NSSA Area
15-Routing Configuration Guide
z Configuring OSPF Route Summarization
z Configuring OSPF Virtual Link
z Configuring BGP Confederation Attribute
z Configuring BGP RR
z Configuring BGP Path Selection
z Configuring Routing Policies
z Configuring IGMP Snooping
z Configuring IGMP Snooping Only
z Configuring Multicast VLAN
16-Multicast Configuration Guide z Configuring PIM-SM plus IGMP plus IGMP
Snooping
z Configuring PIM-DM plus IGMP
z Configuring Anycast RP Application
z Configuring 802.1x Access Control
17-802.1x Configuration Guide
z Configuring Quick EAD Deployment
z Configuring RADIUS Authentication for
Telnet Users
z Configuring Dynamic VLAN Assignment with
RADIUS Authentication
18-AAA Configuration Guide z Configuring Local Authentication for Telnet
Users
z Configuring HWTACACS Authentication for
Telnet Users
z Configuring EAD
19-MAC Authentication Configuration Guide Configuring MAC Authentication
z Single VRRP Group Configuration
z Multiple VRRP Groups Configuration
20-VRRP Configuration Guide
z VRRP Interface Tracking
z VRRP Port Tracking
z ARP Attack Detection and Packet Rate Limit
Configuration Example
21-ARP Configuration Guide z Proxy ARP Configuration Example
z Proxy ARP Configuration in Port Isolation
Application
Part Contents
z DHCP Server Global Address Pool
Configuration Guide
z DHCP Server Interface Address Pool
Configuration Guide
z DHCP Relay Agent Configuration Guide
22-DHCP Configuration Guide
z DHCP Snooping Configuration Guide
z DHCP Snooping Option 82 Configuration
Guide
z DHCP Accounting Configuration Guide
z DHCP Client Configuration Guide
z Configuring Basic ACLs
z Configuring Advanced ACLs
23-ACL Configuration Guide
z Configuring Ethernet Frame Header ACLs
z Configuring User-Defined ACLs
z Configuring Traffic Policing and Line Rate
z Configuring Priority Marking and Queue
Scheduling
24-QoS-QoS Profile Configuration Guide
z Configuring Traffic Redirecting and Traffic
Accounting
z Configuring QoS Profile
25-Web Cache Redirection Configuration Guide Configuring Web Cache Redirection
z Local Port Mirroring Configuration
26-Mirroring Configuration Guide z Remote Port Mirroring Configuration
z Traffic Mirroring Configuration
27-XRN Configuration Guide XRN Fabric Configuration
z Cluster Configuration
z Network Management Interface
28-Cluster Configuration Guide
Configuration
z Cluster Configuration in Real Networking
z PoE Configuration
29-PoE-PoE Profile Configuration Guide
z PoE Profile Configuration
30-UDP Helper Configuration Guide UDP Helper Configuration Guide
z SNMP Configuration
31-SNMP-RMON Configuration Guide
z RMON Configuration
z NTP Client/Server Mode Configuration
z NTP Symmetric Peers Mode Configuration
z NTP Broadcast Mode Configuration
32-NTP Configuration Guide
z NTP Multicast Mode Configuration
z NTP Client/Server Mode with Authentication
Configuration
z Configuring the Switch to Act as the SSH Server
and Use Password Authentication
z Configuring the Switch to Act as the SSH
Server and Use RSA Authentication
33-SSH Configuration Guide z Configuring the Switch to Act as the SSH Client
and Use Password Authentication
z Configuring the Switch to Act as the SSH Client
and Use RSA Authentication
z Configuring the Switch to Act as the SSH
Part Contents
Client and Not to Support First-Time
Authentication
z Configuring SFTP
z When Switch Acts as Server for Password
Authentication
z When Switch Acts as Server for Publickey
Authentication
z When Switch Acts as Client for Password
Authentication
z When Switch Acts as Client for Publickey
Authentication
z When Switch Acts as Client and First-Time
Authentication is not Supported
z SFTP Configuration
z Configuring a Switch as FTP Server
34-FTP and TFTP Configuration Guide z Configuring a Switch as FTP Client
z Configuring a Switch as TFTP Client
z Outputting Log Information to a Unix Log
Host
z Outputting Log Information to a Linux Log
Host
z Outputting Log and Trap Information to a Log
35-Information Center Configuration Guide Host Through the Same Channel
z Outputting Log Information to the Console
z Displaying the Time Stamp with the UTC
Time Zone
z Use of the Facility Argument in Log
Information Output
z Configuring VLAN-VPN
36-VLAN-VPN Configuration Guide z Configuring Selective QinQ
z Configuring BPDU Tunnel
37-Remote-ping Configuration Guide Remote-ping Configuration
z Static Domain Name Resolution
Configuration Guide
38-DNS Configuration Guide
z Dynamic Domain Name Resolution
Configuration Guide
z Configuring Access Management
39-Access Management Configuration Guide z Configuring Access Management with Port
Isolation
40-Web Authentication Configuration Guide Configuring Web Authentication
41-IPv6 Management Configuration Guide Configuring IPv6
z Smart Link Configuration Example
42-Smart link - Monitor Link Configuration Guide z Implementing Collaboration Between Smart
Link and Monitor Link
43-VLAN Mapping Configuration Guide Configuring VLAN Mapping
Conventions
The manual uses the following conventions:
Command conventions
Convention Description
GUI conventions
Convention Description
Window names, button names, field names, and menu items are in
Boldface
Boldface. For example, the New User window appears; click OK.
Symbols
Convention Description
Means reader be careful. Improper operation may cause data loss or
damage to equipment.
Related Documentation
The following manuals offer additional information necessary for managing your Stackable Switch.
Consult the documents that apply to the switch model that you are using.
Manual Description
Provide detailed descriptions of command line
3Com Switch Family Command Reference
interface (CLI) commands, that you require to
Guides
manage your Stackable Switch.
Describe how to configure your Stackable Switch
3Com Switch Family Configuration Guides using the supported protocols and CLI
commands.
Provide a summary of command line interface
3Com Switch Family Quick Reference Guides (CLI) commands that are required for you to
manage your Stackable Switch.
Contain the latest information about your
product. If information in this guide differs from
3Com Stackable Switch Family Release Notes
information in the release notes, use the
information in the Release Notes.
These documents are available in Adobe Acrobat Reader Portable Document Format (PDF) on the
3Com World Wide Web site: http://www.3com.com
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.
Products Supported by this Document
Product Orderable SKU Description
4210 3CR17331-91 Switch 4210 9-Port
4210 3CR17332-91 Switch 4210 18-Port
4210 3CR17333-91 Switch 4210 26-Port
4210 3CR17334-91 Switch 4210 52-Port
4210 3CR17341-91 Switch 4210 PWR 9-Port
4210 3CR17342-91 Switch 4210 PWR 18-Port
4210 3CR17343-91 Switch 4210 PWR 26-Port
4500 3CR17561-91 Switch 4500 26-Port
4500 3CR17562-91 Switch 4500 50-Port
4500 3CR17571-91 Switch 4500 PWR 26-Port
4500 3CR17572-91 Switch 4500 PWR 50-Port
5500 3CR17161-91 Switch 5500-EI 28-Port
5500 3CR17162-91 Switch 5500-EI 52-Port
i
1 Login Configuration Guide
Unless otherwise specified, all the switches used in the following configuration examples and
configuration procedures are S5500 series switches (V03.03.01).
Network Diagram
Figure 1-1 Logging in from the console port to configure Telnet login
As shown in Figure 1-1, use a console cable to connect the serial port of your PC/terminal to the
console port of the switch. Log into the switch from the AUX user interface on the console port to
configure Telnet login. The current user level is manage level (level 3).
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
Switch 4200G V03.02.00 All versions
V03.01.00
Switch 4210 All versions
V03.01.05
1-1
Configuration Procedure
# Set the number of lines that can be viewed on the screen of the VTY 0 user to 30.
[Sysname-ui-vty0] screen-length 30
2) Configure password authentication for Telnet login on VTY 0, and set the password to 123456 in
plain text.
[Sysname] user-interface vty 0
[Sysname-ui-vty0] authentication-mode password
[Sysname-ui-vty0] set authentication password simple 123456
# Set the service type to Telnet and the user level to 2 for the user guest.
[Sysname-luser-guest] service-type telnet level 2
[Sysname-luser-guest] quit
# Specify the domain system as the default domain, and configure the domain to adopt local
authentication in scheme mode.
[Sysname] domain default enable system
1-2
[Sysname] domain system
[Sysname-isp-system] scheme local
Complete Configuration
Precautions
None
1-3
Network Diagram
As shown in Figure 1-2, telnet to the switch to configure console login. The current user level is manage
level (level 3).
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
Configuration Procedure
# Set the number of lines that can be viewed on the screen of the AUX 0 user to 30.
[Sysname-ui-aux0] screen-length 30
1-4
# Set the history command buffer size to 20 for AUX 0.
[Sysname-ui-aux0] history-command max-size 20
2) Configure password authentication for console login, and set the password to 123456 in plain text.
[Sysname] user-interface aux 0
[Sysname-ui-aux0] authentication-mode password
[Sysname-ui-aux0] set authentication password simple 123456
# Set the service type to Terminal and the user level to 2 for the user guest.
[Sysname-luser-guest] service-type terminal level 2
[Sysname-luser-guest] quit
Complete Configuration
1-5
idle-timeout 6 0
speed 19200
screen-length 30
Precautions
None
10.110.100.46
Host A
IP network
Switch
Host B
10.110.100.52
As shown in Figure 1-3, configure the switch to allow only Telnet/SNMP/WEB users at 10.110.100.52
and 10.110.100.46 to log in.
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
1-6
Hardware
Product series Software version
version
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
Configuration Procedure
# Define ACL rules to allow only Telnet/SNMP/WEB users at 10.110.100.52 and 10.110.100.46 to log
into the switch.
[Sysname-acl-basic-2000] rule 1 permit source 10.110.100.52 0
[Sysname-acl-basic-2000] rule 2 permit source 10.110.100.46 0
[Sysname-acl-basic-2000] rule 3 deny source any
[Sysname-acl-basic-2000] quit
Complete Configuration
1-7
acl number 2000
rule 1 permit source 10.110.100.52 0
rule 2 permit source 10.110.100.46 0
rule 3 deny
#
snmp-agent community read aaa acl 2000
snmp-agent group v2c groupa acl 2000
snmp-agent usm-user v2c usera groupa acl 2000
z Configuration for WEB login control by source IP address
#
ip http acl 2000
#
acl number 2000
rule 1 permit source 10.110.100.52 0
rule 2 permit source 10.110.100.46 0
rule 3 deny
Precautions
None
1-8
Table of Contents
i
1 VLAN Configuration Guide
Network Diagram
VLAN10
192.168.10.0/24
Server
VLAN100
Eth1/0/1 192.168.100.0/24
SwitchA
Eth1/0/2
Eth1/0/3
HostA
Eth1/0/10
SwitchB
Eth1/0/12 Eth1/0/11
HostC HostB
VLAN102 VLAN101
192.168.102.0/24 192.168.101.0/24
In the sample intranet network shown in Figure 1-1, Switch A is connected to the subnet of a department
and the subnet for the public servers, and Switch B is connected to the subnet of the other two
departments.
To guarantee data security for each department, use VLANs to isolate the four subnets at Layer 2 but
configure Layer-3 interfaces on Switch A to enable the hosts of the three departments and the public
servers to communicate with each other at Layer 3.
1-1
Applicable Product Matrix
The 4500, 5500 and 5500G series switches can operate as Switch A in Figure 1-1 for forwarding
packets at Layer 3 for VLANs. The other models in the table above do not support configuring multiple
VLAN interfaces for Layer-3 forwarding, and therefore, they can operate as only Switch B for Layer-2
isolation with VLANs, as shown in Figure 1-1.
Configuration Procedure
z Configure Switch A
# Create VLAN 10 on Switch A and assign Ethernet 1/0/1 to VLAN 10.
[SwitchA] vlan 10
[SwitchA-vlan10] port Ethernet 1/0/1
[SwitchA-vlan10] quit
# Create VLAN 100 on Switch A and assign Ethernet 1/0/2 to VLAN 100.
[SwitchA] vlan 100
[SwitchA-vlan100] port Ethernet 1/0/2
[SwitchA-vlan100] quit
# Create VLAN-interface 10, VLAN-interface 100, VLAN-interface 101, and VLAN-interface 102, and
configure an IP address for each of these VLAN-interfaces.
[SwitchA] interface Vlan-interface 10
[SwitchA-Vlan-interface10] ip address 192.168.10.1 24
[SwitchA-Vlan-interface10] quit
[SwitchA] interface Vlan-interface 100
[SwitchA-Vlan-interface100] ip address 192.168.100.1 24
[SwitchA-Vlan-interface100] quit
1-2
[SwitchA] interface Vlan-interface 101
[SwitchA-Vlan-interface101] ip address 192.168.101.1 24
[SwitchA-Vlan-interface101] quit
[SwitchA] interface Vlan-interface 102
[SwitchA-Vlan-interface102] ip address 192.168.102.1 24
[SwitchA-Vlan-interface102] quit
# Configure Ethernet 1/0/3 of Switch A to be a trunk port and to permit the packets carrying the tag of
VLAN 101 or VLAN 102 to pass through.
[SwitchA] interface Ethernet 1/0/3
[SwitchA-Ethernet1/0/3] port link-type trunk
[SwitchA-Ethernet1/0/3] port trunk permit vlan 101 102
z Configure Switch B
# Create VLAN 101 on Switch B, and assign Ethernet 1/0/11 to VLAN 101.
[SwitchB] vlan 101
[SwitchB-vlan101] port Ethernet 1/0/11
[SwitchB-vlan101] quit
# Create VLAN 102 on Switch B, and assign Ethernet 1/0/12 to VLAN 102.
[SwitchB] vlan 102
[SwitchB-vlan102] port Ethernet 1/0/12
[SwitchB-vlan102] quit
# Configure Ethernet 1/0/10 of Switch B to be a trunk port and to permit the packets carrying the tag of
VLAN 101 or VLAN 102 to pass through.
[SwitchB] interface Ethernet 1/0/10
[SwitchB-Ethernet1/0/10] port link-type trunk
[SwitchB-Ethernet1/0/10] port trunk permit vlan 101 102
Complete Configuration
z Configuration on Switch A
#
vlan 10
#
vlan 100
#
vlan 101
#
vlan 102
#
interface Vlan-interface 10
ip address 192.168.10.1 255.255.255.0
#
interface Vlan-interface 100
ip address 192.168.100.1 255.255.255.0
#
interface Vlan-interface 101
ip address 192.168.101.1 255.255.255.0
1-3
#
interface Vlan-interface 102
ip address 192.168.102.1 255.255.255.0
#
interface Ethernet1/0/1
port access vlan 10
#
interface Ethernet1/0/2
port access vlan 100
#
interface Ethernet1/0/3
port link-type trunk
port trunk permit vlan 1 101 102
z Configuration on Switch B
#
vlan 101
#
vlan 102
#
interface Ethernet1/0/10
port link-type trunk
port trunk permit vlan 1 101 102
#
interface Ethernet1/0/11
port access vlan 101
#
interface Ethernet1/0/12
port access vlan 201
Precautions
z After you assign the servers and the workstations to different VLANs, they cannot communicate
with each other. For them to communicate, you need to configure a Layer 3 VLAN interface for
each of them on the switches.
z After you telnet to an Ethernet port on a switch to make configuration, do not remove the port from
its current VLAN. Otherwise, your Telnet connection will be disconnected.
1-4
Network Diagram
Eth1/0/11 Eth1/0/12
Eth1/0/10
Configure the switch to automatically assign IP packets and Appletalk packets of the workroom to
different VLANs, ensuring that the workstations can communicate with their respective servers properly.
Configuration Procedure
1-5
[Sysname] vlan 100
[Sysname-vlan100] protocol-vlan ip
Create a user-defined protocol template for VLAN 100 to carry ARP for IP communication, assuming
that Ethernet_II encapsulation is used.
[Sysname-vlan100] protocol-vlan mode ethernetii etype 0806
Configure Ethernet 1/0/10 to be a hybrid port and to remove the outer VLAN tag when forwarding
packets of VLAN 100 and VLAN 200.
[Sysname-vlan100] quit
[Sysname] interface Ethernet 1/0/10
[Sysname-Ethernet1/0/10] port link-type hybrid
[Sysname-Ethernet1/0/10] port hybrid vlan 100 200 untagged
Bind Ethernet 1/0/10 to protocol template 0 and protocol template 1 of VLAN 100, and protocol template
0 of VLAN 200.
When configuring a protocol template, you can assign a number to the template. If you fail to do that, the
system automatically assigns the lowest available number to the template. Thus, in this configuration
example, the two protocol templates for VLAN 100 are automatically numbered 0 and 1, and the
protocol template for VLAN 200 is numbered 0.
Complete Configuration
#
vlan 100
protocol-vlan 0 ip
protocol-vlan 1 mode ethernetii etype 0806
#
vlan 200
protocol-vlan 0 at
#
interface Ethernet1/0/10
port link-type hybrid
port hybrid vlan 1 100 200 untagged
port hybrid protocol-vlan vlan 100 0
port hybrid protocol-vlan vlan 100 1
port hybrid protocol-vlan vlan 200 0
#
interface Ethernet1/0/11
port access vlan 100
#
interface Ethernet1/0/12
port access vlan 200
1-6
Precautions
Because IP depends on ARP for address resolution in Ethernet, you are recommended to configure the
IP and ARP templates in the same VLAN and associate them with the same port to prevent
communication failure.
1-7
Table of Contents
i
1 IP Address Configuration Guide
Network Diagram
As shown in Figure 1-1, a PC connects to a switch through the console port. To manage the switch
through Telnet, assign IP address 192.168.0.1 and subnet mask 255.255.255.0 to VLAN-interface 1 of
the switch.
1-1
Configuration Procedure
Complete Configuration
#
interface Vlan-interface 1
ip address 192.168.0.1 255.255.255.0
#
Precautions
Besides directly assigning an IP address to a VLAN interface, you may configure a VLAN interface to
obtain an IP address 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.
As shown in the above figure, the port in VLAN 1 on Switch is connected to a LAN in which hosts belong
to two network segments: 172.16.1.0/24 and 172.16.2.0/24. It is required to enable the hosts in the LAN
to communicate with external networks through Switch, and to enable the hosts in the two network
segments to communicate with each other.
1-2
Applicable Product Matrix
Configuration Procedure
Assign a primary and secondary IP addresses to VLAN-interface 1 of Switch to ensure that all the hosts
on the LAN can access external networks through Switch. Set Switch as the gateway on all the hosts of
the two network segments to ensure that they can communicate with each other.
# Assign a primary IP address and a secondary IP address to VLAN-interface 1.
<Switch> system-view
[Switch] interface Vlan-interface 1
[Switch-Vlan-interface1] ip address 172.16.1.1 255.255.255.0
[Switch-Vlan-interface1] ip address 172.16.2.1 255.255.255.0 sub
# Set the gateway address to 172.16.1.1 on the hosts in subnet 172.16.1.0/24, and to 172.16.2.1 on the
hosts in subnet 172.16.2.0/24.
# Ping Host B from Host A to verify the connectivity.
Complete Configuration
#
interface Vlan-interface 1
ip address 172.16.1.1 255.255.255.0
ip address 172.16.2.1 255.255.255.0 sub
#
Precautions
z You can assign up to seven IP addresses to an interface of the 5500G series Ethernet switches,
five IP addresses to that of the 5500 series Ethernet switches and two IP addresses to that of the
4200G series Ethernet switches. Among these IP addresses assigned for each interface, only one
is the primary IP address and the others are secondary IP addresses. A newly specified primary IP
address overwrites the previous one.
z The primary and secondary IP addresses of an interface cannot reside on the same network
segment; an IP address of a VLAN interface must not be on the same network segment as that of a
loopback interface on a device.
1-3
Table of Contents
i
1 Voice VLAN Configuration Guide
Network Diagram
Eth1/0/1
SwitchA SwitchB
Eth1/0/2
Server
IP Phone2
(Untag)
Oui:000f-2200-0000
As shown in Figure 1-1, the PC is connected to Ethernet 1/0/1 of Switch A through IP phone 1, and IP
phone 2 is connected to Ethernet 1/0/2 of Switch A. IP phone 1 sends out voice traffic with the tag of the
voice VLAN, while IP phone 2 sends out voice traffic without any VLAN tag. Configure the voice VLAN
feature to satisfy the following requirements:
z VLAN 2 functions as the voice VLAN for transmitting voice traffic, and set the aging timer of the
voice VLAN to 100 minutes. VLAN 6 transmits user service data.
z Ethernet 1/0/1 and Ethernet 1/0/2 can recognize voice traffic automatically. Service data from the
PC and voice traffic are assigned to different VLANs and then transmitted to the server and the
voice gateway respectively through Switch B.
1-1
z As the OUI address of IP phone 2 is not in the default voice device OUI address list of the switch,
add its OUI address 000f-2200-0000 to the voice device OUI address list. In addition, configure its
description as IP Phone2.
Configuration Procedure
# Add 000f-2200-0000 to the voice device OUI address list and configure its description as IP Phone2.
[SwitchA] voice vlan mac-address 000f-2200-0000 mask ffff-ff00-0000 description IP Phone2
# Configure VLAN 2 as the voice VLAN and enable the voice VLAN feature globally.
[SwitchA] voice vlan 2 enable
# Set the voice VLAN assignment mode on Ethernet 1/0/1 to automatic. This step is optional, because
the default voice VLAN assignment mode is automatic.
[SwitchA] interface Ethernet 1/0/1
[SwitchA-Ethernet1/0/1] voice vlan mode auto
# Set VLAN 6 as the default VLAN of Ethernet 1/0/1 and configure Ethernet 1/0/1 to permit the packets
of VLAN 6 to pass through. (PC data will be transmitted in the VLAN.)
[SwitchA-Ethernet1/0/1] port trunk pvid vlan 6
[SwitchA-Ethernet1/0/1] port trunk permit vlan 6
1-2
z After the configuration is finished, PC data is automatically assigned to the default VLAN of
Ethernet 1/0/1 (namely the service VLAN) for transmission. When IP phone traffic arrives at
Ethernet 1/0/1, the port automatically permits the voice VLAN and transmits the voice traffic with
the voice VLAN tag, so that the IP phone can receive packets normally.
z You can set Ethernet 1/0/1 as a hybrid or trunk port following the same procedure. In either case,
you need to set the service VLAN as the default VLAN. As for voice traffic, when IP phone traffic
arrives at the port, the port automatically permits the voice VLAN and transmits the traffic with the
voice VLAN tag.
# Set the voice VLAN assignment mode of Ethernet 1/0/2 to manual. The mode must be manual
because IP phone 2 can send out only untagged voice traffic.
[SwitchA-Ethernet1/0/1] quit
[SwitchA] interface Ethernet 1/0/2
[SwitchA-Ethernet1/0/2] undo voice vlan mode auto
# Configure Ethernet 1/0/2 to be an access port and permit the voice VLAN.
[SwitchA-Ethernet1/0/2] port access vlan 2
z You can set Ethernet 1/0/2 as a trunk or hybrid port. In either case, configure the voice VLAN as the
default VLAN and configure the port to remove the VLAN tag when forwarding traffic with the voice
VLAN tag.
z If traffic from IP phone 2 is tagged, configure Ethernet 1/0/2 as a trunk or hybrid port where the
default VLAN cannot be set to VLAN 20 and the packets of VLAN 20 must be sent with the VLAN
tag.
Complete Configuration
#
vlan 1 to 2
#
vlan 6
#
interface Ethernet1/0/1
port link-type trunk
port trunk permit vlan 1 6
port trunk pvid vlan 6
voice vlan enable
#
1-3
interface Ethernet1/0/2
port access vlan 2
undo voice vlan mode auto
voice vlan enable
#
voice vlan aging 100
voice vlan mac-address 000f-2200-0000 mask ffff-ff00-0000 description IP Phone2
voice vlan 2 enable
Precautions
1-4
Table of Contents
i
1 GVRP Configuration Guide
Configuring GVRP
GVRP enables a switch to propagate local VLAN registration information to other participant switches
and dynamically update the VLAN registration information from other switches to its local database
about active VLAN members and through which port they can be reached. GVRP ensures that all
switches on a bridged LAN maintain the same VLAN registration information, while less manual
configuration workload is involved.
Network Diagram
z All the involved Ethernet ports on the switches are configured to be trunk ports and permit all the
VLANs to pass through.
z GVRP is enabled for all the switches globally and for all the ports on them.
z Configure static VLAN 5 for Switch C, static VLAN 8 for Switch D, and static VLAN 5 and static
VLAN 7 for Switch E. Switch A and Switch B are not configured with static VLANs.
z Set the registration mode of Ethernet 1/0/1 on Switch E to fixed, and display dynamic VLAN
registration information of Switch A, Switch B, and Switch E.
z Set the registration mode of Ethernet 1/0/1 on Switch E to forbidden, and display dynamic VLAN
registration information of Switch A, Switch B, and Switch E.
1-1
Configuration Procedure
z Configure Switch A
# Enable GVRP globally.
<SwitchA> system-view
[SwitchA] gvrp
# Configure Ethernet 1/0/1 to be a trunk port and to permit the packets of all the VLANs to pass through.
[SwitchA] interface Ethernet 1/0/1
[SwitchA-Ethernet1/0/1] port link-type trunk
[SwitchA-Ethernet1/0/1] port trunk permit vlan all
# Configure Ethernet 1/0/2 to be a trunk port and to permit the packets of all the VLANs to pass through.
[SwitchA] interface Ethernet 1/0/2
[SwitchA-Ethernet1/0/2] port link-type trunk
[SwitchA-Ethernet1/0/2] port trunk permit vlan all
# Configure Ethernet 1/0/3 to be a trunk port and to permit the packets of all the VLANs to pass through.
[SwitchA] interface Ethernet 1/0/3
[SwitchA-Ethernet1/0/3] port link-type trunk
[SwitchA-Ethernet1/0/3] port trunk permit vlan all
# Configure Ethernet 1/0/1 to be a trunk port and to permit the packets of all the VLANs to pass through.
Enable GVRP globally and enable GVRP on the port. # The configuration on Switch C is similar to that
on Switch A.
1-2
For simplicity, the following provides only configuration steps. For configuration commands, refer to the
configuration above.
z Configure Switch D
# Configure Ethernet 1/0/1 to be a trunk port and to permit the packets of all the VLANs to pass through.
Enable GVRP globally and enable GVRP on the port.
# Create VLAN 8.
z Configure Switch E
# Configure Ethernet 1/0/1 to be a trunk port and to permit the packets of all the VLANs to pass through.
Enable GVRP globally and enable GVRP on the port.
# Create VLAN 5 and VLAN 7.
z Display the static VLAN registration information on Switch A, Switch B, and Switch C.
# Display the dynamic VLAN information on Switch A.
[SwitchA] display vlan dynamic
Total 3 dynamic VLAN exist(s).
The following dynamic VLANs exist:
5, 7, 8,
The output shows that static VLAN 7 created on Switch E has been registered on Switch A and Switch B
and Switch E can normally register VLAN 8 propagated by Switch B.
z Set the registration mode of Ethernet 1/0/1 on Switch E to fixed, that is, disable Ethernet 1/0/1 from
registering VLANs dynamically and allow it to propagate only its local VLANs. Display the dynamic
VLAN registration information on Switch A, Switch B, and Switch E.
# Set the registration mode of Ethernet 1/0/1 on Switch E to fixed.
[SwitchE] interface Ethernet 1/0/1
[SwitchE-Ethernet1/0/1] gvrp registration fixed
1-3
5, 7, 8,
The output shows that static VLAN 7 created on Switch E has been registered on Switch A and Switch B
and Switch E cannot register VLAN 8 propagated by Switch B.
z Set the registration mode of Ethernet 1/0/1 on Switch E to forbidden, and display the dynamic
VLAN registration information on Switch A, Switch B, and Switch E.
# Set the registration mode of Ethernet 1/0/1 on Switch E to forbidden, that is, disable Ethernet 1/0/1
from dynamically registering VLANs and allow it to propagate only the default VLAN (VLAN 1).
[SwitchE-Ethernet1/0/1] gvrp registration forbidden
The output shows that VLAN 7 is not registered on Switch A and Switch B, and Switch E cannot register
VLAN 8 propagated by Switch B.
Complete Configuration
z Configuration on Switch A
#
gvrp
#
interface Ethernet1/0/1
port link-type trunk
port trunk permit vlan all
gvrp
#
interface Ethernet1/0/2
port link-type trunk
1-4
port trunk permit vlan all
gvrp
#
interface Ethernet1/0/3
port link-type trunk
port trunk permit vlan all
gvrp
z Configuration on Switch B
#
gvrp
#
interface Ethernet1/0/1
port link-type trunk
port trunk permit vlan all
gvrp
#
interface Ethernet1/0/2
port link-type trunk
port trunk permit vlan all
gvrp
z Configuration on Switch C
#
gvrp
#
vlan 5
#
interface Ethernet1/0/1
port link-type trunk
port trunk permit vlan all
gvrp
z Configuration on Switch D
#
gvrp
#
vlan 8
#
interface Ethernet1/0/1
port link-type trunk
port trunk permit vlan all
gvrp
z Configuration on Switch E
#
gvrp
#
vlan 5
#
vlan 7
#
1-5
interface Ethernet1/0/1
port link-type trunk
port trunk permit vlan all
gvrp registration forbidden
gvrp
Precautions
z The port trunk permit vlan all command is designed for GVRP only. To prevent users of
unauthorized VLANs from accessing restrictive resources from a port, do not use the command
when GVRP is disabled on the port.
z Before enabling GVRP on a port, enable GVRP globally first.
z Use GVRP only on trunk ports.
1-6
Table of Contents
i
1 Ethernet Interface Basic Configuration Guide
Network Diagram
z Switch A and Switch B are connected through the trunk port Ethernet 1/0/1 on each side.
z Specify VLAN 100 as the default VLAN of Ethernet 1/0/1.
z Configure Ethernet 1/0/1 to permit the packets of VLAN 2, VLAN 6 through VLAN 50, and VLAN
100 to pass through.
1-1
Configuration Procedure
z The following provides only the configuration on Switch A. The configuration on Switch B is similar
to that on Switch A.
z This configuration example assumes that VLAN 2, VLAN 6 through VLAN 50, and VLAN 100 have
been created.
# Configure Ethernet 1/0/1 to permit the packets of VLAN 1 through VLAN 3, VLAN 6 through VLAN 50,
and VLAN 100 to pass through.
[SwitchA-Ethernet1/0/1] port trunk permit vlan 1 to 3 6 to 50 100
Complete Configuration
#
interface Ethernet1/0/1
port link-type trunk
port trunk permit vlan 1 to 3 6 to 50 100
port trunk pvid vlan 100
#
Precautions
Do not configure the port trunk permit vlan all command on a trunk port with GVRP disabled.
1-2
Table of Contents
i
1 Link Aggregation Configuration Guide
Network Diagram
Aggregate Ethernet 1/0/1 through 1/0/3 on Switch A into an aggregation group and connect the group to
Switch B to balance incoming/outgoing traffic among the member ports.
The example will show you how to configure link aggregation in different aggregation modes.
1-1
Configuration Procedure
The example only provides the configuration on Switch A. Perform the same configuration on Switch B
to implement link aggregation.
1-2
[SwitchA-Ethernet1/0/3] lacp enable
Complete Configuration
Precautions
z If static LACP aggregation or manual aggregation is adopted, you are recommended not to
cross-connect the aggregation member ports at the two ends to avoid packet loss. For example, if
local port 1 is connected to remote port 2, do not connect local port 2 to remote port 1.
z Dynamic LACP aggregation mode is not recommended in actual networking scenarios.
1-3
z The implementation of static aggregation varies by platform software version. This may result in
problems when products using different platform software versions are interconnected through
static aggregation groups. Use the display version command to view the platform software
version.
z The 4210 switch only supports manually-configured aggregation groups.
1-4
Table of Contents
i
1 Port Isolation Configuration Guide
Network Diagram
Internet
Eth1/0/1
Switch
Eth1/0/2 Eth1/0/4
Eth1/0/3
PC 2 PC 3 PC 4
z PC2, PC3, and PC4 connect to the switch ports Ethernet 1/0/2, Ethernet 1/0/3, and Ethernet 1/0/4
respectively.
z The switch connects to the Internet through Ethernet 1/0/1.
z Isolate PC2, PC3, and PC4 from each other.
1-1
Product series Software version Hardware version
Switch 4200G V03.02.00 All versions
V03.02.00
Switch 4500 All versions
V03.03.00
V03.02.03
Switch 5500 All versions
V03.03.01
V03.01.00
Switch 4210 All versions
V03.01.05
Configuration Procedure
# Add Ethernet 1/0/2, Ethernet 1/0/3, and Ethernet 1/0/4 to the isolation group.
<Switch> system-view
System View: return to User View with Ctrl+Z.
[Switch] interface ethernet1/0/2
[Switch-Ethernet1/0/2] port isolate
[Switch-Ethernet1/0/2] quit
[Switch] interface ethernet1/0/3
[Switch-Ethernet1/0/3] port isolate
[Switch-Ethernet1/0/3] quit
[Switch] interface ethernet1/0/4
[Switch-Ethernet1/0/4] port isolate
[Switch-Ethernet1/0/4] quit
[Switch]
Complete Configuration
#
interface Ethernet1/0/2
port isolate
#
interface Ethernet1/0/3
port isolate
#
interface Ethernet1/0/4
port isolate
#
Precautions
z Adding to or removing from an isolation group an aggregated port can cause all other ports in the
aggregation group on the device to join or exit the isolation group automatically.
1-2
z After an aggregated port is removed from its aggregation group, all other member ports will still
stay in the isolation group that they have joined (if any).
z Removing an aggregation group does not remove its member ports from the isolation group that
they have joined (if any).
z Adding an isolated port to an aggregation group can cause all the member ports in the aggregation
group to join the isolation group automatically.
z Cross-device port isolation is supported on the Switch 5500/ Switch 4500 switches in an XRN
fabric. This allows ports on different units to join the same isolation group.
z For Switch 5500/ Switch 4500 switches in an XRN fabric, adding a member port in a cross-device
aggregation group to an isolation group does not cause other member ports to join the isolation
group automatically.
1-3
Table of Contents
i
1 Port Security Configuration Guide
Network Diagram
Figure 1-1 Network diagram for configuring port security autolearn mode
On port Ethernet 1/0/1 of the switch, perform configurations to meet the following requirements:
z Allow a maximum of 80 users to access the port without authentication, and save the automatically
learned user MAC addresses as secure MAC addresses.
z To ensure that the host can access the network, add the MAC address 0001-0002-0003 as a
secure MAC address to VLAN 1 on the port.
z Once the number of secure MAC addresses reaches 80, the port stops MAC address learning. If
any frame with an unknown source MAC address arrives, intrusion protection is triggered and the
port is disabled and kept silent for 30 seconds.
1-1
Configuration Procedure
# Set the maximum number of MAC addresses allowed on the port to 80.
[Switch-Ethernet1/0/1] port-security max-mac-count 80
# Configure the port to be silent for 30 seconds after intrusion protection is triggered.
[Switch-Ethernet1/0/1] port-security intrusion-mode disableport-temporarily
[Switch-Ethernet1/0/1] quit
[Switch] port-security timer disableport 30
Complete Configuration
#
port-security enable
port-security timer disableport 30
#
interface Ethernet1/0/1
port-security max-mac-count 80
port-security port-mode autolearn
port-security intrusion-mode disableport-temporarily
mac-address security 0001-0002-0003 vlan 1
#
Precautions
z Before enabling port security, be sure to disable 802.1x and MAC authentication globally.
z On a port configured with port security, you cannot configure the maximum number of MAC
addresses that the port can learn, reflector port for port mirroring, fabric port or link aggregation.
1-2
Network Diagram
Figure 1-2 Network diagram for configuring port security mac-authentication mode
The host connects to the switch through the port Ethernet 1/0/1, and the switch authenticates the host
through the RADIUS server. If the authentication is successful, the host is authorized to access the
Internet.
On port Ethernet 1/0/1 of the switch, perform configurations to meet the following requirements:
z The switch performs MAC authentication of users.
z All users belong to the domain aabbcc.net, and each of them uses the MAC address as username
and password for authentication.
z Whenever a packet fails MAC authentication, intrusion protection is triggered to filter packets
whose source MAC addresses are the same as that of the packet failing the authentication,
ensuring the security of the port.
1-3
Configuration Procedure
z The following configurations involve some AAA/RADIUS configuration commands. For details
about the commands, refer to AAA Operation.
z Configurations on the user host and the RADIUS server are omitted.
# Specify the primary RADIUS authentication server and primary RADIUS accounting server.
[Switch-radius-radius1] primary authentication 192.168.1.3
[Switch-radius-radius1] primary accounting 192.168.1.2
# Specify the secondary RADIUS authentication server and secondary RADIUS accounting server.
[Switch-radius-radius1] secondary authentication 192.168.1.2
[Switch-radius-radius1] secondary accounting 192.168.1.3
# Set the shared key for message exchange between the switch and the RADIUS authentication
servers to name.
[Switch-radius-radius1] key authentication name
# Set the shared key for message exchange between the switch and the accounting RADIUS servers to
name.
[Switch-radius-radius1] key accounting name
# Configure the switch to send a username without the domain name to the RADIUS server.
[Switch-radius-radius1] user-name-format without-domain
[Switch-radius-radius1] quit
# Configure the switch to use MAC addresses as usernames for authentication, specifying that the MAC
addresses should be lowercase without separators.
[Switch] mac-authentication authmode usernameasmacaddress usernameformat without-hyphen
1-4
[Switch] port-security enable
# Configure the port to drop packets whose source addresses are the same as that of the packet failing
MAC authentication after intrusion protection is triggered.
[Switch-Ethernet1/0/1] port-security intrusion-mode blockmac
Complete Configuration
#
domain default enable aabbcc.net
#
port-security enable
#
MAC-authentication domain aabbcc.net
#
radius scheme radius1
server-type standard
primary authentication 192.168.1.3
primary accounting 192.168.1.2
secondary authentication 192.168.1.2
secondary accounting 192.168.1.3
key authentication name
key accounting name
user-name-format without-domain
#
domain aabbcc.net
scheme radius-scheme radius1
#
interface Ethernet1/0/1
port-security port-mode mac-authentication
port-security intrusion-mode blockmac
Precautions
z Before enabling port security, be sure to disable 802.1x and MAC authentication globally.
z On a port configured with port security, you cannot configure the maximum number of MAC
addresses that the port can learn, reflector port for port mirroring, fabric port, or link aggregation.
1-5
Network Diagram
Figure 1-3 Network diagram for configuring port security userlogin-withoui mode
The host connects to the switch through the port Ethernet 1/0/1, and the switch authenticates the host
through the RADIUS server. If the authentication is successful, the host is authorized to access the
Internet.
On port Ethernet 1/0/1 of the switch, perform configurations to meet the following requirements:
z Allow one 802.1x user to get online.
z Set two OUI values, and allow only one user whose MAC address matches one of the two OUI
values to get online.
z Configure port security trapping to monitor the operations of the 802.1x-authenticated user.
1-6
Configuration Procedure
z The following configurations involve some AAA/RADIUS configuration commands. For details
about the commands, refer to AAA Operation.
z Configurations on the user host and the RADIUS server are omitted.
# Specify the primary RADIUS authentication server and primary RADIUS accounting server.
[Switch-radius-radius1] primary authentication 192.168.1.3
[Switch-radius-radius1] primary accounting 192.168.1.2
# Specify the secondary RADIUS authentication server and secondary RADIUS accounting server.
[Switch-radius-radius1] secondary authentication 192.168.1.2
[Switch-radius-radius1] secondary accounting 192.168.1.3
# Set the shared key for message exchange between the switch and the RADIUS authentication
servers to name.
[Switch-radius-radius1] key authentication name
# Set the shared key for message exchange between the switch and the accounting RADIUS servers to
name.
[Switch-radius-radius1] key accounting name
# Set the interval and the number of packet transmission attempts for the switch to send packets to the
RADIUS server.
[Switch-radius-radius1] timer 5
[Switch-radius-radius1] retry 5
# Set the timer for the switch to send real-time accounting packets to the RADIUS server to 15 minutes.
[Switch-radius-radius1] timer realtime-accounting 15
# Configure the switch to send a username without the domain name to the RADIUS server.
[Switch-radius-radius1] user-name-format without-domain
[Switch-radius-radius1] quit
# Specify radius1 as the RADIUS scheme of the user domain, and the local authentication scheme as
the backup scheme when the RADIUS server is not available.
[Switch-isp-aabbcc.net] scheme radius-scheme radius1 local
1-7
# Enable the idle disconnecting function and set the related parameters.
[Switch-isp-aabbcc.net] idle-cut enable 20 2000
[Switch-isp-aabbcc.net] quit
Complete Configuration
#
domain default enable aabbcc.net
#
port-security enable
port-security trap dot1xlogon
port-security trap dot1xlogoff
port-security trap dot1xlogfailure
port-security oui 1234-0100-0000 index 1
port-security oui 1234-0200-0000 index 2
#
radius scheme radius1
server-type standard
primary authentication 192.168.1.3
primary accounting 192.168.1.2
secondary authentication 192.168.1.2
secondary accounting 192.168.1.3
key authentication name
key accounting name
timer realtime-accounting 15
1-8
timer response-timeout 5
retry 5
user-name-format without-domain
#
domain aabbcc.net
scheme radius-scheme radius1 local
access-limit enable 30
idle-cut enable 20 2000
#
local-user localuser
password simple localpass
service-type lan-access
#
interface Ethernet1/0/1
port-security port-mode userlogin-withoui
#
Precautions
z Before enabling port security, be sure to disable 802.1x and MAC authentication globally.
z On a port configured with port security, you cannot configure the maximum number of MAC
addresses that the port can learn, reflector port for port mirroring, fabric port, or link aggregation.
Network Diagram
Figure 1-4 Network diagram for configuring port security mac-else-userlogin-secure-ext mode
The host connects to the switch through the port Ethernet 1/0/1, and the switch authenticates the host
through the RADIUS server. After successful authentication, the host is authorized to access the
Internet.
On port Ethernet 1/0/1 of the switch, perform configurations to meet the following requirements:
1-9
z Perform MAC authentication of users and then 802.1x authentication if MAC authentication fails.
z Allow up to 64 802.1x authenticated users to get online. The total number of 802.1x authenticated
users and MAC address authenticated users cannot exceed 200.
z All users belong to the domain aabbcc.net, and each user uses the MAC address of the host as
the username and password for authentication.
z Enable NeedToKnow feature to prevent packets from being sent to unknown destination MAC
addresses.
Configuration Procedure
z The following configurations involve some AAA/RADIUS configuration commands. For details
about the commands, refer to AAA Operation.
z Configurations on the user host and the RADIUS server are omitted.
# Specify the primary RADIUS authentication server and primary RADIUS accounting server.
[Switch-radius-radius1] primary authentication 192.168.1.3
[Switch-radius-radius1] primary accounting 192.168.1.2
# Specify the secondary RADIUS authentication server and secondary RADIUS accounting server.
[Switch-radius-radius1] secondary authentication 192.168.1.2
[Switch-radius-radius1] secondary accounting 192.168.1.3
# Set the shared key for message exchange between the switch and the RADIUS authentication
servers to name.
[Switch-radius-radius1] key authentication name
# Set the shared key for message exchange between the switch and the accounting RADIUS servers to
name.
1-10
[Switch-radius-radius1] key accounting name
# Set the interval and the number of packet transmission attempts for the switch to send packets to the
RADIUS server.
[Switch-radius-radius1] timer 5
[Switch-radius-radius1] retry 5
# Set the timer for the switch to send real-time accounting packets to the RADIUS server to 15 minutes.
[Switch-radius-radius1] timer realtime-accounting 15
# Configure the switch to send a username without the domain name to the RADIUS server.
[Switch-radius-radius1] user-name-format without-domain
[Switch-radius-radius1] quit
# Enable the idle disconnecting function and set the related parameters.
[Switch-isp-aabbcc.net] idle-cut enable 20 2000
[Switch-isp-aabbcc.net] quit
# Configure the switch to use MAC addresses as usernames for authentication, specifying that the MAC
addresses should be lowercase without separators.
[Switch] mac-authentication authmode usernameasmacaddress usernameformat without-hyphen
# Set the maximum number of secure MAC addresses allowed on the port to 200.
[Switch] interface Ethernet 1/0/1
[Switch-Ethernet1/0/1] port-security max-mac-count 200
Complete Configuration
#
domain default enable aabbcc.net
#
1-11
port-security enable
#
MAC-authentication domain aabbcc.net
#
radius scheme radius1
server-type standard
primary authentication 192.168.1.3
primary accounting 192.168.1.2
secondary authentication 192.168.1.2
secondary accounting 192.168.1.3
key authentication name
key accounting name
timer realtime-accounting 15
timer response-timeout 5
retry 5
user-name-format without-domain
#
domain aabbcc.net
scheme radius-scheme radius1
idle-cut enable 20 2000
#
interface Ethernet1/0/1
port-security max-mac-count 200
port-security port-mode mac-else-userlogin-secure-ext
port-security ntk-mode ntkonly
dot1x max-user 64
Precautions
z Before enabling port security, be sure to disable 802.1x and MAC authentication globally.
z On a port configured with port security, you cannot configure the maximum number of MAC
addresses that the port can learn, reflector port for port mirroring, fabric port, or link aggregation.
1-12
Table of Contents
i
1 Port Binding Configuration Guide
Network Diagram
Switch A
Eth1/0/1
Switch B
Host A Host B
10.12.1.1/24
MAC address: 0001-0002-0003
To prevent the IP address of Host A from being used by a malicious user, bind the MAC address and IP
addresses of Host A to Ethernet 1/0/1 on Switch A.
1-1
Configuration Procedure
# Bind the MAC address and the IP address of Host 1 to Ethernet 1/0/1.
[SwitchA-Ethernet1/0/1] am user-bind mac-addr 0001-0002-0003 ip-addr 10.12.1.1
Complete Configuration
#
interface Ethernet1/0/1
am user-bind mac-addr 0001-0002-0003 ip-addr 10.12.1.1
#
1-2
Table of Contents
i
1 MAC Address Table Management Configuration
Guide
Network Diagram
Figure 1-1 Network diagram for MAC address table management configuration
Server is connected to Switch through port Ethernet 1/0/2. Configure a static MAC address containing
the Server MAC address on Switch, so that Switch can unicast rather than broadcast packets destined
for Server through Ethernet 1/0/2. Port Ethernet 1/0/10 is connected with a network management
server (NMS). For network management security, configure Ethernet 1/0/10 to permit the access of this
NMS only.
z The Server MAC address is 000f-e20f-dc71.
z Port Ethernet 1/0/2 belongs to VLAN 10.
z The NMS MAC address is 0014-222c-aa69.
1-1
Product series Software version Hardware version
V03.02.03
Switch 5500 All versions
V03.03.01
V03.01.00
Switch 4210 All versions
V03.01.05
Configuration Procedure
# Set the aging time of dynamic MAC address entries on Switch to 500 seconds.
[Sysname] mac-address timer aging 500
# Disable Ethernet 1/0/10 from learning MAC addresses dynamically, and add a static MAC address
entry. So that port Ethernet 1/0/10 can only send packets destined for the NMS, and other hosts cannot
communicate through this port.
[Sysname] interface Ethernet 1/0/10
[Sysname-Ethernet1/0/10] port access vlan 10
[Sysname-Ethernet1/0/10] mac-address max-mac-count 0
[Sysname-Ethernet1/0/10] mac-address static 0014-222c-aa69 vlan 10
Complete Configuration
#
interface Ethernet1/0/2
port access vlan 10
mac-address static 000f-e20f-dc71 vlan 1
#
interface Ethernet1/0/10
mac-address max-mac-count 0
port access vlan 10
mac-address static 0014-222c-aa69 vlan 10
#
mac-address timer aging 500
1-2
Precautions
z When you add a MAC address entry, the port specified by the interface keyword must belong to
the VLAN specified by the vlan keyword in the command. Otherwise, the entry will not be added.
z If the VLAN specified by the vlan argument is a dynamic VLAN, after a static MAC address is
added, it will become a static VLAN.
1-3
Table of Contents
i
1 DLDP Configuration Guide
Configuring DLDP
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 can be caused by fiber cross-connection or fiber cut (including single-fiber cut and
lack of a fiber connection).
They can cause problems such as spanning tree topology loops.
You can use the Device Link Detection Protocol (DLDP) to monitor the link status of optical fiber cables
and copper twisted pairs such as super category 5 twisted pairs. Once detecting a unidirectional link,
DLDP shuts down the port or ask you to do so depending on your configuration.
Network Diagram
z Switch A and Switch B are connected through two pairs of fibers. The connecting ports are
operating in mandatory full duplex mode at 1000 Mbps. Both of the switches support DLDP.
z Configure DLDP to automatically disconnect the detected unidirectional link.
z After the fibers are connected correctly, the port shut down by DLDP restores automatically.
1-1
Product series Software version Hardware version
V03.02.00
Switch 4500 All versions
V03.03.00
Configuration Procedure
z Configure Switch A
# Configure the ports to work in mandatory full duplex mode at 1000 Mbps.
<SwitchA> system-view
[SwitchA] interface GigabitEthernet 1/1/3
[SwitchA-GigabitEthernet1/1/3] duplex full
[SwitchA-GigabitEthernet1/1/3] speed 1000
[SwitchA-GigabitEthernet1/1/3] quit
[SwitchA] interface GigabitEthernet 1/1/4
[SwitchA-GigabitEthernet1/1/4] duplex full
[SwitchA-GigabitEthernet1/1/4] speed 1000
[SwitchA-GigabitEthernet1/1/4] quit
# Configure DLDP to shut down a port automatically once a unidirectional link is detected on it.
[SwitchA] dldp unidirectional-shutdown auto
z Configure Switch B
The configuration on Switch B is the same as that on Switch A.
Complete Configuration
z Configuration on Switch A
#
dldp interval 15
dldp work-mode enhance
dldp delaydown-timer 5
#
1-2
interface Gigabitethernet 1/1/3
duplex full
speed 1000
dldp enable
#
interface Gigabitethernet 1/1/4
duplex full
speed 1000
dldp enable
z Configuration on Switch B
The configuration on Switch B is the same as that on Switch A.
Precautions
1) When enabling DLDP on two connected devices, make sure that they are using the same software
version. Otherwise, DLDP may malfunction.
2) When optical fibers are cross-connected, two or three ports are in the disable state, and the
remaining ports are in the inactive state.
3) DLDP in the enhanced mode can identify unidirectional links caused by fiber cross-connection or
fiber cut.
4) DLDP in the normal mode can identify only unidirectional links caused by fiber cross-connection.
1-3
Table of Contents
i
1 Auto Detect Configuration Guide
Network Diagram
z Make sure there is a route between Switch A and Switch B, Switch B and Switch C, Switch A and
Switch D, and Switch D and Switch C.
z On Switch A, configure two static routes to Host C with different preferences. The one with higher
preference (smaller value) is used as the master route, and the other as the backup route.
z Normally, Switch A adopts the master route to send data to Host C through Switch B.
z Create detected group 8 on Switch A; detect the reachability of IP address 10.1.1.4/24, with the
next hop being 192.168.1.2, and the detecting number being 1.
z If the detected group 8 is reachable, the master route is valid, and Switch A adopts the master
route to send data to Host C through Switch B.
z If the detected group is unreachable, the master route becomes invalid and the backup route
becomes valid. Switch A adopts the backup route to send data to Host C through Switch D. When
the detected group is reachable again, the master route becomes valid and the backup route
becomes invalid.
z Similarly, configure two static routes to Host A on Switch C. Normally, Switch C sends data to Host
A through Switch B.
z Create detected group 9 on Switch C; detect the reachability of IP address 10.1.1.3, with the next
hop being 192.168.1.1/24, and the detecting number being 1.
1-1
Applicable Product Matrix
Configuration Procedure
Configure IP addresses for the interfaces according to Figure 1-1. The configuration procedure is
omitted here.
z Configure Switch A
# Enter system view.
<SwitchA> system-view
# Detect the reachability of 10.1.1.4, with the next hop being 192.168.1.2, and the detecting number
being 1.
[SwitchA-detect-group-8] detect-list 1 ip address 10.1.1.4 nexthop 192.168.1.2
[SwitchA-detect-group-8] quit
# Configure the master static route, which is valid when the detected group is reachable.
[SwitchA] ip route-static 10.1.3.1 24 192.168.1.2 detect-group 8
# Configure the backup static route, and set its preference to 80. The backup route is valid when the
detected group is unreachable.
[SwitchA] ip route-static 10.1.3.1 24 192.168.3.2 preference 80
z Configure Switch C
# Enter system view.
<SwitchC> system-view
# Detect the reachability of 10.1.1.3, with the next hop being 192.168.1.1/24, and the detecting number
being 1.
[SwitchC-detect-group-9] detect-list 1 ip address 192.168.1.1 nexthop 10.1.1.3
[SwitchC-detect-group-9] quit
1-2
# Configure the master route, which is valid when the detected group is reachable.
[SwitchC] ip route-static 192.168.2.1 24 10.1.1.3 detect-group 9
# Configure the backup static route, and set its preference to 80. The backup route is valid when the
detected group is unreachable.
[SwitchC] ip route-static 192.168.2.1 24 10.1.2.2 preference 80
This configuration procedure only provides the auto-detect related configuration. To ensure the normal
communication between Host A and Host C, corresponding static routes must already exist on Switch B
and Switch D.
Complete Configuration
z Configure Switch A
#
detect-group 8
detect-list 1 ip address 10.1.1.4 nexthop 192.168.1.2
#
ip route-static 10.1.1.0 255.255.255.0 192.168.1.2 preference 60
ip route-static 10.1.3.0 255.255.255.0 192.168.1.2 preference 60 detect-group 8
ip route-static 10.1.3.0 255.255.255.0 192.168.3.2 preference 80
#
z Configure Switch C
#
detect-group 9
detect-list 1 ip address 192.168.1.1 nexthop 10.1.1.3
#
ip route-static 192.168.1.0 255.255.255.0 10.1.1.3 preference 60
ip route-static 192.168.2.0 255.255.255.0 10.1.1.3 preference 60 detect-group 9
ip route-static 192.168.2.0 255.255.255.0 10.1.2.2 preference 80
#
Precautions
In a network environment where the round trip delay of ICMP messages is longer than usual, you need
to extend the timeout waiting for a reply for the group to ensure that your switch can correctly decide
whether the group is reachable.
1-3
z The priority of the master switch decreases and thus becomes a backup when the detected group
is unreachable.
Network Diagram
z Make sure there is a route between Switch A and Switch C, Switch C and Switch E, Switch B and
Switch D, and Switch D and Switch E.
z Create VRRP group 1 containing Switch A and Switch B, and set the virtual IP address of the group
to 10.1.1.10/24.
z Normally, data of Host A is forwarded to Host B through Switch A.
z If the link between Switch C and Switch E fails, Switch B becomes the master of VRRP group 1.
Data of Host A is forwarded to Host B through Switch B.
Configuration Procedure
Configure IP addresses for the interfaces according to Figure 1-2. The configuration procedure is
omitted here.
z Configure Switch A
# Create detected group 9.
<SwitchA> system-view
[SwitchA] detect-group 9
1-4
# Detect the reachability of 10.1.4.2, with the next hop being 10.1.2.2, and the detecting number being
1.
[SwitchA-detect-group-9] detect-list 1 ip address 10.1.4.2 nexthop 10.1.2.2
[SwitchA-detect-group-9] quit
# Enable VRRP on VLAN-interface 2, and set the virtual IP address of the VRRP group to 10.1.1.10.
[SwitchA-Vlan-interface2] vrrp vrid 1 virtual-ip 10.1.1.10
# Set the VRRP priority of Switch A to 110, and specify to decrease the priority by 20 when the result of
detected group 9 is unreachable.
[SwitchA-Vlan-interface2] vrrp vrid 1 priority 110
[SwitchA-Vlan-interface2] vrrp vrid 1 track detect-group 9 reduced 20
z Configure Switch B
# Configure an IP address for VLAN-interface 2.
<SwitchB> system-view
[SwitchB] interface vlan-interface 2
[SwitchB-Vlan-interface2] ip address 10.1.1.2 24
# Enable VRRP on VLAN-interface 2, and set the virtual IP address of the VRRP group to 10.1.1.10.
[SwitchB-Vlan-interface2] vrrp vrid 1 virtual-ip 10.1.1.10
This configuration procedure only provides the auto-detect and VRRP related configuration. To ensure
the operation of auto detect, you must ensure that Switch A and Switch E have at least one reachable
route to each other.
Complete Configuration
z Configure Switch A
#
detect-group 9
detect-list 1 ip address 10.1.4.2 nexthop 10.1.2.2
#
interface Vlan-interface2
ip address 10.1.1.1 255.255.255.0
vrrp vrid 1 virtual-ip 10.1.1.10
vrrp vrid 1 priority 110
vrrp vrid 1 track detect-group 9 reduced 20
z Configure Switch B
#
1-5
interface Vlan-interface2
ip address 10.1.1.2 255.255.255.0
vrrp vrid 1 virtual-ip 10.1.1.10
#
Precautions
In a network environment where the round trip delay of ICMP messages is longer than usual, you need
to extend the timeout waiting for a reply for the group to ensure that your switch can correctly decide
whether the group is reachable.
Network Diagram
Figure 1-3 Network diagram of applying auto detect to VLAN interface backup
z Make sure that there is a route between Switch A and Switch B, Switch B and Switch C, Switch A
and Switch D, and Switch D and Switch C.
z Create detected group 10 on Switch A to detect the connectivity between Switch A and Switch C.
Configure VLAN-interface 1 to be the active interface, which is enabled when the detected group
10 is reachable; Configure VLAN-interface 2 to be the standby interface, which is enabled when
the detected group 10 is unreachable.
1-6
z Create detected group 9 on Switch C to detect the connectivity between Switch C and Switch A.
Configure VLAN-interface 2 to be the active interface, which is enabled when the detected group 9
is reachable; Configure VLAN-interface 1 to be the standby interface, which is enabled when the
detected group 9 is unreachable.
Configuration Procedure
z Configure Switch A
# Enter system view.
<SwitchA> system-view
# Detect the reachability of 10.1.1.4, with the next hop being 192.168.1.2, and the detecting number
being 1.
[SwitchA-detect-group-10] detect-list 1 ip address 10.1.1.4 nexthop 192.168.1.2
[SwitchA-detect-group-10] quit
# Configure VLAN-interface 2 as the standby interface, which is enabled when the detected group 10 is
unreachable.
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] standby detect-group 10
z Configure Switch C
# Enter system view.
<SwitchC> system-view
1-7
[SwitchC] interface vlan-interface 2
[SwitchC-Vlan-interface2] ip address 10.1.1.4 24
[SwitchC-Vlan-interface2] quit
# Detect the reachability of 192.168.1.1/24, with the next hop being 10.1.1.3, and the detecting number
being 1.
[SwitchC-detect-group-9] detect-list 1 ip address 192.168.1.1 nexthop 10.1.1.3
[SwitchC-detect-group-9] quit
# Configure VLAN-interface 1 as the standby interface, which is enabled when the detected group 9 is
unreachable.
[SwitchC] interface vlan-interface 1
[SwitchC-Vlan-interface1] standby detect-group 9
This configuration procedure only provides the auto-detect related configuration. To use auto detect
function properly, a Switch A-to-Switch B-to-Switch C route must already exist on Switch A, and a
Switch C-to-Switch B-to-Switch A route must already exist on Switch C.
Complete Configuration
z Configure Switch A
#
detect-group 10
detect-list 1 ip address 10.1.1.4 nexthop 192.168.1.2
#
vlan 1
#
vlan 2
#
interface Vlan-interface1
ip address 192.168.1.1 255.255.255.0
#
interface Vlan-interface2
standby detect-group 10
ip address 192.168.3.1 255.255.255.0
z Configure Switch C
#
detect-group 9
1-8
detect-list 1 ip address 192.168.1.1 nexthop 10.1.1.3
#
vlan 1
#
vlan 2
#
interface Vlan-interface1
standby detect-group 9
ip address 10.1.2.1 255.255.255.0
#
interface Vlan-interface2
ip address 10.1.1.4 255.255.255.0
#
Precautions
In a network environment where the round trip delay of ICMP messages is longer than usual, you need
to extend the timeout waiting for a reply for the group to ensure that your switch can correctly decide
whether the group is reachable.
1-9
Table of Contents
i
1 MSTP Configuring Guide
Configuring MSTP
The Ethernet switches listed in Applicable Product Matrix support the Multiple Spanning Tree Protocol
(MSTP), which allows you to map one or multiple VLANs to a multiple spanning tree instance (MSTI).
Note that one VLAN can be mapped to only one MSTI. With MSTP, the packets of a specific VLAN are
transmitted in the MSTI to which the VLAN is mapped, thus saving overhead and reducing resource
utilization.
Network Diagram
VLAN MSTI
VLAN 10 MSTI 1
VLAN 20 MSTI 0
VLAN 30 MSTI 3
VLAN 40 MSTI 4
Configure MSTP in the network shown in Figure 1-1 to enable packets of different VLANs to travel along
different MSTIs. Do the following:
z Assign all switches in the network to the same MST region.
z Enable packets of VLAN 10, VLAN 30, VLAN 40, and VLAN 20 to travel along MSTI 1, MSTI 3,
MSTI 4, and MSTI 0 respectively.
In this network, Switch A and Switch B are operating at the distribution layer; Switch C and Switch D are
operating at the access layer. VLAN 10 and VLAN 30 are terminated at the distribution layer and VLAN
40 is terminated at the access layer. Configure Switch A as the root bridge of MSTI 1, Switch B as the
root bridge of MSTI 3, and Switch C as the root bridge of MSTI 4.
1-1
Applicable Product Matrix
Configuration Procedure
1) Configuration on Switch A
# Enter MST region view.
<SwitchA> system-view
[SwitchA] stp region-configuration
# Configure the region name, VLAN-to-MSTI mapping, and revision level of the MST region.
[SwitchA-mst-region] region-name example
[SwitchA-mst-region] instance 1 vlan 10
[SwitchA-mst-region] instance 3 vlan 30
[SwitchA-mst-region] instance 4 vlan 40
[SwitchA-mst-region] revision-level 0
2) Configuration on Switch B
# Enter MST region view.
<SwitchB> system-view
[SwitchB] stp region-configuration
# Configure the region name, VLAN-to-MSTI mapping, and revision level of the MST region.
[SwitchB-mst-region] region-name example
[SwitchB-mst-region] instance 1 vlan 10
[SwitchB-mst-region] instance 3 vlan 30
[SwitchB-mst-region] instance 4 vlan 40
[SwitchB-mst-region] revision-level 0
1-2
[SwitchB-mst-region] quit
3) Configuration on Switch C
# Configure the MST region.
<SwitchC> system-view
[SwitchC] stp region-configuration
[SwitchC-mst-region] region-name example
[SwitchC-mst-region] instance 1 vlan 10
[SwitchC-mst-region] instance 3 vlan 30
[SwitchC-mst-region] instance 4 vlan 40
[SwitchC-mst-region] revision-level 0
Complete Configuration
z Configuration on Switch A
#
stp instance 1 root primary
stp region-configuration
region-name example
instance 1 vlan 10
instance 3 vlan 30
instance 4 vlan 40
active region-configuration
#
z Configuration on Switch B
#
1-3
stp instance 3 root primary
stp region-configuration
region-name example
instance 1 vlan 10
instance 3 vlan 30
instance 4 vlan 40
active region-configuration
#
z Configuration on Switch C
#
stp instance 4 root primary
stp region-configuration
region-name example
instance 1 vlan 10
instance 3 vlan 30
instance 4 vlan 40
active region-configuration
#
z Configuration on Switch D
#
stp region-configuration
instance 1 vlan 10
instance 3 vlan 30
instance 4 vlan 40
active region-configuration
#
Precautions
None
1-4
Network Diagram
z Use Switch C and Switch D as access devices of the service provider network.
z Use Switch A and Switch B as access devices of the customer networks.
z Connect Switch C and Switch D through trunk ports. Enable VLAN-VPN tunneling in system view
to achieve transparent STP BPDU transmission between the customer networks over the service
provider network.
Configuration Procedure
1) Configuration on Switch A
# Enable MSTP.
<SwitchA> system-view
[SwitchA] stp enable
2) Configuration on Switch B
# Enable MSTP.
<SwitchB> system-view
[SwitchB] stp enable
1-5
[SwitchB] vlan 10
[SwitchB-vlan10] port Ethernet1/0/1
3) Configuration on Switch C
# Enable MSTP.
<SwitchC> system-view
[SwitchC] stp enable
# Configure Ethernet 1/0/2 as a trunk port, and assign the port to VLAN 10.
[SwitchC] interface Ethernet1/0/2
[SwitchC-Ethernet1/0/2] port link-type trunk
[SwitchC-Ethernet1/0/2] port trunk permit vlan 10
4) Configuration on Switch D
# Enable MSTP.
<SwitchD> system-view
[SwitchD] stp enable
# Configure Ethernet 1/0/1 as a trunk port, and assign the port to VLAN 10.
[SwitchD] interface Ethernet1/0/1
[SwitchD-Ethernet1/0/1] port link-type trunk
[SwitchD-Ethernet1/0/1] port trunk permit vlan 10
Complete Configuration
1) Configuration on Switch A
#
1-6
stp enable
#
interface Ethernet1/0/1
port access vlan 10
#
2) Configuration on Switch B
#
stp enable
#
interface Ethernet1/0/1
port access vlan 10
#
3) Configuration on Switch C
#
stp enable
#
vlan-vpn tunnel
#
interface Ethernet1/0/1
stp disable
port access vlan 10
vlan-vpn enable
#
interface Ethernet1/0/2
port link-type trunk
port trunk permit vlan 1 10
#
4) Configuration on Switch D
#
stp enable
#
vlan-vpn tunnel
#
interface Ethernet1/0/2
stp disable
port access vlan 10
vlan-vpn enable
#
interface Ethernet1/0/1
port link-type trunk
port trunk permit vlan 1 10
#
Precautions
The bpdu-tunnel stp command is mutually exclusive with the vlan-vpn tunnel command.
1-7
Configuring RSTP
The switches listed inApplicable Product Matrix work in MSTP mode by default. To implement RSTP,
configure the stp mode command on them to have them work in RSTP mode.
Network Diagram
1-8
Applicable Product Matrix
Configuration Procedure
1) Configuration on Switch A
# Configure Switch A to work in RSTP-compatible mode.
<SwitchA> system-view
[SwitchA] stp mode rstp
# Configure Switch A as the root bridge in one of the following two methods:
z Set the bridge priority of Switch A to 0.
[SwitchA] stp priority 0
# Enable the root guard function on the designated ports connected to Switch B and Switch C.
[SwitchA] interface GigabitEthernet 2/0/1
[SwitchA -GigabitEthernet2/0/1] stp root-protection
[SwitchA -GigabitEthernet2/0/1] quit
[SwitchA] interface GigabitEthernet 2/0/2
[SwitchA -GigabitEthernet2/0/2] stp root-protection
[SwitchA -GigabitEthernet2/0/2] quit
# Disable RSTP on all ports that do not participate in RSTP calculation, GigabitEthernet 2/0/4 for
example. (You need to do this because enabling RSTP on a switch enables RSTP on all ports by
default.)
[SwitchA] interface GigabitEthernet 2/0/4
[SwitchA-GigabitEthernet2/0/4] stp disable
2) Configuration on Switch B
# Configure Switch B to work in RSTP-compatible mode.
1-9
<SwitchB> system-view
[SwitchB] stp mode rstp
# Configure Switch C and Switch B to back up each other, and set the bridge priority of Switch B to
4096.
[SwitchB] stp priority 4096
# Disable RSTP on all ports that do not participate in RSTP calculation, Ethernet 1/0/8 for example.
[SwitchB] interface Ethernet 1/0/8
[SwitchB-Ethernet1/0/8] stp disable
# Configure Switch C and Switch B to back up each other, and set the bridge priority of Switch C to
8192.
[SwitchC] stp priority 8192
# Disable RSTP on all ports that do not participate in RSTP calculation, Ethernet 1/0/8 for example.
[SwitchC] interface Ethernet 1/0/8
1-10
[SwitchC-Ethernet1/0/8] stp disable
# Configure the ports directly connected to users as edge ports and enable the BPDU guard function on
these ports. Take Ethernet 1/0/3 for example.
[SwitchD-Ethernet1/0/3] stp edged-port enable
[SwitchD-Ethernet1/0/3] quit
[SwitchD] stp bpdu-protection
# Disable RSTP on all ports that do not participate in RSTP calculation, Ethernet 1/0/3 for example.
[SwitchD] interface Ethernet 1/0/3
[SwitchD-Ethernet1/0/3] stp disable
Complete Configuration
1) Configuration on Switch A
#
stp mode rstp
stp instance 0 priority 0
(stp instance 0 root primary)
stp TC-protection enable
stp enable
#
interface GigabitEthernet2/0/1
stp root-protection
#
interface GigabitEthernet2/0/2
stp root-protection
#
interface GigabitEthernet2/0/4
stp disable
#
2) Configuration on Switch B
#
stp mode rstp
stp instance 0 priority 4096
stp enable
#
interface Ethernet1/0/4
1-11
stp root-protection
#
interface Ethernet1/0/5
stp root-protection
#
interface Ethernet1/0/6
stp root-protection
#
interface Ethernet1/0/8
stp disable
#
3) Configuration on Switch C
#
stp mode rstp
stp instance 0 priority 8192
stp enable
#
interface Ethernet1/0/1
stp root-protection
#
interface Ethernet1/0/2
stp root-protection
#
interface Ethernet1/0/3
stp root-protection
#
interface Ethernet1/0/8
stp disable
#
4) Configuration on Switch D
#
stp mode rstp
stp enable
#
interface Ethernet1/0/3
stp disable
interface Ethernet3/0/5
stp edged-port enable
stp bpdu-protection
#
Precautions
None
1-12
Configuring Digest Snooping and Rapid Transition
Digest Snooping
The 3Com switches listed in Applicable Product Matrix support MSTP. On a network comprising
devices of multiple vendors, 3Com switches cannot interoperate with switches that run proprietary
spanning tree protocols in the same MSTP region, even if they are configured with the same MST
region-related settings.
To address the problem, you can enable digest snooping on the ports connected to switches running
proprietary spanning tree protocols.
Rapid Transition
The proprietary spanning tree protocols of some vendors provide port state transition mechanisms
similar to RSTP. For a switch running such a proprietary protocol, its rapid port state transition
mechanism may fail on the designation port when the switch is downlinked to an MSTP-enabled 3Com
switch.
To address the problem, you can enable the rapid transition feature on the downstream 3Com switch.
Network Diagram
Figure 1-4 Network diagram for digest snooping and rapid transition configuration
z Use another vendor’s switch, Switch A in this scenario, as the root switch.
z Switch B and Switch C are connected to Switch A.
For Switch B:
z Set the priority of Switch B to 4096.
z Enable rapid transition and digest snooping on Switch B.
For Switch C:
z Set the priority of Switch C to 8192.
z Enable rapid transition and digest snooping on Switch C.
1-13
Applicable Product Matrix
Configuration Procedure
1) Configuration on Switch B
# Enable MSTP.
<SwitchB> system-view
[SwitchB] stp enable
2) Configuration on Switch C
# Enable MSTP.
<SwitchC> system-view
[SwitchC] stp enable
1-14
# Enable rapid transition on Ethernet 1/0/1.
[SwitchC] interface Ethernet 1/0/1
[SwitchC-Ethernet1/0/1] stp no-agreement-check
[SwitchC-Ethernet1/0/1] quit
Complete Configuration
1) Configuration on Switch B
#
stp enable
stp instance 0 priority 4096
stp config-digest-snooping
#
interface Ethernet1/0/1
stp config-digest-snooping
stp no-agreement-check
#
2) Configuration on Switch C
#
stp enable
stp instance 0 priority 8192
stp config-digest-snooping
#
interface Ethernet1/0/1
stp no-agreement-check
#
interface Ethernet1/0/2
stp config-digest-snooping
Precautions
z The digest snooping feature is needed only when your switch is connected to another
manufacturer’s switches adopting proprietary spanning tree protocols.
z To enable the digest snooping feature successfully, you must first enable it on all the ports of your
switch that are connected to another manufacturer’s switches adopting proprietary spanning tree
protocols and then enable it globally.
z To enable the digest snooping feature, the interconnected switches and another manufacturer’s
switch adopting proprietary spanning tree protocols must be configured with exactly the same MST
region-related configurations (including region name, revision level, and VLAN-to-MSTI mapping).
z The digest snooping feature must be enabled on all the switch ports that connect to another
manufacturer’s switches adopting proprietary spanning tree protocols in the same MST region.
z The digest snooping feature is not applicable to boundary ports in an MST region.
z The digest snooping feature is not applicable to edge ports in an MST region.
z The rapid transition feature can be enabled only on root ports or alternate ports.
z You can enable rapid transition on a designated port, but the configuration cannot take effect on
the port.
1-15
Table of Contents
i
Configuring OSPF Route Summarization ·····························································································1-27
Network Diagram···························································································································1-28
Networking and Configuration Requirements················································································1-28
Applicable Product Matrix··············································································································1-28
Configuration Procedure················································································································1-28
Complete Configuration·················································································································1-31
Precautions····································································································································1-37
Configuring OSPF Virtual Link ··············································································································1-37
Network Diagram···························································································································1-38
Networking and Configuration Requirements················································································1-38
Applicable Product Matrix··············································································································1-38
Configuration Procedure················································································································1-38
Complete Configuration·················································································································1-39
Precautions····································································································································1-40
Configuring BGP Confederation Attribute ·····························································································1-40
Network Diagram···························································································································1-41
Networking and Configuration Requirements················································································1-41
Applicable Product Matrix··············································································································1-41
Configuration Procedure················································································································1-41
Complete Configuration·················································································································1-42
Precautions····································································································································1-43
Configuring BGP RR ·····························································································································1-43
Network Diagram···························································································································1-44
Networking and Configuration Requirements················································································1-44
Applicable Product Matrix··············································································································1-44
Configuration Procedure················································································································1-44
Complete Configuration·················································································································1-46
Precautions····································································································································1-47
Configuring BGP Path Selection···········································································································1-48
Network Diagram···························································································································1-48
Networking and Configuration Requirements················································································1-48
Applicable Product Matrix··············································································································1-48
Configuration Procedure················································································································1-48
Complete Configuration·················································································································1-52
Precautions····································································································································1-54
Configuring Routing Policies·················································································································1-54
Network Diagram···························································································································1-55
Networking and Configuration Requirements················································································1-55
Applicable Product Matrix··············································································································1-55
Configuration Procedure················································································································1-55
Complete Configuration·················································································································1-58
Precautions····································································································································1-59
ii
1 Routing Configuration Guide
Network Diagram
1.1.5.2/24
1.1.5.1/24
1.1.2.2/24 1.1.3.1/24
Switch C
1.1.2.1/24 1.1.3.2/24
1.1.1.1/24 1.1.4.1/24
Switch A Switch B
1.1.1.2/24 1.1.4.2/24
Host C Host B
A small company has a simple and stable office network. The company’s existing devices that do not
support dynamic routing protocols. The company requires that any two nodes on the network can
communicate with each other and that the existing devices can be fully utilized.
In this case, static routes can enable communication between any two nodes on the network.
1-1
Product series Software version Hardware version
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
V03.01.00
Switch 4210 All versions
V03.01.05
Configuration Procedure
# Configure the default gateway of Host A as 1.1.5.1. Detailed configuration procedure is omitted.
# Configure the default gateway of Host B as 1.1.4.1. Detailed configuration procedure is omitted.
# Configure the default gateway of Host C as 1.1.1.1. Detailed configuration procedure is omitted.
Complete Configuration
1-2
ip route-static 1.1.1.0 255.255.255.0 1.1.2.1 preference 60
ip route-static 1.1.4.0 255.255.255.0 1.1.3.2 preference 60
Precautions
Configuring RIP
RIP is a Distance-Vector (D-V) routing protocol. It advertises routing information in User Datagram
Protocol (UDP) datagrams.
RIP uses a hop count, or a routing cost, as the metric to a destination. The hop count from a router to a
directly connected network is 0, and that to a network which can be reached through another router is 1,
and so on. To restrict the convergence time, RIP prescribes that a cost is an integer ranging from 0 and
15. A hop count equal to or exceeding 16 is defined as infinite; that is, the destination network or the
host is unreachable. To improve performance and avoid routing loops, RIP supports split horizon.
Besides, RIP can redistribute routes from other routing protocols.
Network Diagram
1-3
Networking and Configuration Requirements
A small company requires a small office network where any two nodes can communicate with each
other, and the network devices can automatically adapt to topology changes.
In this case, RIPv2 can enable communication between any two nodes on the network.
Configuration Procedure
z Configure Switch A.
# Configure RIP.
<SwitchA> system-view
[SwitchA] interface Vlan-interface 1
[SwitchA-Vlan-interface1] ip address 110.11.2.1 24
[SwitchA-Vlan-interface1] rip version 2
[SwitchA-Vlan-interface1] quit
[SwitchA] interface Vlan-interface 2
[SwitchA-Vlan-interface2] ip address 155.10.1.1 24
[SwitchA-Vlan-interface2] rip version 2
[SwitchA-Vlan-interface2] quit
[SwitchA] rip
[SwitchA-rip] undo summary
[SwitchA-rip] network 110.11.2.0
[SwitchA-rip] network 155.10.1.0
z Configure Switch B.
# Configure RIP.
<SwitchB> system-view
[SwitchB] interface Vlan-interface 1
[SwitchB-Vlan-interface1] ip address 110.11.2.2 24
[SwitchB-Vlan-interface1] rip version 2
[SwitchB-Vlan-interface1] quit
[SwitchB] interface Vlan-interface 3
[SwitchB-Vlan-interface3] ip address 196.38.165.1 24
[SwitchB-Vlan-interface3] rip version 2
[SwitchB-Vlan-interface3] quit
[SwitchB] rip
1-4
[SwitchB-rip] undo summary
[SwitchB-rip] network 196.38.165.0
[SwitchB-rip] network 110.11.2.0
z Configure Switch C.
# Configure RIP.
<SwitchC> system-view
[SwitchC] interface Vlan-interface 1
[SwitchC-Vlan-interface1] ip address 110.11.2.3 24
[SwitchC-Vlan-interface1] rip version 2
[SwitchC-Vlan-interface1] quit
[SwitchC] interface Vlan-interface 4
[SwitchC-Vlan-interface4] ip address 117.102.0.1 16
[SwitchC-Vlan-interface4] rip version 2
[SwitchC-Vlan-interface4] quit
[SwitchC] rip
[SwitchC-rip] undo summary
[SwitchC-rip] network 117.102.0.0
[SwitchC-rip] network 110.11.2.0
Complete Configuration
1-5
ip address 110.11.2.2 255.255.255.0
rip version 2 multicast
#
interface Vlan-interface3
ip address 196.38.165.1 255.255.255.0
rip version 2 multicast
#
rip
undo summary
network 196.38.165.0
network 110.0.0.0
Precautions
z RIPv2 supports automatic route summarization (with the summary command). This function is
enabled by default.
z To use RIP updates to advertise subnet routes, disable RIPv2 route automatic summarization.
z Based on your needs, you can configure the switch to receive or send RIP packets with the rip
input command or the rip output command.
z RIPv2 can transmit packets in two modes: broadcast and multicast. By default, RIPv2 transmits
packets in the multicast mode.
Configuring OSPF
Open Shortest Path First (OSPF) is a link state interior gateway protocol developed by the IETF. At
present, OSPF version 2 (RFC 2328) is used. OSPF has the following features:
z Wide-spread application
z Fast convergence
z Loop-free
z Multicast transmission
1-6
z Area partition
z Routing hierarchy
z Authentication
Network Diagram
Vlan-int200 Vlan-int200
Vlan-int300
Switch C Switch D
Area 1
In Figure 1-3, Switch A, Switch B, Switch C, and Switch D run OSPF to forward packets. For network
security, disable the downlink VLAN interfaces on Switch C and Switch D from sending OSPF packets.
Configuration Procedure
z Configure Switch A.
1-7
# Create VLANs and configure IP addresses for VLAN interfaces. The configuration procedure is
omitted.
# Configure OSPF.
<SwitchA> system-view
[SwitchA] ospf 1 router-id 1.1.1.1
[SwitchA-ospf-1] area 0
[SwitchA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] network 10.1.2.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] quit
[SwitchA-ospf-1] quit
Complete Configuration
1-8
#
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.1.2.0 0.0.0.255
#
z Perform the following configuration on Switch B.
#
vlan 100
#
vlan 200
#
interface Vlan-interface100
ip address 10.1.1.2 255.255.255.0
#
interface Vlan-interface200
ip address 10.1.3.1 255.255.255.0
#
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.1.3.0 0.0.0.255
#
1-9
ospf 1
silent-interface Vlan-interface10
silent-interface Vlan-interface20
area 0.0.0.1
network 192.168.1.0 0.0.0.255
network 192.168.2.0 0.0.0.255
#
area 0.0.0.0
network 10.1.2.0 0.0.0.255
network 10.1.4.0 0.0.0.255
#
1-10
Precautions
z Before configuring OSPF basic functions, configure a router ID for each OSPF process to ensure
OSPF runs normally. You are recommended to use the ospf command to configure router IDs for
the processes, especially on a device running multiple processes.
z To prevent route leaking and enhance network security, use the silent-interface command on the
interfaces not running OSPF to disable them from sending OSPF packets.
Network Diagram
Use OSPF to enable communication between devices in a broadcast network. Devices with higher
performance should become the DR and BDR to improve network performance. Disable the devices
with lower performance from taking part in the DR/BDR election.
1-11
Based on the customer requirements and networking environment, assign proper priorities to
interfaces.
Configuration Procedure
z Configure Switch A.
# Assign a router ID to Switch A.
<SwitchA> system-view
[SwitchA] router id 1.1.1.1
# Enable OSPF and specify the VLAN interface to belong to OSPF area 0.
[SwitchA] ospf
[SwitchA-ospf-1] area 0
[SwitchA-ospf-1-area-0.0.0.0] network 196.1.1.0 0.0.0.255
z Configure Switch B.
# Assign a router ID to Switch B.
<SwitchB> system-view
[SwitchB] router id 2.2.2.2
# Configure the IP address of the VLAN interface attached to area 0 and assign DR priority 0 to the
interface, so Switch B will not participate in DR/BDR election. Enable OSPF and specify the VLAN
interface to belong to area 0.
[SwitchB] interface Vlan-interface 1
[SwitchB-Vlan-interface1] ip address 196.1.1.2 255.255.255.0
[SwitchB-Vlan-interface1] ospf dr-priority 0
[SwitchB-Vlan-interface1] quit
[SwitchB] ospf
[SwitchB-ospf-1] area 0
[SwitchB-ospf-1-area-0.0.0.0] network 196.1.1.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.0] quit
[SwitchB-ospf-1] quit
1-12
z Configure Switch C.
# Assign a router ID to Switch C.
<SwitchC> system-view
[SwitchC] router id 3.3.3.3
z Configure Switch D.
# Assign a router ID to Switch D.
<SwitchD> system-view
[SwitchD] router id 4.4.4.4
Complete Configuration
1-13
router id 2.2.2.2
#
vlan 1
#
interface Vlan-interface 1
ip address 196.1.1.2 255.255.255.0
ospf dr-priority 0
#
ospf 1
area 0.0.0.0
network 196.1.1.0 0.0.0.255
Precautions
z The DR election is performed only on broadcast and NBMA interfaces rather than P2P or P2MP
interfaces.
z A DR is an interface of a router and belongs to a single network segment. A router’s interface may
be a DR, while another interface of the router may be a BDR or DRother.
z The DR priority of a router interface affects the DR and BDR election. However, it does not effect
the election immediately after the DR and BDR election ends. A new DR priority assigned to a
router interface takes effect at the time of next DR and BDR election.
z A DR may not be a router interface with the highest priority in a network, and a BDR may not be a
router interface with the second highest priority.
1-14
Configuring a (Totally) Stub Area
When a large number of OSPF routers are present on a network, the LSDB of routers may become so
large that a great amount of storage space is occupied and CPU resources are exhausted when
performing the SPF computation.
In addition, as the topology of a large network is prone to changes, enormous OSPF packets may be
created, reducing bandwidth utilization. Each topology change makes all the routers perform a route
recalculation.
To address this issue, OSPF divides an AS into multiple areas.
Backbone area
The area ID of the backbone area is 0. The backbone area is responsible for distributing routing
information between none-backbone areas. Routing information of non-backbone areas must be
forwarded by the backbone area.
The ABR in a stub area does not distribute Type-5 LSAs into the area, so the routing table size in this
area is reduced significantly.
To further reduce the routing table size in a stub area, you can configure the stub area as a totally stub
area, where the ABR advertises neither the addresses of other areas nor the external routes.
NSSA area
Similar to a stub area, a Not So Stubby Area (NSSA) area imports no Type-5 LSAs but can import
Type-7 LSAs that are generated by the ASBR and distributed throughout the NSSA area. After reaching
the NSSA ABR, Type-7 LSAs are translated into Type-5 LSAs by the ABR for advertisement to other
areas.
Network Diagram
Run OSPF on the network devices. Configure a (totally) stub area to reduce the routing table size.
1-15
Applicable Product Matrix
Configuration Procedure
z Configure Switch A.
# Create VLANs and configure IP addresses for the VLAN interfaces. The configuration procedure is
omitted.
# Configure OSPF for area 1.
<SwitchA> system-view
[SwitchA] ospf 1 router-id 1.1.1.1
[SwitchA-ospf-1] area 1
[SwitchA-ospf-1-area-0.0.0.1] network 10.2.1.0 0.0.0.255
1-16
[SwitchD-ospf-1-area-0.0.0.2] network 10.5.1.0 0.0.0.255
[SwitchD-ospf-1-area-0.0.0.2] quit
z The above-mentioned steps configure non-backbone areas, backbone area, and ABRs/ASBRs.
z By using the display ospf lsdb command on Switch C, you can see that Type-3 LSAs, Type-4
LSAs, and Type-5 LSAs exist in the link state database (LSDB). You can control the generation of
Type-4 LSAs and Type-5 LSAs by configuring the stub attribute.
Based on the configuration in Non-backbone area and backbone area configuration (area 1 is a
non-backbone area), perform the following steps:
# Configure area 1 as a stub area.
[SwitchA-ospf-1-area-0.0.0.1] stub
[SwitchC-ospf-1-area-0.0.0.1] stub
z Use the display ospf lsdb command on Switch C to display the LSDB. You can see that no
Type-4 LSAs or Type-5 LSAs exist in the LSDB. But a default Type-3 LSA is added.
Based on the configuration in Non-backbone area and backbone area configuration (area 1 is a
non-backbone area), perform the following steps:
# Configure area 1 as a totally stub area.
[SwitchA-ospf-1-area-0.0.0.1] stub no-summary
[SwitchC-ospf-1-area-0.0.0.1] stub
z To configure a stub area as a totally stub area, use the stub no-summary command on the ABR of
the stub area.
z Use the display ospf lsdb command on Switch C to display the LSDB. You can see that no
Type-3 LSAs, Type-4 LSAs, or Type-5 LSAs exist in the LSDB. But a Type-3 default LSA is added.
1-17
Complete Configuration
1-18
interface Vlan-interface200
ip address 10.2.1.2 255.255.255.0
#
interface Vlan-interface300
ip address 10.4.1.1 255.255.255.0
#
ospf 1 router-id 3.3.3.3
area 0.0.0.1
network 10.2.1.0 0.0.0.255
network 10.4.1.0 0.0.0.255
#
1-19
network 10.2.1.0 0.0.0.255
stub
#
area 0.0.0.0
network 10.1.1.0 0.0.0.255
#
z Perform the following configuration on Switch B.
Refer to the configuration of Switch B when area 1 is a non-backbone area.
z Perform the following configuration on Switch C.
#
vlan 200
#
vlan 300
#
interface Vlan-interface200
ip address 10.2.1.2 255.255.255.0
#
interface Vlan-interface300
ip address 10.4.1.1 255.255.255.0
#
ospf 1 router-id 3.3.3.3
area 0.0.0.1
network 10.2.1.0 0.0.0.255
network 10.4.1.0 0.0.0.255
stub
#
1-20
area 0.0.0.0
network 10.1.1.0 0.0.0.255
#
Precautions
z To configure a stub area as a totally stub area, use the stub no-summary command on the ABR of
the stub area.
z When you configure an area as a (totally) stub area, the ABR of the (totally) stub area will
automatically generate a Type-3 default LSA into the area.
Network Diagram
Area 1 Vlan-int200
Vlan-int200 Area 2
NSSA 10.2.1.2/24 10.3.1.2/24
ASBR ASBR
Vlan-int300
Vlan-int300 10.5.1.1/24 Switch D
Switch C 10.4.1.1/24
Run OSPF on the network devices. Based on actual conditions, you can configure an (totally) NSSA
area to reduce the routing table size in the area.
1-21
Configuration Procedure
z Configure Switch A.
# Create VLANs and configure IP addresses for the VLAN interfaces. The configuration procedure is
omitted.
# Configure OSPF for area 1.
<SwitchA> system-view
[SwitchA] ospf 1 router-id 1.1.1.1
[SwitchA-ospf-1] area 1
[SwitchA-ospf-1-area-0.0.0.1] network 10.2.1.0 0.0.0.255
z Configure Switch D.
# Create VLANs and configure IP addresses of the VLAN interfaces. The configuration procedure is
omitted.
# Configure a static route of 1.0.0.0/8.
<SwitchD> system-view
[SwitchD] ip route-static 1.0.0.0 8 10.5.1.2
1-22
[SwitchD-ospf-1-area-0.0.0.2] quit
z The above-mentioned steps configure non-backbone areas, backbone area, and ABRs/ASBRs.
z By using the display ospf lsdb command on Switch C, you can see that Type-3 LSAs, Type-4
LSAs, and Type-5 LSAs exist in the link state database (LSDB).
After this configuration, packets destined for an IP address (in another AS) advertised by the ASBR of
the NSSA area will be forwarded by the ASBR, while packets destined for an IP address (in another AS)
not advertised by the ASBR will be dropped.
Based on the configuration in Non-backbone area and backbone area configuration (area 1 is a
non-backbone area), perform the following steps:
# Configure area 1 as an NSSA area.
[SwitchA-ospf-1-area-0.0.0.1] nssa
[SwitchC-ospf-1-area-0.0.0.1] nssa
After this configuration, packets from the NSSA area to other ASs are forwarded by the ASBR of the
NSSA area.
Based on the configuration in Non-backbone area and backbone area configuration (area 1 is a
non-backbone area), perform the following steps:
# Configure a default route.
1-23
[SwitchC] ip route-static 0.0.0.0 0.0.0.0 10.4.1.2
# Configure Area 1 as an NSSA area. Switch C will forward all the packets to other ASs.
[SwitchA-ospf-1-area-0.0.0.1] nssa
[SwitchC-ospf-1-area-0.0.0.1] nssa default-route-advertise
After this configuration, packets destined for an IP address (in another AS) advertised by the ASBR of
the NSSA area will be forwarded by the ASBR, while packets destined for an IP address (in another AS)
not advertised by the ASBR will be forward by the ABR of the area to the ASBR of another area for
further forwarding.
Based on the configuration in Non-backbone area and backbone area configuration (area 1 is a
non-backbone area), perform the following steps:
# Configure area 1 as an NSSA area.
[SwitchA-ospf-1-area-0.0.0.1] nssa default-route-advertise
[SwitchC-ospf-1-area-0.0.0.1] nssa
Based on the configuration in Non-backbone area and backbone area configuration (area 1 is a
non-backbone area), perform the following steps:
# Configure area 1 as a totally NSSA area.
[SwitchA-ospf-1-area-0.0.0.1] nssa no-summary
[SwitchC-ospf-1-area-0.0.0.1] nssa
1-24
z The steps above configure a totally NSSA area.
z Use the display ospf lsdb command on Switch C to display the LSDB. You can see that no
Type-3 LSAs, Type-4 LSAs, or Type-5 LSAs exist in the LSDB. But Type-7 LSAs and a default
Type-3 LSA are added.
Complete Configuration
In the following example, the ASBR of the NSSA area will forward all the packets destined for other ASs.
For the configurations in other cases, refer to Configuration Procedure.
1-25
ip address 10.3.1.1 255.255.255.0
#
ospf 1 router-id 2.2.2.2
area 0.0.0.2
network 10.3.1.0 0.0.0.255
#
area 0.0.0.0
network 10.1.1.0 0.0.0.255
#
1-26
network 10.5.1.0 0.0.0.255
#
ip route-static 1.0.0.0 255.0.0.0 10.5.1.2 preference 60
#
Precautions
z To configure an NSSA area as a totally NSSA area, use the nssa no-summary command on the
ABR of the NSSA area.
z After you configure an area as a totally NSSA area, the ABR of the totally NSSA area will
automatically generate a Type-3 default LSA into the totally NSSA area.
z For the ASBR of an NSSA area to generate a default Type-7 LSA, the default route with the
destination address 0.0.0.0/0 must exist in the routing table and you need to execute the nssa
default-route-advertise command.
z For the ABR of an NSSA area to generate a default Type-7 LSA, you only need to execute the
nssa default-route-advertise command on it.
1-27
If summarization for redistributed routes is configured on an ASBR, it will summarize redistributed
Type-5 LSAs that fall into the specified address range. If in an NSSA area, it also summarizes Type-7
LSAs that fall into the specified address range.
If this feature is configured on the ABR of the NSSA area, the ABR will summarize Type-5 LSAs
translated from Type-7 LSAs.
Network Diagram
Area 1 Vlan-int200
Vlan-int200 Area 2
NSSA 20.1.1.2/24 30.1.1.2/24
ASBR ASBR
Vlan-int300
Vlan-int300 30.1.2.1/24 Switch D
Switch C 20.1.2.1/24
Network devices run OSPF to forward packets. Configure ABR and ASBR route summarization to
reduce the routing information across areas and the size of routing tables on routers. Based on the
actual needs, you can filter out specified routes through route summarization.
Configuration Procedure
z Configure Switch A.
# Create VLANs and configure IP addresses for the VLAN interfaces. The configuration procedure is
omitted.
# Configure OSPF basic functions. The configuration procedure is omitted.
# Configure the NSSA attribute of Switch A.
<SwitchA> system-view
[SwitchA] ospf 1
[SwitchA-ospf-1] area 1
1-28
[SwitchA-ospf-1-area-0.0.0.1] nssa
[SwitchA-ospf-1-area-0.0.0.1] quit
z Configure Switch C.
# Create VLANs and configure IP addresses for the VLAN interfaces. The configuration procedure is
omitted.
# Configure OSPF basic functions. The configuration procedure is omitted.
# Configure the static routes 2.1.3.0/24, 2.1.4.0/24, 2.1.5.0/24, 2.1.6.0/24, and 2.1.7.0/24.
<SwitchC> system-view
[SwitchC] ip route-static 2.1.3.0 24 20.1.2.2
[SwitchC] ip route-static 2.1.4.0 24 20.1.2.2
[SwitchC] ip route-static 2.1.5.0 24 20.1.2.2
[SwitchC] ip route-static 2.1.6.0 24 20.1.2.2
[SwitchC] ip route-static 2.1.7.0 24 20.1.2.2
# Redistribute the static routes and configure the NSSA attribute of Switch C.
[SwitchC] ospf 1
[SwitchC-ospf-1] import-route static
[SwitchC-ospf-1] area 1
[SwitchC-ospf-1-area-0.0.0.1] nssa
[SwitchC-ospf-1-area-0.0.0.1] quit
z Configure Switch B.
# Create VLANs and configure IP addresses for the VLAN interfaces. The configuration procedure is
omitted.
# Configure OSPF basic functions. The configuration procedure is omitted.
z Configure Switch D.
# Create VLANs and configure IP addresses for the VLAN interfaces. The configuration procedure is
omitted.
# Configure OSPF basic functions. The configuration procedure is omitted.
# Configure the static routes 1.1.3.0/24, 1.1.4.0/24, 1.1.5.0/24, 1.1.6.0/24, and 1.1.7.0/24.
<SwitchD> system-view
[SwitchD] ip route-static 1.1.3.0 24 30.1.2.2
[SwitchD] ip route-static 1.1.4.0 24 30.1.2.2
[SwitchD] ip route-static 1.1.5.0 24 30.1.2.2
[SwitchD] ip route-static 1.1.6.0 24 30.1.2.2
[SwitchD] ip route-static 1.1.7.0 24 30.1.2.2
1-29
ABR route summarization configuration
This configuration is applicable when an ABR needs to summarize the Type-3 LSAs of an area. The
following takes the ABR route summarization configuration on Switch B as an example.
Based on OSPF basic configuration and area configuration, perform the following configuration:
# Configure ABR route summarization to summarize the routes 30.1.1.0/24 and 30.1.2.0/24 in area 2
into 30.1.0.0/22.
[SwitchB-ospf-1] area 2
[SwitchB-ospf-1-area-0.0.0.2] abr-summary 30.1.0.0 255.255.252.0
[SwitchB-ospf-1-area-0.0.0.2] quit
This configuration is applicable when an ASBR needs to summarize the Type-5 LSAs or Type-7 LSAs.
The following takes the ASBR route summarization configuration on Switch D as an example.
Based on OSPF basic configuration and area configuration, perform the following configuration:
# Configure ASBR route summarization to summarize the routes 1.1.4.0/24, 1.1.5.0/24, 1.1.6.0/24, and
1.1.7.0/24 into 1.1.4.0/22 and to prevent 1.1.3.0/24 from being advertised to any other area.
[SwitchD-ospf-1] asbr-summary 1.1.4.0 255.255.252.0
[SwitchD-ospf-1] asbr-summary 1.1.3.0 255.255.255.0 not-advertise
This configuration is applicable when the ABR in an NSSA area needs to translate Type-7 LSAs into
Type-5 LSAs and summarize the Type-5 LSAs.
Based on OSPF basic configuration and area configuration, perform the following configuration:
# Switch A is the ABR of the NSSA area. Configure ASBR route summarization to summarize the routes
2.1.4.0/24, 2.1.5.0/24, 2.1.6.0/24, and 2.1.7.0/24 into 2.1.4.0/22 and to prevent 2.1.3.0/24 from being
advertised.
[SwitchA-ospf-1] asbr-summary 2.1.4.0 255.255.252.0
[SwitchA-ospf-1] asbr-summary 2.1.3.0 255.255.255.0 not-advertise
1-30
Complete Configuration
1-31
network 10.1.1.0 0.0.0.255
#
z Perform the following configuration on Switch C.
#
vlan 200
#
vlan 300
#
interface Vlan-interface200
ip address 20.1.1.2 255.255.255.0
#
interface Vlan-interface300
ip address 20.1.2.1 255.255.255.0
#
ospf 1 router-id 3.3.3.3
import-route static
area 0.0.0.2
network 20.1.1.0 0.0.0.255
network 20.1.2.0 0.0.0.255
nssa
#
ip route-static 2.1.3.0 255.255.255.0 20.1.2.2 preference 60
ip route-static 2.1.4.0 255.255.255.0 20.1.2.2 preference 60
ip route-static 2.1.5.0 255.255.255.0 20.1.2.2 preference 60
ip route-static 2.1.6.0 255.255.255.0 20.1.2.2 preference 60
ip route-static 2.1.7.0 255.255.255.0 20.1.2.2 preference 60
#
1-32
ip route-static 1.1.5.0 255.255.255.0 30.1.2.2 preference 60
ip route-static 1.1.6.0 255.255.255.0 30.1.2.2 preference 60
ip route-static 1.1.7.0 255.255.255.0 30.1.2.2 preference 60
#
z Configure Switch A.
#
vlan 100
#
vlan 200
#
interface Vlan-interface100
ip address 10.1.1.1 255.255.255.0
#
interface Vlan-interface200
ip address 20.1.1.1 255.255.255.0
#
ospf 1 router-id 1.1.1.1
area 0.0.0.1
network 20.1.1.0 0.0.0.255
nssa
#
area 0.0.0.0
network 10.1.1.0 0.0.0.255
#
z Configure Switch B.
#
vlan 100
#
vlan 200
#
interface Vlan-interface100
ip address 10.1.1.2 255.255.255.0
#
interface Vlan-interface200
ip address 30.1.1.1 255.255.255.0
#
ospf 1 router-id 2.2.2.2
area 0.0.0.2
network 30.1.1.0 0.0.0.255
#
1-33
area 0.0.0.0
network 10.1.1.0 0.0.0.255
#
z Configure Switch C.
#
vlan 200
#
vlan 300
#
interface Vlan-interface200
ip address 20.1.1.2 255.255.255.0
#
interface Vlan-interface300
ip address 20.1.2.1 255.255.255.0
#
ospf 1 router-id 3.3.3.3
import-route static
area 0.0.0.2
network 20.1.1.0 0.0.0.255
network 20.1.2.0 0.0.0.255
nssa
#
ip route-static 2.1.3.0 255.255.255.0 20.1.2.2 preference 60
ip route-static 2.1.4.0 255.255.255.0 20.1.2.2 preference 60
ip route-static 2.1.5.0 255.255.255.0 20.1.2.2 preference 60
ip route-static 2.1.6.0 255.255.255.0 20.1.2.2 preference 60
ip route-static 2.1.7.0 255.255.255.0 20.1.2.2 preference 60
#
z Configure Switch D.
#
vlan 200
#
vlan 300
#
interface Vlan-interface200
ip address 30.1.1.2 255.255.255.0
#
interface Vlan-interface300
ip address 30.1.2.1 255.255.255.0
#
ospf 1 router-id 4.4.4.4
asbr-summary 1.1.4.0 255.255.252.0
asbr-summary 1.1.3.0 255.255.255.0 not-advertise
import-route static
area 0.0.0.2
network 30.1.1.0 0.0.0.255
network 30.1.2.0 0.0.0.255
1-34
#
ip route-static 1.1.3.0 255.255.255.0 30.1.2.2 preference 60
ip route-static 1.1.4.0 255.255.255.0 30.1.2.2 preference 60
ip route-static 1.1.5.0 255.255.255.0 30.1.2.2 preference 60
ip route-static 1.1.6.0 255.255.255.0 30.1.2.2 preference 60
ip route-static 1.1.7.0 255.255.255.0 30.1.2.2 preference 60
#
Configure ASBR route summarization on Switch A to summarize the Type-5 LSAs translated from
Type-7 LSAs.
z Configure Switch A.
#
vlan 100
#
vlan 200
#
interface Vlan-interface100
ip address 10.1.1.1 255.255.255.0
#
interface Vlan-interface200
ip address 20.1.1.1 255.255.255.0
#
ospf 1 router-id 1.1.1.1
asbr-summary 2.1.4.0 255.255.252.0
asbr-summary 2.1.3.0 255.255.255.0 not-advertise
area 0.0.0.1
network 20.1.1.0 0.0.0.255
nssa
#
area 0.0.0.0
network 10.1.1.0 0.0.0.255
#
z Configure Switch B.
#
vlan 100
#
vlan 200
#
interface Vlan-interface100
ip address 10.1.1.2 255.255.255.0
#
interface Vlan-interface200
1-35
ip address 30.1.1.1 255.255.255.0
#
ospf 1 router-id 2.2.2.2
area 0.0.0.2
network 30.1.1.0 0.0.0.255
#
area 0.0.0.0
network 10.1.1.0 0.0.0.255
#
z Configure Switch C.
#
vlan 200
#
vlan 300
#
interface Vlan-interface200
ip address 20.1.1.2 255.255.255.0
#
interface Vlan-interface300
ip address 20.1.2.1 255.255.255.0
#
ospf 1 router-id 3.3.3.3
import-route static
area 0.0.0.2
network 20.1.1.0 0.0.0.255
network 20.1.2.0 0.0.0.255
nssa
#
ip route-static 2.1.3.0 255.255.255.0 20.1.2.2 preference 60
ip route-static 2.1.4.0 255.255.255.0 20.1.2.2 preference 60
ip route-static 2.1.5.0 255.255.255.0 20.1.2.2 preference 60
ip route-static 2.1.6.0 255.255.255.0 20.1.2.2 preference 60
ip route-static 2.1.7.0 255.255.255.0 20.1.2.2 preference 60
#
z Configure Switch D.
#
vlan 200
#
vlan 300
#
interface Vlan-interface200
ip address 30.1.1.2 255.255.255.0
#
interface Vlan-interface300
ip address 30.1.2.1 255.255.255.0
#
ospf 1 router-id 4.4.4.4
1-36
import-route static
area 0.0.0.2
network 30.1.1.0 0.0.0.255
network 30.1.2.0 0.0.0.255
#
ip route-static 1.1.3.0 255.255.255.0 30.1.2.2 preference 60
ip route-static 1.1.4.0 255.255.255.0 30.1.2.2 preference 60
ip route-static 1.1.5.0 255.255.255.0 30.1.2.2 preference 60
ip route-static 1.1.6.0 255.255.255.0 30.1.2.2 preference 60
ip route-static 1.1.7.0 255.255.255.0 30.1.2.2 preference 60
#
Precautions
z The abr-summary command is applicable to the ABR only to summarize contiguous networks into
a single network. You can use the not-advertise keyword to not advertise a specified summary
route in a Type-3 LSA.
z After the asbr-summary command is used on an ASBR, it will summarize the Type-5 LSAs falling
into the specified address range; if the ASBR is in an NSSA area, it will summarize the Type-7
LSAs within the specified address range. If used on the ABR of an NSSA area, the asbr-summary
command summarizes Type-5 LSAs translated from Type-7 LSAs. If the router is not the ABR in
the NSSA area, no summarization is performed. You can use the not-advertise keyword to not
advertise a specified summary route in a LSA.
1-37
Network Diagram
Configure OSPF in the network, which is divided into three areas: the backbone area and two
non-backbone areas (Area 1 and Area 2). Area 2 has no direct connection to the backbone area; the
connection from Area 2 to the backbone area must go through Area 1. The user hopes to enable Area 2
to communicate with the other two areas.
Based on the user requirements and network environment, configure a virtual link to connect Area 2 to
the backbone area.
Configuration Procedure
1-38
[SwitchA] ospf
[SwitchA-ospf-1] area 0
[SwitchA-ospf-1-area-0.0.0.0] network 196.1.1.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] quit
[SwitchA-ospf-1] area 1
[SwitchA-ospf-1-area-0.0.0.1] network 197.1.1.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.1] quit
# Configure Switch B.
<SwitchB> system-view
[SwitchB] interface Vlan-interface 1
[SwitchB-Vlan-interface1] ip address 152.1.1.1 255.255.255.0
[SwitchB-Vlan-interface1] quit
[SwitchB] interface Vlan-interface 2
[SwitchB-Vlan-interface2] ip address 197.1.1.1 255.255.255.0
[SwitchB-Vlan-interface2] quit
[SwitchB] router id 2.2.2.2
[SwitchB] ospf
[SwitchB-ospf-1] area 1
[SwitchB-ospf-1-area-0.0.0.1] network 197.1.1.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.1] quit
[SwitchB-ospf-1] area 2
[SwitchB-ospf-1-area-0.0.0.2] network 152.1.1.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.2] quit
2) Configure a virtual link.
# Configure Switch A.
[SwitchA-ospf-1] area 1
[SwitchA-ospf-1-area-0.0.0.1] vlink-peer 2.2.2.2
[SwitchA-ospf-1-area-0.0.0.1] quit
[SwitchA-ospf-1] quit
# Configure Switch B.
[SwitchB-ospf-1] area 1
[SwitchB-ospf-1-area-0.0.0.1] vlink-peer 1.1.1.1
[SwitchB-ospf-1-area-0.0.0.1] quit
Complete Configuration
1-39
#
interface Vlan-interface2
ip address 197.1.1.2 255.255.255.0
#
ospf 1
area 0.0.0.0
network 196.1.1.0 0.0.0.255
area 0.0.0.1
network 197.1.1.0 0.0.0.255
vlink-peer 2.2.2.2
#
Precautions
z Both ends of a virtual link must be ABRs configured with the vlink-peer command.
z A virtual link cannot transit the backbone area.
z The vlink-peer command needs to be used in the transit area.
1-40
Network Diagram
Configuration Procedure
# Configure Switch A.
<SwitchA> system-view
[SwitchA] bgp 1001
[SwitchA-bgp] confederation id 100
[SwitchA-bgp] confederation peer-as 1002 1003
[SwitchA-bgp] group confed1002 external
[SwitchA-bgp] peer 172.68.10.2 group confed1002 as-number 1002
[SwitchA-bgp] group confed1003 external
[SwitchA-bgp] peer 172.68.10.3 group confed1003 as-number 1003
1-41
# Configure Switch B.
<SwitchB> system-view
[SwitchB] bgp 1002
[SwitchB-bgp] confederation id 100
[SwitchB-bgp] confederation peer-as 1001 1003
[SwitchB-bgp] group confed1001 external
[SwitchB-bgp] peer 172.68.10.1 group confed1001 as-number 1001
[SwitchB-bgp] group confed1003 external
[SwitchB-bgp] peer 172.68.10.3 group confed1003 as-number 1003
# Configure Switch C.
<SwitchC> system-view
[SwitchC] bgp 1003
[SwitchC-bgp] confederation id 100
[SwitchC-bgp] confederation peer-as 1001 1002
[SwitchC-bgp] group confed1001 external
[SwitchC-bgp] peer 172.68.10.1 group confed1001 as-number 1001
[SwitchC-bgp] group confed1002 external
[SwitchC-bgp] peer 172.68.10.2 group confed1002 as-number 1002
[SwitchC-bgp] group ebgp200 external
[SwitchC-bgp] peer 156.10.1.2 group ebgp200 as-number 200
[SwitchC-bgp] group ibgp1003 internal
[SwitchC-bgp] peer 172.68.1.2 group ibgp1003
Complete Configuration
z Configure Switch A.
#
bgp 1001
confederation id 100
confederation peer-as 1002 1003
undo synchronization
group confed1002 external
peer 172.68.10.2 group confed1002 as-number 1002
group confed1003 external
peer 172.68.10.3 group confed1003 as-number 1003
#
z Configure Switch B.
#
bgp 1002
confederation id 100
confederation peer-as 1001 1003
undo synchronization
group confed1001 external
peer 172.68.10.1 group confed1001 as-number 1001
group confed1003 external
peer 172.68.10.3 group confed1003 as-number 1003
#
1-42
z Configure Switch C.
#
bgp 1003
confederation id 100
confederation peer-as 1001 1002
undo synchronization
group ebgp200 external
peer 156.10.1.2 group ebgp200 as-number 200
group confed1001 external
peer 172.68.10.1 group confed1001 as-number 1001
group confed1002 external
peer 172.68.10.2 group confed1002 as-number 1002
group ibgp1003 internal
peer 172.68.1.2 group ibgp1003
#
Precautions
z If you want to use confederation, you need to determine the confederation ID and the sub-AS
number.
z A confederation can include up to 32 sub-ASs. The AS number used by a sub-AS which is
configured to belong to a confederation is only valid inside the confederation.
z If the confederation implementation mechanism of other routers is different from the RFC
standardization, you can configure related command to make the confederation compatible with
the non-standard routers.
Configuring BGP RR
To ensure the connectivity among the IBGP peers in an AS, you need to make the IBGP peers fully
connected. For an AS with the number of the routers in it being n, you need to establish at least
n*(n-1)/2 IBGP connections to make them fully connected. This requires large amount of network
resources and CPU time if large amount of IBGP peers exist in the AS.
You can decrease the use of network resources and CPU time through route reflection in this case. That
is, use a router as a router reflector (RR) and establish IBGP connections between the RR and other
routers known as clients. Routing information exchanged between the clients is passed/reflected by the
RR. This eliminates the need to establish IBGP connections among the clients.
1-43
Network Diagram
z Run EBGP between the peers in AS 100 and AS 200. Inject network 1.0.0.0/8.
z Run IBGP between the peers in AS 200. Configure a star topology for the AS. Specify the central
device as a route reflector and other devices as clients.
Configuration Procedure
1) Configure Switch A.
<SwitchA> system-view
[SwitchA] interface Vlan-interface 2
[SwitchA-Vlan-interface2] ip address 192.1.1.1 255.255.255.0
[SwitchA-Vlan-interface2] quit
[SwitchA] interface Vlan-interface 100
[SwitchA-Vlan-interface100] ip address 1.1.1.1 255.0.0.0
[SwitchA-Vlan-interface100] quit
[SwitchA] bgp 100
[SwitchA-bgp] group ex external
[SwitchA-bgp] peer 192.1.1.2 group ex as-number 200
[SwitchA-bgp] network 1.0.0.0 255.0.0.0
1-44
2) Configure Switch B.
# Configure VLAN interface IP addresses.
<SwitchB> system-view
[SwitchB] interface Vlan-interface 2
[SwitchB-Vlan-interface2] ip address 192.1.1.2 255.255.255.0
[SwitchB-Vlan-interface2] quit
[SwitchB] interface Vlan-interface 3
[SwitchB-Vlan-interface3] ip address 193.1.1.2 255.255.255.0
[SwitchB-Vlan-interface3] quit
3) Configure Switch C.
# Configure VLAN interface IP addresses.
<SwitchC> system-view
[SwitchC] interface Vlan-interface 3
[SwitchC-Vlan-interface3] ip address 193.1.1.1 255.255.255.0
[SwitchC-Vlan-interface3] quit
[SwitchC] interface vlan-Interface 4
[SwitchC-Vlan-interface4] ip address 194.1.1.1 255.255.255.0
[SwitchC-Vlan-interface4] quit
4) Configure Switch D.
# Configure VLAN interface IP address.
<SwitchD> system-view
[SwitchD] interface vlan-interface 4
[SwitchD-Vlan-interface4] ip address 194.1.1.2 255.255.255.0
[SwitchD-Vlan-interface4] quit
Use the display bgp routing command to display the BGP routing table on Switch B. Note that, Switch
B has already known the existence of network 1.0.0.0.
Use the display bgp routing command to display the BGP routing table on Switch D. Note that, Switch
D knows the existence of network 1.0.0.0, too.
1-45
Complete Configuration
z Configure Switch A.
#
vlan 1 to 2
#
vlan 100
#
interface Vlan-interface2
ip address 192.1.1.1 255.255.255.0
#
interface Vlan-interface100
ip address 1.1.1.1 255.0.0.0
#
bgp 100
network 1.0.0.0
undo synchronization
group ex external
peer 192.1.1.2 group ex as-number 200
#
z Configure Switch B.
#
vlan 1 to 3
#
interface Vlan-interface2
ip address 192.1.1.2 255.255.255.0
#
interface Vlan-interface3
ip address 193.1.1.2 255.255.255.0
#
bgp 200
undo synchronization
group ex external
peer 192.1.1.1 group ex as-number 100
group in internal
peer 193.1.1.1 group in
#
z Configure Switch C.
#
vlan 1
#
vlan 3 to 4
#
interface Vlan-interface3
ip address 193.1.1.1 255.255.255.0
#
interface Vlan-interface4
ip address 194.1.1.1 255.255.255.0
1-46
#
bgp 200
undo synchronization
group rr internal
peer rr reflect-client
peer 193.1.1.2 group rr
peer 194.1.1.2 group rr
#
z Configure Switch D.
#
vlan 1
#
vlan 4
#
interface Vlan-interface4
ip address 194.1.1.2 255.255.255.0
#
bgp 200
undo synchronization
group in internal
peer 194.1.1.1 group in
#
Precautions
z Note that a BGP router which is neither the RR nor a client is called a non-client. Non-clients and
the RR must be fully connected.
z Normally, full connection is not required between an RR and a client. A route is reflected by an RR
from a client to another client. If an RR and a client are fully connected, you can disable the
reflection between clients to reduce the cost.
z Normally, there is only one RR in a cluster. In this case, the router ID of the RR is used to identify
the cluster. Configuring multiple RRs can improve the network stability. If there are multiple RRs in
a cluster, use related command to configure the same cluster ID for them to avoid routing loopback.
1-47
Configuring BGP Path Selection
Network Diagram
Configuration Procedure
1) Configure Switch A.
# Configure VLAN interface IP addresses.
<SwitchA> system-view
[SwitchA] interface Vlan-interface 2
1-48
[SwitchA-Vlan-interface2] ip address 192.1.1.1 255.255.255.0
[SwitchA-Vlan-interface2] quit
[SwitchA] interface Vlan-interface 3
[SwitchA-Vlan-interface3] ip address 193.1.1.1 255.255.255.0
[SwitchA-Vlan-interface3] quit
# Enable BGP.
[SwitchA] bgp 100
# Create a routing policy named apply_med_50, and specify node 10 with the permit matching mode
for the routing policy. Set the MED value of the route matching ACL 2000 to 50.
[SwitchA] route-policy apply_med_50 permit node 10
[SwitchA-route-policy] if-match acl 2000
[SwitchA-route-policy] apply cost 50
[SwitchA-route-policy] quit
# Create a routing policy named apply_med_100, and specify node 10 with the permit matching mode
for the routing policy. Set the MED value of the route matching ACL 2000 to 100.
[SwitchA] route-policy apply_med_100 permit node 10
[SwitchA-route-policy] if-match acl 2000
[SwitchA-route-policy] apply cost 100
[SwitchA-route-policy] quit
# Apply the routing policy apply_med_50 to the routing updates destined for peer group ex193 (the
peer 193.1.1.2) and apply_med_100 to the routing updates destined for peer group ex192 (the peer
192.1.1.2).
[SwitchA] bgp 100
[SwitchA-bgp] peer ex193 route-policy apply_med_50 export
[SwitchA-bgp] peer ex192 route-policy apply_med_100 export
2) Configure Switch B.
# Configure VLAN interface IP addresses.
<SwitchB> system-view
[SwitchB] interface vlan 2
[SwitchB-Vlan-interface2] ip address 192.1.1.2 255.255.255.0
1-49
[SwitchB-Vlan-interface2] quit
[SwitchB] interface Vlan-interface 4
[SwitchB-Vlan-interface4] ip address 194.1.1.2 255.255.255.0
[SwitchB-Vlan-interface4] quit
# Configure OSPF.
[SwitchB] ospf
[SwitchB-ospf-1] area 0
[SwitchB-ospf-1-area-0.0.0.0] network 194.1.1.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.0] network 192.1.1.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.0] quit
[SwitchB-ospf-1] quit
# Enable BGP, create a peer group, and add peers to the peer group.
[SwitchB] bgp 200
[SwitchB-bgp] undo synchronization
[SwitchB-bgp] group ex external
[SwitchB-bgp] peer 192.1.1.1 group ex as-number 100
[SwitchB-bgp] group in internal
[SwitchB-bgp] peer 194.1.1.1 group in
[SwitchB-bgp] peer 195.1.1.2 group in
3) Configure Switch C.
# Configure VLAN interface IP addresses.
<SwitchC> system-view
[SwitchC] interface Vlan-interface 3
[SwitchC-Vlan-interface3] ip address 193.1.1.2 255.255.255.0
[SwitchC-Vlan-interface3] quit
[SwitchC] interface Vlan-interface 5
[SwitchC-Vlan-interface5] ip address 195.1.1.2 255.255.255.0
[SwitchC-Vlan-interface5] quit
# Configure OSPF.
[SwitchC] ospf
[SwitchC-ospf-1] area 0
[SwitchC-ospf-1-area-0.0.0.0] network 193.1.1.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.0] network 195.1.1.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.0] quit
[SwitchC-ospf-1] quit
# Enable BGP, create a peer group, and add peers to the peer group.
[SwitchC] bgp 200
[SwitchC-bgp] undo synchronization
[SwitchC-bgp] group ex external
[SwitchC-bgp] peer 193.1.1.1 group ex as-number 100
[SwitchC-bgp] group in internal
[SwitchC-bgp] peer 195.1.1.1 group in
[SwitchC-bgp] peer 194.1.1.2 group in
4) Configure Switch D.
# Configure VLAN interface IP addresses.
1-50
<SwitchD> system-view
[SwitchD] interface Vlan-interface 4
[SwitchD-Vlan-interface4] ip address 194.1.1.1 255.255.255.0
[SwitchD-Vlan-interface4] quit
[SwitchD] interface Vlan-interface 5
[SwitchD-Vlan-interface5] ip address 195.1.1.1 255.255.255.0
[SwitchD-Vlan-interface5] quit
# Configure OSPF.
[SwitchD] ospf
[SwitchD-ospf-1] area 0
[SwitchD-ospf-1-area-0.0.0.0] network 194.1.1.0 0.0.0.255
[SwitchD-ospf-1-area-0.0.0.0] network 195.1.1.0 0.0.0.255
[SwitchD-ospf-1-area-0.0.0.0] network 4.0.0.0 0.255.255.255
[SwitchD-ospf-1-area-0.0.0.0] quit
[SwitchD-ospf-1] quit
# Enable BGP, create a peer group, and add peers to the peer group.
[SwitchD] bgp 200
[SwitchD-bgp] undo synchronization
[SwitchD-bgp] group in internal
[SwitchD-bgp] peer 195.1.1.2 group in
[SwitchD-bgp] peer 194.1.1.2 group in
z To make the configuration take effect, all BGP neighbors need to execute the reset bgp all
command.
z After the above configuration, because the MED attribute value of the route 1.0.0.0 learnt by Switch
C is smaller than that of the route 1.0.0.0 learnt by Switch B, Switch D will choose the route 1.0.0.0
coming from Switch C.
z If you do not configure MED attribute of Switch A when you configure Switch A, but configure the
local preference on Switch C as following:
# Define ACL 2000 to permit the route 1.0.0.0/8.
[SwitchC] acl number 2000
[SwitchC-acl-basic-2000] rule permit source 1.0.0.0 0.255.255.255
[SwitchC-acl-basic-2000] rule deny source any
[SwitchC-acl-basic-2000] quit
# Create a routing policy named localpref, and specify node 10 with the permit matching mode for the
routing policy. Set the local preference value of the route matching ACL 2000 to 200
[SwitchC] route-policy localpref permit node 10
[SwitchC-route-policy] if-match acl 2000
[SwitchC-route-policy] apply local-preference 200
[SwitchC-route-policy] quit
# Create a routing policy named localpref, and specify node 20 with the permit matching mode for the
routing policy. Set the local preference value of the route to 100.
[SwitchC] route-policy localpref permit node 20
[SwitchC-route-policy] apply local-preference 100
[SwitchC-route-policy] quit
# Apply the routing policy localpref to the routing information from the peer 193.1.1.1.
1-51
[SwitchC] bgp 200
[SwitchC-bgp] peer 193.1.1.1 route-policy localpref import
In this case, because the LOCAL_PREF value of the route 1.0.0.0 learnt by Switch C is 200, which is
greater than that of the route 1.0.0.0 learnt by Switch B (Switch B does not configure the LOCAL_PREF
attribute, the default value is 100), Switch D still chooses the route 1.0.0.0 coming from Switch C first.
Complete Configuration
z Configure Switch A.
#
acl number 2000
rule 0 permit source 1.0.0.0 0.255.255.255
rule 1 deny
#
vlan 1 to 3
#
interface Vlan-interface2
ip address 192.1.1.1 255.255.255.0
#
interface Vlan-interface3
ip address 193.1.1.1 255.255.255.0
#
bgp 100
network 1.0.0.0
undo synchronization
group ex192 external
peer ex192 route-policy apply_med_100 export
peer 192.1.1.2 group ex192 as-number 200
group ex193 external
peer ex193 route-policy apply_med_50 export
peer 193.1.1.2 group ex193 as-number 200
#
route-policy apply_med_50 permit node 10
if-match acl 2000
apply cost 50
route-policy apply_med_100 permit node 10
if-match acl 2000
apply cost 100
#
z Configure Switch B.
#
vlan 1 to 2
#
vlan 4
#
interface Vlan-interface2
ip address 192.1.1.2 255.255.255.0
#
1-52
interface Vlan-interface4
ip address 194.1.1.2 255.255.255.0
#
bgp 200
undo synchronization
group ex external
peer 192.1.1.1 group ex as-number 100
group in internal
peer 194.1.1.1 group in
peer 195.1.1.2 group in
#
ospf 1
area 0.0.0.0
network 192.1.1.0 0.0.0.255
network 194.1.1.0 0.0.0.255
#
z Configure Switch C.
#
acl number 2000
rule 0 permit source 1.0.0.0 0.255.255.255
rule 1 deny
#
vlan 1
#
vlan 3
#
vlan 5
#
interface Vlan-interface3
ip address 193.1.1.2 255.255.255.0
#
interface Vlan-interface5
ip address 195.1.1.2 255.255.255.0
#
bgp 200
undo synchronization
group ex external
peer 193.1.1.1 group ex as-number 100
peer 193.1.1.1 route-policy localpref import
group in internal
peer 195.1.1.1 group in
peer 194.1.1.2 group in
#
ospf 1
area 0.0.0.0
network 193.1.1.0 0.0.0.255
network 195.1.1.0 0.0.0.255
1-53
#
route-policy localpref permit node 10
if-match acl 2000
apply local-preference 200
route-policy localpref permit node 20
apply local-preference 100
#
z Configure Switch D.
#
vlan 1
#
vlan 4 to 5
#
interface Vlan-interface4
ip address 194.1.1.1 255.255.255.0
#
interface Vlan-interface5
ip address 195.1.1.1 255.255.255.0
#
bgp 200
undo synchronization
group in internal
peer 195.1.1.2 group in
peer 194.1.1.2 group in
#
ospf 1
area 0.0.0.0
network 4.0.0.0 0.255.255.255
network 194.1.1.0 0.0.0.255
network 195.1.1.0 0.0.0.255
#
Precautions
none
1-54
Network Diagram
Vlan-Int 200
z As shown in the figure above, Switch A and Switch B run OSPF. The router ID of Switch A is 1.1.1.1
and that of Switch B is 2.2.2.2.
z Configure three static routes and enable OSPF on Switch A.
z Apply a routing policy on Switch A when redistributing the three static routes so that the routes
20.0.0.0 and 40.0.0.0 are redistributed, and the route 30.0.0.0 is filtered out.
Configuration Procedure
Filter routing information with the import-route command and the route-policy command
(method 1)
z Configure Switch A.
# Configure the IP addresses of the interfaces.
<SwitchA> system-view
[SwitchA] interface vlan-interface 100
[SwitchA-Vlan-interface100] ip address 10.0.0.1 255.0.0.0
[SwitchA-Vlan-interface100] quit
[SwitchA] interface vlan-interface 200
[SwitchA-Vlan-interface200] ip address 12.0.0.1 255.0.0.0
[SwitchA-Vlan-interface200] quit
1-55
# Enable OSPF and specify VLAN-interface 10 to belong to area 0.
[SwitchA] router id 1.1.1.1
[SwitchA] ospf
[SwitchA-ospf-1] area 0
[SwitchA-ospf-1-area-0.0.0.0] network 10.0.0.0 0.255.255.255
[SwitchA-ospf-1-area-0.0.0.0] quit
[SwitchA-ospf-1]quit
# Configure an ACL.
[SwitchA] acl number 2000
[SwitchA-acl-basic-2000] rule deny source 30.0.0.0 0.255.255.255
[SwitchA-acl-basic-2000] rule permit source any
[SwitchA-acl-basic-2000] quit
# Apply the routing policy when the static routes are redistributed.
[SwitchA] ospf
[SwitchA-ospf-1] import-route static route-policy ospf
z Configure Switch B.
# Configure the IP address of the interface.
<SwitchB> system-view
[SwitchB] interface vlan-interface 100
[SwitchB-Vlan-interface100] ip address 10.0.0.2 255.0.0.0
[SwitchB-Vlan-interface100] quit
Filter routing information with the import-route command and the filter-policy export
command (method 2)
z Configure Switch A.
# Configure the IP addresses of the interfaces.
<SwitchA> system-view
[SwitchA] interface vlan-interface 100
[SwitchA-Vlan-interface100] ip address 10.0.0.1 255.0.0.0
[SwitchA-Vlan-interface100] quit
[SwitchA] interface vlan-interface 200
[SwitchA-Vlan-interface200] ip address 12.0.0.1 255.0.0.0
[SwitchA-Vlan-interface200] quit
1-56
# Configure three static routes.
[SwitchA] ip route-static 20.0.0.0 255.0.0.0 12.0.0.2
[SwitchA] ip route-static 30.0.0.0 255.0.0.0 12.0.0.2
[SwitchA] ip route-static 40.0.0.0 255.0.0.0 12.0.0.2
# Configure an ACL.
[SwitchA] acl number 2000
[SwitchA-acl-basic-2000] rule deny source 30.0.0.0 0.255.255.255
[SwitchA-acl-basic-2000] rule permit source any
[SwitchA-acl-basic-2000] quit
z Configure Switch B.
The configuration on Switch B is the same as that in method 1. Refer to the configuration on Switch B in
Configuration Procedure.
Filter routing information with the import-route command and the asbr-summary
not-advertise command (method 3)
z Configure Switch A.
# Configure the IP addresses of the interfaces.
<SwitchA> system-view
[SwitchA] interface vlan-interface 100
[SwitchA-Vlan-interface100] ip address 10.0.0.1 255.0.0.0
[SwitchA-Vlan-interface100] quit
[SwitchA] interface vlan-interface 200
[SwitchA-Vlan-interface200] ip address 12.0.0.1 255.0.0.0
[SwitchA-Vlan-interface200] quit
1-57
[SwitchA-ospf-1] area 0
[SwitchA-ospf-1-area-0.0.0.0] network 10.0.0.0 0.255.255.255
[SwitchA-ospf-1-area-0.0.0.0] quit
z Configure Switch B.
The configuration on Switch B is the same as that in method 1. Refer to the configuration on Switch B in
Configuration Procedure.
Complete Configuration
In the following complete configuration, the import-route command and the route-policy command
are used to filter routing information (method 1). For the complete configurations of other methods, refer
to Configuration Procedure.
z Perform the following configuration on Switch A.
#
router id 1.1.1.1
#
acl number 2000
rule 0 deny source 30.0.0.0 0.255.255.255
rule 1 permit
#
vlan 100
#
vlan 200
#
interface Vlan-interface100
ip address 10.0.0.1 255.0.0.0
#
interface Vlan-interface200
ip address 12.0.0.1 255.0.0.0
#
ospf 1
import-route static route-policy ospf
area 0.0.0.0
network 10.0.0.0 0.255.255.255
#
route-policy ospf permit node 10
if-match acl 2000
#
ip route-static 20.0.0.0 255.0.0.0 12.0.0.2 preference 60
ip route-static 30.0.0.0 255.0.0.0 12.0.0.2 preference 60
ip route-static 40.0.0.0 255.0.0.0 12.0.0.2 preference 60
#
1-58
z Perform the following configuration on Switch B.
#
router id 2.2.2.2
#
vlan 100
#
interface Vlan-interface100
ip address 10.0.0.2 255.0.0.0
#
ospf 1
area 0.0.0.0
network 10.0.0.0 0.255.255.255
#
Precautions
In an OSPF network, when an ASBR redistributes routes, you can use the command combination of
filter-policy export and import-route, route-policy and import-route, or import-route and
asbr-summary not-advertise to filter redistributed routing information based on the actual conditions.
1-59
Table of Contents
i
1 Multicast Configuration Guide
Network Diagram
Receiver
Host A
Source
Eth1/0/4
Receiver
Eth1/0/2 Eth1/0/1
1.1.1.2/24 10.1.1.1/24 Eth1/0/1 Eth1/0/3
z As shown in Figure 1-1, Router A connects to a multicast source (Source) through Ethernet 1/0/2,
and to Switch A through Ethernet 1/0/1.
z Run PIM DM and IGMP on Router A. Enable IGMP Snooping on Switch A. Router A is the IGMP
querier.
z The source sends multicast data to multicast group 224.1.1.1. Host A and Host B join multicast
group 224.1.1.1.
1-1
Product series Software version Hardware version
Switch 4200G V03.02.00 All versions
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
V03.01.00
Switch 4210 All versions
V03.01.05
Configuration Procedure
Configure the IP address and subnet mask for each interface as per Figure 1-1. The detailed
configuration steps are omitted here.
Configuring Router A
# Enable IP multicast routing, enable PIM-DM on each interface, and enable IGMP on Ethernet 1/0/1.
<RouterA> system-view
[RouterA] multicast routing-enable
[RouterA] interface Ethernet 1/0/1
[RouterA-Ethernet1/0/1] igmp enable
[RouterA-Ethernet1/0/1] pim dm
[RouterA-Ethernet1/0/1] quit
[RouterA] interface Ethernet 1/0/2
[RouterA-Ethernet1/0/2] pim dm
[RouterA-Ethernet1/0/2] quit
Configuring Switch A
# Create VLAN 100, assign Ethernet 1/0/1 through Ethernet 1/0/4 to VLAN 100, and enable IGMP
Snooping in this VLAN.
[SwitchA] vlan 100
[SwitchA-vlan100] port Ethernet 1/0/1 to Ethernet 1/0/4
[SwitchA-vlan100] igmp-snooping enable
[SwitchA-vlan100] quit
1-2
Vlan(id):100.
Total 1 IP Group(s).
Total 1 MAC Group(s).
Router port(s):
Ethernet1/0/1
IP group(s):the following ip group(s) match to one mac group.
IP group address: 224.1.1.1
Host port(s):
Ethernet1/0/3 Ethernet1/0/4
MAC group(s):
MAC group address: 0100-5e01-0101
Host port(s): Ethernet1/0/3 Ethernet1/0/4
As shown above, a multicast group entry for 224.1.1.1 has been created on Switch A, with Ethernet
1/0/1 as the router port and Ethernet 1/0/3 and Ethernet 1/0/4 as dynamic member ports. This means
that Host A and Host B have joined the multicast group 224.1.1.1.
Complete Configuration
Configuration on Switch A
#
igmp-snooping enable
#
vlan 100
igmp-snooping enable
#
interface Ethernet1/0/1
port access vlan 100
#
interface Ethernet1/0/2
port access vlan 100
#
interface Ethernet1/0/3
port access vlan 100
#
interface Ethernet1/0/4
port access vlan 100
#
Precautions
z Layer 2 and Layer 3 multicast protocols can run on the same switch. However, a Layer 2 multicast
protocol cannot run in a VLAN while a Layer 3 multicast protocol is running on the corresponding
VLAN interface, and vice versa.
z Before enabling IGMP Snooping in a VLAN, be sure to enable IGMP Snooping in system view;
otherwise the configuration will not succeed.
1-3
Configuring IGMP Snooping Only
Network Diagram
Where it is unnecessary or infeasible to build a Layer 3 multicast network, enabling IGMP Snooping on
all the devices in the Layer 2 network can implement some multicast functions.
1) As shown in Figure 1-2, in a Layer 2 only network, Switch C connects to the multicast source
through Ethernet 1/0/3. At least one receiver is attached to Switch B and Switch C respectively.
2) Enable IGMP Snooping on Switch A, Switch B, and Switch C. Switch A acts as the IGMP Snooping
querier.
3) Enable Switch A and Switch B to drop unknown multicast traffic so that multicast traffic for unknown
multicast groups are not flooded in the VLAN.
1-4
Configuration Procedure
Configuring Switch A
# Create VLAN 100, assign Ethernet 1/0/1 through Ethernet 1/0/2 to VLAN 100, and enable IGMP
Snooping in this VLAN.
[SwitchA] vlan 100
[SwitchA-vlan100] port Ethernet 1/0/1 Ethernet 1/0/2
[SwitchA-vlan100] igmp-snooping enable
Configuring Switch B
# Create VLAN 100, assign Ethernet 1/0/1 through Ethernet 1/0/3 to VLAN 100, and enable IGMP
Snooping in this VLAN.
[SwitchB] vlan 100
[SwitchB-vlan100] port Ethernet 1/0/1 to Ethernet 1/0/3
[SwitchB-vlan100] igmp-snooping enable
[SwitchB-vlan100] quit
Configuring Switch C
# Create VLAN 100, assign Ethernet 1/0/1 through Ethernet 1/0/3 to VLAN 100, and enable IGMP
Snooping in this VLAN.
[SwitchC] vlan 100
[SwitchC-vlan100] port Ethernet 1/0/1 to Ethernet 1/0/3
[SwitchC-vlan100] igmp-snooping enable
1-5
As Switch C is not the IGMP Snooping querier, it cannot create forwarding entries for Host A and Host
B, and therefore, do not enable the function of dropping unknown multicast packets on Switch C. To
avoid impact on the network and on Switch C caused by multicast flooding, it is recommended to enable
IGMP Snooping querier on the switch to which the multicast source is directly attached.
Check the reception of multicast stream for multicast group 224.1.1.1 on Host A, and take the following
steps to verify the configurations made on the switches.
1) View the information on Switch B
# View the IGMP packet statistics on Switch B.
<SwitchB> display igmp-snooping statistics
Received IGMP general query packet(s) number:16.
Received IGMP specific query packet(s) number:3.
Received IGMP V1 report packet(s) number:0.
Received IGMP V2 report packet(s) number:53.
Received IGMP leave packet(s) number:1.
Received error IGMP packet(s) number:0.
Sent IGMP specific query packet(s) number:1.
Switch B has received IGMP general queries from the querier and IGMP reports from receivers.
# View the multicast group information on Switch B.
<Switch B> display igmp-snooping group
Total 1 IP Group(s).
Total 1 MAC Group(s).
Vlan(id):100.
Total 1 IP Group(s).
Total 1 MAC Group(s).
Router port(s):Ethernet1/0/1
IP group(s):the following ip group(s) match to one mac group.
IP group address:224.1.1.1
Host port(s):Ethernet1/0/2
MAC group(s):
MAC group address:0100-5e7f-fffe
Host port(s):Ethernet1/0/2
As shown above, a multicast group entry for the multicast group 224.1.1.1 has been created on Switch
B, with Ethernet 1/0/1 as the dynamic router port and Ethernet 1/0/2 as the dynamic member port.
2) View the information on Switch A
# View the IGMP packet statistics on Switch A.
<SwitchA> display igmp-snooping statistics
Received IGMP general query packet(s) number:0.
1-6
Received IGMP specific query packet(s) number:0.
Received IGMP V1 report packet(s) number:0.
Received IGMP V2 report packet(s) number:53.
Received IGMP leave packet(s) number:1.
Received error IGMP packet(s) number:0.
Sent IGMP specific query packet(s) number:1.
Vlan(id):100.
Total 1 IP Group(s).
Total 1 MAC Group(s).
Router port(s):
IP group(s):the following ip group(s) match to one mac group.
IP group address:224.1.1.1
Host port(s):Ethernet1/0/1
MAC group(s):
MAC group address:0100-5e7f-fffe
Host port(s):Ethernet1/0/1
As shown above, a multicast group entry for the multicast group 224.1.1.1 has been created on Switch
A, with Ethernet 1/0/1 as the dynamic member port. Acting as the IGMP Snooping querier, Switch A
does not have a router port.
3) View the information on Switch C
# View the IGMP packet statistics on Switch C.
<SwitchC> display igmp-snooping statistics
Received IGMP general query packet(s) number:10.
Received IGMP specific query packet(s) number:0.
Received IGMP V1 report packet(s) number:0.
Received IGMP V2 report packet(s) number:0.
Received IGMP leave packet(s) number:.0
Received error IGMP packet(s) number:0.
Sent IGMP specific query packet(s) number:0.
Vlan(id):100.
Total 0 IP Group(s).
Total 0 MAC Group(s).
Router port(s):Ethernet1/0/1
1-7
As shown above, no multicast entries have been created on Switch C. The switch must flood multicast
data in the VLAN to allow the multicast data to flow to the receivers downstream. Therefore, do not
enable the function of dropping unknown multicast packets on Switch C.
Complete Configuration
Configuration on Switch A
#
unknown-multicast drop enable
#
igmp-snooping enable
#
vlan 100
igmp-snooping enable
igmp-snooping querier
#
interface Ethernet1/0/1
port access vlan 100
#
interface Ethernet1/0/2
port access vlan 100
#
Configuration on Switch B
#
unknown-multicast drop enable
#
igmp-snooping enable
#
vlan 100
igmp-snooping enable
#
interface Ethernet1/0/1
port access vlan 100
#
interface Ethernet1/0/2
port access vlan 100
#
interface Ethernet1/0/3
port access vlan 100
#
Configuration on Switch C
#
igmp-snooping enable
#
vlan 100
1-8
igmp-snooping enable
#
interface Ethernet1/0/1
port access vlan 100
#
interface Ethernet1/0/2
port access vlan 100
#
interface Ethernet1/0/3
port access vlan 100
#
Network Diagram
/1
1/0
Vlan-int20 Vlan-int10 Eth
n2 HostA
168.10.1.1 168.10.2.1 Eth1/0/10 V la
HostB
Configure the multicast VLAN feature so that Switch A just sends multicast data to VLAN 10 rather than
to each VLAN when Host A and Host B attached to Switch B need the multicast data.
The following table describes the device details:
1-9
Device Description Remarks
VLAN 2 contains Ethernet 1/0/1 and VLAN 3 contains
Ethernet 1/0/2. These two ports are connected with Host A
and Host B respectively. The default VLAN of Ethernet 1/0/1 is
VLAN 2 and the default VLAN of Ethernet 1/0/2 is VLAN 3.
VLAN 10 contains Ethernet 1/0/10, Ethernet 1/0/1 and
Switch B Layer 2 switch Ethernet 1/0/2. Ethernet 1/0/10 is connected with Switch A.
VLAN 10 is multicast VLAN. Ethernet 1/0/1 sends packets of
VLAN 2 and VLAN 10 without VLAN tags.
Ethernet 1/0/2 sends packets of VLAN 3 and VLAN 10 without
VLAN tags.
HostA User 1 Connected with Ethernet 1/0/1 of Switch B
HostB User 2 Connected with Ethernet 1/0/2 of Switch B
Configure VLAN 10 as a multicast VLAN so that users in VLAN 2 and VLAN 3 can receive multicast
packets through VLAN 10.
Configuration Procedure
Assume that the IP addresses have been configured and the devices have been connected correctly.
1) Configure Switch A.
# Configure the IP address of VLAN-interface 20 as 168.10.1.1, and enable PIM-DM.
<SwitchA> system-view
[SwitchA] multicast routing-enable
[SwitchA] vlan 20
[SwitchA–vlan20]port Ethernet1/0/1
[SwitchA-vlan20] quit
[SwitchA] interface Vlan-interface 20
[SwitchA-Vlan-interface20] ip address 168.10.1.1 255.255.255.0
[SwitchA-Vlan-interface20] pim dm
[SwitchA-Vlan-interface20] quit
1-10
# Configure Ethernet 1/0/10 as a Hybrid port, assign it to VLAN 10, and configure it to send packets of
VLAN 10 with the VLAN tag kept.
[SwitchA] interface Ethernet1/0/10
[SwitchA-Ethernet1/0/10] port link-type hybrid
[SwitchA-Ethernet1/0/10] port hybrid vlan 10 tagged
[SwitchA-Ethernet1/0/10] quit
# Configure the IP address of VLAN-interface 10 as 168.10.2.1, and enable PIM-DM and IGMP.
[SwitchA] interface Vlan-interface 10
[SwitchA-Vlan-interface10] ip address 168.10.2.1 255.255.255.0
[SwitchA-Vlan-interface10] igmp enable
[SwitchA-Vlan-interface10] pim dm
2) Configure Switch B.
# Enable IGMP Snooping globally.
<SwitchB> system-view
[SwitchB] igmp-snooping enable
# Create VLAN 2, VLAN 3, and VLAN 10, configure VLAN 10 as a multicast VLAN, and enable IGMP
Snooping in VLAN 10.
[SwitchB] vlan 2 to 3
Please wait.... Done.
[SwitchB] vlan 10
[SwitchB-vlan10] service-type multicast
[SwitchB-vlan10] igmp-snooping enable
[SwitchB-vlan10] quit
# Configure Ethernet 1/0/10 as a Hybrid port, assign it to VLAN 2, VLAN 3 and VLAN 10, and configure
it to send packets of VLAN 2, VLAN 3, and VLAN 10 with the respective VLAN tags kept.
[SwitchB] interface Ethernet1/0/10
[SwitchB-Ethernet1/0/10] port link-type hybrid
[SwitchB-Ethernet1/0/10] port hybrid vlan 2 3 10 tagged
[SwitchB-Ethernet1/0/10] quit
# Configure Ethernet 1/0/1 as a Hybrid port, assign it to VLAN 2 and VLAN 10, and configure it to send
packets of VLAN 2 and VLAN 10 without VLAN tags. Configure VLAN 2 as the default VLAN.
[SwitchB] interface Ethernet1/0/1
[SwitchB-Ethernet1/0/1] port link-type hybrid
[SwitchB-Ethernet1/0/1] port hybrid vlan 2 10 untagged
[SwitchB-Ethernet1/0/1] port hybrid pvid vlan 2
[SwitchB-Ethernet1/0/1] quit
# Configure Ethernet 1/0/2 as a Hybrid port, assign it to VLAN 3 and VLAN 10, and configure it to send
packets of VLAN 3 and VLAN 10 without VLAN tags. Configure VLAN 3 as the default VLAN.
[SwitchB] interface Ethernet1/0/2
[SwitchB-Ethernet1/0/2] port link-type hybrid
[SwitchB-Ethernet1/0/2] port hybrid vlan 3 10 untagged
[SwitchB-Ethernet1/0/2] port hybrid pvid vlan 3
[SwitchB-Ethernet1/0/2] quit
1-11
Complete Configuration
Configuration on Switch A
#
multicast routing-enable
#
interface Vlan-interface10
ip address 168.10.2.1 255.255.255.0
igmp enable
pim dm
#
interface Vlan-interface20
ip address 168.10.1.1 255.255.255.0
pim dm
#
interface Ethernet1/0/1
port access vlan 20
#
interface Ethernet1/0/10
port link-type hybrid
port hybrid vlan 10 tagged
#
Configuration on Switch B
#
igmp-snooping enable
#
vlan 1 to 3
#
vlan 10
service-type multicast
igmp-snooping enable
#
interface Ethernet1/0/1
port link-type hybrid
port hybrid vlan 1 to 2 10 untagged
port hybrid pvid vlan 2
#
interface Ethernet1/0/2
port link-type hybrid
port hybrid vlan 1 3 10 untagged
port hybrid pvid vlan 3
#
interface Ethernet1/0/10
port link-type hybrid
port hybrid vlan 2 to 3 10 tagged
port hybrid vlan 1 untagged
1-12
Precautions
1-13
Network Diagram
Figure 1-4 Network diagram for PIM-SM, IGMP, and IGMP Snooping configuration
Receiver
Switch A
Host A
Vlan-int100
Vlan100
01
Vlan-int102
Switch F
t1
-i n
an
Vl
01
Host B
t1
in
-
an
Vlan-int102 Receiver
Vl
10.110.5.100/24
Vlan-int104
Vlan-int200
PIM-SM
Host D
Switch C
Requirement Analysis
When users receive VOD information through multicast, the information receiving mode may vary
depending on user requirements:
1) To avoid flooding of the video information at Layer 2, IGMP Snooping needs to be enabled on
Switch E, through which Host A and Host B receive the multicast data.
2) To ensure reliable and stable reception of multicast data, Switch B and Switch C provide link
backup for the directly attached stub network N1, which comprises multicast receivers Host C and
Host D.
3) The PIM-SM domain as a single-BSR domain, and OSPF runs in the domain for unicast routing.
1-14
Configuration Plan
1) Switch D connects to the network that comprises the multicast source (Source) through
VLAN-interface 300.
2) Switch A connects to Switch F through VLAN-interface 100, and to Switch D and Switch E through
VLAN-interface 101 and VLAN-interface 102 respectively.
3) Switch B and Switch C connect to stub network N1 through their respective VLAN-interface 200,
and to Switch E through VLAN-interface 103 and VLAN-interface 104 respectively.
4) Both VLAN-interface 105 of Switch D and VLAN-interface 102 of Switch E serve as C-BSRs and
C-RPs.
5) Enable IGMPv2 on VLAN-interface 100 of Switch A. On Switch F, enable IGMP Snooping globally
and in VLAN 100. Run IGMPv2 on Switch B and Switch C for group management on stub network
N1. Typically, Switch B acts as the querier because its interface on the multi-access subnet has a
lower IP address.
Configuration Procedure
Configuring the interface IP addresses and unicast routing protocol for each switch
Configure the IP address and subnet mask for each interface as per Figure 1-4. The detailed
configuration steps are omitted here.
Configure OSPF for interoperation among the switches in the PIM-SM domain. Ensure the
network-layer interoperation among Switch A, Switch B, Switch C, Switch D and Switch E in the
PIM-SM domain and enable dynamic update of routing information among the switches through a
unicast routing protocol. The specific configuration steps are omitted here.
# Enable IP multicast routing on Switch A, enable PIM-SM on each interface, and run IGMPv2 on
VLAN-interface 100.
<SwitchA> system-view
[SwitchA] multicast routing-enable
[SwitchA] interface Vlan-interface 100
[SwitchA-Vlan-interface100] igmp enable
[SwitchA-Vlan-interface100] pim sm
[SwitchA-Vlan-interface100] quit
[SwitchA] interface vlan-interface 101
[SwitchA-Vlan-interface101] pim sm
[SwitchA-Vlan-interface101] quit
[SwitchA] interface vlan-interface 102
1-15
[SwitchA-Vlan-interface102] pim sm
It is necessary to enable IGMP only on interfaces with multicast receivers attached. The default IGMP
version is IGMPv2.
The configuration on Switch B and Switch C is similar to that on Switch A. The configuration on Switch D
and Switch E is also similar to that on Switch A except that it is not necessary to enable IGMP on the
corresponding interfaces on these two switches.
# Configure the group range to be advertised in C-RP-Adv messages and configure a C-BSR and a
C-RP on VLAN-interface 105 of Switch D.
<SwitchD> system-view
[SwitchD] acl number 2005
[SwitchD-acl-basic-2005] rule permit source 225.1.1.0 0.0.0.255
[SwitchD-acl-basic-2005] quit
[SwitchD] pim
[SwitchD-pim] c-bsr vlan-interface 105 24 2
[SwitchD-pim] c-rp vlan-interface 105 group-policy 2005 priority 2
[SwitchD-pim] quit
# Configure the group range to be advertised in C-RP-Adv messages and configure a C-BSR and a
C-RP on VLAN-interface 102 of Switch E.
<SwitchE> system-view
[SwitchE] acl number 2005
[SwitchE-acl-basic-2005] rule permit source 225.1.1.0 0.0.0.255
[SwitchE-acl-basic-2005] quit
[SwitchE] pim
[SwitchE-pim] c-bsr vlan-interface 102 24 1
[SwitchE-pim] c-rp vlan-interface 102 group-policy 2005 priority 1
[SwitchE-pim] quit
Check the reception of multicast stream for multicast group 225.1.1.1 on Host A and Host C and verify
the configurations made on the switches.
Using the following commands to determine whether Host A and Host C can receive
multicast data
1-16
<SwitchE> display pim neighbor
Neighbor's Address Interface Name Uptime Expires
192.168.9.1 Vlan-interface102 02:47:04 00:01:42
192.168.2.1 Vlan-interface103 02:45:04 00:04:46
192.168.3.1 Vlan-interface104 02:42:24 00:04:45
192.168.4.2 Vlan-interface105 02:43:44 00:05:44
Group/MaskLen: 225.1.1.0/24
RP 192.168.9.2
Version: 2
Priority: 1
Uptime: 00:03:15
Expires: 00:01:14
RP 192.168.4.2
Version: 2
Priority: 2
Uptime: 00:04:25
Expires: 00:01:09
1-17
Downstream interface list:
Vlan-interface100, Protocol 0x1: IGMP, never timeout
Matched 1 (S,G) entries, 1 (*,G) entries, 0 (*,*,RP) entry
(10.110.5.100, 225.1.1.1)
Protocol 0x20: PIMSM, Flag 0x4: SPT
Uptime: 00:03:03, Timeout in 27 sec
Upstream interface: Vlan-interface300, RPF neighbor: NULL
Downstream interface list:
Vlan-interface101, Protocol 0x200: SPT, timeout in 147 sec
Vlan-interface105, Protocol 0x200: SPT, timeout in 145 sec
Matched 1 (S,G) entry, 0 (*,G) entry, 0 (*,*,RP) entry
(*,225.1.1.1), RP 192.168.9.2
Protocol 0x20: PIMSM, Flag 0x2003: RPT WC NULL_IIF
Uptime: 00:02:34, Timeout in 176 sec
Upstream interface: Null, RPF neighbor: 0.0.0.0
Downstream interface list:
Vlan-interface102, Protocol 0x100: RPT, timeout in 176 sec
Vlan-interface103, Protocol 0x100: SPT, timeout in 135 sec
(10.110.5.100, 225.1.1.1)
Protocol 0x20: PIMSM, Flag 0x4: SPT
Uptime: 00:03:03, Timeout in 27 sec
Upstream interface: Vlan-interface105, RPF neighbor: 192.168.4.2
Downstream interface list:
Vlan-interface102, Protocol 0x200: SPT, timeout in 147 sec
Vlan-interface103, Protocol 0x200: SPT, timeout in 145 sec
Matched 1 (S,G) entry, 1 (*,G) entry, 0 (*,*,RP) entry
Vlan(id):100.
Total 1 IP Group(s).
Total 1 MAC Group(s).
1-18
Router port(s):Ethernet1/0/2
IP group(s):the following ip group(s) match to one mac group.
IP group address:225.1.1.1
Host port(s):Ethernet1/0/19
MAC group(s):
MAC group address:0100-5e01-0101
Host port(s):Ethernet1/0/19
# View the multicast group information that contains port information on Switch B.
<SwitchB> display mpm group
Total 1 IP Group(s).
Total 1 MAC Group(s).
Vlan(id):200.
Total 1 IP Group(s).
Total 1 MAC Group(s).
Router port(s):
IP group(s):the following ip group(s) match to one mac group.
IP group address:225.1.1.1
Host port(s):Ethernet1/0/24
MAC group(s):
MAC group address:0100-5e01-0101
Host port(s):Ethernet1/0/24
Vlan(id):103.
Total 0 IP Group(s).
Total 0 MAC Group(s).
Router port(s):Ethernet1/0/10
Configure simulated joining on Switch B, thus to prevent the multicast switch from considering that no
multicast receiver exists on the subnet due to some reasons and pruning the corresponding path from
the multicast forwarding tree.
# Configure Ethernet 1/0/21 as a simulated host to join multicast group 225.1.1.1.
<SwitchB> system-view
[SwitchB] interface Vlan-interface 200
[SwitchB-Vlan-interface200] igmp host-join 225.1.1.1 port Ethernet 1/0/21
# View the multicast group information that contains port information on Switch B.
<SwitchB> display mpm group
Total 1 IP Group(s).
Total 1 MAC Group(s).
Vlan(id):200.
Total 1 IP Group(s).
Total 1 MAC Group(s).
Router port(s):
1-19
IP group(s):the following ip group(s) match to one mac group.
IP group address:225.1.1.1
Host port(s):Ethernet1/0/21 Ethernet1/0/24
MAC group(s):
MAC group address:0100-5e01-0101
Host port(s):Ethernet1/0/21 Ethernet1/0/24
Vlan(id):103.
Total 0 IP Group(s).
Total 0 MAC Group(s).
Router port(s):Ethernet1/0/10
As shown above, Ethernet 1/0/21 has become a member port for multicast group 225.1.1.1.
Complete Configuration
Configuration on Switch A
#
multicast routing-enable
#
interface Vlan-interface100
ip address 10.110.1.1 255.255.255.0
igmp enable
pim sm
#
interface Vlan-interface101
ip address 192.168.1.1 255.255.255.0
pim sm
#
interface Vlan-interface102
ip address 192.168.9.1 255.255.255.0
pim sm
#
Configuration on Switch B
#
multicast routing-enable
#
interface Vlan-interface103
ip address 192.168.2.1 255.255.255.0
pim sm
#
interface Vlan-interface200
ip address 10.110.2.1 255.255.255.0
igmp enable
pim sm
#
interface Ethernet1/0/1
1-20
igmp host-join 225.1.1.1 vlan 1
#
Configuration on Switch C
#
multicast routing-enable
#
interface Vlan-interface104
ip address 192.168.3.1 255.255.255.0
pim sm
#
interface Vlan-interface200
ip address 10.110.2.2 255.255.255.0
igmp enable
pim sm
#
Configuration on Switch D
#
acl number 2005
rule 0 permit source 225.1.1.0 0.0.0.255
#
multicast routing-enable
#
interface Vlan-interface101
ip address 192.168.1.2 255.255.255.0
pim sm
#
interface Vlan-interface105
ip address 192.168.4.2 255.255.255.0
pim sm
#
interface Vlan-interface300
ip address 10.110.5.1 255.255.255.0
pim sm
#
pim
c-bsr Vlan-interface105 24 2
c-rp Vlan-interface105 group-policy 2005 priority 2
#
Configuration on Switch E
#
acl number 2005
rule 0 permit source 225.1.1.0 0.0.0.255
#
multicast routing-enable
1-21
#
interface Vlan-interface102
ip address 192.168.9.2 255.255.255.0
pim sm
#
interface Vlan-interface103
ip address 192.168.2.2 255.255.255.0
pim sm
#
interface Vlan-interface104
ip address 192.168.3.2 255.255.255.0
pim sm
#
interface Vlan-interface105
ip address 192.168.4.1 255.255.255.0
pim sm
#
pim
c-bsr Vlan-interface102 24 1
c-rp Vlan-interface102 group-policy 2005 priority 1
#
Configuration on Switch F
#
igmp-snooping enable
#
vlan 100
igmp-snooping enable
#
Precautions
z Only one C-BSR can be configured on a Layer 3 switch. Configuration of a C-BSR on another
interface overwrites the previous configuration.
z It is recommended that C-BSRs and C-RPs be configured on Layer 3 switches in the backbone
network.
z If you do not specify a group range for a C-RP, the C-RP will serve all multicast groups when it
becomes the RP in the domain; otherwise it will serve the specified group range.
z You can configure a basic ACL to filter related multicast IP addresses, thus to control the multicast
group range that a static RP serves.
z If you configure a static RP, you must perform the same configuration on all the routers in the
PIM-SM domain.
z If the configured static RP address is the address of an interface in the up state on the local device,
the local device will serve as a static RP.
z When the elected RP works properly, the static RP does not take effect.
z It is not necessary to enable PIM on the interface that serves as a static RP.
z Configuring a legal BSR address range can prevent the legal BSR from being replaced maliciously.
With a legal BSR address range configured on all Layer 3 switches in the entire network, all these
1-22
switches will discard bootstrap messages from out of the legal address range, thus to safeguard
BSR in the network.
z To guard against C-RP spoofing, you can configure a legal C-RP address range and the range of
multicast groups to be advertised by each C-RP.
Network Diagram
Receiver
Host A
Switch A
Vlan-int100
03
t1
Host B
-in
an
Vl
03
Receiver
t1
in
IGMP querier
-
an
Vl
Switch D Switch B
-i n
t1
Vl 0
an 2
-in
10.110.5.100/24
t1
02
Vlan-int200
PIM-DM
Switch C
Host D
1-23
Networking and Configuration Requirements
z Receivers receive multicast VOD information through multicast. The receiver groups of different
organizations form two stub networks, and at least one receiver host exists in each stub network.
The entire PIM domain operates in the dense mode.
z Host A and Host C are multicast receivers in the two stub networks.
z Switch D connects to the network that comprises the multicast source (Source) through
VLAN-interface 300.
z Switch A connects to stub network N1 through VLAN-interface 100, and to Switch D through
VLAN-interface 103.
z Switch B and Switch C connect to stub network N2 through their respective VLAN-interface 200,
and to Switch D through VLAN-interface 101 and VLAN-interface 102 respectively.
z IGMPv2 needs to run between Switch A and N1, and also between Switch B, Switch C, and N2.
Typically Switch B acts as the querier.
Configuration Procedure
Configuring the interface IP addresses and unicast routing protocol for each switch
Configure the IP address and subnet mask for each interface as perFigure 1-5. The detailed
configuration steps are omitted here.
Configure OSPF for interoperation among the switches in the PIM-DM domain. Ensure the
network-layer interoperation among Switch A, Switch B, Switch C, and Switch D in the PIM-DM domain
and enable dynamic update of routing information among the switches via unicast.
# Enable IP multicast routing on Switch A, enable PIM-DM on each interface, and enable IGMP on
VLAN-interface 100, which connects Switch A to the stub network.
<SwitchA> system-view
[SwitchA] multicast routing-enable
[SwitchA] interface vlan-interface 100
[SwitchA-Vlan-interface100] igmp enable
[SwitchA-Vlan-interface100] pim dm
[SwitchA-Vlan-interface100] quit
[SwitchA] interface vlan-interface 103
[SwitchA-Vlan-interface103] pim dm
[SwitchA-Vlan-interface103] quit
1-24
# Enable multicast routing on Switch D, and enable PIM-DM on each interface.
<SwitchD> system-view
[SwitchD] multicast routing-enable
[SwitchD] interface vlan-interface 300
[SwitchD-Vlan-interface300] pim dm
[SwitchD-Vlan-interface300] quit
[SwitchD] interface vlan-interface 103
[SwitchD-Vlan-interface103] pim dm
[SwitchD-Vlan-interface103] quit
[SwitchD] interface vlan-interface 101
[SwitchD-Vlan-interface101] pim dm
[SwitchD-Vlan-interface101] quit
[SwitchD] interface vlan-interface 102
[SwitchD-Vlan-interface102] pim dm
[SwitchD-Vlan-interface102] quit
Carry out the display pim neighbor command to view the PIM neighboring relationships among the
switches. For example:
# View the PIM neighboring relationships on Switch D.
[SwitchD] display pim neighbor
Neighbor's Address Interface Name Uptime Expires
192.168.1.1 Vlan-interface1 00:47:08 00:01:39
192.168.2.1 Vlan-interface1 00:48:05 00:01:29
192.168.3.1 Vlan-interface1 00:49:08 00:01:34
Use the display pim routing-table command to view the PIM routing information on the switches. For
example:
# View the PIM routing table on Switch A.
<SwitchA> display pim routing-table
PIM-DM Routing Table
Total 1 (S,G) entry
(10.110.5.100, 225.1.1.1)
Protocol 0x40: PIMDM, Flag 0xC: SPT NEG_CACHE
Uptime: 00:00:23, Timeout in 187 sec
Upstream interface: Vlan-interface103, RPF neighbor: 192.168.1.2
Downstream interface list:
Vlan-interface100, Protocol 0x1: IGMP, never timeout
1-25
(10.110.5.100, 225.1.1.1)
Protocol 0x40: PIMDM, Flag 0xC: SPT NEG_CACHE
Uptime: 00:00:23, Timeout in 187 sec
Upstream interface: Vlan-interface300, RPF neighbor: NULL
Downstream interface list:
Vlan-interface101, Protocol 0x200: SPT, timeout in 147 sec
Vlan-interface103, Protocol 0x200: SPT, timeout in 145 sec
Vlan-interface103, Protocol 0x200: SPT, timeout in 145 sec
Complete Configuration
Configuration on Switch A
#
multicast routing-enable
#
interface Vlan-interface100
ip address 10.110.1.1 255.255.255.0.
igmp enable
pim dm
#
interface Vlan-interface103
ip address 192.168.1.1 255.255.255.0
pim dm
#
Configuration on Switch B
#
multicast routing-enable
#
interface Vlan-interface101
ip address 192.168.2.1 255.255.255.0.
pim dm
#
interface Vlan-interface200
ip address 10.110.2.1 255.255.255.0
igmp enable
pim dm
#
Configuration on Switch C
#
multicast routing-enable
#
interface Vlan-interface102
1-26
ip address 192.168.3.1 255.255.255.0.
pim dm
#
interface Vlan-interface200
ip address 10.110.2.2 255.255.255.0
igmp enable
pim dm
#
Configuration on Switch D
#
multicast routing-enable
#
interface Vlan-interface101
ip address 192.168.2.2 255.255.255.0.
pim dm
#
interface Vlan-interface102
ip address 192.168.3.2 255.255.255.0
pim dm
#
interface Vlan-interface103
ip address 192.168.1.2 255.255.255.0
pim dm
#
interface Vlan-interface300
ip address 10.110.5.1 255.255.255.0
pim dm
#
Precautions
When deploying a PIM-DM domain, you are recommended to enable PIM-DM on all interfaces of
non-border routers.
1-27
Network Diagram
1
op
Lo
Vl
an
-in
t1
00
Vl
a n-
in
t1
0 0
Lo
op
1
z The PIM-SM domain in this example has multiple multicast sources and receivers. OSPF needs to
run in the domain to provide unicast routes.
z The anycast RP application needs to be is configured in the PIM-SM domain, so that the last-hop
switch joins the topologically nearest RP.
z An MSDP peering relationship needs to be set up between Switch C and Switch F.
z On Switch C and Switch F, the interface Loopback 1 needs to be configured as a C-BSR, and
Loopback 10 as a C-RP.
z The router ID of Switch C is 1.1.1.1, while the router ID of Switch F is 2.2.2.2.
1-28
Configuration Procedure
Configuring the interface IP addresses and unicast routing protocol for each switch
Configure the IP address and subnet mask for each interface as perFigure 1-6. The detailed
configuration steps are omitted here.
Configure OSPF for interconnection between the switches. The detailed configuration steps are omitted
here.
The configuration on Switch A, Switch B, Switch D, Switch E, Switch F, and Switch G is similar to the
configuration on Switch C. The specific configuration steps are omitted here.
Configuring the IP addresses of interface Loopback 1, Loopback 10, C-BSR, and C-RP
# Configure different Loopback 1 addresses and identical Loopback 10 address on Switch C and Switch
F, configure a C-BSR on each Loopback 1 and configure a C-RP on each Loopback 10.
[SwitchC] interface loopback 1
[SwitchC-LoopBack1] ip address 3.3.3.3 255.255.255.255
[SwitchC-LoopBack1] pim sm
[SwitchC-LoopBack1] quit
[SwitchC] interface loopback 10
[SwitchC-LoopBack10] ip address 10.1.1.1 255.255.255.255
[SwitchC-LoopBack10] pim sm
[SwitchC-LoopBack10] quit
[SwitchC] pim
[SwitchC-pim] c-bsr loopback 1 24
[SwitchC-pim] c-rp loopback 10
[SwitchC-pim] quit
1-29
(10.110.5.100, 225.1.1.1)
Protocol 0x20: PIMSM, Flag 0x80004: SPT
Uptime: 00:00:08, Timeout in 203 sec
Upstream interface: Vlan-interface1, RPF neighbor: NULL
Downstream interface list: NULL
As shown above, the multicast source has been registered on Switch C, which is deemed as the RP.
# View the PIM routing information on Switch F.
<Switch F>dis pim routing-table
PIM-SM Routing Table
Total 0 (S,G) entry, 1 (*,G) entries, 0 (*,*,RP) entry
As shown above, the multicast receiver joins to Switch F, rooted at which an RPT has been established.
However, the RP for the multicast source is different from the RP for the multicast receiver, so the
multicast receiver cannot receive multicast data yet. Anycast RP needs to be configured on these two
RPs.
You can use the display msdp brief command to view the brief information of MSDP peering
relationships between the switches.
# View the brief MSDP peer information on Switch C.
[SwitchC] display msdp brief
MSDP Peer Brief Information
Peer's Address State Up/Down time AS SA Count Reset Count
192.168.3.2 Up 00:48:21 ? 2 0
1-30
# View the brief MSDP peer information on Switch F.
[SwitchF] display msdp brief
MSDP Peer Brief Information
Peer's Address State Up/Down time AS SA Count Reset Count
192.168.1.1 Up 00:50:22 ? 2 0
After the peering relationship is established, the multicast receiver can receive multicast data from the
source.
# View the PIM routing information on Switch C again.
[Switch C] display pim routing-table
PIM-SM Routing Table
Total 1 (S,G) entries, 0 (*,G) entry, 0 (*,*,RP) entry
(10.110.5.100, 225.1.1.1)
Protocol 0x20: PIMSM, Flag 0x80004: SPT
Uptime: 00:00:55, Timeout in 208 sec
Upstream interface: Vlan-interface1, RPF neighbor: NULL
Downstream interface list:
Vlan-interface2, Protocol 0x200: SPT, timeout in 200 sec
(192.168.3.1, 224.1.1.1)
Protocol 0x20: PIMSM, Flag 0x4: SPT
Uptime: 00:02:56, Timeout in 202 sec
Upstream interface: Vlan-interface1, RPF neighbor: 192.168.1.1
Downstream interface list:
Vlan-interface2, Protocol 0x1: IGMP, never timeout
Complete Configuration
Configuration on Switch C
1-31
multicast routing-enable
#
interface Vlan-interface100
ip address 10.110.1.1 255.255.255.0.
pim sm
#
interface Vlan-interface101
ip address 192.168.1.1 255.255.255.0
pim sm
#
interface Vlan-interface103
ip address 10.110.1.1 255.255.255.0
pim sm
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
pim sm
#
interface LoopBack10
ip address 10.1.1.1 255.255.255.255
pim sm
#
pim
c-bsr LoopBack1 24
c-rp LoopBack10
#
msdp
originating-rp Vlan-interface101
peer 192.168.3.2 connect-interface Vlan-interface101
#
Configuration on Switch F
#
multicast routing-enable
#
interface Vlan-interface102
ip address 192.168.3.2 255.255.255.0
pim sm
#
interface Vlan-interface200
ip address 10.110.3.1 255.255.255.0
pim sm
#
interface LoopBack1
ip address 4.4.4.4 255.255.255.255
pim sm
#
1-32
interface LoopBack10
ip address 10.1.1.1 255.255.255.255
pim sm
#
pim
c-bsr LoopBack1 24
c-rp LoopBack10
#
msdp
originating-rp Vlan-interface102
peer 192.168.1.1 connect-interface Vlan-interface102
#
Precautions
Be sure to configure a 32-bit subnet mask (255.255.255.255) for the Anycast RP address, namely
configure the Anycast RP address as a host address.
1-33
Table of Contents
i
1 802.1x Configuration Guide
The following configurations involve most AAA/RADIUS configuration commands. Refer to AAA
Operation for information about the commands. Configurations on the user host and the RADIUS
servers are omitted.
Network Diagram
z The switch authenticate supplicants on the port Ethernet 1/0/1 to control their access to the Internet
by using the MAC-based access control method. That is, each user of a port must be authenticated
separately, and when an authenticated user goes offline, no other users are affected.
z All supplicants belong to the default domain named aabbcc.net, which can accommodate up to 30
users. When authenticating a supplicant, the switch tries the RADIUS scheme first and then the
local scheme if the RADIUS server is not available. A supplicant is disconnected by force if
accounting fails. In addition, the username of a supplicant is not suffixed with the domain name. A
connection is terminated if the total size of the data passes through it during a period of 20 minutes
is less than 2000 bytes.
1-1
z The switch is connected to a server group comprising of two RADIUS servers whose IP addresses
are 10.11.1.1 and 10.11.1.2 respectively. The former operates as the primary authentication server
and the secondary accounting server, while the latter operates as the secondary authentication
server and the primary accounting server. The shared key for authentication message exchange is
name, and that for accounting message exchange is money. If the switch sends a packet to the
RADIUS server but receives no response in 5 seconds, it retransmits the packet for up to 5 times.
The switch sends real-time accounting packets at an interval of 15 minutes. A username is sent to
the RADIUS server with the domain name truncated.
z The username and password for local 802.1x authentication are localuser and localpass (in plain
text) respectively. The idle disconnecting function is enabled.
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
Configuration Procedure
# Set the access control method to MAC-based. This operation can be omitted because MAC-based is
the default.
[Sysname] dot1x port-method macbased interface Ethernet 1/0/1
# Create a RADIUS scheme named radius1 and enter the RADIUS scheme view.
[Sysname] radius scheme radius1
1-2
# Set the shared key for message exchange between the switch and the RADIUS authentication server.
[Sysname -radius-radius1] key authentication name
# Set the shared key for message exchange between the switch and the RADIUS accounting server.
[Sysname-radius-radius1] key accounting money
# Set the interval and the number of packet transmission attempts for the switch to send packets to the
RADIUS server.
[Sysname-radius-radius1] timer 5
[Sysname-radius-radius1] retry 5
# Set the interval for the switch to send real-time accounting packets to the RADIUS server.
[Sysname-radius-radius1] timer realtime-accounting 15
# Configure the switch to send a username without the domain name to the RADIUS server.
[Sysname-radius-radius1] user-name-format without-domain
[Sysname-radius-radius1] quit
# Specify radius1 as the RADIUS scheme of the user domain, and the local authentication scheme as
the backup scheme when the RADIUS server is not available.
[Sysname-isp-aabbcc.net] scheme radius-scheme radius1 local
# Enable the idle disconnecting function and set the related parameters.
[Sysname-isp-aabbcc.net] idle-cut enable 20 2000
[Sysname-isp-aabbcc.net] quit
Complete Configuration
#
domain default enable aabbcc.net
#
dot1x
#
interface Ethernet1/0/1
dot1x
#
radius scheme system
radius scheme radius1
server-type standard
1-3
primary authentication 10.11.1.1
primary accounting 10.11.1.2
secondary authentication 10.11.1.2
secondary accounting 10.11.1.1
key authentication name
key accounting money
timer realtime-accounting 15
timer response-timeout 5
retry 5
user-name-format without-domain
#
domain aabbcc.net
scheme radius-scheme radius1 local
access-limit enable 30
idle-cut enable 20 2000
domain system
#
local-user localuser
password simple localpass
service-type lan-access
#
Precautions
1) 802.1x and the maximum number of MAC addresses that a port can learn are mutually exclusive.
You cannot configure both of them on a port at the same time.
2) You can neither add an 802.1x-enabled port into an aggregation group nor enable 802.1x on a port
which is a member of an aggregation group.
3) When a port uses the MAC-based access control method, users are authenticated individually and
when a user goes offline, no other users are affected. When a port uses the port-based access
control method, once a user passes authentication, all users on the port can access the network.
But if the user gets offline, the port will be disabled and will log off all the other users.
4) If you use the dot1x port-method command to change the port access method, all online users
will be logged off by force.
1-4
Network diagram
A user connects to the switch directly. The switch connects to the Web server and the Internet. The user
will be redirected to the Web server to download the authentication client and upgrade software when
accessing the Internet through IE before passing authentication. After passing authentication, the user
can access the Internet.
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
1-5
Configuration procedure
Complete Configuration
#
dot1x
dot1x url http://192.168.0.111
dot1x free-ip 192.168.0.0 255.255.255.0
dot1x timer acl-timeout 10
#
interface Ethernet1/0/1
dot1x
#
Precautions
1) You must configure the URL for HTTP redirection before configuring a free IP range. A URL must
start with http:// and the segment where the URL resides must be in the free IP range. Otherwise,
the redirection function cannot take effect.
2) You must disable the DHCP-triggered authentication function of 802.1x before configuring a free IP
range.
3) The quick EAD deployment function applies to only ports with the access control mode set to auto
through the dot1x port-control command.
4) At present, 802.1x is the only access approach that supports quick EAD deployment.
1-6
5) Currently, the quick EAD deployment function does not support port security. The configured free
IP range cannot take effect if you enable port security.
1-7
Table of Contents
i
1 AAA Configuration Guide
Network Diagram
Figure 1-1 Network diagram for configuring RADIUS authentication for Telnet users
RADIUS server
10.110.91.164/16
Internet
Telnet user
As shown inFigure 1-1, configure the switch so that Telnet users logging into the switch are
authenticated remotely by the RADIUS server.
z A RADIUS authentication server with an IP address of 10.110.91.164 is connected to the switch.
z On the switch, set the shared key for exchanging messages with the authentication RADIUS server
to aabbcc.
z A CAMS server is used as the RADIUS server. Select extended as the server-type in the RADIUS
scheme.
z On the RADIUS server, set the shared key for exchanging messages with the switch to aabbcc,
configure the authentication port number, and add Telnet usernames and login passwords. Note
that the Telnet usernames added to the RADIUS server must be in the format of userid@isp-name.
1-1
z Configure the switch to include domain names in the usernames to be sent to the RADIUS server in
the RADIUS scheme.
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
Configuration Procedure
Complete Configuration
#
system-view
1-2
#
user-interface vty 0 4
authentication-mode scheme
#
domain cams
access-limit enable 10
quit
#
radius scheme cams
accounting optional
primary authentication 10.110.91.164
key authentication aabbcc
server-type extended
user-name-format with-domain
quit
#
domain cams
scheme radius-scheme cams
Precautions
The Telnet user needs to enter the username with the domain name cams, in the format userid@cams,
so that the user is authenticated according to the configuration of the domain cams.
Network Diagram
Figure 1-2 Network diagram for configuring dynamic VLAN assignment with RADIUS authentication
Eth1/0/1 Eth1/0/4
VLAN 10 VLAN 2
Eth1/0/3 Eth1/0/2
VLAN 1 VLAN 100
Internet
Supplicant
1-3
Networking and Configuration Requirements
You are required to configure the switch so that users logging into the switch are authenticated and
restricted to specific network resources. The detailed requirements are as follows:
z All users must pass authentication to access the network.
z Users can access only VLAN 10 before passing authentication.
z Users passing authentication can access VLAN 100.
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
Switch 4200G V03.02.00 All versions
V03.01.00
Switch 4210 All versions
V03.01.05
Configuration Procedure
# Add users and configure VLAN assignment on the RADIUS server (omitted).
# Create a RADIUS scheme named cams and specify the primary and secondary servers.
<Sysname> system-view
[Sysname] radius scheme cams
[Sysname-radius-cams] primary authentication 192.168.1.19
[Sysname-radius-cams] primary accounting 192.168.1.19
[Sysname-radius-cams] secondary authentication 192.168.1.20
[Sysname-radius-cams] secondary accounting 192.168.1.20
# Set the shared key for message exchange with the authentication and accounting RADIUS servers to
expert.
[Sysname-radius-cams] key authentication expert
[Sysname-radius-cams] key accounting expert
# Create an ISP domain named abc, bind RADIUS scheme cams for authentication, and configure
dynamic VLAN assignment.
[Sysname] domain abc
1-4
[Sysname-isp-abc] radius-scheme cams
[Sysname-isp-abc] vlan-assignment-mode integer
[Sysname-isp-abc] quit
# Enabled 802.1x.
[Sysname] dot1x
Complete Configuration
#
system-view
radius scheme cams
primary authentication 192.168.1.19
primary accounting 192.168.1.19
secondary authentication 192.168.1.20
secondary accounting 192.168.1.20
key authentication expert
key accounting expert
user-name-format with-domain
server-type extended
#
domain abc
radius-scheme cams
vlan-assignment-mode integer
quit
#
domain default enable abc
#
interface Ethernet 1/0/3
dot1x port-method portbased
dot1x guest-vlan 10
#
dot1x
#
interface Ethernet 1/0/3
dot1x
1-5
Precautions
The above describes only the configurations on the switch. Configurations like adding users and
configuring VLAN assignment on the RADIUS server are omitted.
Network Diagram
Figure 1-3 Network diagram for configuring local authentication for Telnet users
Internet
As shown inFigure 1-3, you are required to configure the switch so that Telnet users logging into the
switch are authenticated locally by the switch.
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
Configuration Procedure
1-6
[Sysname-ui-vty0-4] quit
Complete Configuration
#
system-view
#
user-interface vty 0 4
authentication-mode scheme
quit
#
local-user telnet
service-type telnet
password simple aabbcc
attribute idle-cut 300 access-limit 5
domain system
scheme local
Precautions
The Telnet user needs to enter the username with the domain name system (that is, telnet@system),
so that the user is authenticated according to the configuration of the system domain.
The configurations of local authentication for FTP users are similar to those for Telnet users.
1-7
Network Diagram
Figure 1-4 Network diagram for configuring HWTACACS authentication for Telnet users
Authentication server
10.110.91.164/16
Internet
Telnet user
As shown inFigure 1-4, you are required to configure the switch so that Telnet users logging into the
switch are authenticated and authorized by the TACACS servers.
z A TACACS server with the IP address 10.110.91.164 is connected to the switch. It will be used as
the authentication, authorization and accounting server.
z On the switch, set the shared keys for exchanging authentication, authorization and accounting
messages with the TACACS server to expert. Configure the switch to strip domain names off
usernames before sending usernames to the TACACS server.
z On the TACACS server, configure the shared keys to expert for exchanging messages with the
switch, and add Telnet usernames and login passwords.
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
V03.02.03
Switch 5500 All versions
V03.03.01
Configuration Procedure
1-8
[Sysname-hwtacacs-hwtac] quit
Complete Configuration
#
system-view
hwtacacs scheme hwtac
primary authentication 10.110.91.164 49
primary authorization 10.110.91.164 49
key authentication expert
key authorization expert
user-name-format without-domain
quit
#
domain hwtacacs
scheme hwtacacs-scheme hwtac
accounting optional
Precautions
The above describes only the configuration of the HWTACACS scheme on the switch. The
configuration of Telnet users on the HWTACACS server is omitted.
Configuring EAD
Endpoint Admission Defense (EAD) is an attack defense solution. By controlling access of terminals, it
enhances the active defense capability of network endpoints and prevents viruses and worms from
spreading on the network, thus securing the entire network.
With the cooperation of the switch, AAA sever, security policy server and security client, EAD is able to
evaluate the security compliance of network endpoints and dynamically control their access rights.
With EAD, a switch verifies the validity of the session control packets it receives according to the source
IP addresses of the packets:
z It regards only packets from the authentication and security policy servers valid.
z It assigns ACLs according to session control packets, thus controlling the access rights of users
dynamically.
1-9
Network Diagram
Authentication servers
10.110.91.164/16
Eth1/0/1
Internet
User
As shown inFigure 1-5, a user host is connected to Ethernet 1/0/1 on the switch. On the host runs the
802.1x client supporting 3Com EAD extended function. You are required to configure the switch to use
the RADIUS server for remote user authentication and the security policy server for EAD control of
users.
A CAMS server acts as the RADIUS server and another acts as the security policy server.
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
Configuration Procedure
1-10
# Configure a RADIUS scheme.
[Sysname] radius scheme cams
[Sysname-radius-cams] primary authentication 10.110.91.164 1812
[Sysname-radius-cams] accounting optional
[Sysname-radius-cams] key authentication expert
[Sysname-radius-cams] server-type extended
Complete Configuration
#
system-view
domain system
quit
#
radius scheme cams
primary authentication 10.110.91.164 1812
accounting optional
key authentication expert
server-type extended
security-policy-server 10.110.91.166
#
quit
domain system
radius-scheme cams
Precautions
To support all extended functions of CAMS, you are recommended to configure the 802.1x
authentication method as EAP and the RADIUS scheme server type as extended on the switch.
1-11
Table of Contents
i
1 MAC Authentication Configuration Guide
Network Diagram
As illustrated in Figure 1-1, a supplicant is connected to the switch through port Ethernet 1/0/2.
z MAC authentication is required on port Ethernet 1/0/2 to control user access to the Internet.
z All users belong to domain aabbcc.net. The authentication is performed locally and the MAC
address of the PC (00-0d-88-f6-44-c1) is used as both the username and password.
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
V03.02.03
Switch 5500 All versions
V03.03.01
1-1
Hardware
Product series Software version
version
V03.02.00
Switch 4500 All versions
V03.03.00
Configuration Procedure
# Specify the MAC authentication username type as MAC address and the MAC address format as
with-hyphen and lowercase.
[Sysname] mac-authentication authmode usernameasmacaddress usernameformat with-hyphen
lowercase
After configuring the above command, your MAC authentication configuration will take effect
immediately, and Only the user with the MAC address of 00-0d-88-f6-44-c1 is allowed to access the
Internet through port Ethernet 1/0/2. Note that enabling authentication globally is usually the last step in
configuring access control related features. Otherwise, valid users may be denied access to the
networks because of incomplete configuration.
Complete Configuration
1-2
domain default enable aabbcc.net
#
MAC-authentication
MAC-authentication domain aabbcc.net
MAC-authentication authmode usernameasmacaddress usernameformat with-hyphen #
domain aabbcc.net
#
local-user 00-0d-88-f6-44-c1
password simple 00-0d-88-f6-44-c1
service-type lan-access
#
Precautions
z You cannot configure the maximum number of MAC addresses that can be learnt on a MAC
authentication enabled port, or enable MAC authentication on a port that is configured with the
maximum number of MAC addresses that can be learnt.
z You cannot configure port security on a MAC authentication enabled port, or enable MAC
authentication on a port that is configured with port security.
1-3
Table of Contents
i
1 VRRP Configuring Guide
Network Diagram
Host A accesses Host B on the Internet, with the VRRP group consisting of Switch A and Switch B as its
default gateway.
VRRP group settings:
z VRRP group number: 1
z Virtual router IP address of the VRRP group: 202.38.160.111/24.
z Switch A acts as the master.
z Switch B acts as the backup, and works in the preemptive mode.
1-1
Table 1-1 Networking description
Configuration Procedure
1) Configure Switch A.
# Configure VLAN 2.
<LSW-A> system-view
[LSW-A] vlan 2
[LSW-A-vlan2] port Ethernet1/0/6
[LSW-A-vlan2] quit
[LSW-A] interface Vlan-interface 2
[LSW-A-Vlan-interface2] ip address 202.38.160.1 255.255.255.0
[LSW-A-Vlan-interface2] quit
# Enable a VRRP group to respond to ping operations destined for its virtual IP address.
[LSW-A] vrrp ping-enable
2) Configure Switch B.
1-2
# Configure VLAN 2.
<LSW-B> system-view
[LSW-B] vlan 2
[LSW-B-Vlan2] port Ethernet1/0/5
[LSW-B-vlan2] quit
[LSW-B] interface Vlan-interface 2
[LSW-B-Vlan-interface2] ip address 202.38.160.2 255.255.255.0
[LSW-B-Vlan-interface2] quit
# Enable the VRRP group to respond to ping operations destined for its virtual IP address.
[LSW-B] vrrp ping-enable
Complete Configuration
z Configurations on Switch A
#
vrrp ping-enable
#
interface Vlan-interface1
ip address 202.38.160.1 255.255.255.0
vrrp vrid 1 virtual-ip 202.38.160.111
vrrp vrid 1 priority 110
#
interface Ethernet1/0/6
port access vlan 2
#
z Configurations on Switch B
#
vrrp ping-enable
#
interface Vlan-interface1
ip address 202.38.160.2 255.255.255.0
vrrp vrid 1 virtual-ip 202.38.160.111
#
interface Ethernet1/0/5
port access vlan 2
1-3
#
Precautions
z For the IP address owner, its priority in the VRRP group is always 255.
z Do not configure multiple VRRP groups on the same VLAN interface. Otherwise, the VRRP
function will be affected.
z If both switches in the preemptive mode and switches in the non-preemptive mode exist in a VRRP
group, the working mode of the VRRP group conforms to that of the master. For example, if the
master works in the preemptive mode, when the master fails, the VRRP group will elect a new
master through preemption although there are switches working in the non-preemptive mode.
Network Diagram
Host B
10.2.3.1/24
Internet
Vlan-int3
10.100.10.2/24
Switch A Switch B
Vlan-int2 VLAN-int2
202.38.160.1/24 202.38.160.2/24
202.38.160.3/24 202.38.160.4/24
Host A Host C
1-4
Applicable Product Matrix
Configuration Procedure
z Configure Switch A.
# Configure VLAN 2.
<LSW-A> system-view
[LSW-A] vlan 2
[LSW-A-vlan2] port Ethernet1/0/6
[LSW-A-vlan2] quit
[LSW-A] interface Vlan-interface 2
[LSW-A-Vlan-interface2] ip address 202.38.160.1 255.255.255.0
z Configure Switch B.
# Configure VLAN 2.
<LSW-B> system-view
[LSW-B] vlan 2
[LSW-B-vlan2] port Ethernet1/0/6
[LSW-B-vlan2] quit
[LSW-B] interface Vlan-interface 2
[LSW-B-Vlan-interface2] ip address 202.38.160.2 255.255.255.0
Complete Configuration
z Configurations on Switch A
#
1-5
interface Vlan-interface2
ip address 202.38.160.1 255.255.255.0
vrrp vrid 1 virtual-ip 202.38.160.111
vrrp vrid 1 priority 150
vrrp vrid 2 virtual-ip 202.38.160.112
#
interface Ethernet1/0/6
port access vlan 2
#
z Configurations on Switch B
#
interface Vlan-interface2
ip address 202.38.160.2 255.255.255.0
vrrp vrid 1 virtual-ip 202.38.160.111
vrrp vrid 2 virtual-ip 202.38.160.112
vrrp vrid 2 priority 110
#
interface Ethernet1/0/6
port access vlan 2
#
Precautions
z For the IP address owner, its priority in the VRRP group is always 255.
z Multiple-VRRP group configuration is commonly used in real networking, for multiple VRRP groups
can implement load sharing.
z Do not configure multiple VRRP groups on the same VLAN interface. Otherwise, the VRRP
function will be affected.
z If both switches in the preemptive mode and switches in the non-preemptive mode exist in a VRRP
group, the working mode of the VRRP group conforms to that of the master. For example, if the
master works in the preemptive mode, when it fails, the VRRP group will elect a new master
through preemption although there are switches working in the non-preemptive mode.
1-6
Network Diagram
10.2.3.1/24
Internet
Vlan-int3
10.100.10.2/24
LSW A LSW B
202.38.160.3/24
Host A
Switch A is the master and Switch B is the backup in a VRRP group. Both Switch A and Switch B have
an interface connected with the Internet. Configure the VRRP interface tracking function, so that when
the interface connected with the Internet on Switch A becomes unavailable, Switch B can replace
Switch A to act as the gateway even if Switch A is still working.
Set the group number to 1.
Configuration Procedure
z Configure Switch A.
# Configure VLAN 2.
<LSW-A> system-view
[LSW-A] vlan 2
[LSW-A-vlan2] port Ethernet1/0/6
[LSW-A-vlan2] quit
[LSW-A] interface Vlan-interface 2
1-7
[LSW-A-Vlan-interface2] ip address 202.38.160.1 255.255.255.0
[LSW-A-Vlan-interface2] quit
# Enable the VRRP group to respond to ping operations destined for its virtual IP address.
[LSW-A] vrrp ping-enable
# Enable a VRRP group to respond to ping operations destined for its virtual IP address.
[LSW-B] vrrp ping-enable
Normally, Switch A acts as the gateway. When VLAN-interface 3 on Switch A becomes unavailable, the
priority of Switch A decreases by 30, making the priority of Switch A lower than that of Switch B.
Therefore, Switch B preempts and becomes the master to act as the gateway.
When VLAN-interface 3 resumes to work, Switch A becomes the master again to act as the gateway.
Complete Configuration
z Configuration on Switch A
#
vrrp ping-enable
#
interface Vlan-interface2
ip address 202.38.160.1 255.255.255.0
vrrp vrid 1 virtual-ip 202.38.160.111
vrrp vrid 1 priority 110
vrrp vrid 1 track Vlan-interface1 reduced 30
#
interface Ethernet1/0/6
port access vlan 2
1-8
#
z Configurations on Switch B
#
vrrp ping-enable
#
interface Vlan-interface2
ip address 202.38.160.2 255.255.255.0
vrrp vrid 1 virtual-ip 202.38.160.111
#
interface Ethernet1/0/5
port access vlan 2
#
Precautions
z For the IP address owner, its priority in the VRRP group is always 255.
z When configuring VRRP interface tracking, you are recommended to configure the uplink Trunk
port to deny the VLAN that corresponds to the tracked interface.
z When you set the priority decrease value of the master in a VRRP group, make sure that the
master has a lower priority than the backups after the decrease.
Network Diagram
Network
Vlan-int3
10.100.10. 2/24
Master Backup
Virtual IP address Virtual IP address
202.38.160.111/24 202.38.160.111/24
Layer 2 Switch
1-9
Networking and Configuration Requirements
z There are two switches, the master and the backup, in VRRP group 1.
z The IP addresses of the master and the backup are 202.38.160.1 and 202.38.160.2 respectively.
z The master is connected with the upstream network through port Ethernet 1/0/1 that belongs to
VLAN 3, and is connected with a Layer 2 switch through Ethernet 1/0/2 that belongs to VLAN 2.
z The virtual IP address of the VRRP group is 202.38.160.111.
z Enable the port tracking function on Ethernet 1/0/1 of the master and specify that the priority of the
master decreases by 50 when Ethernet 1/0/1 fails, which triggers a new master election in VRRP
group 1.
Configuration Procedure
On the backup, the configurations related to the upstream and downstream device connection, and the
configurations related to the VRRP group have been finished. The configuration procedures are omitted
here.
# Configure VLAN 2.
[Sysname] vlan 2
[Sysname-vlan2] port Ethernet1/0/2
[Sysname-vlan2] quit
[Sysname] interface Vlan-interface 2
[Sysname-Vlan-interface2] ip address 202.38.160.1 255.255.255.0
[Sysname-Vlan-interface2] quit
1-10
# Create VRRP group 1.
[Sysname] interface Vlan-interface 2
[Sysname-Vlan-interface2] vrrp vrid 1 virtual-ip 202.38.160.111
[Sysname-Vlan-interface2] quit
# Enter port view of Ethernet 1/0/1 and enable the VRRP port tracking function.
[Sysname] interface Ethernet1/0/1
[Sysname-Ethernet1/0/1] vrrp Vlan-interface 2 vrid 1 track reduced 50
Complete Configuration
On the master:
#
interface Vlan-interface2
ip address 202.38.160.1 255.255.255.0
vrrp vrid 1 virtual-ip 202.38.160.111
#
interface Vlan-interface3
ip address 10.100.10.2 255.255.255.0
#
interface Ethernet1/0/1
port access vlan 3
vrrp Vlan-interface 2 vrid 1 track reduced 50
#
interface Ethernet1/0/2
port access vlan 2
#
Precautions
z For the IP address owner, its priority in the VRRP group is always 255.
z When you set the priority decrease value of the master in a VRRP group, make sure that the
master has a lower priority than the backups after the decrease.
1-11
Table of Contents
i
1 ARP Configuration Guide
Figure 1-1 ARP attack detection and packet rate limit configuration
As shown in Figure 1-1, Ethernet 1/0/1 of Switch A connects to DHCP Server; Ethernet 1/0/2 connects
to Client A, Ethernet 1/0/3 connects to Client B. Ethernet 1/0/1, Ethernet 1/0/2 and Ethernet 1/0/3
belong to VLAN 1.
z Enable DHCP snooping on Switch A and specify Ethernet 1/0/1 as the DHCP snooping trusted
port.
z Enable ARP attack detection in VLAN 1 to prevent ARP man-in-the-middle attacks, and specify
Ethernet 1/0/1 as the ARP trusted port.
z Enable the ARP packet rate limit function on Ethernet 1/0/2 and Ethernet 1/0/3 of Switch A, so as to
prevent Client A and Client B from attacking Switch A through ARP traffic.
z Enable the port state auto recovery function on the ports of Switch A, and set the recovery interval
to 200 seconds.
z Configuration Procedure
Hardware
Product series Software version
version
Switch 5500G V03.03.01 All versions
Switch 5500 V03.03.01 All versions
1-1
Configuration procedure
# Specify Ethernet 1/0/1 as the DHCP snooping trusted port and the ARP trusted port.
[SwitchA] interface Ethernet1/0/1
[SwitchA-Ethernet1/0/1] dhcp-snooping trust
[SwitchA-Ethernet1/0/1] arp detection trust
[SwitchA-Ethernet1/0/1] quit
# Enable the ARP packet rate limit function on Ethernet 1/0/2, and set the maximum ARP packet rate
allowed on the port to 20 pps.
[SwitchA] interface Ethernet1/0/2
[SwitchA-Ethernet1/0/2] arp rate-limit enable
[SwitchA-Ethernet1/0/2] arp rate-limit 20
[SwitchA-Ethernet1/0/2] quit
# Enable the ARP packet rate limit function on Ethernet 1/0/3, and set the maximum ARP packet rate
allowed on the port to 50 pps.
[SwitchA] interface Ethernet1/0/3
[SwitchA-Ethernet1/0/3] arp rate-limit enable
[SwitchA-Ethernet1/0/3] arp rate-limit 50
[SwitchA-Ethernet1/0/3] quit
# Configure the port state auto recovery function, and set the recovery interval to 200 seconds.
[SwitchA] arp protective-down recover enable
[SwitchA] arp protective-down recover interval 200
Complete Configuration
#
arp protective-down recover enable
arp protective-down recover interval 200
#
vlan 1
arp detection enable
#
interface Ethernet1/0/1
dhcp-snooping trust
arp detection trust
#
interface Ethernet1/0/2
arp rate-limit enable
arp rate-limit 20
1-2
#
interface Ethernet1/0/3
arp rate-limit enable
arp rate-limit 50
#
dhcp-snooping
#
Precautions
z You need to enable DHCP snooping and configure DHCP snooping trusted ports on the switch
before configuring the ARP attack detection function.
z You need to enable the port state auto-recovery feature before you can configure the port state
auto-recovery interval.
z Generally, the uplink port of a switch is configured as a trusted port.
z You are not recommended to configure ARP attack detection or ARP packet rate limit function on
the ports of a fabric or an aggregation group.
Subnet A
Vlan-int1
192.168.10.99/24
Switch
Vlan-int2
192.168.20.99/24
Subnet B
192.168.20.200/16
0000.0c94.36dd
Host C Host D
Network requirements
z Host A belongs to VLAN 1, and the IP address of Host A is 192.168.10.100/16, Host D belongs to
VLAN 2, and the IP address of Host D is 192.168.20.100/16.
z The IP address of VLAN-interface 1 is 192.168.10.99/24, and that of VLAN-interface 2 is
192.168.20.99/24.
z Enable proxy ARP on VLAN-interface 1 and VLAN-interface 2 to realize the communication
between Host A and Host D.
1-3
Applicable Product Matrix
Configuration procedure
Complete Configuration
#
interface Vlan-interface1
arp proxy enable
ip address 192.168.10.99 255.255.255.0
#
interface Vlan-interface2
arp proxy enable
ip address 192.168.20.99 255.255.255.0
#
Precautions
None
1-4
Proxy ARP Configuration in Port Isolation Application
Network diagram
Figure 1-3 Network diagram for Proxy ARP configuration in port isolation application
Network requirements
Configuration procedure
1) Configure Switch B
# Add Ethernet 1/0/1, Ethernet 1/0/2 and Ethernet 1/0/3 to VLAN 2.
<SwitchB> system-view
[SwitchB] vlan 2
[SwitchB-vlan2] port ethernet 1/0/1
[SwitchB-vlan2] port ethernet 1/0/2
[SwitchB-vlan2] port ethernet 1/0/3
[SwitchB-vlan2] quit
# Disable Host A and Host B from communicating with each other at Layer 2.
For details about port isolation, refer to the part discussing port isolation.
[SwitchB] interface ethernet 1/0/2
[SwitchB-Ethernet1/0/2] port isolate
[SwitchB-Ethernet1/0/2] quit
[SwitchB] interface ethernet 1/0/3
1-5
[SwitchB-Ethernet1/0/3] port isolate
[SwitchB-Ethernet1/0/3] quit
2) Configure Switch A
# Configure the IP address of VLAN-interface 2 to be 192.168.10.100/24.
[SwitchA] vlan 2
[SwitchA-vlan2] port ethernet 1/0/1
[SwitchA-vlan2] quit
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] ip address 192.168.10.100 255.255.0.0
# Configure proxy ARP on VLAN-interface 2, enabling Host A and Host B to communicate at Layer 3.
[SwitchA-Vlan-interface2] arp proxy enable
[SwitchA-Vlan-interface2] quit
Complete Configuration
1) Configuration on Switch B
#
vlan 2
#
interface Ethernet1/0/1
port access vlan 2
#
interface Ethernet1/0/2
port access vlan 2
port isolate
#
interface Ethernet1/0/3
port access vlan 2
port isolate
#
2) Configuration on Switch A
#
vlan 2
#
interface Vlan-interface2
arp proxy enable
ip address 192.168.10.100 255.255.0.0
#
interface Ethernet1/0/1
port access vlan 2
#
Precautions
For details about port isolation, refer to the part discussing port isolation.
1-6
Table of Contents
i
DHCP Client Configuration Guide·········································································································1-15
Network Diagram···························································································································1-15
Networking and Configuration Requirements················································································1-15
Applicable Product Matrix··············································································································1-15
Configuration Procedure················································································································1-15
Complete Configuration·················································································································1-16
Precautions····································································································································1-16
ii
1 DHCP Configuration Guide
Network Diagram
Figure 1-1 Network diagram for DHCP server global address pool configuration
z The DHCP server (Switch A) assigns IP addresses to clients in subnet 10.1.1.0/24, which is
subnetted into 10.1.1.0/25 and 10.1.1.128/25.
z The IP addresses of VLAN-interface 1 and VLAN-interface 2 on Switch A are 10.1.1.1/25 and
10.1.1.129/25 respectively.
z In the address pool 10.1.1.0/25, the address lease duration is ten days and twelve hours, the
domain name suffix is aabbcc.com, the DNS server address is 10.1.1.2, the WINS server address
is 10.1.1.4, and the gateway address is 10.1.1.126.
z In the address pool 10.1.1.128/25, the address lease duration is five days, the domain name suffix
is aabbcc.com, the DNS server address is 10.1.1.2, and the gateway address is 10.1.1.254; there
is no WINS server address.
z Enable unauthorized DHCP server detection on Switch A so that the administrator can check out
any unauthorized DHCP servers from the system log information.
1-1
Applicable Product Matrix
Configuration Procedure
# Enable DHCP.
<SwitchA> system-view
[SwitchA] dhcp enable
# Exclude the IP addresses of the DNS server, WINS server, and gateways from dynamic assignment.
[SwitchA] dhcp server forbidden-ip 10.1.1.2
[SwitchA] dhcp server forbidden-ip 10.1.1.4
[SwitchA] dhcp server forbidden-ip 10.1.1.126
[SwitchA] dhcp server forbidden-ip 10.1.1.254
# Configure the address range, domain name suffix and DNS server address in DHCP address pool 0.
[SwitchA] dhcp server ip-pool 0
[SwitchA-dhcp-pool-0] network 10.1.1.0 mask 255.255.255.0
[SwitchA-dhcp-pool-0] domain-name aabbcc.com
[SwitchA-dhcp-pool-0] dns-list 10.1.1.2
[SwitchA-dhcp-pool-0] quit
# Configure the address range, gateway address, and lease duration in DHCP address pool 1.
[SwitchA] dhcp server ip-pool 1
[SwitchA-dhcp-pool-1] network 10.1.1.0 mask 255.255.255.128
[SwitchA-dhcp-pool-1] gateway-list 10.1.1.126
[SwitchA-dhcp-pool-1] expired day 10 hour 12
[SwitchA-dhcp-pool-1] quit
# Configure the address range, lease duration, DNS server address and gateway address in DHCP
address pool 2.
[SwitchA] dhcp server ip-pool 2
[SwitchA-dhcp-pool-2] network 10.1.1.128 mask 255.255.255.128
[SwitchA-dhcp-pool-2] expired day 5
[SwitchA-dhcp-pool-2] nbns-list 10.1.1.4
[SwitchA-dhcp-pool-2] gateway-list 10.1.1.254
[SwitchA-dhcp-pool-2] quit
With the unauthorized DHCP server detection enabled, Switch A will log information about all DHCP
servers, including authorized ones. The administrator needs to find unauthorized DHCP servers from
1-2
the system log information. If Switch A detects an unauthorized DHCP server, the following log
information is recorded.
<SwitchA>
%Apr 10 21:34:55:782 2000 SwitchA DHCPS/4/DHCPS_LOCAL_SERVER:- 1 -
Local DHCP server information(detect by server):SERVER IP = 10.1.1.5; Sourceclient
information: interface = Vlan-interface2, type = DHCP_REQUEST, CHardAddr= 00e0-fc55-0011
Complete Configuration
#
dhcp server ip-pool 0
network 10.1.1.0 mask 255.255.255.0
dns-list 10.1.1.2
domain-name aabbcc.com
#
dhcp server ip-pool 1
network 10.1.1.0 mask 255.255.255.128
gateway-list 10.1.1.126
expired day 10 hour 12
#
dhcp server ip-pool 2
network 10.1.1.128 mask 255.255.255.128
gateway-list 10.1.1.254
nbns-list 10.1.1.4
expired day 5
#
dhcp server forbidden-ip 10.1.1.2
dhcp server forbidden-ip 10.1.1.4
dhcp server forbidden-ip 10.1.1.126
dhcp server forbidden-ip 10.1.1.254
dhcp server detect
#
Precautions
If you use the inheritance relation between the parent and child address pools in this configuration,
make sure that the number of IP addresses to be assigned from a child address pool does not exceed
the number of its total available addresses; otherwise, extra IP addresses will be obtained from the
parent address pool, and the attributes (for example, gateway) of the parent address pool are also
obtained by the clients.
In this example, the number of clients requesting IP addresses from VLAN-interface 1 is recommended
to be less than or equal to 122 and the number of clients requesting IP addresses from VLAN-interface
2 is recommended to be less than or equal to 124.
1-3
DHCP Server Interface Address Pool Configuration Guide
Network Diagram
Figure 1-2 Network diagram for DHCP server interface address pool configuration
Files server Client Client WINS server
192.168.0.10/24 192.168.0.30/24
Vlan-int1
192.168.0.1/24
Switch A
DHCP server
192.168.0.20/24
Client Client DNS server
Configuration Procedure
# Enable DHCP.
<SwitchA> system-view
[SwitchA] dhcp enable
# Exclude the IP addresses of the DNS server, WINS server, and file server from dynamic assignment.
[SwitchA] dhcp server forbidden-ip 192.168.0.10
[SwitchA] dhcp server forbidden-ip 192.168.0.20
[SwitchA] dhcp server forbidden-ip 192.168.0.30
1-4
[SwitchA-Vlan-interface1] ip address 192.168.0.1 24
# Specify the lease duration, DNS server address, and WINS server address in the DHCP interface
address pool.
[SwitchA-Vlan-interface1] dhcp server expired day 10
[SwitchA-Vlan-interface1] dhcp server dns-list 192.168.0.20
[SwitchA-Vlan-interface1] dhcp server nbns-list 192.168.0.30
[SwitchA-Vlan-interface1] quit
Complete Configuration
#
interface Vlan-interface1
ip address 192.168.0.1 255.255.255.0
dhcp select interface
dhcp server static-bind ip-address 192.168.1.10 mac-address 000d-88f7-0001
dhcp server dns-list 192.168.0.20
dhcp server nbns-list 192.168.0.30
dhcp server expired day 10
#
dhcp server forbidden-ip 192.168.0.10
dhcp server forbidden-ip 192.168.0.20
dhcp server forbidden-ip 192.168.0.30
#
Precautions
After all the addresses in the interface address pool have been assigned, the DHCP server looks up IP
addresses from the global address pool containing the network segment of the interface address pool
for the DHCP clients. As a result, the IP addresses obtained from the global address pool and those
obtained from the interface address pool are not on the same network segment, so the clients cannot
communicate with each other.
In this example, the number of clients requesting IP addresses from VLAN-interface 1 is recommended
to be less than or equal to 250.
1-5
clients in multiple networks can use the same DHCP server, which is cost-effective and allows for
centralized management.
Network Diagram
Vlan-int1 Vlan-int2
10.10.1.1/24 10.1.1.2/24
Vlan-int2
10.1.1.1/24
Switch A Switch B
DHCP relay DHCP server
z 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 the IP address of VLAN-interface 2
is 10.1.1.2/24.
z The clients (except Host A, which uses a fixed IP address of 10.10.10.5/24) dynamically obtain IP
addresses from the DHCP server at 10.1.1.1/24.
z Switch A forwards messages between DHCP clients and the DHCP server to assign IP addresses
in subnet 10.10.1.0/24 and related configuration information to the clients.
z Enable the address check function on VLAN 1 of Switch A to allow only the clients with valid fixed
IP addresses or with IP addresses obtained from the DHCP server to access external networks.
Configuration Procedure
# Create DHCP server group 1 and specify DHCP server 10.1.1.1 for it.
<SwitchA> system-view
[SwitchA] dhcp-server 1 ip 10.1.1.1
1-6
# Configure the IP address of VLAN-interface 1 as 10.10.1.1/24.
[SwitchA] interface Vlan-interface 1
[SwitchA-Vlan-interface1] ip address 10.10.1.1 24
# Bind the IP address 10.10.10.5/24 to the MAC address 0001-0010-0001 of Host A on the DHCP relay
agent..
[SwitchA] dhcp-security static 10.10.10.5 0001-0010-0001
Complete Configuration
#
dhcp-server 1 ip 10.1.1.1
#
dhcp-security static 10.10.10.5 0001-0010-0001
#
interface Vlan-interface1
ip address 10.10.1.1 255.255.255.0
dhcp-server 1
address-check enable
#
Precautions
z The DHCP relay agent and server are reachable to each other.
z You need to perform corresponding configurations on the DHCP server to enable the DHCP clients
to obtain IP addresses from the DHCP server. For DHCP server configuration information, refer to
the DHCP Server Global Address Pool Configuration Guide and DHCP Server Interface Address
Pool Configuration Guide.
1-7
z Untrusted: An untrusted port is connected to an unauthorized DHCP server. The DHCP-ACK or
DHCP-OFFER packets received on the port are discarded to prevent DHCP clients from receiving
invalid IP addresses.
Network Diagram
As shown in Figure 1-4, Ethernet 1/0/5 of Switch is connected to the DHCP server, and Ethernet 1/0/1,
Ethernet 1/0/2, and Ethernet 1/0/3 are respectively connected to Client A, Client B, and Client C.
z Enable DHCP snooping on Switch.
z Specify Ethernet 1/0/5 on Switch as a DHCP snooping trusted port.
Configuration Procedure
1-8
[Switch-Ethernet1/0/5] dhcp-snooping trust
[Switch-Ethernet1/0/5] quit
Complete Configuration
#
interface Ethernet1/0/5
dhcp-snooping trust
#
dhcp-snooping
#
Precautions
z You need to specify the port connected to the authorized DHCP server as a trusted port to ensure
that DHCP clients can obtain valid IP addresses. The trusted port and the ports connected to the
DHCP clients must be in the same VLAN.
z To enable DHCP snooping on an S5500G or an S5500 switch that belongs to an XRN fabric, you
need to set the fabric ports on all devices in the fabric to DHCP snooping trusted ports to ensure
that the clients connected to each device can obtain IP addresses.
z You are not recommended to configure both the DHCP client/BOOTP client and DHCP snooping
on the same device; otherwise, the switch may fail to record DHCP snooping entries.
Network Diagram
DHCP server
192.168.10.1/24
Switch A Eth1/0/4
DHCP snooping
Eth1/0/1 Eth1/0/3
Eth1/0/2
1-9
Networking and Configuration Requirements
The work area of an enterprise is divided into three groups, group 1, group 2, and group 3, which are
located in three rooms. A DHCP server is deployed to assign IP addresses of different segments to the
three groups.
It is required that:
z The DHCP server assigns IP addresses on network segment 192.168.10.0/24 to devices in the
work area. The lease time is 12 hours, and the IP addresses of the DNS server and the WINS
server are 192.168.100.2 and 192.168.100.3 respectively.
z Enable DHCP snooping on Switch A and specify Ethernet 1/0/4 as a DHCP snooping trusted port.
z Group 1, group 2 and group 3 are connected to the DHCP snooping device through Ethernet 1/0/1,
Ethernet 1/0/2 and Ethernet 1/0/3 respectively to communicate with the DHCP server.
z Enable Option 82 support on the DHCP snooping device, and put the user group information into
Option 82 of DHCP messages.
z The DHCP server assigns IP addresses ranging from 192.168.10.2 to 192.168.10.25 to clients in
group 1, assigns IP addresses ranging from 192.168.10.100 to 192.168.10.150 to clients in group 2,
and assigns IP addresses ranging from 192.168.10.151 to 192.168.10.200 to clients in group 3.
Configuration Procedure
Configuring Switch A
1-10
[SwitchA-Ethernet1/0/2] dhcp-snooping information remote-id string group2
[SwitchA-GigabitEthernet1/0/2] quit
The DHCP server is configured on a Cisco Catalyst 3745 switch with software version IOS 12.3(11)T2.
To configure a device of another type or version as the DHCP server, refer to the related user manual.
# Enable DHCP server, and configure the DHCP server to assign IP addresses based on Option 82.
Server(config)# service dhcp
Server(config)# ip dhcp use class
# Create a DHCP class for clients in group 1, and specify the corresponding remote ID sub-option for
matching. For the content not to be matched, enter the wildcard ”*”.
Server(config)# ip dhcp class group1
Server(dhcp-class)# relay agent information
Server(dhcp-class-relayinfo)# relay-information hex 0208000600010001*
Server(dhcp-class-relayinfo)# exit
# Create a DHCP class for clients in group 2, and specify the corresponding remote ID sub-option for
matching.
Server(config)# ip dhcp class group2
Server(dhcp-class)# relay agent information
Server(dhcp-class-relayinfo)# relay-information hex 0208000600010002*
Server(dhcp-class-relayinfo)# exit
# Create a DHCP class for clients in group 3 and specify the corresponding remote ID sub-option for
matching.
Server(config)# ip dhcp class group3
Server(dhcp-class)# relay agent information
Server(dhcp-class-relayinfo)# relay-information hex 0208000600010003*
Server(dhcp-class-relayinfo)# exit
# Create a DHCP address pool named office, and specify the lease time, gateway address, DNS
server address, and WINS server address for clients.
1-11
Server(config)# ip dhcp pool office
Server(dhcp-config)# network 192.168.10.0
Server(dhcp-config)# lease 0 12
Server(dhcp-config)# default-router 192.168.10.1
Server(dhcp-config)# dns-server 192.168.100.2
Server(dhcp-config)# netbios-name-server 192.168.100.3
Complete Configuration
#
dhcp-snooping information enable
dhcp-snooping information strategy replace
#
interface Ethernet1/0/1
dhcp-snooping information remote-id string group1
#
interface Ethernet1/0/2
dhcp-snooping information remote-id string group2
#
interface Ethernet1/0/3
dhcp-snooping information remote-id string group3
#
interface Ethernet1/0/4
dhcp-snooping trust
#
dhcp-snooping
#
Precautions
1-12
Network Diagram
z The DHCP server connects to a DHCP client and a RADIUS server through Ethernet 1/0/1 and
Ethernet 1/0/2 respectively.
z Ethernet 1/0/1 belongs to VLAN 2; Ethernet 1/0/2 belongs to VLAN 3.
z The IP address of VLAN-interface 2 is 10.1.1.1/24, that of VLAN-interface 3 is 10.1.2.1/24, and that
of the RADIUS server is 10.1.2.2/24.
z DHCP accounting is enabled on the DHCP server.
z The global DHCP address pool belongs to the network segment 10.1.1.0. The DHCP server
operates as a RADIUS client and adopts AAA for authentication.
Configuration Procedure
# Create VLAN 2.
<Switch> system-view
[Switch] vlan 2
[Switch-vlan2] quit
# Create VLAN 3.
[Switch] vlan 3
[Switch-vlan3] quit
1-13
[Switch-Ethernet1/0/2] quit
# Enter VLAN-interface 2 view and assign the IP address 10.1.1.1/24 to the VLAN interface.
[Switch] interface Vlan-interface 2
[Switch-Vlan-interface2] ip address 10.1.1.1 24
[Switch-Vlan-interface2] quit
# Enter VLAN-interface 3 view and assign the IP address 10.1.2.1/24 to the VLAN interface.
[Switch] interface Vlan-interface 3
[Switch-Vlan-interface3] ip address 10.1.2.1 24
[Switch-Vlan-interface3] quit
# Create a RADIUS scheme and a domain, and then associate the domain with the RADIUS scheme.
[Switch] radius scheme 123
[Switch-radius-123] primary authentication 10.1.2.2
[Switch-radius-123] primary accounting 10.1.2.2
[Switch-radius-123] quit
[Switch] domain 123
[Switch-isp-123] scheme radius-scheme 123
[Switch-isp-123] quit
Complete Configuration
#
radius scheme 123
primary authentication 10.1.2.2
primary accounting 10.1.2.2
#
domain 123
scheme radius-scheme 123
#
dhcp server ip-pool test
network 10.1.1.0 mask 255.255.255.0
accounting domain 123
#
vlan 2
#
vlan 3
#
interface Vlan-interface2
ip address 10.1.1.1 255.255.255.0
#
interface Vlan-interface3
1-14
ip address 10.1.2.1 255.255.255.0
#
interface Ethernet1/0/1
port access vlan 2
#
interface Ethernet1/0/2
port access vlan 3
#
Precautions
Network Diagram
Configuration Procedure
1-15
[SwitchB] interface Vlan-interface 1
Complete Configuration
#
interface Vlan-interface1
ip address dhcp-alloc
#
Precautions
None
1-16
Table of Contents
i
1 ACL Configuration Guide
Network Diagram
PC 1 and PC 2 connect to the switch through Ethernet 1/0/1 (assuming that the switch is an S5500 one).
PC 1’s IP address is 10.1.1.1. Apply an ACL on Ethernet 1/0/1 to deny packets with the source IP
address of 10.1.1.1 from 8:00 to 18:00 everyday.
Configuration Procedure
1-1
# Define basic ACL 2000 to filter packets with the source IP address of 10.1.1.1.
[Sysname] acl number 2000
[Sysname-acl-basic-2000] rule 1 deny source 10.1.1.1 0 time-range test
[Sysname-acl-basic-2000] quit
Complete Configuration
#
acl number 2000
rule 1 deny source 10.1.1.1 0 time-range test
#
interface Ethernet1/0/1
packet-filter inbound ip-group 2000 rule 1
#
time-range test 08:00 to 18:00 daily
#
Precautions
z If a packet matches multiple ACL rules at the same time and some actions of the rules conflict, the
last assigned rule takes effective.
z When applying multiple rules, you are recommended to apply rules in the ascending order of their
mask ranges and apply rues with the same mask range at the same time. This is to ensure that the
actual operation of the rules is consistent with the requirements.
z Some functions and protocols configured on the device may occupy ACL rule resources. The
actual occupation varies with functions and protocols.
1-2
Network Diagram
Different departments of an enterprise are interconnected through a switch (assuming that the switch is
an S5500 one).The IP address of the wage query server is 192.168.1.2. The R&D department is
connected to Ethernet 1/0/1 of the switch. Apply an advanced ACL on the interface to deny access
requests that are sourced from the R&D department and destined for the wage server during working
hours (8:00 to 18:00).
Configuration Procedure
# Define a periodic time range that is from 8:00 to 18:00 on working days.
<Sysname> system-view
[Sysname] time-range test 8:00 to 18:00 working-day
# Define advanced ACL 3000 to filter packets destined for the wage query server.
[Sysname] acl number 3000
[Sysname-acl-adv-3000] rule 1 deny ip destination 192.168.1.2 0 time-range test
[Sysname-acl-adv-3000] quit
1-3
Complete Configuration
#
acl number 3000
rule 1 deny IP destination 192.168.1.2 0 time-range test
#
interface Ethernet1/0/1
packet-filter inbound ip-group 3000 rule 1
#
time-range test 08:00 to 18:00 working-day
#
Precautions
z ACL 3998 and ACL 3999 are reserved for cluster management.
z If a packet matches multiple ACL rules at the same time and some actions of the rules conflict, the
last assigned rule takes effective.
z For an advanced ACL applied to a port, if a rule defines the TCP/UDP port information, the operator
argument can only be eq.
z When applying multiple rules, you are recommended to apply rules in the ascending order of their
mask ranges and apply rues with the same mask range at the same time. This is to ensure that the
actual operation of the rules is consistent with the requirements.
z Some functions and protocols configured on the device may occupy ACL rule resources. The
actual occupation varies with functions and protocols.
Network Diagram
Figure 1-3 Network diagram for Ethernet frame header ACL configuration
PC 1 and PC 2 connect to the switch through Ethernet 1/0/1 (assuming that the switch is an S5500 one).
PC 1’s MAC address is 0011-0011-0011. Apply an Ethernet frame header ACL on the interface to filter
1-4
packets with the source MAC address of 0011-0011-0011 and the destination MAC address of
0011-0011-0012 from 8:00 to 18:00 everyday.
Configuration Procedure
# Define ACL 4000 to filter packets with the source MAC address of 0011-0011-0011 and the destination
MAC address of 0011-0011-0012.
[Sysname] acl number 4000
[Sysname-acl-ethernetframe-4000] rule 1 deny source 0011-0011-0011 ffff-ffff-ffff dest
0011-0011-0012 ffff-ffff-ffff time-range test
[Sysname-acl-ethernetframe-4000] quit
Complete Configuration
#
acl number 4000
rule 1 deny source 0011-0011-0011 ffff-ffff-ffff dest 0011-0011-0012 ffff-ffff-ffff
time-range test
#
interface Ethernet1/0/1
packet-filter inbound link-group 4000 rule 1
#
time-range test 08:00 to 18:00 daily
#
1-5
Precautions
z If a packet matches multiple ACL rules at the same time and some actions of the rules conflict, the
last assigned rule takes effective. For an Ethernet frame header ACL applied to a port, you cannot
configure the format-type argument as 802.3/802.2, 802.3, ether_ii or snap.
z When applying multiple rules, you are recommended to apply rules in the ascending order of their
mask ranges and apply rues with the same mask range at the same time. This is to ensure that the
actual operation of the rules is consistent with the requirements.
z Some functions and protocols configured on the device may occupy ACL rule resources. The
actual occupation varies with functions and protocols.
Network Diagram
z PC 1 and PC 2 are connected to the switch through Ethernet 1/0/1 and Ethernet 1/0/2 respectively
(assuming that the switch is an S5500 one). The IP addresses of PC 1 and PC 2 are 192.168.0.2
and 192.168.0.3.
z PC 1 and PC 2 belong to VLAN 1 and access the Internet through the same gateway, which has an
IP address of 192.168.0.1 (the IP address of VLAN-interface 1).
Configure a user-defined ACL to deny all ARP packets from PC 1 that use the gateway IP address as
the source address from 8:00 to 18:00 everyday.
1-6
Product series Software version Hardware version
V03.02.00
Switch 4500 All versions
V03.03.00
Configuration Procedure
# Define ACL 5000 to deny any ARP packet whose source IP address is 192.168.0.1 from 8:00 to 18:00
everyday (provided that VLAN-VPN is not enabled on any port).In the ACL rule, 0806 is the ARP
protocol number, 16 is the protocol type field offset of the internally processed Ethernet frame,
c0a80001 is the hexadecimal form of 192.168.0.1, and 32 is the source IP address field offset of the
internally processed ARP packet.
[Sysname] acl number 5000
[Sysname-acl-user-5000] rule 1 deny 0806 ffff 16 c0a80001 ffffffff 32 time-range test
Complete Configuration
#
acl number 5000
rule 1 deny 0806 ffff 16 c0a80001 ffffffff 32 time-range test
#
interface Ethernet1/0/1
packet-filter inbound user-group 5000 rule 1
#
time-range test 08:00 to 18:00 daily
#
Precautions
z Some functions and protocols configured on the device may occupy ACL rule resources. The
actual occupation varies with functions and protocols.
z For an S5500 or S4500 series Ethernet switch, if VLAN-VPN is not enabled, each packet in the
switch carries one VLAN tag which is 4 bytes long; If VLAN-VPN is enabled on a port, each packet
in the switch carries two VLAN tags, which are 8 bytes long. Pay attention to the above information
when configuring a rule that matches specific fields of packets.
z For an S5500G series Ethernet switch, each packet in the switch carries two VLAN tags, which are
8 bytes long. Pay attention to the above information when configuring a rule that matches specific
fields of packets.
z The command for defining a user-defined ACL rule is rule [ rule-id ] { deny | permit } [ rule-string
rule-mask offset ] &<1-8> [ time-range time-name ], where, rule-id refers to the ACL number,
1-7
rule-string the user-defined rule string, rule-mask the user-defined rule mask, and offset the rule
mask offset.
z If you specify multiple rule strings in an ACL rule, the valid length of the rule mask is 128
hexadecimal numerals (64 bytes).For example, assume that you specify a rule string of aa and set
its offset to 2. If you continue to specify a rule string of bb, its offset must be in the range from 3 to
65 bytes. If you set the offset of the rule string aa to 3, the offset of the rule string bb must be in the
range of 4 to 66 bytes, and so on. Note that the offset of the rule string bb cannot be greater than 79
bytes.
z As shown in Table 1-1, the hardware rule of the S4500/S5500/S5500G series logically divides the
rule mask offset of a user-defined string into multiple offset units, each of which is 4-byte long.
Available offset units fall into eight groups, which are numbered from Offset1 to Offset8
z With the S4500/S5500/S5500G series, for a user-defined ACL to be assigned successfully, the
maximum length of a user-defined rule string is 32 bytes. The string may or may not contain spaces,
and can occupy up to eight mask offset units. Besides, any two offset units cannot belong to the
same offset group.
Offset unit
z For example, assuming that you configure ACL 5000, specifying a 32-byte rule string, a rule mask
of all Fs, and an offset of 4 and then apply the ACL to Ethernet 1/0/1. In this case, the 32-byte rule
string occupies eight offset units: 4 to 7 (Offset2), 8 to 11 (Offset3), 12 to 15 (Offset4), 16 to 19
(Offset5), 20 to 23 (Offset1), 24 to 27 (Offset7), 28 to 31 (Offset8), and 32 to 35 (Offset6), as shown
in Table 1-1. The rule can be assigned successfully.
z If you configure ACL 5001, specifying a 32-byte rule string, a rule mask of all Fs, and an offset of 24
and then apply the ACL to Ethernet 1/0/1: In this case, the 32-byte rule string does not comply with
the rule that a user-defined rule string can contain up to eight mask offset units and any two offset
units cannot belong to the same offset. The ACL cannot be assigned.
Table 1-2 The common protocol types and their offsets are listed in the following table.
1-8
Offset for S4500 or Offset for 4500 or
Protocol S5500 series S5500 series Offset for S5500G
Protocol
number Ethernet switches Ethernet switches series Ethernet
type
(hexadecimal) with VLAN-VPN with VLAN-VPN switches
function disabled function enabled
RARP 0x8035 16 20 20
IP 0x0800 16 20 20
IPX 0x8137 16 20 20
AppleTalk 0x809B 16 20 20
ICMP 0x01 27 31 31
IGMP 0x02 27 31 31
TCP 0x06 27 31 31
1-9
Table of Contents
i
1 QoS Configuration Guide
Figure 1-1 Network diagram for traffic policing and line rate configuration
A company uses a switch (an S5500 switch in this example) to interconnect all the departments. PC 1
with IP address 192.168.0.1 belongs to the R&D department and is connected to Ethernet 1/0/1 of the
switch; the marketing department is connected to Ethernet 1/0/2 of the switch.
Configure traffic policing and line rate to satisfy the following requirements:
z Limit the total outbound traffic rate of the marketing department and the R&D department to 16000
kbps; drop the packets exceeding the rate limit.
z Limit the rate of the IP packets that PC 1 of the R&D department sends out to 8000 kbps on
Ethernet 1/0/1; drop the packets exceeding the rate limit.
1-1
z The S4210 series do not support traffic policing.
z The S4200G series do not support line rate.
Configuration Procedure
# Limit the rate of the IP packets that PC 1 of the R&D department sends out to 8000 kbps, and drop the
packets exceeding the rate limit.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] traffic-limit inbound ip-group 2000 8000 exceed drop
Complete Configuration
#
acl number 2000
rule 0 permit source 192.168.0.1 0
#
interface Ethernet1/0/1
traffic-limit inbound ip-group 2000 rule 0 8000 exceed drop
#
interface Ethernet1/0/3
line-rate outbound 16000
#
Precautions
Note that:
z The ACL rules configured for traffic classification must be permit statements.
z If packets match ACL rules of multiple traffic policing actions, the traffic policing action issued the
last takes effect.
1-2
z The granularity of traffic policing and line rate is 64 kbps. If the value you input is in the range of N
× 64 to (N + 1) × 64 (N is a natural number), the switch sets the value to (N + 1) × 64 kbps
automatically.
z Traffic policing or rate limiting just limits the traffic rate of payloads (excluding preambles and
interframes).
z When referencing an ACL for traffic policing, you must note that the action that traffic policing takes
on conforming traffic is permit. If a packet matches a permit statement and a deny statement at the
same time, the one issued the last takes effect. If the deny statement takes effect, no traffic policing
action will be performed on the packet.
Figure 1-2 Network diagram for priority marking and queue scheduling configuration
A company uses a switch (an S5500 switch in this example) to interconnect all the departments. PC 1,
PC 2, and PC 3 are clients. PC 1 and PC 2 are connected to Ethernet 1/0/1 of the switch; PC 3 is
connected to Ethernet 1/0/3 of the switch. Server 1, Server 2, and Server 3 are the database server,
mail server, and file server of the company. The three servers are connected to Ethernet 1/0/2 of the
switch.
Configure priority marking and queue scheduling to satisfy the following requirements:
z Configure priority marking on Ethernet 1/0/1 to enable the switch to process traffic flows from PC 1
and PC 2 to the database server, mail server, and file server in the descending order.
z Trust the port priority on Ethernet 1/0/3 and set the port priority of Ethernet 1/0/3 to 5. When PC 1,
PC 2, and PC 3 access servers simultaneously, the traffic from PC 3 is preferentially processed.
1-3
Product series Software version Hardware version
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
Configuration Procedure
# Define traffic classification rules with destination IP address as the match criterion.
[Sysname-acl-adv-3000] rule 0 permit ip destination 192.168.0.1 0
[Sysname-acl-adv-3000] rule 1 permit ip destination 192.168.0.2 0
[Sysname-acl-adv-3000] rule 2 permit ip destination 192.168.0.3 0
[Sysname-acl-adv-3000] quit
1-4
5) Configure queue scheduling
# Configure the switch to adopt the SP queue scheduling algorithm.
[Sysname] queue-scheduler strict-priority
Complete Configuration
#
qos cos-local-precedence-map 0 1 2 3 4 5 6 7
#
queue-scheduler strict-priority
#
acl number 3000
rule 0 permit IP destination 192.168.0.1 0
rule 1 permit IP destination 192.168.0.2 0
rule 2 permit IP destination 192.168.0.3 0
#
interface Ethernet1/0/1
traffic-priority inbound ip-group 3000 rule 0 local-precedence 4
traffic-priority inbound ip-group 3000 rule 1 local-precedence 3
traffic-priority inbound ip-group 3000 rule 2 local-precedence 2
#
interface Ethernet1/0/3
priority 5
#
Precautions
Support for QoS varies by switch model. Follow these guidelines when making QoS configurations on
your switch:
No. Guidelines
For all products listed in Applicable Product Matrix, the ACL rules must be permit
1
statements.
You can achieve priority marking by using the traffic priority command or traffic policing.
The support of the switches listed in Applicable Product Matrix for priority marking varies in
applicable traffic directions, supported priority types, and configuration views:
2 z When using the traffic priority command to configure priority marking, refer to Table
1-2 for your device’s support for priority marking.
z When using traffic policing to configure priority marking, refer to Table 1-3 for your
device’s support for priority marking.
If both the traffic-priority command and traffic policing are configured for marking DSCP
precedence/802.1p priority for the packets of the same type on a port, the priority marking
3 configuration that applies depends on your switch model.
z On an S5500 series, or S5500G series switch the last issued configuration applies.
z On an S4210 series switch, the first issued configuration applies.
1-5
No. Guidelines
You may configure your switch to trust port priority or packet priority, as described below:
1) When trusting port priority, the switch replaces the 802.1p priority of each incoming
packet with the priority of the receiving port, searches for the local precedence
corresponding to the port priority in the 802.1p-to-local precedence mapping table,
and assigns the local precedence to the packet.
2) When trusting packet priority, the switch uses the 802.1p priority, DSCP precedence,
or IP precedence of incoming packets for local precedence mapping, depending on its
4 supported priority types and your configuration. (For a switch’s support for trusted
packet priority types and the priority mapping tables, refer to the operation manual of
your switch.)
z The switch searches the local precedence corresponding to the selected type of priority
of each received packet in the corresponding priority mapping table, and then assigns
the local precedence (also drop precedence on the S4210 series) to the packet.
z If you configure your switch to trust packet priority without specifying the trusted priority
type, the switch trusts the 802.1p priority of received packets.
The number of output queues on a port and support for queue scheduling algorithms and
queue scheduling modes depend on your switch model.
5
z Refer to Table 1-4 for a switch model’s support for queuing.
z Refer to Table 1-5 for the introduction to each queue scheduling mode.
Priority marking
Table 1-2 Support for priority marking achieved with the traffic-priority command
System view,
802.1p priority, DSCP VLAN-interface view,
S4200G series inbound
precedence port group view, port
view
Table 1-3 Support for priority marking achieved with traffic policing
1-6
Product series Direction Marked priority types View
System view,
802.1p priority, DSCP VLAN-interface view,
S4200G series Inbound
precedence port group view, port
view
Queuing
Supported queue
Supported queue
Product series Number of queues scheduling
scheduling modes
algorithms
S5500G series 8 SP, WRR SP, WRR, SP+WRR
SP, WRR, WFQ,
S5500 series 8 SP, WRR, WFQ
SP+WRR, SP+WFQ
SP, WRR, WFQ,
S4500 series 8 SP, WRR, WFQ
SP+WRR, SP+WFQ
SP, SDWRR,
S4200G series 8 SP, WRR, SDWRR
SP+SDWRR
S4210 series 4 WRR, HQ-WRR WRR, HQ-WRR
Queue scheduling
Description
modes
Strict priority (SP) queuing schedules queues strictly in the descending order
of priority. Packets in a queue with a lower priority are sent only when the
queue with a higher priority is empty.
z You are recommended to assign business critical packets to the queues
with higher priority and assign non-critical service (such as e-mail) packets
SP to the queues with lower priority to ensure that critical packets are sent
preferentially and non-critical packets are sent when no critical packets
are waiting for transmission.
z If a large amount of packets are waiting for transmission in the queues with
higher-priority, the packets in the queues with lower priority may fail to be
served for a long time.
The WRR queue scheduling algorithm schedules all the queues in turn and
every queue can be assured of a certain amount of service time.
z WRR avoids the disadvantage of SP queue scheduling that the packets in
WRR queues with lower priority may fail to get served for a long time.
z While the queues are scheduled in turn, the service time for each queue is
not fixed. In WRR, if a queue is empty, the next queue will be scheduled
immediately. Thus, the use of bandwidth resources is efficient.
z You are recommended to use the default WRR settings.
1-7
Queue scheduling
Description
modes
WFQ classifies packets to multiple flows, assigns a flow to a queue, and tries
to assign different flows to different queues.
z The number of WFQ queues is configurable, but it cannot exceed the
WFQ maximum number of queues supported on your device.
z When dequeuing packets, WFQ assigns the outgoing interface bandwidth
to each traffic flow by the precedence. The higher precedence value a
traffic flow has, the more bandwidth it gets. In this way, queues of different
weights get bandwidth proportional to their weights.
On a switch listed in Table 1-4, if a port uses the SP+WRR queue scheduling
mode, queues with weight 0 are scheduled preferentially by SP, and the
SP+WRR
remaining queues are scheduled by WRR when the queues with weight 0 are
all empty.
On a switch listed in Table 1-4, if a port uses the SP+WFQ queue scheduling
mode, queues with weight 0 are scheduled preferentially by SP, and the
SP+WFQ
remaining queues are scheduled by WFQ when the queues with weight 0 are
all empty.
SDWRR provides two groups, that is, group 1 and group 2. You can assign
every queue to a group as needed.
z When using the SDWRR queue scheduling mode, you are recommended
to assign contiguous queues to the same SDWRR group.
z When packets are scheduled, queues in the same group are scheduled in
round-robin fashion; the two groups are scheduled by SP, that is, the
group containing the highest-priority queue is scheduled preferentially.
SDWRR Queue priority increases in the order of queue 0 to queue 7.
Assuming you assign queues 0 through 3 to group 1, and queues 4 through 7
to group 2,
z The system preferentially schedules the queues in group 2 in round-robin
fashion.
z The system schedules the queues in group 1 in round-robin fashion when
group 2 is empty.
When using the SP+SDWRR queue scheduling mode, you can assign a
queue to the SP group, SDWRR group 1, or SDWRR group 2 as needed.
z When using the SP+SDWRR queue scheduling mode, you are
recommended to assign contiguous queues to the same group.
z When packets are scheduled, queues in the same SDWRR group are
scheduled in round-robin fashion; the three groups are scheduled by SP,
that is, the group containing the highest-priority queue is scheduled
preferentially. Queue priority increases in the order of queue 0 to queue 7.
For example, assuming you assign queue 0, queue 1, queue 6, and queue 7
SP+SDWRR to the SP group, queue 2 and queue 3 to SDWRR group 1, and queue 5 and
queue 6 to SDWRR group 2,
z The system schedules queue 7 preferentially.
z When queue 7 is empty, the system schedules queue 6.
z When queue 6 is empty, the system schedules the queues in SDWRR
group 2 in round-robin fashion.
z When SDWRR group 2 is empty, the system schedules the queues in
SDWRR group 1 in round-robin fashion.
z When SDWRR group 1 is empty, the system schedules queue 1.
z When queue 1 is empty, the system schedules queue 0.
HQ-WRR is implemented based on WRR. HQ-WRR selects queue 3 as the
high-priority queue from the four output queues. If the bandwidth occupied by
HQ-WRR the four queues exceeds the interface bandwidth, packets in queue 3 are
preferentially transmitted, and then the remaining three queues are
scheduled with WRR.
1-8
Configuring Traffic Redirecting and Traffic Accounting
Network Diagram
Figure 1-3 Network diagram for traffic redirecting and traffic accounting configuration
To the router
PC 1
192.168.0.1
Eth1/0/1 Eth1/0/2
Switch
Data monitoring device
PC 2
A company uses a switch (an S5500 switch in this example) to interconnect all the departments. The
network is described as follows:
z PC 1 and PC 2 are connected to Ethernet 1/0/1 of the switch. The IP address of PC 1 is
192.168.0.1.
z The data monitoring device is connected to Ethernet1/0/2 of the switch.
Configure traffic redirecting and traffic accounting to satisfy the following requirements:
z From 8:30 to 18:00 in working days, redirect the HTTP traffic from PC 1 to the Internet to the data
monitoring device for analysis.
z During non-working time, count the HTTP traffic from PC 1 to the Internet.
Configuration Procedure
1-9
# Create time range tr2, setting is to become active during non-working time.
[Sysname] time-range tr2 00:00 to 8:30 working-day
[Sysname] time-range tr2 18:00 to 24:00 working-day
[Sysname] time-range tr2 00:00 to 24:00 off-day
2) Define traffic classification rules
# Create advanced ACL 3000 and enter advanced ACL view.
<Sysname> system-view
[Sysname] acl number 3000
# Define traffic classification rules to classify the HTTP traffic from PC 1 to the Internet.
[Sysname-acl-adv-3000] rule 0 permit tcp source 192.168.0.1 0 destination-port eq 80
time-range tr1
[Sysname-acl-adv-3000] rule 1 permit tcp source 192.168.0.1 0 destination-port eq 80
time-range tr2
[Sysname-acl-adv-3000] quit
Support for traffic redirecting on the products listed in Applicable Product Matrix varies:
z The S5500 series switch support traffic redirecting in both the inbound and outbound directions.
z The other products support traffic redirecting only in the inbound direction.
Complete Configuration
#
acl number 3000
rule 0 permit TCP source 192.168.0.1 0 destination-port eq www time-range tr1
rule 1 permit TCP source 192.168.0.1 0 destination-port eq www time-range tr2
#
interface Ethernet1/0/1
traffic-redirect inbound ip-group 3000 rule 0 interface Ethernet1/0/2
traffic-statistic inbound ip-group 3000 rule 1
#
time-range tr2 00:00 to 08:30 working-day
time-range tr2 18:00 to 24:00 working-day
time-range tr2 00:00 to 24:00 off-day
time-range tr1 08:30 to 18:00 working-day
1-10
#
Precautions
Note that:
z The ACL rules configured for traffic classification must be permit statements.
z When redirecting a packet, the switch processes the packet with the forwarding mechanism
instead of leaving it intact.
z With traffic redirecting configured, the switch does not forward the packets to be redirected as
usual.
z The packets received on the destination port for redirection are tagged.
1-11
2 QoS Profile Configuration Guide
Network
Switch
User
A company uses a switch (an S5500 switch in this example) to interconnect all the departments. The
802.1x protocol is used to authenticate the users and control user access to the network resources. A
user named someone in the test.net domain is connected to Ethernet 1/0/1 of the switch. Its password
is hello.
Configure a QoS profile to limit the outgoing IP traffic rate of the user someone to 128 kbps after the
user passes the 802.1x authentication, and drop the packets exceeding the rate limit.
Configuration Procedure
2-1
Configure authentication information and user name-to-QoS-profile mapping for the user on the AAA
server. Refer to the guide to AAA Server configuration for detailed information.
2) Configuration on the switch
# Configure the IP address information of the RADIUS server as 10.11.1.1.
<Sysname> system-view
[Sysname] radius scheme radius1
[Sysname-radius-radius1] primary authentication 10.11.1.1
[Sysname-radius-radius1] primary accounting 10.11.1.1
# Configure the encryption keys as money for the switch to exchange packets with the authentication
RADIUS server and the accounting RADIUS server.
[Sysname-radius-radius1] key authentication money
[Sysname-radius-radius1] key accounting money
# Enable the switch to remove the domain name from the fully qualified user name and then send the
unqualified user name to the RADIUS sever.
[Sysname-radius-radius1] user-name-format without-domain
[Sysname-radius-radius1] quit
# Create the user domain test.net and specify radius1 as the RADIUS server group for the domain
user.
[Sysname] domain test.net
[Sysname-isp-test.net] radius-scheme radius1
[Sysname-isp-test.net] quit
# Create advanced ACL 3000 and define a classification rule to match IP packets destined for any IP
address.
[Sysname] acl number 3000
[Sysname-acl-adv-3000] rule 1 permit ip destination any
[Sysname-acl-adv-3000] quit
# Configure a QoS profile to limit the rate of the conforming traffic to 128 kbps and drop the packets
exceeding the rate limit.
[Sysname] qos-profile example
[Sysname-qos-profile-example] traffic-limit inbound ip-group 3000 128 exceed drop
# Enable 802.1x.
[Sysname] dot1x
[Sysname] dot1x interface Ethernet 1/0/1
Complete Configuration
#
dot1x
#
radius scheme system
radius scheme radius1
server-type standard
primary authentication 10.11.1.1
primary accounting 10.11.1.1
key authentication money
2-2
key accounting money
user-name-format without-domain
#
domain system
domain test.net
scheme radius-scheme radius1
#
acl number 3000
rule 0 permit IP
#
qos-profile example
traffic-limit inbound ip-group 3000 rule 0 128 exceed drop
#
interface Ethernet1/0/1
dot1x
#
Precautions
Note that:
z A QoS profile can be applied manually or dynamically. You can use the apply qos-profile
profile-name command to manually apply a QoS profile to a port. You can also combine a QoS
profile with the 802.1x authentication function to provide the pre-defined QoS function for a user or
a group of users that have passed authentication.
z Depending on the 802.1x authentication mode, dynamic QoS profile application mode can be
user-based or port-based. The user-based mode is the default mode.
z If the traffic classification rules of a QoS profile take source information (including source MAC,
source IP, VLAN) as the match criterion, the QoS profile cannot be applied in the user-based
mode.
z Currently, the QoS profile function provides packet filtering, traffic policing, and priority marking.
z The granularity of traffic policing is 64 kbps. If the value you input is in the range of N × 64 to (N + 1)
× 64 (where N is a natural number), the switch sets the value to (N + 1) × 64 kbps automatically.
2-3
Table of Contents
i
1 Web Cache Redirection Configuration Guide
Network Diagram
Internet
VLAN 40
Web Cache Server
Router 192.168.4.2
0012-0990-2250
VLAN50
Eth1/0/5
Eth1/0/4
Eth1/0/1
Eth1/0/3
Eth1/0/2
Switch
1-1
z The Web cache server belongs to VLAN 40 and is connected to Ethernet 1/0/4 of the switch. The IP
address of the VLAN interface for VLAN 40 is 192.168.4.1/24. The IP address and the MAC
address of the Web cache server is 192.168.4.2 and 0012-0990-2250.
z The router is connected to Ethernet 1/0/5 of the switch. The switch accesses the Internet through a
router. Ethernet 1/0/5 belongs to VLAN 50 whose VLAN interface is assigned IP address
192.168.5.1/24.
Enable Web cache redirection on the switch to redirect all the HTTP packets of the three departments to
the Web cache server, thus reducing the load on the WAN link and improving the speed of obtaining
information from the Internet.
Configuration Procedure
# Create VLAN 10 for the marketing department and configure the IP address of VLAN-interface 10 as
192.168.1.1.
<Sysname> system-view
[Sysname] vlan 10
[Sysname-vlan10] port Ethernet 1/0/1
[Sysname-vlan10] quit
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] ip address 192.168.1.1 24
[Sysname-Vlan-interface10] quit
# Create VLAN 20 for the R&D department and configure the IP address of VLAN-interface 20 as
192.168.2.1.
[Sysname] vlan 20
[Sysname-vlan20] port Ethernet 1/0/2
[Sysname-vlan20] quit
[Sysname] interface Vlan-interface 20
[Sysname-Vlan-interface20] ip address 192.168.2.1 24
[Sysname-Vlan-interface20] quit
# Create VLAN 30 for the administration department and configure the IP address of VLAN-interface 30
as 192.168.3.1.
[Sysname] vlan 30
[Sysname-vlan30] port Ethernet 1/0/3
[Sysname-vlan30] quit
[Sysname] interface Vlan-interface 30
[Sysname-Vlan-interface30] ip address 192.168.3.1 24
[Sysname-Vlan-interface30] quit
# Create VLAN 40 for the Web cache server and configure the IP address of VLAN-interface 40 as
192.168.4.1.
1-2
[Sysname] vlan 40
[Sysname-vlan40] port Ethernet 1/0/4
[Sysname-vlan40] quit
[Sysname] interface Vlan-interface 40
[Sysname-Vlan-interface40] ip address 192.168.4.1 24
[Sysname-Vlan-interface40] quit
# Create VLAN 50 for the switch to connect to the router and configure the IP address of VLAN-interface
50 as 192.168.5.1.
[Sysname] vlan 50
[Sysname-vlan50] port Ethernet 1/0/5
[Sysname-vlan50] quit
[Sysname] interface Vlan-interface 50
[Sysname-Vlan-interface50] ip address 192.168.5.1 24
[Sysname-Vlan-interface50] quit
# Configure Ethernet 1/0/4, the port connected to the Web cache server, as a trunk port, and configure
the port to permit the packets of VLAN 40 and VLAN 50 to pass through.
[Sysname] interface Ethernet 1/0/4
[Sysname-Ethernet1/0/4] port link-type trunk
[Sysname-Ethernet1/0/4] port trunk permit vlan 40 50
[Sysname-Ethernet1/0/4] quit
# Enable Web cache redirection to redirect all the HTTP packets received from VLAN 10, VLAN 20, and
VLAN 30 to the Web cache server.
[Sysname] webcache address 192.168.4.2 mac 0012-0990-2250 vlan 40 port Ethernet 1/0/4
[Sysname] webcache redirect-vlan 10
[Sysname] webcache redirect-vlan 20
[Sysname] webcache redirect-vlan 30
Complete Configuration
#
vlan 10
#
vlan 20
#
vlan 30
#
vlan 40
#
vlan 50
#
interface Vlan-interface10
ip address 192.168.1.1 255.255.255.0
#
interface Vlan-interface20
ip address 192.168.2.1 255.255.255.0
#
interface Vlan-interface30
1-3
ip address 192.168.3.1 255.255.255.0
#
interface Vlan-interface40
ip address 192.168.4.1 255.255.255.0
#
interface Vlan-interface50
ip address 192.168.5.1 255.255.255.0
#
interface Ethernet1/0/1
port access vlan 10
#
interface Ethernet1/0/2
port access vlan 20
#
interface Ethernet1/0/3
port access vlan 30
#
interface Ethernet1/0/4
port link-type trunk
port trunk permit vlan 1 40 50
webcache address 192.168.4.2 mac 0012-0990-2250 vlan 40
#
interface Ethernet1/0/5
port access vlan 50
#
webcache redirect-vlan 10
webcache redirect-vlan 20
webcache redirect-vlan 30
#
Precautions
1-4
Table of Contents
i
1 Mirroring Configuration
Network Diagram
The departments of a company connect to each other through S5500 Ethernet switches:
z Research and Development (R&D) department is connected to Switch C through Ethernet 1/0/1.
z Marketing department is connected to Switch C through Ethernet 1/0/2.
z Data monitoring device is connected to Switch C through Ethernet 1/0/3.
The administrator wants to monitor the packets received on and sent from the R&D department and the
marketing department through the data monitoring device.
Use the local port mirroring function to meet the requirement. Perform the following configurations on
Switch C.
z Configure Ethernet 1/0/1 and Ethernet 1/0/2 as mirroring source ports.
z Configure Ethernet 1/0/3 as the mirroring destination port.
1-1
Product series Software version Hardware version
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
Configuration Procedure
Configure Switch C:
# Create a local mirroring group.
<Sysname> system-view
[Sysname] mirroring-group 1 local
# Configure the source ports and destination port for the local mirroring group.
[Sysname] mirroring-group 1 mirroring-port Ethernet 1/0/1 Ethernet 1/0/2 both
[Sysname] mirroring-group 1 monitor-port Ethernet 1/0/3
Complete Configuration
#
mirroring-group 1 local
#
interface Ethernet1/0/1
mirroring-group 1 mirroring-port both
#
interface Ethernet1/0/2
mirroring-group 1 mirroring-port both
#
interface Ethernet1/0/3
mirroring-group 1 monitor-port
#
Precautions
1-2
z When you configure a mirroring destination port on an S5500 series Ethernet switch, if mirroring
group 1 does not exist on the switch, the switch will automatically create local mirroring group 1 and
add the destination port to the group; if port mirroring group 1 already exists but is not a local
mirroring group, your configuration of the destination port will fail.
z On an S4500 series Ethernet switch, if you execute the monitor-port command on different ports
to configure the mirroring destination port for the switch, the last configuration takes effect.
Switches involved in remote port mirroring play one of the following three roles:
z Source switch: The monitored port resident switch. It copies traffic to the reflector port, which then
transmits the traffic to an intermediate switch or the destination switch through the remote-probe
VLAN.
z Intermediate switch: Switches between the source switch and the destination switch on the
network. An intermediate switch forwards mirrored traffic to the next intermediate switch or the
destination switch through the remote-probe VLAN. No intermediate switch is present if the source
switch and the destination switch are directly connected to each other.
z Destination switch: The remote mirroring destination port resident switch. It forwards mirrored
traffic received from the remote-probe VLAN to the monitoring device through the destination port.
1-3
Network Diagram
The departments of a company connect to each other through S5500 Ethernet switches:
z Switch A, Switch B, and Switch C are S5500 series switches.
z Department 1 is connected to Ethernet 1/0/1 of Switch A.
z Department 2 is connected to Ethernet 1/0/2 of Switch A.
z Ethernet 1/0/3 of Switch A connects to Ethernet 1/0/1 of Switch B.
z Ethernet 1/0/2 of Switch B connects to Ethernet 1/0/1 of Switch C.
z Data monitoring device is connected to Ethernet 1/0/2 of Switch C.
The administrator wants to monitor the packets sent from Department 1 and 2 through the data
monitoring device.
Use the remote port mirroring function to meet the requirement. Perform the following configurations:
z Use Switch A as the source switch, Switch B as the intermediate switch, and Switch C as the
destination switch.
z On Switch A, create a remote source mirroring group, configure VLAN 10 as the remote-probe
VLAN, ports Ethernet 1/0/1 and Ethernet 1/0/2 as the source ports, and port Ethernet 1/0/4 as the
reflector port.
z On Switch B, configure VLAN 10 as the remote-probe VLAN.
z Configure Ethernet 1/0/3 of Switch A, Ethernet 1/0/1 and Ethernet 1/0/2 of Switch B, and Ethernet
1/0/1 of Switch C as Trunk ports, allowing packets of VLAN 10 to pass.
z On Switch C, create a remote destination mirroring group, configure VLAN 10 as the remote-probe
VLAN, and configure Ethernet 1/0/2 connected with the data monitoring device as the destination
port.
1-4
Product series Software version Hardware version
V03.02.00
Switch 4500 All versions
V03.03.00
Switch 4200G V03.02.00 All versions
Configuration Procedure
# Configure the source ports, reflector port, and remote-probe VLAN for the remote source mirroring
group.
[Sysname] mirroring-group 1 mirroring-port Ethernet 1/0/1 Ethernet 1/0/2 inbound
[Sysname] mirroring-group 1 reflector-port Ethernet 1/0/4
[Sysname] mirroring-group 1 remote-probe vlan 10
1-5
# Configure VLAN 10 as the remote-probe VLAN.
[Sysname] vlan 10
[Sysname-vlan10] remote-probe vlan enable
[Sysname-vlan10] quit
# Configure the destination port and remote-probe VLAN for the remote destination mirroring group.
[Sysname] mirroring-group 1 monitor-port Ethernet 1/0/2
[Sysname] mirroring-group 1 remote-probe vlan 10
Complete Configuration
1-6
interface Ethernet1/0/2
port link-type trunk
port trunk permit vlan 1 10
#
3) Configuration on the destination switch (Switch C)
#
mirroring-group 1 remote-destination
#
vlan 10
remote-probe vlan enable
#
interface Ethernet1/0/1
port link-type trunk
port trunk permit vlan 1 10
#
interface Ethernet1/0/2
port access vlan 10
mirroring-group 1 monitor-port
#
Precautions
1-7
Note the following when configuring the destination switch:
z Packets sent from the switch CPU cannot be mirrored.
z Packets received on the destination port are those processed and forwarded by the switch.
z The destination port to be configured cannot be a member port of an existing mirroring group; a
fabric port (only the S5500/S5500G series Ethernet switches have this limitation), a member port of
an aggregation group, an LACP enabled port, or an STP enabled port.
z Only an existing static VLAN can be configured as the remote-probe VLAN. To remove a
remote-probe VLAN, you need to restore it to a normal VLAN first. A remote port mirroring group
gets invalid if the corresponding remote-probe VLAN is removed.
Network Diagram
The departments of a company connect to each other through S5500 series Ethernet switches:
z PC 1 and PC 2 are connected to Switch through Ethernet 1/0/1. The IP address of PC 1 is
192.168.0.1.
z Data monitoring device is connected to Ethernet 1/0/2 of Switch.
The administrator wants to monitor packets sent from PC 1 through the data monitoring device.
Use the traffic mirroring function to meet the requirement. Perform the following configurations on
Switch:
z Configure traffic mirroring on Ethernet 1/0/1. Mirror packets matching source IP address
192.168.0.1 to the destination port.
z Configure Ethernet 1/0/2 as the destination port of traffic mirroring.
1-8
Product series Software version Hardware version
V03.02.03
Switch 5500 All versions
V03.03.01
Switch 4200G V03.02.00 All versions
Configuration Procedure
# Configure a basic ACL 2000, matching the packets whose source IP address is 192.168.0.1.
<Sysname> system-view
[Sysname] acl number 2000
[Sysname-acl-basic-2000] rule permit source 192.168.0.1 0
[Sysname-acl-basic-2000] quit
# Configure traffic mirroring on Ethernet 1/0/1. Mirror packets matching source IP address 192.168.0.1
to the destination port.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] mirrored-to inbound ip-group 2000 monitor-interface
[Sysname-Ethernet1/0/1] quit
Complete Configuration
#
mirroring-group 1 local
#
acl number 2000
rule 0 permit source 192.168.0.1 0
#
interface Ethernet1/0/1
mirrored-to inbound ip-group 2000 rule 0 monitor-interface
#
interface Ethernet1/0/2
mirroring-group 1 monitor-port
#
Precautions
i
1 XRN Fabric Configuration Guide
To ensure the normal operation of your XRN fabric, you must build it with the switches of the same
family.
Network Diagram
Configure unit ID, unit name, XRN fabric name, and fabric authentication mode for three switches to
enable them to form an XRN fabric.
The configuration details are as follows:
z Unit IDs for Switch A, Switch B and Switch C are 1, 2 and 3 respectively;
z Unit names of the three switches are Unit1, Unit2 and Unit3 respectively. The fabric name is hello;
z Fabric authentication mode is simple and password is welcome.
1-1
The Switch 5500G series switches do not support the fabric authentication function.
Before connecting switches to form a fabric, you are recommended to complete the configurations
described in section Configuration Procedure on them.
Fabric cable connection for the Switch 4500 family and the Switch 5500 family
When connecting Switch 4500 units or Switch 5500 units to form an XRN fabric, follow these guidelines:
z Connect the switches with their fabric ports.
z Each Switch 4500 or Switch 5500 unit has two fabric ports: left port and right port. Given a switch,
connect its left port to the right port of another switch, and its right port to the left port of a third one.
On the Switch 4500 or the Switch 5500, only four GigabitEthernet ports can be configured as fabric
ports. The four ports fall into two groups according to their port numbers:
z GigabitEthernet 1/1/1 and GigabitEthernet 1/1/2 form the first group.
z GigabitEthernet 1/1/3 and GigabitEthernet 1/1/4 form the second group.
Only one group of ports can be configured as fabric ports at a time. GigabitEthernet 1/1/1 and
GigabitEthernet 1/1/3 are the left fabric ports of the first and the second group respectively, and
GigabitEthernet 1/1/2 and GigabitEthernet 1/1/4 are the right fabric ports or the first and the second
group respectively.
1-2
An XRN fabric can be successfully built only when the fabric cables are connected in the above mode.
Based on the networking requirements in Figure 1-1, interconnect the three S5500-EI 28 port switches
through their first group of fabric ports of as shown in the following figure:
Figure 1-2 Fabric cable connection for the Switch 4500 family and the Switch 5500 family
Speed:Green=100Mbps
,Yellow=10Mbps Duplx:Green=Full Duplx
,Yellow=Half Duplx H3C S3600 Series
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
25 26 27 28
Console Unit Mode
Green=Speed RPS
Yellow=Duplex
PWR
Speed:Green=100Mbps
,Yellow=10Mbps Duplx:Green=Full Duplx
,Yellow=Half Duplx H3C S3600 Series
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
25 26 27 28
Console Unit Mode
Green=Speed RPS
Yellow=Duplex
PWR
Speed:Green=100Mbps
,Yellow=10Mbps Duplx:Green=Full Duplx
,Yellow=Half Duplx H3C S3600 Series
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
25 26 27 28
Console Unit Mode
Green=Speed RPS
Yellow=Duplex
PWR
To set up a bus connection, plug out any cable shown in the above figure.
When connecting Switch 5500G units to form an XRN fabric, follow these guidelines:
z Connect the switches with the fabric ports on their rear panels.
z Each Switch 5500G unit has two fabric ports: up port and down port. Given a switch, connect its up
port to the down port of another switch, and its down port to the up port of a third one.
z Make sure that the cable connectors are securely inserted into the fabric ports.
On the Switch 5500G, only two special cascade ports can be configured as fabric ports. The two ports
are used for XRN fabric connection only and cannot be used as common service ports. Their port
numbers are:
z Up port: Cascade 1/2/1
z Down port: Cascade 1/2/2
An XRN fabric can be successfully built only when the fabric cables are connected in the above mode.
Based on the networking requirements in Figure 1-1, interconnect the three Switch 5500G units through
their fabric ports as shown in the following figure:
1-3
Figure 1-3 Fabric port connection for the Switch 5500G
To establish a bus connection, plug out any cable shown in the above figure.
Configuration Procedure
1) Configure Switch A.
# Bring up the fabric ports.
<Sysname> system-view
[Sysname] fabric-port GigabitEthernet 1/1/1 enable
[Sysname] fabric-port GigabitEthernet 1/1/2 enable
When you modify the unit ID of a switch, the switch updates its configurations automatically. The update
process takes some time, during which you cannot perform any configurations on the switch. If the
system generates prompts after you enter a command, wait for the update to be finished.
1-4
[Sysname] change self-unit to 2
By viewing the Left Port and Right Port fields in the output information, you can know the running status
of the current fabric ports. The above prompt information indicates that the fabric ports are working
normally (displayed as Normal).
You can also use the display xrn command to view the switches in the current XRN fabric.
[hello] display xrn-fabric
Fabric name is hello, system mode is L3.
Unit Name Unit ID
unit1 1(*)
unit2 2
unit3 3
You can see from the above output information that the three switches have been successfully added to
the XRN fabric, and your configurations have been finished.
1-5
XRN fabric configuration on the Switch 5500G
1) Configure Switch A
# Bring up the fabric ports.
<Sysname> system-view
[Sysname] fabric-port Cascade 1/2/1 enable
[Sysname] fabric-port Cascade 1/2/2 enable
The configurations and verification on Switch C are the same as those on the Switch A and Switch B.
Therefore they are omitted here.
Complete Configuration
z Configuration on Switch A.
#
system-view
fabric-port GigabitEthernet 1/1/1 enable
fabric-port GigabitEthernet 1/1/2 enable
#
change unit-id 1 to 1
1-6
#
set unit 1 name Unit1
#
sysname hello
#
xrn-fabric authentication-mode simple welcome
z Configurations on Switch A.
#
system-view
fabric-port Cascade 1/2/1 enable
fabric-port Cascade 1/2/2 enable
#
change unit-id 1 to 1
#
set unit 1 name Unit1
#
sysname hello
#
The change unit-id and set unit name commands will not be saved in the configuration file, that is,
when you use the display current-configuration or display saved-configuration command to view
the content of the configuration file, the two commands are not displayed.
Precautions
1-7
z When configuring XRN, do not configure other functions, and before configuring other functions,
make sure the fabric has been established and works normally.
z After a fabric is established, do not remove or plug in the cables used to form the fabric or shut
down/bring up a fabric port, do not modify the unit ID of the device, and keep stability of the links
between fabric ports to avoid fabric split.
z In an XRN fabric, it is required to keep the global configurations on all the fabric members
consistent. If the global configurations on a switch are different from those on other switches, XRN
will restart the switch forcibly and generate the same global configurations for the switch. Therefore,
before building an XRN fabric, make sure the global configurations on all the switches are the same,
and backup the existing configurations as needed to avoid configuration loss in case of switch
restart.
z Do not modify the global configurations of any unit when the XRN fabric is being built or the
topology is unstable. This is to avoid switch restart due to global configuration inconsistency of
member switches.
z If a Switch 5500G unit with an expansion module is used in the XRN fabric, control the number of
VLANs to enhance the stability of the fabric.
1-8
Table of Contents
i
1 Cluster Configuration Guide
Cluster Configuration
The cluster function is implemented through Huawei Group Management Protocol version 2 (HGMPv2).
Using HGMPv2, you can manage multiple switches through the public IP address of a master device. In
a cluster, the master switch is called the management device, and the managed switches are called
member devices. The member devices are not configured with public IP addresses. They are managed
and maintained through the management device redirection.
Network Diagram
Internet
Eth 1/0/1
SwitchA
Vlan-int2
163. 172.55.1
SwitchB SwitchC
MAC: 000f-e201-0011 MAC: 000f-e201-0012
1-1
z The NMS/logging host uses IP address 69.172.55.4.
Configuration Procedure
1) Configure the member devices (taking one member as an example, and the configuration on the
other member is the same as that in the example)
# Enable NDP globally and on Ethernet 1/0/1.
<SwitchB> system-view
[SwitchB] ndp enable
[SwitchB] interface Ethernet 1/0/1
[SwitchB-Ethernet1/0/1] ndp enable
[SwitchB-Ethernet1/0/1] quit
1-2
[SwitchA] ndp enable
[SwitchA] undo ndp enable intferface Ethernet 1/0/1
[SwitchA] interface Ethernet 1/0/1
[SwitchA-Ethernet1/0/1] undo ntdp enable
[SwitchA-Ethernet1/0/1] quit
# Set the delay for a member device to forward topology collection request to 150 ms.
[SwitchA] ntdp timer hop-delay 150
# Set the delay for a port of a member device to forward topology collection request to 15 ms.
[SwitchA] ntdp timer port-delay 15
# Configure a private IP address pool for a cluster. The IP address pool contains six IP addresses,
starting from 172.16.0.1.
[SwitchA-cluster] ip-pool 172.16.0.1 255.255.255.248
1-3
[aaa_0.SwitchA-cluster]
# Add the two switches attached to the management device to the cluster.
[aaa_0.SwitchA-cluster] add-member 1 mac-address 00e0-fc01-0011
[aaa_0.SwitchA-cluster] add-member 17 mac-address 00e0-fc01-0012
# Configure the shared FTP server, TFTP server, logging host and SNMP host for the cluster.
[aaa_0.SwitchA-cluster] ftp-server 63.172.55.1
[aaa_0.SwitchA-cluster] tftp-server 63.172.55.1
[aaa_0.SwitchA-cluster] logging-host 69.172.55.4
[aaa_0.SwitchA-cluster] snmp-host 69.172.55.4
3) Perform the following operations on the member devices (taking Switch B as an example)
After the devices attached to the management device are added to the cluster, perform the following
operations on the member devices.
# Connect the member device to the remote FTP server shared by the cluster.
<aaa_1.SwitchB> ftp cluster
# Download file aaa.txt from the shared TFTP server to the member device.
<aaa_1.SwitchB> tftp cluster get aaa.txt
# Upload file bbb.txt from the member device to the shared TFTP server.
<aaa_1.SwitchB> tftp cluster put bbb.txt
Complete Configuration
1-4
nm-interface Vlan-interface2
ftp-server 63.172.55.1
tftp-server 63.172.55.1
logging-host 69.172.55.4
snmp-host 69.172.55.4
#
2) Configurations on the member devices
Functions configured on the member devices are enabled by default and thus are not in the
configuration file.
Precautions
z After the above configuration, you can execute the cluster switch-to { member-number |
mac-address H-H-H } command on the management device to switch to the view of a member
device to maintain and manage the member device, and then use the cluster switch-to
administrator command to return to the view of the management device.
z On the management device, you can use the reboot member command to reboot a member
device.
z After the above configuration, you can receive logs and SNMP trap messages of all the cluster
members on the NMS.
z The switches cannot be used as TFTP servers.
z It is recommended not to transmit data packets in the management VLAN.
Network Diagram
1-5
Table 1-1 Connection information of the management switch
Configuration Procedure
1-6
[SwitchA] cluster
[SwitchA -cluster]
# Configure a private IP address pool for a cluster. The IP address pool contains 30 IP addresses,
starting from 192.168.5.1.
[SwitchA-cluster] ip-pool 192.168.5.1 255.255.255.224
Complete Configuration
#
vlan 2
#
vlan 3
#
interface Vlan-interface2
ip address 192.168.4.22 255.255.255.0
#
interface Vlan-interface3
ip address 192.168.5.30 255.255.255.0
#
management-vlan 3
#
interface Ethernet1/0/1
port access vlan 3
#
interface Ethernet1/0/2
port access vlan 2
#
cluster
ip-pool 192.168.5.1 255.255.255.224
build aaa
nm-interface Vlan-interface2
#
Precautions
1-7
Cluster Configuration in Real Networking
In a complicated network, you can manage switches remotely in a bulk through HGMP, reducing the
workload of the network configuration.
After you build a cluster and enable HGMP on the management switch, and enable NDP and cluster for
the member devices, you can manage the member switches on the management switch.
Network Diagram
Internet
Vlan- interface 2
Eth1/0/1 163 .172. 55 .1/ 24
Switch A
Eth1/0/2
Eth1/0/3
Eth1/0/1 Eth1/0/1
Cluster Switch B
Switch C
1-8
Applicable Product Matrix
Configuration Procedure
1-9
[SwitchA] interface Ethernet 1/0/4
[SwitchA-Ethernet1/0/4] ntdp enable
[SwitchA-Ethernet1/0/4] quit
On the member switches, ports that connect to other switches all need to be enabled with NDP and
NTDP.
# Set the delay for a member device to forward topology collection request to 180 ms.
[SwitchA] ntdp timer hop-delay 180
# Set the delay for a port of a member device to forward topology collection request to 20 ms.
[SwitchA] ntdp timer port-delay 20
1-10
[SwitchA] ntdp timer 3
# Configure a private IP address pool for a cluster. The IP address pool contains six IP addresses,
starting from 172.16.0.1.
[SwitchA-cluster] ip-pool 172.16.0.1 255.255.255.248
# Configure the TFTP server and SNMP NMS shared by the cluster.
[aaa_0.SwitchA-cluster] tftp-server 10.1.1.15
[aaa_0.SwitchA-cluster] snmp-host 10.1.1.16
3) Perform the following operations on the member devices (taking Switch B as an example):
After the devices attached to the management device are added to the cluster, perform the following
operations on the member devices.
# Download file aaa.txt from the shared TFTP server to the member device.
<aaa_1.SwitchB> tftp cluster get aaa.txt
# Upload file bbb.txt from the member device to the shared TFTP server.
<aaa_1.SwitchB> tftp cluster put bbb.txt
Complete Configuration
1) Configuration on Switch A
#
ntdp hop 2
ntdp timer port-delay 20
ntdp timer hop-delay 180
ntdp timer 3
#
ndp timer hello 100
ndp timer aging 300
#
cluster
ip-pool 172.16.0.1 255.255.255.248
build aaa
holdtime 100
tftp-server 10.1.1.15
1-11
snmp-host 10.1.1.16
2) Configurations on the member devices
Functions configured on the member devices are enabled by default and thus are not in the
configuration file.
Precautions
None
1-12
Table of Contents
i
1 PoE/PoE Profile Configuration Guide
PoE Configuration
Power over Ethernet (PoE)-enabled devices use 10BASE-T, 100BASE-TX and 1000BASE-T twisted
pair cables to supply power to powered devices (PD) and implement power supply and data
transmission simultaneously.
Network Diagram
Network
Switch A
Eth1/0/1 Eth1/0/8
Eth1/0/2
Switch B AP AP
z Switch A is an S5500 Ethernet switch supporting PoE and Switch B can be PoE powered.
z The Ethernet 1/0/1 and Ethernet 1/0/2 ports of Switch A are connected to Switch B and an Access
Point (AP) respectively; the Ethernet 1/0/8 port is intended to be connected with an important AP.
z The PSE processing software of Switch A is first upgraded online. The remotely accessed PDs are
powered by Switch A.
z The power consumption of the accessed AP is 2,500 milliwatts, and the maximum power
consumption of Switch B is 12,000 milliwatts.
z It is required to guarantee the power supply to the AP connected to the Ethernet 1/0/8 even when
Switch A is under full load.
Hardware
Product series Software version
version
V03.02.04
Switch 5500G PoE switches
V03.03.01
1-1
Hardware
Product series Software version
version
V03.02.03
Switch 5500 PoE switches
V03.03.01
V03.02.00
Switch 4500 PoE switches
V03.03.00
Configuration Procedure
# Enable the PoE feature on ports Ethernet 1/0/1, Ethernet 1/0/2 and Ethernet 1/0/8.
[SwitchA] interface Ethernet 1/0/1
[SwitchA-Ethernet1/0/1] poe enable
[SwitchA-Ethernet1/0/1] quit
[SwitchA]interface Ethernet 1/0/2
[SwitchA-Ethernet1/0/2] poe enable
[SwitchA-Ethernet1/0/2] quit
[SwitchA] interface Ethernet 1/0/8
[SwitchA-Ethernet1/0/8] poe enable
[SwitchA-Ethernet1/0/8] quit
# Set the maximum power that Ethernet 1/0/1 and Ethernet 1/0/2 can provide for all PDs to 12000 and
2500 milliwatts respectively.
[SwitchA] interface Ethernet 1/0/1
[SwitchA-Ethernet1/0/1] poe max-power 12000
[SwitchA-Ethernet1/0/1] quit
[SwitchA] interface Ethernet 1/0/2
[SwitchA-Ethernet1/0/2] poe max-power 2500
[SwitchA-Ethernet1/0/2] quit
# Set the PoE priority of Ethernet 1/0/8 to critical to guarantee power supply to the device connected to
Ethernet 1/0/8.
[SwitchA] interface Ethernet 1/0/8
[SwitchA-Ethernet1/0/8] poe priority critical
[SwitchA-Ethernet1/0/8] quit
# Set the power supply management mode of the switch to auto (The default power supply
management mode is auto, and this step can be omitted.).
[SwitchA] poe power-management auto
1-2
# Enable the PD compatibility detection function to allow the switch to supply power to the PDs not
compliant with the 802.3af standard.
[SwitchA] poe legacy enable
# View the power supply status of all the ports on the switch after the configuration.
[SwitchA] display poe interface
PORT INDEX POWER ENABLE MODE PRIORITY STATUS
Ethernet1/0/1 on enable signal low Standard PD was detected
Ethernet1/0/2 on enable signal low Standard PD was detected
Ethernet1/0/3 off enable signal low detection is in process
Ethernet1/0/4 off enable signal low detection is in process
Ethernet1/0/5 off enable signal low detection is in process
Ethernet1/0/6 off enable signal low detection is in process
Ethernet1/0/7 off enable signal low detection is in process
Ethernet1/0/8 on enable signal critical Standard PD was detected
……
# View the PoE power information of all the ports on the switch.
<SwitchA> display poe interface power
PORT INDEX POWER (mW) PORT INDEX POWER (mW)
Ethernet1/0/1 11500 Ethernet1/0/2 2300
Ethernet1/0/3 0 Ethernet1/0/4 0
Ethernet1/0/5 0 Ethernet1/0/6 0
Ethernet1/0/7 0 Ethernet1/0/8 2400
……
Complete Configuration
#
poe legacy enable
#
interface Ethernet1/0/1
poe enable
poe max-power 12000
#
interface Ethernet1/0/2
poe enable
poe max-power 2500
#
interface Ethernet1/0/8
poe enable
poe priority critical
Precautions
None
1-3
Features of PoE profile:
z Various PoE profiles can be created. PoE policy configurations applicable to different user groups
are saved in the corresponding PoE profiles. These PoE profiles can be applied to the ports used
by the corresponding user groups.
z When users connect a PD to a PoE-profile-enabled port, the PoE configurations in the PoE profile
will be enabled on the port.
Network Diagram
Network
Switch A
Eth1/0/1~Eth1/0/5 Eth1/0/6~Eth1/0/10
IP phone AP
IP phone AP
IP phone AP
IP phone AP
Switch A is an S5500 Ethernet switch supporting PoE. Ethernet 1/0/1 through Ethernet 1/0/10 of Switch
A are used by users of group A, whom have the following requirements:
z The PoE function can be enabled on all ports in use.
z Signal mode is used to supply power.
z The PoE priority for Ethernet 1/0/1 through Ethernet 1/0/5 is critical, whereas the PoE priority for
Ethernet 1/0/6 through Ethernet 1/0/10 is high.
z The maximum power for Ethernet 1/0/1 through Ethernet 1/0/5 is 3000 milliwatts, whereas the
maximum power for Ethernet 1/0/6 through Ethernet 1/0/10 is 15400 milliwatts.
Based on the above requirements, two PoE profiles are made for users of group A.
z Apply PoE profile 1 for Ethernet 1/0/1 through Ethernet 1/0/5;
z Apply PoE profile 2 for Ethernet 1/0/6 through Ethernet 1/0/10.
1-4
Applicable Product Matrix
Hardware
Product series Software version
version
V03.02.04
Switch 5500G PoE switches
V03.03.01
V03.02.03
Switch 5500 PoE switches
V03.03.01
V03.02.00
Switch 4500 PoE switches
V03.03.00
Configuration Procedure
# In Profile1, add the PoE policy configuration applicable to Ethernet 1/0/1 through Ethernet 1/0/5 for
users of group A.
[SwitchA-poe-profile-Profile1] poe enable
[SwitchA-poe-profile-Profile1] poe mode signal
[SwitchA-poe-profile-Profile1] poe priority critical
[SwitchA-poe-profile-Profile1] poe max-power 3000
[SwitchA-poe-profile-Profile1] quit
# In Profile2, add the PoE policy configuration applicable to Ethernet 1/0/6 through Ethernet 1/0/10 for
users of group A.
[SwitchA-poe-profile-Profile2] poe enable
[SwitchA-poe-profile-Profile2] poe mode signal
[SwitchA-poe-profile-Profile2] poe priority high
[SwitchA-poe-profile-Profile2] poe max-power 15400
[SwitchA-poe-profile-Profile2] quit
Complete Configuration
#
poe-profile Profile1
1-5
poe enable
poe max-power 3000
poe priority critical
poe-profile Profile2
poe enable
poe priority high
#
interface Ethernet1/0/1
apply poe-profile Profile1
#
interface Ethernet1/0/2
apply poe-profile Profile1
#
interface Ethernet1/0/3
apply poe-profile Profile1
#
interface Ethernet1/0/4
apply poe-profile Profile1
#
interface Ethernet1/0/5
apply poe-profile Profile1
#
interface Ethernet1/0/6
apply poe-profile Profile2
#
interface Ethernet1/0/7
apply poe-profile Profile2
#
interface Ethernet1/0/8
apply poe-profile Profile2
#
interface Ethernet1/0/9
apply poe-profile Profile2
#
interface Ethernet1/0/10
apply poe-profile Profile2
Precautions
1) When the apply poe-profile command is used to apply a PoE profile to a port, some PoE features
can be applied successfully while some cannot. PoE profiles are applied to 3Com stackable PoE
switches according to the following rules:
z When the apply poe-profile command is used to apply a PoE profile to a port, the PoE profile is
applied successfully as long as one PoE feature in the PoE profile is applied properly. When the
display current-configuration command is used for query, it is displayed that the PoE profile is
applied properly to the port.
z If one or more features in the PoE profile are not applied properly on a port, the switch will prompt
explicitly which PoE features in the PoE profile are not applied properly on which ports.
1-6
z The display current-configuration command can be used to query which PoE profile is applied to a
port. However, the command cannot be used to query which PoE features in a PoE profile are
applied successfully.
2) If you cannot apply a PoE profile to a PoE port, it may be due to the following reasons:
z Some of the PoE features in the PoE profile have been configured through other modes;
z Some of the PoE features in the PoE profile are not compliant with the configuration requirements
for PoE ports;
z Another PoE profile has been applied to this PoE port.
You can solve the problem in the following ways:
z In the first case, you can solve the problem by removing the original configurations.
z In the second case, you need to modify some configurations in the PoE profile.
In the third case, you need to remove the application of the undesired PoE profile from the PoE port.
1-7
Table of Contents
i
1 UDP Helper Configuration Guide
Network Diagram
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
1-1
Configuration Procedure
# Configure the switch to forward broadcasts containing the destination UDP port number 137. (By
default, the device, after enabled with UDP Helper, forwards the broadcasts containing the destination
UDP port number 137.)
[SwitchA] udp-helper port 137
Complete Configuration
#
ip forward-broadcast
#
udp-helper enable
#
interface Vlan-interface
udp-helper server 192.168.10.2
#
Precautions
z On a 3Com 5500G or 5500 series Ethernet switch, the reception of directed broadcast packets to a
directly connected network is disabled by default, but this feature must be enabled with the ip
forward-broadcast command in system view before you can enable UDP Helper. For details
about the ip forward-broadcast command, refer to IP Address and Performance Configuration.
z The ip forward-broadcast command is not supported on the 3Com 4500 Series Ethernet
Switches.
z By default, the 5500G and 5500 series Ethernet switches do not forward IP packets with the TTL
field being 0 or 1. In some cases, however, you may need to enable UDP Helper to forward
broadcasts with the TTL field being 1 by the command udp-helper ttl-keep enable.
z You need to enable UDP Helper before specifying any UDP port to match UDP broadcasts;
otherwise, error information is displayed. When the UDP helper function is disabled, all the
specified UDP ports are disabled, including the default ports.
1-2
Table of Contents
i
1 SNMP-RMON Configuration Guide
SNMP Configuration
The Simple Network Management Protocol (SNMP) is used for ensuring the transmission of the
management information between any two network nodes. In this way, network administrators can
easily retrieve and modify the information about any node on the network, locate and diagnose network
problems, plan for network growth, and generate reports on network nodes.
Network Diagram
z An NMS and Switch A (SNMP agent) are connected through the Ethernet. The IP address of the
NMS is 10.10.10.1 and that of the VLAN interface on Switch A is 10.10.10.2.
z Perform the following configuration on Switch A: setting the community name and access right,
administrator ID, contact and switch location, and enabling the switch to sent traps.
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
Switch 4200G V03.02.00 All versions
V03.01.00
Switch 4210 All versions
V03.01.05
1-1
Configuration Procedure
# Enable SNMP agent, and set the SNMPv1 and SNMPv2c community names.
<Sysname> system-view
[Sysname] snmp-agent
[Sysname] snmp-agent sys-info version all
[Sysname] snmp-agent community read readname
[Sysname] snmp-agent community write writename
# Set the access right of the NMS to the MIB of the SNMP agent.
[Sysname] snmp-agent mib-view include internet 1.3.6.1
# For SNMPv3, set the SNMPv3 group and user, set the security level to authentication with privacy,
authentication protocol to HMAC-MD5, authentication password to passmd5, encryption protocol to
DES, and encryption password to cfb128cfb128.
[Sysname] snmp-agent group v3 managev3group privacy write-view internet
[Sysname] snmp-agent usm-user v3 managev3user managev3group authentication-mode md5 passmd5
privacy-mode des56 cfb128cfb128
# Configure the IP address of VLAN-interface 2 as 10.10.10.2. Add the port Ethernet 1/0/2 to VLAN 2.
[Sysname] vlan 2
[Sysname-vlan2] port Ethernet 1/0/2
[Sysname-vlan2] quit
[Sysname] interface Vlan-interface 2
[Sysname-Vlan-interface2] ip address 10.10.10.2 255.255.255.0
[Sysname-Vlan-interface2] quit
# Enable the sending of Traps to the NMS with an IP address of 10.10.10.1, using public as the
community name.
[Sysname] snmp-agent trap enable standard authentication
[Sysname] snmp-agent trap enable standard coldstart
[Sysname] snmp-agent trap enable standard linkup
[Sysname] snmp-agent trap enable standard linkdown
[Sysname] snmp-agent target-host trap address udp-domain 10.10.10.1 udp-port 5000 params
securityname public
The 3Com series Ethernet switches support 3Com Intelligent Management Center (iMC). When you
use iMC, you need to set usernames and choose the security level. For each security level, you need to
set authentication mode, authentication password, privacy mode, privacy password, and so on. In
addition, you need to set timeout time and maximum retry times.
You can query and configure an Ethernet switch through the NMS.
Complete Configuration
#
interface Vlan-interface2
ip address 10.10.10.2 255.255.0.0
#
1-2
interface Ethernet1/0/2
port access vlan 2
#
snmp-agent
snmp-agent local-engineid 800007DB00E0FC0000206877
snmp-agent community read readname
snmp-agent community write writename
snmp-agent sys-info version all
snmp-agent group v3 managev3group privacy write-view internet
snmp-agent target-host trap address udp-domain 10.10.10.1 udp-port 5000 params securityname
public
snmp-agent mib-view included internet internet
snmp-agent usm-user v3 managev3user managev3group authentication-mode md5 passmd5
privacy-mode des56 cfb128cfb128
#
Precautions
Authentication-related configuration on an NMS must be consistent with that on the devices for the
NMS to manage the devices successfully.
RMON Configuration
Remote Monitoring (RMON) is a kind of MIB defined by Internet Engineering Task Force (IETF). It is an
important enhancement to MIB II standards. RMON is mainly used to monitor the data traffic across a
network segment or even the entire network, and is currently a commonly used network management
standard.
Network Diagram
Internet
Console port Network port
Switch NMS
z Before performing RMON configuration, make sure the SNMP agents are correctly configured.
z The switch to be tested is connected to a terminal through the console port and to a remote NMS
through the Internet. Create an entry in the extended alarm table to monitor the statistics on the
Ethernet port. If the change rate of the entry exceeds the configured rising threshold or falling
threshold, an alarm event will be triggered.
1-3
Applicable Product Matrix
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
Configuration Procedure
# Add the event entries numbered 1 and 2 to the event table, which will be triggered by the following
extended alarms.
[Sysname] rmon event 1 log
[Sysname] rmon event 2 trap 10.21.30.55
# Add an entry numbered 2 to the extended alarm table to allow the system to calculate the alarm
variables with the (.1.3.6.1.2.1.16.1.1.1.9.1+.1.3.6.1.2.1.16.1.1.1.10.1) formula to get the numbers of all
the oversize and undersize packets received by Ethernet 1/0/1 that are in correct data format and
sample the numbers in every 10 seconds. When the change ratio between samples reaches the rising
threshold of 50, event 1 is triggered; when the change ratio drops under the falling threshold, event 2 is
triggered. Set the sampling type to forever and the owner of the alarm table to user1.
[Sysname] rmon prialarm 2 (.1.3.6.1.2.1.16.1.1.1.9.1+.1.3.6.1.2.1.16.1.1.1.10.1) test 10
changeratio rising_threshold 50 1 falling_threshold 5 2 entrytype forever owner user1
Complete Configuration
#
rmon event 1 description null log owner null
rmon event 2 description null trap 10.21.30.55 owner null
rmon prialarm 2 (.1.3.6.1.2.1.16.1.1.1.9.1+.1.3.6.1.2.1.16.1.1.1.10.1) test 10 changeratio
rising_threshold 50 1 falling_threshold 5 2 entrytype forever owner user1
#
interface Ethernet1/0/1
rmon statistics 1 owner null
1-4
Precautions
None
1-5
Table of Contents
i
1 NTP Configuration Guide
Network Diagram
z The local clock of Device A (switch) is to be used as a reference source, with the stratum level of 2.
z Device B is a 5500 Ethernet switch, which takes Device A as the time server.
z Set Device B to work in the client mode, and Device A will automatically work in the server mode.
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
Configuration Procedure
1-1
<DeviceB> system-view
[DeviceB] ntp-service unicast-server 1.0.1.11
Complete Configuration
#
ntp-service unicast-server 1.0.1.11
Precautions
The local clock of a 3Com 5500G/5500/4500/4200G/4120 series Ethernet switch cannot be set as a
reference clock. It can synchronize other devices as a reference clock only when its clock is
synchronized.
Figure 1-2 Network diagram for NTP symmetric peers mode configuration
Device A
3.0.1.31/24
3.0.1.32/24 3.0.1.33/24
Device B Device C
z The local clock of Device A is to be used as a reference source, with the stratum level of 2.
z Device C is a 5500 Ethernet switch, which takes Device A as the time server, and Device A
automatically works in the server mode.
z The local clock of Device B is to be used as a reference source, with the stratum level of 1. Set
Device B to take Device C as the symmetric-peer.
1-2
Applicable Product Matrix
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
Configuration Procedure
z Configure Device C.
# Set Device A as the time server.
<DeviceC> system-view
[DeviceC] ntp-service unicast-server 3.0.1.31
z Configure Device B (after Device C is synchronized to Device A).
# Set Device C as the symmetric-peer.
<DeviceB> system-view
[DeviceB] ntp-service unicast-peer 3.0.1.33
# View NTP status and NTP session information of Device C after clock synchronization.
[DeviceC] display ntp-service status
[DeviceC] display ntp-service sessions
Complete Configuration
z Configuration on Device C.
#
ntp-service unicast-server 3.0.1.31
z Configuration on Device B.
#
ntp-service unicast-peer 3.0.1.33
Precautions
The local clock of a 3Com 5500G/5500/4500/4200G/4120 series Ethernet switch cannot be set as a
reference clock. It can synchronize other devices as a reference clock only when its clock is
synchronized.
1-3
NTP Broadcast Mode Configuration
Network Diagram
Vlan-int2
3.0.1.13/24
Device C
Device A Device B
Vlan-int2
3.0.1.14/24
Device D
z The local clock of Device C is to be used as a reference source, with the stratum level of 2. Set
Device C to work in the broadcast server mode and send broadcasts through its VLAN-interface 2.
z Device A and Device D are two 5500 Ethernet switches. Set Device A and Device D to work in the
broadcast client mode and listen to broadcasts through their VLAN-interface 2 respectively.
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
Configuration Procedure
z Configure Device C.
# Set Device C to work as the broadcast sever and send broadcasts through its VLAN-interface 2.
<DeviceC> system-view
[DeviceC] interface Vlan-interface 2
1-4
[DeviceC-Vlan-interface2] ntp-service broadcast-server
z Configure Device A (perform the same configuration on Device D).
# Set Device A to work as the broadcast client and listen broadcasts through its VLAN-interface 2.
<DeviceA> system-view
[DeviceA] interface Vlan-interface 2
[DeviceA-Vlan-interface2] ntp-service broadcast-client
z View the NTP status and NTP session information of Device D after clock synchronization. (You
can use the same command to view the NTP status and NTP session information of Device A)
# View NTP status of Device D.
[DeviceD] display ntp-service status
Complete Configuration
z Configuration on Device C.
#
interface Vlan-interface2
ip address 3.0.1.13 255.255.255.0
ntp-service broadcast-server
z Configuration on Device A.
#
interface Vlan-interface2
ip address 3.0.1.11 255.255.255.0
ntp-service broadcast-client
z Configuration on Device D.
#
interface Vlan-interface2
ip address 3.0.1.14 255.255.255.0
ntp-service broadcast-client
Precautions
The local clock of a 3Com 5500G/5500/4500/4200G/4120 series Ethernet switch cannot be set as a
reference clock. It can synchronize other devices as a reference clock only when its clock is
synchronized.
1-5
NTP Multicast Mode Configuration
Network Diagram
Vlan-int2
3.0.1.13/24
Device C
Device A Device B
Vlan-int2
3.0.1.14/24
Device D
z The local clock of Device C is to be used as a reference source, with the stratum level of 2. Set
Device C to work in the multicast server mode and send multicast through its VLAN-interface 2.
z Device A and Device D are two 5500 Ethernet switches. Set Device A and Device D to work in the
multicast client mode and listen to multicasts through their VLAN-interface 2 respectively.
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
Configuration Procedure
z Configure Device C.
# Set Device C to work as the multicast server and send multicasts through its VLAN-interface 2.
<DeviceC> system-view
[DeviceC] interface Vlan-interface 2
1-6
[DeviceC-Vlan-interface2] ntp-service multicast-server
z Configure Device A (perform the same configuration on Device D).
# Set Device A to work as the multicast client and listen multicasts through its VLAN-interface 2.
<DeviceA> system-view
[DeviceA] interface Vlan-interface 2
[DeviceA-Vlan-interface2] ntp-service multicast-client
z View the NTP status and NTP session information of Device D after clock synchronization (You
can use the same command to view the NTP status and NTP session information of Device A).
# View NTP status of Device D.
[DeviceD] display ntp-service status
Complete Configuration
z Configuration on Device C.
#
interface Vlan-interface2
ip address 3.0.1.13 255.255.255.0
ntp-service multicast-server
z Configuration on Device A.
#
interface Vlan-interface2
ip address 1.0.1.11 255.255.255.0
ntp-service multicast-client
z Configuration on Device D.
#
interface Vlan-interface2
ip address 3.0.1.14 255.255.255.0
ntp-service multicast-client
Precautions
The local clock of a 3Com 5500G/5500/4500/4200G/4120 series Ethernet switch cannot be set as a
reference clock. It can synchronize other devices as a reference clock only when its clock is
synchronized.
Figure 1-5 Network diagram for NTP client/server mode with authentication configuration
1-7
Networking and Configuration Requirements
z The local clock of Device A is to be used as a reference source, with the stratum level of 2.
z Device B is a 5500 Ethernet switch, which takes Device A as the time server and works in the client
mode. Device A automatically works in the server mode.
z Configure NTP authentication between Device A and Device B.
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
Configuration Procedure
z Configure Device B.
# Set Device A as the time server.
<DeviceB> system-view
[DeviceB] ntp-service unicast-server 1.0.1.11
# Set MD5 key numbered 42, with the key content aNiceKey.
[DeviceB] ntp-service authentication-keyid 42 authentication-mode md5 aNiceKey
# Set MD5 key numbered 42, with the key content aNiceKey.
[DeviceA] ntp-service authentication-keyid 42 authentication-mode md5 aNiceKey
1-8
Complete Configuration
z Configuration on Device B.
#
ntp-service authentication enable
ntp-service authentication-keyid 42 authentication-mode md5 X&9#$^U(!:[Q=^Q`MAF4<1!!
ntp-service reliable authentication-keyid 42
ntp-service unicast-server 1.0.1.11
z Configuration on Device A.
#
ntp-service authentication enable
ntp-service authentication-keyid 42 authentication-mode md5 X&9#$^U(!:[Q=^Q`MAF4<1!!
ntp-service reliable authentication-keyid 42
Precautions
The local clock of a 3Com 5500G/5500/4500/4200G/4120 series Ethernet switch cannot be set as a
reference clock.
1-9
Table of Contents
i
When Switch Acts as Server for Password Authentication···································································1-25
Network Diagram···························································································································1-25
Networking and Configuration Requirements················································································1-25
Applicable Product Matrix··············································································································1-25
Configuration Procedure················································································································1-25
Complete Configuration·················································································································1-28
Precautions····································································································································1-28
When Switch Acts as Server for Publickey Authentication ···································································1-28
Network Diagram···························································································································1-28
Networking and Configuration Requirements················································································1-29
Applicable Product Matrix··············································································································1-29
Configuration Procedure················································································································1-29
Complete Configuration·················································································································1-34
Precautions····································································································································1-35
When Switch Acts as Client for Password Authentication ····································································1-35
Network Diagram···························································································································1-35
Networking and Configuration Requirements················································································1-35
Applicable Product Matrix··············································································································1-35
Configuration Procedure················································································································1-35
Complete Configuration·················································································································1-37
Precautions····································································································································1-37
When Switch Acts as Client for Publickey Authentication ····································································1-38
Network Diagram···························································································································1-38
Networking and Configuration Requirements················································································1-38
Applicable Product Matrix··············································································································1-38
Configuration Procedure················································································································1-38
Complete Configuration·················································································································1-40
Precautions····································································································································1-41
When Switch Acts as Client and First-Time Authentication is not Supported ······································1-41
Network Diagram···························································································································1-41
Networking and Configuration Requirements················································································1-41
Applicable Product Matrix··············································································································1-41
Configuration Procedure················································································································1-42
Complete Configuration·················································································································1-44
Precautions····································································································································1-45
SFTP Configuration·······························································································································1-45
Network Diagram···························································································································1-45
Networking and Configuration Requirements················································································1-45
Applicable Product Matrix··············································································································1-46
Configuration Procedure················································································································1-46
Complete Configuration·················································································································1-49
Precautions····································································································································1-49
ii
1 SSH Configuration Guide
The asymmetric key algorithm of DSA is now available on the switch. This configuration guide provides
the relevant guidelines from sections When Switch Acts as Server for Password Authentication to SFTP
Configuration.
Configuring the Switch to Act as the SSH Server and Use Password
Authentication
Network Diagram
Figure 1-1 Network diagram for configuring the switch to act as the SSH server and use password
authentication
In scenarios where users log into a switch over an insecure network, SSH can be used to ensure the
security of data exchange to the maximum extent. As shown inFigure 1-1, establish an SSH connection
between the host (SSH client) and the switch (SSH server) for secure data exchange. The host runs
SSH2 client software. Password authentication is required.
Configuration Procedure
1-1
# Create a VLAN interface on the switch and assign an IP address for it. The SSH client will use this
address as the destination for SSH connection.
<Switch> system-view
[Switch] interface vlan-interface 1
[Switch-Vlan-interface1] ip address 192.168.0.1 255.255.255.0
[Switch-Vlan-interface1] quit
# Create local user client001, and set the authentication password to abc, protocol type to SSH, and
command privilege level to 3 for the user.
[Switch] local-user client001
[Switch-luser-client001] password simple abc
[Switch-luser-client001] service-type ssh level 3
[Switch-luser-client001] quit
1-2
Figure 1-2 SSH client configuration interface
In the Host Name (or IP address) text box, enter the IP address of the SSH server.
2) From the category on the left pane of the window, select SSH under Connection. The window as
shown in Figure 1-3 appears.
Figure 1-3 SSH client configuration interface 2
1-3
Under Protocol options, select 2 from Preferred SSH protocol version.
3) As shown inFigure 1-3, click Open. If the connection is normal, you can enter the username
client001 and password abc at prompt. Once authentication succeeds, you will log onto the
server.
Complete Configuration
Precautions
After configuring the user interfaces to support SSH, be sure to configure the user interfaces to use AAA
authentication by using the authentication-mode scheme command and configure the default domain
to use the AAA method of local.
Configuring the Switch to Act as the SSH Server and Use RSA
Authentication
Network Diagram
Figure 1-4 Network diagram for configuring the switch to act as the SSH server and use RSA
authentication
In scenarios where users log into a switch over an insecure network, SSH can be used to ensure the
security of data exchange to the maximum extent. As shown inFigure 1-4, establish an SSH connection
between the host (SSH client) and the switch (SSH server) for secure data exchange. The host runs
SSH2 client software. RSA authentication is required.
1-4
Applicable Product Matrix
Configuration Procedure
# Configure the authentication method of the SSH client named client001 as RSA.
[Switch] ssh user client001 authentication-type rsa
Before performing the following steps, you must generate an RSA key pair by using the client software
on the client, save the public key in a file named public, and then upload the file to the SSH server
through FTP or TFTP. For details, refer to “Configure the SSH client” below.
# Import the client’s public key named Switch001 from file public.
[Switch] rsa peer-public-key Switch001 import sshkey public
1-5
1) Run PuTTYGen.exe, choose SSH-2 RSA and click Generate.
Figure 1-5 Client key pair generation interface 1
During the generation process, you must move the mouse continuously and keep the mouse off the
green process bar shown inFigure 1-6. Otherwise, the process bar stops moving and the key pair
generation process is stopped.
1-6
Figure 1-6 Client key pair generation interface 2
After the key pair is generated, click Save public key and enter the name of the file for saving the public
key (public in this case).
Figure 1-7 Client key pair generation interface 3
1-7
Likewise, to save the private key, click Save private key. A warning window pops up to prompt you
whether to save the private key without any protection. Click Yes and enter the name of the file for
saving the private key (private.ppk in this case).
Figure 1-8 Client key pair generation interface 4
# Configure the SSH client software to establish a connection to the SSH server.
Take SSH client software PuTTY v0.58 as an example:
2) Run PuTTY.exe to enter the following configuration interface.
Figure 1-9 SSH client configuration interface 1
In the Host Name (or IP address) text box, enter the IP address of the SSH server.
3) From the category on the left pane of the window, select SSH under Connection. The window as
shown in Figure 1-10 appears.
1-8
Figure 1-10 SSH client configuration interface 2
Click Browse… to bring up the file selection window, navigate to the private key file and click OK.
1-9
5) In the window shown inFigure 1-11, click Open. If the connection is normal, you will be prompted to
enter the username.
Complete Configuration
Precautions
None
Configuring the Switch to Act as the SSH Client and Use Password
Authentication
Network Diagram
Figure 1-12 Network diagram for configuring the switch to act as the SSH client and use password
authentication
In scenarios where users log into a switch over an insecure network by using another switch, SSH can
be used to ensure the security of data exchange to the maximum extent. As shown inFigure 1-12:
z Switch A acts as the SSH client and the login username is client001.
z Switch B acts as the SSH server, whose IP address is 10.165.87.136.
z Password authentication is required.
1-10
Product series Software version Hardware version
Switch 5500 V03.02.03 All versions
Switch 4500 V03.02.00 All versions
Configuration Procedure
z Configure Switch B
# Create a VLAN interface on the switch and assign an IP address for it. The SSH client will use this
address as the destination for SSH connection.
<SwitchB> system-view
[SwitchB] interface vlan-interface 1
[SwitchB-Vlan-interface1] ip address 10.165.87.136 255.255.255.0
[SwitchB-Vlan-interface1] quit
# Create local user client001, and set the authentication password to abc, protocol type to SSH, and
command privilege level to 3 for the client.
[SwitchB] local-user client001
[SwitchB-luser-client001] password simple abc
[SwitchB-luser-client001] service-type ssh level 3
[SwitchB-luser-client001] quit
1-11
The Server is not authenticated. Do you continue to access it?(Y/N):y
Do you want to save the server's public key?(Y/N):n
Enter password:
********************************************************************************
* Copyright(c) 2004-2008 3Com Corp. and its licensors. All rights reserved. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
********************************************************************************
<SwitchB>
Complete Configuration
z Configure Switch B
#
local-user client001
password simple abc
service-type ssh
level 3
#
interface Vlan-interface1
ip address 10.165.87.136 255.255.255.0
#
ssh user client001 authentication-type password
ssh user client001 service-type stelnet
#
user-interface vty 0 4
authentication-mode scheme
protocol inbound ssh
z Configure Switch A
#
interface Vlan-interface1
ip address 10.165.87.137 255.255.255.0
#
Precautions
After configuring the user interfaces to support SSH, be sure to configure the user interfaces to use AAA
authentication by using the authentication-mode scheme command and configure the default domain
to use the AAA method of local.
1-12
Configuring the Switch to Act as the SSH Client and Use RSA
Authentication
Network Diagram
Figure 1-13 Network diagram for configuring the switch to act as the SSH client and use RSA
authentication
In scenarios where users log into a switch over an insecure network by using another switch, SSH can
be used to ensure the security of data exchange to the maximum extent. As shown inFigure 1-13:
z Switch A acts as the SSH client and the login username is client001.
z Switch B acts as the SSH server, whose IP address is 10.165.87.136.
z RSA authentication is required.
Configuration Procedure
z Configure Switch B
# Create a VLAN interface on the switch and assign an IP address for it. The SSH client will use this
address as the destination for SSH connection.
<SwitchB> system-view
[SwitchB] interface vlan-interface 1
[SwitchB-Vlan-interface1] ip address 10.165.87.136 255.255.255.0
[SwitchB-Vlan-interface1] quit
1-13
# Set the client’s command privilege level to 3.
[SwitchB-ui-vty0-4] user privilege level 3
[SwitchB-ui-vty0-4] quit
# Configure the authentication method of the SSH client named client001 as RSA.
[SwitchB] ssh user client001 authentication-type rsa
After generating an RSA key pair on the SSH client, manually configure the RSA public key on the SSH
server. For details, refer to “Configure Switch A” below.
=====================================================
Time of Key pair created: 05:15:04 2006/12/08
Key name: SwitchA_Host
1-14
Key type: RSA encryption Key
=====================================================
Key code:
3047
0240
C8969B5A 132440F4 0BDB4E5E 40308747 804F608B
349EBD6A B0C75CDF 8B84DBE7 D5E2C4F8 AED72834
74D3404A 0B14363D D709CC63 68C8CE00 57C0EE6B
074C0CA9
0203
010001
After generating a key pair on a client, you need to manually configure the host public key on the server
and have the configuration on the server done before continuing configuration on the client.
********************************************************************************
* Copyright(c) 2004-2008 3Com Corp. and its licensors. All rights reserved. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
********************************************************************************
<SwitchB>
Complete Configuration
z Configure Switch B
#
rsa peer-public-key Switch001
public-key-code begin
3047
0240
C8969B5A 132440F4 0BDB4E5E 40308747 804F608B 349EBD6A B0C75CDF 8B84DBE7
D5E2C4F8 AED72834 74D3404A 0B14363D D709CC63 68C8CE00 57C0EE6B 074C0CA9
0203
010001
1-15
public-key-code end
peer-public-key end
#
interface Vlan-interface1
ip address 10.165.87.136 255.255.255.0
#
ssh user client001 assign rsa-key Switch001
ssh user client001 authentication-type rsa
ssh user client001 service-type stelnet
#
user-interface vty 0 4
authentication-mode scheme
user privilege level 3
protocol inbound ssh
z Configure Switch A
#
interface Vlan-interface1
ip address 10.165.87.137 255.255.255.0
#
Precautions
None
Configuring the Switch to Act as the SSH Client and Not to Support
First-Time Authentication
Network Diagram
Figure 1-14 Network diagram for configuring the switch to act as the SSH client and not to support
first-time authentication
In scenarios where users log into a switch over an insecure network by using another switch, SSH can
be used to ensure the security of data exchange to the maximum extent. As shown inFigure 1-14:
z Switch A acts as the SSH client and the login username is client001.
z Switch B acts as the SSH server, whose IP address is 10.165.87.136.
z RSA authentication is required.
1-16
Applicable Product Matrix
Configuration Procedure
z Configure Switch B
# Create a VLAN interface on the switch and assign an IP address for it. The SSH client will use this
address as the destination for SSH connection.
<SwitchB> system-view
[SwitchB] interface vlan-interface 1
[SwitchB-Vlan-interface1] ip address 10.165.87.136 255.255.255.0
[SwitchB-Vlan-interface1] quit
# Configure the authentication method of the SSH client named client001 as RSA.
[SwitchB] ssh user client001 authentication-type rsa
After generating an RSA key pair on the SSH client, manually configure the RSA public key on the SSH
server. For details, refer to “Configure Switch A” below.
1-17
[SwitchB-rsa-key-code] 349EBD6A B0C75CDF 8B84DBE7 D5E2C4F8 AED72834
[SwitchB-rsa-key-code] 74D3404A 0B14363D D709CC63 68C8CE00 57C0EE6B
[SwitchB-rsa-key-code] 074C0CA9
[SwitchB-rsa-key-code] 0203
[SwitchB-rsa-key-code] 010001
[SwitchB-rsa-key-code] public-key-code end
[SwitchB-rsa-public-key] peer-public-key end
[SwitchB]
When the switch acting as the SSH client does not support first-time authentication, you need to
manually configure the server host public key on it.
=====================================================
Time of Key pair created: 09:04:41 2000/04/04
Key name: SwitchB_Host
Key type: RSA encryption Key
=====================================================
Key code:
308188
028180
C9330FFD 2E2A606F 3BFD5554 8DACDFB8 4D754E86
FC2D15E8 1996422A 0F6A2A6A A94A207E 1E25F3F9
E0EA01A2 4E0F2FF7 B1D31505 39F02333 E443EE74
5C3615C3 E5B3DC91 D41900F0 2AE8B301 E55B1420
024ECF2C 28A6A454 C27449E0 46EB1EAF 8A918D33
BAF53AF3 63B1FB17 F01E4933 00BE2EEA A272CD78
C289B7DD 2BE0F7AD
0203
010001
z Configure Switch A
# Create a VLAN interface on the switch and assign an IP address for it. This address will serve as the
SSH client’s address for SSH connection.
<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
1-18
# Display the client host public key.
<SwitchA> display rsa local-key-pair public
=====================================================
Time of Key pair created: 05:15:04 2006/12/08
Key name: SwitchA_Host
Key type: RSA encryption Key
=====================================================
Key code:
3047
0240
C8969B5A 132440F4 0BDB4E5E 40308747 804F608B
349EBD6A B0C75CDF 8B84DBE7 D5E2C4F8 AED72834
74D3404A 0B14363D D709CC63 68C8CE00 57C0EE6B
074C0CA9
0203
010001
After generating a key pair on a client, you need to manually configure the host public key on the server
and have the configuration on the server done before continuing configuration on the client.
When the switch acting as the SSH client does not support first-time authentication, you need to
manually configure the server host public key on it.
1-19
[SwitchA-rsa-key-code] 0203
[SwitchA-rsa-key-code] 010001
[SwitchA-rsa-key-code] public-key-code end
[SwitchA-rsa-public-key] peer-public-key end
[SwitchA]
********************************************************************************
* Copyright(c) 2004-2008 3Com Corp. and its licensors. All rights reserved. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
********************************************************************************
<SwitchB>
Complete Configuration
z Configure Switch B
#
rsa peer-public-key Switch001
public-key-code begin
3047
0240
C8969B5A 132440F4 0BDB4E5E 40308747 804F608B 349EBD6A B0C75CDF 8B84DBE7
D5E2C4F8 AED72834 74D3404A 0B14363D D709CC63 68C8CE00 57C0EE6B 074C0CA9
0203
010001
public-key-code end
peer-public-key end
#
vlan 1
#
interface Vlan-interface1
ip address 10.165.87.136 255.255.255.0
#
ssh user client001 assign rsa-key Switch001
ssh user client001 authentication-type RSA
ssh user client001 service-type stelnet
#
user-interface vty 0 4
1-20
authentication-mode scheme
user privilege level 3
protocol inbound ssh
z Configure Switch A
#
rsa peer-public-key Switch002
public-key-code begin
308188
028180
C9330FFD 2E2A606F 3BFD5554 8DACDFB8 4D754E86 FC2D15E8 1996422A 0F6A2A6A
A94A207E 1E25F3F9 E0EA01A2 4E0F2FF7 B1D31505 39F02333 E443EE74 5C3615C3
E5B3DC91 D41900F0 2AE8B301 E55B1420 024ECF2C 28A6A454 C27449E0 46EB1EAF
8A918D33 BAF53AF3 63B1FB17 F01E4933 00BE2EEA A272CD78 C289B7DD 2BE0F7AD
0203
010001
public-key-code end
peer-public-key end
#
interface Vlan-interface1
ip address 10.165.87.137 255.255.255.0
#
undo ssh client first-time
ssh client 10.165.87.136 assign rsa-key Switch002
#
Precautions
None
Configuring SFTP
Network Diagram
As shown inFigure 1-15, establish an SSH connection between the SFTP client (Switch A) and the
SFTP server (Switch B). Log in to Switch B with the username client001 and password abc through
Switch A to manage and transfer files.
1-21
Applicable Product Matrix
Configuration Procedure
# Create a VLAN interface on the switch and assign an IP address for it. The SSH client will use this
address 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
1-22
[SwitchA-Vlan-interface1] quit
# Connect to the remote SFTP server using the username client001 and password abc to enter SFTP
client view.
[SwitchA] sftp 192.168.0.1
Input Username: client001
Trying 192.168.0.1 ...
Press CTRL+K to abort
Connected to 192.168.0.1 ...
sftp-client>
# Display the current directory of the server, delete the file z and verify the deletion.
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 pubkey1
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 files will be deleted:
flash:/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 then check that the new directory has been successfully created.
sftp-client> mkdir new1
New directory created
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 pubkey1
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:30 new1
1-23
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 pubkey1
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
# Upload file pu to the server and rename it to puk, and then verify the operation.
sftp-client> put pu puk
This operation may take a long time, please wait...
Local file: pu ---> Remote file: flash:/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 pubkey1
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>
# Exit SFTP.
sftp-client> quit
Bye
Complete Configuration
z Configure Switch B
#
local-user client001
password simple abc
service-type ssh
#
interface Vlan-interface1
ip address 192.168.0.1 255.255.255.0
#
sftp server enable
ssh user client001 authentication-type password
1-24
ssh user client001 service-type sftp
#
user-interface vty 0 4
authentication-mode scheme
user privilege level 3
protocol inbound ssh
#
z Configure Switch A
#
interface Vlan-interface1
ip address 192.168.0.2 255.255.255.0
Precautions
None
As shown in Figure 1-16, establish an SSH connection between the host (SSH Client) and the switch
(SSH Server) for secure data exchange. The host runs SSH2.0 client software. Password
authentication is required.
Configuration Procedure
1-25
# Create a VLAN interface on the switch and assign an IP address, which the SSH client will use as the
destination for SSH connection.
<Switch> system-view
[Switch] interface vlan-interface 1
[Switch-Vlan-interface1] ip address 192.168.0.1 255.255.255.0
[Switch-Vlan-interface1] quit
z Generating the RSA and DSA key pairs on the server is prerequisite to SSH login.
z The 4500 switch supports RSA key pair only. When the 4500 serves as a server, it can generate
RSA key pair only.
# Create local client client001, and set the authentication password to abc, protocol type to SSH, and
command privilege level to 3 for the client.
[Switch] local-user client001
[Switch-luser-client001] password simple abc
[Switch-luser-client001] service-type ssh level 3
[Switch-luser-client001] quit
1-26
Figure 1-17 SSH client configuration interface
In the Host Name (or IP address) text box, enter the IP address of the SSH server.
2) From the category on the left pane of the window, select SSH under Connection. The window as
shown in Figure 1-18 appears.
Figure 1-18 SSH client configuration interface 2
1-27
Under Protocol options, select 2 from Preferred SSH protocol version.
3) As shown in Figure 1-18, click Open. If the connection is normal, you will be prompted to enter the
user name client001 and password abc. Once authentication succeeds, you will log in to the
server.
Complete Configuration
#
local-user client001
password simple abc
service-type ssh
level 3
#
vlan 1
#
interface Vlan-interface1
ip address 192.168.0.1 255.255.255.0
#
#
ssh user client001 authentication-type password
ssh user client001 service-type stelnet
#
user-interface vty 0 4
authentication-mode scheme
protocol inbound ssh
#
Precautions
z Generating the RSA and DSA key pairs on the server is prerequisite to SSH login.
z After configuring the user interfaces to support SSH, be sure to configure the user interfaces to use
AAA authentication by using the authentication-mode scheme command and configure the
default domain to use the AAA method of local.
z The 4500 switch supports RSA key pair only.
1-28
Networking and Configuration Requirements
As shown in Figure 1-19, establish an SSH connection between the host (SSH client) and the switch
(SSH Server) for secure data exchange. The host runs SSH2.0 client software. Publickey
authentication is required.
Configuration Procedure
Under the publickey authentication mode, either the RSA or DSA public key can be generated for the
server to authenticate the client. Here takes the RSA public key as an example.
z Generating the RSA and DSA key pairs on the server is prerequisite to SSH login.
z The 4500 switch supports RSA key pair only. When the 4500 serves as a server, it can generate
RSA key pair only.
1-29
[Switch-ui-vty0-4] authentication-mode scheme
# Configure the authentication type of the SSH client named client 001 as publickey.
[Switch] ssh user client001 authentication-type publickey
Before performing the following steps, you must generate an RSA public key pair (using the client
software) on the client, save the key pair in a file named public, and then upload the file to the SSH
server through FTP or TFTP. For details, refer to Configuring the SSH Client.
# Import the client’s public key named Switch001 from file public.
[Switch] public-key peer Switch001 import sshkey public
1-30
While generating the key pair, you must move the mouse continuously and keep the mouse off the
green process bar shown in Figure 1-21. Otherwise, the process bar stops moving and the key pair
generating process is stopped.
After the key pair is generated, click Save public key and enter the name of the file for saving the public
key (public in this case).
1-31
Figure 1-22 Generate a client key pair (3)
Likewise, to save the private key, click Save private key. A warning window pops up to prompt you
whether to save the private key without any protection. Click Yes and enter the name of the file for
saving the private key (private.ppk in this case).
Figure 1-23 Generate a client key pair (4)
After a public key pair is generated, you need to upload the pubic key file to the server through FTP or
TFTP, and complete the server end configuration before you continue to configure the client.
1-32
Figure 1-24 SSH client configuration interface 1
In the Host Name (or IP address) text box, enter the IP address of the server.
3) From the category on the left pane of the window, select SSH under Connection. The window as
shown in Figure 1-25 appears.
Figure 1-25 SSH client configuration interface 2
1-33
Under Protocol options, select 2 from Preferred SSH protocol version.
4) Select Connection/SSH/Auth. The following window appears.
Figure 1-26 SSH client configuration interface (2)
Click Browse… to bring up the file selection window, navigate to the private key file and click OK.
5) From the window shown in Figure 1-26, click Open. If the connection is normal, you will be
prompted to enter the username.
Complete Configuration
#
public-key peer Switch001
public-key-code begin
30819F300D06092A864886F70D010101050003818D0030818902818100C3FDC7D2ACE733EE
40D78590C4710251119F86F3007EBC818EB5186E040B34582FC02ECD0276CE430F10DC3DDB
4D36332DB9845490C6F00921C2C4C8A15CEFDE45EB82A987E71C529696D1473F2F3FCDED1D
9D3EA7C8B0C05CD188A2DE36C4A627DA798F62D19837A33D5CC9EAEB78CC17CFD6E6B42DD1
3122FCB41346A65E110203010001
public-key-code end
peer-public-key end
#
interface Vlan-interface1
ip address 192.168.0.1 255.255.255.0
#
ssh user client001 assign publickey Switch001
ssh user client001 authentication-type publickey
ssh user client001 service-type stelnet
1-34
#
user-interface vty 0 4
authentication-mode scheme
user privilege level 3
protocol inbound ssh
Precautions
z Generating the RSA and DSA key pairs on the server is prerequisite to SSH login.
z The 4500 switch supports RSA key pair only.
As shown in Figure 1-27, establish an SSH connection between Switch A (SSH Client) and Switch B
(SSH Server) for secure data exchange. The user name for login is client001 and the SSH server’s IP
address is 10.165.87.136. Password authentication is required.
Configuration Procedure
z Configure Switch B
# Create a VLAN interface on the switch and assign an IP address, which the SSH client will use as the
destination for SSH connection.
<SwitchB> system-view
[SwitchB] interface vlan-interface 1
[SwitchB-Vlan-interface1] ip address 10.165.87.136 255.255.255.0
1-35
[SwitchB-Vlan-interface1] quit
z Generating the RSA and DSA key pairs on the server is prerequisite to SSH login.
z The 4500 switch supports RSA key pair only. When the 4500 serves as a server, it can generate
RSA key pair only.
# Create local user client001, and set the authentication password to abc, the login protocol to SSH,
and user command privilege level to 3.
[SwitchB] local-user client001
[SwitchB-luser-client001] password simple abc
[SwitchB-luser-client001] service-type ssh level 3
[SwitchB-luser-client001] quit
1-36
********************************************************************************
* Copyright(c) 2004-2008 3Com Corp. and its licensors. All rights reserved. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
********************************************************************************
<SwitchB>
Complete Configuration
z Configure Switch B
#
local-user client001
password simple abc
service-type ssh
level 3
#
interface Vlan-interface1
ip address 10.165.87.136 255.255.255.0
#
ssh user client001 authentication-type password
ssh user client001 service-type stelnet
#
user-interface vty 0 4
authentication-mode scheme
protocol inbound ssh
z Configure Switch A
#
interface Vlan-interface1
ip address 10.165.87.137 255.255.255.0
#
Precautions
z Generating the RSA and DSA key pairs on the server is prerequisite to SSH login.
z After configuring the user interfaces to support SSH, be sure to configure the user interfaces to use
AAA authentication by using the authentication-mode scheme command and configure the
default domain to use the AAA method of local.
z The 4500 switch supports RSA key pair only.
1-37
When Switch Acts as Client for Publickey Authentication
Network Diagram
As shown in Figure 1-28, establish an SSH connection between Switch A (SSH Client) and Switch B
(SSH Server) for secure data exchange. The user name is client001 and the SSH server’s IP address is
10.165.87.136. Publickey authentication is required.
Configuration Procedure
In public key authentication, you can use either RSA or DSA public key. Here takes the DSA public key
as an example.
z Configure Switch B
# Create a VLAN interface on the switch and assign an IP address, which the SSH client will use as the
destination for SSH connection.
<SwitchB> system-view
[SwitchB] interface vlan-interface 1
[SwitchB-Vlan-interface1] ip address 10.165.87.136 255.255.255.0
[SwitchB-Vlan-interface1] quit
1-38
Generating the RSA and DSA key pairs on the server is prerequisite to SSH login.
Before doing the following steps, you must first generate a DSA public key pair on the client and save
the key pair in a file named Switch001, and then upload the file to the SSH server through FTP or TFTP.
For details, refer to “Configure Switch A”.
# Import the client public key pair named Switch001 from the file Switch001.
[SwitchB] public-key peer Switch001 import sshkey Switch001
1-39
After the key pair is generated, you need to upload the pubic key file to the server through FTP or TFTP
and complete the server end configuration before you continue to configure the client.
********************************************************************************
* Copyright(c) 2004-2008 3Com Corp. and its licensors. All rights reserved. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
********************************************************************************
<SwitchB>
Complete Configuration
z Configure Switch B
#
public-key peer Switch001
public-key-code begin
308201B73082012C06072A8648CE3804013082011F02818100D757262C4584C44C211F18BD
96E5F061C4F0A423F7FE6B6B85B34CEF72CE14A0D3A5222FE08CECE65BE6C265854889DC1E
DBD13EC8B274DA9F75BA26CCB987723602787E922BA84421F22C3C89CB9B06FD60FE01941D
DD77FE6B12893DA76EEBC1D128D97F0678D7722B5341C8506F358214B16A2FAC4B36895038
7811C7DA33021500C773218C737EC8EE993B4F2DED30F48EDACE915F0281810082269009E1
4EC474BAF2932E69D3B1F18517AD9594184CCDFCEAE96EC4D5EF93133E84B47093C52B20CD
35D02492B3959EC6499625BC4FA5082E22C5B374E16DD00132CE71B020217091AC717B6123
91C76C1FB2E88317C1BD8171D41ECB83E210C03CC9B32E810561C21621C73D6DAAC028F4B1
585DA7F42519718CC9B09EEF0381840002818066E34E6F395E111C559A97BCB67B019DAA4C
4292E4AF541F71DD16A4CE6463F55491B38B24E5F7DC7CFD0B80F6E61916C60DB29DC62B44
AFC87ED3725AB6592BE5F2D3BA64BC1ACC5642D493C64A915157514D0C94A0019BBB38E7B8
092765BB30FB45C78C2B7EF564BF8F0C27E9A923675DCCEEAC193413BD120D43652A149E
public-key-code end
peer-public-key end
#
interface Vlan-interface1
ip address 10.165.87.136 255.255.255.0
1-40
#
ssh user client001 assign publickey Switch001
ssh user client001 authentication-type publickey
ssh user client001 service-type stelnet
#
user-interface vty 0 4
authentication-mode scheme
user privilege level 3
protocol inbound ssh
z Configure Switch A
#
interface Vlan-interface1
ip address 10.165.87.137 255.255.255.0
#
Precautions
Generating the RSA and DSA key pairs on the server is prerequisite to SSH login.
Figure 1-29 Switch acts as client and first-time authentication is not supported
As shown in Figure 1-29, establish an SSH connection between Switch A (SSH Client) and Switch B
(SSH Server) for secure data exchange. The user name is client001 and the SSH server’s IP address is
10.165.87.136. The publickey authentication mode is used to enhance security.
1-41
Configuration Procedure
z Configure Switch B
# Create a VLAN interface on the switch and assign an IP address for it to serve as the destination of
the client.
<SwitchB> system-view
[SwitchB] interface vlan-interface 1
[SwitchB-Vlan-interface1] ip address 10.165.87.136 255.255.255.0
[SwitchB-Vlan-interface1] quit
Generating the RSA and DSA key pairs on the server is prerequisite to SSH login.
Before doing the following steps, you must first generate a DSA key pair on the client and save the key
pair in a file named Switch001, and then upload the file to the SSH server through FTP or TFTP. For
details, refer to the following “Configure Switch A”.
# Import the client’s public key file Switch001 and name the public key as Switch001.
[SwitchB] public-key peer Switch001 import sshkey Switch001
# Export the generated DSA host public key pair to a file named Switch002.
[SwitchB] public-key local export dsa ssh2 Switch002
1-42
When first-time authentication is not supported, you must first generate a DSA key pair on the server
and save the key pair in a file named Switch002, and then upload the file to the SSH client through FTP
or TFTP.
z Configure Switch A
# Create a VLAN interface on the switch and assign an IP address, which serves as the SSH client’s
address in an SSH connection.
<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
After generating the key pair, you need to upload the key pair file to the server through FTP or TFTP and
complete the server end configuration before you continue to configure the client.
When first-time authentication is not supported, you must first generate a DSA key pair on the server
and save the key pair in a file named Switch002, and then upload the file to the SSH client through FTP
or TFTP. For details, refer to the above part “Configure Switch B”.
# Import the public key pair named Switch002 from the file Switch002.
[SwitchA] public-key peer Switch002 import sshkey Switch002
1-43
Connected to 10.165.87.136 ...
********************************************************************************
* Copyright(c) 2004-2008 3Com Corp. and its licensors. All rights reserved. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
********************************************************************************
<SwitchB>
Complete Configuration
z Configure Switch B
#
public-key peer Switch001
public-key-code begin
308201B73082012C06072A8648CE3804013082011F02818100D757262C4584C44C211F18BD
96E5F061C4F0A423F7FE6B6B85B34CEF72CE14A0D3A5222FE08CECE65BE6C265854889DC1E
DBD13EC8B274DA9F75BA26CCB987723602787E922BA84421F22C3C89CB9B06FD60FE01941D
DD77FE6B12893DA76EEBC1D128D97F0678D7722B5341C8506F358214B16A2FAC4B36895038
7811C7DA33021500C773218C737EC8EE993B4F2DED30F48EDACE915F0281810082269009E1
4EC474BAF2932E69D3B1F18517AD9594184CCDFCEAE96EC4D5EF93133E84B47093C52B20CD
35D02492B3959EC6499625BC4FA5082E22C5B374E16DD00132CE71B020217091AC717B6123
91C76C1FB2E88317C1BD8171D41ECB83E210C03CC9B32E810561C21621C73D6DAAC028F4B1
585DA7F42519718CC9B09EEF0381840002818066E34E6F395E111C559A97BCB67B019DAA4C
4292E4AF541F71DD16A4CE6463F55491B38B24E5F7DC7CFD0B80F6E61916C60DB29DC62B44
AFC87ED3725AB6592BE5F2D3BA64BC1ACC5642D493C64A915157514D0C94A0019BBB38E7B8
092765BB30FB45C78C2B7EF564BF8F0C27E9A923675DCCEEAC193413BD120D43652A149E
public-key-code end
peer-public-key end
#
vlan 1
#
interface Vlan-interface1
ip address 10.165.87.136 255.255.255.0
#
ssh user client001 assign publickey Switch001
ssh user client001 authentication-type publickey
ssh user client001 service-type stelnet
#
user-interface vty 0 4
authentication-mode scheme
user privilege level 3
protocol inbound ssh
#
z Configure Switch A
#
public-key peer Switch002
1-44
public-key-code begin
308201B83082012C06072A8648CE3804013082011F02818100D757262C4584C44C211F18BD
96E5F061C4F0A423F7FE6B6B85B34CEF72CE14A0D3A5222FE08CECE65BE6C265854889DC1E
DBD13EC8B274DA9F75BA26CCB987723602787E922BA84421F22C3C89CB9B06FD60FE01941D
DD77FE6B12893DA76EEBC1D128D97F0678D7722B5341C8506F358214B16A2FAC4B36895038
7811C7DA33021500C773218C737EC8EE993B4F2DED30F48EDACE915F0281810082269009E1
4EC474BAF2932E69D3B1F18517AD9594184CCDFCEAE96EC4D5EF93133E84B47093C52B20CD
35D02492B3959EC6499625BC4FA5082E22C5B374E16DD00132CE71B020217091AC717B6123
91C76C1FB2E88317C1BD8171D41ECB83E210C03CC9B32E810561C21621C73D6DAAC028F4B1
585DA7F42519718CC9B09EEF0381850002818100A777C1A45FCF8F3B267944D7AF6F8F24FA
9301B452E833710EE0A076A44ED6B70D114E9CDFE58BF4081D347D1664376D33C365C07200
9ACC6347BACA0C0D6AB8D4954861458CFB5EE469155FD649CC406640FCECCD663036E0A1C2
73D56A04C56ED5B240F9C6C1C680CF97A7A04381A340EC94B28C73C71541D89880778C2D94
public-key-code end
peer-public-key end
#
vlan 1
#
interface Vlan-interface1
ip address 10.165.87.137 255.255.255.0
#
undo ssh client first-time
ssh client 10.165.87.136 assign publickey Switch002
#
Precautions
Generating the RSA and DSA key pairs on the server is prerequisite to SSH login.
SFTP Configuration
Network Diagram
As shown in Figure 1-30, establish an SSH connection between the SFTP client (switch A) and the
SFTP server (switch B). Log in to switch B through switch A to manage and transmit files. An SFTP user
with the username client001 and password abc exists on the SFTP server.
1-45
Applicable Product Matrix
Configuration Procedure
z Generating the RSA and DSA key pairs on the server is prerequisite to SFTP login.
z The 4500 switch supports RSA key pair only.
# Create a VLAN interface on the switch and assign to it an IP address, which is used as the destination
address for the client to connect to the SFTP server.
[SwitchB] interface vlan-interface 1
[SwitchB-Vlan-interface1] ip address 192.168.0.1 255.255.255.0
[SwitchB-Vlan-interface1] quit
# Configure the protocol through which the remote user logs in to the switch as SSH.
[SwitchB-ui-vty0-4] protocol inbound ssh
[SwitchB-ui-vty0-4] quit
# Configure the authentication mode as password. Authentication timeout time, retry number, and
update time of the server key adopt the default values.
1-46
[SwitchB] ssh user client001 authentication-type password
# Connect to the remote SFTP server. Enter the username client001 and the password abc, and then
enter SFTP client view.
[SwitchA] sftp 192.168.0.1
Input Username: client001
Trying 192.168.0.1 ...
Press CTRL+K to abort
Connected to 192.168.0.1 ...
sftp-client>
# Display the current directory of the server. Delete the file z and verify the result.
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 pubkey1
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
Received status: End of file
Received status: Success
sftp-client> delete z
The following files will be deleted:
/z
Are you sure to delete it?(Y/N):y
This operation may take a long time.Please wait...
1-47
-rwxrwxrwx 1 noone nogroup 225 Aug 24 08:01 pubkey2
-rwxrwxrwx 1 noone nogroup 283 Aug 24 07:39 pubkey1
drwxrwxrwx 1 noone nogroup 0 Sep 01 06:22 new
-rwxrwxrwx 1 noone nogroup 225 Sep 01 06:55 pub
Received status: End of file
Received status: Success
# Add a directory new1, and then check whether the new directory is successfully created.
sftp-client> mkdir new1
Received status: Success
New directory created
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 pubkey1
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:30 new1
Received status: End of file
Received status: Success
# Rename the directory new1 as new2, and then verify the result.
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 pubkey1
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
Received status: End of file
Received status: Success
# Download the file pubkey2 from the server and rename it as public.
sftp-client> get pubkey2 public
This operation may take a long time, please wait...
.
Remote file:/pubkey2 ---> Local file: public..
Received status: End of file
Received status: Success
Downloading file successfully ended
# Upload file pu to the server and rename it as puk, and then verify the result.
sftp-client> put pu puk
This operation may take a long time, please wait...
Local file: pu ---> Remote file: /puk
Received status: Success
Uploading file successfully ended
sftp-client> dir
1-48
-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 pubkey1
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
Received status: End of file
Received status: Success
sftp-client>
# Exit SFTP.
sftp-client> quit
Bye
[Sysname]
Complete Configuration
z Configure Switch B
#
local-user client001
password simple abc
service-type ssh
#
vlan 1
#
interface Vlan-interface1
ip address 192.168.0.1 255.255.255.0
#
sftp server enable
ssh user client001 authentication-type password
ssh user client001 service-type sftp
#
user-interface vty 0 4
authentication-mode scheme
protocol inbound ssh
#
z Configure Switch A
#
vlan 1
#
interface Vlan-interface1
ip address 192.168.0.2 255.255.255.0
#
Precautions
z Generating the RSA and DSA key pairs on the server is prerequisite to SSH login.
z The 4500 switch supports RSA key pair only.
1-49
Table of Contents
i
1 FTP and TFTP Configuring Guide
Network Diagram
A switch operates as an FTP server and a remote PC as an FTP client. The application switch.bin of
the switch is stored on the PC. Upload the application to the remote switch through FTP and use the
boot boot-loader command to specify switch.bin as the application for next startup. Reboot the switch
to upgrade the switch application and download the configuration file config.cfg from the switch, thus to
back up the configuration file.
z Create a user account on the FTP server with the username switch and password hello.
z The IP addresses 1.1.1.1/8 for a VLAN interface on the switch and 2.2.2.2/8 for the PC have been
configured. Ensure that a route exists between the switch and the PC.
1-1
Configuration Procedure
# Enable the FTP server function, and configure the username and password for the FTP client to
access FTP services.
[Sysname] ftp server enable
[Sysname] local-user switch
[Sysname-luser-switch] password simple hello
[Sysname-luser-switch] service-type ftp
z Configure the PC (FTP client)
Run an FTP client application on the PC to connect to the FTP server. The following takes the command
line window tool provided by Windows as an example:
# Enter the command line window and browse to the directory where the file switch.bin is located. In
this example it is in the root directory of C:\.
C:\>
# Access the Ethernet switch through FTP. Input the username switch and password hello to log in and
enter FTP view.
C:\> ftp 1.1.1.1
Connected to 1.1.1.1.
220 FTP service ready.
User (1.1.1.1:(none)): switch
331 Password required for switch.
Password:
230 User logged in.
ftp>
Complete Configuration
1-2
password simple hello
service-type ftp
#
vlan 1
#
interface Vlan-interface1
ip address 1.1.1.1 255.0.0.0
#
FTP server enable
Precautions
z If the free Flash memory of the switch is not enough for the application file to be uploaded, remove
those unused applications from the Flash memory first.
z It is not recommended to directly remove applications in use. If removing some applications in use
is a must to get enough space, you can use the BootROM menu to remove them. For details, refer
to “System Maintenance and Debugging Operation”.
Network Diagram
A switch operates as an FTP client and a remote PC as an FTP server. The switch application named
switch.bin is stored on the PC. Download it to the switch through FTP and use the boot boot-loader
command to specify switch.bin as the application for next startup. Reboot the switch to upgrade the
switch application, and then upload the switch configuration file named config.cfg to directory switch
of the PC to back up the configuration file.
z Create a user account on the FTP server with the username switch and password hello, and grant
the user switch read and write permissions for the directory switch on the PC.
z Configure the IP address 1.1.1.1/8 for a VLAN interface on the switch, and 2.2.2.2/8 for the PC.
Ensure a route exists between the switch and the PC.
1-3
Product series Software version Hardware version
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
Configuration Procedure
# Connect to the FTP server using the ftp command in user view. You need to provide the username
and password to log in to the FTP server.
<Sysname> ftp 2.2.2.2
Trying ...
Press CTRL+K to abort
Connected.
220 FTP service ready.
User(none):switch
331 Password required for switch.
Password:
230 User logged in.
[ftp]
You are recommended to set the transfer mode to binary before performing data transfer operation, so
as to ensure that the device can receive data normally.
1-4
# Browse to the authorized directory on the FTP server, upload configuration file config.cfg to the FTP
server, and download the file named switch.bin. Then, terminate the FTP connection and return to user
view.
Before downloading a file, use the dir command to check that the remaining space of the Flash memory
is enough for the file to be downloaded.
[ftp] cd switch
[ftp] put config.cfg
[ftp] get switch.bin
[ftp] quit
<Sysname>
# Use the boot boot-loader command to specify the downloaded file as the application for next startup
and then restart the switch. Thus the switch application is upgraded.
<Sysname> boot boot-loader switch.bin
<Sysname> reboot
Complete Configuration
#
vlan 1
#
interface Vlan-interface1
ip address 1.1.1.1 255.0.0.0
Precautions
z If the free Flash memory of the switch is not enough for downloading the application file from the
FTP server, remove those unused applications from the Flash memory before downloading the file.
z It is not recommended to directly remove applications in use. If removing some applications in use
is a must to get enough space, you can use the BootROM menu to remove them. For details, refer
to “System Maintenance and Debugging Operation”.
1-5
Network Diagram
A switch operates as a TFTP client and a PC as the TFTP server. The application named switch.bin is
stored on the PC. Download it (switch.bin) to the switch through TFTP, and use the boot boot-loader
command to specify switch.bin as the application for next startup. Reboot the switch to upload the
configuration file named config.cfg to the work directory on the PC to back up the configuration file.
z The TFTP working directory is configured on the TFTP server.
z Configure the IP addresses of a VLAN interface on the switch and the PC as 1.1.1.1/8 and
2.2.2.2/8 respectively. The port through which the switch connects with the PC belongs to the
VLAN.
V03.02.00
Switch 4500 All versions
V03.03.00
Switch 4200G V03.02.00 All versions
V03.01.00
Switch 4210 All versions
V03.01.05
Configuration Procedure
1-6
# Download the switch application named switch.bin from the TFTP server to the switch, and upload
the switch configuration file named config.cfg to the TFTP server.
<Sysname> tftp 2.2.2.2 get switch.bin switch.bin
<Sysname> tftp 2.2.2.2 put config.cfg config.cfg
# Use the boot boot-loader command to specify the downloaded file to be the startup file for next
startup of the switch and restart the switch to complete the switch application upgrade.
<Sysname> boot boot-loader switch.bin
<Sysname> reboot
Complete Configuration
Precautions
z If the free Flash memory of the switch is not enough for downloading the application file from the
TFTP server, remove those unused applications from the Flash memory before downloading the
file.
z It is not recommended to directly remove applications in use. If removing some applications in use
is a must to get enough space, you can use the BootROM menu to remove them. For details, refer
to “System Maintenance and Debugging Operation”.
1-7
Table of Contents
i
Precautions····································································································································1-11
ii
1 Information Center Configuration Guide
Figure 1-1 Network diagram for outputting log information to a Unix log host
Send log information with severity higher than informational to a Unix log host with an IP address of
202.38.1.10. The information source modules are ARP and IP.
Configuration Procedure
# By default, the system outputs information of all modules to the loghost channel. To obtain the system
information of the ARP and IP modules, you need to disable the output of information of all modules to
the log host.
[Sysname] undo info-center source default channel loghost
1-1
# Set the host with an IP address of 202.38.1.10 to be the log host, set the severity to informational,
and the information source modules to ARP and IP.
[Sysname] info-center loghost 202.38.1.10 facility local4
[Sysname] info-center source arp channel loghost log level informational debug state off trap
state off
[Sysname] info-center source ip channel loghost log level informational debug state off trap
state off
z Configuration on the log host.
The following configurations were performed on SunOS 4.0 which has similar configurations with the
Unix operating systems implemented by other vendors.
# Execute the following commands as a root user.
# mkdir /var/log/Switch
# touch /var/log/Switch/information
# Edit the file /etc/syslog.conf as a root user and add the following selector/action pairs.
# Switch configuration messages
local4.info /var/log/Switch/information
# After the log file information has been created and the configuration file /etc/syslog.conf has been
modified, ensure that the configuration file /etc/syslog.conf is reread by executing the following
commands:
# ps -ae | grep syslogd
147
# kill -HUP 147
Complete Configuration
Precautions
1-2
z The selector/action pair must be separated with a tab key, rather than a space.
z No redundant spaces are allowed in the file name.
z The device name and the accepted severity of log information specified by the /etc/syslog.conf file
must be identical to those configured on the device using the info-center loghost and info-center
source commands; otherwise the log information may not be output properly to the log host.
Figure 1-2 Network diagram for outputting log information to a Linux log host
Send log information to a Linux log host with an IP address of 202.38.1.10; Log information with severity
higher than errors will be output to the log host; The information source modules are all modules.
Configuration Procedure
# Set the host with an IP address of 202.38.1.10 to be the log host, set the severity to errors, and the
information source modules to all modules.
[Sysname] info-center loghost 202.38.1.10 facility local7
1-3
[Sysname] info-center source default channel loghost log level errors debug state off trap
state off
z Configuration on the log host.
# Execute the following commands as a root user.
# mkdir /var/log/Switch
# touch /var/log/Switch/information
# Edit the file /etc/syslog.conf as a root user and add the following selector/action pairs.
# Switch configuration messages
local7.info /var/log/Switch/information
# After the log file information has been created and the /etc/syslog.conf file has been modified, execute
the following commands to display the process ID of syslogd, terminate a syslogd process, and restart
syslogd using the -r option.
# ps -ae | grep syslogd
147
# kill -9 147
# syslogd -r &
Complete Configuration
Precautions
Ensure that the syslogd process is started with the -r option on a Linux log host.
Note the following issues while editing the /etc/syslog.conf file:
z Comments must be on a separate line and must begin with the # sign.
z The selector/action pair must be separated with a tab key, rather than a space.
z No redundant spaces are allowed in the file name.
z The device name and the accepted severity of log information specified by the /etc/syslog.conf file
must be identical to those configured on the device using the info-center loghost and info-center
source commands; otherwise the log information may not be output properly to the log host.
1-4
Outputting Log and Trap Information to a Log Host Through the
Same Channel
Network Diagram
Figure 1-3 Network diagram for outputting log and trap information to a log host through the same
channel
Send log and trap information with severity higher than informational to the log host through the same
channel channel6. The information source module is L2INF (interface management module).
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
Switch 4200G V03.02.00 All versions
V03.01.00
Switch 4210 All versions
V03.01.05
Configuration Procedure
# The system outputs information of all modules through channel6 by default. Therefore, you need to
disable the function first.
[Sysname] undo info-center source default channel channel6
# Set the host with an IP address of 10.153.116.65 to be the log host, set to send log and trap
information with severity higher than informational to the log host through the same channel channel6,
and set the information source module to L2INF.
[Sysname] info-center loghost 10.153.116.65 channel 6
1-5
[Sysname] info-center source L2INF channel 6 log level informational state on trap level
informational state on debug state off
z Configuration on the log host.
For the configuration of the log host, see
Configuration Procedure and Configuration Procedure.
The following takes receiving log information through log host software on a Windows operating system
as an example:
# The log host software used in this example is TFTPD32, the version of which is as follows:
# Open the TFTPD32 application program on the Windows operating system as shown in the following
figure:
1) Current Directory indicates the directory of the log file syslog.txt. You can click the Browse
button to set it. In this example, the directory is D:\Tools\TFTP.
2) Server interface indicates the IP address of the log host. It is 10.153.116.65 in this example.
3) Select the syslog server tab.
# The system information with the required severity level will be output to the log host as shown in the
following figure:
1-6
# After receiving the system information, the log host will save it in the log file syslog.txt under
D:\Tools\TFTP. You can view the saved system information as shown in the following figure (the
information in the blue colour is the L2INF module trap information received by the log host):
Complete Configuration
#
info-center source L2INF channel 6
undo info-center source default channel 6
info-center loghost 10.153.116.65 channel 6
Precautions
On the Windows operating system, software settings vary with log host software.
Figure 1-4 Network diagram for outputting log information to the console
Log information with a severity higher than informational will be output to the console, and the
information source modules are ARP and IP.
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
V03.02.03
Switch 5500 All versions
V03.03.01
1-7
Hardware
Product series Software version
version
V03.02.00
Switch 4500 All versions
V03.03.00
Configuration Procedure
# By default, the system outputs information of all modules to the console. Therefore, to obtain the
system information of the ARP and IP modules, you need to disable the output of information of all
modules to the console.
[Sysname] undo info-center source default channel console
# Set the severity to informational, and the information source modules to ARP and IP.
[Sysname] info-center console channel console
[Sysname] info-center source arp channel console log level informational debug state off trap
state off
[Sysname] info-center source ip channel console log level informational debug state off trap
state off
Complete Configuration
#
info-center source ARP channel 0 trap state off
info-center source IP channel 0 trap state off
undo info-center source default channel 0
Precautions
None
1-8
Displaying the Time Stamp with the UTC Time Zone
Network Diagram
Figure 1-5 Network diagram for displaying the time stamp with the UTC time zone
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
Configuration Procedure
# Name the local time zone z8 and set it to eight hours ahead of UTC time.
<Sysname> clock timezone z8 add 08:00:00
# Configure to add UTC time to the output information of the information center.
[Sysname] info-center timestamp utc
Complete Configuration
#
info-center timestamp utc
1-9
Precautions
None
Figure 1-6 Network diagram for use of the facility argument in log information output
Multiple switches in a LAN send log information to the same log host. You can know the running status
of each switch by displaying log information received.
As multiple switches send log information to the same log host, you can set different values of the
facility keyword for each switch to filter information on the log host, thus avoiding failure in recognizing
information source (for example, if the two hosts have the same name and the facility keywords are set
to the default value local7, you cannot recognize the information source.).
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
1-10
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
Switch 4200G V03.02.00 All versions
V03.01.00
Switch 4210 All versions
V03.01.05
Configuration Procedure
Complete Configuration
z Configuration on Switch A.
#
info-center source default channel 2 log level debugging
info-center loghost 192.168.0.208 facility local0
z Configuration on Switch B, Switch C, Switch D and Switch E.
<Omitted>
Precautions
None
1-11
Table of Contents
i
1 VLAN-VPN Configuration Guide
Configuring VLAN-VPN
With VLAN-VPN enabled, a device tags a private network packet with an outer VLAN tag, thus enabling
the packet to be transmitted through the service providers’ backbone network with both inner and outer
VLAN tags. After reaching the peer private network, the packet’s outer VLAN tag will be removed and
the inner tag will be used for packet forwarding.
VLAN-VPN tunnels private network packets over the public backbone network in a simple way.
Network Diagram
VLAN 100
SwitchB
Eth1/0/21
Eth1/0/22
VLAN 200
PC User
VLAN 100 TPID-0x9200
VLAN 1040
Terminal Server
Eth1/0/12
Eth1/0/11
VLAN 200 SwitchA
Terminal User
As shown inFigure 1-1, Switch A and Switch B connect the users to the servers across the public
network.
z The PC users and PC servers are in VLAN 100, while the terminal users and terminal servers are in
VLAN 200. Both VLAN 100 and VLAN 200 are private. On the public network, there is VLAN 1040.
z Switches of other vendors are used on the public network. They use the TPID value 0x9200. This
configuration is applicable only to the devices supporting TPID configuration.
z Configure VLAN-VPN on Switch A and Switch B to enable the PC users and the terminal users to
communicate with their respective servers.
1-1
Applicable Product Matrix
V03.02.03
Switch 5500 All versions
V03.03.01
Configuration Procedure
z Configure Switch A
# Enable VLAN-VPN on Ethernet 1/0/11 of Switch A, using the tag of VLAN 1040 as the outer VLAN tag
for packets received on the port .
<SwitchA> system-view
[SwitchA] vlan 1040
[SwitchA-vlan1040] port Ethernet 1/0/11
[SwitchA-vlan1040] quit
[SwitchA] interface Ethernet 1/0/11
[SwitchA-Ethernet1/0/11] undo ntdp enable
[SwitchA-Ethernet1/0/11] stp disable
[SwitchA-Ethernet1/0/11] vlan-vpn enable
1-2
# Set the TPID value of Ethernet 1/0/11 to 0x9200 for intercommunication with the devices in the public
network.
[SwitchA-Ethernet1/0/11] vlan-vpn tpid 9200
[SwitchA-Ethernet1/0/11] quit
# Configure Ethernet 1/0/12 as a trunk port that permits tagged packets of VLAN 1040.
[SwitchA] interface Ethernet 1/0/12
[SwitchA-Ethernet1/0/12] port link-type trunk
[SwitchA-Ethernet1/0/12] port trunk permit vlan 1040
# Set the TPID value of Ethernet 1/0/21 to 0x9200 for intercommunication with the devices in the public
network.
[SwitchB-Ethernet1/0/21] vlan-vpn tpid 9200
[SwitchB-Ethernet1/0/21] quit
# Configure Ethernet 1/0/22 as a trunk port that permits tagged packets of VLAN 1024.
[SwitchA] interface Ethernet 1/0/22
[SwitchA-Ethernet1/0/22] port link-type trunk
[SwitchA-Ethernet1/0/22] port trunk permit vlan 1040
Complete Configuration
z Configure Switch A
#
vlan 1040
#
interface Ethernet1/0/11
port access vlan 1040
undo ntdp enable
1-3
stp disable
vlan-vpn enable
vlan-vpn tpid 9200
#
interface Ethernet1/0/12
port link-type trunk
port trunk permit vlan 1 1040
vlan-vpn tpid 9200
z Configure Switch B
#
vlan 1040
#
interface Ethernet1/0/21
port access vlan 1040
undo ntdp enable
stp disable
vlan-vpn enable
vlan-vpn tpid 9200
#
interface Ethernet1/0/22
port link-type trunk
port trunk permit vlan 1 1040
vlan-vpn tpid 9200
Precautions
z Do not configure VLAN 1040 as the default VLAN of Ethernet 1/0/12 of Switch A or Ethernet 1/0/22
of Switch B. Otherwise, the outer tag will be removed before a packet is transmitted.
z This example assumes that Ethernet 1/0/11 of Switch A and Ethernet 1/0/21 of Switch B are both
access ports. If the two ports are trunk or hybrid ports, specify the default VLAN of the two ports as
VLAN 1040, and configure the ports to send untagged packets of VLAN 1040. For detailed
information, refer to Basic Ethernet Port Configuration Guide.
1-4
Network Diagram
For PC User
VLAN100~108
Eth1/0/12
Public Network
VLAN1000/VLAN1200 SwitchB
Eth1/0/11
Eth1/0/13
Eth1/0/5
SwitchA For IP Phone
Eth1/0/3 VLAN200~230
z Ethernet 1/0/3 of Switch A provides public network access for PC users and IP phone users. PC
users belong to VLAN 100 through VLAN 108, and IP phone users belong to VLAN 200 through
VLAN 230. Ethernet 1/0/5 of Switch A is connected to the public network. The peer end of Switch A
is Switch B.
z Ethernet 1/0/11 of Switch B is connected to the public network. Ethernet 1/0/12 and Ethernet1/0/13
of Switch B provide network access for PC servers belonging to VLAN 100 through VLAN 108 and
voice gateways (for IP phone users) belonging to VLAN 200 through VLAN 230 respectively.
z The public network permits packets of VLAN 1000 and VLAN 1200. Apply QoS policies for these
packets to reserve bandwidth for packets of VLAN 1200. That is, packets of VLAN 1200 have
higher transmission priority over packets of VLAN 1000.
z Employ the selective QinQ feature on Switch A and Switch B to differentiate traffic of PC users from
that of IP phone users, for the purpose of using QoS policies to guarantee higher priority for voice
traffic.
z To reduce broadcast packets in the network, enable the inter-VLAN MAC address replicating
feature for selective QinQ.
1-5
Product series Software version Hardware version
V03.02.00
Switch 4500 All versions
V03.03.00
V03.02.03
Switch 5500 All versions
V03.03.01
Configuration Procedure
z Configure Switch A.
# Create VLAN 1000, VLAN 1200 and VLAN 5 (the default VLAN of Ethernet 1/0/3) on SwitchA.
<SwitchA> system-view
[SwitchA] vlan 1000
[SwitchA-vlan1000] quit
[SwitchA] vlan 1200
[SwitchA-vlan1200] quit
[SwitchA] vlan 5
[SwitchA-vlan5] quit
# Configure Ethernet 1/0/5 as a hybrid port and configure it not to remove VLAN tags when forwarding
packets of VLAN 5, VLAN 1000, and VLAN 1200.
[SwitchA] interface Ethernet 1/0/5
[SwitchA-Ethernet1/0/5] port link-type hybrid
[SwitchA-Ethernet1/0/5] port hybrid vlan 5 1000 1200 tagged
[SwitchA-Ethernet1/0/5] quit
# Configure Ethernet 1/0/3 as a hybrid port and configure VLAN 5 as its default VLAN. Configure
Ethernet 1/0/3 to remove VLAN tags when forwarding packets of VLAN 5, VLAN 1000, and VLAN 1200.
[SwitchA] interface Ethernet 1/0/3
[SwitchA-Ethernet1/0/3] port link-type hybrid
[SwitchA-Ethernet1/0/3] port hybrid pvid vlan 5
[SwitchA-Ethernet1/0/3] port hybrid vlan 5 1000 1200 untagged
# Enable the selective QinQ feature on Ethernet 1/0/3 to tag packets of VLAN 100 through VLAN 108
with the tag of VLAN 1000 as the outer VLAN tag, and tag packets of VLAN 200 through VLAN 230 with
the tag of VLAN 1200 as the outer VLAN tag.
[SwitchA-Ethernet1/0/3] vlan-vpn vid 1000
[SwitchA-Ethernet1/0/3-vid-1000] raw-vlan-id inbound 100 to 108
[SwitchA-Ethernet1/0/3-vid-1000] quit
[SwitchA-Ethernet1/0/3] vlan-vpn vid 1200
[SwitchA-Ethernet1/0/3-vid-1200] raw-vlan-id inbound 200 to 230
# Enable the inter-VLAN MAC address replicating feature to replicate the MAC address entries of the
MAC address tables of the outer VLANs to the MAC address table of the default VLAN, and replicate
the MAC address entries of the MAC address table of the default VLAN to the MAC address tables of
the outer VLANs.
1-6
[SwitchA-Ethernet1/0/3-vid-1200] quit
[SwitchA-Ethernet1/0/3] mac-address mapping 0 source-vlan 5 destination-vlan 1000
[SwitchA-Ethernet1/0/3] mac-address mapping 1 source-vlan 5 destination-vlan 1200
[SwitchA-Ethernet1/0/3] quit
[SwitchA] interface Ethernet 1/0/5
[SwitchA-Ethernet1/0/5] mac-address mapping 0 source-vlan 1000 1200 destination-vlan 5
After the above configuration, packets of VLAN 100 through VLAN 108 (that is, packets of PC users) are
tagged with the tag of VLAN 1000 as the outer VLAN tag when they are forwarded to the public network
by Switch A; and packets of VLAN 200 through VLAN 230 (that is, packets of IP phone users) are
tagged with the tag of VLAN 1200 as the outer VLAN tag when they are forwarded to the public network.
z Configure Switch B.
# Create VLAN 1000, VLAN 1200, VLAN 12 (the default VLAN of Ethernet1/0/12) and VLAN 13 (the
default VLAN of Ethernet1/0/13) on Switch B.
<SwitchB> system-view
[SwitchB] vlan 1000
[SwitchB-vlan1000] quit
[SwitchB] vlan 1200
[SwitchB-vlan1200] quit
[SwitchB] vlan 12 to 13
# Configure Ethernet 1/0/11 as a hybrid port, and configure Ethernet 1/0/11 not to remove VLAN tags
when forwarding packets of VLAN 12, VLAN 13, VLAN 1000, and VLAN 1200.
<SwitchB> system-view
[SwitchB] interface Ethernet 1/0/11
[SwitchB-Ethernet1/0/11] port link-type hybrid
[SwitchB-Ethernet1/0/11] port hybrid vlan 12 13 1000 1200 tagged
# Configure Ethernet1/0/12 as a hybrid port and configure VLAN 12 as its default VLAN . Configure
Ethernet 1/0/12 to remove VLAN tags when forwarding packets of VLAN 12 and VLAN 1000.
[SwitchB] interface Ethernet 1/0/12
[SwitchB-Ethernet1/0/12] port link-type hybrid
[SwitchB-Ethernet1/0/12] port hybrid pvid vlan 12
[SwitchB-Ethernet1/0/12] port hybrid vlan 12 1000 untagged
[SwitchB-Ethernet1/0/12] quit
# Configure Ethernet 1/0/13 as a hybrid port and configure VLAN 13 as its default VLAN . Configure
Ethernet 1/0/13 to remove VLAN tags when forwarding packets of VLAN 13 and VLAN 1200.
[SwitchB] interface Ethernet 1/0/13
[SwitchB-Ethernet1/0/13] port link-type hybrid
[SwitchB-Ethernet1/0/13] port hybrid pvid vlan 13
[SwitchB-Ethernet1/0/13] port hybrid vlan 13 1200 untagged
After the above configuration, Switch B can forward packets of VLAN 1000 and VLAN 1200 to the
corresponding servers through Ethernet 1/0/12 and Ethernet 1/0/13 respectively.
To make the packets from the servers be transmitted to the clients in the same way, you need to
configure the selective QinQ feature and the inter-VLAN MAC address replicating feature on Ethernet
1/0/12 and Ethernet 1/0/13. The configuration on Switch B is similar to that on Switch A and is thus
omitted.
1-7
Complete Configuration
z Configure SwitchA
#
vlan 5
#
vlan 1000
#
vlan 1200
#
interface Ethernet1/0/3
port link-type hybrid
port hybrid vlan 1 5 1000 1200 untagged
port hybrid pvid vlan 5
vlan-vpn enable
mac-address-mapping 0 source-vlan 5 destination-vlan 1000
mac-address-mapping 1 source-vlan 5 destination-vlan 1200
vlan-vpn vid 1000
raw-vlan-id inbound 100 to 108
vlan-vpn vid 1200
raw-vlan-id inbound 200 to 230
#
interface Ethernet1/0/5
port link-type hybrid
port hybrid vlan 5 1000 1200 tagged
port hybrid vlan 1 untagged
port hybrid pvid vlan 5
mac-address-mapping 0 source-vlan 1000 1200 destination-vlan 5
z Configure SwitchB
#
vlan 12 to 13
#
vlan 1000
#
vlan 1200
#
interface Ethernet1/0/11
port link-type hybrid
port hybrid vlan 12 to 13 1000 1200 tagged
port hybrid vlan 1 untagged
#
interface Ethernet1/0/12
port link-type hybrid
port hybrid vlan 1 12 1000 untagged
port hybrid pvid vlan 12
#
interface Ethernet1/0/13
port link-type hybrid
1-8
port hybrid vlan 1 13 1200 untagged
port hybrid pvid vlan 13
Precautions
z If XRN Fabric has been enabled on a device, you cannot enable the VLAN-VPN feature and the
selective QinQ feature on any port of the device.
z Do not enable both the selective QinQ function and the DHCP snooping function on a switch.
Otherwise, the DHCP snooping function may operate improperly.
z VLAN 4093 is a special VLAN reserved for the XRN fabric feature. It can not serve as the
destination VLAN of the inter-VLAN MAC address replicating feature to receive MAC address
entries from the other VLANs.
Network Diagram
Provider1 Provider2
Eth1/0/2
Network Eth1/0/3
Eth1/0/1 Eth1/0/4
Customer1 Customer2
z Customer 1 and Customer 2 are customer side devices, while Provider 1 and Provider 2 are edge
devices of the service provider. Customer 1 and Customer 2 are connected to Ethernet 1/0/1 of
Provider 1 and Ethernet 1/0/4 of Provider 2 respectively.
z Provider 1 and Provider 2 are connected through trunk a link, which permits packets of all VLANs.
z Configure the service provider network to transmit NDP packets of the customer network through a
BPDU tunnel.
z Enable VLAN-VPN for the service provider network, and enable the service provider network to
use VLAN 100 to transmit data packets of the customer network.
1-9
Applicable Product Matrix
Configuration Procedure
z Configure Provide 1.
# Disable NDP on Ethernet 1/0/1.
<Sysname> system-view
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] undo ndp enable
# Enable the BPDU tunnel feature for NDP BPDUs on Ethernet 1/0/1.
[Sysname-Ethernet1/0/1] bpdu-tunnel ndp
# Enable the VLAN-VPN feature on Ethernet 1/0/1 and use VLAN 100 to tunnel user data packets.
[Sysname-Ethernet1/0/1] port access vlan 100
[Sysname-Ethernet1/0/1] vlan-vpn enable
# Configure Ethernet 1/0/2 as a trunk port that permits packets of VLAN 100.
[Sysname] interface Ethernet 1/0/2
[Sysname-Ethernet1/0/2] port link-type trunk
[Sysname-Ethernet1/0/2] port trunk permit vlan 100
z Configure Provide 2
# Disable NDP on Ethernet 1/0/4.
<Sysname> system-view
[Sysname] interface Ethernet 1/0/4
[Sysname-Ethernet1/0/4] undo ndp enable
# Enable the VLAN-VPN feature on Ethernet 1/0/4 and use VLAN 100 to tunnel user data packets.
[Sysname-Ethernet1/0/4] port access vlan 100
[Sysname-Ethernet1/0/4] vlan-vpn enable
# Configure Ethernet 1/0/3 as a trunk port that permits packets of VLAN 100.
[Sysname] interface Ethernet 1/0/3
[Sysname-Ethernet1/0/3] port link-type trunk
[Sysname-Ethernet1/0/3] port trunk permit vlan 100
Complete Configuration
z Configure Provider 1
#
1-10
interface Ethernet1/0/1
undo ndp enable
port access vlan 100
vlan-vpn enable
bpdu-tunnel ndp
#
interface Ethernet1/0/2
port link-type trunk
port trunk permit vlan 1 100
#
z Configure Provider 2
#
interface Ethernet1/0/3
port link-type trunk
port trunk permit vlan 1 100
#
interface Ethernet1/0/4
undo ndp enable
port access vlan 100
vlan-vpn enable
bpdu-tunnel ndp
#
Precautions
z The bpdu-tunnel stp command is mutually exclusive with the vlan-vpn tunnel command
configured for STP packets. Refer to MSTP in the operation manual for your switch for related
information.
z The bpdu-tunnel cdp command is mutually exclusive with the voice vlan legacy command.
Refer to Voice VLAN in the operation manual for your switch for related information.
1-11
Table of Contents
i
1 Remote-ping Configuration Guide
Remote-ping Configuration
Remote-ping is a network diagnostic tool. It is used to test the performance of various protocols running
in networks. Remote-ping provides more functions than the ping command.
The ping command can only use the Internet Control Message Protocol (ICMP) to test the round trip
time (RTT) between the local end and a specified destination end for you to judge whether the
destination end is reachable.
A Remote-ping test group is a set of Remote-ping test parameters. A test group contains several test
parameters and is uniquely identified by an administrator name and a test operation tag.
After creating a Remote-ping test group and configuring the test parameters, you can perform a
Remote-ping test with the test-enable command.
Different from the ping command, Remote-ping does not display the RTT or timeout status of each
packet on the console terminal in real time. To view the statistic results of your Remote-ping test
operation, you need to execute the display remote-ping command. Remote-ping also allows you to
set parameters for Remote-ping test groups, start Remote-ping tests and view statistical test results
through a network management device.
ICMP Test
Network diagram
A Remote-ping ICMP test between two switches uses ICMP to test the round trip time (RTT) for packets
generated by the Remote-ping client.
1-1
Product series Software version Hardware version
V03.02.00
Switch 4500 All versions
V03.03.00
V03.01.00
Switch 4210 All versions
V03.01.05
Configuration procedure
# Create a Remote-ping test group, configuring the administrator name as administrator and test
operation tag as ICMP.
[SwitchA] remote-ping administrator icmp
Complete configuration
Configuration on Switch A.
#
remote-ping-agent enable
remote-ping administrator icmp
test-type icmp
destination-ip 10.2.2.2
count 10
timeout 5
Precautions
none
1-2
DHCP Test
Network diagram
Perform a Remote-ping DHCP test between the two switches to test the time required for the
Remote-ping client to obtain an IP address from the DHCP server.
Configuration procedure
# Create a Remote-ping test group, setting the administrator name to administrator and test tag to
DHCP.
[SwitchA] Remote-ping administrator dhcp
# Configure the source interface, which must be a VLAN interface. Make sure the DHCP server resides
on the network connected to this interface.
[SwitchA-remote-ping-administrator-dhcp] source-interface Vlan-interface 1
1-3
[SwitchA-remote-ping-administrator-dhcp] timeout 5
Complete configuration
Configuration on Switch A.
#
remote-ping-agent enable
remote-ping administrator dhcp
test-type dhcp
source-interface Vlan-interface 1
count 10
timeout 5
#
Precautions
You can perform a Remote-ping DHCP test only when no DHCP client is enabled on any interface.
Otherwise, the DHCP Server sends the response to an interface enabled with the DHCP Client rather
than to the source interface, thus resulting in Remote-ping DHCP test failure.
HTTP Test
Network diagram
Perform a Remote-ping HTTP test between the switch and the HTTP server to test the connectivity and
the time required to download a file from the HTTP server after the connection to the server is
established.
1-4
Product series Software version Hardware version
Switch 5500 V03.03.01 All versions
V03.01.00
Switch 4210 All versions
V03.01.05
Configuration procedure
# Create a Remote-ping test group, setting the administrator name to administrator and test tag to
HTTP.
[SwitchA] Remote-ping administrator http
Complete configuration
Configuration on Switch A.
#
remote-ping-agent enable
remote-ping administrator http
test-type http
destination-ip 10.2.2.2
count 10
timeout 30
#
1-5
Precautions
none
Network diagram
Perform a Remote-ping Tcpprivate test to test time required to establish a TCP connection between this
end (Switch A) and the specified destination end (Switch B), with the port number set to 8000.
Configuration procedure
# Create a Remote-ping test group, setting the administrator name to administrator and test tag to
tcpprivate.
[SwitchA] Remote-ping administrator tcpprivate
1-6
[SwitchA-remote-ping-administrator-tcpprivate] destination-ip 10.2.2.2
Complete configuration
z Configuration on Switch B.
#
remote-ping-server enable
remote-ping-server tcpconnect 10.2.2.2 8000
#
z Configuration on Switch A.
#
remote-ping-agent enable
remote-ping administrator tcpprivate
test-type tcpprivate
destination-ip 10.2.2.2
destination-port 8000
count 10
timeout 5
#
Precautions
none
1-7
DNS Test
Network diagram
Perform a Remote-ping DNS test between the switch and the DNS server to test the time required from
the client sends a DNS request to it receives a resolution result from the DNS server.
Configuration procedure
# Create a Remote-ping test group, setting the administrator name to administrator and test tag to
dns.
[SwitchA] remote-ping administrator dns
1-8
[SwitchA-remote-ping-administrator-dns] count 10
Complete configuration
z Configuration on Switch A.
#
remote-ping-agent enable
remote-ping administrator dns
test-type dns
destination-ip 10.2.2.2
dns resolve-target www.test.com
count 10
timeout 5
#
Precautions
None
1-9
Table of Contents
i
1 DNS Configuration Guide
Network Diagram
Figure 1-1 Network diagram for static domain name resolution configuration
As shown in the above figure, the switch can use static domain name resolution to access host 10.1.1.2
through domain name host.com.
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
V03.02.03
Switch 5500 All versions
V03.03.01
V03.02.00
Switch 4500 All versions
V03.03.00
Switch 4200G V03.02.00 All versions
V03.01.00
Switch 4210 All versions
V03.01.05
Configuration Procedure
1-1
# Execute the ping host.com command to verify that Switch can get the IP address 10.1.1.2 of name
host.com.
[Switch] ping host.com
PING host.com (10.1.1.2): 56 data bytes, press CTRL_C to break
Reply from 10.1.1.2: bytes=56 Sequence=1 ttl=127 time=3 ms
Reply from 10.1.1.2: bytes=56 Sequence=2 ttl=127 time=3 ms
Reply from 10.1.1.2: bytes=56 Sequence=3 ttl=127 time=2 ms
Reply from 10.1.1.2: bytes=56 Sequence=4 ttl=127 time=5 ms
Reply from 10.1.1.2: bytes=56 Sequence=5 ttl=127 time=3 ms
Complete Configuration
#
ip host host.com 10.1.1.2
#
Precautions
None
Network Diagram
Figure 1-2 Network diagram for dynamic domain name resolution configuration
z Switch serves as a DNS client to access the host at 3.1.1.1/16 through domain name host.
z The DNS server has the IP address 2.1.1.2/16. The domain name suffix is com.
1-2
Applicable Product Matrix
Configuration Procedure
Execute the ping host command on Switch. The ping is successful and the corresponding IP address
is 3.1.1.1.
[Switch] ping host
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=125 time=4 ms
Reply from 3.1.1.1: bytes=56 Sequence=2 ttl=125 time=4 ms
Reply from 3.1.1.1: bytes=56 Sequence=3 ttl=125 time=4 ms
Reply from 3.1.1.1: bytes=56 Sequence=4 ttl=125 time=4 ms
Reply from 3.1.1.1: bytes=56 Sequence=5 ttl=125 time=5 ms
Complete Configuration
#
dns resolve
dns server 2.1.1.2
dns domain com
#
1-3
Precautions
z The routes between the DNS server, Switch, and Host are reachable. Necessary configurations
are done on the devices.
z There is a mapping between domain name host and IP address 3.1.1.1/16 on the DNS server.
1-4
Table of Contents
i
1 Access Management Configuration Guide
Network Diagram
Client PCs access the Internet through Switch A. The IP addresses of PCs belonging to organization 1
are in the range of 202.10.20.1/24 to 202.10.20.20/24, the IP address of PC 2 is 202.10.20.100/24, and
the IP address of PC 3 is 202.10.20.101/24.
z Permit all the PCs of organization 1 to access the Internet through Ethernet 1/0/1 on Switch A.
Ethernet 1/0/1 carries VLAN 1. The IP address assigned to the interface of VLAN 1 is
202.10.20.200/24.
1-1
z PCs that do not belong to organization 1, such as PC 2 and PC 3, are not allowed to access the
Internet through Ethernet 1/0/1 on Switch A.
Configuration Procedure
Complete Configuration
#
am enable
#
interface Vlan-interface1
ip address 202.10.20.200 255.255.255.0
#
interface Ethernet1/0/1
am ip-pool 202.10.20.1 20
#
Precautions
z The IP addresses in the access management IP address pool configured for a port must be on the
same segment as the VLAN-interface IP address of the VLAN to which the port belongs.
z If the access management IP address pool to be configured for a port contains an IP address in a
static ARP entry of another port, the system will ask you to delete the ARP entry to ensure that the
access management IP address pool can take effect.
z To allow only the hosts bound with a port and with their IP addresses in the access management IP
address pool of the port to access external networks, configure static ARP entries only for IP
addresses in the address pool.
1-2
Configuring Access Management with Port Isolation
Network Diagram
Figure 1-2 Network diagram for access management and port isolation configuration
Client PCs are connected to the Internet through Switch A. The IP address range for organization 1 is
202.10.20.1/24 to 202.10.20.20/24; and the IP address ranges for organization 2 are 202.10.20.25/24
to 202.10.20.50/24 and 202.10.20.55/24 to 202.10.20.65/24.
z PCs of organization 1 are allowed to access the Internet through Ethernet 1/0/1 of Switch A.
z PCs of organization 2 are allowed to access the Internet through Ethernet 1/0/2 of Switch A.
z Both Ethernet 1/0/1 and Ethernet 1/0/2 belong to VLAN 1, and the IP address of VLAN-interface 1
is 202.10.20.200/24.
z PCs of organization 1 are isolated from those of organization 2 at Layer 2.
Configuration Procedure
1-3
[SwitchA] am enable
Complete Configuration
#
am enable
#
interface Vlan-interface1
ip address 202.10.20.200 255.255.255.0
#
interface Ethernet1/0/1
port isolate
am ip-pool 202.10.20.1 20
#
interface Ethernet1/0/2
port isolate
am ip-pool 202.10.20.25 26 202.10.20.55 11
#
Precautions
1-4
Table of Contents
i
1 Web Authentication Configuration Guide
Network Diagram
As shown inFigure 1-1, a user connects to the Ethernet switch through port Ethernet 1/0/1.
z Configure Web authentication on Ethernet 1/0/1 to control the access of the user to the Internet.
z Configure a free IP address range, which can be accessed by the user before it passes the Web
authentication.
z Configure the DHCP server so that users can obtain IP addresses from it.
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
1-1
Hardware
Product series Software version
version
V03.02.03
Switch 5500 All versions
V03.03.01
Configuration Procedure
# Perform DHCP-related configuration on the DHCP server. (It is assumed that the user will
automatically obtain an IP address through the DHCP server.)
# Set the IP address and port number of the Web authentication server.
<Sysname> system-view
[Sysname] web-authentication web-server ip 10.10.10.10 port 8080
# Configure a free IP address range, so that the user can access free resources before it passes the
Web authentication.
[Sysname] web-authentication free-ip 10.20.20.1 24
# Enable Web authentication on Ethernet 1/0/1 and set the user access method to designated.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] web-authentication select method designated
# Set the password that will be used to encrypt the messages exchanged between the switch and the
RADIUS authentication server.
[Sysname -radius-radius1] key authentication expert
# Configure the system to strip domain name off a user name before transmitting the user name to the
RADIUS server.
[Sysname-radius-radius1] user-name-format without-domain
[Sysname-radius-radius1] quit
# Create ISP domain aabbcc.net for Web authentication users and enter the domain view.
[Sysname] domain aabbcc.net
# Enable Web authentication globally. (It is recommended to take this step as the last step, so as to
avoid the case that a valid user cannot access the network due to that some other related configurations
are not finished.)
1-2
[Sysname] web-authentication enable
Now, Web authentication takes effect. Before the user passes the Web authentication, it cannot access
external networks and can only access the free resource.
The user can perform the following steps to access the Internet:
Step 1: Enter http://10.10.10.10:8080 in the address column of IE. A page with the following prompt will
be displayed: ”Please input your name and the password!”.
Step 2: Enter the correct user name and password and then click [login]. The following page will be
displayed: ”Authentication passed!”.
Now the user can access external networks.
Complete Configuration
#
web-authentication web-server ip 10.10.10.10 port 8080
#
domain default enable aabbcc.net
#
web-authentication web-server ip 10.10.10.10 port 8080
web-authentication free-ip 10.20.20.0 255.255.255.0
web-authentication enable
#
radius scheme radius1
primary authentication 10.10.10.164
accounting optional
key authentication expert
user-name-format without-domain
#
domain aabbcc.net
scheme radius-scheme radius1
#
interface Ethernet1/0/1
web-authentication select method designated
#
Precautions
z Before enabling global Web authentication, you should first set the IP address of a Web
authentication server.
z Web authentication cannot be enabled when one of the following features is enabled, and vice
versa: 802.1x, MAC authentication, port security, port aggregation and XRN.
z You can make Web authentication settings on individual ports before Web authentication is
enabled globally, but they will not take effect. The Web authentication settings on ports take effect
immediately once you enable Web authentication globally.
z A Web authentication client and the switch with Web authentication enabled must be able to
communicate at the network layer so that the Web authentication page can be displayed on the
Web authentication client.
1-3
z Web authentication is mutually exclusive with functions that depend on ACLs such as IP filtering,
ARP intrusion detection, QoS, and port binding.
z After a user gets online in shared access method, if you configure an authentication-free user
whose IP address and MAC address are the same as those of the online user, the online user will
be forced to get offline.
1-4
Table of Contents
i
1 IPv6 Management Configuring Guide
Configuring IPv6
An IPv6 address is required for a host to access an IPv6 network. A host can be assigned a global
unicast address, a site-local address, or a link-local address.
To enable a host to access a public IPv6 network, you need to assign an IPv6 global unicast address to
it.
Network Diagram
In Figure 1-1, SWA, SWB, and SWC are three switches, among which SWA is an 3Com Ethernet switch
list in the table bellow, SWB and SWC are two switches supporting IPv6 forwarding. In a LAN, there is a
Telnet server and a TFTP server for providing Telnet service and TFTP service to the switch respectively.
It is required that you telnet to the telnet server from SWA and download files from the TFTP server.
1-1
Product series Software version Hardware version
V03.01.00
Switch 4210 All versions
V03.01.05
Configuration Procedure
1) Configuration on SWA
# Configure a global unicast address for the interface VLAN-interface 2.
<SWA> system-view
[SWA] interface vlan-interface 2
[SWA-Vlan-interface2] ipv6 address 3003::2/64
# On SWA, configure static routes to SWC, the Telnet Server, and the TFTP Server.
[SWA-Vlan-interface2] quit
[SWA] ipv6 route-static 3002:: 64 3003::1
[SWA] ipv6 route-static 3001:: 64 3003::1
[SWA] quit
1-2
# Trace the IPv6 route from SWA to SWC.
<SWA> tracert ipv6 3002::1
traceroute to 3002::1 30 hops max,60 bytes packet
1 3003::1 30 ms 0 ms 0 ms
2 3002::1 10 ms 10 ms 0 ms
Complete Configuration
z Configuration on SWA
#
interface Vlan-interface2
ipv6 address 3003::2/64
ipv6 route-static 3002:: 64 3003::1
ipv6 route-static 3001:: 64 3003::1
#
Precautions
z If XRN fabric ports are configured on a 5500/4500 series switch, no IPv6 address can be
configured for the switch.
z If an XRN fabric port on a 5500G series switch is enabled with XRN fabric, no IPv6 address can be
configured for the switch. To do so, you need to disable XRN fabric on all XRN fabric ports.
z IPv6 unicast addresses can be configured for only one VLAN interface on an 3Com stackable
Ethernet switch. The total number of global unicast addresses and site-local addresses on the
VLAN interface depends on the device model. For details, refer to the operation manual for your
switch.
z After an IPv6 site-local address or global unicast address is configured for an interface, a link-local
address will be generated automatically. The automatically generated link-local address is the
same as the one generated by using the ipv6 address auto link-local command.
z The manual assignment takes precedence over the automatic generation. That is, if you first adopt
the automatic generation and then the manual assignment, the manually assigned link-local
address will overwrite the automatically generated one. If you first adopt the manual assignment
and then the automatic generation, the automatically generated link-local address will not take
1-3
effect and the link-local address of an interface is still the manually assigned one. If the manually
assigned link-local address is deleted, the automatically generated link-local address takes effect.
1-4
Table of Contents
i
1 Smart Link-Monitor Link Configuration Guide
Server
Eth1/0/2 Eth1/0/3
Switch E
Eth1/0/1 Eth1/0/1
Switch C Switch D
Eth1/0/2 Eth1/0/2
Eth1/0/1 Eth1/0/2
Switch A
Host
Network requirements
As shown in Figure 1-1, Switch A is a 3Com S5500 series Ethernet switch. All Switches in Figure 1-1
support Smart Link.
To enable a remote PC to access the server reliably, perform these configurations on the switches:
1) Configure the smart link device Switch A as follows:
z Create a smart link group and assign member ports to the group.
z Specify the control VLAN for transmitting Flush messages.
2) Enable the specified ports on Switch C, Switch D, and Switch E to receive and process Flush
messages from the control VLAN.
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
1-1
Hardware
Product series Software version
version
V03.02.03
Switch 5500 All versions
V03.03.01
Configuration procedure
1) Configure a smart link group on Switch A and configure member ports for it. Enable the function of
sending flush messages in Control VLAN 1.
# Enter system view.
<switchA> system-view
# Enter Ethernet port view. Disable STP on Ethernet 1/0/1 and Ethernet 1/0/2.
[SwitchA] interface Ethernet 1/0/1
[SwitchA-Ethernet1/0/1] stp disable
[SwitchA-Ethernet1/0/1] quit
[SwitchA] interface Ethernet 1/0/2
[SwitchA-Ethernet1/0/2] stp disable
# Create smart link group 1 and enter the corresponding smart link group view.
[SwitchA] smart-link group 1
# Configure Ethernet 1/0/1 as the master port and Ethernet 1/0/2 as the slave port for smart link group 1.
[SwitchA-smlk-group1] port Ethernet 1/0/1 master
[SwitchA-smlk-group1] port Ethernet 1/0/2 slave
# Enable the function of processing flush messages received from VLAN 1 on Ethernet 1/0/2.
<SwitchC> smart-link flush enable control-vlan 1 port Ethernet 1/0/2
3) Enable the function of processing flush messages received from VLAN 1 on Switch D.
# Enter system view.
<SwitchD> system-view
# Enable the function of processing flush messages received from VLAN 1 on Ethernet 1/0/2.
[SwitchD] smart-link flush enable control-vlan 1 port Ethernet 1/0/2
4) Enable the function of processing flush messages received from VLAN 1 on Switch E.
# Enter system view.
<SwitchE> system-view
1-2
# Enable the function of processing flush messages received from VLAN 1 on Ethernet 1/0/2 and
Ethernet 1/0/3.
[SwitchE] smart-link flush enable control-vlan 1 port Ethernet 1/0/2 to Ethernet 1/0/3
Complete Configuration
1) Configuration on Switch A
#
smart-link group 1
flush enable control-vlan 1
#
interface Ethernet1/0/1
stp disable
port smart-link group 1 master
#
interface Ethernet1/0/2
stp disable
port smart-link group 1 slave
2) Configuration on Switch C
#
interface Ethernet1/0/2
smart-link flush enable control-vlan 1
3) Configuration on Switch D
#
interface Ethernet1/0/1
smart-link flush enable control-vlan 1
4) Configuration on Switch E
#
interface Ethernet1/0/2
smart-link flush enable control-vlan 1
#
interface Ethernet1/0/3
smart-link flush enable control-vlan 1
Precautions
z STP cannot be enabled on the member ports of a smart link group. An STP-enabled port or a link
aggregation group with an STP-enabled port cannot serve as a member port for a smart link group.
z Smart Link is mutually exclusive with remote port mirroring.
z If you configure the Smart Link function on an XRN enabled device, the Smart Link function will
function abnormally. Thus, you are recommended to disable the XRN function when configuring
the Smart Link function.
z When a Combo port operates as a member port of a smart link group, the optical port and the
electrical port of the Combo port must not be both engaged with a cable at the same time.
z When you copy a port, the smart link group member information configured on the port will not be
copied to other ports.
z If a single port is specified as a member of a smart link group, you cannot execute the lacp enable
command on this port or add this port into other dynamic link aggregation groups, because these
operations will make this port become a link aggregation group member.
1-3
z If no control VLAN is configured for flush message processing, the device will forward received
flush messages without processing them.
z If the control VLAN for receiving flush messages configured on an associated device is different
than the one for sending flush messages configured on the corresponding Smart Link device, the
device will forward received flush messages without processing them.
z In the static or manual link aggregation group which serves as a smart link group member, if a
member port can process flush messages, this function cannot be synchronized to the other ports
in the aggregation group automatically, that is, the other member ports in the aggregation group
cannot process flush messages. The function of processing flush messages must be manually
configured for each port in the aggregation group.
z The VLAN configured as a control VLAN to send and receive flush messages must exist. You
cannot directly remove the control VLAN. When a dynamic VLAN is configured as the control VLAN
for the smart link group, this VLAN will become a static VLAN, and the prompt information is
displayed.
Internet
Server
Eth1/0/10 Eth1/0/11
Switch E
Eth1/0/2 Eth1/0/2
Eth1/0/3 Eth1/0/3
Switch A Switch B
Network requirements
As shown inFigure 1-2, the PCs access the server and Internet through the switch. Configure Smart
Link and Monitor Link to prevent the PCs from failing to access the server and Internet due to uplink link
or port failure.
Configure the switches as follows:
1-4
z Create a smart link group on Switch A and Switch B, and specify the control VLAN for transmitting
Flush messages.
z Create a monitor link group on Switch C and Switch D.
z Enable the specified ports on Switch C, Switch D, and Switch E to receive and process Flush
messages from the control VLAN.
Hardware
Product series Software version
version
V03.02.04
Switch 5500G All versions
V03.03.01
V03.02.03
Switch 5500 All versions
V03.03.01
Switch 4200G V03.02.00 All versions
Configuration procedure
1) Configure Switch A
# Enter system view.
<switchA> system-view
# Create smart link group 1 and enter smart link group view.
[SwitchA] smart-link group 1
# Configure Ethernet 1/0/1 as the master port of the smart link group and Ethernet 1/0/2 as the slave
port.
[SwitchA-smlk-group1] port Ethernet 1/0/1 master
[SwitchA-smlk-group1] port Ethernet 1/0/2 slave
# Create monitor link group 1 and enter monitor link group view
1-5
[SwitchC] monitor-link group 1
# Configure Ethernet 1/0/1 as the uplink port of the monitor link group and Ethernet 1/0/2 and Ethernet
1/0/3 as the downlink ports.
[SwitchC-mtlk-group1] port Ethernet 1/0/1 uplink
[SwitchC-mtlk-group1] port Ethernet 1/0/2 downlink
[SwitchC-mtlk-group1] port Ethernet 1/0/3 downlink
# Return to system view. Enable the function of processing flush messages received from VLAN 1 on
Ethernet 1/0/2 and Ethernet 1/0/3.
[SwitchC-mtlk-group1] quit
[SwitchC] smart-link flush enable control-vlan 1 port Ethernet 1/0/2 to Ethernet 1/0/3
3) Enable the function of processing flush messages received from VLAN 1 on Ethernet 1/0/10 and
Ethernet 1/0/11 of Switch E.
# Enter system view.
<SwitchE> system-view
# Enable the function of processing flush messages received from VLAN 1 on Ethernet 1/0/10 and
Ethernet 1/0/11.
[SwitchE] smart-link flush enable control-vlan 1 port Ethernet 1/0/10 to Ethernet 1/0/11
Complete Configuration
1-6
3) Configuration on Switch E
#
interface Ethernet1/0/10
smart-link flush enable control-vlan 1
#
interface Ethernet1/0/11
smart-link flush enable control-vlan 1
Precautions
z You cannot assign a port or link aggregation group to more than one smart link group or to a smart
link group and monitor link group at the same time.
z Smart Link is mutually exclusive with remote port mirroring.
z If you configure both the Smart Link and Monitor Link functions on an XRN enabled device, the
Smart Link and Monitor Link functions will function abnormally. Thus, you are recommended to
disable the XRN function when configuring the Smart Link or Monitor Link function.
z If a single port is specified as a smart link/monitor link group member, do not use the lacp enable
command on the port or add the port to another dynamic link aggregation group because doing so
will cause the port to become an aggregation group member.
z Using the copy command on a port does not copy the smart link/monitor link group member
information configured on the port to any other port.
1-7
Table of Contents
i
1 VLAN Mapping Configuration Guide
VLAN100 VLAN200
SwitchB
Eth1/0/15 Eth1/0/16
Eth1/0/17
Public Network
VLAN500/600
Eth1/0/10
Eth1/0/11 Eth1/0/12
SwitchA
VLAN100 VLAN200
Two customer networks are connected to the public network through Switch A and Switch B. Configure
the VLAN mapping function to enable packets to be exchanged between the two networks through the
public network VLANs.
z Switch A provides network access for terminal devices in VLAN 100 and VLAN 200 through
Ethernet 1/0/11 and Ethernet 1/0/12. On the other side of the public network, Switch B provides
network access for servers in VLAN 100 and VLAN 200 through Ethernet 1/0/15 and Ethernet
1/0/16.
z Ethernet 1/0/10 of Switch A connects the customer network to the public network, and so does
Ethernet 1/0/17 of Switch B.
z It is required that packets of VLAN 100 and the packets of VLAN 200 of the two customer networks
are transmitted in the public network carrying the tag of VLAN 500 and the tag of VLAN 600.
1-1
Applicable Product Matrix
Use ACLs to match packets carrying the specified VLAN ID and then map the VLAN ID to the specified
VLAN ID. You can configure VLAN mapping on a switch connecting the customer network to the service
provider network. VLAN mapping can satisfy the service provider network’s planning requirements by
mapping the specified customer VLAN ID to the specified service VLAN ID.
Configuration procedure
# Create customer VLANs VLAN 100 and VLAN 200 and service VLANs VLAN 500 and VLAN 600 on
Switch A.
<SwitchA> system-view
[SwitchA] vlan 100
[SwitchA-vlan100] quit
[SwitchA] vlan 200
[SwitchA-vlan200] quit
[SwitchA] vlan 500
[SwitchA-vlan500] quit
[SwitchA] vlan 600
[SwitchA-vlan600] quit
# Configure Ethernet 1/0/11 of Switch A as a trunk port and configure its default VLAN as VLAN 100.
Assign Ethernet 1/0/11 to VLAN 100 and VLAN 500. Configure Ethernet 1/0/12 in the same way.
[SwitchA] interface Ethernet 1/0/11
[SwitchA-Ethernet1/0/11] port link-type trunk
[SwitchA-Ethernet1/0/11] port trunk pvid vlan 100
[SwitchA-Ethernet1/0/11] port trunk permit vlan 100 500
[SwitchA-Ethernet1/0/11] quit
[SwitchA] interface Ethernet 1/0/12
[SwitchA-Ethernet1/0/12] port link-type trunk
[SwitchA-Ethernet1/0/12] port trunk pvid vlan 200
[SwitchA-Ethernet1/0/12] port trunk permit vlan 200 600
[SwitchA-Ethernet1/0/12] quit
# Configure Ethernet 1/0/10 of Switch A as a trunk port, and assign it to VLAN 100, VLAN 200, VLAN
500, and VLAN 600.
[SwitchA] interface Ethernet 1/0/10
[SwitchA-Ethernet1/0/10] port link-type trunk
1-2
[SwitchA-Ethernet1/0/10] port trunk permit vlan 100 200 500 600
[SwitchA-Ethernet1/0/10] quit
# Configure Layer-2 ACLs on Switch A. Configure ACL 4000 to permit packets from VLAN 100, ACL
4001 to permit packets from VLAN 200, ACL 4002 to permit packets from VLAN 500, and ACL 4003 to
permit packets from VLAN 600.
[SwitchA] acl number 4000
[SwitchA-acl-ethernetframe-4000] rule permit source 100
[SwitchA] quit
[SwitchA] acl number 4001
[SwitchA-acl-ethernetframe-4001] rule permit source 200
[SwitchA] quit
[SwitchA] acl number 4002
[SwitchA-acl-ethernetframe-4002] rule permit source 500
[SwitchA] quit
[SwitchA] acl number 4003
[SwitchA-acl-ethernetframe-4003] rule permit source 600
[SwitchA] quit
# Configure VLAN mapping on Ethernet 1/0/11 to replace VLAN tag 100 with VLAN tag 500.
[SwitchA] interface Ethernet 1/0/11
[SwitchA-Ethernet1/0/11] traffic-remark-vlanid inbound link-group 4000 remark-vlan 500
[SwitchA-Ethernet1/0/11] quit
# Configure VLAN mapping on Ethernet 1/0/12 to replace VLAN tag 200 with VLAN tag 600.
[SwitchA] interface Ethernet 1/0/12
[SwitchA-Ethernet1/0/12] traffic-remark-vlanid inbound link-group 4001 remark-vlan 600
[SwitchA-Ethernet1/0/12] quit
# Configure VLAN mapping on Ethernet 1/0/10 to replace VLAN tag 500 with VLAN tag 100 and replace
VLAN tag 600 with VLAN tag 200.
[SwitchA] interface Ethernet 1/0/10
[SwitchA-Ethernet1/0/10] traffic-remark-vlanid inbound link-group 4002 remark-vlan 100
[SwitchA-Ethernet1/0/10] traffic-remark-vlanid inbound link-group 4003 remark-vlan 200
[SwitchA-Ethernet1/0/10] quit
Define the same VLAN mapping rules on Switch B. The detailed configuration procedure is similar to
that of Switch A and thus is omitted here.
Complete Configuration
#
acl number 4000
rule 0 permit source 100
acl number 4001
rule 0 permit source 200
acl number 4002
rule 0 permit source 500
acl number 4003
rule 0 permit source 600
#
1-3
vlan 100
#
vlan 200
#
vlan 500
#
vlan 600
#
interface Ethernet1/0/10
port link-type trunk
port trunk permit vlan 1 100 200 500 600
traffic-remark-vlanid inbound link-group 4002 rule 0 remark-vlan 100
traffic-remark-vlanid inbound link-group 4003 rule 0 remark-vlan 200
#
interface Ethernet1/0/11
port link-type trunk
port trunk permit vlan 1 100 500
port trunk pvid vlan 100
traffic-remark-vlanid inbound link-group 4000 rule 0 remark-vlan 500
#
interface Ethernet1/0/12
port link-type trunk
port trunk permit vlan 1 200 600
port trunk pvid vlan 200
traffic-remark-vlanid inbound link-group 4001 rule 0 remark-vlan 600
Precautions
None
1-4