3com Stackable Switches Advanced Configuration Examples
3com Stackable Switches Advanced Configuration Examples
Family
Advanced Configuration Examples
Switch 5500
Switch 5500G
Switch 4500
Switch 4200G
Switch 4210
www.3Com.com
Part Number: 10016491 Rev. AA
Published: January 2008
3Com Corporation Copyright © 2006-2008, 3Com Corporation. All rights reserved. No part of this documentation may be reproduced in any
350 Campus Drive form or by any means or used to make any derivative work (such as translation, transformation, or adaptation) without
written permission from 3Com Corporation.
Marlborough, MA
3Com Corporation reserves the right to revise this documentation and to make changes in content from time to time
USA 01752-3064 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.
Cisco is a registered trademark of Cisco Systems, Inc.
Funk RADIUS is a registered trademark of Funk Software, Inc.
Aegis is a registered trademark of Aegis Group PLC.
Intel and Pentium are registered trademarks of Intel Corporation. Microsoft, MS-DOS, Windows, and Windows NT are
registered trademarks of Microsoft Corporation. Novell and NetWare are registered trademarks of Novell, Inc. UNIX is a
registered trademark in the United States and other countries, licensed exclusively through X/Open Company, Ltd.
IEEE and 802 are registered trademarks of the Institute of Electrical and Electronics Engineers, Inc.
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.
End of Life Statement
3Com processes allow for the recovery, reclamation and safe disposal of all end-of-life electronic components.
Regulated Materials Statement
3Com products do not contain any hazardous or ozone-depleting material.
CONTENTS
5 ROUTING OVERVIEW
Overview 87
Configuration Example 87
Configuration Examples 113
Comprehensive Configuration Example 128
Network Requirements 128
Configuration Procedure 131
Displaying the Whole Configuration on Devices 145
Verifying the Configuration 153
Precautions 156
This guide is intended for Qualified Service personnel who are responsible for
configuring, using, and managing the switches. It assumes a working knowledge
of local area network (LAN) operations and familiarity with communication
protocols that are used to interconnect LANs.
n 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
Conventions Table 1 lists icon conventions that are used throughout this guide.
Table 1 Notice Icons
Related The following manuals offer additional information necessary for managing your
Documentation Stackable Switch. Consult the documents that apply to the switch model that you
are using.
http://www.3com.com/
Products Supported by
this Document Table 2 Supported Products
Abstract:
This document describes DHCP configuration and application on Ethernet
switches in specific networking environments. Based on the different roles played
by the devices in the network, the functions and applications of DHCP server,
DHCP relay agent, DHCP snooping, and DHCP Option 82 are covered.
Acronym:
DHCP (Dynamic Host Configuration Protocol).
Supported DHCP
Functions
DHCP Functions
Table 1 DHCP functions supported by the 3Com stackable switches
Supported by the 3Com
Stackable Switches Function \Model DHCP server DHCP relay agent DHCP snooping
Switch 5500 ● ● ●
Switch 4500 - ● ●
Switch 5500Gs ● ● ●
Switch 4200 - - ●
Switch 4200G - - ●
Switch 4210 - - ●
Depending on the models, the 3Com stackable switches can support part or all of
the following DHCP functions:
■ DHCP snooping
■ DHCP snooping security functions, including DHCP snooping entry update and
ARP source checking
■ DHCP Snooping, Option 82
n Refer to respective user manuals for detailed descriptions of the DHCP functions
supported by different models.
Configuration Guide
Configuring the DHCP The DHCP server can be configured to assign IP addresses from a global or
Server interface address pool. These two configuration methods are applicable to the
following environments:
■ If the DHCP server and DHCP clients are on the same network segment, both
methods can be applied.
■ If the DHCP server and DHCP clients are on different network segments, the
DHCP server can only be configured to assign IP addresses from a global
address pool.
1 Use the following commands to configure the DHCP server to assign IP addresses
from a global address pool.
Table 2 Configure IP address allocation from a global address pool
Configuring the DHCP Use the following commands to configure the DHCP relay agent.
Relay Agent
Table 4 Configure DHCP relay agent
DHCP Server
Configuration
Example
Network Requirements A Switch 5500 serves as the DHCP server in the corporate headquarters (HQ) to
allocate IP addresses to the workstations in the HQ and a branch, and it also acts
as the gateway to forward packets from the HQ. The network requirements are as
follows:
■ Assign the HQ the IP addresses in the 10.214.10.0/24 network segment, with a
lease period of two days, and exclude the IP addresses of the DNS server, WINS
server, and mail server from allocation.
■ Assign IP addresses to the DNS server, WINS server, and the mail server in HQ
through static bindings.
■ Assign the workstations in the Branch the IP addresses in the 10.210.10.0/24
network segment, with a lease period of three days, and assign the file server
in the Branch an IP address through a static IP-to-MAC binding.
■ Assign the addresses of the gateway, DNS server, and the WINS server along
with an IP address to each workstation in the HQ and Branch.
■ Enable the detection of unauthorized DHCP servers to prevent any
unauthorized DHCP server from allocating invalid addresses.
VLAN-int 10
+4
*DWHZD\
VLAN-int 100
,3QHWZRUN
'+&35HOD\
%UDQFK
16 CHAPTER 1: DHCP CONFIGURATION EXAMPLES
<3Com> system-view
[3Com] interface Vlan-interface 10
[3Com-Vlan-interface10] ip address 10.214.10.1 24
# Configure the interface to operate in the interface address pool mode, assigning
the IP addresses in the 10.214.10.0/24 network segment to the devices in the HQ.
# Configure the address lease period of the address pool, and configure the IP
addresses of the DNS server and WINS server.
# Assign IP addresses to the DNS server, WINS server, and mail server through
IP-to-MAC bindings.
# Exclude the static IP addresses of the DNS server, WINS server, and mail server
from allocation.
[3Com-Vlan-interface10] quit
[3Com] dhcp server forbidden-ip 10.214.10.3 10.214.10.5
■ Configure address allocation for the devices in the Branch.
# Create a global address pool named “br” for the Branch, and specify the range
and lease period of the IP addresses for allocation.
# Create a static binding address pool named “br-static”, and assign the file server
in the Branch an IP address through an IP-to-MAC binding.
DHCP Relay Agent/Snooping Configuration Examples 17
[3Com-dhcp-pool-br] quit
[3Com] dhcp server ip-pool br-static
[3Com-dhcp-pool-br-static] static-bind ip-address 10.214.10.4 mask 2
55.255.255.0
[3Com-dhcp-pool-br-static] static-bind mac-address 000d-88f8-4e71
# Specify the gateway address, DNS server address, and the WINS server address
for the workstations in the Branch.
[3Com-dhcp-pool-br-static] quit
[3Com] dhcp server ip-pool br
[3Com-dhcp-pool-br] gateway-list 10.210.10.1
[3Com-dhcp-pool-br] dns-list 10.214.10.3
[3Com-dhcp-pool-br] nbst-list 10.214.10.4
# Exclude the static IP address of the gateway in the Branch from allocation.
[3Com-dhcp-pool-br] quit
[3Com] dhcp server forbidden-ip 10.210.10.1
Note that:
DHCP Relay
Agent/Snooping
Configuration
Examples
Network Requirements A Cisco Catalyst 3745 switch is deployed in the HQ and serves as the DHCP server
to assign IP addresses to the workstations in the Office branch. The branches are
18 CHAPTER 1: DHCP CONFIGURATION EXAMPLES
Network Diagram Figure 2 Network diagram for DHCP relay agent/snooping integrated configuration
&LVFR&DWDO\VW
/DE
+4
6ZLWFK$
,3QHWZRUN
0DVWHU
6ZLWFK%
9/$1LQW 8QLW
,5))DEULF
'+&35HOD\
6ZLWFK' 6ZLWFK&
8QLW 8QLW
(WK 9/$1LQW 9/$1LQW /DE
'+&36QRRSLQJ
'+&36HUYHU
(WK (WK 9/$1LQW
(WK FH GHD
2IILFH /DE
Configuration Procedure In this example, the XRN Fabric is comprised of Switch 5500s running software
version 3.2, a Switch 7750 switch running software version Release 0028 is used
as the DHCP snooping-capable switch, and a 3Com Switch 7750 Family S3528
switch running software version Release 0028 is used as the Lab DHCP server.
■ The devices in the XRN Fabric are SwitchA, SwitchB, SwitchC, and SwitchD.
■ The DHCP snooping-capable device is referred to as “Snooping”.
■ The device serving as the Lab DHCP server is referred to as “LAB”.
6ZLWFK$
0DVWHU
6ZLWFK%
9/$1 LQW 8QLW
,5))DEULF
'+&35HOD\
6ZLWFK' 6ZLWFK&
8QLW 8QLW
(WK 9/$1 LQW 9/$1 LQW
Within the XRN Fabric, configuration made on a device can be synchronized to the
other devices. Therefore, configuration is performed on Switch A only in this
example.
# Configure to forward the DHCP requests from the Office to the DHCP server in
the HQ.
<SwitchA> system-view
[SwitchA] dhcp-server 1 ip 192.168.0.3
[SwitchA] interface vlan-interface10
[SwitchA-Vlan-interface10] ip address 192.168.10.1 24
[SwitchA-Vlan-interface10] dhcp-server 1
# Configure to forward the DHCP requests from Lab2 to the Lab DHCP server.
[SwitchA-Vlan-interface10] quit
[SwitchA] dhcp-server 2 ip 192.168.17.1
[SwitchA] interface Vlan-interface 25
[SwitchA-Vlan-interface25] ip address 192.168.19.1 24
[SwitchA-Vlan-interface25] dhcp-server 2
[SwitchA-Vlan-interface25] quit
[SwitchA] interface Vlan-interface 17
[SwitchA-Vlan-interface17] ip add 172.16.2.5 30
# Configure the address checking function on the DHCP relay agent. Make sure
you configure the IP addresses and MAC addresses of the two DHCP servers as
static entries for the security function.
[SwitchA-Vlan-interface17] quit
[SwitchA] dhcp-security static 192.168.0.3 000D-88F8-4E71
[SwitchA] dhcp-security static 192.168.17.1 0010-5ce9-1dea
[SwitchA] interface Vlan-interface 10
[SwitchA-Vlan-interface10] address-check enable
[SwitchA-Vlan-interface10] quit
[SwitchA] interface vlan-interface 25
[SwitchA-Vlan-interface25] address-check enable
[SwitchA-Vlan-interface25] quit
DHCP Relay Agent/Snooping Configuration Examples 21
# Configure the address entry update interval on the DHCP relay agent.
# Enable the DHCP relay agent to support DHCP Option 82 and adopt the strategy
of keeping the original filed upon receiving DHCP messages carrying Option 82.
# Enable UDP-Helper so that the XRN Fabric can operate in the DHCP relay agent
mode.
[SwitchA] rip
[SwitchA-rip] network 192.168.10.0
[SwitchA-rip] network 192.168.19.0
[SwitchA-rip] network 172.16.0.0
n For the DHCP relay agent using the XRN structure and the DHCP server in the HQ
to communicate with each other, an active route must also be configured
between them. This configuration is performed by the ISP or the user; therefore, it
will not be covered in this document.
/DE
22 CHAPTER 1: DHCP CONFIGURATION EXAMPLES
# Configure an address pool for Lab2 and specify the address range, lease period,
and the gateway address.
<LAB> system-view
[LAB] dhcp enable
[LAB] dhcp server ip-pool lab2
[LAB-dhcp-lab2] network 192.168.19.0 255.255.255.0
[LAB-dhcp-lab2] expired day 2
[LAB-dhcp-lab2] gateway-list 192.168.19.1
[LAB-dhcp-lab2] quit
[LAB] interface Vlan-interface 17
[LAB-Vlan-interface17] ip address 172.16.2.6 30
[LAB-Vlan-interface17] dhcp select global
[LAB-Vlan-interface17] quit
[LAB] interface vlan-interface 15
[LAB-Vlan-interface15] ip address 192.168.17.1 24
[LAB-Vlan-interface15] dhcp select interface
[LAB-Vlan-interface15] quit
# To ensure that the lab DHCP server forwards DHCP packets normally, you need
configure a routing protocol. The following configuration uses RIP as an example.
For the configuration of other routing protocols, see the related parts in product
manuals.
[LAB] rip
[LAB-rip] network 192.168.17.0
[LAB-rip] network 172.16.0.0
(WK
'+&36QRRSLQJ
(WK (WK
(WK
2IILFH
DHCP Relay Agent/Snooping Configuration Examples 23
# Enable DHCP snooping and enable Option 82 support for DHCP snooping.
<Snooping> system-view
[Snooping] dhcp-snooping
[Snooping] dhcp-snooping information enable
[Snooping] dhcp-packet redirect Ethernet 0/11 to 0/13
Circuit ID suboption: It identifies the VLAN to which the clients belong and the
port to which the DHCP snooping device is connected.
0 15 31
Type(1) Length(6) 0 4
For example, the DHCP messages from clients connected to Ethernet1/0/11 are
added with Option 82, whose Circuit ID suboption should be
0x010600040001000a, where 01060004 is a fixed value, 0001 indicates the
access port’s VLAN is VLAN 1, and 000a is the absolute number of the port, which
is 1 less than the actual port number, indicating the actual port is Ethernet1/0/11.
Remote ID suboption: It identifies the MAC address of the DHCP snooping device
connected to the client.
0 15 31
Type(2) Length(8) 0 6
For example, the DHCP messages from clients connected to the DHCP snooping
device with MAC 000f-e234-bc66 are added with Option 82, whose Remote ID
suboption should be 02080006000fe234bc66, where 02080006 is a fixed value
and 000fe234bc66 is the MAC address of the DHCP snooping device.
In this example, IP addresses are assigned based on port number only. Therefore,
on the DHCP server, only a matching port number field in the Circuit ID suboption
needs to be found.
Switch> enable
Switch(config)# configure terminal
Enter Configuration commands, one per line. End with CNTL/Z.
Switch(config)# service dhcp
Switch(config)# ip dhcp use class
# Create a DHCP class for the client connected to Ethernet1/0/11 of the DHCP
snooping device and match the port number in the Circuit ID suboption of
Option82, and replace the contents without match need with a wildcard “*”.
# Configure a DHCP class for the client connected to Etherent1/0/12 of the DHCP
snooping device and match the port number in the Circuit ID suboption of
Option82.
# Create an address pool for Office and specify address ranges for the two DHCP
classes.
# Configure the lease period, gateway address, DNS server address, and WINS
server address for the address pool.
Switch(dhcp-pool)# lease 0 12
Switch(dhcp-pool)# default-router 192.168.10.1
Switch(dhcp-pool)# dns-server 192.168.100.2
Switch(dhcp-pool)# netbios-name-server 192.168.100.3
Precautions
Cooperation Between ■ In an XRN network, the DHCP relay agent runs on all the units in the Fabric. But
DHCP Relay Agent and only the DHCP relay agent running on the master unit can receive and send
XRN packets to perform full DHCP relay agent functions. The DHCP relay agent
running on a slave unit, however, only serves as a backup for the master unit.
■ DHCP is an application-layer protocol based on UDP. Once a slave unit receives
a DHCP request, UDP-Helper redirects the packet to the master unit. Then, the
DHCP relay agent running on the master unit gives a response back to the
Protocols and Standards 25
request and sends the real time information to each slave unit for backup. In
this way, when the current master unit fails, one of the slaves becomes the new
master and operates as the DHCP relay agent immediately. Therefore, make
sure you enable UDP-Helper before using DHCP relay agent in an XRN system.
Abstract:
This document describes QACL configurations on Ethernet switches in actual
networking environments. To satisfy different user needs, the document covers
various functions and applications like time-based ACLs, traffic policing, priority
re-marking, queue scheduling, traffic measurement, port redirection, local traffic
mirroring, and WEB Cache redirection.
Acronyms:
Access control list (ACL), and quality of service (QoS)
Supported QACL
Functions
ACL/QoS Functions
Table 6 ACL/QoS functions supported by 3Com stackable switches
Supported by 3Com
Stackable Switches Switch Switch Switch Switch Switch
Function\Model 5500 4500 5500G 4200G 4210
Basic ACL ● ● ● ● ●
Advanced ACL ● ● ● ● ●
Layer 2 ACL ● ● ● - -
User-defined ACL ● ● ● - -
Software-based ● ● ● ● ●
ACL referenced
by upper-layer
software
Apply ● ● ● - -
hardware-based
ACL to hardware
Traffic ● ● ● - -
classification
Priority ● ● ● - -
re-marking
Port rate limiting ● ● ● ● ●
Traffic policing ● ● ● - -
Traffic shaping - - - - -
Port redirection ● ● ● - -
28 CHAPTER 2: QACL CONFIGURATION EXAMPLES
n For details on the ACL and QoS functions supported by different models, refer to
switch model’s configuration guide.
Configuration Guide
10.0 .0.1
Server 1
LAN 2
Data Detect Server
LAN 1
GE 1/1/2
GE 1/1/1 E1 /0/20
E1 /0/1 E1 /0/4
LAN 10 LAN 12
E1 /0/2 E1/0/3
PC 1 PC 4
LAN 11 LAN 12
10.0.0.10 10 .0.0.13
0012-a 990-2440 0012- a990-2443
PC 2 PC 3
■ A Switch 5500 serves as the central switch of the company. The software
version is Release 3.2.
■ The devices within the company gain access to the Internet through Server1
attached to the port GigabitEthernet1/1/1.
■ Server2, Server3, and Server4 are the data server, mail server and file server of
the company respectively. They are connected to the port
GigabitEthernet1/1/2.
■ The Data Detect Server is connected to the port Ethernet1/0/20.
■ PC1, PC2, PC3 and PC4 are clients of the company, and are connected to the
ports Ethernet1/0/1, Ethernet1/0/2, Ethernet1/0/3, and Ethernet1/0/4
respectively.
Network Requirements The company gains access to the Internet through Server1. The requirements are
as follows:
32 CHAPTER 2: QACL CONFIGURATION EXAMPLES
■ During the period from 8:30 to 18:30 in workdays, the clients are not allowed
to access the Internet through HTTP. In other periods, the clients are allowed to
access the Internet. The maximum access traffic is 100 Mbps.
■ For the packets with the IP priority of 7 that are sent by PC 1, the allowed
maximum rate is 20 Mbps. The DSCP priority of such packets at rates higher
than 20 Mbps is modified as EF.
■ For the packets with the CoS priority of 5 that are sent by PC 2, the allowed
maximum rate is 10 Mbps. Such packets at rates higher than 10 Mbps are
discarded.
Network Diagram Figure 9 Network diagram for configuration of time-based ACL plus port-based
bandwidth limiting plus traffic policing
10.0 .0.1
Server 1
LAN 1
GE 1/1/2
GE 1/1/1 E1 /0/20
E1 /0/1 E1 /0/4
LAN 10 LAN 12
E1 /0/2 E1/0/3
PC 1 PC 4
LAN 11 LAN 12
10.0.0.10 10 .0.0.13
0012-a 990-2440 0012- a990-2443
PC 2 PC 3
Configuration Procedure # Create time range a001, defining the office hours on working days.
<3Com> system-view
System View: return to User View with Ctrl+Z.
[3Com] time-range a001 8:30 to 18:00 working-day
# Define ACL 3010: Forbid the clients to access the Internet through HTTP during
the time range a001; classify and mark the packets with the IP priority of 7
generated when PC 1 accesses the Internet during non-workday periods.
# Define ACL 4010: Classify and mark the packets with the CoS priority of 5
generated when PC 2 accesses the Internet during non-work periods.
# Perform traffic policing for the packets marked rule 1 of ACL 3010 on the port
Ethernet1/0/1 connected to PC 1, and modify the DSCP priority of the excess
packets to EF.
# Perform traffic policing for the packets marked rule 0 of ACL 4010 on the port
Ethernet1/0/2 connected to PC 2, set the maximum traffic rate to 10 Mbps, and
discard the excess packets.
n The traffic-limit command works only with the permit rules in ACLs.
Configuration
Example of Priority
Re-marking plus
Queue Scheduling
Algorithm plus
Congestion Avoidance
plus Packet Priority
Trust
Network Requirements Server2, Server3, and Server4 are the data server, mail server and file server of the
company respectively. The detailed requirements are as follows:
34 CHAPTER 2: QACL CONFIGURATION EXAMPLES
■ The switch first processes the packets accessing the data server, then the
packets accessing the mail server, and finally the packet accessing the file
server.
■ Configure the port GigabitEthernet1/1/2 to use the WRR queue priority
algorithm, and configure the weight of outbound queues as 1:1:1:5:1:10:1:15.
■ Configure the queue with an index of 4 on the port GigabitEthernet1/1/2 to
use WRED: Discard subsequent packets at random when the queue is more
than 64 packets in size, and configure the probability of discarding as 20%.
■ Configure the port Ethernet1/0/3 to trust the priority of packets rather than to
use the priority of the port.
Network Diagram Figure 10 Network diagram for configuration of priority re-marking plus queue
scheduling algorithm plus congestion avoidance plus packet priority trust
LAN 2
GE 1/1/2
Configuration Procedure # Define ACL 3020: Classify and mark packets according to their destination IP
addresses.
<3Com> system-view
System View: return to User View with Ctrl+Z.
[3Com] acl number 3020
[3Com-acl-adv-3020] rule 0 permit ip destination 10.0.0.2 0
[3Com-acl-adv-3020] rule 1 permit ip destination 10.0.0.3 0
[3Com-acl-adv-3020] rule 2 permit ip destination 10.0.0.4 0
[3Com-acl-adv-3020] quit
# Re-mark priority for the packets on the port GigabitEthernet1/1/2 that match
the rules in ACL 3020.
[3Com-GigabitEthernet1/1/2] wred 4 64 20
[3Com-GigabitEthernet1/1/2] quit
n The traffic-priority command works only with the permit rules in ACLs.
Configuration
Example of Traffic
Measurement plus
Port Redirection
Network Requirements The Data Detect Server is connected to the port Ethernet1/0/20. The detailed
requirements are as follows:
■ Measure the HTTP traffic generated by Internet access through the port
Ethernet1/0/1 during non-workday periods.
■ Redirect all the HTTP traffic generated by the Internet access through the port
Ethernet1/0/1 during workday period to the port Ethernet1/0/20.
36 CHAPTER 2: QACL CONFIGURATION EXAMPLES
Network Diagram Figure 11 Network diagram for configuration of traffic measurement plus port redirection
E1 /0/1
LAN 10
PC 1
10.0.0.10
0012-a 990-2440
# Define ACL 3030: Classify the packets accessing the Internet through HTTP
according to periods.
# Configure traffic redirection on the port Ethernet1/0/1: Redirect all the HTTP
traffic generated by Internet access during workday period to the port
Ethernet1/0/20.
n The traffic-redirect and traffic-statistic commands work only with the permit
rules in ACLs.
Configuration
Example of Local
Traffic Mirroring
Network Requirements The Data Detect Server is connected to the port Ethernet1/0/20. All the packets
accessing the Internet through the ports Ethernet1/0/1 and Ethernet1/0/2 using
HTTP during workday period must be mirrored to the port Ethernet1/0/20. Then,
the Data Detect Server analyzes the packets.
E1/0/20
E1/0/1
LAN 10
E1 /0/2
PC 1
LAN 11
10.0.0.10
0012 -a 990-2440
PC 2
10 .0.0.11
0012 -a990 -2441
# Define ACL 3030: Classify the packets accessing the Internet through HTTP
during workday period.
n The mirrored-to command works only with the permit rules in ACLs.
■ If the VLAN VPN function is enabled on a port, the switch will add another
layer of VLAN tag to the packets received on all ports. No matter whether the
packets contain a VLAN tag originally, the packets will have two layers of VLAN
tags.
The table below lists the common protocol types and offset.
Other Functions Other functions that reference ACL rules are as follows:
Referencing ACL Rules ■ Telnet/SNMP/WEB login user control. For Telnet users, ACLs 2000 to 4999 may
be referenced, and for SNMP/WEB users, ACLs 2000 to 2999 may be
referenced.
■ ACLs 2000 to 3999 can be referenced for routing policy match.
■ ACLs 2000 to 3999 can be referenced for filtering route information.
■ ACLs 2000 to 3999 can be referenced for displaying the routing entries that
match an ACL rule.
■ ACLs 2000 to 3999 can be referenced for displaying the FIB entries that match
an ACL rule.
■ ACLs 2000 to 3999 can be referenced for connecting a TFTP client to the TFTP
server.
■ 802.1x function (after 802.1x is enabled globally and on a port, ACL rules are
referenced to apply)
■ Cluster function (the function is enabled by default. ACL rules are referenced to
apply to all ports). ACL 3998 and ACL 3999 are reserved for cluster
management, and cannot be configured.
■ DHCP snooping (after the function is enabled, ACL rules are referenced to
apply to all ports)
■ Port isolation (If the function is configured and a virtual interface is available,
ACL rules are referenced to apply)
■ MAC+IP port binding (after the function is configured on a port, ACL rules are
referenced to apply)
40 CHAPTER 2: QACL CONFIGURATION EXAMPLES
■ Flexible QinQ (after this function is configured on a port, the ACL rules within
the configured range are referenced to apply)
■ Voice VLAN (if Voice VLAN is enabled on a port and an OUIMAC is available,
ACL rules are referenced to add)
Configuration
Example of WEB
Cache Redirection
n Now, only the Switch 5500 Family supports the WEB Cache redirection function.
Configuration
Example of WEB
Cache Redirection
Network Requirements Figure 13 shows the network topology of a company. The environment is as
follows:
■ A Switch 5500 serves as the central switch of the company. The software
version is Release 3.2.
■ The marketing department gains access to the switch through the port
Ethernet1/0/1. It belongs to VLAN 10, and the network segment is
192.168.1.1/24.
■ The R&D department gains access to the switch through the port
Ethernet1/0/2. It belongs to VLAN 20, and the network segment is
192.168.2.1/24.
■ The administrative department gains access to the switch through the port
Ethernet1/0/3. It belongs to VLAN 30, and the network segment is
192.168.3.1/24.
■ The WEB Cache Server gains access to the switch through the port
Ethernet1/0/4. It belongs to VLAN 40, and the network segment is
192.168.4.1/24.The IP address of the WEB Cache Server is 192.168.4.2, and
the MAC address of it is 0012-0990-2250.
The WEB Cache redirection function is enabled on the switch, and all the packets
of the marketing department, R&D department, and administrative department
are redirected to the WEB Cache Server, so as to relieve the load from the
connection links of the WAN, and improve the speed of Internet access.
Configuration Example of WEB Cache Redirection 41
Network Diagram Figure 13 Network diagram for configuration of WEB Cache redirection
Internet
VLAN 40
WEB Cache Server
192.168.4.2
0012-0990-2250
E1 /0/ 4
E1 /0/1
E1/0/ 3
E1 /0/2
VLAN 10 VLAN 30
VLAN 20
Administrative
Market Department R&D Department
Department
Configuration Procedure # Create VLAN 10 for the marketing department, and assign an IP address
192.168.1.1 to the VLAN interface 10.
<3Com> system-view
System View: return to User View with Ctrl+Z.
[3Com] vlan 10
[3Com-vlan10] port Ethernet 1/0/1
[3Com-vlan10] quit
[3Com] interface Vlan-interface 10
[3Com-Vlan-interface10] ip address 192.168.1.1 24
[3Com-Vlan-interface10] quit
# Create VLAN 20 for the R&D department, and assign an IP address 192.168.2.1
to the VLAN interface 20.
[3Com] vlan 20
[3Com-vlan20] port Ethernet 1/0/2
[3Com-vlan20] quit
[3Com] interface Vlan-interface 20
[3Com-Vlan-interface20] ip address 192.168.2.1 24
[3Com-Vlan-interface20] quit
[3Com] vlan 30
[3Com-vlan30] port Ethernet 1/0/3
[3Com-vlan30] quit
[3Com] interface Vlan-interface 30
[3Com-Vlan-interface30] ip address 192.168.3.1 24
[3Com-Vlan-interface30] quit
42 CHAPTER 2: QACL CONFIGURATION EXAMPLES
# Create VLAN 40 for the WEB Cache Server, and assign an IP address 192.168.4.1
to the VLAN interface 40.
[3Com] vlan 40
[3Com-vlan40] port Ethernet 1/0/4
[3Com-vlan30] quit
[3Com] interface Vlan-interface 40
[3Com-Vlan-interface40] ip address 192.168.4.1 24
[3Com-Vlan-interface40] quit
# Enable the WEB Cache redirection function, and redirect all the HTTP packets
received on VLAN 10, VLAN 20 and VLAN 30 to the WEB Cache Server.
n The VLAN interface 40, VLAN interface 10, VLAN interface 20, and VLAN interface
30 must be in UP state. Otherwise, the WEB Cache redirection function will not
work.
802.1X CONFIGURATION EXAMPLE
3
Keywords:
802.1x and AAA
Abstract:
This article introduces the application of 802.1x on Ethernet switches in real
network environments, and then presents detailed configurations of the 802.1x
client, LAN Switch and AAA server respectively.
Acronyms:
AAA (Authentication, Authorization and Accounting)
n The use of this document is restricted to 3Com Switch 4500, Switch 5500, Switch
5500G, Switch 4210, and Switch 4200 Families.
Introduction to 802.1X The LAN defined in IEEE 802 protocols does not provide access authentication. In
general, users can access network devices or resources in a LAN as long as they
access the LAN. When it comes to application circumstances like telecom network
access, building, LAN and mobile office, however, administrators need to control
and configure the access of user devices. Therefore, port- or user-based access
control comes into being.
Features
Configuration
Precautions ■ The configuration of dot1x takes effect only after the dot1x feature is enabled
globally.
■ You can configure dot1x parameters associated with Ethernet ports or devices
before enabling dot1x. However, the configured dot1x parameters only take
effect after dot1x is enabled.
■ The configured dot1x parameters are reserved after dot1x is disabled and will
take effect if dot1x is re-enabled.
802.1X Configuration To implement 802.1x, you need to configure the supplicant system (client),
Commands authenticator system (switch) and authentication/authorization server correctly.
■ Supplicant system: Ensures that the PC uses a right client.
■ Authenticator system: Configuring 802.1x and AAA on the authenticator
system is required.
■ Authentication/authorization server: Configuring the
authentication/authorization server correctly is required.
Enterprise Network
Access Authentication
Configuration
Example
n The configuration or information displayed may vary with devices. The following
example uses the 3Com Switch 5500 (using software Release 1510).
Internet
Supplicant
46 CHAPTER 3: 802.1X CONFIGURATION EXAMPLE
Configuration
Procedure
Configuring the Switch # Create a RADIUS scheme named cams, and specify the primary and secondary
authentication/accounting servers.
<3Com> system-view
[3Com] radius scheme cams
[3Com-radius-cams] primary authentication 192.168.1.19
[3Com-radius-cams] primary accounting 192.168.1.19
[3Com-radius-cams] secondary authentication 192.168.1.20
[3Com-radius-cams] secondary accounting 192.168.1.20
# Set the password to expert for the switch to exchange messages with the
RADIUS authentication and accounting servers.
# Set the username format to fully qualified user name with domain name.
# Create an ISP domain named abc and adopt the RADIUS scheme cams for
authentication.
[3Com] vlan 10
[3Com-Ethernet1/0/3] dot1x port-method portbased
[3Com-Ehternet1/0/3] dot1x guest-vlan 10
# Enable 802.1x.
[3Com] dot1x
Configuration Procedure 47
[3Com-Ethernet1/0/3] dot1x
# Use the display command to view the configuration associated with 802.1x and
AAA parameters.
Ethernet1/0/3 is link-up
802.1x protocol is enabled
Proxy trap checker is disabled
Proxy logoff checker is disabled
Version-Check is disabled
The port is an authenticator
Authentication Mode is Auto
Port Control Type is Port-based
ReAuthenticate is disabled
Max number of on-line users is 256
unit 1 :
Primary Auth State=active, Second Auth State=active
Primary Acc State=active, Second Acc State=active
[3Com] display domain abc
The contents of Domain abc:
State = Active
RADIUS Scheme = cams
Access-limit = Disable
Vlan-assignment-mode = Integer
Domain User Template:
Idle-cut = Disable
Self-service = Disable
Messenger Time = Disable
Configuring the RADIUS The configuration of CAMS authentication, authorization and accounting server
Server consists of four parts:
■ “Creating an accounting policy” on page 49
■ “Adding a service” on page 50
■ “Adding an account user” on page 51
■ “Configuring the access device” on page 52
The following parts take CAMS server V1.20 (standard version) as an example to
introduce CAMS configuration.
Log in the CAMS configuration console. On the navigation tree, select [Charges
Management/Accounting Policy] to enter the [Accounting Policy Management]
page, as shown in Figure 17.
The list shows the created accounting policies. You can query, modify or maintain
these policies.
Click <Add> to enter the [Accounting Policy Basic Information] page and create a
monthly payment accounting policy, as shown in Figure 18.
50 CHAPTER 3: 802.1X CONFIGURATION EXAMPLE
3 Click <Next> to enter the [Accounting Attribute Settings] page, and set
Accounting Type to By duration, Monthly Cycle to Monthly and Monthly Fixed Fee
to 50 dollars, as shown in Figure 19.
Adding a service
1 Enter the Service Config page.
Log in the CAMS configuration console. On the navigation tree, select [Service
Management/Service Config] to enter the [Service Config] page, as shown in
Figure 20.
The list shows the created service types. You can query, modify or delete these
service types.
2 Add a service.
Click <Add> to enter the [Add Service] page and configure as follows:
Log in the CAMS configuration console. On the navigation tree, select [User
Management/Account User] to enter the [Account Management] page, as shown
in Figure 22.
The list shows the created account users. You can maintain these account users.
Click <Add> to enter the [Add Account] page and configure as follows:
52 CHAPTER 3: 802.1X CONFIGURATION EXAMPLE
■ Account: info
■ Password: info
■ Full Name: Bruce
■ Prepaid Money: 100 dollars
■ Bind multiple IP address and MAC address: enable
■ Online Limit: 1
■ Max. Idle Time: 20 minutes
■ Service Information: abc
Log in the CAMS configuration console. On the navigation tree, select [System
Management/System Configuration] to enter the [System Configuration] page, as
shown in Figure 24.
2 Click the Modify link for the Access Device item to enter the [Access Device
Configuration] page to modify access device configuration like IP address, shared
key, and authentication and accounting ports.
3 Return to the [System Configuration] page and click <Validate Now> to make the
configuration take effect immediately.
54 CHAPTER 3: 802.1X CONFIGURATION EXAMPLE
Configuring the You need to install an 802.1x client on the PC, which may be 3Com’s 802.1x
Supplicant System client, the client shipped with Windows XP or other client from the third party. The
following takes 3Com’s 802.1X as an example to introduce how to configure the
supplicant system.
Creating a connection
Right click the 802.1x Authentication icon and select [Create an 802.1x
connection], as shown in Figure 30.
Configuration Procedure 55
Keep default settings and click <OK>. The prompt page appears as shown in
Figure 32.
Configuration Procedure 57
Figure 33 Connecting
Verifying Configuration To verify that the configuration of Guest VLAN is taking effect, check that users
can access VLAN 10 before 802.1x authentication or the 802.1x authentication
fails.
To verify that the dynamically assigned VLAN is taking effect, check that users can
access VLAN 100 after 802.1x authentication succeeds. At the same time, 802.1x
authentication cooperates with CAMS to complete accounting and real time
monitoring.
To verify that the configuration of IP-to-MAC binding is taking effect, check that
users can be re-authenticated and access the Internet when the device reboots
abnormally. If the configured IP-to-MAC binding is different from that on the
CAMS, the user cannot access the Internet.
Abstract:
This article introduces the application of SSH on the 3Com stackable switches in
real network environments, and then presents detailed configurations of the
involved SSH client and Ethernet switches respectively.
Acronyms:
SSH (Secure Shell), RSA (Rivest Shamir Adleman)
Introduction to SSH Secure Shell (SSH) is designed to provide secure remote login and other security
services in insecure network environments. When users remotely access the switch
across an insecure network, SSH will automatically encrypt data before
transmission and decrypt data after they reach the destination to guarantee
information security and protect switches from such attacks as plain-text password
interception. In addition, SSH provides powerful authentication to defend against
the man-in-the-middle attacks. SSH uses the client/server mode, by which the SSH
server accepts the connection requests from SSH clients and provides
authentication. SSH clients can establish SSH connections and log into the SSH
server through the SSH connections.
SSH also provides other functions, such as compressing the data to be transmitted
to speed up the transmission speed, functioning as Telnet, and providing secure
channels for FTP, PoP and even PPP.
n For details about SSH functions supported on different Ethernet switches, refer to
related user manuals.
SSH Configuration
Precautions ■ If you have configured a user interface to support the SSH protocol, you must
configure AAA authentication for the user interface by using the
authentication-mode scheme command to ensure successful login.
■ Creating a RSA key pair on the SSH server is necessary for successful SSH login.
■ For new SSH users to login successfully, you must specify an authentication
type for them.
SSH Configuration To implement SSH, you need to configure the SSH client and the SSH server
Commands correctly.
The following sections describe switch’s SSH configuration commands. For more
information, refer to the SSH section of the applicable configuration guide.
Configuring an 3Com Switch as an SSH Server 63
Configuring an 3Com
Switch as an SSH
Server
Configuration Procedure
Table 13 Configure the switch as an SSH server
Common
Public key configuration
configurati Authentication
Role on type Remarks
SSH For detailed Password - For detailed
server command, authentication command, refer to
refer to “Password
“Common authentication
configuratio configuration” on
n” on page page 65.
64.
RSA Configure a Associate For detailed
authentication public key the client commands, refer to
manually: copy public key “Configuring the
the public key saved on client RSA public
from the client the SSH key manually” on
public key file server to page 65.
to the SSH the SSH
server. client
Import a public For detailed
key: import the commands, refer to
public key from “Importing the
the client client RSA public
public file to key” on page 66 .
the SSH server
through
commands.
When some SSH client software like PuTTY is used to generate an RSA key pair,
you can either manually configure the public key for the SSH server or import the
public key to the SSH server.
Configuring an 3Com When the device connects to the SSH server as an SSH client, you can configure
Switch as an SSH whether the device supports first-time authentication.
Client ■ First-time authentication means that when the SSH client accesses the server
for the first time and is not configured with the server host public key, the user
can continue accessing the server, and will save the host public key on the
client for use in subsequent authentications.
■ When first-time authentication is not supported, a client, if not configured with
the server host public key, will be denied of access to the server. To access the
Configuring an 3Com Switch as an SSH Client 67
server, a user must configure in advance the server host public key locally and
specify the public key name for authentication.
Configuration Procedure
Table 18 Configure the switch as an SSH client
Common First-time
configurati authenticati Access the
Role on on support Public key configuration SSH server Remarks
SSH Refer to Yes -- Establish a Refer to
Client “Common connection “Enabling
configuratio between the first-time
n” on page SSH client authenticat
67. and the SSH ion” on
server page 67.
No Configure a Specify the Refer to
public key host public “Disabling
manually: key of the first-time
copy the SSH server authenticat
server public to be ion and
key from the connected manually
public key file configuring
to the SSH the server
client public key”
on page
68.
As shown in Table 18, you need to configure the server public key to the client in
the case that the SSH client does not support first-time authentication.
Table 21 Disable first-time authentication and manually configure the server public key
SSH Configuration
Example
n The Switch 5500 software version in this configuration example is Release 1510.
Network diagram
192.168.0.2/24
VLAN- interface 1
192. 168.0.1/24
SSH client Switch
Configuration procedure
1 Configure the SSH server
# Create a VLAN interface on the switch and assign an IP address, which the SSH
client will use as the destination for SSH connection.
<3Com> system-view
[3Com] interface vlan-interface 1
[3Com-Vlan-interface1] ip address 192.168.0.1 255.255.255.0
[3Com-Vlan-interface1] quit
# Create local client “client001”, and set the authentication password to “abc”,
protocol type to SSH, and command privilege level to 3 for the client.
# Configure an IP address (192.168.0.2 in this case) for the SSH client. This IP
address and that of the VLAN interface on the switch must be in the same
network segment.
# Configure the SSH client software to establish a connection to the SSH server.
In the Host Name (or IP address) text box, enter the IP address of the SSH server.
■ From the category on the left pane of the window, select SSH under
Connection. The window as shown in Figure 37 appears.
■ As shown in Figure 38, click Open to enter the following interface. If the
connection is normal, you will be prompted to enter the user name
“client001” and password “abc”. Once authentication succeeds, you will log
onto the server.
72 CHAPTER 4: SSH CONFIGURATION EXAMPLE
Network diagram
192.168.0 .2/ 24
VLAN -interface 1
192. 168.0. 1/ 24
SSH client Switch
Configuration procedure
1 Configure the SSH server
# Create a VLAN interface on the switch and assign an IP address, which the SSH
client will use as the destination for SSH connection.
<3Com> system-view
[3Com] interface vlan-interface 1
[3Com-Vlan-interface1] ip address 192.168.0.1 255.255.255.0
[3Com-Vlan-interface1] quit
# Configure the authentication type of the SSH client named client 001 as RSA.
n 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 an SSH Client” on page 62.
# Import the client’s public key named “Switch001” from file “public”.
n While generating the key pair, you must move the mouse continuously and keep
the mouse off the green process bar shown in Figure 40. Otherwise, the process
bar stops moving and the key pair generating process is stopped.
SSH Configuration Example 75
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).
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).
n 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.
The following takes the SSH client software Putty (version 0.58) as an example.
In the Host Name (or IP address) text box, enter the IP address of the server.
SSH Configuration Example 77
■ From the category on the left pane of the window, select SSH under
Connection. The window as shown in Figure 45 appears.
Click Browse... to bring up the file selection window, navigate to the private key
file and click OK.
■ From the window shown in Figure 46, click Open. The following SSH client
interface appears. If the connection is normal, you will be prompted to enter
the username and password, as shown in Figure 47.
SSH Configuration Example 79
Network diagram
Switch B Switch A
SSH server VLAN -interface1 SSH client
10. 165. 87. 137/ 24
VLAN- interface1
10. 165.87.136 / 24
Configuration procedure
1 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.
<3Com> system-view
[3Com] interface vlan-interface 1
[3Com-Vlan-interface1] ip address 10.165.87.136 255.255.255.0
[3Com-Vlan-interface1] quit
# Create local user “client001”, and set the authentication password to abc, the
login protocol to SSH, and user command privilege level to 3.
# Create a VLAN interface on the switch and assign an IP address, which serves as
the SSH client’s address in an SSH connection.
<3Com> system-view
[3Com] interface vlan-interface 1
[3Com-Vlan-interface1] ip address 10.165.87.137 255.255.255.0
[3Com-Vlan-interface1] quit
<3Com>
Network diagram
Switch B Switch A
SSH server VLAN- interface1 SSH client
10.165. 87. 137/ 24
VLAN- interface1
10. 165.87. 136 / 24
Configuration procedure
1 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.
<3Com> system-view
[3Com] interface vlan-interface 1
[3Com-Vlan-interface1] ip address 10.165.87.136 255.255.255.0
[3Com-Vlan-interface1] quit
n Before proceeding with the following steps, you need to generate an RSA key pair
on the client, and manually configure the RSA public key for the SSH server. For
detailed information, refer to “Configuring an SSH Client” on page 62.
# Configure the public key of the SSH client on the SSH server, and specify the
public key name as Switch001.
# Create a VLAN interface on the switch and assign an IP address, which serves as
the SSH client’s address in an SSH connection.
<3Com> system-view
[3Com] interface vlan-interface 1
[3Com-Vlan-interface1] ip address 10.165.87.137 255.255.255.0
[3Com-Vlan-interface1] quit
=====================================================
Time of Key pair created: 05:15:04 2006/12/08
Key name: 3Com_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
<Omitted>
n After generating an RSA key pair on the client, you need to configure the RSA
public key for the SSH server and finish the SSH server configuration before
continuing to configure the SSH client.
*************************************************************************
* Copyright(c) 2004-2006 Hangzhou 3Com Technologies Co., Ltd. *
* Without the owner’s prior written consent, *
* no decompiling or reverse-switch fabricering shall be allowed. *
*************************************************************************
<3Com>
Network diagram
Switch B Switch A
SSH server VLAN- interface1 SSH client
10.165. 87. 137/ 24
VLAN- interface 1
10. 165.87. 136 / 24
Configuration procedure
1 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.
<3Com> system-view
[3Com] interface vlan-interface 1
[3Com-Vlan-interface1] ip address 10.165.87.136 255.255.255.0
[3Com-Vlan-interface1] quit
n Before proceeding with the following steps, you need to generate an RSA key pair
on the client, and manually configure the RSA public key for the SSH server. For
detailed information, refer to “Configuring an SSH Client” on page 62.
# Configure the public key of the SSH client on the SSH server, and specify the
public key name as Switch001
# Create a VLAN interface on the switch and assign an IP address, which serves as
the SSH client’s address in an SSH connection.
<3Com> system-view
[3Com] interface vlan-interface 1
[3Com-Vlan-interface1] ip address 10.165.87.137 255.255.255.0
[3Com-Vlan-interface1] quit
=====================================================
Time of Key pair created: 05:15:04 2006/12/08
Key name: 3Com_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
<Omitted>
n After the SSH client generates an RSA key pair, it is necessary to configure the RSA
public key for the SSH server and finish the SSH server configuration before
continuing to configure the SSH client.
# Configure the public key of the SSH server on the SSH client, and specify the
public key name as Switch002.
[3Com-rsa-key-code] 0203
[3Com-rsa-key-code] 010001
[3Com-rsa-key-code] public-key-code end
[3Com-rsa-public-key] peer-public-key end
[3Com]
*************************************************************************
* Copyright(c) 2004-2006 Hangzhou 3Com Technologies Co., Ltd. *
* Without the owner’s prior written consent, *
* no decompiling or reverse-switch fabricering shall be allowed. *
*************************************************************************
<3Com>
ROUTING OVERVIEW
5
Overview
RIP
RIP is easy to configure and is insensitive to CPU and memory, so it is applicable to
small and medium sized networks. However, it converges slowly and cannot
eliminate route loops completely. In addition, periodic RIP updating multicasts or
broadcasts consume many network resources.
OSPF
OSPF is complicated to configure and requires high-performance CPU and
memory. It is applicable to medium and large sized networks. OSPF converges fast
and can eliminate route loops completely. It supports area partition and provides
hierarchical route management.
BGP
BGP runs between ASs. Although complicated to configure, BGP features high
reliability, stability, and scalability, has flexible and powerful routing policies and
eliminates route loops completely.
Routing Protocols
Table 22 Routing protocols supported by the 3Com stackable switches
Supported by the 3Com
Stackable Switches Model\Routing Protocols RIP OSPF BGP
Switch 4500 √ - -
Switch 5500 √ √ -
Switch 5500Gs √ √ √
Configuration
Example
n ■
■
This configuration example uses the Switch 5500G.
For configuration precautions, see the configuration guide and command
reference guide of the applicable switch.
88 CHAPTER 5: ROUTING OVERVIEW
Task Details
Static route configuration “Static Route Configuration” on page
88
RIP configuration “RIP Configuration” on page 88
OSPF configuration “OSPF Configuration” on page 93
BGP configuration “BGP Configuration” on page 101
Static Route
Table 24 Configure a static route
Configuration
Operation Command Remarks
Enter system view system-view -
Configure a static ip route-static ip-address { mask | Required
route mask-length } { interface-type
By default, the system can
interface-number | next-hop }
obtain the route to the
[ preference preference-value ] [ reject |
subnet directly connected
blackhole ] [ detect-group group
to the router.
number ] [ description text ]
RIP Configuration
Table 25 RIP configuration tasks
OSPF Configuration
Table 41 OSPF configuration tasks
BGP Configuration
Table 62 BGP configuration tasks
Importing Routes
Table 64 Import routes
Route Policy
Table 77 Route Policy Configuration
Configuration
Configuration task Remarks Related section
Configure an IP-prefix list Configuring an Optional “Configuring an
ip-prefix list ip-prefix list” on
page 110
AS path list Optional “AS path list
configuration configuration”
on page 111
Community list Optional “Community list
configuration configuration”
on page 111
Define a routing policy Defining a Routing Required “Defining a
Policy Routing Policy”
on page 111
Define if-match Optional “Define if-match
clauses clauses” on
page 111
Define apply clauses Optional “Define apply
clauses” on
page 112
Configuration
Examples
Host A
1.1.5 .2/24
1.1.5.1 /24
1 .1.2.1/24 1 .1.3.2/24
1.1.1.1/24 1.1.4.1/24
Switch A Switch B
Host C Host B
Configuration procedure
Configure the switches:
<SwitchA> system-view
[SwitchA] ip route-static 1.1.3.0 255.255.255.0 1.1.2.2
[SwitchA] ip route-static 1.1.4.0 255.255.255.0 1.1.2.2
[SwitchA] ip route-static 1.1.5.0 255.255.255.0 1.1.2.2
<SwitchB> system-view
[SwitchB] ip route-static 1.1.2.0 255.255.255.0 1.1.3.1
114 CHAPTER 5: ROUTING OVERVIEW
<SwitchC> system-view
[SwitchC] ip route-static 1.1.1.0 255.255.255.0 1.1.2.1
[SwitchC] ip route-static 1.1.4.0 255.255.255.0 1.1.3.2
Now any two hosts or switches can communicate with each other.
Vlan-int 2
Switch A
Ethernet
Vlan-int 1
Switch C Switch B
Vlan-int 4 Vlan-int 3
Device Interface IP Address Device Interface IP Address
Switch A Vlan-int1 110.11.2.1/24 Switch B Vlan-int1 110.11.2.2/24
Vlan-int2 155.10.1.1/24 Vlan-int3 196.38.165.1/24
Switch C Vlan-int1 110.11.2.3/24
Vlan-int4 117.102.0.1/16
Configuration Examples 115
Configuration procedure
Switch A Switch D
DR
BDR
Switch B Switch C
116 CHAPTER 5: ROUTING OVERVIEW
Configuration procedure
# Configure Switch A.
<SwitchA> system-view
[SwitchA] interface Vlan-interface 1
[SwitchA-Vlan-interface1] ip address 196.1.1.1 255.255.255.0
[SwitchA-Vlan-interface1] ospf dr-priority 100
[SwitchA-Vlan-interface1] quit
[SwitchA] router id 1.1.1.1
[SwitchA] ospf
[SwitchA-ospf-1] area 0
[SwitchA-ospf-1-area-0.0.0.0] network 196.1.1.0 0.0.0.255
# Configure Switch B.
<SwitchB> system-view
[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] router id 2.2.2.2
[SwitchB] ospf
[SwitchB-ospf-1] area 0
[SwitchB-ospf-1-area-0.0.0.0] network 196.1.1.0 0.0.0.255
# Configure Switch C.
<SwitchC> system-view
[SwitchC] interface Vlan-interface 1
[SwitchC-Vlan-interface1] ip address 196.1.1.3 255.255.255.0
[SwitchC-Vlan-interface1] ospf dr-priority 2
[SwitchC-Vlan-interface1] quit
[SwitchC] router id 3.3.3.3
[SwitchC] ospf
[SwitchC-ospf-1] area 0
[SwitchC-ospf-1-area-0.0.0.0] network 196.1.1.0 0.0.0.255
# Configure Switch D.
<SwitchD> system-view
[SwitchD] interface Vlan-interface 1
[SwitchD-Vlan-interface1] ip address 196.1.1.4 255.255.255.0
[SwitchD-Vlan-interface1] quit
[SwitchD] router id 4.4.4.4
[SwitchD] ospf
[SwitchD-ospf-1] area 0
[SwitchD-ospf-1-area-0.0.0.0] network 196.1.1.0 0.0.0.255
Use the display ospf peer command to display OSPF neighbors on Switch A.
Note that Switch A has three neighbors.
Configuration Examples 117
The state of each neighbor is full. This means that Switch A has formed
adjacencies with all neighbors. (Switch A and Switch C can act as the DR and BDR
only when they establish adjacencies with all the switches in the network.) Switch
A acts as the DR, while Switch C acts as the BDR. Any other neighbor is DRother
(neither DR nor BDR).
<SwitchB> system-view
[SwitchB] interface Vlan-interface 1
[SwitchB-Vlan-interface1] ospf dr-priority 200
Use the display ospf peer command to display OSPF neighbors on Switch A.
Note that the priority of Switch B is 200 now, but it is not the DR.
The DR will be reelected only after the current DR fails to work. Shut down Switch
A and use the display ospf peer command to display neighbors on Switch D.
Note that Switch C that used to be the BDR becomes the DR and Switch B
becomes the BDR.
If you shut down and then restart all the switches, Switch B with priority 200 will
be elected as the DR and Switch A with priority 100 will be elected as the BDR,
because such operation triggers a new round of DR/BDR election.
Virtual link
Vlan-int1
Vlan-int1
Area 0 Area 2
118 CHAPTER 5: ROUTING OVERVIEW
Configuration procedure
1 Configure OSPF basic functions
# Configure Switch A.
<SwitchA> system-view
[SwitchA] interface vlan-interface 1
[SwitchA-Vlan-interface1] ip address 196.1.1.2 255.255.255.0
[SwitchA-Vlan-interface1] quit
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] ip address 197.1.1.2 255.255.255.0
[SwitchA-Vlan-interface2] quit
[SwitchA] router id 1.1.1.1
[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
[SwitchA-ospf-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
# Display the OSPF routing table on Switch A
[SwitchA] display ospf routing
Total Nets: 2
Intra Area: 2 Inter Area: 0 ASE: 0 NSSA: 0
Configuration Examples 119
n Since Area2 has no direct connection to Area0, the routing table of RouterA has
no route to Area2.
2 Configure a virtual link
# Configure Switch A.
[SwitchA] ospf
[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
# Display the OSPF routing table on Switch A.
[SwitchA]display ospf routing
Total Nets: 3
Intra Area: 2 Inter Area: 1 ASE: 0 NSSA: 0
AS 1001 AS 1002
VLAN -int 50
AS 200 Switch B
Switch A
AS 1003
Switch E
VLAN -int 30
VLAN-int 20
Switch C Switch D
AS 100
3 Configuration plan
■ Split AS 100 into three sub-ASs: AS 1001, AS 1002, and AS 1003.
■ Run EBGP between AS 1001, AS1002, and AS 1003.
■ AS 1001, AS1002, and AS 1003 are fully meshed within themselves by running
IBGP.
■ Run EBGP between AS 100 and AS 200.
Configuration procedure
# Configure Switch A.
<SwitchA> system-view
[SwitchA] bgp 1001
[SwitchA-bgp] network 10.1.1.0 255.255.255.0
[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
[SwitchA-bgp] quit
# Configure Switch B.
<SwitchB> system-view
[SwitchB] bgp 1002
Configuration Examples 121
# 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
# Configure Switch D.
<SwitchD> system-view
[SwitchD] bgp 1003
[SwitchD-bgp] confederation id 100
[SwitchD-bgp] group ibgp1003 internal
[SwitchD-bgp] peer 172.68.1.1 group ibgp1003
# Configure Switch E.
<SwitchE> system-view
[SwitchE] bgp 200
[SwitchE-bgp] network 8.1.1.0 255.255.255.0
[SwitchE-bgp] group ebgp100 external
[SwitchE-bgp] peer 156.10.1.1 group ebgp100 as-number 100
[SwitchE-bgp] quit
Routes total: 2
Routes total: 2
The above display shows that sub-AS routing information is advertised only within
the confederation. A device in an AS outside of the confederation, such as Switch
E, cannot learn the sub-AS routing information within the confederation because
it treats the confederation as a single AS.
Router
Reflector
VLAN-int100
Switch C
Switch A
VLAN -int4
VLAN -int3
VLAN-int2
AS 100
Switch B AS 200 Switch D
3 Configuration plan
■ Run EBGP between the peers in AS 100 and AS 200. Advertise network
1.0.0.0/8.
Configuration Examples 123
■ 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] 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
2 Configure Switch B.
# Configure the 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
# Configure BGP peers.
[SwitchB] bgp 200
[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 193.1.1.1 group in
3 Configure Switch C.
# Configure the 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
# Configure BGP peers and configure Switch C as the route reflector.
[SwitchC] bgp 200
[SwitchC-bgp] group rr internal
[SwitchC-bgp] peer rr reflect-client
[SwitchC-bgp] peer 193.1.1.2 group rr
[SwitchC-bgp] peer 194.1.1.2 group rr
4 Configure Switch D.
# Configure the VLAN interface IP address.
<SwitchD> system-view
[SwitchD] interface Vlan-interface 4
124 CHAPTER 5: ROUTING OVERVIEW
Use the display bgp routing command to display the BGP routing table on
Switch B. Note that Switch B has learned network 1.0.0.0.
Use the display bgp routing command to display the BGP routing table on
Switch D. Note that Switch D has learned network 1.0.0.0.
AS 200
AS 100
VLAN- int4
Vlan -int101 Switch B
VLAN -int2
VLAN-int2
VLAN-int5
VLAN -int3 Switch D
VLAN -int3
Switch A
Switch C
Configuration Examples 125
3 Configuration plan
■ Run EBGP between AS 100 and AS 200. Advertise network 1.0.0.0/8.
■ Run OSPF in AS 200 to realize network interconnection.
■ Run IBGP between Switch D and Switch B as well as between Switch D and
Switch C.
■ Apply a routing policy on Switch A to modify the MED attribute of the route to
be advertised to AS 200, making the data forwarding path from Switch D to AS
100 as Switch D - Switch C - Switch A.
■ Apply a routing policy on Switch C to modify the LOCAL_PREF attribute of the
route to be advertised to Switch D, making the data forwarding path from AS
200 to AS 100 as Switch D - Switch C - Switch A.
Configuration procedure
1 Configure Switch A.
# Configure the VLAN interface IP addresses.
<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 3
[SwitchA-Vlan-interface3] ip address 193.1.1.1 255.255.255.0
[SwitchA-Vlan-interface3] quit
[SwitchA] interface Vlan-interface 101
[SwitchA-Vlan-interface101] ip address 1.1.1.1 255.0.0.0
[SwitchA-Vlan-interface101] quit
# Enable BGP.
[SwitchA] bgp 100
# Advertise network 1.0.0.0/8.
[SwitchA-bgp] network 1.0.0.0
# Configure BGP peers.
[SwitchA-bgp] group ex192 external
[SwitchA-bgp] peer 192.1.1.2 group ex192 as-number 200
[SwitchA-bgp] group ex193 external
[SwitchA-bgp] peer 193.1.1.2 group ex193 as-number 200
[SwitchA-bgp] quit
# Define ACL 2000 to permit the routes destined for 1.0.0.0/8.
126 CHAPTER 5: ROUTING OVERVIEW
<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
# Enable 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 the VLAN interface IP addresses.
<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
# Enable 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
■ To validate the configuration, you need to use the reset bgp all command on all
the BGP peers.
■ Since the MED attribute of route 1.0.0.0 learned by Switch C is smaller than
that learned by Switch B, Switch D selects the route 1.0.0.0 from Switch C.
128 CHAPTER 5: ROUTING OVERVIEW
■ If you do not configure MED attribute control on Switch A, setting the local
preference attribute for route 1.0.0.0 on Switch C is another choice.
# Define ACL 2000 to permit the routes destined for 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 (Switch A).
[SwitchC] bgp 200
[SwitchC-bgp] peer 193.1.1.1 route-policy localpref import
Since the local preference (200) of the route learned by Switch C is bigger than
that learned by Switch B (100), Switch D prefers the route 1.0.0.0 from Switch C.
Note that the local preference is not set for route 1.0.0.0 on Switch B, so the route
uses the default value 100.
Comprehensive
Configuration
Example
Network
Requirements
■ Fast convergence is required for AS 200 and AS 400 because their networks
are quite large and complicated.
■ The network of AS 300 is small and simple. The devices in the network
supports only RIP. Their performances are low and the capacities of routing
tables are quite limited.
■ Access users in AS 200 require a very reliable network.
■ Access users in AS 200, AS 300, and AS 400 are accessible to each other.
■ S200_10 in AS 200 is connected with Layer 2 devices.
■ S300_B in AS 300 is connected with Layer 2 devices.
■ The data forwarding path needs to be controlled when users in AS 400 access
AS 200 and AS 300.
■ An AS 300 access user is interconnected with the ISP through a single link.
Network diagram
Figure 58 shows the network diagram designed according to the requirements.
AS 400
S400 _0
S400
OSPF
EBGP EBGP
AS 100
IBGP
S100 _1 S100 _2
EBGP EBGP
AS 200 EBGP
AS 300
S 200 S300
S200 _0 S 300_A
OSPF RIP
Configuration plan
■ Run BGP in AS 100 to interconnect with AS 200, AS 300, and AS 400. Use the
MED attribute to control the forwarding path.
■ Run OSPF in AS 200. The device in AS 200 connecting to AS 100 runs both
OSPF and BGP. Use static routes as backup routes to implement link
redundancy and improve network reliability. Apply a routing policy when
redistributing BGP routes for filtering.
130 CHAPTER 5: ROUTING OVERVIEW
■ Run OSPF in AS 400. The device in AS 400 connecting to AS 100 runs both
OSPF and BGP. Apply a routing policy when redistributing BGP routes for
filtering.
■ Run RIPv2 in AS 300. The device in AS 300 connecting to AS 100 runs both
RIPv2 and BGP. Apply a routing policy when redistributing BGP routes for
filtering.
■ AS 300 users use the combination of static routes, RIP, and routing policy to
access the ISP.
■ Interaction between IGP and BGP is involved in the configuration. Since the
default BGP preference is 256, when backup routes exist in the routing table,
you need to modify the BGP preference in order to select the primary route as
required.
n ■ Either Switch 7750 Ethernet switches or Switch 5500Gs Ethernet switches can
serve as S100_1/S100_2/S400/S200/S300.
■ You can use other partially layer 3 capable switches as S300_B.
Configuration
Procedure
Configuration Guide
Table 86 Configuration guide
Basic Configuration Creating VLANs and configuring IP addresses for VLAN interfaces are omitted
here, refer to “Displaying the Whole Configuration on Devices” on page 145 for
related information.
VLAN -int 14
S300 _A
AN -int 665
VLAN-int 662
S300 _B
■ Configure S300.
# Run RIP on the interface with the IP address 206.1.4.0.
<S300> system-view
[S300] rip
[S300-rip] network 206.1.4.0
# Disable RIPv2 route summarization.
[S300-rip] undo summary
[S300-rip] quit
# Run RIPv2 on VLAN-interface 14.
[S300] interface vlan-interface 14
[S300-Vlan-interface14] rip version 2
[S300-Vlan-interface14] quit
■ Configure S300_A.
# Run RIP on the interfaces on networks 206.1.4.0 and 166.1.0.0.
<S300_A> system-view
[S300_A] rip
[S300_A-rip] network 206.1.4.0
[S300_A-rip] network 166.1.0.0
# Disable RIPv2 route summarization.
[S300_A-rip] undo summary
[S300_A-rip] quit
# Run RIPv2 on VLAN-interface 14 and VLAN-interface 662.
[S300_A] interface vlan-interface 14
[S300_A-Vlan-interface14] rip version 2
[S300_A-Vlan-interface14] quit
[S300_A] interface vlan-interface 662
[S300_A-Vlan-interface662] rip version 2
[S300_A-Vlan-interface662] quit
■ Configure S300_B.
# Run RIP on the interfaces connected to networks 162.1.0.0 and 166.1.0.0.
<S300_B> system-view
[S300_B] rip
[S300_B-rip] network 162.1.0.0
[S300_B-rip] network 166.1.0.0
# Disable RIPv2 route summarization.
[S300_B-rip] undo summary
[S300_B-rip] quit
Configuration Procedure 133
AS 200
S200
VL
VLAN- int 12
S 200_0
VLA
S200_ 10
■ Configure S200.
# Run OSPF on the interface connected to network 206.1.2.0/24 and specify its
area ID as 0.
<S200> system-view
[S200] ospf
[S200-ospf-1] area 0
[S200-ospf-1-area-0.0.0.0] network 206.1.2.0 0.0.0.255
■ Configure S200_0.
# Run OSPF on the interface connected to network 206.1.2.0/24 and specify its
area ID as 0.
<S200_0> system-view
[S200_0] ospf
[S200_0-ospf-1] area 0
134 CHAPTER 5: ROUTING OVERVIEW
S400 _0
VLAN-int 16
S400
OSPF
■ Configure S400.
# Run OSPF on the interface connected to network 206.1.6.0/24 and specify its
area ID as 0.
<S400> system-view
[S400] ospf
[S400-ospf-1] area 0
[S400-ospf-1-area-0.0.0.0] network 206.1.6.0 0.0.0.255
■ Configure S400_0.
# Run OSPF on the interface connected to network 206.1.6.0/24 and specify its
area ID as 0.
<S400_0> system-view
[S400_0] ospf
[S400_0-ospf-1] area 0
[S400_0-ospf-1-area-0.0.0.0] network 206.1.6.0 0.0.0.255
[S400_0-ospf-1-area-0.0.0.0] quit
# Run OSPF on interfaces connected to networks 166.1.3.0/24 and 166.1.4.0/24
and specify their area ID as 0.0.1.44.
Configuration Procedure 135
S400
OSPF
VLAN-int 15 EBGP EBGP VLAN-int 23
AS 100
IBGP
S100 _1 S100_ 2
VLAN -int 31
AS 200 AS 300
EBGP
S200 S300
VLAN-int 13
■ Configure S100_1.
# Configure the router ID of S100_1 as 1.1.1.1.
<S100_1> system-view
[S100_1] router id 1.1.1.1
# Enable BGP and specify the local AS number as 100.
[S100_1] bgp 100
# Create IBGP peer group 100 and EBGP peer groups 200 and 400.
[S100_1-bgp] group 100 internal
[S100_1-bgp] group 200 external
[S100_1-bgp] group 400 external
# Add peer 196.3.1.2 in AS 100 into peer group 100; Add peer 196.1.1.3 in AS
200 into peer group 200; Add peer 196.1.3.3 in AS 400 into peer group 400.
[S100_1-bgp] peer 196.3.1.2 group 100
[S100_1-bgp] peer 196.1.1.3 group 200 as-number 200
[S100_1-bgp] peer 196.1.3.3 group 400 as-number 400
136 CHAPTER 5: ROUTING OVERVIEW
Network diagram
Figure 63 Network diagram for RIP, static route, and routing policy configuration
AS 300
EBGP
S300
LAN-int 13
VLAN -int 14
S300 _A
AN -int 665
VLAN-int 662
S300 _B
Configuration procedure
# Create ACL 2000 and deny all packets.
<S300_B> system-view
[S300_B] acl number 2000
[S300_B-acl-basic-2000] rule deny source any
[S300_B-acl-basic-2000] quit
[S300_B] rip
[S300_B-rip] filter-policy 2000 import
Network diagram
VLAN-int 16
S400
OSPF
VLAN-int 15 EBGP EBGP VLAN-int 23
AS 100
IBGP
S100 _1 S100_ 2
VLAN -int 31
AS 200 AS 300
EBGP
S200 S300
VLAN-int 13
Configuration procedure
■ Configure interaction between IGP and BGP on S200.
# Redistribute OSPF routes into BGP.
<S200> system-view
[S200] bgp 200
[S200-bgp] import-route ospf 1
[S200-bgp] quit
# Define a prefix list named ospf_import and permit the routes with IP prefixes
162.1.3.0/24, 162.1.4.0/24, 166.1.3.0/24, or 166.1.4.0/24.
[S200] ip ip-prefix ospf_import index 10 permit 162.1.3.0 24
[S200] ip ip-prefix ospf_import index 20 permit 162.1.4.0 24
[S200] ip ip-prefix ospf_import index 30 permit 166.1.4.0 24
[S200] ip ip-prefix ospf_import index 40 permit 166.1.3.0 24
# Create a routing policy named ospf_import with the match mode as permit.
Define an if-match clause to permit routes whose destination addresses match IP
prefix list ospf_import.
[S200] route-policy ospf_import permit node 10
[S200-route-policy] if-match ip-prefix ospf_import
[S200-route-policy] quit
# Redistribute BGP routes into OSPF and apply routing policy ospf_import.
[S200] ospf
[S200-ospf-1] import-route bgp route-policy ospf_import
■ Configure interaction between IGP and BGP on S300.
# Redistribute RIP routes into BGP.
<S300> system-view
[S300] bgp 300
[S300-bgp] import-route rip
[S300-bgp] quit
# Define a prefix list named rip_import and permit the routes with IP prefixes
162.1.1.0/24, 162.1.2.0/24, 166.1.3.0/24, and 166.1.4.0/24.
[S300] ip ip-prefix rip_import index 10 permit 162.1.1.0 24
[S300] ip ip-prefix rip_import index 20 permit 162.1.2.0 24
[S300] ip ip-prefix rip_import index 30 permit 166.1.3.0 24
[S300] ip ip-prefix rip_import index 40 permit 166.1.4.0 24
140 CHAPTER 5: ROUTING OVERVIEW
# Create a routing policy named rip_import with the matching mode as permit.
Define an if-match clause to permit routes whose destination addresses match IP
prefix list rip_import.
[S300] route-policy rip_import permit node 10
[S300-route-policy] if-match ip-prefix rip_import
[S300-route-policy] quit
# Redistribute BGP routes into RIP and apply routing policy rip_import.
[S300] rip
[S300-rip] import-route bgp route-policy rip_import
■ Configure interaction between IGP and BGP on S400.
# Redistribute OSPF routes into BGP.
<S400> system-view
[S400] bgp 400
[S400-bgp] import-route ospf 1
[S400-bgp] quit
# Define a prefix list named ospf_import and permit the routes with IP prefixes
162.1.1.0/24, 162.1.2.0/24, 162.1.3.0/24, and 162.1.4.0/24.
[S400] ip ip-prefix ospf_import index 10 permit 162.1.1.0 24
[S400] ip ip-prefix ospf_import index 20 permit 162.1.2.0 24
[S400] ip ip-prefix ospf_import index 30 permit 162.1.3.0 24
[S400] ip ip-prefix ospf_import index 40 permit 162.1.4.0 24
# Create a routing policy named ospf_import with the match mode as permit.
Define an if-match clause to permit the routes whose destination addresses match
IP prefix list ospf_import.
[S400] route-policy ospf_import permit node 10
[S400-route-policy] if-match ip-prefix ospf_import
[S400-route-policy] quit
# Redistribute BGP routes into OSPF and apply the routing policy named
ospf_import.
[S400] ospf
[S400-ospf-1] import-route bgp route-policy ospf_import
Network diagram
AS 200 AS 300
EBGP
S200 S300
VLAN-int 13
S 200_0 S300 _A
S200_ 10 S300 _B
VLAN-int 621 VLAN -int 622 VLAN-int 623 VLAN -int 624
OSPF RIP
Configuration procedure
# Configure a default route on S200_10 and specify the next-hop IP address as
166.1.5.2. Set the default preference to 200.
<S200_10> system-view
[S200_10] ip route-static 0.0.0.0 0.0.0.0 166.1.5.2 preference 200
<S300_A> system-view
[S300_A] ip route-static 162.1.1.0 255.255.255.0 166.1.5.1 preference 200
[S300_A] ip route-static 162.1.2.0 255.255.255.0 166.1.5.1 preference 200
[S300_A] rip
[S300_A-rip] import-route static
Network diagram
S400 _0
VLAN-int 16
S400
OSPF
VLAN-int 15 EBGP EBGP VLAN-int 23
AS 100
IBGP
S100 _1 S100_ 2
VLAN -int 31
AS 200 AS 300
EBGP
S200 S300
VLAN-int 13
S 200_0 S300 _A
S200_ 10 S300 _B
VLAN-int 621 VLAN -int 622 VLAN-int 623 VLAN -int 624
OSPF RIP
Configuration procedure
■ Configure S100_1.
# Define a prefix list named as200_1 and permit the route with IP prefix
162.1.1.0/24.
<S100_1> system-view
[S100_1] ip ip-prefix as200_1 index 10 permit 162.1.1.0 24
# Define a prefix list named as200_2 and permit the route with IP prefix
162.1.2.0/24.
[S100_1] ip ip-prefix as200_2 index 10 permit 162.1.2.0 24
# Define a prefix list named as300_1 and permit the route with IP prefix
162.1.3.0/24.
[S100_1] ip ip-prefix as300_1 index 10 permit 162.1.3.0 24
Configuration Procedure 143
# Define a prefix list named as300_2 and permit the route with IP prefix
162.1.4.0/24.
[S100_1] ip ip-prefix as300_2 index 10 permit 162.1.4.0 24
# Define a prefix list named other and permit all the routes.
[S100_1] ip ip-prefix other index 10 permit 0.0.0.0 0 less-equal 32
# Create a routing policy named as200, and specify node 10 with the permit
matching mode in the routing policy. Set the MED value of the route matching
prefix list as200_1 to 100.
[S100_1] route-policy as200 permit node 10
[S100_1-route-policy] if-match ip-prefix as200_1
[S100_1-route-policy] apply cost 100
[S100_1-route-policy] quit
# Create node 20 with the matching mode as permit in routing policy as200. Set
the MED value of the route matching prefix list as200_2 to 100
[S100_1] route-policy as200 permit node 20
[S100_1-route-policy] if-match ip-prefix as200_2
[S100_1-route-policy] apply cost 100
[S100_1-route-policy] quit
# Create node 30 with the permit matching mode in routing policy as200. Set the
MED value of the route matching prefix list as300_1 to 200.
[S100_1] route-policy as200 permit node 30
[S100_1-route-policy] if-match ip-prefix as300_1
[S100_1-route-policy] apply cost 200
[S100_1-route-policy] quit
# Create node 40 with the permit matching mode in routing policy as200. Set the
MED value of the route matching prefix list as300_2 to 200.
[S100_1] route-policy as200 permit node 40
[S100_1-route-policy] if-match ip-prefix as300_2
[S100_1-route-policy] apply cost 200
[S100_1-route-policy] quit
# Create node 50 with the permit matching mode in routing policy as200. Permit
all the routes.
[S100_1] route-policy as200 permit node 50
[S100_1-route-policy] if-match ip-prefix other
[S100_1-route-policy] quit
# Apply the routing policy as200 to the routes outgoing to peer group 400 (the
peer 196.1.3.3).
[S100_1] bgp 100
[S100_1-bgp] peer 400 route-policy as200 export
■ Configure S100_2.
# Define a prefix list named as200_1 and permit the route with IP prefix
162.1.1.0/24.
<S100_2> system-view
[S100_2] ip ip-prefix as200_1 index 10 permit 162.1.1.0 24
# Define a prefix list named as200_2 and permit the route with IP prefix
162.1.2.0/24.
[S100_2] ip ip-prefix as200_2 index 10 permit 162.1.2.0 24
144 CHAPTER 5: ROUTING OVERVIEW
# Define a prefix list named as300_1 and permit the route with IP prefix
162.1.3.0/24.
[S100_2] ip ip-prefix as300_1 index 10 permit 162.1.3.0 24
# Define a prefix list named as300_2 and permit the route with IP prefix
162.1.4.0/24.
[S100_2] ip ip-prefix as300_2 index 10 permit 162.1.4.0 24
# Define a prefix list named other and permit all the routes.
[S100_2] ip ip-prefix other index 10 permit 0.0.0.0 0 less-equal 32
# Create a routing policy named as300. Configure the node number as 10 and
the matching mode as permit. Set the MED value of the route matching prefix list
as200_1 to 200.
[S100_2] route-policy as300 permit node 10
[S100_2-route-policy] if-match ip-prefix as200_1
[S100_2-route-policy] apply cost 200
[S100_2-route-policy] quit
# Create node 20 with the permit matching mode in routing policy as300. Set the
MED value of the route matching prefix list as200_2 to 200.
[S100_2] route-policy as300 permit node 20
[S100_2-route-policy] if-match ip-prefix as200_2
[S100_2-route-policy] apply cost 200
[S100_2-route-policy] quit
# Create node 30 with the permit matching mode in routing policy as300. Set the
MED value of the route matching prefix list as300_1 to 100.
[S100_2] route-policy as300 permit node 30
[S100_2-route-policy] if-match ip-prefix as300_1
[S100_2-route-policy] apply cost 100
[S100_2-route-policy] quit
# Create node 40 with the permit matching mode in routing policy as300. Set the
MED value of the route matching prefix list as300_2 to 100.
[S100_2] route-policy as300 permit node 40
[S100_2-route-policy] if-match ip-prefix as300_2
[S100_2-route-policy] apply cost 100
[S100_2-route-policy] quit
# Create node 50 with the permit matching mode in routing policy as300 and
permit all routes.
[S100_2] route-policy as300 permit node 50
[S100_2-route-policy] if-match ip-prefix other
[S100_2-route-policy] quit
# Apply routing policy as300 to the routes outgoing to peer group 400 (peer
196.2.3.3).
[S100_2] bgp 100
[S100_2-bgp] peer 400 route-policy as300 export
Displaying the Whole Configuration on Devices 145
S100_2
<S100_2> display current-configuration
#
sysname S100_2
#
router id 1.2.1.1
#
......
#
vlan 22
#
vlan 23
#
vlan 31
#
interface Vlan-interface22
ip address 196.2.2.1 255.255.255.0
#
interface Vlan-interface23
ip address 196.2.3.2 255.255.255.0
#
interface Vlan-interface31
ip address 196.3.1.2 255.255.255.0
#
...
#
interface Cascade1/2/1
#
interface Cascade1/2/2
#
undo fabric-port Cascade1/2/1 enable
undo fabric-port Cascade1/2/2 enable
#
interface NULL0
#
bgp 100
network 196.2.2.0
network 196.2.3.0
network 196.3.1.0
undo synchronization
group 100 internal
Displaying the Whole Configuration on Devices 147
S200
<S200> display current-configuration
#
sysname S200
#
......
#
router id 2.1.1.1
#
...........
#
vlan 11
#
vlan 12
#
vlan 13
#
interface Vlan-interface11
ip address 196.1.1.3 255.255.255.0
#
interface Vlan-interface12
ip address 206.1.2.3 255.255.255.0
#
interface Vlan-interface13
ip address 206.1.3.3 255.255.255.0
#
148 CHAPTER 5: ROUTING OVERVIEW
.......
#
bgp 200
network 192.1.1.0
network 206.1.3.0
import-route ospf 1
undo synchronization
group 100 external
peer 196.1.1.1 group 100 as-number 100
group 300 external
peer 206.1.3.2 group 300 as-number 300
preference 200 200 200
#
ospf 1
import-route bgp route-policy ospf_import
area 0.0.0.0
network 206.1.2.0 0.0.0.255
#
route-policy ospf_import permit node 10
if-match ip-prefix ospf_import
#
ip ip-prefix ospf_import index 10 permit 162.1.3.0 24
ip ip-prefix ospf_import index 20 permit 162.1.4.0 24
ip ip-prefix ospf_import index 30 permit 166.1.4.0 24
ip ip-prefix ospf_import index 40 permit 166.1.3.0 24
#
......
S200_0
<S200_0> display current-configuration
#
sysname S200_0
#
.......
#
vlan 12
#
vlan 661
#
interface Vlan-interface12
ip address 206.1.2.1 255.255.255.0
#
interface Vlan-interface661
ip address 166.1.1.1 255.255.255.0
#
.......
#
ospf 1
area 0.0.0.10
network 166.1.1.0 0.0.0.255
#
area 0.0.0.0
network 206.1.2.0 0.0.0.255
#
..........
Displaying the Whole Configuration on Devices 149
S200_10
<S200_10> display current-configuration
#
sysname S200_10
#
.......
#
vlan 621 to 622
#
vlan 661
#
vlan 665
#
interface Vlan-interface621
ip address 162.1.1.1 255.255.255.0
#
interface Vlan-interface622
ip address 162.1.2.1 255.255.255.0
#
interface Vlan-interface661
ip address 166.1.1.2 255.255.255.0
#
interface Vlan-interface665
ip address 166.1.5.1 255.255.255.0
#
.........
#
ospf 1
area 0.0.0.10
network 162.1.1.0 0.0.0.255
network 162.1.2.0 0.0.0.255
network 166.1.1.0 0.0.0.255
#
ip route-static 0.0.0.0 0.0.0.0 166.1.5.2 preference 200
#
.........
S300
<S300> display current-configuration
#
sysname S300
#
router id 3.1.1.1
#
.....
#
vlan 13
#
vlan 14
#
vlan 22
#
interface Vlan-interface13
ip address 206.1.3.2 255.255.255.0
#
interface Vlan-interface14
ip address 206.1.4.2 255.255.255.0
150 CHAPTER 5: ROUTING OVERVIEW
S300_A
<S300_A> display current-configuration
#
sysname S300_A
#
......
#
vlan 14
#
vlan 662
#
vlan 665
#
interface Vlan-interface14
ip address 206.1.4.1 255.255.255.0
rip version 2 multicast
#
interface Vlan-interface662
ip address 166.1.2.1 255.255.255.0
rip version 2 multicast
#
interface Vlan-interface665
ip address 166.1.5.2 255.255.255.0
#
Displaying the Whole Configuration on Devices 151
......
#
rip
undo summary
network 206.1.4.0
network 166.1.0.0
import-route static
#
ip route-static 162.1.1.0 255.255.255.0 166.1.5.1 preference 200
ip route-static 162.1.2.0 255.255.255.0 166.1.5.1 preference 200
#
.........
S300_B
<S300_B> display current-configuration
#
sysname S300_B
#
......
#
acl number 2000
rule 5 deny
#
......
#
vlan 623
#
vlan 624
#
vlan 662
#
interface Vlan-interface623
ip address 162.1.3.1 255.255.255.0
rip version 2 multicast
#
interface Vlan-interface624
ip address 162.1.4.1 255.255.255.0
rip version 2 multicast
#
interface Vlan-interface662
ip address 166.1.2.2 255.255.255.0
rip version 2 multicast
#
......
#
rip
undo summary
network 166.1.0.0
network 162.1.0.0
filter-policy 2000 import
#
ip route-static 0.0.0.0 0.0.0.0 166.1.2.1 preference 60
#
......
152 CHAPTER 5: ROUTING OVERVIEW
S400
<S400> display current-configuration
#
sysname S400
#
router id 4.1.1.1
#
......
#
vlan 15 to 16
#
vlan 23
#
interface Vlan-interface15
ip address 196.1.3.3 255.255.255.0
#
interface Vlan-interface16
ip address 206.1.6.3 255.255.255.0
#
interface Vlan-interface23
ip address 196.2.3.3 255.255.255.0
#
......
#
interface Cascade1/2/1
#
interface Cascade1/2/2
#
undo fabric-port Cascade1/2/1 enable
undo fabric-port Cascade1/2/2 enable
#
interface NULL0
#
bgp 400
network 196.1.3.0
network 196.2.3.0
import-route ospf 1
undo synchronization
group 100_1 external
peer 196.1.3.1 group 100_1 as-number 100
group 100_2 external
peer 196.2.3.2 group 100_2 as-number 100
preference 200 200 200
#
ospf 1
import-route bgp route-policy ospf_import
area 0.0.0.0
network 206.1.6.0 0.0.0.255
#
route-policy ospf_import permit node 10
if-match ip-prefix ospf_import
#
ip as-path-acl 1 permit ^100 200$
ip as-path-acl 2 permit ^100 300$
#
ip ip-prefix ospf_import index 10 permit 162.1.1.0 24
ip ip-prefix ospf_import index 20 permit 162.1.2.0 24
Verifying the Configuration 153
S400_0
<S400_0> display current-configuration
#
sysname S400_0
#
.........
#
vlan 16
#
vlan 663 to 664
#
.........
#
interface Vlan-interface16
ip address 206.1.6.1 255.255.255.0
#
interface Vlan-interface663
ip address 166.1.3.1 255.255.255.0
#
interface Vlan-interface664
ip address 166.1.4.1 255.255.255.0
#
.........
#
ospf 1
area 0.0.1.44
network 166.1.3.0 0.0.0.255
network 166.1.4.0 0.0.0.255
#
area 0.0.0.0
network 206.1.6.0 0.0.0.255
#
.........
Verifying the
Configuration
2 206.1.4.2 9 ms 4 ms 4 ms
3 196.2.2.1 9 ms 9 ms 18 ms
4 196.2.3.3 6 ms 3 ms 4 ms
5 206.1.6.1 14 ms 4 ms 3 ms
Verifying the Route Verify the primary route is installed into the routing table
Backup Configuration <S200_10> display ip routing-table
Routing Table: public net
Destination/Mask Protocol Pre Cost Nexthop Interface
0.0.0.0/0 STATIC 200 0 166.1.5.2 Vlan-interface665
Verifying the Configuration 155
Verify the backup route is installed into the routing table after the primary
one fails
<S200_10> display ip routing-table
Routing Table: public net
Destination/Mask Protocol Pre Cost Nexthop Interface
0.0.0.0/0 STATIC 200 0 166.1.5.2 Vlan-interface665
127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0
127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
162.1.1.0/24 DIRECT 0 0 162.1.1.1 Vlan-interface621
162.1.1.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
162.1.2.0/24 DIRECT 0 0 162.1.2.1 Vlan-interface622
162.1.2.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
166.1.5.0/24 DIRECT 0 0 166.1.5.1 Vlan-interface665
166.1.5.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
<S200_10> tracert -a 162.1.1.1 166.1.3.1
traceroute to 166.1.3.1(166.1.3.1) 30 hops max,40 bytes packet
1 166.1.5.2 11 ms 3 ms 4 ms
2 206.1.4.2 13 ms 3 ms 4 ms
3 196.2.2.1 13 ms 3 ms 6 ms
4 196.2.3.3 11 ms 3 ms 4 ms
5 206.1.6.1 12 ms 3 ms 4 ms
Verifying the MED Trace the packet forwarding path when the default MED is used
Attribute Configuration <S400_0> tracert -a 166.1.3.1 162.1.1.1
traceroute to 162.1.1.1(162.1.1.1) 30 hops max,40 bytes packet
1 206.1.6.3 11 ms 3 ms 7 ms
2 196.1.3.1 10 ms 3 ms 8 ms
3 196.1.1.3 8 ms 3 ms 3 ms
4 206.1.2.1 13 ms 4 ms 3 ms
5 166.1.1.2 13 ms 4 ms 3 ms
<S400_0> tracert -a 166.1.3.1 162.1.3.1
traceroute to 162.1.3.1(162.1.3.1) 30 hops max,40 bytes packet
1 206.1.6.3 11 ms 3 ms 3 ms
2 196.1.3.1 14 ms 4 ms 5 ms
3 196.3.1.2 10 ms 8 ms 17 ms
4 196.2.2.2 14 ms 3 ms 3 ms
5 206.1.4.1 13 ms 3 ms 3 ms
6 166.1.2.2 13 ms 3 ms 4 ms
156 CHAPTER 5: ROUTING OVERVIEW
# Create AS path ACL 2 and permit the routes whose AS_PATH starts with 100
and ends with 300.
Precautions In the configuration and verification process, pay attention to the following points:
■ Disable the Fabric function before enabling BGP on Fabric-capable devices.
Precautions 157
■ To achieve the configuration goal, you are recommended to set the BGP
preference to 200. For devices with static routes configured, set a preference
for the static routes as required.
■ On S300_A, the backup route (static route) cannot be switched to the primary
RIP route automatically, so you need to delete the backup route manually and
then add it again.
■ Since the routing policy is applied when BGP routes are redistributed into IGP,
some route entries may not be redistributed, so you are recommended to use
the tracert -a /ping -a command to verify the configuration in the source
address mode.
158 CHAPTER 5: ROUTING OVERVIEW
MULTICAST PROTOCOL
6 CONFIGURATION EXAMPLES
Keywords:
IGMP, PIM-DM, PIM-SM, MSDP, IGMP Snooping
Abstract:
This document introduces how to configure multicast functions on Ethernet
switches in practical networking, based on three typical networking scenarios:
1 Deployment of PIM-DM plus IGMP, with and without IGMP Snooping respectively.
Multicast group filtering in IGMP and IGMP Snooping is mainly described for this
scenario.
2 Deployment of PIM-SM plus IGMP, with and without IGMP Snooping respectively.
Simulated joining is mainly described for this scenario.
3 IGMP Snooping only. The function of dropping unknown multicast data is mainly
described for this scenario.
Acronyms:
Internet Group Management Protocol (IGMP), Internet Group Management
Protocol Snooping (IGMP Snooping), Protocol Independent Multicast Dense Mode
(PIM-DM), Protocol Independent Multicast Sparse Mode (PIM-SM), Multicast
Source Discovery Protocol (MSDP)
Multicast Protocol Different from unicast and broadcast, the multicast technique efficiently addresses
Overview the issue of point-to-multipoint data transmission. By allowing high-efficiency
point-to-multipoint data transmission, multicast greatly saves network bandwidth
and reduces network load.
With the multicast technique, service providers can easily provide new
value-added services, such as live Webcasting, Web TV, distance learning,
Telemedicine, Web radio, real-time videoconferencing, and other bandwidth- and
time-critical information services.
IGMP
As a TCP/IP protocol responsible for IP multicast group membership management,
the Internet Group Management Protocol (IGMP) is used by IP hosts to establish
and maintain their multicast group memberships to the immediately neighboring
multicast router.
PIM
Protocol Independent Multicast (PIM) provides IP multicast forwarding by
leveraging unicast routing tables generated by static routing or any unicast routing
protocol, such as the Routing Information Protocol (RIP), Open Shortest Path First
160 CHAPTER 6: MULTICAST PROTOCOL CONFIGURATION EXAMPLES
■ PIM-DM
■ PIM-SM
PIM-DM is a type of dense mode multicast protocol. It uses the “push mode” for
multicast forwarding, suitable for small-sized networks with densely distributed
multicast group members.
PIM-SM is a type of sparse mode multicast protocol. It uses the “pull mode” for
multicast forwarding, suitable for large- and medium-sized networks with sparsely
and widely distributed multicast group members.
IGMP Snooping
Internet Group Management Protocol Snooping (IGMP Snooping) is a multicast
monitoring mechanism that runs on Layer 2 devices to manage and control
multicast groups. By analyzing received IGMP messages, a Layer 2 device running
IGMP Snooping establishes mappings between ports and MAC multicast groups
and forwards multicast data based on these mappings.
MSDP
The Multicast Source Discovery Protocol (MSDP) is an inter-domain multicast
solution for the interconnection of PIM-SM domains. It is used to discover the
multicast source information in other PIM-SM domains.
Within a PIM-SM domain, the multicast source registers only with the local
rendezvous point (RP). Therefore, the RP knows all the sources within its own
domain only. If there is a mechanism that allows RPs of different PIM-SM domains
to share their multicast source information, the information of active sources in
other domains can be delivered to the local receivers, so that multicast data can be
transmitted among different domains. MSDP achieves this objective. By setting up
MSDP peering relationships among RPs of different domains, MSDP propagates
source active (SA) messages, which carry multicast source information, between
these MSDP peers, thus to allow multicast traffic to flow between different
PIM-SM domains.
IGMP Proxy
When a multicast routing protocol (such as PIM-DM) is deployed on a large
network, many stub networks may exist. It is tedious work to configure and
manage these stub networks.
Support of Multicast Multicast features supported by the 3Com series Ethernet switches vary with
Features device models. For details, see the corresponding configuration guide. Table 87
lists the multicast features supported by 3Com series Ethernet switches.
Table 87 Multicast features supported by the 3Com stackable switches
Follow these steps to configure fast leave processing in Ethernet port view:
Follow these steps to configure a multicast group filter in Ethernet port view:
Configuration Guidance 163
Enabling IGMP
Follow these steps to enable IGMP:
c CAUTION: The device cannot switch from one IGMP version to another
automatically. All switches on the same subnet must run the same version of IGMP.
If the number of existing multicast groups is larger than the limit configured on
the interface, the system will remove the oldest entries automatically until the
number of multicast groups on the interface conforms to the configured limit.
Follow these steps to configure a multicast group filter in VLAN interface view:
Follow these steps to configure a multicast group filter in Ethernet port view:
166 CHAPTER 6: MULTICAST PROTOCOL CONFIGURATION EXAMPLES
c CAUTION: Before configuring simulated joining, you must enable IGMP in VLAN
interface view.
If you configure a port as a simulated host in Ethernet port view, the Ethernet port
must belong to the specified VLAN; otherwise the configuration does not take
effect.
c CAUTION:
■ You must enable PIM on the interface before configuring the igmp proxy
command. Otherwise, the IGMP proxy feature does not take effect.
■ One interface cannot serve as the proxy interface for two or more interfaces.
■ When you configure the IP address of the interface that will serve as an IGMP
proxy, make sure that the IP address is not the lowest on this subnet to prevent
this interface from being elected as the IGMP querier on the subnet, as this will
result in failure of multicast data forwarding.
Configuring PIM-SM
Follow these steps to configure PIM-SM:
n ■ Before grouping multiple routers into an MSDP mesh group, make sure that
these routers are interconnected with one another.
■ To add different MSDP peers into an MSDP mesh group, configure the same
mesh group name on them.
■ An MSDP peer can belong to only one mesh group. A newly configured mesh
group name supersedes the existing one.
3 Configure MSDP peer connection control
Follow these steps to configure a rule for filtering the multicast sources of SA
messages:
Requirement Analysis When users receive voice on demand (VOD) information through multicast, the
information receiving mode may vary based on user requirements:
1 To avoid video broadcast at Layer 2, IGMP Snooping is 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 uplink backup for the directly attached stub network N1, which comprises
multicast receivers Host C and Host D.
3 All the Layer 3 switches run RIP for unicast routing and run PIM-DM for multicast
routing.
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 E through VLAN-interface 100, and to Switch D
through VLAN-interface 103.
3 Switch B and Switch C connect to stub network N1 through their respective
VLAN-interface 200, and to Switch D through VLAN-interface 101 and
VLAN-interface 102 respectively.
4 Enable IGMPv2 on VLAN-interface 100 of Switch A. Enable IGMP Snooping on
Switch E and in VLAN 100. Run IGMPv2 on Switch B, Switch C, and the hosts in
stub network N1. Typically, Switch B acts as the IGMP querier.
174 CHAPTER 6: MULTICAST PROTOCOL CONFIGURATION EXAMPLES
Network Diagram Figure 67 Network diagram for PIM-DM plus IGMP plus IGMP Snooping configuration
Receiver
Switch A
Host A
Vlan100
Vlan-int100
03
Switch E
t1
- in
an
03
Vl
t1
-in
an
Host B
N1
Vl
Ethernet Vlan-int300 Vlan
IGMP querier
-int1
Source
01 Receiver
Vlan Vlan-int200
-int1
Switch D 01
Vl
an
Ethernet
-
in
t1
Vl
02
Switch B
an
-
Host C
in
t1
10.110.5.100/24
02
Vlan-int200
PIM-DM
Switch C
Host D
Configuration Procedure Configuring VLANs, VLAN interfaces and IP addresses on each switch
# Configure VLANs, VLAN interfaces, and their IP addresses on Switch A.
<SwitchA> system-view
System View: return to User View with Ctrl+Z.
[SwitchA] vlan 100
[SwitchA-vlan100] port Ethernet 1/0/1
[SwitchA-vlan100] quit
[SwitchA] vlan 103
[SwitchA-vlan103] port Ethernet 1/0/2
[SwitchA-vlan103] quit
[SwitchA] interface Vlan-interface 100
[SwitchA-Vlan-interface100] ip address 10.110.1.1 24
PIM-DM plus IGMP plus IGMP Snooping Configuration Example 175
[SwitchA-Vlan-interface100] quit
[SwitchA] interface Vlan-interface 103
[SwitchA-Vlan-interface103] ip address 192.168.1.1 24
[SwitchA-Vlan-interface103] quit
Configure VLANs, VLAN interfaces, and their IP addresses on other switches as per
Figure 67. The detailed configuration steps are omitted here.
<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
# Enable IGMP Snooping on Switch E, and enable IGMP Snooping in VLAN 100.
176 CHAPTER 6: MULTICAST PROTOCOL CONFIGURATION EXAMPLES
<SwitchE> system-view
[SwitchE] igmp-snooping enable
Enable IGMP-Snooping ok.
[SwitchE] vlan 100
[SwitchE-vlan100] igmp-snooping enable
[SwitchE-vlan100] quit
# View the multicast group information that contains port information on Switch
A.
Vlan(id):101.
Total 0 IP Group(s).
Total 0 MAC Group(s).
Router port(s):Ethernet1/0/2
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:224.1.1.1
Host port(s):Ethernet1/0/15
MAC group(s):
MAC group address:0100-5e01-0101
Host port(s):Ethernet1/0/15
# View the information about the multicast group entries created by IGMP
Snooping on Switch E.
Vlan(id):100.
Total 1 IP Group(s).
Total 1 MAC Group(s).
Router port(s):Ethernet1/0/2
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/19
MAC group(s):
MAC group address:0100-5e01-0101
Host port(s):Ethernet1/0/19
# Configure to filter the packets for the multicast group 224.1.1.1 on Switch E.
<SwitchE> system-view
[SwitchE-acl-basic-2000] rule deny source 224.1.1.1 0
[SwitchE-acl-basic-2000] rule permit source any
[SwitchE-acl-basic-2000] quit
[SwitchE]igmp-snooping group-policy 2000 vlan 100
As shown above, Switch A has stopped forwarding multicast data for the
multicast group 224.1.1.1.
Vlan(id):200.
Total 0 IP Group(s).
Total 0 MAC Group(s).
Router port(s):Ethernet1/0/19
With multicast group filtering enabled, the corresponding ports drop IGMP reports
for the filtered group and will be removed for that group when their respective
port aging timer expires.
<SwitchE> system-view
[SwitchE] undo igmp-snooping group-policy
<SwitchA> system-view
[SwitchA] acl number 2000
[SwitchA-acl-basic-2000] rule deny source 224.1.1.1 0
[SwitchA-acl-basic-2000] rule permit source any
[SwitchA-acl-basic-2000] quit
[SwitchA] interface Vlan-interface 100
[SwitchA-Vlan-interface100] igmp group-policy 2000
[SwitchA-Vlan-interface100] return
After multicast group filtering is enabled, the corresponding port cannot receive
IGMP reports. Thus, the corresponding multicast groups are deleted after the port
aging timer expires.
n As shown above, IGMP Snooping multicast group filtering has the same function
as IGMP multicast group filtering. You can use either approach based on the
specific situation.
Requirement Analysis When users receive VOD information through multicast, the information receiving
mode may vary based on user requirements:
1 To avoid broadcasting of the video information at Layer 2, IGMP Snooping is
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 uplink backup for the directly attached stub network N1, which comprises
multicast receivers Host C and Host D.
3 Configure the PIM-SM domain as a single-BSR domain. Run OSPF for unicast
routing in the domain.
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 It is required that VLAN-interface 105 of Switch D and VLAN-interface 102 of
Switch E act as C-BSR and C-RP.
5 IGMPv2 is required on VLAN-interface 100 of Switch A. IGMP Snooping is required
on Switch F and in VLAN 100. IGMPv2 is also required between Switch B, Switch
C, and stub network N1. Typically, Switch B acts as the querier.
180 CHAPTER 6: MULTICAST PROTOCOL CONFIGURATION EXAMPLES
Network Diagram Figure 68 Network diagram for PIM-SM plus IGMP plus IGMP Snooping configuration
Receiver
Switch A
Host A
Vlan-int100
Vlan100
1
Vlan-int102
Switch F
0
t1
-in
an
Vl
01
Host B
t1
N1
-in
an
Vlan-int102 Receiver
Ethernet
Vl
Vlan-int300 Vlan-int105 Vlan-int103 Vlan-int200
Source Vlan-int105 Vlan-int103
Switch D Switch E Vlan-int104 Switch B
Host C
Ethernet
10.110.5.100/24
Vlan-int104
Vlan-int200
PIM-SM
Host D
Switch C
Configuration Procedure Configuring VLANs, VLAN interfaces and IP addresses for each switch
# Configure VLANs, VLAN interfaces, and their IP addresses on Switch A.
<SwitchA> system-view
System View: return to User View with Ctrl+Z.
[SwitchA] vlan 100
[SwitchA-vlan100] port Ethernet 1/0/1
[SwitchA-vlan100] quit
PIM-SM plus IGMP plus IGMP Snooping Configuration Examples 181
Configure VLANs, VLAN interfaces, and their IP addresses on other switches as per
Figure 68. The detailed configuration steps are omitted here.
# Configure the group range to be served by the RP and configure a C-BSR and a
C-RP on 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 served by the RP and configure a C-BSR and a
C-RP on 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
<SwitchF> system-view
[SwitchF] igmp-snooping enable
Enable IGMP-Snooping ok.
[SwitchF] vlan 100
[SwitchF-vlan100] igmp-snooping enable
[SwitchF-vlan100] quit
Priority: 1
Mask Length: 24
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
(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
184 CHAPTER 6: MULTICAST PROTOCOL CONFIGURATION EXAMPLES
(*,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
# View the information about multicast group entries created by IGMP Snooping
on Switch F.
Vlan(id):100.
Total 1 IP Group(s).
Total 1 MAC Group(s).
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
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
IGMP Snooping-Only Configuration Examples 185
Vlan(id):103.
Total 0 IP Group(s).
Total 0 MAC Group(s).
Router port(s):Ethernet1/0/10
As shown above, multicast traffic can successfully flow to Host A and Host C.
Configure simulated joining on Switch B, thus to prevent the multicast switch from
considering that no multicast receiver exist on the subnet due to some reason and
removing the corresponding path from the multicast forwarding tree.
<SwitchB> system-view
[SwitchB] interface Vlan-interface 200
[SwitchB-Vlan-interface200] igmp host-join 225.1.1.1 port Ethernet 1/0/21
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/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.
IGMP Snooping-Only
Configuration
Examples
Network Requirements In case that it is unnecessary or infeasible to build a Layer-3 multicast network,
enabling IGMP Snooping on all the devices in a Layer 2 network can implement
some multicast functions.
186 CHAPTER 6: MULTICAST PROTOCOL CONFIGURATION EXAMPLES
Configuration Plan
1 As shown in Figure 69, in a Layer-2 network without Layer-3 devices, 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, with Switch A acting
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.
Querier
Eth1/0/1 Eth1/0/2
Switch A
Source
Receiver Receiver Receiver
# Create VLAN 100, add Ethernet 1/0/1 and Ethernet 1/0/2 into VLAN 100, and
then enable IGMP Snooping in this VLAN.
Configuring Switch B
# Enable IGMP Snooping globally.
<SwitchB> system-view
[SwitchB] igmp-snooping enable
Enable IGMP-Snooping ok.
# Create VLAN 100, add Ethernet 1/0/1 through Ethernet 1/0/3 into VLAN 100,
and then enable IGMP Snooping in this VLAN.
Configuring Switch C
# Enable IGMP Snooping globally.
<SwitchC system-view
[SwitchC] igmp-snooping enable
Enable IGMP-Snooping ok.
# Create VLAN 100, add Ethernet 1/0/1 through Ethernet 1/0/3 into VLAN 100,
and then enable IGMP Snooping in this VLAN.
c CAUTION: Switch C is not the IGMP Snooping querier, so it does not have
member ports for non-directly-connected hosts, and the corresponding
forwarding entries cannot be created on it. 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.
Switch B received IGMP general queries sent by the querier and IGMP reports from
receivers.
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 forwarding entry for the multicast group 224.1.1.1 has been
created on Switch A, with Ethernet 1/0/1 as the router port and Ethernet 1/0/2 as
the member port.
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
MSDP Configuration Examples 189
As shown above, a forwarding entry for the multicast group 224.1.1.1 has been
created on Switch A, with Ethernet 1/0/1 as the member port. Acting as the IGMP
Snooping querier, Switch A does not have a router port.
Vlan(id):100.
Total 0 IP Group(s).
Total 0 MAC Group(s).
Router port(s):Ethernet1/0/1
MSDP Configuration
Examples
Network Requirements To enable communication between receivers and multicast sources in different
PIM-SM domains, use MSDP to establish MSDP peering relationships between the
RPs of different PIM-SM domains, so that these RPs can forward SA messages
between PIM-SM domains to share multicast source information.
Configuration Plan ■ Two ISPs maintain their respective ASs, AS 100 and AS 200. OSPF runs within
each AS, and BGP is deployed for interoperability between the two ASs.
■ PIM-SM 1 belongs to AS 100. PIM-SM 2 and PIM-SM 3 belong to AS 200.
■ Both PIM-SM domains have 0 or 1 multicast source and at least one receiver.
OSPF runs within each domain for unicast routing.
■ The respective loopback interfaces, Loopback 0, of Switch C, Switch D and
Switch F are configured as C-BSRs and C-RPs of the respective PIM-SM
domains.
190 CHAPTER 6: MULTICAST PROTOCOL CONFIGURATION EXAMPLES
Receiver
Loop0
Vl
Switch G
an
-in
Switch F
t1
00
Vlan-int400
Vlan-int400
Vl
Switch A
an
-i n
Switch B Vlan-int102
t2
00
Vlan-int300 PIM-SM 3
Vlan-int300
Source 1
00
t1
Vlan-int200
-i n
00
an
t1
-in
Vl
an
Receiver
00
Vl
t1
Vl
-in
an
an
Vlan-int200 Vlan-int102
-
in
Vl
t1
Vlan-int101
00
Vlan-int101 Vlan-int300
Vlan-int300
Switch C Switch D
Source 2
00
Switch E
t2
-in
an
Loop0 Loop0
Vl
PIM-SM 2
PIM-SM 1
MSDP peers
Device Interface IP address Device Interface IP address
SwitchA Vlan-int100 10.110.1.2/24 Switch D Vlan-int300 10.110.4.1/24
Vlan-int200 10.110.6.1/24 Vlan-int102 192.168.3.1/24
Vlan-int300 10.110.5.1/24 Vlan-int101 192.168.1.2/24
SwitchB Vlan-int100 10.110.7.1/24 Loop0 2.2.2.2/32
Vlan-int200 10.110.2.2/24 Switch E Vlan-int100 10.110.8.1/24
Vlan-int300 10.110.5.2/24 Vlan-int200 10.110.9.1/24
Switch C Vlan-int100 10.110.1.1/24 Vlan-int300 10.110.4.2/24
Vlan-int200 10.110.2.1/24 Loop0 2.2.2.2/32
Vlan-int101 192.168.1.1/24 Switch F Vlan-int400 10.110.3.1/24
Loop0 1.1.1.1/32 Vlan-int102 192.168.3.2/24
Loop0 3.3.3.3/32
SwitchG Vlan-int100 10.110.10.1/24
Vlan-int400 10.110.3.2/24
Configuration Procedure Configuring an interface IP address and a unicast routing protocol for each
switch
Configure an IP address and a subnet mask for each interface as per Figure 70.
The detailed configuration steps are not discussed in this document.
<SwitchA> system-view
[SwitchA] multicast routing-enable
[SwitchA] interface vlan-interface 100
[SwitchA-Vlan-interface100] pim sm
[SwitchA-Vlan-interface100] quit
[SwitchA] interface vlan-interface 200
[SwitchA-Vlan-interface200] pim sm
[SwitchA-Vlan-interface200] igmp enable
[SwitchA-Vlan-interface200] quit
[SwitchA] interface vlan-interface 300
[SwitchA-Vlan-interface101] pim sm
<SwitchC> system-view
[SwitchC] multicast routing-enable
[SwitchC] interface vlan-interface 100
[SwitchC-Vlan-interface100] pim sm
[SwitchC-Vlan-interface100] quit
[SwitchC] interface vlan-interface 200
[SwitchC-Vlan-interface200] pim sm
[SwitchC-Vlan-interface200] quit
[SwitchC] interface vlan-interface 101
[SwitchC-Vlan-interface101] pim sm
# Configure IBGP and EBGP on Switch D, and configure OSPF route redistribution.
[SwitchC] ospf 1
[SwitchC-ospf-1] import-route bgp
[SwitchC-ospf-1] quit
Carry out the display bgp peer command to view the BGP peering relationships
between the switches. For example:
[SwitchD] msdp
[SwitchD-msdp] peer 192.168.1.1 connect-interface vlan-interface 101
[SwitchD-msdp] peer 192.168.3.2 connect-interface vlan-interface 102
[SwitchD-msdp] quit
[SwitchF] msdp
[SwitchF-msdp] peer 192.168.3.1 connect-interface vlan-interface 102
[SwitchF-msdp] quit
Abstract:
This document introduces how VLAN of the 3Com series Ethernet switches is
applied and configured in practical networking implementations and how
protocols are used in conjunction with VLANs.
Acronyms:
VLAN (Virtual local area network)
n ■ In the above table, the solid dots (●) indicate that the corresponding models
provide full support for the function; the hollow dots (❍) indicate that the
corresponding models provide incomplete support for the function, that is, the
corresponding models support only the VLAN-interface for the management
VLAN; the dashes (-) indicate that the corresponding models do not support
the function.
■ For detailed information about the support of your device for VLAN, refer to
the user manual for your device.
196 CHAPTER 7: VLAN CONFIGURATION EXAMPLES
Configuration Guide
n ■ The configuration procedure differs by device. In this guide, the Switch 5500 is
used as an example. For informaiton on how to configure VLAN on other
models, refer to the Configuration Guide for that model.
■ The configuration example in this guide provides only basic configuration
procedures. For detailed information about individual functions, refer to the
Configuraiton Guide and Command Reference Guide for that model.
Configuring Basic VLAN The 3Com series switches support IEEE 802.1Q VLAN. The technology allows you
Settings to organize Ethernet ports into virtual workgroups by assigning them to different
VLANs.
Follow these steps to create a VLAN and perform basic VLAN configuration:
You can assign a port to a VLAN in Ethernet port view or in VLAN view.
n Only access ports can be assigned to a VLAN in VLAN view. You can assign trunk
or hybrid ports to a VLAN only in Ethernet port view.
Configuring Basic You can enable your switch to perform Layer 3 forwarding by configuring VLAN
Settings of a VLAN interfaces with IP addresses on the switch.
Interface
Follow these steps to configure basic settings of a VLAN interface:
n ■
■
Before creating a VLAN interface for a VLAN, create the VLAN first.
On some 3Com series switches, only one VLAN interface is supported, and you
must configure its VLAN as the default VLAN with the management-vlan
command before creating the VLAN interface. For detailed configurations,
refer to the corresponding user manual.
Protocol VLAN Protocol VLAN enables your switch to assign an incoming untagged frame to a
Configuration VLAN based on its protocol. To configure a protocol VLAN, first create a protocol
template to enable protocol VLAN, and then assign Ethernet ports to the protocol
VLAN.
VLAN Configuration
Example
Network Requirements A company has three departments: the R&D department, the marketing
department, and the design department. The three departments are located in the
same building. The R&D department and the marketing department are located in
different office areas. The design department and part of the R&D department
share the same office area. The hosts of the design department use the Apple
operating system (OS), and the hosts of the other two departments use Windows.
Use VLANs to fulfill the following:
■ Employees of the same department can communicate with each other, while
employees of different departments cannot.
■ The R&D department and the marketing department are on different IP
network segments. A switch (Core-Switch A in Figure 71) assigns addresses to
hosts of the two departments automatically.
■ Both the R&D department and the marketing department can access the public
servers. However, the design server and the R&D server are accessible to only
the employees of the design department and the R&D department respectively.
■ The hosts and server of the R&D department and those of the design
department cannot access the Internet; the hosts and server of the marketing
department and those of the design department cannot access the VPN of the
R&D department.
200 CHAPTER 7: VLAN CONFIGURATION EXAMPLES
VPN Internet
Public Servers
R&D Dept. Core-SwitchA
Core-SwitchB
SwitchA SwitchB
R&D Dept.
Eth1 /0/5
Eth1/0 /7 SwitchA
GE 1/1/1
Eth1/0/10
Market Dept.
On Switch A, assign the port connecting to the independent office area of the
R&D department and the port connecting to the independent office area of the
marketing department to different VLANs, thus isolating the two areas.
As the shared office area is used by two departments, assigning the port
connecting to the area to a VLAN cannot isolate the two departments.
Considering that the design department and the R&D department use different
operating systems, you can assign Apple hosts whose network protocol is
Appletalk and Windows hosts whose network protocol is IP to different protocol
VLANs.
Configuration on Switch B
GE 1/1 /2
GE1/1/1 SwitchB
On Switch B, assign the port connecting to the marketing department and the
port connecting to the R&D department to different VLANs. Note that, the
configuration of the VLAN to which a department belongs must be the same on
both Switch A and Switch B. Configure the port connecting to Core-Switch A to
permit the frames of all existing VLANs to pass through with VLAN tags.
Configuration on Core-Switch A
VPN
GE 1/1/1
GE 1/1 /2
Configuration on Core-Switch B
Internet
Public Servers
Eth 1/0/15 Core-SwitchB
GE 1/1 /1 GE1/1/2
As the public servers are accessible to both the R&D department and the
marketing department, create an individual VLAN for the public servers to forward
Layer 3 traffic between the servers and the clients. As Core-Switch A forwards
Layer 3 traffic between the R&D department and the public servers, configure the
link between Core-Switch B and Core-Switch A to permit the frames of the VLAN
created for the public servers to pass through besides the frames of the three
departments.
As Core-Switch B is the egress device for accessing the Internet and only the
marketing department is allowed to access the Internet, configure a VLAN
interface with an IP address for the VLAN of the marketing department and
configure the port connecting to the Internet to permit only the frames of the
VLAN to pass through. The IP address of the VLAN interface will be used as the
gateway address for the marketing department on Core-Switch A.
Summary
Assign the hosts and server of the R&D department, those of the marketing
department, and those of the design department to VLAN 100, VLAN 200, and
VLAN 300 respectively. The public servers belong to VLAN 500 and lie on the
network segment 192.168.50.0. The following diagram shows the planned
VLANs:
VLAN Configuration Example 203
VPN Internet
VLAN 500
VLAN 100 Core-SwitchA
Core-SwitchB
SwitchA SwitchB
Configuration procedure
■ Configure Switch A
<SwitchA> system-view
[SwitchA] vlan 100
[SwitchA-vlan100] quit
[SwitchA] vlan 200
[SwitchA-vlan200] quit
[SwitchA] vlan 300
[SwitchA-vlan300]
[SwitchA-vlan300] quit
# Create a protocol template for VLAN 100 to carry IP and a protocol template for
VLAN 300 to carry Appletalk.
204 CHAPTER 7: VLAN CONFIGURATION EXAMPLES
# Create a user-defined protocol template for VLAN 100 to carry ARP for IP
communication, assuming that Ethernet_II encapsulation is used.
# Configure Ethernet 1/0/10 as a hybrid port permitting the frames of VLAN 100
and VLAN 300 to pass through untagged.
# Associate Ethernet 1/0/10 with all the protocol templates of VLAN 100 and
VLAN 300.
# Create VLAN 100, VLAN 200, and VLAN 300 on Switch B as you have done on
Switch A.
# Assign Ethernet 1/0/2 and Ethernet 1/0/3 to VLAN 200 and VLAN 100
respectively.
<SwitchB> system-view
[SwitchB] interface Ethernet 1/0/2
[SwitchB-Ethernet1/0/2] port access vlan 200
[SwitchB-Ethernet1/0/2] quit
[SwitchB] interface Ethernet 1/0/3
[SwitchB-Ethernet1/0/3] port access vlan 100
[SwitchB-Ethernet1/0/3] quit
# Create VLAN 100, VLAN 200, and VLAN 300 on Core-Switch A. The
configuration procedure is the same as that on Switch A.
n For detailed information about configuring DHCP, refer to the Switch 5500 Family
Configuration Guide.
■ Configuration on Core-Switch B
206 CHAPTER 7: VLAN CONFIGURATION EXAMPLES
# Create VLAN 100, VLAN 200, VLAN 300, and VLAN 500 on Core-Switch B. The
configuration procedure is the same as that on Switch A.
# Configure GigabitEthernet 1/1/2 to permit only the frames of VLAN 500 to pass
through.
Configuration remarks
After you finish the configuration, the hosts of the three departments should be
isolated at the data link layer.
As no VLAN interface is created for the VLAN of the marketing department on the
VPN gateway Core-Switch A, the hosts of the marketing department should not
be able to access the VPN or the R&D department through Layer 3 forwarding.
Similarly, as no VLAN interface is created for the VLAN of the R&D department on
the Internet gateway Core-Switch B, the hosts of the R&D department should not
be able to access the Internet or the marketing department through Layer 3
forwarding.
Thus, all departments are isolated at both the data link layer and the network
layer.
n To prevent users from modifying the IP addresses and gateways of hosts for
accessing unauthorized network resources, you are recommended to enable
DHCP-Snooping on Switch A and Switch B to monitor the IP addresses of clients.
For detailed information about configuring DHCP-Snooping, refer to the Switch
5500 Family Configuration Guide.
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.
■ The maximum number of protocol templates that can be bound to a port varies
by device.
Abstract:
This document introduces how voice VLAN of the 3Com series Ethernet switches is
applied and configured in a network.
Acronyms:
VLAN (Virtual local area network)
Voice VLAN Support In the 3Com series Ethernet switches based on the Comware V3.10 software
Matrix platform, the following models support voice VLAN:
■ Switch 5500
■ Switch 5500G
■ Switch 4500
■ Switch 4200
■ E352/E328
■ Switch 4210
■ E126A
n ■ For how to configure VLAN, port type and other related functions that voice
VLAN configuration involves, refer to the configuration guide that applicable to
your switch.
■ The configuration procedure differs by device. This configuration example uses
the Switch 5500. For information on how to configure voice VLAN on other
switches, refer to the Configuration Guide for that model.
■ The configuration example in this guide provides only basic configuration
procedures. For detailed information about the involved functions, refer to the
switch’s configuration guide and command reference guide.
Voice VLAN A company plans to deploy IP phones in the office area and meeting rooms. To
Configuration guarantee voice quality, the voice traffic must be transmitted in a VLAN dedicated
Examples to voice traffic. At the same time, assign different network segments for the IP
phones in the meeting rooms and those in the office area.
■ Network requirements of the IP phones in the office area
All IP phones can get an IP address and voice VLAN information automatically. In
addition, they can send tagged voice traffic. The IP phones connect to a switch
port via the PCs of their users. It is required that the switch port exit the voice
VLAN automatically if no voice traffic has passed by within 100 minutes.
The company deploys IP phones in two meeting rooms. The IP phone in meeting
room 1 sends VLAN untagged voice traffic. The OUI address of the IP phone is
00e3-f200-0000. In addition, the IP address of the IP phone is manually
configured. In meeting room 2, a Cisco IP phone capable of getting an IP address
and voice VLAN information automatically is deployed. The IP phone sends VLAN
tagged voice traffic.
The IP phones and PCs in the office area connect to the enterprise network
through Switch A, and the IP phones in the two meeting rooms connect to the
enterprise network via Switch B. The two switches and an XE voice server are
connected to the core switch. The core switch connects to the Internet through an
egress router. In addition, the core switch also operates as the DHCP server to
210 CHAPTER 8: VLAN CONFIGURATION EXAMPLES
allocate IP addresses and voice VLAN configuration for the IP phones configured to
get IP addresses automatically.
Internet
XE SIP
Server
Router
Switch A
Core switch
(DHCP Server˅
Office area
Switch B
Switch A
GE 1/1 /1
Eth1/ 0/10
Office area
n The above procedure describes how a common IP phone gets an IP address. The
procedure may differ depending on your IP phone. For the actual procedure of
your IP phone, refer to its user manual.
Voice VLAN Configuration Examples 211
n A hybrid port with voice VLAN enabled in automatic mode joins the voice VLAN in
tagged mode automatically and sends the traffic of the voice VLAN tagged.
For instructions on configuring the port’s default VLAN and configuring the port to
send traffic untagged or tagged, refer to the applicable configuration
guideconfiguration guide.
Configuration on Switch B
GE1/ 1/ 2
Eth1/0/1 Eth1/ 0/ 2
Switch B
■ Ethernet 1/0/1
■ Ethernet 1/0/2
You can configure Ethernet 1/0/2 in a way similar to configuring Ethernet 1/0/10
on Switch A. However, because only IP phones are connected to Ethernet 1/0/2,
you can assign the port to the voice VLAN manually to guarantee stable
transmission for voice traffic. For the Cisco IP phones connected to the port to
communicate with the switch, enable voice VLAN legacy on the port to notify
them of the voice VLAN ID, so that the Cisco IP phones can request IP addresses
within the voice VLAN. Because the IP phones send tagged voice traffic, you
should configure the port to send the traffic of the voice VLAN tagged.
■ GigabitEthernet 1/1/2
The port sends the voice traffic received on Switch B. As the meeting rooms should
use a voice VLAN different from that for the office area, configure VLAN 400 as
the voice VLAN on Switch B and configure the port to send the traffic of VLAN
400 tagged.
GE 1/0/3 GE1/0/4
Core switch
GE 1/0/1 (DHCP Server)
GE1/0/2
The core switch forwards traffic, allocates IP addresses to IP phones, and specifies
the voice VLAN and the voice server address.
After the IP phone gets the voice VLAN information, it requests for an IP address in
the voice VLAN instead of using the IP address obtained in the default VLAN.
When receiving the request, the core switch allocates an IP address in VLAN 200 or
VLAN 400, whichever the IP phone belongs to. Note that VLAN 200 and VLAN
400 use different IP address segments.
As both the XE voice server and the egress router are connected to the core
switch, you should create two VLAN interfaces, and assign GigabitEthernet 1/0/3
and GigabitEthernet 1/0/4 to the two VLANs respectively, thus achieving Layer-3
forwarding.
IP address and
network Operations on
VLAN interface segment Ports involved Port type the VLAN traffic
Vlan-interface10 192.168.1.1/24 GigabitEthernet Trunk tagged
0 1/0/1
Vlan-interface20 192.168.2.1/24 GigabitEthernet Trunk tagged
0 1/0/1
Vlan-interface40 192.168.4.1/24 GigabitEthernet Trunk tagged
0 1/0/2
Vlan-interface30 192.168.3.1/24 GigabitEthernet Access untagged
0 1/0/3
Vlan-interface50 192.168.5.1/24 GigabitEthernet Access untagged
0 1/0/4
Configuration steps
■ Configuration on Switch A
<SwitchA> system-view
[SwitchA] vlan 100
[SwitchA-vlan100] quit
[SwitchA] vlan 200
[SwitchA-vlan200] quit
[SwitchA-Ethernet1/0/10] quit
[SwitchA] voice vlan aging 100
Voice VLAN Configuration Examples 215
# Enable voice VLAN security mode so that only voice traffic is transmitted in the
voice VLAN. (Optional. The voice VLAN security mode is enabled by default.)
<SwitchB> system-view
[SwitchB] vlan 100
[SwitchB-vlan100] quit
[SwitchB] vlan 400
[SwitchB-vlan400] quit
# Assign Ethernet 1/0/1, Ethernet 1/0/2, and GigabitEthernet 1/1/2 to the specified
VLANs according to Table 90.
# Configure the voice VLAN to operate in manual mode on Ethernet 1/0/1 and
Ethernet 1/0/2, and enable voice VLAN on the two ports.
# Enable voice VLAN security mode so that only voice traffic is transmitted in the
voice VLAN. This step is optional. The voice VLAN security mode is enabled by
default.
# Create VLAN 100, VLAN 200, VLAN 300, VLAN 400, and VLAN 500 on the core
switch. Assign the specified ports to their respective VLANs according to Table 91.
The configuration procedure is omitted here.
# Create VLAN interfaces and assign IP addresses to the VLAN interfaces according
to Table 91. The configuration procedure is omitted here.
<CoreSwitch> system-view
[CoreSwitch] dhcp enable
# Configure VLAN 200 as the voice VLAN and the voice server IP address as
192.168.3.3 for option 184 in the address pool vlan100.
n For detailed information about configuring DHCP, refer to the Switch 5500 Family
Configuration Guide.
Protocols and Standards 217
The core switch thus configured should be able to allocate IP addresses, voice
VLANs, and the voice server IP address for IP phones in VLAN 200 and VLAN 400,
and to forward voice traffic at Layer 3. If required, configure dynamic routing
protocols on the core switch, which is beyond the scope of this document.
Configuration remarks
After you finish the configuration, the IP phones in each area can establish
connections with the voice server, get telephone numbers, and communicate
normally. For the configuration on the voice server, refer to the user manual of the
3Com XE voice server.
You are recommended to enable DHCP snooping and some security functions on
Switch A and Switch B to ensure that only legal IP phones that get IP addresses
from the core switch can use the service, thus preventing malicious interception.