Commission Guide (V100R002C00 04)
Commission Guide (V100R002C00 04)
Commission Guide (V100R002C00 04)
V100R002C00
Commission Guide
Issue 04
Date 2009-11-10
Website: http://www.huawei.com
Email: support@huawei.com
and other Huawei trademarks are the property of Huawei Technologies Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of their respective holders.
Notice
The purchased products, services and features are stipulated by the contract made between Huawei and the
customer. All or part of the products, services and features described in this document may not be within the
purchase scope or the usage scope. Unless otherwise specified in the contract, all statements, information,
and recommendations in this document are provided "AS IS" without warranties, guarantees or representations
of any kind, either express or implied.
The information in this document is subject to change without notice. Every effort has been made in the
preparation of this document to ensure accuracy of the contents, but all statements, information, and
recommendations in this document do not constitute the warranty of any kind, express or implied.
Contents
3 Precautions..................................................................................................................................3-1
4 Basic Commissioning................................................................................................................4-1
4.1 Logging In to the S9300 Through the Console Port.......................................................................................4-2
4.2 Checking the System Information...................................................................................................................4-5
4.2.1 Checking the Health Status of the S9300...............................................................................................4-5
4.2.2 Checking the Software Versions............................................................................................................4-8
4.2.3 Checking the Status of Boards...............................................................................................................4-9
4.2.4 Checking the Status of Interfaces.........................................................................................................4-10
4.2.5 Checking the License...........................................................................................................................4-11
4.3 Setting the System Name..............................................................................................................................4-12
4.4 Setting the System Time...............................................................................................................................4-13
4.5 Switching User Level....................................................................................................................................4-15
4.6 Configuring the Remote Login Function......................................................................................................4-15
4.6.1 Setting the Management IP Address....................................................................................................4-16
4.6.2 Configuring the Telnet Service............................................................................................................4-18
4.6.3 Configuring the FTP Service................................................................................................................4-20
4.6.4 Configuring the SSH Service...............................................................................................................4-22
4.6.5 Configuring the ACL to Filter Access Users.......................................................................................4-25
4.7 Configuring IP Routing.................................................................................................................................4-27
4.7.1 Configuring the Default Route.............................................................................................................4-27
4.7.2 Configuring OSPF................................................................................................................................4-28
4.8 Saving the Configuration..............................................................................................................................4-30
A Appendix...................................................................................................................................A-1
A.1 Testing the Optical Power of the Interfaces on the S9300............................................................................A-2
A.2 License Description.......................................................................................................................................A-3
Figures
Figure 5-148 Networking diagram for configuring congestion avoidance and congestion management........5-658
Figure 5-149 Networking diagram for configuring local port mirroring.........................................................5-661
Figure 5-150 Networking diagram for configuring remote port mirroring......................................................5-664
Figure 5-151 Networking diagram for configuring flow mirroring.................................................................5-667
Figure 5-152 Networking diagram for using RADIUS to authenticate users..................................................5-672
Figure 5-153 Networking diagram for using HWTACACS to authenticate and authorize users....................5-675
Figure 5-154 Networking diagram for preventing the bogus DHCP server attack..........................................5-679
Figure 5-155 Networking diagram for preventing the DoS attack by changing the CHADDR field..............5-681
Figure 5-156 Networking diagram for preventing the attacker from sending bogus DHCP messages for extending
IP address leases................................................................................................................................................5-684
Figure 5-157 Networking diagram for limiting the rate for sending DHCP messages....................................5-687
Figure 5-158 Networking diagram for configuring DHCP snooping..............................................................5-689
Figure 5-159 Networking diagram for enabling DHCP snooping on the DHCP relay agent..........................5-694
Figure 5-160 Networking diagram for configuring IP source guard................................................................5-698
Figure 5-161 Networking diagram for configuring ARP security functions...................................................5-700
Figure 5-162 Networking diagram for prevent man-in-the-middle attacks.....................................................5-704
Figure 5-163 Networking diagram for configuring traffic suppression...........................................................5-706
Figure 5-164 Networking diagram for sending a whitelist item to the CPU....................................................5-707
Figure 5-165 Networking diagram for configuring IP source trail..................................................................5-709
Figure 5-166 Networking diagram for configuring URPF...............................................................................5-710
Figure 5-167 Networking diagram for disabling URPF for the specified traffic.............................................5-711
Figure 5-168 Networking diagram for configuring static LSPs.......................................................................5-715
Figure 5-169 Networking diagram for setting up a static LSP.........................................................................5-725
Figure 5-170 Networking diagram for configuring local LDP sessions..........................................................5-735
Figure 5-171 Networking diagram for configuring a remote LDP session......................................................5-740
Figure 5-172 Networking diagram for configuring an LDP LSP....................................................................5-745
Figure 5-173 Networking diagram for configuring transit LSPs.....................................................................5-749
Figure 5-174 Networking diagram for configuring static BFD for LDP LSPs................................................5-755
Figure 5-175 Networking diagram for configuring dynamic BFD for LDP LSPs..........................................5-761
Figure 5-176 Networking diagram for configuring LDP FRR.........................................................................5-767
Figure 5-177 Networking diagram for configuring synchronization of LDP and an IGP...............................5-773
Figure 5-178 Networking diagram for configuring LDP GR...........................................................................5-779
Figure 5-179 Networking diagram for configuring static CR-LSPs................................................................5-785
Figure 5-180 Networking diagram for configuring an RSVP-TE tunnel.........................................................5-792
Figure 5-181 Networking diagram for configuring RSVP authentication.......................................................5-801
Figure 5-182 Networking diagram for setting attributes on the MPLS TE tunnel...........................................5-806
Figure 5-183 Networking diagram for configuring MPLS TE FRR................................................................5-817
Figure 5-184 Networking diagram for configuring MPLS TE auto FRR........................................................5-828
Figure 5-185 Networking diagram for configuring MPLS TE FRR................................................................5-837
Figure 5-186 Networking diagram for configuring CR-LSP hot standby........................................................5-846
Figure 5-187 Networking diagram for configuring RSVP GR........................................................................5-853
Figure 5-188 Networking diagram for configuring CR-LSP hot standby........................................................5-860
Figure 5-189 Networking diagram for configuring static BFD for TE tunnels...............................................5-866
Figure 5-231 Networking diagram for configuring inter-AS Kompella VPLS Option A.............................5-1236
Tables
Purpose
his document describes how to verify basic functions of the Quidway S9300 Terabit Routing
Switch(hereinafter referred to as the Quidway S9300) during the deployment to ensure stable
and reliable running of the Quidway S9300 on the network.
Related Versions
The following table lists the product version related to this document.
S9300 V100R002C00
Intended Audience
This document is intended for:
l Data configuration engineer
l Commissioning engineer
l Network monitoring engineer
l System maintenance engineer
Organization
This document organized as follows.
Chapter Content
Chapter Content
Conventions
Symbol Conventions
The symbols that may be found in this document are defined as follows.
Symbol Description
General Conventions
The general conventions that may be found in this document are defined as follows.
Convention Description
Convention Description
Command Conventions
The command conventions that may be found in this document are defined as follows.
Convention Description
&<1-n> The parameter before the & sign can be repeated 1 to n times.
GUI Conventions
The GUI conventions that may be found in this document are defined as follows.
Convention Description
Keyboard Operations
The keyboard operations that may be found in this document are defined as follows.
Format Description
Key Press the key. For example, press Enter and press Tab.
Key 1+Key 2 Press the keys concurrently. For example, pressing Ctrl+Alt
+A means the three keys should be pressed concurrently.
Key 1, Key 2 Press the keys in turn. For example, pressing Alt, A means
the two keys should be pressed in turn.
Mouse Operations
The mouse operations that may be found in this document are defined as follows.
Action Description
Click Select and release the primary mouse button without moving
the pointer.
Drag Press and hold the primary mouse button and move the
pointer to a certain position.
Update History
Updates between document issues are cumulative. Therefore, the latest document issue contains
all updates made in previous issues.
l Precautions
l Parameters
1 Commissioning Process
Start
Preparations
Basic Commissioning
2 Commissioning Preparations
2 Cables and connectors The serial port cables for local maintenance,
network cables, POE cables and optical fibers
meet the following requirements:
l The cable connectors are tight and firm.
l The cable sheath is intact.
NOTE
The hardware installation engineers should have already checked items 1 and 2 listed in Table 2-1. To
ensure the proper connection of the hardware, the commissioning engineers can recheck the preceding
items.
2 License The license controls the MPLS and NQA features of the
S9300.
Log in to http://license.huawei.com and generate the
license by using the LAC (or contract number) and ESN.
For the method of applying the license, see the Guide of
S9300 license application and operation. The path of the
document is Documentation > Data Communication >
Product > Ethernet Lanswitch > Quidway S9300 >
Public Information.
1 Cables l One RS232 serial port cable: used for logging in to the
S9300 through the Console port.
l Two network cables: used for commissioning the Eth
port or other services.
l Several optical fibers, XFP optical modules, and SFP
optical modules: used for connecting the S9300 to
other devices.
3 Auxiliary device Optical power meter: used for testing the actual input and
and meter output power, receiver sensitivity, and overload optical
power of optical interfaces.
3 Precautions
1 Have you applied for the licenses of the The MPLS and NQA features are
MPLS and NQA features? available only after you apply for the
licenses. In addition, to use the MPLS
feature, you must install the enhanced
LPU on the S9300.
2 Which types of Eth-Trunks does the The S9300 supports the Eth-Trunks in
S9300 support? manual load balancing mode and the
Eth-Trunks in static LACP mode. The
Eth-Trunks on the two connected
devices must work in the same mode;
otherwise, the Eth-Trunks cannot be
used.
3 Whether the boards of the S9300 need The MPUs and LPUs of the S9300 may
to be reinstalled? not contact well with the backplane
during the delivery because of some
reasons such as bump. If an exception
occurs, you can try to reinstall the
boards.
Classification of LPUs
48-port 100M Ethernet optical LPU F48SA Support support 32K MAC address
(EA, SFP) entries; not support synchronization
Ethernet or 1588v2.
48-port 100M Ethernet optical LPU F48SC Support 128K MAC address entries;
(EC, SFP) not support synchronization Ethernet
or 1588v2.
48-port 100M Ethernet electrical LPU F48TA Support 32K MAC address entries;
(EA, RJ45) not support synchronization Ethernet
or 1588v2.
48-port 100M Ethernet electrical LPU F48TC Support 128K MAC address entries;
(EC, RJ45) not support synchronization Ethernet
or 1588v2.
48-port 100M/1000M Ethernet optical G48SA Support 32K MAC address entries;
LPU (EA, SFP) not support synchronization Ethernet
or 1588v2.
48-port 100M/1000M Ethernet optical G48SC Support 128K MAC address entries;
LPU (EC, SFP) not support synchronization Ethernet
or 1588v2.
48-port 100M/1000M Ethernet optical G48SD Support 512K MAC address entries;
LPU (ED, SFP) not support synchronization Ethernet
or 1588v2.
48-port 100M/1000M Ethernet optical G48TA Support 32K MAC address entries;
LPU (EA, RJ45) not support synchronization Ethernet
or 1588v2.
48-port 100M/1000M Ethernet optical G48TC Support 128K MAC address entries;
LPU (EC, RJ45) not support synchronization Ethernet
or 1588v2.
48-port 100M/1000M Ethernet optical G48TD Support 512K MAC address entries;
LPU (ED, RJ45) not support synchronization Ethernet
or 1588v2.
48-port 100M/1000M Ethernet PoE G48VA Support 32K MAC address entries;
electrical LPU (EA, RJ45, POE) not support synchronization Ethernet
or 1588v2.
4-port 10GE optical LPU (EA, XFP) X4UXA Support 32K MAC address entries;
not support synchronization Ethernet
or 1588v2.
4-port 10GE optical LPU (EC, XFP) X4UXC Support 128K MAC address entries;
not support synchronization Ethernet
and 1588v2.
2-port 10GE optical LPU (EA, XFP) X2UXA Support 32K MAC address entries;
not support synchronization Ethernet
and 1588v2, or .
2-port 10GE optical LPU (EC, XFP) X2UXC Support 128K MAC address entries;
not support synchronization Ethernet
or 1588v2.
24-port 100M/1000M Ethernet optical G24SA Support 32K MAC address entries;
LPU (SA, SFP) not support MPLS and MPLS VPN;
not support netstream; not support
synchronization Ethernet or 1588v2.
24-port 100M/1000M Ethernet optical G24SC Support 128K MAC address entries;
LPU (EC, SFP) not support synchronization Ethernet
or1588v2.
24-port 100M/1000M Ethernet optical G24SD Support 512K MAC address entries;
LPU (ED, SFP) not support synchronization Ethernet
or 1588v2.
24-port 100M/1000M Ethernet optical G24CA Support 32K MAC address entries;
+ Combo electrical LPU (SA, SFP/ not support MPLS and MPLS VPN;
RJ45) not support netstream; not support
synchronization Ethernet or 1588v2.
12-port GE optical LPU (SA, SFP+) X12SA Support 32K MAC address entries;
not support MPLS and MPLS VPN;
not support netstream; not support
synchronization Ethernet or 1588v2.
24-port 100M/1000M Ethernet optical S24XA Support 32K MAC address entries;
and 2-port GE optical LPU (EA, SFP/ not support synchronization Ethernet
XFP) or 1588v2.
NOTE
l The Small Form-Factor Pluggable (SFP), SFP+, and XFP are pluggable optical modules.
4 Basic Commissioning
Prerequisite
Before logging in to the S9300 through the Console port, you need to complete the following
tasks:
NOTE
There is a Console port on both the master MPU and slave MPU of the S9300. You need to use the
Console port of the master MPU for commissioning. The MPU whose ACT indicator is on is the
master MPU.
l Connect the COM port of the computer to the Console port of the S9300 through a serial
port cable.
Procedure
Step 1 Start the Windows HyperTerminal on your computer.
Choose Start > Programs > Accessories > Communications > HyperTerminal to start the
HyperTerminal on the Windows operating system.
Step 2 Create a connection.
As shown in Figure 4-2, enter the name of the new connection in the Name text box and choose
an icon. Then, click OK.
Parameter Value
Data bits 8
Stop bits 1
----End
Operation Result
After the preceding operations, press Enter. If the <Quidway> prompt is displayed, it indicates
that you have logged in to the S9300. Then you can enter commands to configure or manage the
S9300.
If you fail to log in, click the disconnection icon and initiate the call again. If the login still fails,
return to Step 1 to check the parameter settings or check the physical connection. After the
checking, log in again.
Prerequisite
You have successfully logged in to the S9300.
Precautions
You can run the display health command in any view to check the health status of the S9300,
including the usage of the CF card and Flash card, CPU usage, memory usage, power supply
status, fan status, voltage, and temperature.
Procedure
Step 1 Run the display health command to view the health status of the S9300.
<Quidway>display health
Disk Usage Information:
System disk usage at 2009-02-10 19:39:26 46 ms
-------------------------------------------------------------------------------
Slot Device Total Memory(MB) Used Memory(MB) Used Percentage
-------------------------------------------------------------------------------
4 flash: N/A N/A N/A
cfcard: 1000 397 39%
----End
Operation Result
l If the system health meets the deployment requirements, that is, the indexes are between
the upper limits and lower limits, you can carry out the commissioning tasks.
l If the system health does not meet the deployment requirements, that is, the indexes are
higher than the upper limits or lower than the lower limits, you need to check the software
and hardware of the S9300 according to the displayed error messages to rectify the fault.
Prerequisite
You have successfully logged in to the S9300.
Context
Check the following items to determine whether the software versions are correct:
l Running software versions
l Model of the S9300
l Backplane (BKP) information
l SRU/MCU information
l LPU information
Precautions
When you run the display version command in any view to check the versions of the S9300,
you can enter [ | slot slot-id ] to display the output information filtered by the regular expression
or display the version information about the board in the specified slot.
Procedure
Step 1 Run the display version [ | slot slot-id ] command to view the version of the board.
<Quidway> display version
Huawei Versatile Routing Platform Software
VRP (R) software, Version 5.50 (S9300 V100R002C00)
Copyright (C) 2003-2009 HUAWEI TECH CO., LTD
Quidway S9303 Terabit Routing Switch uptime is 0 week, 0 day, 17 hours, 56 minut
es
BKP 0 version information:
1. PCB Version : LE02BAKM VER.A
2. If Supporting PoE : No
3. Board Type : BAKM
4. MPU Slot Quantity : 2
5. LPU Slot Quantity : 3
----End
Operation Result
l If the software versions meet the on-site deployment requirements, you can carry out the
commissioning tasks. For details about the software versions, see the release notes.
l If the software versions do not meet the on-site deployment requirements, you need to
upgrade the software. To obtain the release notes and upgrade guide of each version, access
Software > Version Software > Data Communication Product Line > Ethernet
Switch > Quidway S9300.
Prerequisite
You have successfully logged in to the S9300.
Context
Check the following items to determine whether the boards run normally:
l Basic information about the installed boards
l Details about the board in a specified slot, including the LPU, MCU, and power supply
Precautions
If an S9300 uses AC 110 V power supplies that work in 1+1 mode, but the S9300 is not installed
with a CMU, you cannot obtain the actual power of the S9300. To ensure the safety of the
equipment, the system provides power supply of up to 400 W. Some boards cannot be registered
because of insufficient power, and you can run the display device command to view the
unregistered boards. This problem can be solved by a CMU.
Procedure
Step 1 Run the display device command to view information about the available boards.
<S9300> display device
S9303's Device status:
Slot Sub Type Online Power Register Alarm Primary
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1 - G24CA Present PowerOn Registered Normal NA
2 - G24CA Present PowerOn Registered Normal NA
3 - G48SD Present PowerOn Registered Normal NA
4 - MCUA Present PowerOn Registered Normal Master
5 - MCUA Present PowerOn Registered Normal Slave
PWR1 - - Present PowerOn Registered Normal NA
----End
Operation Result
l If all the boards are available and running normally, the single-point commissioning tasks
can be carried out.
l If some boards cannot be registered or run abnormally, you need to install the CMU or
reinstall these boards.
Prerequisite
You have successfully logged in to the S9300.
Context
Check the following items to determine whether the interfaces are in the normal state:
l Status of interfaces
l Statistics on interfaces
Precautions
You can run the display interface command in any view to check the running status and statistics
on the interfaces.
l You can enter interface-type interface-number to specify the type and number of the
interface. If the interface type is not specified, the system displays the running status and
statistics on all interfaces. If the interface type is specified but the interface number is not
specified, the system displays the running status and statistics on all the interfaces of the
specified type.
l You can enter slot slot-number to view the running status and statistics on all the interfaces
of the specified LPU.
Procedure
Step 1 Run the display interface [ interface-type [ interface-number ] | slot slot-number ] command to
view the running status and statistics on the specified interface.
<Quidway> display interface GigabitEthernet 1/0/0
GigabitEthernet1/0/0 current state : UP
Description:HUAWEI, Quidway Series, GigabitEthernet1/0/0 Interface
Switch Port,PVID : 1,The Maximum Frame Length is 1536
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc33-0011
Port Mode: FORCE FIBER
Speed : 1000, Loopback: NONE
Duplex: FULL, Negotiation: ENABLE
Mdi : NORMAL
Last 300 seconds input rate 0 bits/sec, 0 packets/sec
Last 300 seconds output rate 0 bits/sec, 0 packets/sec
Input: 0 packets, 0 bytes
Unicast: 0, NUnicast: 0
Discard: 0, Error : 0
Jumbo : 0
Output: 0 packets, 0 bytes
Unicast: 0, NUnicast: 0
Discard: 0, Error : 0
Jumbo : 0
----End
Operation Result
l If the interfaces are in the normal state, you can carry out the commissioning tasks.
l The following are the possible exceptions and solutions:
– If the physical status of an interface is Down, check whether the cable connected to the
interface is loosened or damaged.
– If the statistics on an interface show that there are a lot of error packets, check whether
the rate and duplex mode on the interface are set correctly and check the connectivity
between the interface of the S9300 and the connected device.
l The following are the possible exceptions and their solutions:
– The optical power is excessively high and the optical attenuator needs to be used.
– The optical power is low, packets are lost, or error packets occur. You need to check
the fiber and optical module. For the attributes of optical interfaces, see "List of Interface
Attributes."
NOTE
The output information varies with the interface type. For the interfaces of the same type, the output
information may also be different because the interfaces use different components.
To view the IP layer information about an interface, you can run the display ip interface command.
Prerequisite
You have successfully logged in to the S9300.
Context
The ESN of the S9300 is bound to the backplane. If an error occurs in the loading of the license
file, see the Guide of S9300 license application and operation. The path of the document is
Documentation > Data Communication > Product > Ethernet Lanswitch > Quidway
S9300 > Public Information.
Procedure
Step 1 Run the display license command to view the license information.
<Quidway> display license
Active License on master board: cfcard:/on1018399.dat
VRP NETSTREAMENHANCE 0%
VRP TUNNELENHANCE 0%
VRP MVPNENHANCE 0%
VRP LPUKBENHANCE 0%
VRP VPLSRESOURCE 0%
----End
Operation Result
l If the license file is loaded, the single-point commissioning tasks can be carried out.
l If the license file failed to pass check, do as follows:
– Run the display esn command in the system view to check whether the backplane ESN
is the same as the license ESN.
– Run the license active filename command in the user view to activate the license and
obtain the corresponding authority.
Prerequisite
The task of 4.2 Checking the System Information is complete and the S9300 is running
normally.
Data Plan
Procedure
Step 1 Run the system-view command to enter the system view.
<Quidway> system-view
Step 2 Run the sysname S9300-1 command to set the system name.
[Quidway] sysname S9300-1
[S9300-1]
----End
Operation Result
After the system name is set, the prompt of the command line is changed to the system name
[S9300-1].
Prerequisite
The task of 4.2 Checking the System Information is complete and the S9300 is running
normally.
Data Plan
Daylight saving time first Sun Jan 0 first Sun Apr Starting from 2009, the UTC
4 2009 2009 time is put forward by
04:00:00 at 00:00:00 on the
first Sunday of January, and
is restored at 00:00:00 on the
first Sunday of April.
Procedure
Step 1 Set the Universal Time Coordinated (UTC).
<Quidway> clock datetime 0:0:0 2009-01-01
Step 4 To obtain clock signal from other devices on the network, you need to specify the NTP server.
<Quidway> system-view
[Quidway] ntp-service unicast-server 2.2.2.2 authentication-keyid 42
----End
Operation Result
Run the display clock command to display the following information:
<Quidway> display clock
2009-01-01 05:12:07
Wednesday
Time Zone : z5 add 05:00:00
Daylight saving time :
Name : test
Repeat mode : repeat
Start year : 2009
End year : 2009
Start time : first Sunday January 00:00:00
End time : first Sunday April 00:00:00
Saving time : 04:00:00
Run the display ntp-service status command to view the NTP status of the S9300.
[Quidway] display ntp-service status
clock status: synchronized
clock stratum: 3
reference clock ID: 2.2.2.2
nominal frequency: 60.0002 Hz
actual frequency: 60.0002 Hz
clock precision: 2^18
clock offset: 3.8128 ms
root delay: 31.26 ms
root dispersion: 74.20 ms
peer dispersion: 34.30 ms
reference time: 11:55:56.833 UTC Mar 2 2006(C7B15BCC.D5604189)
The clock of the S9300 is in synchronized state, the clock stratums is 3, and the clock is one
level lower than the upper NTP server.
Prerequisite
Before switching to another user level, the user must enter correct switch password, which is
preset.
CAUTION
If simple is selected, the password is saved into the configuration file in plain text. A user at a
lower level then can easily obtain the switch password by viewing the configuration file. In such
a case, the network security cannot be guaranteed. Therefore, it is recommended that you select
cipher to save the password in cipher text.
If the password is in cipher text, the password cannot be retrieved from the system. Remember
well the password to avoid oblivion or miss.
Procedure
Step 1 Run the system-view command to enter the system view.
Step 2 Run the super password [ level user-level ] { simple | cipher } password command to set the
password for switching the user level.
The value of level ranges from 1 to 15, indicating the user level. The default user level is 3.
Step 3 Run the super [ level ] command to switch to another user level.
Step 4 Enter the password according to the prompt.
If the password is correct, the user level is changed.If the number of unsuccessful password
attempts reaches three, the system returns to the user view and the user level is not changed.
NOTE
If a user is switched to a higher user level through the super command, the system sends a trap and records
the event in the log. If a user is switched to a lower user level, the system only records the event in the log.
----End
Prerequisite
The task of 4.2 Checking the System Information is complete and the S9300 is running
normally.
Background
IP Network
RouterA S9300
The S9300 connects to the Metro Ethernet through Router A. To enable the network management
station (NMS) to discover and manage the S9300, you need to assign an IP address to the Eth
interface of the S9300 and ensure that the link layer and protocol layer are in Up state.
Data Preparation
IP address and subnet mask Depends on the network Ensure that the IP addresses
planning of the carrier. of the interfaces between the
S9300 and the connected
device are in the same
network segment.
Procedure
Step 1 Enter the interface view and set the IP address of the interface.
<Quidway> system-view
[Quidway] interface Ethernet0/0/0
[Quidway-Ethernet0/0/0] ip address 192.168.1.2 24
----End
Commissioning Results
Run the following command to check whether the settings are correct:
<Quidway> display interface Ethernet0/0/0
Ethernet0/0/0 current state : UP
Line protocol current state : UP
Last up time: 2009-05-31, 22:34:51
Description:HUAWEI, Quidway Series, Ethernet0/0/0 Interface
Route Port,
Internet Address is 192.168.1.2/24
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc33-0011
Media type: twisted pair, link type: auto negotiation
loopback:none, maximal BW:100M, current BW:100M, full-duplex mode
Statistics last cleared:2009-05-31 22:34:28
Last 5 minutes input rate 552 bits/sec, 1 packets/sec
Last 5 minutes output rate 584 bits/sec, 1 packets/sec
Input: 106570 bytes, 1699 packets
Output: 85691 bytes, 1332 packets
Input:
Unicast: 1244, Multicast: 0
Broadcast: 455
CRC: 0, Overrun: 0
LongPacket: 0, Jabber: 0
Undersized Frame: 0
Output:
Unicast: 1332, Multicast: 0
Broadcast: 0
Total output error: 0, Underrun: 0
Ping the device connected to the S9300, for example, a network management server.
<Quidway> ping 192.168.1.3
PING 192.168.1.3: 56 data bytes, press CTRL_C to break
Prerequisite
The following tasks are complete and the S9300 is running normally:
l 4.2 Checking the System Information
l 4.6.1 Setting the Management IP Address
Context
This section describes only the local authentication for Telnet users.
l For the method of configuring RADIUS authentication, see the Quidway S9300 Terabit
Routing Switch Configuration Guide - Basic Configuration.
l For the method of configuring HWTACACS authentication, see the Quidway S9300
Terabit Routing Switch Configuration Guide - Security Configuration.
Data Preparation
Maximum number of 5 -
concurrent users
Password s9300 -
Command Levels
The commands on the S9300 are classified into different protection levels. By default, the
command levels range from 0 to 3.
l Level 0: This is the visiting level. The level-0 commands include the network diagnosis
tools such as ping and tracert and the commands for connecting the S9300 to another device,
such as Telnet client and SSH. The level-0 commands cannot save configuration files.
l Level 1: This is the monitoring level. The level-1 commands include the system
maintenance commands, such as the display commands. The level-1 commands cannot
save configuration files.
l Level 2: This is the configuration level. The level-2 commands include the service
configuration commands, such as the routing commands and commands on each network
layer that are used to directly provide network service to users.
l Level 3: This is the management level. The level-3 commands include the system basic
running commands that support services, for example:
– Commands for the switchover of file system, FTP, TFTP, and configuration files
– Commands for controlling the slave boards
– Commands for user management
– Commands for setting command levels
– Commands for setting the system parameters
– Debugging commands
Procedure
Step 1 Set the maximum number of concurrent users.
<Quidway> system-view
[Quidway] user-interface maximum-vty 5
Step 2 Create a user, set the user name and password, and specify the user level.
[Quidway] aaa
[Quidway-aaa] local-user huawei password cipher s9300
[Quidway-aaa] local-user huawei level 3
[Quidway-aaa] local-user huawei service-type telnet
[Quidway-aaa] quit
NOTE
Step 3 Set the authentication mode, default user level, and idle-cut period.
[Quidway] user-interface vty 0 4
[Quidway-ui-vty0-4] user privilege level 1
[Quidway-ui-vty0-4] authentication-mode aaa
[Quidway-ui-vty0-4] idle-timeout 30 10
[Quidway-ui-vty0-4] quit
----End
Commissioning Results
Run the following command to check whether the settings are correct:
<Quidway> telnet 127.0.0.1
Trying 127.0.0.1 ...
Press CTRL+K to abort
Connected to 127.0.0.1 ...
***********************************************************
* All rights reserved (2003-2009) *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
* Notice: *
* This is a private communication system. *
* Unauthorized access or use may lead to prosecution. *
***********************************************************
Login authentication
Username:huawei
Password:
Info: huawei logs in through VTY4 from 127.0.0.1.
Info: The max number of VTY users is 20, and the number
of current VTY users on line is 1.
<Quidway>
Prerequisite
The following tasks are complete and the S9300 is running normally:
l 4.2 Checking the System Information
l 4.6.1 Setting the Management IP Address
Data Preparation
Password ftp -
Procedure
Step 1 Enable the FTP function on the S9300.
<Quidway> system-view
[Quidway] ftp server enable
Info: Succeeded in starting the FTP server
Step 2 Create a user, set the user name and password, and specify the user path.
[Quidway] aaa
[Quidway-aaa] local-user ftp password cipher ftp
[Quidway-aaa] local-user ftp ftp-directory cfcard:/
[Quidway-aaa] local-user ftp service-type ftp
[Quidway-aaa] quit
NOTE
----End
Commissioning Results
Log in to the S9300 from a terminal through FTP. In this example, the terminal is a personal
computer.
ftp> dir
200 Port command okay.
150 Opening ASCII mode data connection for *.
drwxrwxrwx 1 noone nogroup 0 May 22 11:04 log
-rwxrwxrwx 1 noone nogroup 4 May 22 09:48 snmpnotilog.txt
-rwxrwxrwx 1 noone nogroup 12579 Oct 31 2008 license-b201.txt
-rwxrwxrwx 1 noone nogroup 163730936 Jan 16 08:38 v300r003c02b670smk1.cc
-rwxrwxrwx 1 noone nogroup 66846 Jan 16 08:45 670paf.txt
-rwxrwxrwx 1 noone nogroup 0 May 22 14:30 test.txt
226 Transfer complete.
FTP: 416 byte(s) received in 0.042 second(s) 9.90Kbyte(s)/sec.
Prerequisite
The following tasks are complete and the S9300 is running normally:
Data Preparation
Procedure
Step 1 Generate the local key pair.
<Quidway> system-view
[Quidway] rsa local-key-pair create
The key name will be: S9300-1_Host
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
It will take a few minutes.
Input the bits in the modulus[default = 512]:1024
Generating keys...
....++++++++++++
..........++++++++++++
....++++++++
......................................++++++++
NOTE
If the login protocol is SSH, the S9300 automatically disables the Telnet function.
Step 3 Create an SSH user and set the authentication mode to password authentication.
[Quidway] ssh user client001 authentication-type password
Step 5 Enable the STelnet function and set the service type to STelnet.
[Quidway] stelnet server enable
[Quidway] ssh user client001 service-type stelnet
----End
Commissioning Results
Log in to the S9300 through SSH. In this example, the putty program is used to log in to the
S9300.
1. As shown in the following figure, the IP address of the S9300 is 192.168.1.1 and the login
protocol is SSH.
Prerequisite
The following tasks are complete and the S9300 is running normally:
l 4.2 Checking the System Information
l 4.6.1 Setting the Management IP Address
l 4.6.2 Configuring the Telnet Service
Background
The S9300 provides various methods to filter the access users, including QoS and anti-attack
functions. This section describes only the method of configuring the ACL in the user interface
view to filter access users.
The ACL configured in the user interface view can filter only the packets of access users, but
cannot filter the attack packets.
Data Preparation
ACL Classification
NOTE
Only ACLs 2000-3999 or the IPv6 ACL can control the access users.
Procedure
Step 1 Create ACL rules.
<Quidway> system-view
[Quidway] acl 3001
----End
Commissioning Results
Only the device assigned an IP address can access and manage the S9300.
Context
In a routing table, the default route is represented by a static route destined for the network 0.0.0.0
(with the subnet mask being 0.0.0.0).
Procedure
Step 1 Run the system-view command to enter the system view.
Step 2 Run the ip route-static 0.0.0.0 0.0.0.0 10.7.46.1 command to configure the default route from
the S9300 to the next hop.
Here, 10.7.46.1 indicates the gateway address of the next hop. The default preference of the
default route is 60.
Step 3 Run the display ip routing-table command to view the configuration of the default route.
<Quidway>display ip routing-
table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 11 Routes : 11
Step 4 Run the ping 10.7.46.1 command to check the connectivity between the S9300 and the next hop.
[Quidway]ping 10.7.46.1
PING 10.7.46.1: 56 data bytes, press CTRL_C to break
Reply from 10.7.46.1: bytes=56 Sequence=1 ttl=255 time=2 ms
Reply from 10.7.46.1: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 10.7.46.1: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 10.7.46.1: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 10.7.46.1: bytes=56 Sequence=5 ttl=255 time=1 ms
----End
Prerequisite
The following tasks are complete and the S9300 is running normally:
l 4.2 Checking the System Information
l 4.6 Configuring the Remote Login Function
Data Preparation
Figure 4-6 shows the networking.
On Router A, the IP address of the interface connected to the S9300 is 192.168.1.2/24.
On the S9300, the IP address of the interface connected to Router A is 192.168.1.1/24, which
resides on the same network segment with the IP address of the interface on Router A.
IP Network
RouterA S9300
Router ID The router ID of the S9300 is The router IDs should be set
0.0.0.1 and the router ID of according to the network
Router A is 0.0.0.2. planning.
Procedure
Step 1 Enable OSPF and enter the OSPF view.
# Configure Router A.
<Quidway> system-view
[Quidway]interface LoopBack 0
[Quidway-LoopBack0]ip address 0.0.0.2 32
[Quidway] router id 0.0.0.2
[Quidway] ospf
Step 2 Enter the view of the OSPF area that the interface belongs to and add a network segment to the
OSPF area.
NOTE
OSPF can run on an interface if the following conditions are met:
l The mask length of the IP address on the interface is equal to or longer than the length of the mask specified
in the network command.
l The primary IP address of the interface is on the network segment specified by the network command.
----End
Postrequisite
After the configuration, you can run the display ospf routing command to view the OSPF
routing information on the S9300.
Prerequisite
The basic commissioning tasks are complete.
Data Preparation
Item Data Remarks
Procedure
Step 1 Run the save [ configuration-file ] command in the user view to save the configuration.
<Quidway> save comm.cfg
Step 2 Configure the S9300 to start with this configuration file next time.
<Quidway> startup saved-configuration comm.cfg
----End
This chapter describes the typical configuration examples of the services and features supported
by the S9300.
5.1 Configuration Guide - IP Service
This document describes the configurations of the IP services of the S9300, including the basic
knowledge and configurations of secondary IP addresses, DHCP, IP performance, IP unicast
policy-based routing, UDP Helper, basic IPv6 functions, IPv6 over IPv4 tunnels, IPv4 over IPv6
tunnels, and IP sessions. By reading this document, you can learn the concepts and configuration
procedures of IP services.
5.2 Configuration Guide - IP Routing
This document describes the IP routing features of the S9300, including static routes, routing
protocols (RIP, RIPng, OSPF, OSPFv3, IS-IS, BGP4+, MBGP and BGP), and routing policies.
The document provides the configuration procedures and configuration examples of the IP
routing features.
5.3 Configuration Guide - Network Management
This document describes the configuration procedures and configuration examples of the SNMP,
RMON,NTP, LLDP, NQA, NetStream and Ping and Tracert features on the S9300. The
document provides guides to configure the network management functions of the S9300.
5.4 Configuration Guide - Ethernet
This document describes the configuration of Ethernet services on the S9300, including the
configurations of Ethernet interfaces, link aggregation, VLAN, Voice VLAN, VLAN mapping,
QinQ, MAC address table, ARP, MSTP, BPDU tunnel, HVRP, and LDT.
5.5 Configuration Guide - Multicast
This document describes the multicast service supported by the S9300, including basic
knowledge, protocol implementation, configuration procedures, and configuration examples.
5.6 Configuration Guide - Reliability
This document describes the configuration of BFD, DLDP, smart link, RRPP, VRRP, VRRP6,
Ethernet OAM, hot backup, and active/standby switchover to ensure reliability of Ethernet
services on the S9300.
5.7 Configuration Guide - QoS
This document describes QoS features of the S9300 including class-based QoS, traffic policing,
traffic shaping, congestion avoidance, and congestion management from function introduction,
configuration methods, maintenance and configuration examples. This document guides you
through the configuration and the applicable environment of QoS.
5.8 Configuration Guide - Security
This document describes security features of the S9300 including AAA and user management,
Network Access Control (NAC), DHCP snooping, ARP security, IP source guard, IP source
trail, Unicast Reverse Path Forwarding (URPF), local attack defense, PPPoE+, MAC-forced
forwarding (MFF), interface security, traffic suppression, and ACL from aspects of function
introduction, configuration methods, maintenance, and configuration examples.
5.9 Configuration Guide - MPLS
This document describes MPLS configurations supported by theS9300, including the principle
and configuration procedures of static LSPs, MPLS LDP, MPLS TE, and MPLS common
features, and provides configuration examples. In the appendix, terms and abbreviations of
MPLS are listed.
5.10 Configuration Guide - VPN
This document describes the principles, configuration procedures, and configuration examples
of VPN tunnel management, GRE, BGP/MPLS IP VPN, BGP/MPLS IPv6 VPN, VLL, PWE3,
VPLS, VPLS Convergence.
Networking Requirements
As shown in Figure 5-1, GE 1/0/1 of the S9300 is connected to the host through the LAN switch
(LSW); GE 1/0/2 is connected to the server through the router. It is required that:
l GE 1/0/1 should be added to VLAN 2, and GE 1/0/2 should be added to VLAN 3.
l To adapt to fast changes of the network and ensure correct forwarding of packets, dynamic
ARP parameters should be set on VLANIF 2 of the S9300.
l To ensure the security of the server and prevent invalid ARP packets, a static ARP entry
should be created on GE 1/0/2 of the S9300, with the IP address of the router being 10.2.2.3
and the MAC address being 00e0-fc01-0000.
Internet Server
Router
GE1/0/2
S9300
GE1/0/1
PC LSW
PC
PC
Configuration Roadmap
The configuration roadmap is as follows:
1. Create a VLAN and add an interface to the VLAN.
2. Set dynamic ARP parameters on a VLANIF interface at the user side.
3. Create a static ARP entry.
Data Preparation
To complete the configuration, you need the following data:
l GE 1/0/1 added to VLAN 2 and GE 1/0/2 added to VLAN 3
l VLANIF 2 with the IP address being 2.2.2.2 and subnet mask being 255.255.255.0, aging
time of ARP entries being 60s, and number of detection times being 2
l LSW with the IP address being 2.2.2.1 and subnet mask being 255.255.255.0
l Interface connecting the router and the S9300, with the IP address being 10.2.2.3, subnet
mask being 255.255.255.0, and MAC address being 00e0-fc01-0000
Procedure
Step 1 Create a VLAN and add an interface to the VLAN.
# Create VLAN 2 and VLAN 3.
<Quidway> system-view
[Quidway] vlan batch 2 3
# Create a static ARP entry with IP address 10.2.2.3, MAC address 00e0-fc01-0000, VLAN ID
3, and outgoing interface GE 1/0/2.
[Quidway] arp static 10.2.2.3 00e0-fc01-0000 vid 3 interface gigabitethernet 1/0/2
[Quidway] quit
----End
Configuration Files
The following is the configuration file of the S9300.
#
sysname Quidway
#
vlan batch 2 to 3
#
interface Vlanif2
ip address 2.2.2.2 255.255.255.0
arp expire-time 60
arp detect-times 2
#
interface Vlanif3
ip address 10.2.2.2 255.255.255.0
#
interface GigabitEthernet 1/0/1
port hybrid tagged vlan 2
#
interface GigabitEthernet 1/0/2
port hybrid tagged vlan 3
#
arp static 10.2.2.3 00e0-fc01-0000 vid 3 interface GigabitEthernet1/0/2
#
return
Networking Requirements
As shown in Figure 5-2, GE 1/0/0 and GE 1/0/1 of the S9300 are connected to a LAN
respectively, and the network IDs of the two LANs are 172.16.0.0/16. Host A and Host B are
not configured with the default gateway. It is required that routed proxy ARP should be enabled
on the S9300 so that hosts in the two LANs can communicate.
GE1/0/0 GE1/0/1
172.16.1.1/24 172.16.2.1/24
00e0-fc39-80aa 00e0-fc39-80bb
VLAN 2 VLAN 3
S9300 A
Ethernet A Ethernet B
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Create VLAN 2 and add GE 1/0/0 to VLAN 2.
<Quidway> system-view
[Quidway] vlan 2
[Quidway-vlan2] quit
[Quidway] interface gigabitethernet 1/0/0
[Quidway-GigabitEthernet1/0/0] port link-type access
[Quidway-GigabitEthernet1/0/0] port default vlan 2
[Quidway-GigabitEthernet1/0/0] quit
----End
Configuration Files
Configuration file of the S9300
#
sysname Quidway
#
vlan batch 2 to 3
#
interface Vlanif2
ip address 172.16.1.1 255.255.255.0
arp-proxy enable
#
interface Vlanif3
ip address 172.16.2.1 255.255.255.0
arp-proxy enable
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 2
#
interface GigabitEthernet1/0/1
port link-type access
port default vlan 3
#
return
Networking Requirements
As shown in Figure 5-3, GE 1/0/1 and GE 1/0/0 of the S9300 belong to sub-VLAN 2. Sub-
VLAN 2 belong to super-VLAN 3. It is required that:
l Host A and host B in VLAN 2 should be isolated at Layer 2.
l Host A should communicate with host B at Layer 3 through intra-VLAN proxy ARP.
The IP address and subnet mask of the VLANIF interface in super-VLAN 3 should be 10.10.10.1
and 255.255.255.0.
Internet
S9300
GE1/0/1 GE1/0/0
hostB hostA
10.10.10.3/24 10.10.10.2/24
00-e0-fc-00-00-03 00-e0-fc-00-00-02
sub-VLAN2
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Configure the super-VLAN and sub-VLAN.
# Configure sub-VLAN 2.
<Quidway> system-view
[Quidway] vlan 2
[Quidway-vlan2] quit
# Create VLANIF 3.
[Quidway] interface vlanif 3
----End
Configuration Files
The following lists the configuration file of the S9300.
#
sysname Quidway
#
vlan batch 2 to 3
#
vlan 3
aggregate-vlan
access-vlan 2
#
interface Vlanif3
ip address 10.10.10.1 255.255.255.0
arp-proxy inner-sub-vlan-proxy enable
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 2
port-isolate enable
#
interface GigabitEthernet1/0/1
port link-type access
port default vlan 2
port-isolate enable
#
return
Networking Requirements
As shown in Figure 5-4, VLAN 2 and VLAN 3 constitute super-VLAN 4. It is required that:
l Hosts in the sub-VLANs 2 and 3 should not be pinged mutually.
l Hosts in VLAN 2 and VLAN 3 should be pinged mutually after inter-VLAN proxy ARP
is enabled.
VLAN2 VLAN3
VLAN4
VLAN2 VLAN3
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a super-VLAN and a sub-VLAN.
2. Add an interface to the sub-VLAN.
3. Create an VLANIF interface of the super-VLAN and assign an IP address to the VLANIF
interface.
4. Enable inter-VLAN proxy ARP.
Data Preparation
To complete the configuration, you need the following data:
l VLAN IDs of the super-VLAN and sub-VLAN
l GE 1/0/1 and GE 1/0/0 belonging to sub-VLAN 2
l GE 2/0/0 and GE 2/0/1 belonging to sub-VLAN 3
l IP address and subnet mask of VLANIF 4 in super-VLAN 4 being 10.10.10.1 and
255.255.255.0
Procedure
Step 1 Configure the super-VLAN and sub-VLAN.
# Configure sub-VLAN 2.
<Quidway> system-view
[Quidway] vlan 2
[Quidway-vlan2] quit
# Configure sub-VLAN 3.
<Quidway> system-view
[Quidway] vlan 3
[Quidway-vlan3] quit
------------------------------------------------------------------------------
Total:5 Dynamic:4 Static:0 Interface:1
----End
Configuration Files
The following lists the configuration file of the S9300.
#
sysname Quidway
#
vlan batch 2 to 4
#
vlan 4
aggregate-vlan
access-vlan 2 to 3
#
interface Vlanif4
ip address 10.10.10.1 255.255.255.0
arp-proxy inter-sub-vlan-proxy enable
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 2
#
interface GigabitEthernet1/0/1
port link-type access
port default vlan 2
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 3
#
interface GigabitEthernet2/0/1
port link-type access
port default vlan 3
#
return
Networking Requirements
As shown in Figure 5-5, two GE interfaces are added to VLAN 100 in default mode and the IP
addresses of the two GE interfaces are shown in the figure.
S9300
VLANIF100
10.1.1.2/24
PC A PC B
10.1.1.1/24 VLAN100 10.1.1.3/24
Configuration Roadmap
The configuration roadmap is as follows:
1. Add two GE interfaces to VLAN 100 in default mode.
2. Enable Layer 2 topology detection and view changes of ARP entries.
Data Preparation
To complete the configuration, you need the following data:
l Types and numbers of the interfaces to be added to a VLAN
l IP addresses of the VLANIF interface and the PCs
Procedure
Step 1 Create VLAN 100 and add the two GE interfaces of the S9300 to VLAN 100 in default mode.
# Create VLANIF 100 and assign an IP addresses to VLANIF 100.
<Quidway> system-view
[Quidway] vlan 100
[Quidway-vlan100] quit
[Quidway] interface vlanif 100
[Quidway-vlanif100] ip address 10.1.1.2 24
[Quidway-vlanif100] quit
Step 3 Restart GE 1/0/1 and view changes of the ARP entries and aging time.
# View ARP entries on the S9300. You can find that the S9300 has learnt the MAC address of
the PC.
[Quidway] display arp all
IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VPN-
INSTANCE
VLAN/CEVLAN PVC
-----------------------------------------------------------------------------
10.1.1.2 00e0-c01a-4900 I - Vlanif100
10.1.1.1 00e0-c01a-4901 20 DF6 GE1/0/1
100/-
10.1.1.3 00e0-de24-bf04 20 DF6 GE1/0/2
100/-
-----------------------------------------------------------------------------
Total:3 Dynamic:2 Static:0 Interface:1
# Run the shutdown command and then the undoshutdown command on GE 1/0/1 to view the
aging time of ARP entries.
NOTE
According to the displayed information, the ARP entry learned from GE 1/0/1 is deleted after GE 1/0/1 is
shut down. The aging time of ARP entries learned from GE 1/0/2 becomes 0 after GE1/0/1 is restored and
becomes Up again. When the aging time is 0, the S9300 sends an ARP probe packet for updating ARP
entries.
[Quidway-GigabitEthernet1/0/1] display arp all
IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VPN-INSTANCE
VLAN/CEVLAN PVC
----------------------------------------------------------------------------
10.1.1.2 00e0-c01a-4900 I -
Vlanif100
10.1.1.3 00e0-de24-bf04 20 DF6 GE1/0/2
100/-
----------------------------------------------------------------------------
Total:2 Dynamic:1 Static:0 Interface:1
NOTE
After the ARP entry is updated, the aging time is restored to the default value, 20 minutes.
----End
Configuration Files
Configuration file of the Quidway
#
sysname Quidway
#
L2-topolgy detect enable
#
vlan 100
#
interface Vlanif100
ip address 10.1.1.2 255.255.255.0
#
interface GigabitEthernet1/0/1
port link-type access
port default vlan 100
#
interface GigabitEthernet1/0/2
port link-type access
port default vlan 100
#
return
Networking Requirements
As shown in Figure 5-6, the DHCP client is on the network segment 20.20.20.0/24, whereas
the DHCP server is on the network segment of 10.10.10.0/24. DHCP messages need to be sent
by the S9300 enabled with DHCP relay so that the DHCP client can apply for the configuration
including an IP address from the DHCP server.
The DHCP server needs to be configured with an IP address pool of the network segment
20.20.20.0/24 and the route from the DHCP server to the network segment 20.20.20.0/24 is
reachable.
Figure 5-6 Networking diagram for configuring the DHCP relay agent
DHCP Server A
Internet 100.10.10.1/24
DHCP Server B
100.10.10.2/24
Configuration Roadmap
The configuration roadmap is as follows:
1. Create a DHCP server group and add DHCP servers to the DHCP server group.
2. Enable DHCP relay on the VLANIF interface.
3. Bind a VLANIF interface to a specified DHCP server group.
Data Preparation
To complete the configuration, you need the following data:
l Name of the DHCP server group
l IP address of the DHCP server in the DHCP server group
Procedure
Step 1 Create a DHCP server group and add DHCP servers to the DHCP server group.
# Enable DHCP globally, and then enable DHCP Relay on the VLANIF 100 interface.
[Quidway] dhcp enable
[Quidway] interface vlanif 100
[Quidway-Vlanif100] dhcp select relay
[Quidway-Vlanif100] quit
Configure an IP address pool 20.20.20.0/24 on the DHCP server and configure a static route
from the DHCP server to the S9300. Ensure that the route between the DHCP server and network
segment 20.20.20.0/24 is reachable.
NOTE
For the configuration of the DHCP server, see the configuration guide of the server.
Run the display dhcp relay command on the S9300. You can view the configuration of DHCP
relay enabled on the interface.
[Quidway] display dhcp relay interface vlanif 100
** Vlanif100 DHCP Relay Configuration **
DHCP server group name : dhcpgroup1
----End
Configuration Files
Configuration file of the S9300
#
sysname Quidway
#
vlan 100
#
dhcp enable
#
dhcp server group dhcpgroup1
dhcp-server 100.10.10.1
dhcp-server 100.10.10.2
#
interface Vlanif100
ip address 20.20.20.1 255.255.255.0
dhcp select relay
dhcp relay server-select dhcpgroup1
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 100
#
return
Networking Requirements
As shown in Figure 5-7, to limit the sending of ICMP redirection packets, S9300-A, S9300-B,
and S9300-C are required and these devices are connected through their GE interfaces.
Figure 5-7 Networking diagram for disabling the sending of ICMP redirection packets
S9300-A
VLANIF10
GE1/0/0
1.1.1.1/24
Internet
VLANIF10 VLANIF10
2.2.2.2/24 1.1.1.2/24
GE1/0/0 GE1/0/0
S9300-C S9300-B
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Assign IP addresses to VLANIF interfaces.
# Configure S9300-A.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] vlan 10
[S9300-A-Vlan10] quit
[S9300-A] interface gigabitethernet 1/0/0
[S9300-A-GigabitEthernet1/0/0] port hybrid tagged vlan 10
[S9300-A-GigabitEthernet1/0/0] quit
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] ip address 1.1.1.1 24
[S9300-A-Vlanif10] quit
# Configure S9300-B.
<Quidway> system-view
[Quidway] sysname S9300-B
[S9300-B] vlan 10
[S9300-B-Vlan10] quit
[S9300-B] interface gigabitethernet 1/0/0
[S9300-B-GigabitEthernet1/0/0] port hybrid tagged vlan 10
[S9300-B-GigabitEthernet1/0/0] quit
[S9300-B] interface vlanif 10
[S9300-B-Vlanif10] ip address 1.1.1.2 24
[S9300-B-Vlanif10] quit
# Configure S9300-C.
<Quidway> system-view
[Quidway] sysname S9300-C
[S9300-C] vlan 10
[S9300-C-Vlan10] quit
[S9300-C] interface gigabitethernet 1/0/0
[S9300-C-GigabitEthernet1/0/0] port hybrid tagged vlan 10
[S9300-C-GigabitEthernet1/0/0] quit
[S9300-C] interface vlanif 10
[S9300-C-Vlanif10] ip address 2.2.2.2 24
[S9300-C-Vlanif10] quit
# Configure S9300-A.
[S9300-A] ip route-static 2.2.2.0 255.255.255.0 1.1.1.2
# Configure S9300-B.
[S9300-B] ip route-static 2.2.2.0 255.255.255.0 1.1.1.1
# Run the ping command on S9300-A. You can view that S9300-B does not send host redirection
packets. No ICMP redirection packet is displayed in the output of the debugging command.
[S9300-A] ping 2.2.2.2
PING 2.2.2.2: 56 data bytes, press CTRL_C to break
Reply from 2.2.2.2: bytes=56 Sequence=1 ttl=255 time=3 ms
Reply from 2.2.2.2: bytes=56 Sequence=2 ttl=255 time=3 ms
Reply from 2.2.2.2: bytes=56 Sequence=3 ttl=255 time=3 ms
Reply from 2.2.2.2: bytes=56 Sequence=4 ttl=255 time=3 ms
Reply from 2.2.2.2: bytes=56 Sequence=5 ttl=255 time=3 ms
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10
#
interface vlanif 10
ip address 1.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid tagged vlan 10
#
ip route-static 2.2.2.0 255.255.255.0 1.1.1.2
#
return
Networking Requirements
As shown in Figure 5-8, to limit the sending of ICMP redirection packets, S9300-A, S9300-B,
and S9300-C are required and these devices are connected through their GE interfaces.
Figure 5-8 Networking diagram for disabling the sending of ICMP host unreachable packets
VLANIF11 VLANIF11
2.2.2.2/24 2.2.2.1/24
S9300-B
GE1/0/1 GE1/0/1
S9300-C GE1/0/0 VLANIF10
1.1.1.2/24
VLANIF10
GE1/0/0 1.1.1.1/24
S9300-A
Configuration Roadmap
The configuration roadmap is as follows:
1. Assign IP addresses to interfaces on S9300s.
2. Configure static routes to indirectly connected devices.
3. Enable the sending of ICMP host unreachable packets in the system view.
4. Enable the sending of ICMP host unreachable packets in the interface view.
NOTE
By default, the sending of ICMP host unreachable packets is enabled on the system view and on the
interface view. If the configuration is not changed, you can skip this configuration.
Data Preparation
To complete the configuration, you need the following data:
l Static routes to indirectly connected devices
l IP address of the interface
Procedure
Step 1 Configure S9300-A.
# Assign an IP address to VLANIF 10.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] vlan 10
[S9300-A-Vlan10] quit
[S9300-A] interface gigabitethernet 1/0/0
[S9300-A-GigabitEthernet1/0/0] port hybrid tagged vlan 10
[S9300-A-GigabitEthernet1/0/0] quit
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] ip address 1.1.1.1 24
[S9300-A-Vlanif10] quit
# Run the ping 2.2.2.3 command on S9300-A. According to the received packet captured by the
tester on S9300-A, S9300-B sends host unreachable packets.
[S9300-A] ping 2.2.2.3
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan 10
#
interface vlanif 10
Networking Requirements
As shown in Figure 5-9, a policy-based route named aaa is defined. All TCP packets sent from
S9300A are sent through VLANIF 11, whereas other packets are still forwarded according to
the routing table. S9300A is directly connected to S9300B and S9300C. The route between
S9300B and S9300C is unreachable.
Figure 5-9 Networking diagram for configuring PBR based on the protocol type
GE1/0/0 GE1/0/0 S9300 B
VLANIF11 VLANIF11
1.1.2.1/24 1.1.2.2/24
Internet
GE2/0/0 GE2/0/0
VLANIF12 VLANIF12
1.1.3.1/24 1.1.3.2/24
S9300 A S9300 C
Configuration Roadmap
The configuration roadmap is as follows:
1. Define an ACL.
2. Define matching rules and actions for PBR.
3. Enable local PBR.
Data Preparation
To complete the configuration, you need the following data:
l ACL rules and numbers
l Name of the policy-based route
l outgoing interface or next hop address used when actions defined in the policy-based route
are performed
Procedure
Step 1 Configure S9300A.
# Create a VLAN and add interfaces to the VLAN.
<Quidway> system-view
[Quidway] sysname S9300A
[S9300A] vlan batch 11 12
[S9300A] interface vlanif 11
[S9300A-Vlanif11] ip address 1.1.2.1 255.255.255.0
[S9300A-Vlanif11] quit
[S9300A] interface gigabitethernet 1/0/0
[S9300A-GigabitEthernet1/0/0] port hybrid tagged vlan 11
[S9300A-GigabitEthernet1/0/0] quit
[S9300A] interface vlanif 12
[S9300A-Vlanif12] ip address 1.1.3.1 255.255.255.0
[S9300A-Vlanif12] quit
[S9300A] interface gigabitethernet 2/0/0
[S9300A-GigabitEthernet2/0/0] port hybrid tagged vlan 12
[S9300A-GigabitEthernet2/0/0] quit
# Define an ACL, and use ACL 3001 to match TCP packets and ACL 3002 to match IP packets.
# Define node 5 so that TCP packets are sent to the next hop 1.1.2.2.
[S9300A] policy-based-route aaa permit node 5
[S9300A-policy-based-route-aaa-5] if-match acl 3001
[S9300A-policy-based-route-aaa-5] apply ip-address next-hop 1.1.2.2
[S9300A-policy-based-route-aaa-5] quit
# Define node 10 so that other IP packets are not forwarded through the policy-based route.
[S9300A] policy-based-route aaa deny node 10
[S9300A-policy-based-route-aaa-10] if-match acl 3002
[S9300A-policy-based-route-aaa-10] quit
Info: The max number of VTY users is 20, and the number
of current VTY users on line is 1.
<S9300B>
# Establish a Telnet connection with S9300C (1.1.3.2/24) on S9300A, and the connection fails.
<S9300A> telnet 1.1.3.2
Trying 1.1.3.2 ...
Press CTRL+K to abort
Error: Failed to connect to the remote host.
TCP is used for establishing a Telnet connection. The preceding results indicate that all the TCP
packets are forwarded to the next hop 1.1.2.2, and PBR is set successfully.
----End
Configuration Files
l Configuration file of S9300A
#
sysname S9300A
#
vlan batch 11 to 12
#
acl number 3001
rule 5 permit tcp
#
acl number 3002
rule 5 permit ip
#
interface Vlanif11
ip address 1.1.2.1 255.255.255.0
#
interface Vlanif12
ip address 1.1.3.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid tagged vlan 11
#
interface GigabitEthernet2/0/0
port hybrid tagged vlan 12
#
ip local policy-based-route aaa
#
policy-based-route aaa permit node 5
if-match acl 3001
apply ip-address next-hop 1.1.2.2
policy-based-route aaa deny node 10
if-match acl 3002
#
return
Networking Requirements
As shown in Figure 5-10, PBR is used on S9300A.
l Set the next hop address 150.1.1.2 for packets of 64 to 1400 bytes.
l Set the next hop address 151.1.1.2 for packets of 1401 to 1500 bytes.
l Other packets are forwarded according to the destination address.
Figure 5-10 Networking diagram for configuring PBR based on the packet length
64-1400bytes
VLANIF11 VLANIF11
151.1.1.1/24 151.1.1.2/24
1401-1500bytes LoopBack0
10.1.1.1/24
Configuration Roadmap
The configuration roadmap is as follows:
1. Assign an IP address to each interface.
2. Configure the dynamic routing protocol. Here, the Routing Information Protocol (RIP) is
used.
3. Configure PBR, including matching rules and actions.
Data Preparation
To complete the configuration, you need the following data:
l IP address and subnet mask of the interface
l Network segment used by the dynamic routing protocol
l Packet length in matching rules of PBR, and next hop or outgoing interface when actions
are performed
Procedure
Step 1 Configure S9300A.
# Configure RIP.
[S9300A] rip
[S9300A-rip-1] network 150.1.0.0
[S9300A-rip-1] network 151.1.0.0
[S9300A-rip-1] quit
# Enable PBR.
[S9300A] ip local policy-based-route policy1
# Ping Loopback 0 of S9300B from S9300A and set the data length of packets to 80 bytes.
C:\> ping -l 80 10.1.1.1
Pinging 10.1.1.1 with 80 bytes of data:
# According to the preceding information about PBR, S9300A sends the received packets
through VLANIF 10 according to the next hop 150.1.1.2 determined by the policy-based route.
# Ping Loopback 0 of S9300B from S9300A and set the data length of packets to 1450 bytes.
C:\> ping -l 1450 10.1.1.1
Pinging 10.1.1.1 with 1450 bytes of data:
# According to the preceding information about PBR, S9300A sends the received packets
through VLANIF 11 according to the next hop 151.1.1.2 determined by the policy-based route.
----End
Configuration Files
l Configuration file of S9300A
#
sysname S9300A
#
ip local policy-based-route policy1
#
vlan batch 10 to 11
#
interface Vlanif10
ip address 150.1.1.1 255.255.255.0
#
interface Vlanif11
ip address 151.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid tagged vlan 10
#
interface GigabitEthernet1/0/2
port hybrid tagged vlan 11
#
rip 1
network 150.1.0.0
network 151.1.0.0
#
policy-based-route policy1 permit node 10
if-match packet-length 64 1400
apply ip-address next-hop 150.1.1.2
policy-based-route lab1 permit node 20
if-match packet-length 1401 1500
apply ip-address next-hop 151.1.1.2
#
return
Networking Requirements
As shown in Figure 5-11, the IP address of VLANIF 100 on the S9300 is 10.110.1.1/16; the IP
address of the NetBIOS-NS name server is 10.2.1.1/16. The S9300 and the NetBIOS-NS name
server are on different network segments, but the route between the S9300 and the NetBIOS-
NS name server is reachable.
The S9300 is configured to forward broadcast packets with the destination UDP port number as
137 and the destination IP address as 255.255.255.255 and broadcast packets with the the
destination IP address as 10.110.255.255 to the NetBIOS-NS name server.
When receiving broadcast packets of NetBIOS-NS Register, the S9300 changes the packets
whose destination IP address is the IP address of the NetBIOS-NS name server. Then, the
S9300 forwards the packets to the specified NetBIOS-NS name server.
Internet
NETBIOS-NS
Name Server
S9300 10.2.1.1/16
VLANIF100
10.110.1.1/16
PC1 PC2
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l VLANIF interface of the destination server to which packets of UDP ports are forwarded
l IP address of the destination server
Procedure
Step 1 Enable the UDP helper function.
<Quidway> system-view
[Quidway] udp-helper enable
Step 2 Configure the destination server to which packets of UDP ports are forwarded.
[Quidway] vlan 100
[Quidway-Vlan100] quit
[Quidway] interface vlanif 100
[Quidway-Vlanif100] ip address 10.110.1.1 16
[Quidway-Vlanif100] udp-helper server 10.2.1.1
[Quidway-Vlanif100] quit
[Quidway] quit
----End
Configuration Files
Configuration file of the S9300
#
sysname Quidway
#
vlan batch 100
#
udp-helper enable
#
interface Vlanif100
ip address 10.110.1.1 255.255.0.0
udp-helper server 10.2.1.1
#
return
Networking Requirements
Hosts in different network segments are connected through several S9300s. You are required to
configure static routes enable each two hosts in different network segments to communicate with
each other.
GE1/0/3
GE1/0/1 GE1/0/2
S9300-B
S9300-A S9300-C
GE1/0/1 GE1/0/1
GE1/0/2 GE1/0/2
PC1 PC3
1.1.1.2/24 1.1.3.2/24
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l IDs of the VLANs that the interfaces belong to, as shown in Figure 5-12
l VLANIF interfaces and the IP addresses of the hosts, as shown in Figure 5-12
l Default route of S9300-A, whose next hop address is 1.1.4.2
l Static route of S9300-B, whose destination address is 1.1.1.0, and the next hop address is
1.1.4.1
l Static route of S9300-B, whose destination address is 1.1.3.0, and the next hop address is
1.1.4.6
l Default route of S9300-C, whose next hop address is 1.1.4.5
Procedure
Step 1 Configure VLANs that interfaces belong to.
<Quidway>system-view
[Quidway]sysname S9300-A
[S9300-A]vlan 10
[S9300-A-vlan10]quit
[S9300-A]vlan 30
[S9300-A-vlan30]quit
[S9300-A]interface GigabitEthernet 1/0/1
[S9300-A-GigabitEthernet1/0/1]port hybrid pvid vlan 10
[S9300-A-GigabitEthernet1/0/1]port hybrid untagged vlan 10
[S9300-A-GigabitEthernet1/0/1]quit
[S9300-A]interface GigabitEthernet 1/0/2
[S9300-A-GigabitEthernet1/0/1]port link-type access
[S9300-A-GigabitEthernet1/0/1]port default vlan 30
[S9300-A-GigabitEthernet1/0/1]quit
The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A, and
are not mentioned here.
The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A, and
are not mentioned here.
Configure the default gateway addresses of PC1, PC2, and PC3 to 1.1.1.1, 1.1.2.1, and 1.1.3.1
respectively.
1 1.1.4.2 31 ms 32 ms 31 ms
2 1.1.4.6 62 ms 63 ms 62 ms
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10 30
#
interface Vlanif10
ip address 1.1.4.1 255.255.255.252
#
interface Vlanif30
ip address 1.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet1/0/2
port link-type access
port default vlan 30
#
ip route-static 0.0.0.0 0.0.0.0 1.1.4.2
#
return
#
interface Vlanif20
ip address 1.1.4.6 255.255.255.252
#
interface Vlanif40
ip address 1.1.3.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface GigabitEthernet1/0/2
port link-type acess
port default vlan 50
#
ip route-static 0.0.0.0 0.0.0.0 1.1.4.5
#
return
Networking Requirements
As shown in Figure 5-13, S9300-A is connected to the network management system (NMS)
through S9300-B. You need to configure static routes on S9300-A so that S9300-A can
communicate with the NMS. In addition, configure a BFD session between S9300-A and
S9300-B to detect link failure.
Figure 5-13 Networking diagram for configuring BFD for static routes
GE1/0/1 GE1/0/2
GE1/0/1 2.2.2.1/24
S9300-A S9300-B NMS
Configuration Roadmap
The configuration roadmap is as follows:
1. Create a BFD session on S9300-A and S9300-B to detect the link between S9300-A and
S9300-B.
2. Configure a static route from S9300-A to the NMS and bind the static route to the BFD
session.
Data Preparation
To complete the configuration, you need the following data:
l IDs of the VLANs that the interfaces belong to, as shown in Figure 5-13
l VLANIF interfaces and the IP address of the NMS, as shown in Figure 5-13
l Peer IP address of the BFD session
l Local discriminator and remote discriminator of the BFD session
l Static route from S9300-A to the NMS
Procedure
Step 1 Create VLANs and add corresponding interfaces to the VLANs.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] vlan 10
[S9300-A-vlan10] quit
[S9300-A] interface GigabitEthernet 1/0/1
[S9300-A-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[S9300-A-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[S9300-A-GigabitEthernet1/0/1] quit
The configuration on S9300-B is similar to the configuration of S9300-A, and is not mentioned
here.
Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] ip address 1.1.1.1 24
[S9300-A-Vlanif10] quit
The configuration on S9300-B is similar to the configuration on S9300-A and is not mentioned
here.
Step 3 Create a BFD session between S9300-A and S9300-B.
# On S9300-A, create a BFD session with S9300-B.
<S9300-A> system-view
[S9300-A] bfd
[S9300-A-bfd] quit
[S9300-A] bfd aa bind peer-ip 1.1.1.2
[S9300-A-bfd-session-aa] discriminator local 10
[S9300-A-bfd-session-aa] discriminator remote 20
[S9300-A-bfd-session-aa] commit
[S9300-A-bfd-session-aa] quit
Step 4 Configure a static route and bind the route to the BFD session.
# On S9300-A, configure a default static route to the external network and bind the default static
route to the BFD session named aa.
[S9300-A]ip route-static 2.2.2.1 24 1.1.1.2 track bfd-session aa
[S9300-A]quit
# After the configuration is complete, run the display bfd session all command on S9300-A and
S9300-B, and you can find that the BFD session is set up and its status is Up.
Take S9300-A for example. The display is as follows:
<S9300-A> display bfd session all
--------------------------------------------------------------------------------
LocalRemote PeerIPAddressInterface NameStateType
--------------------------------------------------------------------------------
10201.1.1.2--UpS_IP
--------------------------------------------------------------------------------
Total UP/DOWN Session Number : 1/0
# Check the IP routing table on S9300-A, and you can find that the static route exists in the
routing table.
<S9300-A> display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 6 Routes : 6
# The following debugging information is displayed on S9300-A, indicating that BFD detects
a link fault.
<S9300-A>
*0.27708400 S9300-A RM/3/RMDEBUG:
RM_USR_BFDRefreshRT_H:
BfdSessionID = 10
BfdEvent = 0X0
USR : UsrDbID = 0X6, DestAdd = 0X0, Mask = 0X0, NextHop = 0X1010102
URT : TableID = 0X1, EntryID = 0XB, ProcID = 0X2, FLAG = 0X8114000
# Check the routing table on S9300-A, and you can find that default route 2.2.2.0/24 does not
exist. The reason is that the default static route is bound to a BFD session, and BFD immediately
notifies that the bound static route is unavailable when a fault is detected.
<S9300-A> display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 5 Routes : 5
# Run the undo shutdown command on VLANIF 10 of S9300-B to simulate link recovery.
[S9300-B-Vlanif10]undo shutdown
# Check the routing table on S9300-A, and you can find default route 2.2.2.0/24 in the routing
table. After BFD detects link recovery, it immediately notifies that the bound static route is
reachable.
<S9300-A> display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 6 Routes : 6
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10
#
bfd
#
interface Vlanif10
ip address 1.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
bfd aa bind peer-ip 1.1.1.2
discriminator local 10
discriminator remote 20
commit
#
ip route-static 2.2.2.0 255.255.255.0 1.1.1.2 track bfd-session aa
#
return
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
bfd bb bind peer-ip 1.1.1.1
discriminator local 20
discriminator remote 10
commit
#
return
Networking Requirements
As shown in Figure 5-14, RIP needs to be enabled on all the interfaces of S9300-A, S9300-B,
S9300-C, and S9300-D. The S9300s are interconnected through RIPv2.
S9300-C
GE1/0/1
GE1/0/1
GE1/0/0 GE1/0/2
GE1/0/0 GE1/0/2
S9300-A S9300-B S9300-D
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l IDs of the VLANs that the interfaces belong to, as shown in Figure 5-14
l IP addresses of VLANIF interfaces, as shown in Figure 5-14
l RIP version on the S9300s, namely, RIPv2
Procedure
Step 1 Configure VLANs that the related interfaces belong to.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] vlan 10
S9300-A-vlan10] quit
[S9300-A] interface GigabitEthernet 1/0/0
[S9300-A-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[S9300-A-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[S9300-A-GigabitEthernet1/0/0] quit
The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of
S9300-A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] ip address 192.168.1.1 24
[S9300-A-Vlanif10] quit
The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of
S9300-A, and are not mentioned here.
Step 3 Configure the basic RIP functions.
Configure S9300-A.
[S9300-A] rip
[S9300-A-rip-1] network 192.168.1.0
[S9300-A-rip-1] quit
Configure S9300-B.
[S9300-B] rip
[S9300-B-rip-1] network 192.168.1.0
[S9300-B-rip-1] network 172.16.0.0
[S9300-B-rip-1] network 10.0.0.0
[S9300-B-rip-1] quit
Configure S9300-C.
[S9300-C] rip
[S9300-C-rip-1] network 172.16.0.0
[S9300-C-rip-1] quit
Configure S9300-D.
[S9300-D] rip
[S9300-D-rip-1] network 10.0.0.0
[S9300-D-rip-1] quit
From the routing table, you can find that the routes advertised by RIPv1 use natural masks.
Step 4 Configure the RIP version.
# Configure RIPv2 on S9300-A.
[S9300-A] rip
[S9300-A-rip-1] version 2
[S9300-A-rip-1] quit
From the routing table, you can find that the routes advertised by RIPv2 contain more accurate
subnet masks.
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan 10
#
interface Vlanif10
ip address 192.168.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
rip 1
version 2
network 192.168.1.0
#
return
l Configuration file of S9300-B
#
sysname S9300-B
#
vlan batch 10 20 30
#
interface Vlanif10
ip address 192.168.1.2 255.255.255.0
#
interface Vlanif20
ip address 172.16.1.1 255.255.255.0
#
interface Vlanif30
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
rip 1
version 2
network 192.168.1.0
network 172.16.0.0
network 10.0.0.0
#
return
l Configuration file of S9300-C
#
sysname S9300-C
#
vlan batch 20
#
interface Vlanif20
ip address 172.16.1.2 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
rip 1
version 2
network 172.16.0.0
#
return
l Configuration file of S9300-D
#
sysname S9300-D
#
vlan batch 30
#
interface Vlanif30
ip address 10.1.1.2 255.255.255.0
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
rip 1
version 2
network 10.0.0.0
#
return
Networking Requirements
As shown in Figure 5-15, two RIP processes, RIP100 and RIP200, run on S9300-B. S9300-B
exchanges routing information with S9300-A through RIP100 and exchanges routing
information with S9300-C through RIP200.
You must configure route import on S9300-B so that the two RIP processes can import RIP
routes of each other. By default, the metric of the imported routes of RIP200 is set to 3. In
addition, you must configure a filtering policy on S9300-B. Thus, S9300-B can filter out a route
imported from RIP200 (route to 192.168.4.0/24) and does not advertise the route to S9300-A.
GE2/0/0 GE1/0/2
GE1/0/0 GE1/0/1
GE1/0/0 GE1 /0/1
GE1/0/3
S9300-A S9300-B S9300-C
RIP 100 RIP 200
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable RIP100 and RIP200 on S9300 and specify the network segment.
2. Configure S9300-B to import routes of a RIP process into the routing table of the other RIP
process, and set the default metric of the routes imported from RIP200 to 3.
3. Configure an ACL on S9300-B to filter the routes imported from RIP200.
Data Preparation
To complete the configuration, you need the following data:
l IDs of the VLANs that the interfaces belong to, as shown in Figure 5-15
l IP addresses of VLANIF interfaces, as shown in Figure 5-15
l RIP100 enabled network segments on S9300-A: 192.168.1.0 and 192.168.1.0
l Network segments with RIP100 and RIP200 enabled on S9300-B: 192.168.1.0 and
192.168.2.0.
l RIP200 enabled network segments on S9300-C: 192.168.2.0, 192.168.3.0, and 192.168.4.0
l Default metric of routes that are imported to RIP100 from RIP200: 3
l ACL 2000 for the routes that are imported to RIP100 from RIP200, which denies the routes
of network segment 192.168.4.0
Procedure
Step 1 Configure VLANs that the related interfaces belong to.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] vlan 10
[S9300-A-Vlan10] quit
[S9300-A] interface GigabitEthernet 1/0/0
[S9300-A-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[S9300-A-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[S9300-A-GigabitEthernet1/0/0] quit
[S9300-A] vlan 50
[S9300-A-Vlans0] quit
[S9300-A]interface GigabitEthernet 2/0/0
[S9300-A-GigabitEthernet2/0/0] port hybrid pvid vlan 50
[S9300-A-GigabitEthernet2/0/0] port hybrid untaged vlan 50
[S9300-A-GigabitEthernet2/0/0] quit
The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A, and
are not mentioned here.
The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A, and
are not mentioned here.
# View the routing table of S9300-A after the routes are imported.
[S9300-A] display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 10 Routes : 10
# Configure S9300-B to filter the route to 192.168.4.0/24 that is imported from RIP200 according
to the ACL rule.
[S9300-B] rip 100
[S9300-B-rip-100] filter-policy 2000 export
[S9300-B-rip-1] quit
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10 50
#
interface Vlanif50
ip address 192.168.0.1 255.255.255.0
#
interface Vlanif10
ip address 192.168.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
#
rip 100
network 192.168.0.0
network 192.168.1.0
#
return
l Configuration file of S9300-B
#
sysname S9300-B
#
vlan batch 10 20
#
acl number 2000
rule 5 deny source 192.168.4.0 0.0.0.255
rule 10 permit
#
interface Vlanif10
ip address 192.168.1.2 255.255.255.0
#
interface Vlanif20
ip address 192.168.2.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 20
#
rip 100
default-cost 3
network 192.168.1.0
filter-policy 2000 export
import-route rip 200
#
rip 200
network 192.168.2.0
import-route rip 100
#
return
l Configuration file of S9300-C
#
sysname S9300-C
#
vlan batch 20 30 40
#
interface Vlanif30
ip address 192.168.3.1 255.255.255.0
#
interface Vlanif40
ip address 192.168.4.1 255.255.255.0
#
interface Vlanif20
ip address 192.168.2.2 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
interface GigabitEthernet1/0/3
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
rip 200
network 192.168.2.0
network 192.168.3.0
network 192.168.4.0
#
return
Networking Requirements
As shown in Figure 5-16, all S9300s run OSPF, and the entire AS is partitioned into three areas.
S9300-A and S9300-B function as ABRs to forward routes between areas.
You must ensure that every S9300 can learn the routes to all network segments in the AS.
Figure 5-16 Networking diagram for configuring the basic OSPF functions
S9300-A S9300-B
Area 0
GE1/0/1
GE1/0/2 GE1/0/1 GE1/0/2
S9300-D
S9300-C
GE1/0/1 GE1/0/1
Area 1 Area 2
GE1/0/2 GE1/0/2
GE1/0/1 GE1/0/1
S9300-E S9300-F
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
l ID of the VLAN that each interface belongs to, as shown in Figure 5-16
l IP address of each VLANIF interface, as shown in Figure 5-16
l Router ID and OSPF process ID of each S9300 and the area that each interface belongs to:
– On S9300-A, the router ID is 1.1.1.1; the OSPF process ID is 1; the network segment
of Area 0 is 192.168.0.0/24; the network segment of Area 1 is 192.168.1.0/24.
– On S9300-B, the router ID is 2.2.2.2; the OSPF process ID is 1; the network segment
of Area 0 is 192.168.0.0/24; the network segment of Area 2 is 192.168.2.0/24.
– On S9300-C, the router ID is 3.3.3.3; the OSPF process ID is 1; the network segments
of Area 1 are 192.168.1.0/24 and 172.16.1.0/24.
– On S9300-D, the router ID is 4.4.4.4; the OSPF process ID is 1; the network segments
of Area 2 are 192.168.2.0/24 and 172.17.1.0/24.
– On S9300-E, the router ID is 5.5.5.5; the OSPF process ID is 1; the network segment
of Area 1 is 172.16.1.0/24.
– On S9300-F, the router ID is 6.6.6.6; the OSPF process ID is 1; the network segment
of Area 2 is 172.17.1.0/24.
Procedure
Step 1 Configure VLANs that the related interfaces belong to.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] vlan batch 10 20
[S9300-A] interface gigabitEthernet 1/0/1
[S9300-A-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[S9300-A-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[S9300-A-GigabitEthernet1/0/1] quit
[S9300-A] interface gigabitEthernet 1/0/2
[S9300-A-GigabitEthernet1/0/2] port hybrid pvid vlan 20
[S9300-A-GigabitEthernet1/0/2] port hybrid untagged vlan 20
[S9300-A-GigabitEthernet1/0/2] quit
The configurations of S9300-B, S9300-C, S9300-E, and S9300-F are similar to the configuration
of S9300-A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] ip address 192.168.0.1 24
[S9300-A-Vlanif10] quit
[S9300-A] interface vlanif 20
[S9300-A-Vlanif20] ip address 192.168.1.1 24
[S9300-A-Vlanif20] quit
The configurations on S9300-B, S9300-C, S9300-E, and S9300-F are similar to the configuration
of S9300-A, and are not mentioned here.
Step 3 Configure the basic OSPF functions.
# Configure S9300-A.
[S9300-A] router id 1.1.1.1
[S9300-A] ospf
[S9300-A-ospf-1] area 0
[S9300-A-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.0.255
[S9300-A-ospf-1-area-0.0.0.0] quit
[S9300-A-ospf-1] area 1
[S9300-A-ospf-1-area-0.0.0.1] network 192.168.1.0 0.0.0.255
[S9300-A-ospf-1-area-0.0.0.1] quit
[S9300-A-ospf-1] quit
# Configure S9300-B.
[S9300-B] router id 2.2.2.2
[S9300-B] ospf
[S9300-B-ospf-1] area 0
[S9300-B-ospf-1-area-0.0.0.0] network 192.168.0.0 0.0.0.255
[S9300-B-ospf-1-area-0.0.0.0] quit
[S9300-B-ospf-1] area 2
[S9300-B-ospf-1-area-0.0.0.2] network 192.168.2.0 0.0.0.255
[S9300-B-ospf-1-area-0.0.0.2] quit
[S9300-B-ospf-1] quit
# Configure S9300-C.
[S9300-C] router id 3.3.3.3
[S9300-C] ospf
[S9300-C-ospf-1] area 1
[S9300-C-ospf-1-area-0.0.0.1] network 192.168.1.0 0.0.0.255
[S9300-C-ospf-1-area-0.0.0.1] network 172.16.1.0 0.0.0.255
[S9300-C-ospf-1-area-0.0.0.1] quit
[S9300-C-ospf-1] quit
# Configure S9300-D.
[S9300-D] router id 4.4.4.4
[S9300-D] ospf
[S9300-D-ospf-1] area 2
[S9300-D-ospf-1-area-0.0.0.2] network 192.168.2.0 0.0.0.255
[S9300-D-ospf-1-area-0.0.0.2] network 172.17.1.0 0.0.0.255
[S9300-D-ospf-1-area-0.0.0.2] quit
[S9300-D-ospf-1] quit
# Configure S9300-E.
[S9300-E] router id 5.5.5.5
[S9300-E] ospf
[S9300-E-ospf-1] area 1
[S9300-E-ospf-1-area-0.0.0.1] network 172.16.1.0 0.0.0.255
[S9300-E-ospf-1-area-0.0.0.1] quit
[S9300-E-ospf-1] quit
# Configure S9300-F.
[S9300-F] router id 6.6.6.6
[S9300-F] ospf
[S9300-F-ospf-1] area 2
[S9300-F-ospf-1-area-0.0.0.2] network 172.17.1.0 0.0.0.255
[S9300-F-ospf-1-area-0.0.0.2] quit
[S9300-F-ospf-1] quit
Neighbors
Total Nets: 5
Intra Area: 3 Inter Area: 2 ASE: 0 NSSA: 0
Area: 0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 2.2.2.2 2.2.2.2 317 48 80000003 1
Router 1.1.1.1 1.1.1.1 316 48 80000002 1
Network 192.168.0.1 1.1.1.1 316 32 80000001 0
Sum-Net 172.16.1.0 1.1.1.1 250 28 80000001 2
Sum-Net 172.17.1.0 2.2.2.2 203 28 80000001 2
Sum-Net 192.168.2.0 2.2.2.2 237 28 80000002 1
Sum-Net 192.168.1.0 1.1.1.1 295 28 80000002 1
Area: 0.0.0.1
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 192.168.1.2 192.168.1.2 188 48 80000002 1
Router 5.5.5.5 5.5.5.5 214 36 80000004 1
Router 3.3.3.3 3.3.3.3 217 60 80000008 1
Router 1.1.1.1 1.1.1.1 289 48 80000002 1
Network 172.16.1.1 3.3.3.3 670 32 80000001 0
Sum-Net 172.17.1.0 1.1.1.1 202 28 80000001 3
Sum-Net 192.168.2.0 1.1.1.1 242 28 80000001 2
Sum-Net 192.168.0.0 1.1.1.1 300 28 80000001 1
# View the routing table of S9300-D and run the ping command to check the network
connectivity.
[S9300-D] display ospf routing
Total Nets: 5
Intra Area: 2 Inter Area: 3 ASE: 0 NSSA: 0
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
router id 1.1.1.1
#
vlan batch 10 20
#
interface Vlanif10
ip address 192.168.0.1 255.255.255.0
#
interface Vlanif20
ip address 192.168.1.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet1/0/2
#
return
Networking Requirements
As shown in Figure 5-17, OSPF is enabled on all S9300s and the AS is divided into three areas.
S9300-A and S9300-B function as ABRs to forward routes between areas; S9300-D functions
as the ASBR to import external routes, that is, static routes.
You need to configure Area 1 as a stub area. The LSAs advertised to this area can thus be reduced,
without affecting the route reachability.
S9300-D
S9300-C
GE1/0/1 GE1/0/1
Area 1 Area 2
GE1/0/2 GE1/0/2
GE1/0/1 GE1/0/1
S9300-E S9300-F
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable OSPF on each S9300 and configure the basic OSPF functions.
2. Configure static routes on S9300-D and import them into OSPF.
3. Configure Area 1 as a stub area by running the stub command on all S9300s in Area 1.
4. Configure S9300-A not to advertise Type 3 LSAs to the stub area.
Data Preparation
To complete the configuration, you need the following data:
l ID of the VLAN that each interface belongs to, as shown in Figure 5-17
l IP address of each VLANIF interface, as shown in Figure 5-17
l Router ID and OSPF process ID of each S9300 and area that each interface belongs to:
– On S9300-A, the router ID is 1.1.1.1; the OSPF process ID is 1; the network segment
of Area 0 is 192.168.0.0/24, the network segment of Area 1 is 192.168.1.0/24.
– On S9300-B, the router ID is 2.2.2.2; the OSPF process ID is 1; the network segment
of Area 0 is 192.168.0.0/24; the network segment of Area 2 is 192.168.2.0/24.
– On S9300-C, the router ID is 3.3.3.3; the OSPF process ID is 1; the network segments
of Area 1 are 192.168.1.0/24 and 172.16.1.0/24.
– On S9300-D, the router ID is 4.4.4.4; the OSPF process ID is 1; the network segments
of Area 2 are 192.168.2.0/24 and 172.17.1.0/24.
– On S9300-E, the router ID is 5.5.5.5; the OSPF process ID is 1; the network segment
of Area 1 is 172.16.1.0/24.
– On S9300-F, the router ID is 6.6.6.6; the OSPF process ID is 1; the network segment
of Area 2 is 172.17.1.0/24.
Procedure
Step 1 Configure the basic OSPF functions. See Configuring Basic OSPF Functions.
Step 2 Configure S9300-D to import static routes.
# Import static routes on S9300-D.
[S9300-D] ip route-static 200.0.0.0 8 null 0
[S9300-D] ospf
[S9300-D-ospf-1] import-route static type 1
[S9300-D-ospf-1] quit
Total Nets: 6
Intra Area: 2 Inter Area: 3 ASE: 1 NSSA: 0
If S9300-C resides in a common area, you can find AS external routes in the routing table.
Step 3 Configure Area 1 as a stub area.
# Configure S9300-A.
[S9300-A] ospf
[S9300-A-ospf-1] area 1
[S9300-A-ospf-1-area-0.0.0.1] stub
[S9300-A-ospf-1-area-0.0.0.1] quit
[S9300-A-ospf-1] quit
# Configure S9300-C.
[S9300-C] ospf
[S9300-C-ospf-1] area 1
[S9300-C-ospf-1-area-0.0.0.1] stub
[S9300-C-ospf-1-area-0.0.0.1] quit
[S9300-C-ospf-1] quit
# Configure S9300-E.
[S9300-E] ospf
[S9300-E-ospf-1] area 1
[S9300-E-ospf-1-area-0.0.0.1] stub
[S9300-E-ospf-1-area-0.0.0.1] quit
[S9300-E-ospf-1] quit
Total Nets: 6
Intra Area: 2 Inter Area: 4 ASE: 0 NSSA: 0
When the area where S9300-C resides is configured as a stub area, you cannot find the AS
external route but a default route out of the AS.
# Disable S9300-A from advertising Type 3 LSAs to the stub area.
[S9300-A] ospf
[S9300-A-ospf-1] area 1
[S9300-A-ospf-1-area-0.0.0.1] stub no-summary
[S9300-A-ospf-1-area-0.0.0.1] quit
[S9300-A-ospf-1] quit
Total Nets: 3
Intra Area: 2 Inter Area: 1 ASE: 0 NSSA: 0
After the advertisement of summary LSA to the stub area is disabled, the route entries are further
reduced. External routes are not found in the routing table. Instead, there is a default route out
of the AS.
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
router id 1.1.1.1
#
vlan batch 10 20
#
interface Vlanif10
ip address 192.168.0.1 255.255.255.0
#
interface Vlanif20
ip address 192.168.1.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
ospf 1
area 0.0.0.0
network 192.168.0.0 0.0.0.255
area 0.0.0.1
network 192.168.1.0 0.0.0.255
stub no-summary
#
return
NOTE
Configuration files of S9300-B and S9300-F are similar to the configuration file of S9300-A, and
are not mentioned here.
l Configuration file of S9300-C
#
sysname S9300-C
#
router id 3.3.3.3
#
vlan batch 20 40
#
interface Vlanif20
ip address 192.168.1.2 255.255.255.0
#
interface Vlanif40
ip address 172.16.1.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
ospf 1
area 0.0.0.1
network 192.168.1.0 0.0.0.255
network 172.16.1.0 0.0.0.255
stub
#
return
l Configuration file of S9300-D
#
sysname S9300-D
#
vlan batch 30 50
#
router id 4.4.4.4
#
interface Vlanif30
ip address 192.168.2.2 255.255.255.0
#
interface Vlanif50
ip address 172.17.1.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
ospf 1
import-route static type 1
area 0.0.0.2
network 192.168.2.0 0.0.0.255
network 172.17.1.0 0.0.0.255
#
ip route-static 200.0.0.0 255.0.0.0 NULL0
#
return
l Configuration file of S9300-E
#
sysname S9300-E
#
router id 5.5.5.5
#
vlan batch 40
#
interface Vlanif40
ip address 172.16.1.2 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
ospf 1
area 0.0.0.1
network 172.16.1.0 0.0.0.255
stub
#
return
Networking Requirements
As shown in Figure 5-18, OSPF is enabled on all S9300s and the AS is divided into three areas.
S9300-A and S9300-B function as ABRs to forward routes between areas; S9300-D functions
as the ASBR to import external routes, that is, static routes.
You need to configure Area 1 as an NSSA area and configure Figure 5-18-C as an ASBR to
import external routes (static routes). The routing information can be transmitted correctly in
the AS.
S9300-D
S9300-C
GE1/0/1 GE1/0/1
Area 1 Area 2
GE1/0/2 GE1/0/2
GE1/0/1 GE1/0/1
S9300-E S9300-F
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable OSPF on each S9300 and configure the basic OSPF functions.
2. Configure static routes on S9300-D and import them into OSPF.
3. Configure Area 1 as an NSSA area and check the OSPF routing information of S9300-C.
You must run the nssa command on all the devices in Area 1.
4. Configure static routes on S9300-C, import them into OSPF, and check the OSPF routing
information of S9300-D.
Data Preparation
To complete the configuration, you need the following data:
l ID of the VLAN that each interface belongs to, as shown in Figure 5-18
l IP address of each VLANIF interface, as shown in Figure 5-18
l Router ID and OSPF process ID of each S9300 and the area that each interface belongs to:
– On S9300-A, the router ID is 1.1.1.1; the OSPF process ID is 1; the network segment
of Area 0 is 192.168.0.0/24, and the network segment of Area 1 is 192.168.1.0/24.
– On S9300-B, the router ID is 2.2.2.2; the OSPF process ID is 1; the network segment
of Area 0 is 192.168.0.0/24; the network segment of Area 2 is 192.168.2.0/24.
– On S9300-C, the router ID is 3.3.3.3; the OSPF process ID is 1; the network segments
of Area 1 are 192.168.1.0/24 and 172.16.1.0/24.
– On S9300-D, the router ID is 4.4.4.4; the OSPF process ID is 1; the network segments
of Area 2 are 192.168.2.0/24 and 172.17.1.0/24.
– On S9300-E, the router ID is 5.5.5.5; the OSPF process ID is 1; the network segment
of Area 1 is 172.16.1.0/24.
– On S9300-F, the router ID is 6.6.6.6; the OSPF process ID is 1; the network segment
of Area 2 is 172.17.1.0/24.
Procedure
Step 1 Configure the basic OSPF functions. See Configuring Basic OSPF Functions.
Step 2 Configure S9300-D to import static routes. See Example for Configuring an OSPF Stub
Area.
Step 3 Configure Area 1 as an NSSA area.
# Configure S9300-A.
[S9300-A] ospf
[S9300-A-ospf-1] area 1
[S9300-A-ospf-1-area-0.0.0.1] nssa default-route-advertise no-summary
[S9300-A-ospf-1-area-0.0.0.1] quit
[S9300-A-ospf-1] quit
# Configure S9300-C.
[S9300-C] ospf
[S9300-C-ospf-1] area 1
[S9300-C-ospf-1-area-0.0.0.1] nssa
[S9300-C-ospf-1-area-0.0.0.1] quit
[S9300-C-ospf-1] quit
# Configure S9300-E.
[S9300-E] ospf
[S9300-E-ospf-1] area 1
[S9300-E-ospf-1-area-0.0.0.1] nssa
[S9300-E-ospf-1-area-0.0.0.1] quit
[S9300-E-ospf-1] quit
NOTE
The default-route-advertise and no-summary keywords are recommend on the ABR (S9300-A). In this
manner, the size of the routing table of devices in an NSSA area can be reduced. For the other devices in
the NSSA area, you need to run only the nssa command.
Total Nets: 3
Intra Area: 2 Inter Area: 1 ASE: 0 NSSA: 0
Total Nets: 6
Intra Area: 2 Inter Area: 3 ASE: 1 NSSA: 0
From the routing table of S9300-D, you can find that an AS external route is imported to the
NSSA area.
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
router id 1.1.1.1
#
vlan batch 10 20
#
interface Vlanif10
ip address 192.168.0.1 255.255.255.0
#
interface Vlanif20
ip address 192.168.1.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
ospf 1
area 0.0.0.0
network 192.168.0.0 0.0.0.255
area 0.0.0.1
network 192.168.1.0 0.0.0.255
nssa default-route-advertise no-summary
#
return
NOTE
Configuration files of S9300-B, S9300-D, and S9300-F are similar to the configuration file of
S9300-A, and are not mentioned here.
l Configuration file of S9300-C
#
sysname S9300-C
#
router id 3.3.3.3
#
vlan batch 20 40
#
interface Vlanif20
ip address 192.168.1.2 255.255.255.0
#
interface Vlanif40
ip address 172.16.1.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
ospf 1
import-route static
area 0.0.0.1
Networking Requirements
As shown in Figure 5-19, S9300-A has the highest priority of 100 on the network and is elected
as the DR; S9300-C has the second highest priority and is elected as the BDR; The priority of
S9300-B is 0 and therefore cannot be elected as a DR or a BDR; the priority of S9300-D is not
set, so S9300-D uses the default value 1.
GE1/0/1 GE1/0/1
GE1/0/1 GE1/0/1
S9300-C S9300-D
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the ID of the VLAN that each interface belongs to.
2. Assign an IP address to each VLANIF interface.
3. Configure the router ID, enable OSPF, and specify network segments on each S9300.
4. Check whether an S9300 is the DR or BDR with its default DR priority.
5. Set the DR priority of the interface on each S9300 and check whether the S9300 becomes
the DR or BDR.
Data Preparation
To complete the configuration, you need the following data:
l ID of the VLAN that each interface belongs to, as shown in Figure 5-19
l IP address of each VLANIF interface, as shown in Figure 5-19
l Router ID, OSPF process ID, and DR priority of each S9300, and area that each interface
belongs to:
– On S9300-A, the router ID is 1.1.1.1; the OSPF process ID is 1; the network segment
of Area 0 is 192.168.1.0/24; the DR priority is 100.
– On S9300-B, the router ID is 2.2.2.2; the OSPF process ID is 1; the network segment
of Area 0 is 192.168.1.0/24; the DR priority is 0.
– On S9300-C, the router ID is 3.3.3.3; the OSPF process ID is 1; the network segment
of Area 0 is 192.168.1.0/24; the DR priority is 2.
– On S9300-D, the router ID is 4.4.4.4; the OSPF process ID is 1; the network segment
of Area 0 is 192.168.1.0/24; the DR priority is 1.
Procedure
Step 1 Configure the VLAN that the each interface belongs to.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] vlan 10
[S9300-A-vlan10] quit
[S9300-A] interface GigabitEthernet 1/0/1
[S9300-A-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[S9300-A-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[S9300-A-GigabitEthernet1/0/1] quit
The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of
S9300-A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] ip address 192.168.1.1 24
The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of
S9300-A, and are not mentioned here.
Step 3 Configure the basic OSPF functions.
# Configure S9300-A.
# Configure S9300-B.
[S9300-B] router id 2.2.2.2
[S9300-B] ospf
[S9300-B-ospf-1] area 0
[S9300-B-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[S9300-B-ospf-1-area-0.0.0.0] quit
[S9300-B-ospf-1] quit
# Configure S9300-C.
[S9300-C] router id 3.3.3.3
[S9300-C] ospf
[S9300-C-ospf-1] area 0
[S9300-C-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[S9300-C-ospf-1-area-0.0.0.0] quit
[S9300-C-ospf-1] quit
# Configure S9300-D.
[S9300-D] router id 4.4.4.4
[S9300-D] ospf
[S9300-D-ospf-1] area 0
[S9300-D-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[S9300-D-ospf-1-area-0.0.0.0] quit
[S9300-D-ospf-1] quit
Check the neighbors of S9300-A. You can view the DR priority and the neighbor status. By
default, the DR priority is 1. Now S9300-D functions as the DR and S9300-C functions as the
BDR.
NOTE
When two routers have the save priority, the router with a greater router ID is elected as the DR. If an
Ethernet interface of an S9300 becomes the DR, the other broadcast interfaces of the S9300 have a high
priority in the future DR election. That is, the S9300 is still elected as the DR in later election and the DR
cannot be preempted.
Configure S9300-B.
[S9300-B] interface vlanif 10
[S9300-B-Vlanif10] ospf dr-priority 0
[S9300-B-Vlanif10] quit
# Configure S9300-C.
[S9300-C] interface vlanif 10
[S9300-C-Vlanif10] ospf dr-priority 2
[S9300-C-Vlanif10] quit
NOTE
If all neighbors are in Full state, it indicates that the local device establishes adjacencies with all
its neighbors. If a neighbor stays in 2-Way state, it indicates the local S9300 and the neighbor
are not the DR or BDR. Therefore, they do not need to exchange LSAs.
If the status of an OSPF interface is DROther, it indicates that the router is neither the DR nor
the BDR.
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
router id 1.1.1.1
#
vlan batch 10
#
interface Vlanif10
ip address 192.168.1.1 255.255.255.0
#
ospf 1
area 0.0.0.0
network 192.168.1.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-20, Area 2 is not directly connected to the backbone area. Area 1 functions
as a transit area to connect Area 2 to Area 0. A virtual link is set up between S9300-A and S9300-
B.
Area 1
S9300-A S9300-B
GE1/0/1 GE1/0/1
GE1/0/2 GE1/0/2
S9300-C Virtual Link S9300-D
GE1/0/1 GE1/0/1
Area 0 Area 2
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable OSPF on each S9300 and configure the basic OSPF functions.
2. Configure a virtual link between S9300-A and S9300-B to connect the non-backbone areas
and the backbone area.
Data Preparation
To complete the configuration, you need the following data:
l ID of the VLAN that each interface belongs to, as shown in Figure 5-20
l IP address of each VLANIF interface, as shown in Figure 5-20
l Router ID and OSPF process ID of each S9300 and area that each interface belongs to:
– On S9300-A, the router ID is 1.1.1.1; OSPF process ID is 1; the network segment of
Area 1 is 192.168.1.0/24; the network segment of Area 0 is 10.0.0.0/8.
– On S9300-B, the router ID is 2.2.2.2; OSPF process ID is 1; the network segment of
Area 1 is 192.168.1.0/24; the network segment of Area 2 is 172.16.0.0/16.
– On S9300-C, the router ID is 3.3.3.3; OSPF process ID is 1; the network segment of
Area 0 is 10.0.0.0/8.
– On S9300-D, the router ID4.4.4.4; OSPF process ID is 1; the network segment of Area
2 is 172.16.0.0/16.
Procedure
Step 1 Configure VLANs that the related interfaces belong to.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] vlan batch 10 20
[S9300-A] interface GigabitEthernet 1/0/1
[S9300-A-GigabitEthernet1/0/1]port hybrid pvid vlan 10
[S9300-A-GigabitEthernet1/0/1]port hybrid untagged vlan 10
[S9300-A-GigabitEthernet1/0/1] quit
S9300-A] interface GigabitEthernet 1/0/2
[S9300-A-GigabitEthernet1/0/2] port hybrid pvid vlan 20
[S9300-A-GigabitEthernet1/0/2] port hybrid untagged vlan 20
[S9300-A-GigabitEthernet1/0/2] quit
The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of
S9300-A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] ip address 192.168.1.1 24
[S9300-A-Vlanif10] quit
[S9300-A] interface vlanif 20
[S9300-A-Vlanif20] ip address 10.1.1.1 8
[S9300-A-Vlanif20] quit
The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of
S9300-A, and are not mentioned here.
Step 3 Configure the basic OSPF functions.
# Configure S9300-A.
[S9300-A] ospf 1 router-id 1.1.1.1
[S9300-A-ospf-1] area 0
[S9300-A-ospf-1-area-0.0.0.0] network 10.0.0.0 0.255.255.255
[S9300-A-ospf-1-area-0.0.0.0] quit
[S9300-A-ospf-1] area 1
[S9300-A-ospf-1-area-0.0.0.1] network 192.168.1.0 0.0.0.255
[S9300-A-ospf-1-area-0.0.0.1] quit
[S9300-A-ospf-1] quit
Configure S9300-B.
[S9300-B] ospf 1 router-id 2.2.2.2
[S9300-B-ospf-1] area 1
[S9300-B-ospf-1-area-0.0.0.1] network 192.168.1.0 0.0.0.255
[S9300-B-ospf-1-area-0.0.0.1] quit
[S9300-B-ospf-1] area 2
[S9300-B-ospf-1-area-0.0.0.2] network 172.16.0.0 0.0.255.255
[S9300-B-ospf-1-area-0.0.0.2] quit
[S9300-B-ospf-1] quit
# Configure S9300-C.
[S9300-C] ospf 1 router-id 3.3.3.3
[S9300-C-ospf-1] area 0
[S9300-C-ospf-1-area-0.0.0.0] network 10.0.0.0 0.255.255.255
[S9300-C-ospf-1-area-0.0.0.0] quit
[S9300-C-ospf-1] quit
# Configure S9300-D.
[S9300-D] ospf 1 router-id 4.4.4.4
[S9300-D-ospf-1] area 2
[S9300-D-ospf-1-area-0.0.0.2] network 172.16.0.0 0.0.255.255
[S9300-D-ospf-1-area-0.0.0.2] quit
[S9300-D-ospf-1] quit
Total Nets: 2
Intra Area: 2 Inter Area: 0 ASE: 0 NSSA: 0
Area 2 is not directly connected to Area 0. Therefore, the routing table of S9300-A does not
contain any route to Area 2.
# Configure S9300-A.
[S9300-A] ospf
[S9300-A-ospf-1] area 1
[S9300-A-ospf-1-area-0.0.0.1] vlink-peer 2.2.2.2
[S9300-A-ospf-1-area-0.0.0.1] quit
[S9300-A-ospf-1] quit
# Configure S9300-B.
[S9300-B] ospf 1
[S9300-B-ospf-1] area 1
[S9300-B-ospf-1-area-0.0.0.1] vlink-peer 1.1.1.1
[S9300-B-ospf-1-area-0.0.0.1] quit
[S9300-B-ospf-1] quit
Total Nets: 3
Intra Area: 2 Inter Area: 1 ASE: 0 NSSA: 0
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10 20
#
interface Vlanif10
ip address 192.168.1.1 255.255.255.0
#
interface Vlanif20
ip address 10.1.1.1 255.0.0.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 10.0.0.0 0.255.255.255
area 0.0.0.1
network 192.168.1.0 0.0.0.255
vlink-peer 2.2.2.2
#
return
#
vlan 20
#
interface Vlanif20
ip address 10.1.1.2 255.0.0.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 10.0.0.0 0.255.255.255
#
return
Networking Requirements
As shown in Figure 5-21, the networking requirements are as follows:
l S9300-A, S9300-B, S9300-C, and S9300-D connect to each other through OSPF.
l S9300-A, S9300-B, S9300-C, and S9300-D belong to Area 0.
l Load balancing needs is configured so that the traffic of S9300-A can be sent to S9300-D
through S9300-B and S9300-C.
Figure 5-21 Networking diagram for configuring load balancing among OSPF routes
GE1/0/1 GE1/0/2
S9300-B
GE1/0/1 GE1/0/1
GE1/0/3 GE1/0/3
Area0
S9300-A GE1/0/2 GE1/0/2
S9300-D
GE1/0/1 GE1/0/2
S9300-C
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l ID of the VLAN that each interface belongs to, as shown in Figure 5-21
l IP address of each VLANIF interface, as shown in Figure 5-21
l Router ID and OSPF process ID of each S9300 and area that each interface belongs to:
– On S9300-A, the router ID is 1.1.1.1; the OSPF process ID is 1; the network segments
of Area 1 are 10.1.1.0/24, 10.1.2.0/24, and 172.16.1.0/24.
– On S9300-B, the router ID is 2.2.2.2; the OSPF process ID is 1; the network segments
of Area 0 are 10.1.1.0/24 and 192.168.0.0/24.
– The router ID of S9300-C is 3.3.3.3; the OSPF process ID is 1; the network segments
of Area 0 are 10.1.2.0/24 and 192.168.1.0/24.
– On S9300-D, the router ID is 4.4.4.4; the OSPF process ID is 1; the network segments
of Area 0 are 172.17.1.0/24, 192.168.0.0/24, and 192.168.1.0/24.
l Number of routes for load balancing on S9300-A: 1
l Weight of the equal-cost route whose next hop is S9300-C: 1
Procedure
Step 1 Configure VLANs that the related interfaces belong to.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] vlan batch 10 20 50
[S9300-A] interface GigabitEthernet 1/0/1
[S9300-A-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[S9300-A-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[S9300-A-GigabitEthernet1/0/1] quit
[S9300-A] interface GigabitEthernet 1/0/2
[S9300-A-GigabitEthernet1/0/2] port hybrid pvid vlan 20
[S9300-A-GigabitEthernet1/0/2] port hybrid untagged vlan 20
[S9300-A-GigabitEthernet1/0/2] quit
S9300-A] interface GigabitEthernet 1/0/3
[S9300-A-GigabitEthernet1/0/3] port hybrid pvid vlan 50
[S9300-A-GigabitEthernet1/0/3] port hybrid untagged vlan 50
[S9300-A-GigabitEthernet1/0/3] quit
The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of
S9300-A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] ip address 10.1.1.1 24
[S9300-A-Vlanif10] quit
[S9300-A] interface vlanif 20
[S9300-A-Vlanif20] ip address 10.1.2.1 24
[S9300-A-Vlanif20] quit
The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of
S9300-A, and are not mentioned here.
Step 3 Configure the basic OSPF functions. See Configuring Basic OSPF Functions.
Step 4 Disable load balancing on S9300-A.
[S9300-A] ospf
[S9300-A-ospf-1] maximum load-balancing 1
[S9300-A-ospf-1] quit
As shown in the routing table, when the maximum number of equal-cost routes for load balancing
is set to 1, OSPF selects 10.1.1.2 as the next hop to the destination network 172.17.1.0.
NOTE
In the preceding example, 10.1.1.2 is selected as the optimal next hop. This is because OSPF selects the
next hop randomly among equal-cost routes.
Step 5 Restore the default number of equal-cost routes for load balancing on S9300-A.
[S9300-A] ospf
[S9300-A-ospf-1] undo maximum load-balancing
[S9300-A-ospf-1] quit
As shown in the routing table, when the default setting of load balancing is restored, the next
hops of S9300-A, that is, 10.1.1.2 (S9300-B) and 10.1.2.2 (S9300-C), become valid routes. This
is because the default number of equal-cost routes is 6.
Step 6 (Optional) Set the weight of equal-cost routes on S9300-A.
If you do not want to implement load balancing between S9300-B and S9300-C, set the weight
of equal-cost routes to specify the next hop.
[S9300-A] ospf
[S9300-A-ospf-1] nexthop 10.1.2.2 weight 1
[S9300-A-ospf-1] quit
As shown in the routing table, the priority of the next hop 10.1.2.2 (S9300-C) with the weight
as 1 is higher than that of 10.1.1.2 (S9300-B), after the weight is set for equal-cost routes. Thus,
OSPF selects the route with the next hop 10.1.2.2 as the optimal route.
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10 20 50
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface Vlanif20
ip address 10.1.2.1 255.255.255.0
#
interface Vlanif50
ip address 172.16.1.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface GigabitEthernet1/0/3
port hybrid pvid vlan 50
port hybrid untagged vlan 50
#
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.1.2.0 0.0.0.255
network 172.16.1.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-22, S9300-A and S9300-B have two main control boards, which work in
active/standby mode. S9300-A and S9300-B belong to Area 0 and are connected through OSPF.
They also provide the GR feature.
S9300-A S9300-B
GE1/0/1
GE1/0/1
Area 0
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the basic OSPF functions on each S9300 to implement interconnection.
2. Enable the Opaque LSA function.
3. Configure GR on each S9300.
Data Preparation
To complete the configuration, you need the following data:
l ID of the VLAN that each interface belongs to, as shown in Figure 5-22
l IP address of each VLANIF interface, as shown in Figure 5-22
l Router ID and OSPF process ID of each S9300 and area that each interface belongs to:
– On S9300-A, the router ID is 1.1.1.1; the OSPF process ID is 1;the network segment
of Area 0 is 1.1.1.0/24.
– On S9300-B, the router ID is 2.2.2.2; OSPF process ID is 1; the network segment of
Area 0 is 1.1.1.0/24.
Procedure
Step 1 Configure the basic OSPF functions. See Configuring Basic OSPF Functions.
Step 2 Configure the Opaque LSA function.
[S9300-A] ospf
[S9300-A-ospf-1] opaque-capability enable
# Configure S9300-B.
[S9300-B] ospf
[S9300-B-ospf-1] opaque-capability enable
# Configure S9300-B.
[S9300-B] ospf
[S9300-B-ospf-1] graceful-restart
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
router id 1.1.1.1
#
vlan batch 10
#
interface Vlanif10
ip address 1.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
ospf 1
opaque-capability enable
graceful-restart
area 0.0.0.0
network 1.1.1.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-23, the networking requirement are as follows:
l BFD is configured on the interfaces between S9300-A and S9300-B. When a fault occurs
on the link between the S9300s, BFD can quickly detect the fault and notify OSPF of the
fault. Then, the service flow is transmitted on the backup link.
S9300-A S9300-B
GE2/0/0 GE3/0/0
GE2/0/0
GE1/0/0 GE1/0/0
GE1/0/0 GE2/0/0
S9300-C
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l ID of the VLAN that each interface belongs to, as shown in Figure 5-23
l IP address of each VLANIF interface, as shown in Figure 5-23
l Router ID and OSPF process ID of each S9300 and network segments that OSPF interfaces
belong to:
Procedure
Step 1 Create VLANs and add corresponding interfaces to the VLANs.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] vlan 10
S9300-A-vlan10] quit
[S9300-A] vlan 20
[S9300-A-vlan20] quit
[S9300-A] interface GigabitEthernet 1/0/0
[S9300-A-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[S9300-A-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[S9300-A-GigabitEthernet1/0/0] quit
S9300-A] interface GigabitEthernet 2/0/0
[S9300-A-GigabitEthernet2/0/0] port hybrid pvid vlan 20
[S9300-A-GigabitEthernet1/0/0] port hybrid untagged vlan 20
[S9300-A-GigabitEthernet2/0/0] quit
The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A, and
are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] ip address 1.1.1.1 24
[S9300-A-Vlanif10] quit
[S9300-A] interface vlanif 20
[S9300-A-Vlanif20] ip address 3.3.3.1 24
[S9300-A-Vlanif20] quit
The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A, and
are not mentioned here.
Step 3 Configure the basic OSPF functions. See Configuring Basic OSPF Functions.
Step 4 Configure BFD for OSPF.
# Enable BFD globally on S9300-A.
[S9300-A] bfd
[S9300-A-bfd] quit
[S9300-A] ospf
[S9300-A-ospf-1] bfd all-interfaces enable
[S9300-A-ospf-1] quit
# Run the display ospf bfd session all command on S9300-A or S9300-B. You can see that the
BFD state is Up.
# Configure BFD on VLANIF 20 of S9300-A, set the minimum interval for sending the packets
and the minimum interval for receiving the packets to 100 ms, and set the local detection time
multiplier to 4.
[S9300-A] interface vlanif 20
[S9300-A-Vlanif20] ospf bfd enable
[S9300-A-Vlanif20] ospf bfd min-tx-interval 100 min-rx-interval 100 detect-
multiplier 4
[S9300-A-Vlanif20] quit
# Configure BFD on VLANIF20 of S9300-B and set the minimum interval for sending the
packets and the minimum interval for receiving the packets to 100 ms and the local detection
time multiplier to 4.
[S9300-B] bfd
[S9300-B-bfd] quit
[S9300-B] interface vlanif 20
[S9300-B-Vlanif20] ospf bfd enable
[S9300-B-Vlanif20] ospf bfd min-tx-interval 100 min-rx-interval 100 detect-
multiplier 4
[S9300-B-Vlanif20] quit
# Run the display ospf bfd session all command on S9300-A or S9300-B. You can see that the
BFD state is Up.
As shown in the OSPF routing table, the backup link S9300-A→S9300-C→S9300-B takes effect
after the main link fails. The next hop address of the route to 172.16.1.0/24 becomes 1.1.1.2.
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
router id 1.1.1.1
#
vlan batch 10 20
#
bfd
#
interface Vlanif10
ip address 1.1.1.1 255.255.255.0
#
interface Vlanif20
ip address 3.3.3.1 255.255.255.0
ospf bfd enable
ospf bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
ospf 1
bfd all-interface enable
area 0.0.0.0
network 3.3.3.0 0.0.0.255
network 1.1.1.0 0.0.0.255
#
return
#
interface Vlanif20
ip address 3.3.3.2 255.255.255.0
ospf bfd enable
ospf bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4
#
interface Vlanif30
ip address 2.2.2.2 255.255.255.0
#
interface Vlanif40
ip address 172.16.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 20
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
ospf 1
bfd all-interface enable
area 0.0.0.0
network 3.3.3.0 0.0.0.255
network 2.2.2.0 0.0.0.255
network 172.16.1.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-24, the networking requirements are as follows:
l S9300-A, S9300-B, S9300-C, and S9300-D belong to the same AS. The IS-IS protocol
runs on them to ensure connectivity on an IP network.
l The area IDs of S9300-A, S9300-B, and S9300-C are all 10, and the area ID of S9300-D
is 20.
l S9300-A and S9300X-B are Level-1 devices. S9300-C is a Level-1-2 device. S9300-D is
the Level-2 device.
S9300-A
L1
GE1/0/1
S9300-C
L1/2 GE1/0/2
GE1/0/1
GE1/0/3 GE1/0/1
IS-IS
Area 10 GE1/0/2
S9300-D
L2
IS-IS
GE1/0/1 Area 20
S9300-B
L1
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the VLANs that the physical interfaces belong to.
2. Assign an IP address to each VLANIF interface.
3. Run the IS-IS progress on each S9300, specify the network entity title, and configure the
level.
4. Check the IS-IS database and routing table of each S9300.
Data Preparation
To complete the configuration, you need the following data:
l ID of the VLAN that each interface belongs to, as shown in Figure 5-24
l IP address of each VLANIF interface, as shown in Figure 5-24
l System ID, level, and area ID of each S9300:
– S9300-A: The system ID is 0000.0000.0001; the area ID is 10; the level is Level-1.
– S9300-B: The system ID is 0000.0000.0002; the area ID is 10; the level is Level-1.
– S9300-C: The system ID is 0000.0000.0003; the area ID is 10; the level is Level-1-2.
– S9300-D: The system ID is 0000.0000.0004; the area ID is 20; the level is Level-2.
Procedure
Step 1 Create VLANs and add corresponding interfaces to the VLANs.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] vlan 10
[S9300-A-vlan10] quit
[S9300-A] interface GigabitEthernet 1/0/1
[S9300-A-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[S9300-A-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[S9300-A-GigabitEthernet1/0/1] quit
The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of
S9300-A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] ip address 10.1.1.2 24
[S9300-A-Vlanif10] quit
The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of
S9300-A, and are not mentioned here.
Step 3 Run the IS-IS progress on each S9300, specify the network entity title, and configure the level.
# Configure S9300-A.
[S9300-A] isis 1
[S9300-A-isis-1] is-level level-1
[S9300-A-isis-1] network-entity 10.0000.0000.0001.00
[S9300-A-isis-1] quit
# Configure S9300-B.
[S9300-B] isis 1
[S9300-B-isis-1] is-level level-1
[S9300-B-isis-1] network-entity 10.0000.0000.0002.00
[S9300-B-isis-1] quit
# Configure S9300-C.
[S9300-C] isis 1
[S9300-C-isis-1] network-entity 10.0000.0000.0003.00
[S9300-C-isis-1] quit
# Configure S9300-D.
[S9300-D] isis 1
[S9300-D-isis-1] is-level level-2
[S9300-D-isis-1] network-entity 20.0000.0000.0004.00
[S9300-D-isis-1] quit
# Configure S9300-B.
[S9300-B] interface vlanif 20
[S9300-B-Vlanif20] isis enable 1
[S9300-B-Vlanif20] quit
# Configure S9300-C.
[S9300-C] interface vlanif 10
[S9300-C-Vlanif10] isis enable 1
[S9300-C-Vlanif10] quit
[S9300-C] interface vlanif 20
[S9300-C-Vlanif20] isis enable 1
[S9300-C-Vlanif20] quit
[S9300-C] interface vlanif 30
[S9300-C-Vlanif30] isis enable 1
[S9300-C-Vlanif30] quit
# Configure S9300-D.
[S9300-D] interface vlanif 30
[S9300-D-Vlanif30] isis enable 1
[S9300-D-Vlanif30] quit
[S9300-D] interface vlanif 40
[S9300-D-Vlanif40] isis enable 1
[S9300-D-Vlanif40] quit
# View the IS-IS routing table of each S9300. A default route is available in the routing table of
the Level-1 S9300s and the next hop is a Level-1-2 S9300. The routing table of the Level-2
S9300 contains all Level-1 and Level-2 routes.
[S9300-A] display isis route
-------------------------------------------------------------------------
0.0.0.0/0 10 NULL Vlanif10 10.1.1.1 A/-/-/-
10.1.1.0/24 10 NULL Vlanif10 Direct D/-/L/-
10.1.2.0/24 20 NULL Vlanif10 10.1.1.1 A/-/-/-
192.168.0.0/24 20 NULL Vlanif10 10.1.1.1 A/-/-/-
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10
#
isis 1
is-level level-1
network-entity 10.0000.0000.0001.00
#
interface Vlanif10
ip address 10.1.1.2 255.255.255.0
isis enable 1
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
return
l Configuration file of S9300-B
#
sysname S9300-B
#
vlan batch 20
#
isis 1
is-level level-1
network-entity 10.0000.0000.0002.00
#
interface Vlanif20
ip address 10.1.2.2 255.255.255.0
isis enable 1
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
return
l Configuration file of S9300-C
#
sysname S9300-C
#
vlan batch 10 20 30
#
isis 1
network-entity 10.0000.0000.0003.00
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
isis enable 1
#
interface Vlanif20
ip address 10.1.2.1 255.255.255.0
isis enable 1
#
interface Vlanif30
ip address 192.168.0.1 255.255.255.0
isis enable 1
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface GigabitEthernet1/0/3
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
return
l Configuration file of S9300-D
#
sysname S9300-D
#
vlan batch 30 40
#
isis 1
is-level level-2
network-entity 20.0000.0000.0004.00
#
interface Vlanif30
ip address 192.168.0.2 255.255.255.0
isis enable 1
#
interface Vlanif40
ip address 172.16.1.1 255.255.0.0
isis enable 1
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
Return
Networking Requirements
As shown in Figure 5-25, the networking requirements are as follows:
l S9300-A, S9300-B, and S9300-C run the IS-IS protocol to communicate with each other.
l S9300-A belongs to Area 20. S9300-B and S9300-C belong to Area 10.
l S9300-A is a Level-2 device. S9300-B is a Level-1-2 device. S9300-C is a Level-1 device.
l The addresses in Area 10 can be summarized as 172.1.0.0/16.
network 1
172.1.1.0/24
S9300-A Area 10
L2 GE1/0/2
GE1/0/1 GE1/0/1 GE1/0/3 network 2
GE1/0/2 GE1/0/1 172.1.2.0/24
GE1/0/4
Area 20 S9300-B S9300-C
L1/L2 L1
network 3
172.1.3.0/24
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable IS-IS on each S9300 so that the S9300s can be interconnected.
2. Check the IS-IS routing table of S9300-A.
3. Configure route aggregation on S9300-B.
Data Preparation
To complete the configuration, you need the following data:
l ID of the VLAN that each interface belongs to, as shown in Figure 5-25
l IP address of each VLANIF interface, as shown in Figure 5-25
l System ID, level, and area ID of each S9300:
l S9300-A: The system ID is 0000.0000.0001; the area ID is 10; the level is Level-2.
l S9300-B: The system ID is 0000.0000.0002; the area ID is 10; the level is Level-1.
l S9300-C: The system ID is 0000.0000.0003; the area ID is 10; the level is Level-1.
Procedure
Step 1 Create VLANs and add corresponding interfaces to the VLANs.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] interface GigabitEthernet 1/0/1
[S9300-A-GigabitEthernet1/0/1] port link-type access
[S9300-A-GigabitEthernet1/0/1] quit
[S9300-A] vlan 50
[S9300-A-vlan50] port GigabitEthernet 1/0/1
[S9300-A-vlan50] quit
The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A, and
are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 50
[S9300-A-Vlanif50] ip address 172.2.1.1 24
[S9300-A-Vlanif50] quit
The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A, and
are not mentioned here.
Step 3 Configure the basic IS-IS functions.
# Configure S9300-A.
[S9300-A] isis 1
[S9300-A-isis-1] is-level level-2
[S9300-A-isis-1] network-entity 20.0000.0000.0001.00
[S9300-A-isis-1] quit
[S9300-A] interface vlanif 50
[S9300-A-Vlanif50] isis enable 1
[S9300-A-Vlanif50] quit
# Configure S9300-B.
[S9300-B] isis 1
[S9300-B-isis-1] network-entity 10.0000.0000.0002.00
[S9300-B-isis-1] quit
[S9300-B] interface vlanif 10
[S9300-B-Vlanif10] isis enable 1
[S9300-B-Vlanif10] quit
[S9300-B] interface vlanif 50
[S9300-B-Vlanif50] isis enable 1
[S9300-B-Vlanif50] quit
# Configure S9300-C.
[S9300-C] isis 1
[S9300-C-isis-1] is-level level-1
[S9300-C-isis-1] network-entity 10.0000.0000.0003.00
[S9300-C-isis-1] quit
[S9300-C] interface vlanif 10
[S9300-C-Vlanif10] isis enable 1
[S9300-C-Vlanif10] quit
The configurations of the VLANIF 20, VLANIF 30, and VLANIF 40 interfaces are similar to
the configuration of VLANIF 10, and are not mentioned here.
Step 4 Check the IS-IS routing table of S9300-A.
[S9300-A]display isis route
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 50
#
isis 1
is-level level-2
network-entity 20.0000.0000.0001.00
#
interface Vlanif50
ip address 172.2.1.1 255.255.255.0
isis enable 1
#
interface GigabitEthernet1/0/1
port link-type access
port default vlan 50
#
return
#
vlan batch 10 20 30 40
#
isis 1
is-level level-1
network-entity 10.0000.0000.0003.00
#
interface Vlanif10
ip address 172.1.4.1 255.255.255.0
isis enable 1
#
interface Vlanif20
ip address 172.1.1.1 255.255.255.0
isis enable 1
#
interface Vlanif30
ip address 172.1.2.1 255.255.255.0
isis enable 1
#
interface Vlanif40
ip address 172.1.3.1 255.255.255.0
isis enable 1
#
interface GigabitEthernet1/0/1
port link-type access
port default vlan 10
#
interface GigabitEthernet1/0/2
port link-type access
port default vlan 20
#
interface GigabitEthernet1/0/3
port link-type access
port default vlan 30
#
interface GigabitEthernet1/0/4
port link-type access
port default vlan 40
#
return
Networking Requirements
As shown in Figure 5-26, the networking requirements are as follows:
l S9300-A, S9300-B, S9300-C, and S9300-D run the IS-IS protocol to communicate with
each other.
l S9300-A, S9300-B, S9300-C, and S9300-D belong to Area 10.
l S9300-A and S9300-B are Level-1-2 devices. S9300-C is a Level-1 device. S9300-D is a
Level-2 device.
l You need to change the DIS priority of the related interface to configure S9300-A to a
Level-1-2 DIS.
S9300-A S9300-B
L1/L2 L1/L2
GE1/0/1 GE1/0/1
GE1/0/1 GE1/0/1
S9300-C S9300-D
L1 L2
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable IS-IS on each S9300 so that the S9300s can be interconnected.
2. Check information about the IS-IS interface on each S9300 with the default priority.
3. Configure the DIS priority on S9300-A.
Data Preparation
To complete the configuration, you need the following data:
l ID of the VLAN that each interface belongs to, as shown in Figure 5-26
l IP address of each VLANIF interface, as shown in Figure 5-26
l System ID, level, and area ID of each S9300:
– S9300-A: The system ID is 0000.0000.0001; the area ID is 10; the DIS priority is 100;
the level is Level-1-2.
– S9300-B: The system ID is 0000.0000.0002; the area ID is 10; the level is Level-1.
– S9300-C: The system ID is 0000.0000.0003; the area ID is 10; the level is Level-1.
– S9300-D: The system ID is 0000.0000.0004; the area ID is 10; the level is Level-2.
Procedure
Step 1 Create VLANs and add corresponding interfaces to the VLANs.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] vlan 10
S9300-A-vlan10] quit
[S9300-A] interface GigabitEthernet 1/0/1
[S9300-A-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[S9300-A-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[S9300-A-GigabitEthernet1/0/1] quit
The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of
S9300-A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 50
[S9300-A-Vlanif10] ip address 10.1.1.1 24
[S9300-A-Vlanif10] quit
The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of
S9300-A, and are not mentioned here.
Step 3 View the MAC address of the VLANIF 10 interface on each S9300.
# View the MAC address of the VLANIF 10 interface on S9300-A.
[S9300-A] display arp interface vlanif 10
IP ADDRESS MAC ADDRESS EXPIRE(M) TYPE INTERFACE VPN-INSTANCE
VLAN/CEVLAN PVC
------------------------------------------------------------------------------
10.1.1.1 00e0-fc10-afec I - Vlanif10
------------------------------------------------------------------------------
Total:1 Dynamic:0 Static:0 Interface:1
# Configure S9300-B.
[S9300-B] isis 1
[S9300-B-isis-1] network-entity 10.0000.0000.0002.00
[S9300-B-isis-1] quit
[S9300-B] interface vlanif 10
[S9300-B-Vlanif10] isis enable 1
[S9300-B-Vlanif10] quit
# Configure S9300-C.
[S9300-C] isis 1
[S9300-C-isis-1] network-entity 10.0000.0000.0003.00
[S9300-C-isis-1] is-level level-1
[S9300-C-isis-1] quit
[S9300-C] interface vlanif 10
[S9300-C-Vlanif10] isis enable 1
[S9300-C-Vlanif10] quit
# Configure S9300-D.
[S9300-D] isis 1
[S9300-D-isis-1] network-entity 10.0000.0000.0004.00
[S9300-D-isis-1] is-level level-2
[S9300-D-isis-1] quit
[S9300-D] interface vlanif 10
[S9300-D-Vlanif10] isis enable 1
[S9300-D-Vlanif10] quit
NOTE
When the default DIS priority is used, the interface on S9300-B has the greatest MAC address among all
the interfaces on the Level-1 S9300s. Therefore, S9300-B is elected as the Level-1 DIS. The interface on
S9300-D has the greatest MAC address among all the interfaces on the Level-2 S9300s. Therefore, S9300-
D is elected as the Level-2 DIS. The Level-1 pseudonode is 0000.0000.0002.01. The Level-2 pseudonode
is 0000.0000.0004.01.
As shown in the output information, after the DIS priority of the IS-IS interface is changed,
S9300-A immediately becomes a Level-1 and Level-2 DIS and its pseudonode is
0000.0000.0001.01.
# View information about the IS-IS neighbors and IS-IS interfaces on S9300-B.
[S9300-B] display isis peer
# View information about the IS-IS neighbors and IS-IS interfaces on S9300-D.
[S9300-D] display isis peer
----End
Configuration Files
l Configuration file of S9300-A
#
#
sysname S9300-A
#
vlan batch 10
#
isis 1
network-entity 10.0000.0000.0001.00
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
isis enable 1
isis dis-priority 100
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
return
isis 1
is-level level-2
network-entity 10.0000.0000.0004.00
#
interface Vlanif10
ip address 10.1.1.4 255.255.255.0
isis enable 1
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
return
Networking Requirements
As shown in Figure 5-27, the networking requirements are as follows:
l S9300-A, S9300-B, S9300-C, and S9300-D run IS-IS to communicate with each other.
l S9300-A, S9300-B, S9300-C, and S9300-D are Level-2 devices in Area 10.
l Load balancing needs to be configured so that the traffic of S9300-A is sent to S9300-D
through S9300-B and S9300-C.
GE1/0/1 GE1/0/2
S9300-B
L2
GE1/0/1 GE1/0/1
GE1/0/3 S9300-A S9300-D GE1/0/3
L2 L2
GE1/0/2 Area 10 GE1/0/2
GE1/0/1 GE1/0/2
S9300-C
L2
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable IS-IS on each S9300 so that the S9300s can be interconnected.
2. Set the number of equal-cost routes to 1 and check the routing table.
3. Configure load balancing on S9300-A and check the routing table.
4. (Optional) Set the weight of equal-cost routes on S9300-A.
Data Preparation
To complete the configuration, you need the following data:
l ID of the VLAN that each interface belongs to, as shown in Figure 5-27
l IP address of each VLANIF interface, as shown in Figure 5-27
l System ID, level, and area ID of each S9300:
– S9300-A: The system ID is 0000.0000.0001; the area ID is 10; the level is Level-2.
– S9300-B: The system ID is 0000.0000.0002; the area ID is 10; the level is Level-2.
– S9300-C: The system ID is 0000.0000.0003; the area ID is 10; the level is Level-2.
– S9300-D: The system ID is 0000.0000.0004; the area ID is 10; the level is Level-2.
l Number of routes for load balancing on S9300-A: 1
l Load balancing mode on S9300-A
l Weight of the equal-cost route with S9300-C as the next hop: 1
Procedure
Step 1 Configure VLANs that the related interfaces belong to.
<Quidway> system-view
[Quidway] sysname S9300-A
[Quidway] vlan batch 10 20 50
[S9300-A] interface GigabitEthernet 1/0/1
[S9300-A-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[S9300-A-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[S9300-A-GigabitEthernet1/0/1] quit
[S9300-A] interface GigabitEthernet 1/0/2
[S9300-A-GigabitEthernet1/0/2] port hybrid pvid vlan 20
[S9300-A-GigabitEthernet1/0/2] port hybrid untagged vlan 20
[S9300-A-GigabitEthernet1/0/2] quit
[S9300-A] interface GigabitEthernet 1/0/3
[S9300-A-GigabitEthernet1/0/3] port hybrid pvid vlan 50
[S9300-A-GigabitEthernet1/0/3] port hybrid untagged vlan 50
[S9300-A-GigabitEthernet1/0/3] quit
The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of
S9300-A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] ip address 10.1.1.1 24
[S9300-A-Vlanif10] quit
[S9300-A] interface vlanif 20
[S9300-A-Vlanif20] ip address 10.1.2.1 24
[S9300-A-Vlanif20] quit
[S9300-A] interface vlanif 50
[S9300-A-Vlanif50] ip address 172.16.1.1 24
[S9300-A-Vlanif50] quit
The configurations of S9300-B, S9300-C, and S9300-D are similar to the configuration of
S9300-A, and are not mentioned here.
Step 3 Configure the basic function of IS-IS. The configuration procedure is not mentioned here.
Step 4 Set the number of equal-cost routes for load balancing to 1 on S9300-A.
[S9300-A] isis 1
[S9300-A-isis-1] maximum load-balancing 1
[S9300-A-isis-1] quit
As shown in the routing table, when the maximum number of equal-cost routes for load balancing
is set to 1, IS-IS selects 10.1.1.2 as the next hop to the destination network 172.17.1.0. This is
because S9300-B has a smaller system ID.
Step 5 Restore the default number of equal-cost routes for load balancing on S9300-A.
[S9300-A] isis 1
[S9300-A-isis-1] undo maximum load-balancing
[S9300-A-isis-1] quit
As shown in the routing table, the number of equal-cost routes for load balancing is restored to
the default value 6. Both the next hops of S9300-A, 10.1.1.2 (S9300-B) and 10.1.2.2 (S9300-C)
now become valid.
As shown in the routing table, the preference of the next hop 10.1.2.2 (S9300-C) with the weight
as 1, is higher than that of 10.1.1.2 (S9300-B), after the weight is set for equal-cost routes.
Therefore, IS-IS selects route with the next hop 10.1.2.2 as the optimal route.
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10 20 50
#
isis 1
is-level level-2
network-entity 10.0000.0000.0001.00
nexthop 10.1.2.2 weight 1
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
isis enable 1
#
interface Vlanif20
ip address 10.1.2.1 255.255.255.0
isis enable 1
#
interface Vlanif50
ip address 172.16.1.1 255.255.255.0
isis enable 1
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet1/0/2
isis 1
is-level level-2
network-entity 10.0000.0000.0004.00
#
interface Vlanif30
ip address 192.168.0.2 255.255.255.0
isis enable 1
#
interface Vlanif40
ip address 192.168.1.2 255.255.255.0
isis enable 1
#
interface Vlanif60
ip address 172.17.1.1 255.255.255.0
isis enable 1
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
interface GigabitEthernet1/0/3
port hybrid pvid vlan 60
port hybrid untagged vlan 60
#
return
Networking Requirements
As shown in Figure 5-28, the networking requirement are as follows: S9300-A, S9300-A and
S9300-C belong to the same autonomous system . They run the IS-IS protocol to implement
interworking and provide the GR mechanism.
After S9300-A, S9300-B, and S9300-C set up IS-IS adjacencies with each other, they start to
exchange routing information. When IS-IS is restarted on S9300-A, S9300-A resends connection
requests to neighbors to synchronize the LSDB.
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable IS-IS on each S9300 so that the S9300s can be interconnected.
2. Configure GR in the IS-IS view on each S9300 and configure the same interval for the
restart.
Data Preparation
To complete the configuration, you need the following data:
l ID of the VLAN that each interface belongs to, as shown in Figure 5-28
l IP address of each VLANIF interface, as shown in Figure 5-28
l System ID, level, and area ID of each S9300:
– S9300-A: The system ID is 0000.0000.0001; the area ID is 10; the level is Level-1.
– S9300-B: The system ID is 0000.0000.0002; the area ID is 10; the level is Level-2.
– S9300-C: The system ID is 0000.0000.0003; the area ID is 10; the level is Level-1-2.
l Restart interval
Procedure
Step 1 Configure VLANs that the related interfaces belong to.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] vlan 10
[S9300-A-Vlan10] quit
[S9300-A] interface GigabitEthernet 1/0/1
[S9300-A-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[S9300-A-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[S9300-A-GigabitEthernet1/0/1] quit
The configurations of S9300-B and S9300 are similar to the configuration of S9300-A, and are
not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif10
[S9300-A-Vlanif10] ip address 100.1.1.1 24
[S9300-A-Vlanif10] quit
The configurations of S9300-B and S9300 are similar to the configuration of S9300-A, and are
not mentioned here.
Step 3 Configure the basic function of IS-IS. The configuration procedure is not mentioned here.
Step 4 Configure IS-IS GR.
# Enable IS-IS GR on S9300-A and set the restart interval. The configurations on S9300-B and
S9300-C are the same as the configurations on S9300-A. S9300-A is taken as an example here.
[S9300-A] isis 1
[S9300-A-isis-1] graceful-restart
[S9300-A-isis-1] graceful-restart interval 150
[S9300-A-isis-1] quit
NOTE
The S9300 restarts an IS-IS process in GR mode only when GR is enabled for the IS-IS process.
# Run the display fib command on S9300-A and view the FIB table to check whether GR works
normally. If GR works normally, the FIB table does not change and the forwarding service is
not affected when S9300-A restarts the IS-IS process in GR mode.
<S9300-A> display fib
FIB Table:
Total number of Routes : 5
As shown in the display, the FIB table on S9300-A does not change and the forwarding service
is not affected.
# Disable IS-IS GR on S9300-A.
[S9300-A] isis 1
[S9300-A-isis-1] undo graceful-restart
[S9300-A-isis-1] quit
# Run the display fib command on S9300-A to view the FIB table.
<S9300-A> display fib
FIB Table:
Total number of Routes : 4
As shown in the display, the FIB table on S9300-A changes and the forwarding service is
affected.
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10
#
isis 1
graceful-restart
graceful-restart interval 150
is-level level-1
network-entity 10.0000.0000.0001.00
#
interface Vlanif10
ip address 100.1.1.1 255.255.255.0
isis enable 1
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
return
Networking Requirements
As shown in Figure 5-29, the networking requirement are as follows:
l S9300-A, S9300-B, S9300-C run IS-IS to communicate with each other.
l BFD for IS-IS is enabled on S9300-A, S9300-B, and S9300-C.
l Service traffic is transmitted on the main link S9300-A→S9300-B. Link S9300-A→
S9300-C→S9300-B is a backup link.
l BFD is configured on the interfaces between S9300-A and S9300-B. When a fault occurs
on the link between the S9300-A and S9300-B, BFD can quickly detect the fault and notify
IS-IS of the fault. Then, the service flow is transmitted through the backup link.
S9300-A S9300-B
GE2/0/0 GE3/0/0
GE2/0/0
GE1/0/0 GE1/0/0
GE1/0/0 GE2/0/0
S9300-C
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable IS-IS on each S9300 to ensure the reachability of the routes.
2. Set the cost of IS-IS interfaces to control the route selection.
Data Preparation
To complete the configuration, you need the following data:
l Process ID of the IS-IS protocol
l Area IDs of S9300-A, S9300-B, and S9300-C
l Interface cost of S9300-A and S9300-A
l Number and type of the BFD-enabled interfaces on S9300-A, S9300-B, and S9300-C
l Minimum interval for sending the BFD packets, the minimum interval for receiving the
BFD packets, and the local detection time multiplier on S9300-A and S9300-B
Procedure
Step 1 Configure IP addresses of all interfaces. The configuration procedure is not mentioned here.
Step 2 Configure the basic IS-IS functions.
# Configure S9300-A.
[S9300-A] isis
[S9300-A-isis-1] is-level level-2
[S9300-A-isis-1] network-entity 10.0000.0000.0001.00
[S9300-A-isis-1] quit
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] isis enable 1
[S9300-A-Vlanif10] quit
[S9300-A] interface vlanif 20
[S9300-A-Vlanif20] isis enable 1
[S9300-A-Vlanif20] quit
# Configure S9300-B.
[S9300-B] isis
[S9300-B-isis-1] is-level level-2
[S9300-B-isis-1] network-entity 10.0000.0000.0002.00
[S9300-B-isis-1] quit
[S9300-B] interface vlanif 30
[S9300-B-Vlanif30] isis enable 1
[S9300-B-Vlanif30] quit
[S9300-B] interface vlanif 20
[S9300-B-Vlanif20] isis enable 1
[S9300-B-Vlanif20] quit
[S9300-B] interface vlanif 40
[S9300-B-Vlanif40] isis enable 1
[S9300-B-Vlanif40] quit
# Configure S9300-C.
[S9300-C] isis
[S9300-C-isis-1] is-level level-2
[S9300-C-isis-1] network-entity 10.0000.0000.0003.00
[S9300-C-isis-1] quit
[S9300-C] interface vlanif 10
[S9300-C-Vlanif10] isis enable 1
[S9300-C-Vlanif10] quit
[S9300-C] interface vlanif 30
[S9300-C-Vlanif30] isis enable 1
[S9300-C-Vlanif30] quit
# After the preceding configurations are complete, run the display isis peer command. You can
view the neighbor relationship set up between S9300-A and S9300-B, and the neighbor
relationship between S9300-A and S9300-C. Take S9300-A for example. The display is as
follows:
[S9300-A] display isis peer
Peer information for ISIS(1)
----------------------------
System Id interface circuit Id State HoldTime Type PRI
0000.0000.0002 Vlanif20 0000.0000.0002.01 Up 9s L2 64
0000.0000.0003 Vlanif10 0000.0000.0001.02 Up 21s L2 64
Total Peer(s): 2
# S9300s learn routes from each other. Take S9300-A for example. The routing table is as
follows:
[S9300-A] display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destin-Ations : 8 Routes : 9
As shown in the routing table, the next hop address of the route to 172.16.1.0/24 is 3.3.3.2 and
service flows are transferred on the main link S9300-A→S9300-B.
# Configure S9300-A.
[S9300-A] interface vlanif 20
[S9300-A-Vlanif20] isis cost 5
[S9300-A-Vlanif20] quit
# Configure S9300-B.
[S9300-B] interface vlanif 20
[S9300-B-Vlanif20] isis cost 5
[S9300-B-Vlanif20] quit
# Run the display isis bfd session all command on S9300-A, S9300-B, or S9300-C. You can
see that the BFD state is Up.
From the preceding display, you can find that the status of the BFD session between S9300-A
and S9300-B and the BFD session between S9300-A and S9300-C are Up.
# Configure BFD on VLANIF 20 of S9300-A and set the minimum interval for sending the
packets and the minimum interval for receiving the packets to 10 ms and the local detection time
multiplier to 4.
[S9300-A] interface vlanif 20
[S9300-A-Vlanif20] isis bfd enable
[S9300-A-Vlanif20] isis bfd min-tx-interval 100 min-rx-interval 100 detect-
multiplier 4
[S9300-A-Vlanif20] quit
# Configure BFD on VLANIF 20 of S9300-B and set the minimum interval for sending the
packets and the minimum interval for receiving the packets to 100 ms and the local detection
time multiplier to 4.
[S9300-B] bfd
[S9300-B-bfd] quit
[S9300-B] interface vlanif 20
[S9300-B-Vlanif20] isis bfd enable
[S9300-B-Vlanif20] isis bfd min-tx-interval 100 min-rx-interval 100 detect-
multiplier 4
[S9300-B-Vlanif20] quit
# Run the display ospf bfd session all command on S9300-A or S9300-B. You can see that the
BFD parameters take effect. Take S9300-B for example. The display is as follows:
[S9300-B] display isis bfd session all
As shown in the routing table, the backup link S9300-A→S9300-C→S9300-B takes effect after
the main link fails. The next hop address of the route to 172.16.1.0/24 becomes 1.1.1.2.
# Run the display isis bfd session all command on S9300-A. You can see that only the BFD
session between S9300-A and S9300-C is Up.
[S9300-A] display isis bfd session all
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10 20
#
bfd
#
isis 1
is-level level-2
bfd all-interfaces enable
network-entity 10.0000.0000.0001.00
#
interface Vlanif10
ip address 1.1.1.1 255.255.255.0
isis enable 1
#
interface Vlanif20
ip address 3.3.3.1 255.255.255.0
isis enable 1
isis cost 5
isis bfd enable
isis bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
return
l Configuration file of S9300-B
#
sysname S9300-B
#
bfd
#
vlan batch 20 30 40
#
isis 1
is-level level-2
bfd all-interfaces enable
network-entity 10.0000.0000.0002.00
#
interface Vlanif20
ip address 3.3.3.2 255.255.255.0
isis enable 1
isis cost 5
isis bfd enable
isis bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 4
#
interface Vlanif30
ip address 2.2.2.2 255.255.255.0
isis enable 1
#
interface Vlanif40
ip address 172.16.1.1 255.255.255.0
isis enable 1
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
return
l Configuration file of S9300-C
#
sysname S9300-C
#
vlan batch 10 30
#
bfd
#
isis 1
is-level level-2
bfd all-interfaces enable
network-entity 10.0000.0000.0003.00
#
interface vlanif10
ip address 1.1.1.2 255.255.255.0
isis enable 1
#
interface Vlanif30
ip address 2.2.2.1 255.255.255.0
isis enable 1
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
return
Networking Requirements
As shown in Figure 5-30, all S9300s run BGP; an EBGP connection is established between
S9300-A and S9300-B; IBGP connections are set up between S9300-B, S9300-C, and S9300-
D.
S9300-C
GE1/0/1
GE1/0/2 GE1/0/2
GE1/0/2
GE1/0/1
AS65009
GE1/0/1
S9300-B GE1/0/3
S9300-A GE1/0/2
AS65008 GE1/0/1
S9300-D
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure IBGP connections between S9300-B, S9300-C and S9300-D.
2. Configure an EBGP connection between S9300-A and S9300-B.
3. Advertise routes through the network command on Figure 5-30-A and check the routing
tables of S9300-A, S9300-B, and S9300-C.
4. Configure BGP on S9300-B to import direct routes, and check the routing tables of
S9300-A and S9300-C.
Data Preparation
To complete the configuration, you need the following data:
l ID of the VLAN that each interface belongs to, as shown in Figure 5-30
l IP address of each VLANIF interface, as shown in Figure 5-30
l Router ID of S9300-A being 1.1.1.1 and number of the AS where S9300-A resides being
65008
l Router IDs of S9300-B, S9300-C, and S9300-D being 2.2.2.2, 3.3.3.3. and 4.4.4.4, and
number of the AS where they reside being 65009
Procedure
Step 1 Create VLANs and add interfaces to the corresponding VLANs.
<Quidway> system-view
[Quidway] sysname S9300-A
[Quidway] vlan batch 10 50
[S9300-A] interface GigabitEthernet 1/0/1
[S9300-A-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[S9300-A-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[S9300-A-GigabitEthernet1/0/1] quit
[S9300-A] interface GigabitEthernet 1/0/2
[S9300-A-GigabitEthernet1/0/2] port hybrid pvid vlan 50
[S9300-A-GigabitEthernet1/0/2] port hybrid untagged vlan 50
[S9300-A-GigabitEthernet1/0/2] quit
The configurations of S9300-B, S9300-C, and S9300-D are the same as the configuration of
S9300-A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] ip address 200.1.2.1 24
[S9300-A-Vlanif10] quit
[S9300-A] interface vlanif 50
[S9300-A-Vlanif50] ip address 8.1.1.1 8
[S9300-A-Vlanif50] quit
The configurations of S9300-B, S9300-C, and S9300-D are the same as the configuration of
S9300-A, and are not mentioned here.
Step 3 Configure IBGP connections.
# Configure S9300-B.
[S9300-B] bgp 65009
[S9300-B-bgp] router-id 2.2.2.2
[S9300-B-bgp] peer 9.1.1.2 as-number 65009
[S9300-B-bgp] peer 9.1.3.2 as-number 65009
# Configure S9300-C.
[S9300-C] bgp 65009
[S9300-C-bgp] router-id 3.3.3.3
[S9300-C-bgp] peer 9.1.3.1 as-number 65009
[S9300-C-bgp] peer 9.1.2.2 as-number 65009
[S9300-C-bgp] quit
# Configure S9300-D.
[S9300-D] bgp 65009
[S9300-D-bgp] router-id 4.4.4.4
[S9300-D-bgp] peer 9.1.1.1 as-number 65009
[S9300-D-bgp] peer 9.1.2.1 as-number 65009
[S9300-D-bgp] quit
# Configure S9300-B.
[S9300-B-bgp] peer 200.1.1.2 as-number 65008
[S9300-B-bgp] quit
You can view that the BGP connections between S9300-B and all the other S9300s are set up.
Step 5 Configure S9300-A to advertise route 8.0.0.0/8.
# Configure S9300-A to advertise routes.
[S9300-A-bgp] ipv4-family unicast
[S9300-A-bgp-af-ipv4] network 8.0.0.0 255.0.0.0
[S9300-A-bgp-af-ipv4] quit
[S9300-A-bgp] quit
According to the routing table, you can view that S9300-C has learned the route to the destination
8.0.0.0 in AS 65008, but the next hop 200.1.1.2 is unreachable. Therefore, this route is invalid.
# Configure S9300-B.
[S9300-B] bgp 65009
[S9300-B-bgp] ipv4-family unicast
[S9300-B-bgp-af-ipv4] import-route direct
[S9300-B-bgp-af-ipv4] quit
[S9300-B-bgp] quit
You can view that the route destined for 8.0.0.0 becomes valid, and the next hop is the address
of S9300-A.
# Perform the ping operation to verify the configuration.
[S9300-C] ping 8.1.1.1
PING 8.1.1.1: 56 data bytes, press CTRL_C to break
Reply from 8.1.1.1: bytes=56 Sequence=1 ttl=254 time=31 ms
Reply from 8.1.1.1: bytes=56 Sequence=2 ttl=254 time=47 ms
Reply from 8.1.1.1: bytes=56 Sequence=3 ttl=254 time=31 ms
Reply from 8.1.1.1: bytes=56 Sequence=4 ttl=254 time=16 ms
Reply from 8.1.1.1: bytes=56 Sequence=5 ttl=254 time=31 ms
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10 50
#
interface Vlanif10
ip address 200.1.1.2 255.255.255.0
#
interface Vlanif50
ip address 8.1.1.1 255.0.0.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 50
port hybrid untagged vlan 50
#
bgp 65008
router-id 1.1.1.1
peer 200.1.1.1 as-number 65009
#
ipv4-family unicast
undo synchronization
network 8.0.0.0
peer 200.1.1.1 enable
#
return
#
sysname S9300-B
#
vlan batch 10 20 30
#
interface Vlanif10
ip address 200.1.1.1 255.255.255.0
#
interface Vlanif20
ip address 9.1.3.1 255.255.255.0
#
interface Vlanif30
ip address 9.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface GigabitEthernet1/0/3
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
bgp 65009
router-id 2.2.2.2
peer 9.1.1.2 as-number 65009
peer 9.1.3.2 as-number 65009
peer 200.1.1.2 as-number 65008
#
ipv4-family unicast
undo synchronization
import-route direct
peer 9.1.1.2 enable
peer 9.1.3.2 enable
peer 200.1.1.2 enable
#
return
#
return
Networking Requirements
As shown in Figure 5-31, OSPF is used inside AS 65009. An EBGP connection is set up between
S9300-A and S9300-B. S9300-C runs OSPF instead of BGP.
Figure 5-31 Networking diagram for configuring BGP to interact with an IGP
AS 65008 AS 65009
GE1/0/2 GE1/0/2
GE1/0/1 GE1/0/1
GE1/0/1 GE1/0/2
S9300-A S9300-B S9300-C
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure OSPF on S9300-B and S9300-C.
2. Configure an EBGP connection on S9300-A and S9300-B.
3. Configure BGP to interact with OSPF on S9300-B and check the routes.
4. Configure BGP route aggregation on S9300-B to simplify the BGP routing table.
Data Preparation
To complete the configuration, you need the following data:
l ID of the VLAN that each interface belongs to, as shown in Figure 5-31
l IP address of each VLANIF interface, as shown in Figure 5-31
l Router ID of S9300-A being 1.1.1.1 and number of the AS where it resides being 65008
l Router IDs of S9300-B and S9300-C being 2.2.2.2 and 3.3.3.3, and number of the AS where
they reside being 65009
Procedure
Step 1 Create VLANs and add interfaces to the corresponding VLANs.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] vlan 10
[S9300-A-vlan10] quit
[S9300-A] vlan 30
S9300-A-vlan30] quit
[S9300-A] interface GigabitEthernet 1/0/1
[S9300-A-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[S9300-A-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[S9300-A-GigabitEthernet1/0/1] quit
[S9300-A] interface GigabitEthernet 1/0/2
[S9300-A-GigabitEthernet1/0/2] port hybrid pvid vlan 30
[S9300-A-GigabitEthernet1/0/2] port hybrid untagged vlan 30
[S9300-A-GigabitEthernet1/0/2] quit
The configurations of S9300-B and S9300-C are the same as the configuration of S9300-A, and
are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] ip address 3.1.1.2 24
[S9300-A-Vlanif10] quit
[S9300-A] interface vlanif 30
[S9300-A-Vlanif30] ip address 8.1.1.1 24
[S9300-A-Vlanif30] quit
The configurations of S9300-B and S9300-C are the same as the configuration of S9300-A, and
are not mentioned here.
Step 3 Configure OSPF.
# Configure S9300-B.
[S9300-B] ospf 1
[S9300-B-ospf-1] area 0
[S9300-B-ospf-1-area-0.0.0.0] network 9.1.1.0 0.0.0.255
[S9300-B-ospf-1-area-0.0.0.0] quit
[S9300-B-ospf-1] quit
# Configure S9300-C.
[S9300-C] ospf 1
[S9300-C-ospf-1] area 0
[S9300-C-ospf-1-area-0.0.0.0] network 9.1.1.0 0.0.0.255
[S9300-C-ospf-1-area-0.0.0.0] network 9.1.2.0 0.0.0.255
[S9300-C-ospf-1-area-0.0.0.0] quit
[S9300-C-ospf-1] quit
# Configure S9300-B.
[S9300-B] bgp 65009
[S9300-B-bgp] router-id 2.2.2.2
[S9300-B-bgp] peer 3.1.1.2 as-number 65008
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10 30
#
interface Vlanif10
ip address 3.1.1.2 255.255.255.0
#
interface Vlanif30
ip address 8.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
bgp 65008
router-id 1.1.1.1
peer 3.1.1.1 as-number 65009
#
ipv4-family unicast
undo synchronization
network 8.1.1.0 255.255.255.0
peer 3.1.1.1 enable
#
return
l Configuration file of S9300-B
#
sysname S9300-B
#
vlan batch 10 20
#
interface Vlanif10
ip address 3.1.1.1 255.255.255.0
#
interface Vlanif20
ip address 9.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
bgp 65009
router-id 2.2.2.2
peer 3.1.1.2 as-number 65008
#
ipv4-family unicast
undo synchronization
summary automatic
import-route ospf 1
peer 3.1.1.2 enable
#
ospf 1
import-route bgp
area 0.0.0.0
network 9.1.1.0 0.0.0.255
return
l Configuration file of S9300-C
#
sysname S9300-C
#
vlan batch 20 40
#
interface Vlanif20
ip address 9.1.1.2 255.255.255.0
#
interface Vlanif40
ip address 9.1.2.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
ospf 1
area 0.0.0.0
network 9.1.1.0 0.0.0.255
network 9.1.2.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-32, S9300-A belongs to AS 100, and S9300-B and S9300-C belong to
AS 200. EBGP connections are established between S9300-A and S9300-B and between
S9300-A and S9300-C.
Service flow is transmitted on the active link S9300-A → S9300-B. The link S9300-A →
S9300-C → S9300-B acts as the standby link.
Use BFD to detect the BGP peer relationship between S9300-A and S9300-B. When the link
between S9300-A and S9300-B fails, BFD can rapidly detect the fault and notify BGP. Service
flows are transmitted on the standby link.
S9300-B
GE3/0/0
GE2/0/0 GE1/0/0
GE2/0/0 EBGP
IBGP
GE1/0/0 AS 200
S9300-A
GE1/0/0 GE2/0/0
AS 100
EBGP
S9300-C
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure basic BGP functions on each S9300.
2. Configure MED attributes to control the route selection.
3. Enable BFD on S9300-A and S9300-B.
Data Preparation
To complete the configuration, you need the following data:
l Router IDs and AS numbers of S9300-A S9300-B, and S9300-C
l Peer IP address detected by BFD
l Minimum interval for sending BFD control packets, minimum interval for receiving BFD
control packets, and local detection multiplier
Procedure
Step 1 Assign IP addresses to the interfaces of S9300s. The configuration details are not mentioned
here.
Step 2 Configure basic BGP functions, establish EBGP connections between S9300-A and S9300-B
and between S9300-A and S9300-C, and establish an IBGP connection S9300-B and S9300-C.
# Configure S9300-A.
[S9300-A] bgp 100
[S9300-A-bgp] router-id 1.1.1.1
[S9300-A-bgp] peer 200.1.1.2 as-number 200
[S9300-A-bgp] peer 200.1.2.2 as-number 200
[S9300-A-bgp] quit
# Configure S9300-B.
[S9300-B] bgp 200
[S9300-B-bgp] router-id 2.2.2.2
[S9300-B-bgp] peer 200.1.1.1 as-number 100
[S9300-B-bgp] peer 9.1.1.2 as-number 200
[S9300-B-bgp] network 9.1.1.0 255.255.255.0
[S9300-B-bgp] quit
# Configure S9300-C.
[S9300-C] bgp 200
[S9300-C-bgp] router-id 3.3.3.3
[S9300-C-bgp] peer 200.1.2.1 as-number 100
[S9300-C-bgp] peer 9.1.1.1 as-number 200
[S9300-C-bgp] network 9.1.1.0 255.255.255.0
Set the MED sent from S9300-B to S9300-C through the policy.
# Configure S9300-B.
[S9300-B] route-policy 10 permit node 10
[S9300-B-route-policy] apply cost 100
[S9300-B-route-policy] quit
[S9300-B] bgp 200
[S9300-B-bgp] peer 200.1.1.2 route-policy 10 export
# Configure S9300-C.
[S9300-C] route-policy 10 permit node 10
[S9300-C-route-policy] apply cost 150
[S9300-C-route-policy] quit
[S9300-C] bgp 200
[S9300-C-bgp] peer 200.1.2.2 route-policy 10 export
According to the BGP routing table, the next hop address of the route destined for 172.16.1.0/24
is 200.1.1.2 and service flow is transmitted on the active link S9300-A → S9300-B.
Step 4 Enable BFD, and set the interval for sending packets, the interval for receiving packets, and the
local detection multiplier.
# Enable BFD on S9300-A and set the minimum interval for sending packets and the minimum
interval for receiving packets to 100 ms and the local detection multiplier to 4.
[S9300-A] bfd
[S9300-A-bfd] quit
[S9300-A] bgp 100
[S9300-A-bgp] peer 200.1.1.2 bfd enable
[S9300-A-bgp] peer 200.1.1.2 bfd min-tx-interval 100 min-rx-interval 100 detect-
multiplier 4
# Enable BFD on S9300-B and set the minimum interval for sending packets and the minimum
interval for receiving packets to 100 ms and the local detection multiplier to 4.
[S9300-B] bfd
[S9300-B-bfd] quit
[S9300-B] bgp 200
[S9300-B-bgp] peer 200.1.1.1 bfd enable
[S9300-B-bgp] peer 200.1.1.1 bfd min-tx-interval 100 min-rx-interval 100 detect-
multiplier 4
According to the BGP routing table, the standby link S9300-A → S9300-C → S9300-B takes
effect after the active link fails. The next hop address of the route destined for 172.16.1.0/24
becomes 200.1.2.2.
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
router id 1.1.1.1
#
vlan batch 10 20
#
bfd
#
interface Vlanif10
ip address 200.1.2.1 255.255.255.0
#
interface Vlanif20
ip address 200.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
#
return
Example for Configuring BGP Load Balancing and Setting the MED
Networking Requirements
As shown in Figure 5-33, all S9300s run BGP. S9300-A resides in AS 65008. Both S9300-B
and S9300-C reside in AS 65009. EBGP runs among S9300-A, S9300-B, and S9300-C. IBGP
runs between S9300-B and S9300-C.
S9300-B
GE1/0/1
EBGP
GE1/0/2
S9300-A GE1/0/1
AS 65009 IBGP
GE1/0/2
AS 65008 GE1/0/2
EBGP
GE1/0/1
S9300-C
Configuration Roadmap
The configuration roadmap is as follows:
1. Establish EBGP connections between S9300-A and S9300-B, and between S9300-A and
S9300-C; establish an IBGP connection between S9300-B and S9300-C.
2. Configure load balancing and set the MED on S9300-A and check the routing table.
Context
To complete the configuration, you need the following data:
l ID of the VLAN that each interface belongs to, as shown in Figure 5-33
l IP address of each VLANIF interface, as shown in Figure 5-33
l Router IDs of S9300-A being 1.1.1.1, number of the AS where it resides being 65008, and
number of routes for load balancing being 2
l Router IDs of S9300-B and S9300-C being 2.2.2.2 and 3.3.3.3, number of the AS where
they reside being 65008, and default MED of S9300-B being 100
Procedure
Step 1 Create VLANs and add interfaces to the corresponding VLANs.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] vlan batch 10 20
[S9300-A] interface GigabitEthernet 1/0/1
[S9300-A-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[S9300-A-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[S9300-A-GigabitEthernet1/0/1] quit
[S9300-A] interface GigabitEthernet 1/0/2
[S9300-A-GigabitEthernet1/0/2]port hybrid pvid vlan 20
[S9300-A-GigabitEthernet1/0/2]port hybrid untagged vlan 20
[S9300-A-GigabitEthernet1/0/2] quit
The configurations of S9300-B and S9300-C are the same as the configuration of S9300-A, and
are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] ip address 200.1.1.2 24
[S9300-A-Vlanif10] quit
[S9300-A] interface vlanif 20
[S9300-A-Vlanif20] ip address 200.1.2.2 24
[S9300-A-Vlanif20] quit
The configurations of S9300-B and S9300-C are the same as the configuration of S9300-A, and
are not mentioned here.
Step 3 Establish an EBGP connection.
# Configure S9300-A.
[S9300-A] bgp 65008
[S9300-A-bgp] router-id 1.1.1.1
[S9300-A-bgp] peer 200.1.1.1 as-number 65009
[S9300-A-bgp] peer 200.1.2.1 as-number 65009
[S9300-A-bgp] quit
# Configure S9300-B.
[S9300-B] bgp 65009
[S9300-B-bgp] router-id 2.2.2.2
[S9300-B-bgp] peer 200.1.1.2 as-number 65008
[S9300-B-bgp] peer 9.1.1.2 as-number 65009
[S9300-B-bgp] ipv4-family unicast
[S9300-B-bgp-af-ipv4] network 9.1.1.0 255.255.255.0
[S9300-B-bgp-af-ipv4] quit
[S9300-B-bgp] quit
# Configure S9300-C.
[S9300-C] bgp 65009
[S9300-C-bgp] router-id 3.3.3.3
[S9300-C-bgp] peer 200.1.2.2 as-number 65008
[S9300-C-bgp] peer 9.1.1.1 as-number 65009
[S9300-C-bgp] ipv4-family unicast
[S9300-C-bgp-af-ipv4] network 9.1.1.0 255.255.255.0
[S9300-C-bgp-af-ipv4] quit
[S9300-C-bgp] quit
According to the routing table, you can view that there are two valid routes destined for
9.1.1.0/24. The route whose next hop is 200.1.1.1 is the optimal route because the router ID of
S9300-B is smaller.
# Configure S9300-A.
[S9300-A] bgp 65008
[S9300-A-bgp] ipv4-family unicast
[S9300-A-bgp-af-ipv4] maximum load-balancing 2
[S9300-A-bgp-af-ipv4] quit
[S9300-A-bgp] quit
According to the routing table, you can view that the BGP route 9.1.1.0/24 has two next hops
that are 200.1.1.1 and 200.1.2.1. Both of them are optimal routes.
# Set the MED sent from S9300-B to S9300-A through the policy.
[S9300-B] route-policy 10 permit node 10
[S9300-B-route-policy] apply cost 100
[S9300-B-route-policy] quit
[S9300-B] bgp 65009
[S9300-B-bgp] peer 200.1.1.2 route-policy 10 export
According to the routing table, you can view that the MED of the next hop 200.1.1.1 (S9300-
B) is 100, and that of the next hop 200.1.2.1 is 0. Therefore, the route with the smaller MED is
selected.
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10 20
#
interface Vlanif10
ip address 200.1.1.2 255.255.255.0
#
interface Vlanif20
ip address 200.1.2.2 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
bgp 65008
router-id 1.1.1.1
peer 200.1.1.1 as-number 65009
peer 200.1.2.1 as-number 65009
#
ipv4-famlily unicast
undo synchronization
maximum load-balancing 2
peer 200.1.1.1 enable
peer 200.1.2.1 enable
#
return
undo synchronization
default med 100
network 9.1.1.0 255.255.255.0
peer 9.1.1.2 enable
peer 200.1.1.2 enable
peer 200.1.1.2 route-policy 10 export
#
route-policy 10 permit node 10
apply cost 100
#
return
Networking Requirements
As shown in Figure 5-34, S9300-A is a non-client. S9300-B is the RR of cluster 1. S9300-D
and S9300-E are two clients of cluster 1. Because the IBGP connection is created between
S9300-D and S9300-E, they do not need an RR. S9300-C is the RR of cluster 2. S9300-F,
S9300-G, and S9300-H are the clients of cluster 2.
It is required that the peer groups be used to simplify configuration and management.
GE1/0/3 S9300-A
GE1/0/1 GE1/0/2
AS 65010
Configuration Roadmap
The configuration roadmap is as follows:
1. Establish IBGP connections between the client and the RR, and between the non-client and
the RR.
2. Configure route reflection on S9300-B and S9300-C, specify the client, and check the
routes.
Data Preparation
To complete the configuration, you need the following data:
l ID of the VLAN that each interface belongs to, as shown in Figure 5-34
l IP address of each VLANIF interface, as shown in Figure 5-34
l Number of the AS where all S9300s reside being 65010
l Router IDs of S9300-A, S9300-B, S9300-C, S9300-D, S9300-E, S9300-F, S9300-G, and
S9300-H being 1.1.1.1, 2.2.2.2, 3.3.3.3, 4.4.4.4, 5.5.5.5, 6.6.6.6, 7.7.7.7, and 8.8.8.8
l ID of the cluster where S9300-B resides being 1 and ID of the cluster where S9300-C resides
being 2
Procedure
Step 1 Create VLANs and add interfaces to the corresponding VLANs.
<Quidway> system-view
[Quidway] sysname S9300-A
[Quidway] vlan batch 10 30 100
[S9300-A] interface GigabitEthernet 1/0/1
[S9300-A-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[S9300-A-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[S9300-A-GigabitEthernet1/0/1] quit
[S9300-A] interface GigabitEthernet 1/0/2
[S9300-A-GigabitEthernet1/0/2] port hybrid pvid vlan 30
[S9300-A-GigabitEthernet1/0/2] port hybrid untagged vlan 30
[S9300-A-GigabitEthernet1/0/2] quit
[S9300-A] interface GigabitEthernet 1/0/3
[S9300-A-GigabitEthernet1/0/3] port hybrid pvid vlan 100
[S9300-A-GigabitEthernet1/0/3] port hybrid untagged vlan 100
[S9300-A-GigabitEthernet1/0/3] quit
The configurations of S9300-B, S9300-C, S9300-D, S9300-E, S9300-F, S9300-G, and S9300-
H are the same as the configuration of S9300-A, and are not mentioned here.
Step 3 Establish IBGP connections between the clients and the RR, and between the non-clients and
the RR. The configuration details are not mentioned here.
Step 4 Configure S9300-A to advertise the local network route 9.1.1.0/24. The configuration details
are not mentioned here.
Step 5 Configure the RR.
# Configure S9300-B.
[S9300-B] bgp 65010
[S9300-B-bgp] router-id 2.2.2.2
[S9300-B-bgp] group in_rr internal
[S9300-B-bgp] peer 10.1.4.2 group in_rr
[S9300-B-bgp] peer 10.1.5.2 group in_rr
[S9300-B-bgp] ipv4-family unicast
[S9300-B-bgp-af-ipv4] peer in_rr reflect-client
[S9300-B-bgp-af-ipv4] undo reflect between-clients
[S9300-B-bgp-af-ipv4] reflector cluster-id 1
[S9300-B-bgp-af-ipv4] quit
[S9300-B-bgp] quit
# Configure S9300-C.
[S9300-C] bgp 65010
[S9300-C-bgp] router-id 3.3.3.3
[S9300-C-bgp] group in_rr internal
[S9300-C-bgp] peer 10.1.7.2 group in_rr
[S9300-C-bgp] peer 10.1.8.2 group in_rr
[S9300-C-bgp] peer 10.1.9.2 group in_rr
[S9300-C-bgp] ipv4-family unicast
[S9300-C-bgp-af-ipv4] peer in_rr reflect-client
[S9300-C-bgp-af-ipv4] reflector cluster-id 2
[S9300-C-bgp-af-ipv4] quit
[S9300-C-bgp] quit
According to the routing table, you can view that S9300-D has learned the route advertised by
S9300-A from S9300-B. You can also view the Originator and Cluster_ID of the route.
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10 30 100
#
interface Vlanif10
ip address 10.1.1.2 255.255.255.0
#
interface Vlanif30
ip address 10.1.3.2 255.255.255.0
#
interface Vlanif100
ip address 9.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
interface GigabitEthernet1/0/3
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
bgp 65010
router-id 1.1.1.1
peer 10.1.1.1 as-number 65010
peer 10.1.3.1 as-number 65010
#
ipv4-family unicast
undo synchronization
network 9.1.1.0 255.255.255.0
peer 10.1.1.1 enable
peer 10.1.3.1 enable
#
return
l Configuration file of S9300-B
#
sysname S9300-B
#
vlan batch 10 20 40 50
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface Vlanif20
ip address 10.1.2.1 255.255.255.0
#
interface Vlanif40
ip address 10.1.4.1 255.255.255.0
#
interface Vlanif50
ip address 10.1.5.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface GigabitEthernet1/0/3
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
interface GigabitEthernet1/0/4
port hybrid pvid vlan 50
port hybrid untagged vlan 50
#
bgp 65010
router-id 2.2.2.2
peer 10.1.1.2 as-number 65010
peer 10.1.2.2 as-number 65010
group in_rr internal
NOTE
The configuration files of other S9300s are similar to the configuration file of S9300-D, and are not
mentioned here.
Networking Requirements
As shown in Figure 5-35, several S9300s run BGP in AS 200. To reduce the number of IBGP
connections, divide AS 200 into three sub-ASs, namely AS 65001, AS 65002, and AS 65003.
In addition, IBGP connections are set up between the three S9300s in AS 65001.
AS 200
S9300-B S9300-C
AS 65002
GE1/0/1
GE1/0/1
AS 65003
AS 100 GE1/0/2
AS 65001
GE1/0/2 GE1/0/1
GE1/0/1 GE2/0/1 GE1/0/1
GE1/0/3 S9300-D
S9300-F S9300-A GE1/0/4 GE1/0/2
GE1/0/1 GE1/0/2
S9300-E
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l ID of the VLAN that each interface belongs to, as shown in Figure 5-35
l IP address of each VLANIF interface, as shown in Figure 5-35
l Router IDs of S9300-A, S9300-B, S9300-C, S9300-D, S9300-E, and S9300-F being
1.1.1.1, 2.2.2.2, 3.3.3.3, 4.4.4.4, 5.5.5.5, and 6.6.6.6
l AS 100, AS 200, and three sub-AS numbers of AS 200 are 65001, 65002, and 65003
Procedure
Step 1 Create VLANs and add interfaces to the corresponding VLANs.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] vlan batch 10 20 30 40 60
[S9300-A] interface GigabitEthernet 1/0/1
[S9300-A-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[S9300-A-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[S9300-A-GigabitEthernet1/0/1] quit
[S9300-A] interface GigabitEthernet 1/0/2
[S9300-A-GigabitEthernet1/0/2] port hybrid pvid vlan 20
[S9300-A-GigabitEthernet1/0/2] port hybrid untagged vlan 20
[S9300-A-GigabitEthernet1/0/2] quit
[S9300-A] interface GigabitEthernet 1/0/3
[S9300-A-GigabitEthernet1/0/3] port hybrid pvid vlan 30
[S9300-A-GigabitEthernet1/0/3] port hybrid untagged vlan 30
[S9300-A-GigabitEthernet1/0/3] quit
[S9300-A] interface GigabitEthernet 1/0/4
[S9300-A-GigabitEthernet1/0/4] port hybrid pvid vlan 40
[S9300-A-GigabitEthernet1/0/4] port hybrid untagged vlan 40
[S9300-A-GigabitEthernet1/0/4] quit
[S9300-A] interface GigabitEthernet 2/0/1
[S9300-A-GigabitEthernet2/0/1] port hybrid pvid vlan 60
[S9300-A-GigabitEthernet2/0/1] port hybrid untagged vlan 60
[S9300-A-GigabitEthernet2/0/1] quit
The configurations of S9300-B, S9300-C, S9300-D, S9300-E, and S9300-F are the same as the
configuration of S9300-A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] ip address 10.1.1.1 24
[S9300-A-Vlanif10] quit
[S9300-A] interface vlanif 20
[S9300-A-Vlanif20] ip address 10.1.2.1 24
[S9300-A-Vlanif20] quit
[S9300-A] interface vlanif 30
[S9300-A-Vlanif30] ip address 10.1.3.1 24
[S9300-A-Vlanif30] quit
[S9300-A] interface vlanif 40
[S9300-A-Vlanif40] ip address 10.1.4.1 24
[S9300-A-Vlanif40] quit
[S9300-A] interface vlanif 60
[S9300-A-Vlanif60] ip address 200.1.1.1 24
[S9300-A-Vlanif60] quit
The configurations of S9300-B, S9300-C, S9300-D, S9300-E, and S9300-F are the same as the
configuration of S9300-A, and are not mentioned here.
Step 3 Configure the BGP confederation.
# Configure S9300-A.
# Configure S9300-B.
[S9300-B] bgp 65002
[S9300-B-bgp] router-id 2.2.2.2
[S9300-B-bgp] confederation id 200
[S9300-B-bgp] confederation peer-as 65001 65003
[S9300-B-bgp] peer 10.1.1.1 as-number 65001
[S9300-B-bgp] quit
# Configure S9300-C.
[S9300-C] bgp 65003
[S9300-C-bgp] router-id 3.3.3.3
[S9300-C-bgp] confederation id 200
[S9300-C-bgp] confederation peer-as 65001 65002
[S9300-C-bgp] peer 10.1.2.1 as-number 65001
[S9300-C-bgp] quit
# Configure S9300-D.
[S9300-D] bgp 65001
[S9300-D-bgp] router-id 4.4.4.4
[S9300-D-bgp] peer 10.1.3.1 as-number 65001
[S9300-D-bgp] peer 10.1.5.2 as-number 65001
[S9300-D-bgp] quit
# Configure S9300-E.
[S9300-E] bgp 65001
[S9300-E-bgp] router-id 5.5.5.5
[S9300-E-bgp] peer 10.1.4.1 as-number 65001
[S9300-E-bgp] peer 10.1.5.1 as-number 65001
[S9300-E-bgp] quit
# Configure S9300-F.
[S9300-F] bgp 100
[S9300-F-bgp] router-id 6.6.6.6
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10 20 30 40 60
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface Vlanif20
ip address 10.1.2.1 255.255.255.0
#
interface Vlanif30
ip address 10.1.3.1 255.255.255.0
#
interface Vlanif40
ip address 10.1.4.1 255.255.255.0
#
interface Vlanif60
ip address 200.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface GigabitEthernet1/0/3
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
interface GigabitEthernet1/0/4
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
interface GigabitEthernet2/0/1
port hybrid pvid vlan 60
port hybrid untagged vlan 60
#
bgp 65001
router-id 1.1.1.1
confederation id 200
confederation peer-as 65002 65003
peer 10.1.1.2 as-number 65002
peer 10.1.2.2 as-number 65003
peer 10.1.3.2 as-number 65001
peer 10.1.4.2 as-number 65001
peer 200.1.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
peer 10.1.1.2 enable
peer 10.1.1.2 next-hop-local
peer 10.1.2.2 enable
peer 10.1.2.2 next-hop-local
peer 10.1.3.2 enable
peer 10.1.3.2 next-hop-local
peer 10.1.4.2 enable
peer 10.1.4.2 next-hop-local
peer 200.1.1.2 enable
#
return
#
sysname S9300-B
#
vlan batch 10
#
interface Vlanif10
ip address 10.1.1.2 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
bgp 65002
router-id 2.2.2.2
confederation id 200
confederation peer-as 65001 65003
peer 10.1.1.1 as-number 65001
#
ipv4-family unicast
undo synchronization
peer 10.1.1.1 enable
#
return
Networking Requirements
As shown in Figure 5-36, S9300-A receives routes from the Internet, and provides some of the
routes for S9300-B on the network where OSPF runs. It is required that:
l S9300-A should provide 172.1.17.0/24, 172.1.18.0/24, and 172.1.19.0/24 for S9300-B.
l S9300-C should receive only 172.1.18.0/24. S9300-D should receive all routes provided
by S9300-B.
Figure 5-36 Networking diagram for filtering the received and advertised routes
S9300-C
GE1/0/1
S9300-B 172.1.16.0/24
172.1.17.0/24
GE1/0/2 GE1/0/1 172.1.18.0/24
GE1/0/3 GE1/0/1 172.1.19.0/24
172.1.20.0/24
S9300-A
OSPF
GE1/0/1
S9300-D
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Create VLANs and add interfaces to the corresponding VLANs.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] vlan 10
[S9300-A-vlan10] quit
[S9300-A] interface GigabitEthernet 1/0/1
[S9300-A-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[S9300-A-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[S9300-A-GigabitEthernet1/0/1] quit
The configurations of S9300-B, S9300-C, and S9300-D are the same as the configuration of
S9300-A, and are not mentioned here.
The configurations of S9300-B, S9300-C, and S9300-D are the same as the configuration of
S9300-A, and are not mentioned here.
# Configure S9300-A.
[S9300-A] ospf
[S9300-A-ospf-1] area 0
[S9300-A-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[S9300-A-ospf-1-area-0.0.0.0] quit
[S9300-A-ospf-1] quit
# Configure S9300-B.
[S9300-B] ospf
[S9300-B-ospf-1] area 0
[S9300-B-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[S9300-B-ospf-1-area-0.0.0.0] network 192.168.2.0 0.0.0.255
[S9300-B-ospf-1-area-0.0.0.0] network 192.168.3.0 0.0.0.255
[S9300-B-ospf-1-area-0.0.0.0] quit
[S9300-B-ospf-1] quit
# Configure S9300-C.
[S9300-C] ospf
[S9300-C-ospf-1] area 0
[S9300-C-ospf-1-area-0.0.0.0] network 192.168.2.0 0.0.0.255
[S9300-C-ospf-1-area-0.0.0.0] quit
[S9300-C-ospf-1] quit
# Configure S9300-D.
[S9300-D] ospf
[S9300-D-ospf-1] area 0
[S9300-D-ospf-1-area-0.0.0.0] network 192.168.3.0 0.0.0.255
[S9300-D-ospf-1-area-0.0.0.0] quit
[S9300-D-ospf-1] quit
Step 4 Configure five static routes on S9300-A, and import these routes into OSPF.
[S9300-A] ip route-static 172.1.16.0 24 NULL0
[S9300-A] ip route-static 172.1.17.0 24 NULL0
[S9300-A] ip route-static 172.1.18.0 24 NULL0
[S9300-A] ip route-static 172.1.19.0 24 NULL0
[S9300-A] ip route-static 172.1.20.0 24 NULL0
[S9300-A] ospf
[S9300-A-ospf-1] import-route static
[S9300-A-ospf-1] quit
# Check the routing table on S9300-B. You can view that the five static routes are imported into
OSPF.
[S9300-B] display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 13 Routes : 13
# Configure a routing policy for advertising routes on S9300-A and use IP prefix list a2b to filter
routes.
[S9300-A] ospf
[S9300-A-ospf-1] filter-policy ip-prefix a2b export static
# Check the routing table on S9300-B, and you can find that S9300-B receives only three routes
defined in IP prefix list a2b.
[S9300-B] display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 11 Routes : 11
# Configure a routing policy for receiving routes on S9300-C, and use IP prefix list in to filter
routes.
[S9300-C] ospf
[S9300-C-ospf-1] filter-policy ip-prefix in import
# Check the routing table on S9300-C, and you can find that S9300-C in the local core routing
table receives only one route defined in IP prefix list in.
[S9300-C] display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 6 Routes : 6
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10
#
interface Vlanif10
ip address 192.168.1.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
ospf 1
filter-policy ip-prefix a2b export static
import-route static
area 0.0.0.0
network 192.168.1.0 0.0.0.255
#
ip ip-prefix a2b index 10 permit 172.1.17.0 24
ip ip-prefix a2b index 20 permit 172.1.18.0 24
ip ip-prefix a2b index 30 permit 172.1.19.0 24
#
ip route-static 172.1.16.0 255.255.255.0 NULL0
ip route-static 172.1.17.0 255.255.255.0 NULL0
ip route-static 172.1.18.0 255.255.255.0 NULL0
ip route-static 172.1.19.0 255.255.255.0 NULL0
ip route-static 172.1.20.0 255.255.255.0 NULL0
#
return
Networking Requirements
As shown in Figure 5-37, S9300-B and S9300-A exchange the routing information through
OSPF; S9300-B and S9300-C exchange the routing information through IS-IS.
S9300-B is required to import IS-IS routes into OSPF and to use the routing policy to set the
route attributes. The cost of the route 172.17.1.0/24 is set to 100, and the tag of the route
172.17.2.0/24 is set to 20.
Figure 5-37 Networking diagram for applying a routing policy to the imported routes
S9300-B
S9300-A S9300-C GE1/0/1
GE1/0/1 GE1/0/2 GE1/0/2
GE1/0/1 GE1/0/1
GE1/0/3
OSPF IS-IS
Configuration Roadmap
The configuration roadmap is as follows:
1. Specify the ID of the VLAN that each interface belongs to.
2. Assign an IP address to each VLANIF interface.
3. Configure basic IS-IS functions on S9300-B and S9300-C.
4. Configure OSPF on S9300-A and S9300-B and import IS-IS routes.
5. Configure a routing policy on S9300-B and apply the routing policy when OSPF imports
IS-IS routes, and check the routes.
Data Preparation
To complete the configuration, you need the following data.
l IS-IS level of S9300-C being Level-2 and system ID being 0000.0000.0001, IS-IS level of
S9300-B being Level-2, system ID being 0000.0000.0002, and number of the area where
S9300-B and S9300-C reside being 10
l S9300-A and S9300-B located in Area 0, that is, the backbone area
l Names of the filtering list and IP prefix list, cost of the route 172.17.1.0/24 being 100, and
tag of the route 172.17.2.0/24 being 20
Procedure
Step 1 Create a VLAN and add the corresponding interface to the VLAN.
<Quidway> system-view
[Quidway] sysname S9300-A
The configurations of S9300-B, S9300-C, and S9300-D are the same as the configuration of
S9300-A, and are not mentioned here.
Step 2 Assign an IP address to each VLANIF interface.
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] ip address 192.168.1.1 24
[S9300-A-Vlanif10] quit
The configurations of S9300-B, S9300-C, and S9300-D are the same as the configuration of
S9300-A, and are not mentioned here.
Step 3 Configure IS-IS.
# Configure S9300-C.
[S9300-C] isis
[S9300-C-isis-1] is-level level-2
[S9300-C-isis-1] network-entity 10.0000.0000.0001.00
[S9300-C-isis-1] quit
[S9300-C] interface vlanif 20
[S9300-C-Vlanif20] isis enable
[S9300-C-Vlanif20] quit
[S9300-C] interface vlanif 30
[S9300-C-Vlanif30] isis enable
[S9300-C-Vlanif30] quit
[S9300-C] interface vlanif 40
[S9300-C-Vlanif30] isis enable
[S9300-C-Vlanif30] quit
[S9300-C] interface vlanif 50
[S9300-C-Vlanif30] isis enable
[S9300-C-Vlanif30] quit
# Configure S9300-B.
[S9300-B] isis
[S9300-B-isis-1] is-level level-2
[S9300-B-isis-1] network-entity 10.0000.0000.0002.00
[S9300-B-isis-1] quit
[S9300-B] interface vlanif 20
[S9300-B-Vlanif20] isis enable
[S9300-B-Vlanif20] quit
# Check the OSPF routing table of S9300-A, and you can view the imported routes.
Total Nets: 5
Intra Area: 1 Inter Area: 0 ASE: 4 NSSA: 0
# Check the OSPF routing table of S9300-A, and you can view that the cost of the route with
the destination address as 172.17.1.0/24 is 100, and that the tag of the route destined for
172.17.2.0/24 is 20. Other routing attributes, however, do not change.
[S9300-A] display ospf routing
Total Nets: 5
Intra Area: 1 Inter Area: 0 ASE: 4 NSSA: 0
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10
#
interface Vlanif10
ip address 192.168.1.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
ospf 1
area 0.0.0.0
network 192.168.1.0 0.0.0.255
#
return
#
route-policy isis2ospf permit node 20
if-match acl 2002
apply tag 20
#
route-policy isis2ospf permit node 30
#
ip ip-prefix prefix-a index 10 permit 172.17.1.0 24
#
return
Networking Requirements
As shown in Figure 5-38, the backup outbound interface and the IP address of the backup next
hop need to be configured on S9300-T so that link B is configured as the backup of link A. When
link A fails, the traffic is quickly switched to link B.
Internet
192.168.1.1/24 100.55.1.1/24
Router-C Router-B
GE1/0/1 GE1/0/1
GE1/0/0 VLANIF 40 VLANIF 20 GE1/0/0
VLANIF30 VLANIF 10
S9300-C S9300-B
GE1/0/2 GE1/0/2
GE1/0/3 VALNIF70 VLANIF70 GE1/0/3
VLANIF50 VLANIF60
GE1/0/0 GE1/0/1
VLANIF50 VLANIF60
S9300-A
Configuration Roadmap
The configuration roadmap is as follows:
2. Set greater costs on VLANIF 30 of S9300-T and VLANIF 40 of S9300-C so that OSPF
preferentially selects link A.
3. Configure a routing policy on S9300-T, configure the nexthop and backup outbound
interface, enable the IP FRR function on a public network, and check the information about
the backup outbound interface and the backup nexthop.
4. Check the information about the backup outbound interface and the backup next hop after
IP FRR is disabled.
Data Preparation
To complete the configuration, you need the following data:
l Cost of the OSPF interface being 100
l Name of the routing policy, IP address of the backup next hop 192.168.20.2, and backup
outbound interface VLANIF 30
Procedure
Step 1 Assign an IP address to each interface.
The configuration details are not mentioned here.
Step 2 Configure OSPF on S9300-T, S9300-A, S9300-B, and S9300-C.
The configuration details are not mentioned here.
Step 3 Set the costs of OSPF interfaces.
# Set the cost on VLANIF 30 of S9300-T so that OSPF preferentially selects link A.
<S9300-T> system-view
[S9300-T] interface vlanif 30
[S9300-T-Vlanif30] ospf cost 100
# Set the cost on VLANIF 40 of S9300-C so that OSPF preferentially selects link A.
<S9300-C> system-view
[S9300-C] interface vlanif 40
[S9300-C-Vlanif40] ospf cost 100
Step 5 Check the information about a backup outbound interface and the IP address of the backup next
hop.
# Check the information about the backup outbound interface and the IP address of the backup
next hop on S9300-T.
<S9300-T> display ip routing-table verbose
Destination: 172.17.1.0/24
Step 6 When the IP FRR function is not required, run the undo ip frr command to disable the function.
[S9300-T] undo ip frr
Step 7 Check information about the backup outbound interface and the IP address of the backup next
hop after the IP FRR function is disabled.
<S9300-T> display ip routing-table verbose
Destination: 172.17.1.0/24
Protocol: OSPF Process ID: 1
Preference: 10 Cost: 3
NextHop: 192.168.10.2 Interface: Vlanif10
RelyNextHop: 0.0.0.0 Neighbour: 0.0.0.0
Label: NULL Tunnel ID: 0x0
SecTunnel ID: 0x0
BkNextHop: 0.0.0.0 BkInterface:
BkLabel: 0 Tunnel ID: 0x0
SecTunnel ID: 0x0
State: Active Adv Age: 01h16m46s
Tag: 0
----End
Configuration Files
l Configuration file of S9300-T
#
sysname S9300-T
#
vlan batch 10 30 50
#
ip frr route-policy ip_frr_rp
#
interface Vlanif50
ip address 172.16.1.1 255.255.255.0
#
interface Vlanif10
ip address 192.168.10.1 255.255.255.0
#
interface Vlanif30
ip address 192.168.20.1 255.255.255.0
ospf cost 100
#
interface GigabitEthernet1/0/0
port link-type access
port defult vlan 50
#
interface GigabitEthernet2/0/0
port link-type access
port defult vlan 10
#
interface GigabitEthernet3/0/0
port link-type access
port defult vlan 30
#
ospf 1
area 0.0.0.0
interface Vlanif30
ip address 192.168.20.2 255.255.255.0
#
interface Vlanif40
ip address 192.168.21.2 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
ospf 1
area 0.0.0.0
network 192.168.20.0 0.0.0.255
network 192.168.21.0 0.0.0.255
#
return
l Configuration file of S9300-C
#
sysname S9300-C
#
vlan batch 20 40 60
#
interface Vlanif60
ip address 172.17.1.1 255.255.255.0
#
interface Vlanif20
ip address 192.168.11.1 255.255.255.0
#
interface Vlanif40
ip address 192.168.21.1 255.255.255.0
ospf cost 100
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 60
port hybrid untagged vlan 60
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
ospf 1
area 0.0.0.0
network 192.168.11.0 0.0.0.255
network 192.168.21.0 0.0.0.255
area 0.0.0.2
network 172.17.1.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-39, the backup outbound interface and the IP address of the backup next
hop need to be configured on S9300-T so that link B is configured as the backup of link A. When
link A fails, the traffic is quickly switched to link B.
GE1/0/0 GE2/0/0
GE2/0/0 GE2/0/0
LinkA
GE1/0/0 GE1/0/0
S9300-T S9300-C
GE3/0/0 LinkB GE3/0/0
GE1/0/0 GE2/0/0
S9300-B
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure basic OSPF functions on each S9300.
2. Create VPN 1 on S9300-T and bind VLANIF 10 and VLANIF 30 to VPN1; configure
OSPF multi-instance.
3. Set greater costs on VLANIF 30 of S9300-T and VLANIF 40 of S9300-C so that OSPF
preferentially selects link A.
4. Enable the IP FRR function for S9300-T on a private network.
Data Preparation
To complete the configuration, you need the following data:
l VPN instance name being VPN 1 on S9300-T, route-distinguisher being 100:1, VPN-target
being 111:1, and area 0 and area 1 where OSPF is enabled
l OSPF costs of VLANIF 30 on S9300-T and VLANIF 40 on S9300-C being 100
Procedure
Step 1 Assign an IP address to each interface.
The configuration details are not mentioned here.
Step 2 Configure OSPF on S9300-A, S9300-B, and S9300-C.
The configuration details are not mentioned here.
Step 3 Create VPN 1 and OSPF multi-instance on S9300-T.
# Create VPN 1 on S9300-T and bind VLANIF 10 and VLANIF 30 to VPN 1.
<S9300-T> system-view
[S9300-T] ip vpn-instance vpn1
[S9300-T-vpn-instance-vpn1] route-distinguisher 100:1
[S9300-T-vpn-instance-vpn1] vpn-target 111:1
[S9300-T-vpn-instance-vpn1] quit
[S9300-T] interface vlanif 10
[S9300-T-Vlanif10] ip binding vpn-instance vpn1
[S9300-T-Vlanif10] ip address 192.168.10.1 24
[S9300-T-Vlanif10] quit
[S9300-T] interface vlanif 30
[S9300-T-Vlanif30] ip binding vpn-instance vpn1
[S9300-T-Vlanif30] ip address 192.168.20.1 24
# Set the cost on VLANIF 40 of S9300-C so that OSPF preferentially selects link A.
[S9300-C] interface vlanif 40
[S9300-C-Vlanif40] ospf cost 100
# Configure a Route-Policy, an IP address of the backup next hop, and a backup outbound
interface on S9300-T.
[S9300-T] route-policy ip_frr_rp permit node 10
[S9300-T-route-policy] apply backup-nexthop 192.168.20.2
[S9300-T-route-policy] apply backup-interface vlanif 30
# Check information about the backup outbound interface and the IP address of the backup next
hop.
<S9300-T> display ip routing-table vpn-instance vpn1 verbose
Destination: 172.17.1.0/24
Protocol: OSPF Process ID: 1
Preference: 10 Cost: 3
NextHop: 192.168.10.2 Interface: Vlanif20
RelyNextHop: 0.0.0.0 Neighbour: 0.0.0.0
Label: NULL Tunnel ID: 0x0
SecTunnel ID: 0x0
BkNextHop: 192.168.20.2 BkInterface: Vlanif30
BkLabel: 0 Tunnel ID: 0x0
SecTunnel ID: 0x0
State: Active Adv Age: 01h16m46s
Tag: 0
Step 6 When the IP FRR function is not required, run the undo ip frr command to disable it.
[S9300-T-vpn-instance-vpn1] undo ip frr
Step 7 Check information about the backup outbound interface and the IP address of the backup next
hop after the IP FRR function is disabled.
<S9300-T> display ip routing-table vpn-instance vpn1 verbose
Destination: 172.17.1.0/24
Protocol: OSPF Process ID: 1
Preference: 10 Cost: 3
NextHop: 192.168.10.2 Interface: Vlanif10
RelyNextHop: 0.0.0.0 Neighbour: 0.0.0.0
Label: NULL Tunnel ID: 0x0
SecTunnel ID: 0x0
BkNextHop: 0.0.0.0 BkInterface:
----End
Configuration Files
l Configuration file of S9300-T
#
sysname S9300-T
#
vlan batch 10 30 50
#
ip vpn-instance vpn1
route-distinguisher 100:1
ip frr route-policy ip_frr_rp
vpn-target 111:1 export-extcommunity
vpn-target 111:1 import-extcommunity
#
interface Vlanif50
ip address 172.16.1.1 255.255.255.0
#
interface Vlanif10
ip binding vpn-instance vpn1
ip address 192.168.10.1 255.255.255.0
#
interface Vlanif30
ip binding vpn-instance vpn1
ip address 192.168.20.1 255.255.255.0
ospf cost 100
#
interface GigabitEthernet1/0/0
port link-type access
port defult vlan 50
#
interface GigabitEthernet2/0/0
port link-type access
port defult vlan 10
#
interface GigabitEthernet3/0/0
port link-type access
port defult vlan 30
#
ospf 1 vpn-instance vpn1
area 0.0.0.0
network 192.168.10.0 0.0.0.255
network 192.168.20.0 0.0.0.255
#
route-policy ip_frr_rp permit node 10
apply backup-nexthop 192.168.20.2
apply backup-interface GigabitEthernet 3/0/0
interface Vlanif30
ip address 192.168.20.2 255.255.255.0
#
interface Vlanif40
ip address 192.168.21.2 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
ospf 1
area 0.0.0.0
network 192.168.20.0 0.0.0.255
network 192.168.21.0 0.0.0.255
#
return
l Configuration file of S9300-C
#
sysname S9300-C
#
vlan batch 20 60 40
#
interface vlanif60
ip address 172.17.1.1 255.255.255.0
#
interface Vlanif20
ip address 192.168.11.1 255.255.255.0
#
interface vlanif40
ip address 192.168.21.1 255.255.255.0
ospf cost 100
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 60
port hybrid untagged vlan 60
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
ospf 1
area 0.0.0.0
network 192.168.11.0 0.0.0.255
network 192.168.21.0 0.0.0.255
area 0.0.0.2
network 172.17.1.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-40, the NMS accesses the S9300 through SNMP and manages the
S9300.
1.1.1.2/24
NM Station
S9300 1.1.1.1/24
Configuration Roadmap
The configuration roadmap is as follows:
1. Assign IP addresses to interfaces.
2. Set the version of SNMP.
3. Set the SNMP community name.
Data Preparation
To complete the configuration, you need the following data:
l IP addresses of interfaces
l SNMP version
l Community name
Procedure
Step 1 Configure IP addresses of the interfaces. The configuration procedure is not mentioned here.
Step 2 Set the version of SNMP.
NOTE
# Enter the system view, cancel the version number of SNMP used by the system.
<Quidway> system-view
[Quidway] sysname S9300
[S9300] undo snmp-agent sys-info version all
Community name:private
Group name:private
Storage-type: nonVolatile
----End
Configuration Files
The configuration file on the S9300 is as follows:
#
sysname S9300
#
vlan batch 100
#
interface Vlanif100
ip address 1.1.1.2 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
snmp-agent
snmp-agent local-engineid 000007DB7F00000100003598
snmp-agent community write write
snmp-agent community read public
snmp-agent community write private
snmp-agent sys-info version v1
#
return
Networking Requirements
As shown in Figure 5-41, a reachable route exists between the NMS and the S9300. The IP
address of the NMS is 1.1.1.1/24; the interface connecting the S9300 to the network resides on
2.2.2.2/24. The S9300 can be remotely managed by the specified NMS.
To rectify faults quickly, you need to configure the contact method of the administrator and the
location information on the S9300.
The S9300 needs to monitor the status of batch statistics collection. If the statistics collection
fails, the S9300 should send a trap message to the NMS.
Figure 5-41 Networking diagram for specifying an NMS to manage the S9300
GE 1/0/0
VLANIF 100
2.2.2.2/24
IP Network
NM Station
S9300
1.1.1.1/24
Configuration Roadmap
The configuration roadmap is as follows:
4. Set the contact information about the administrator and the physical location of the
S9300.
5. Configure the trap function.
6. Configure the NMS.
Data Preparation
To complete the configuration, you need the following data:
l SNMP version
l Community name and access authority
l Administrator information and location of the S9300
l Number of an ACL
Procedure
Step 1 Configure the access control function of SNMP.
<S9300> system-view
# Enter the system view, cancel the version number of SNMP used by the system.
[S9300] undo snmp-agent sys-info version all
# Start the SNMP agent, and set the SNMP version to SNMPv2c.
[S9300] snmp-agent sys-info version v2c
# When a trap is generated, you can run the display trapbuffer command to view details about
the trap.
[S9300] display trapbuffer
Trapping Buffer Configuration and contents:
enabled
allowed max buffer size : 1024
actual buffer size : 256
channel number : 3 , channel name : trapbuffer
dropped messages : 0
overwritten messages : 0
current messages : 1
#Feb 1 08:49:55 2009 S9300 ENTMIB/4/TRAP:1.3.6.1.2.1.47.2.0.1 Entity MIB change.
----End
Configuration Files
The configuration file on the S9300 is as follows:
#
sysname S9300
#
vlan batch 100
#
acl number 2000
#
interface Vlanif100
ip address 2.2.2.2 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
ospf 1
area 0.0.0.0
network 2.2.2.0 0.0.0.255
#
snmp-agent
snmp-agent local-engineid 000007DB7F000001000031E7
snmp-agent community read public acl 2000
snmp-agent community write private acl 2000
snmp-agent sys-info contact Mr.Wang-Tel:21657
snmp-agent sys-info location telephone-closet,2rd-floor
snmp-agent sys-info version v2c
snmp-agent target-host Trap address udp-domain 1.1.1.1 params securityname public
v2c
#
return
Networking Requirements
As shown in Figure 5-42, reachable routes exist between NMS1 and the S9300, and between
NMS2 and the S9300. The IP address of the interface connecting NMS1 to the network is on
1.1.1.1/24; the IP address of the interface connecting NMS2 to the network is on 1.1.1.2/24. The
IP address of the Ethernet interface connecting the S9300 to the network is on 1.1.2.1/24.
By using the security feature of SNMPv3, configure NMS1 to completely control the network
and configure NMS2 to manage only the interfaces on the S9300.
Figure 5-42 Networking diagram for configuring different NMSs to access the S9300
GE 1/0/0
NMS 1
1.1.1.1/24 VLANIF 100
1.1.2.1/24
IP
Nework
S9300
NMS 2
1.1.1.2/24
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure basic SNMP functions on the S9300, including enabling the SNMP agent and
setting the SNMP version.
2. Configure the access rights.
3. Configure the trap function.
4. Configure the NMS.
Data Preparation
To complete the configuration, you need the following data:
l SNMP version
l User group name and user name
l Information about the MIB objects
l Passwords for authentication and encryption
Procedure
Step 1 Configure reachable routes between the S9300 and the NMSs. The configuration procedure is
not mentioned.
# Start the SNMP agent and set the SNMP version to SNMPv3.
<S9300> system-view
[S9300] snmp-agent sys-info version v3
NOTE
The default view is internet, excluding snmpUsmMIB, snmpVacmMIB, and snmpModules.18. Modifying
the attributes of snmpUsmMIB, snmpVacmMIB, or snmpModules.18 will lead to security problem.
Install the Huawei iManager N2000 DMS on the NMS, configure the SNMP function of the
iManager N2000 DMS, and then you can manage the S9300.
For the configuration and usage of the iManager N2000 DMS, refer to the HUAWEI iManager
N2000 DMS-Compound Package User Manual Volume II.
View name:ViewDefault
MIB Subtree:snmpUsmMIB
Subtree mask:
Storage-type: nonVolatile
View Type:excluded
View status:active
View name:ViewDefault
MIB Subtree:snmpVacmMIB
Subtree mask:
Storage-type: nonVolatile
View Type:excluded
View status:active
View name:ViewDefault
MIB Subtree:snmpModules.18
Subtree mask:
Storage-type: nonVolatile
View Type:excluded
View status:active
# When a trap is generated, you can run the display trapbuffer command to view details about
the trap.
<S9300> display trapbuffer
Trapping Buffer Configuration and contents:
enabled
allowed max buffer size : 1024
actual buffer size : 256
channel number : 3 , channel name : trapbuffer
dropped messages : 0
overwritten messages : 0
current messages : 1
#Feb 1 08:49:55 2009 S9300 ENTMIB/4/TRAP:1.3.6.1.2.1.47.2.0.1 Entity MIB change
----End
Configuration Files
The configuration file on the S9300 is as follows:
#
sysname S9300
#
vlan batch 100
#
interface Vlanif100
ip address 1.1.2.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
ospf 1
area 0.0.0.0
network 1.1.2.0 0.0.0.255
#
snmp-agent
snmp-agent local-engineid 000007DB7F00000100000132
snmp-agent sys-info contact R&D Nanjing, Huawei Technologies co.,Ltd.
snmp-agent sys-info location Nanjing China
snmp-agent sys-info version v3
snmp-agent group v3 NMS1 read-view c write-view c notify-view c
snmp-agent group v3 NMS2 read-view b write-view b notify-view b
snmp-agent group v3 NMS1 privacy
snmp-agent group v3 NMS2 privacy
snmp-agent target-host trap address udp-domain 1.1.1.1 params securityname NMS1
v3
snmp-agent target-host trap address udp-domain 1.1.1.2 params securityname NMS2
v3
snmp-agent mib-view included b interfaces
snmp-agent mib-view included c iso
snmp-agent usm-user v3 test1 NMS1 authentication-mode md5 TV"8'@O_6I!PN<^R;_><IA!!
privacy-mode des56 a>;@2Y`MQRZS<EPZ].X-!!!! acl 2000
snmp-agent usm-user v3 test2 NMS2 authentication-mode md5 TV"8'@O_6I!PN<^R;_><IA!!
privacy-mode des56 a>;@2Y`MQRZS<EPZ].X-!!!! acl 2000
snmp-agent trap enable eth-trunk
snmp-agent trap enable l2service
snmp-agent trap enable bfd
snmp-agent trap enable bgp
snmp-agent trap enable static-lsp
snmp-agent trap enable te tunnel-reop
snmp-agent trap enable te te-frr
snmp-agent trap enable te te-frr private
snmp-agent trap enable te hot-standby
snmp-agent trap enable te ordinary
snmp-agent trap enable te state-change-private
snmp-agent trap enable te bandwidth-change
snmp-agent trap enable mpls-oam
Example for Configuring Different NMSs to Access the S9300 (Inform Mode)
Networking Requirements
As shown in Figure 5-43, reachable routes exist between NMS1 and the S9300, and between
NMS2 and the S9300. The IP address of the interface connecting NMS1 to the network is on
1.1.1.1/24; the IP address of the interface connecting NMS2 to the network is on 1.1.1.2/24. The
IP address of the Ethernet interface connecting the S9300 to the network is on 1.1.2.1/24.
By using the security feature of SNMPv3, configure NMS1 to completely control the network
and configure NMS2 to manage only the interfaces on the S9300.
The NMSs manage the S9300 remotely. The S9300 sends trap messages to the NMSs in Inform
mode.
Figure 5-43 Networking diagram for configuring different NMSs to access the S9300 (inform
mode)
GE 1/0/0
NMS 1 VLANIF 100
1.1.1.1/24
1.1.2.1/24
IP
Nework
S9300
NMS 2
1.1.1.2/24
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure basic SNMP functions on the S9300, including enabling the SNMP agent and
setting the SNMP version.
2. Configure access rights.
3. Configure the Inform function.
4. Configure the NMSs.
Data Preparation
To complete the configuration, you need the following data:
l SNMP version
l Information about the user group and users
l Information about the MIB objects
l Passwords for authentication and encryption
Procedure
Step 1 Configuring basic SNMP functions
# Enter the system view, start the SNMP agent, and set the SNMP version to SNMPv3.
<Quidway> system-view
[Quidway] S9300
[S9300] snmp-agent sys-info version v3
NOTE
# Configure the S9300 to send trap messages to the NMSs in inform mode.
[S9300] snmp-agent target-host inform address udp-domain 1.1.1.1 params
securityname NMS1 v3
[S9300] snmp-agent target-host inform address udp-domain 1.1.1.2 params
securityname NMS2 v3
Install the Huawei iManager N2000 DMS on the NMS, configure the SNMP function of the
iManager N2000 DMS, and then you can manage the S9300.
For the configuration and usage of the iManager N2000 DMS, refer to the HUAWEI iManager
N2000 DMS-Compound Package User Manual Volume II.
----End
Configuration Files
The configuration file on the S9300 is as follows:
#
sysname S9300
#
vlan batch 100
#
interface Vlanif100
ip address 1.1.2.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
ospf 1
area 0.0.0.0
network 1.1.2.0 0.0.0.255
#
#
snmp-agent
snmp-agent local-engineid 000007DB7F00000100000132
snmp-agent sys-info contact R&D Nanjing, Huawei Technologies co.,Ltd.
snmp-agent sys-info location Nanjing China
snmp-agent sys-info version v3
snmp-agent group v3 test1 read-view a write-view a notify-view a
snmp-agent group v3 test2 read-view b write-view b notify-view b
snmp-agent target-host inform address udp-domain 1.1.1.2 params securityname NMS2
v3
snmp-agent target-host inform address udp-domain 1.1.1.1 params securityname NMS1
v3
snmp-agent mib-view included a iso
snmp-agent mib-view included b interfaces
snmp-agent usm-user v3 NMS1 test1 authentication-mode md5 TV"8'@O_6I!
PN<^R;_><IA!! privacy-mode des56 a>;@2Y`MQRZS<EPZ].X-!!!!
snmp-agent usm-user v3 NMS2 test2 authentication-mode md5 TV"8'@O_6I!
PN<^R;_><IA!! privacy-mode des56 a>;@2Y`MQRZS<EPZ].X-!!!!
snmp-agent trap enable eth-trunk
snmp-agent trap enable l2service
snmp-agent trap enable bfd
snmp-agent trap enable bgp
snmp-agent trap enable static-lsp
snmp-agent trap enable te tunnel-reop
snmp-agent trap enable te te-frr
snmp-agent trap enable te te-frr private
snmp-agent trap enable te hot-standby
snmp-agent trap enable te ordinary
snmp-agent trap enable te state-change-private
snmp-agent trap enable te bandwidth-change
snmp-agent trap enable mpls-oam
snmp-agent trap enable l3vpn
snmp-agent trap enable l2-multicast
snmp-agent trap enable efm
snmp-agent trap enable dldp
snmp-agent trap enable loop-detection
snmp-agent trap enable license
snmp-agent trap enable lldp
snmp-agent trap enable ldp
snmp-agent trap enable svc
snmp-agent trap enable ccc
snmp-agent trap enable vpls
snmp-agent trap enable pw
snmp-agent trap enable kompella
snmp-agent trap enable eoam-1ag
Networking Requirements
As shown in Figure 5-44, if you configure the batch statistics collection on the S9300, the
S9300 is capable of uploading the statistics files in batches to the specified FTP server after
statistics collection completes.
Figure 5-44 Networking diagram for configuring the batch statistics collection
GE 1/0/1
VLANIF 100
2.2.2.1/24
IP Network
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Enable the function of batch statistics collection on the S9300.
<Quidway> system-view
[Quidway] sysname S9300
[S9300] bulk-stat enable
Info:Succeeded in enabling the bulk stat function.
Step 2 Configure a statistics file, including statistics collection interval, statistics uploading interval,
period for reserving the statistics file, and the primary URL to which the statistics file is uploaded.
# Set the statistics collection interval, the statistics uploading interval, and the period for
reserving the file named file1 to 10 minutes. Set the primary URL of the statistics file to FTP
mode.
[S9300] bulk-file file1
[S9300-bulk-file-file1] collect interval 10
[S9300-bulk-file-file1] transfer interval 10
[S9300-bulk-file-file1] transfer remain-time 10
[S9300-bulk-file-file1] transfer primary url ftp://user:pwd@server
OID: 1.3.6.1.2.1.2.2.1.4
start index: 0
instance number: 0
----------------------------------
----End
Configuration Files
The configuration file on the S9300 is as follows:
#
sysname S9300
#
vlan batch 100
#
interface Vlanif100
ip address 2.2.2.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
ospf 1
area 0.0.0.0
network 2.2.2.0 0.0.0.255
#
bulk-stat enable
#
bulk-file file1
collect interval 10
transfer interval 10
transfer remain-time 10
transfer primary url ftp://user:pwd@server
collect enable
object 1.3.6.1.2.1.2.1.0 class single
object 1.3.6.1.2.1.2.2.1.4 class column
#
return
Networking Requirements
As shown in Figure 5-45, the S9300 monitors the subnet connected to GE 3/0/0, including:
l Collecting real-time statistics and history statistics about traffic and various packets
l Monitoring traffic (in bytes) passing through the interface and records logs when the traffic
sent in one minute exceeds the set value
l Monitoring the broadcast and multicast packets on the subnet and generates traps for these
packets
The S9300 then automatically reports the traps to the NMS when the broadcast and
multicast streams on the subnet exceed the set value.
NMS
1.1.1.1/24
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the function of sending trap messages and set the group names by using SNMP
commands.
2. Enable the statistics function and configure the statistics table.
3. Configure the historyControlTable.
4. Configure the eventTable.
5. Configure the alarmTable and prialarmTable.
Data Preparation
To complete the configuration, you need the following data:
l Interval for sampling data
l Threshold for triggering alarms
Procedure
Step 1 Configure a reachable route between the S9300 and the NMS. The configuration procedure is
not mentioned.
Step 2 Configure the S9300 to send trap messages to the NMS.
# Enable the function of sending trap messages through SNMP.
<Quidway> system-view
[Quidway] sysname S9300
[S9300] snmp-agent trap enable
NOTE
The interface enabled with the statistics function cannot be added to an Eth-trunk.
[S9300-GigabitEthernet3/0/0] rmon statistics 1 owner Test300
# Check the effect of configurations. Only the last sampling record is displayed through the
command lines. To display all the history records, you need special NMS software.
<S9300> display rmon history gigabitethernet 3/0/0
History control entry 1 owned by Test300 is VALID,
Samples Interface :GigabitEthernet3/0/0<ifEntry.402653698>
Sampling interval :30(sec) with 10 buckets max.
Lastest Sampling time :0days 00h:19m:43s
Latest sampled values:
Dropevents :0 , octets :645
Packets :7 , broadcast packets :7
multicast packets:0 , CRC alignment errors :0
The NMS receives trap messages when the set prialarm variable exceeds the preset threshold.
----End
Configuration Files
#
sysname S9300
#
vlan batch 100 110
#
interface Vlanif100
ip address 2.2.2.1 255.255.255.0
#
interface Vlanif110
ip address 3.3.3.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 110
port hybrid untagged vlan 110
rmon-statistics enable
rmon statistics 1 owner Test300
rmon history 1 buckets 10 interval 30 owner Test300
#
rmon event 1 description null log owner Test300
rmon event 2 description forUseofPrialarm trap public owner Test 300
rmon alarm 1 1.3.6.1.2.1.16.1.1.1.6.1 30 absolute rising-threshold 500 1 falling-
threshold 100 1 owner Test300
rmon prialarm 1 .1.3.6.1.2.1.16.1.1.1.6.1+.1.3.6.1.2.1.16.1.1.1.7.1
sumofbroadandmulti 30
delta rising-threshold 1000 2 falling-threshold 0 2 entrytype forever owner
Test300
#
ip route-static 1.1.1.0 255.255.255.0 2.2.2.2
#
snmp-agent
snmp-agent local-engineid 000007DB7FFFFFFF0000017C
snmp-agent sys-info version v3
snmp-agent target-host trap address udp-domain 1.1.1.1 params securityname public
#
return
Networking Requirements
As shown in Figure 5-46, RMON2 needs to be configured on the S9300 to collect statistics of
IP packets on VLANIF 10.
RMON2 can monitor remote hosts through the SNMP NMS, or through command lines. This
example describes only command-line-based monitoring.
COM
Console
IP Lan
Network
GE 2/0/0
vlanif 10
NM Station 10.1.1.1/24
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l Index of the hlHostControlTable and the maximum items in the hlHostControlTable
l Protocol ID
Procedure
Step 1 Configure a VLAN and add GE 2/0/0 to the VLAN.
<Quidway> system-view
[Quidway] vlan 10
[Quidway-Vlan10] quit
[Quidway] interface gigabitethernet 2/0/0
[Quidway-GigabitEthernet2/0/0] port hybrid pvid vlan 10
[Quidway-GigabitEthernet2/0/0] port hybrid untagged vlan 10
Step 2 Configure the VLANIF interface and assign an IP address to the VLANIF interface.
[Quidway] interface vlanif 10
[Quidway-Vlanif10] ip address 10.1.1.1 24
OutPkts - nlHostOutPkts
InOctes - nlHostInOctets
OutOctes - nlHostOutOctets
OutMac - nlHostOutMacNonUnicastPkts
ChgTm - nlHostTimeMark
CrtTm - nlHostCreateTime
HIdx PIdx Addr InPkts OutPkts InOctes OutOctes OutMac ChgTm CrtTm
123 1 10.110.99.2 0 78 0 10046 78 81489 40859
# Set the value of the time filter to display the entries that meet the filtering condition.
<Quidway> display rmon2 nlhosttable hostcontrolindex 123 timemark 1000 hostaddress
10.1.1.1
Abbreviation:
HIdx - hlHostControlIndex
PIdx - ProtocolDirLocalIndex
Addr - nlHostAddress
InPkts - nlHostInPkts
OutPkts - nlHostOutPkts
InOctes - nlHostInOctets
OutOctes - nlHostOutOctets
OutMac - nlHostOutMacNonUnicastPkts
ChgTm - nlHostTimeMark
CrtTm - nlHostCreateTime
HIdx PIdx Addr InPkts OutPkts InOctes OutOctes OutMac ChgTm CrtTm
123 1 10.1.1.1 0 78 0 10046 78 81489 40859
# Display the hlHostControlTable. You can view the number of added or deleted host entries
on the interface and the maximum number of entries in the nlHostTable.
<Quidway> display rmon2 hlhostcontroltable
Abbreviation:
index - hlhostcontrolindex
datasource - hlhostcontroldatasource
droppedfrm - hlhostcontrolnldroppedframes
inserts - hlhostcontrolnlinserts
Deletes - hlHostControlNlDeletes
maxentries - hlhostcontrolnlmaxdesiredentries
owner - hlhostcontrolowner
status - hlhostcontrolstatus
index datasource droppedfrm inserts eletes maxentries owner status
123 Vlanif10 0 19 0 100 China active
----End
Configuration Files
#
sysname Quidway
#
vlan batch 10
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
rmon2 protocoldirtable protocoldirid 8.0.0.0.1.0.0.8.0 parameter 2.0.0 descr ip
host supportedon owner china status active
rmon2 hlhostcontroltable index 123 datasource interface vlanif10 maxentry 100 owner
china status active
#
return
Networking Requirements
Figure 5-47 shows the diagram of NTP.
l S9300A functions as a unicast NTP server. The clock of S9300A is the master clock with
the stratum being 2.
l S9300B functions as a unicast NTP client. Its clock needs to be synchronized with the clock
of S9300A.
l S9300C and S9300D function as NTP clients of S9300B
l NTP authentication needs to be enabled.
Figure 5-47 Networking diagram for configuring the unicast client/server mode
VLANIF 1
10.0.0.2/24
VLANIF 1
2.2.2.2/24 VLANIF 2 VLANIF 1 S9300-C
IP Network
1.0.1.11/24 VLANIF 1
10.0.0.1/24 10.0.0.3/24
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure S9300A as an NTP server and configure the master clock on S9300A.
2. Configure S9300B as an NTP client. S9300B synchronizes its clock with the clock of
S9300A.
3. Configure S9300C and S9300D to synchronize their clocks with the clock of S9300B.
4. Configure NTP authentication on S9300A, S9300B, S9300C, and S9300D.
NOTE
When configuring NTP authentication in unicast client/server mode, pay attention to the following
points:
l You must enable NTP authentication on the client before specifying the IP address of the NTP
server and authentication key to be sent to the server; otherwise, NTP authentication is not
performed before clock synchronization.
l To implement authentication successfully, configure both the server and the client.
Data Preparation
To complete the configuration, you need the following data:
l IP address of the reference clock
l Stratum count of the NTP master clock
l Key ID
l Password
Procedure
1. Configure the IP addresses of the S9300s and ensure that the routes between them are
reachable.
Configure the IP addresses according to Figure 5-47 so that S9300A, S9300B, S9300C
and S9300D are routable.
The configuration procedure is not mentioned.
2. Configure a master NTP clock on S9300A and enable NTP authentication.
# On S9300A, set the clock as a master NTP clock with stratum being 2.
<S9300A> system-view
[S9300A] ntp-service refclock-master 2
# Enable NTP authentication on S9300A, configure the authentication key, and declare the
key to be reliable.
[S9300A] ntp-service authentication enable
[S9300A] ntp-service authentication-keyid 42 authentication-mode md5 Hello
[S9300A] ntp-service reliable authentication-keyid 42
The authentication keys configured on the server and the client must be the same.
3. Configure S9300B as the NTP server and enable the NTP authentication.
# Enable NTP authentication on S9300B, configure the authentication key, and declare the
key to be reliable.
<S9300B> system-view
[S9300B] ntp-service authentication enable
[S9300B] ntp-service authentication-keyid 42 authentication-mode md5 Hello
[S9300B] ntp-service reliable authentication-keyid 42
# # Configure S9300A to be the NTP server of S9300B and use the authentication key.
[S9300B] ntp-service unicast-server 2.2.2.2 authentication-keyid 42
After the configurations, S9300C can synchronize its clock with the clock of S9300B.
Check the NTP status of S9300C, and you can view that the status of the clock is
synchronized. This means that the synchronization is complete. The stratum of the clock
of S9300C is 4, one stratum lower than the clock stratum of S9300B.
[S9300C] display ntp-service status
clock status: synchronized
clock stratum: 4
reference clock ID: 10.0.0.1
nominal frequency: 60.0002 Hz
actual frequency: 60.0002 Hz
clock precision: 2^18
clock offset: 3.8128 ms
root delay: 31.26 ms
root dispersion: 74.20 ms
peer dispersion: 34.30 ms
reference time: 11:55:56.833 UTC Mar 2 2006(C7B15BCC.D5604189)
Check the NTP status of S9300D, and you can see that the status of the clock is
synchronized. This means that the synchronization is complete. The stratum of the clock
of S9300C is 4, one stratum lower than the clock stratum of S9300B.
[S9300D] display ntp-service status
clock status: synchronized
clock stratum: 4
reference clock ID: 10.0.0.1
nominal frequency: 60.0002 Hz
actual frequency: 60.0002 Hz
clock precision: 2^18
clock offset: 3.8128 ms
root delay: 31.26 ms
root dispersion: 74.20 ms
peer dispersion: 34.30 ms
reference time: 11:55:56.833 UTC Mar 2 2006(C7B15BCC.D5604189)
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
vlan batch 100
#
interface Vlanif100
ip address 2.2.2.2 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
ospf 1
area 0.0.0.0
network 2.2.2.0 0.0.0.255
#
ntp-service authentication enable
ntp-service authentication-keyid 42 authentication-mode md5 %@ENC;8HX
\#Q=^Q`MAF4<1!!
ntp-service reliable authentication-keyid 42
ntp-service refclock-master 2
#
return
Networking Requirements
As shown in Figure 5-48, three S9300s reside on the LAN.
l The clock of S9300C is the master clock and the clock stratum is 2.
l S9300C is the NTP server of S9300D. That is, S9300D is the client.
l S9300D is the passive peer of S9300E. That is, S9300E is the active end.
Figure 5-48 Networking diagram for configuring the NTP peer mode
S9300 C
GE 1/0/0
3.0.1.31/24
GE 1/0/0 GE 1/0/0
3.0.1.33/24 3.0.1.32/24
S9300 E S9300 D
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the clock on S9300C as the master clock. The clock on S9300D should be
synchronized to the clock on S9300C.
2. Configure S9300E and S9300D as the NTP peers so that S9300E should send clock
synchronization requests to S9300D.
3. The clocks on S9300C, S9300D and S9300E can be synchronized.
Data Preparation
To complete the configuration, you need the following data:
l IP address of S9300C
l IP address of S9300D
l Stratum count of the NTP master clock
Procedure
1. Configure IP addresses for S9300C, S9300D, and S9300E.
Configure an IP address for each interface according to Figure 5-48. After configurations,
the three S9300s can ping each other.
The configuration procedure is not mentioned.
2. Configure the unicast NTP client/server mode.
# On S9300C, set the clock as a master NTP clock with stratum being 2.
<S9300C> system-view
[S9300C] ntp-service refclock-master 2
After the configurations, the clock of S9300D is synchronized with the clock of S9300C.
Check the NTP status of S9300D, and you can see that the status of the clock is
synchronized. This means that the synchronization is complete. The stratum of the clock
of S9300D is 3, one stratum lower than the clock stratum of S9300C.
[S9300D] display ntp-service status
clock status: synchronized
clock stratum: 3
reference clock ID: 3.0.1.31
nominal frequency: 64.0029 Hz
actual frequency: 64.0029 Hz
clock precision: 2^7
clock offset: 0.0000 ms
root delay: 62.50 ms
root dispersion: 0.20 ms
peer dispersion: 7.81 ms
reference time: 06:52:33.465 UTC Mar 7 2006(C7B7AC31.773E89A8)
3. Configure the unicast NTP peer mode.
# Configure S9300D as the passive peer of S9300E.
<S9300E> system-view
[S9300E] ntp-service unicast-peer 3.0.1.32
No master clock is configured on S9300E, so the clock on S9300E should be synchronized
to the clock on S9300D.
4. Verify the configuration.
View the status of S9300E after clock synchronization.
Check the NTP status of S9300E, and you can see that the status of the clock is
synchronized. This means that the synchronization is complete. The stratum of the clock
of S9300E is 4, one stratum lower than the clock stratum of S9300D.
[S9300E] display ntp-service status
clock status: synchronized
clock stratum: 4
reference clock ID: 3.0.1.32
nominal frequency: 64.0029 Hz
actual frequency: 64.0029 Hz
clock precision: 2^7
clock offset: 0.0000 ms
root delay: 124.98 ms
root dispersion: 0.15 ms
peer dispersion: 10.96 ms
reference time: 06:55:50.784 UTC Mar 7 2006(C7B7ACF6.C8D002E2)
Configuration Files
l Configuration file of S9300 C
#
sysname S9300C
#
vlan batch 100
#
interface Vlanif100
ip address 3.0.1.31 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
ntp-service refclock-master 2
#
return
l Configuration file of S9300 D
#
sysname S9300D
#
vlan batch 100
#
interface Vlanif100
ip address 3.0.1.32 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
ntp-service unicast-server 3.0.1.31
#
return
l Configuration file of S9300 E
#
sysname S9300E
#
vlan batch 100
#
interface Vlanif100
ip address 3.0.1.33 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
ntp-service unicast-peer 3.0.1.32
#
return
Networking Requirements
As shown in Figure 5-49,
l S9300C and S9300D are on the same network segment; S9300A is on another network
segment; S9300F connects the two network segments.
l As the NTP broadcast server, S9300C uses the local clock as the NTP master clock, which
is a stratum-3 clock. S9300C sends broadcast packets through VLANIF 10, namely,
GE1/0/0.
l S9300D uses VLANIF 10, namely, GE1/0/0, to listen to the broadcast packets.
l S9300A uses VLANIF 20, namely, GE1/0/0, to listen to the broadcast packets.
l NTP authentication needs to be enabled.
Figure 5-49 Networking diagram for configuring the NTP broadcast mode
GE 1/0/0
VLANIF 10
GE 1/0/0 GE 1/0/0 3.0.1.31/24
GE 2/0/0
VLANIF 20 VLANIF 20 VLANIF 10
1.0.1.11/24 1.0.1.2/24 3.0.1.2/24 S9300C
GE 1/0/0
S9300A S9300F
VLANIF 10
3.0.1.32/24
S9300D
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure S9300 C as the NTP broadcast server.
2. Configure S9300A and S9300D as the NTP broadcast clients.
3. Configure NTP authentication on S9300A, S9300C, and S9300D.
Data Preparation
To complete the configuration, you need the following data:
l IP address of each interface
l IDs of VLANs to which the interfaces belong
l Stratum count of the NTP master clock
l Authentication key and key ID
Procedure
1. Configure the IP addresses of the S9300s.
Configure the IP address of each interface according to Figure 5-49.
# Configure the IP address of the VLANIF interface on S9300C.
[S9300C] system-view
[S9300C] vlan 10
[S9300C-vlan10] quit
[S9300C] interface gigabitethernet 1/0/0
[S9300C-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[S9300C-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[S9300C] interface vlanif 10
[S9300C-vlanif10] ip address 3.0.1.31 24
[S9300C-vlanif10] quit
# Configure S9300C as an NTP broadcast server. Broadcast packets are encrypted by using
the authentication key ID 16 and then sent through VLANIF 10.
[S9300C] interface vlanif 10
[S9300C-vlanif10] ntp-service broadcast-server authentication-keyid 16
[S9300C-vlanif10] quit
3. Configure S9300D, which resides on the same network segment with the server.
# Enable NTP authentication.
<S9300D> system-view
[S9300D] ntp-service authentication enable
[S9300D] ntp-service authentication-keyid 16 authentication-mode md5 Hello
[S9300D] ntp-service reliable authentication-keyid 16
# Configure S9300D as the NTP broadcast client and configure S9300D to listen to NTP
broadcast packets through VLANIF 10.
[S9300D]interface vlanif 10
[S9300D-vlanif10] ntp-service broadcast-client
[S9300D-vlanif10] quit
After the configurations, the clock of S9300D is synchronized with the clock of S9300C.
4. Configure S9300A, which resides on different network segment from the server.
# Enable NTP authentication.
[S9300A] ntp-service authentication enable
[S9300A] ntp-service authentication-keyid 16 authentication-mode md5 Hello
[S9300A] ntp-service reliable authentication-keyid 16
# Configure S9300A as the NTP broadcast client and configure S9300A to listen to NTP
broadcast packets through VLANIF 20.
[S9300A]interface vlanif 20
[S9300A-vlanif20] ntp-service broadcast-client
[S9300A-vlanif20] quit
because S9300A and S9300C are on different network segments and S9300A cannot
receive the broadcast packets sent from S9300C.
Check the NTP status of S9300D, and you can see that the status of the clock is
synchronized. This means that the synchronization is complete. The stratum of the clock
of S9300D is 4, one stratum lower than the clock stratum of S9300C.
[S9300D] display ntp-service status
clock status: synchronized
clock stratum: 4
reference clock ID: 3.0.1.31
nominal frequency: 60.0002 Hz
actual frequency: 60.0002 Hz
clock precision: 2^18
clock offset: 0.0000 ms
root delay: 0.00 ms
root dispersion: 0.42 ms
peer dispersion: 0.00 ms
reference time: 12:17:21.773 UTC Mar 7 2006(C7B7F851.C5EAF25B)
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
vlan batch 20
#
interface Vlanif20
ip address 1.0.1.11 255.255.255.0
ntp-service broadcast-client
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
ospf 1
area 0.0.0.0
network 1.0.1.0 0.0.0.255
#
ntp-service authentication enable
ntp-service authentication-keyid 16 authentication-mode md5 %@ENC;8HX
\#Q=^Q`MAF4<1!!
ntp-service reliable authentication-keyid 16
#
return
Networking Requirements
As shown in Figure 5-50,
l S9300C and S9300D are on the same network segment; S9300A is on another network
segment; S9300F connects the two network segments.
l As the NTP multicast server, S9300C uses the local clock as the NTP master clock, which
is a stratum-2 clock. S9300C sends multicast packets through VLANIF 10, namely,
GE1/0/0.
l S9300D uses VLANIF 10, namely, GE1/0/0, to listen to the multicast packets.
l S9300A uses VLANIF 20, namely, GE1/0/0, to listen to the multicast packets.
Figure 5-50 Networking diagram for configuring the NTP multicast mode
GE 1/0/0
VLANIF 10
GE 1/0/0 GE 1/0/0 3.0.1.31/24
GE 2/0/0
VLANIF 20 VLANIF 20 VLANIF 10
1.0.1.11/24 1.0.1.2/24 3.0.1.2/24 S9300C
GE 1/0/0
S9300A S9300F
VLANIF 10
3.0.1.32/24
S9300D
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure S9300C as the NTP multicast server.
2. Configure S9300A and S9300D as the NTP multicast clients.
Data Preparation
To complete the configuration, you need the following data:
l IP address of each interface
l Stratum count of the NTP master clock
Procedure
1. Configure the IP addresses of the S9300s.
Configure the IP address of each interface according to Figure 5-50.
# Configure the IP address of the VLANIF interface on S9300C.
<S9300C> system-view
[S9300C] vlan 10
[S9300C-Vlan10] quit
[S9300C] interface gigabitethernet 1/0/0
[S9300C-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[S9300C-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[S9300C-GigabitEthernet1/0/0] quit
[S9300C] interface vlanif 10
[S9300C-Vlanif10] ip address 3.0.1.31 24
[S9300C-Vlanif10] quit
# Configure S9300C as the NTP multicast client and configure S9300C to sense NTP
multicast packets through VLANIF 10.
[S9300C] interface vlanif 10
[S9300C-vlanif10] ntp-service multicast-server
[S9300C-vlanif10] quit
3. Configure S9300D, which resides on the same network segment with the server.
# Configure S9300D as the NTP multicast client and configure S9300D to sense NTP
multicast packets through VLANIF 10.
<S9300D> system-view
[S9300D] interface vlanif 10
[S9300D-vlanif10] ntp-service multicast-client
[S9300D-vlanif10] quit
4. Configure S9300A, which resides on different network segment from the server.
# Configure S9300A as the NTP multicast client and configure S9300A to sense NTP
multicast packets through VLANIF 20.
<S9300A> system-view
[S9300A] interface vlanif 20
[S9300A-vlanif20] ntp-service multicast-client
[S9300A-vlanif20] quit
because S9300A and S9300C are on different network segments and S9300A cannot
receive the multicast packets sent from S9300C.
Check the NTP status of S9300D, and you can see that the status of the clock is
synchronized. This means that the synchronization is complete. The stratum of the clock
of S9300D is 3, one stratum lower than the clock stratum of S9300C.
[S9300D] display ntp-service status
clock status: synchronized
clock stratum: 3
reference clock ID: 3.0.1.31
nominal frequency: 60.0002 Hz
actual frequency: 60.0002 Hz
clock precision: 2^18
clock offset: 0.66 ms
root delay: 24.47 ms
root dispersion: 208.39 ms
peer dispersion: 9.63 ms
reference time: 17:03:32.022 UTC Apr 25 2005(C61734FD.800303C0)
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
vlan batch 20
#
interface vlanif20
ip address 1.0.1.11 255.255.255.0
ntp-service multicast-client
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
ospf 1
area 0.0.0.0
network 1.0.1.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-51, S9300-A and S9300-B are connected through the Ethernet interfaces.
Reachable routes exist between S9300-A and the NMS and between S9300-B and the NMS.
S9300-A and S9300-B need to obtain the status of each other through the LLDP protocol and
the NMS should locate S9300-A and S9300-B based on the management addresses to discover
the network topology. When a management address changes, LLDP is disabled globally, or
neighbor information changes, S9300-A and S9300-B should send LLDP traps to the NMS.
SN
MP
MP
SN
10.10.10.1 10.10.10.2
LLDPDU
S9300-A S9300-B
LLDPDU packet
LLDP interface
SNMP packet
NMS: Network Management System
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable the LLDP trap function on S9300-A and S9300-B.
2. Enable LLDP globally on S9300-A and S9300-B.
3. Configure the management addresses of S9300-A and S9300-B.
4. Configure the LLDP attributes of S9300-A and S9300-B.
Data Preparation
To complete the configuration, you need the following data:
l The management address of S9300-A is 10.10.10.1, and the management address of
S9300-B is 10.10.10.2.
l The interval for sending LLDP packets is 60 seconds. The delay for sending LLDP packets
is 9 seconds. The delay for sending traps when neighbor information changes is 10 seconds.
Procedure
1. Enable the LLDP trap function on S9300-A and S9300-B.
# Configure S9300-A.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] snmp-agent trap enable lldp
# Configure S9300-B.
<Quidway> system-view
[Quidway] sysname S9300-B
[S9300-B] snmp-agent trap enable lldp
# Configure S9300-B.
[S9300-B] lldp enable
# Configure S9300-B.
[S9300-B] lldp management-address 10.10.10.2
# Configure S9300-B.
See the configuration of S9300-A.
5. Verify the configuration.
# Check whether LLDP is enabled, whether the management addresses are configured,
whether the LLDP trap function is enabled, and whether the LLDP attributes are properly
set.
l Check the configuration of S9300-A.
[S9300-A] display lldp local
System
information
Chassis
type :macAddress
Chassis ID :00e0-
fc33-0011
System
name :S9303-119
System description :Quidway
S9303
Huawei Versatile Routing Platform
Software
VRP (R) Software, Version 5.50 (S9300
V100R002C00B010)
Copyright (c) 2003-2010 Huawei Technologies Co.,
Ltd
System capabilities
supported :bridge
System capabilities
enabled :bridge
LLDP Up time :2009/2/13
18:31:37
LldpMsgTxHoldMultiplier :4 (default is 4)
LldpReinitDelay :2 (default is 2s)
LldpTxDelay :9 (default is 2s)
LldpNotificationInterval :10 (default is 5s)
LldpNotificationEnable :enabled (default is disabled)
Management address :IP: 10.10.10.1
RemTablesLastChangeTime:0 days, 0 hours, 0 minutes, 0 seconds
RemTableInserts :0
RemTableDeletes :0
RemTableDrops :0
RemTablesAgeouts :0
Neighbors Total :1
Port information:
Interface GigabitEthernet1/0/1:
LLDP Enable Status :enabled (default is disabled)
Neighbors Total :1
Neighbor index : 1
Chassis type :macAddress
Chassis ID :00e0-fc33-0011
Port ID type :interfaceName
Port ID :GigabitEthernet1/0/1
Port description :HUAWEI, Quidway Series, GigabitEthernet1/0/1 Interface
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
interface Ethernet0/0/0
ip address 10.10.10.1 255.255.255.0
#
lldp enable
#
snmp-agent trap enable lldp
#
lldp message-transmission interval 60
#
lldp message-transmission delay 9
#
lldp trap-interval 10
#
lldp management-address 10.10.10.1
#
return
Networking Requirements
As shown in Figure 5-52, S9300-A and S9300-B are connected through the Eth-Trunk. On each
S9300, three interfaces are added to the Eth-Trunk. In addition, two Eth-Trunk interfaces on
each S9300 should be able to send and receive LLDP packets, and thus the two S9300s can
obtain status information about each other. The other Eth-Trunk interface on each S9300 is
disabled from sending or receiving LLDP packets.
Figure 5-52 Networking diagram for configuring LLDP when an Eth-Trunk is used on the
network
GE 1/0/3 GE 2/0/3
GE 1/0/2 GE 2/0/2
10.10.10.1 10.10.10.2
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable LLDP globally on S9300-A and S9300-B.
2. Configure the management addresses of S9300-A and S9300-B so that the NMS can
identify the S9300s.
3. Add the Ethernet interfaces of S9300-A and S9300-B to the Eth-Trunk.
4. Disable LLDP on the Eth-Trunk member interfaces of S9300-A and S9300-B.
Data Preparation
To complete the configuration, you need the following data:
l Management address of S9300-A (10.10.10.1), and the management address of S9300-B
(10.10.10.2)
l Number of the Eth-Trunk that connects S9300-A and S9300-B, and the number of the
interfaces that are added to the Eth-Trunk
Procedure
1. Enable LLDP globally on S9300-A and S9300-B.
# Configure S9300-A.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] lldp enable
# Configure S9300-B.
See the configuration of S9300-A.
2. Configure the management addresses of S9300-A and S9300-B so that the NMS can
identify the S9300s.
# Configure S9300-A.
[S9300-A] lldp management-address 10.10.10.1
# Configure S9300-B.
[S9300-B] lldp management-address 10.10.10.2
# Configure S9300-B.
[S9300-B] interface eth-trunk 1
[S9300-B-Eth-Trunk1] quit
[S9300-B] interface gigabitethernet 2/0/1
[S9300-B-GigabitEthernet2/0/1] eth-trunk 1
[S9300-B-GigabitEthernet2/0/1] quit
[S9300-B] interface gigabitethernet 2/0/2
[S9300-B-GigabitEthernet2/0/2] eth-trunk 1
[S9300-B-GigabitEthernet2/0/2] quit
[S9300-B] interface gigabitethernet 2/0/3
[S9300-B-GigabitEthernet2/0/3] eth-trunk 1
# Configure S9300-B.
[S9300-B-GigabitEthernet2/0/3] undo lldp enable
[S9300-B-GigabitEthernet2/0/3] quit
System capabilities
supported :bridge
System capabilities
enabled :bridge
LLDP Up time :2009/2/13
18:31:37
RemTableDrops :0
RemTablesAgeouts :0
Neighbors Total :2
Port information:
Interface GigabitEthernet1/0/1:
LLDP Enable Status :enabled (default is disabled)
Neighbors Total :1
Interface GigabitEthernet1/0/2:
LLDP Enable Status :enabled (default is disabled)
Neighbors Total :1
Interface GigabitEthernet1/0/2:
LLDP Enable Status :enabled (default is disabled)
Neighbors Total :1
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
interface Ethernet0/0/0
ip address 10.10.10.1 255.255.255.0
#
lldp enable
#
interface Eth-Trunk1
#
interface GigabitEthernet1/0/1
eth-trunk 1
#
interface GigabitEthernet1/0/2
eth-trunk 1
#
interface GigabitEthernet1/0/3
eth-trunk 1
undo lldp enable
#
lldp management-address 10.10.10.1
#
return
#
interface Eth-Trunk1
#
interface GigabitEthernet2/0/1
eth-trunk 1
#
interface GigabitEthernet2/0/2
eth-trunk 1
#
interface GigabitEthernet2/0/3
eth-trunk 1
undo lldp enable
#
lldp management-address 10.10.10.2
#
return
Networking Requirements
As shown in Figure 5-53, links exist among S9300-A, S9300-B, and S9300-C. The reachable
routes exist between S9300-A and the NMS, and between S9300-C and the NMS. S9300-A,
S9300-B, and S9300-C need to exchange LLDP packets through the links to obtain the status
of each other. In addition, the NMS can locate S9300-A and S9300-C based on the management
addresses to discover the network topology.
Figure 5-53 Networking diagram for configuring LLDP when an interface has multiple
neighbors
NMS
SNMP
SNMP
LLDPDU
S9300-D LL S9300-F
D
PD
U
LL
U
D
PD
LLDPDU
PD
D
S9300-E U
LL
10.10.10.1 10.10.10.2
10.10.10.3
S9300-A S9300-B S9300-C
LLDP interface SNMP packet
NMS: Network Management System LLDPDU packet
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l Management addresses of S9300-A, S9300-B, and S9300-C
Procedure
1. Enable LLDP globally on S9300-A, S9300-B, and S9300-C.
# Configure S9300-A.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] lldp enable
# Configure S9300-B.
See the configuration of S9300-A.
# Configure S9300-C.
See the configuration of S9300-A.
2. Configure the management addresses of S9300-A, S9300-B, and S9300-C.
# Configure S9300-A.
[S9300-A] lldp management-address 10.10.10.1
# Configure S9300-B.
[S9300-B] lldp management-address 10.10.10.2
# Configure S9300-C.
[S9300-C] lldp management-address 10.10.10.3
System capabilities
supported :bridge
System capabilities
enabled :bridge
LLDP Up time :2009/2/13
18:31:37
FirmwareRev :NC
SoftwareRev :Version 5.50 V100R001C02B010
SerialNum :NA
Manufacturer name :NA
Model name :NA
Asset tracking identifier :NA
Port information:
Interface GigabitEthernet1/0/1:
LLDP Enable Status :enabled (default is disabled)
Neighbors Total :1
Neighbor index : 1
Chassis type :macAddress
Chassis ID :00e0-fc33-0011
Port ID type :interfaceName
Port ID :GigabitEthernet1/0/1
Port description :HUAWEI, Quidway Series, GigabitEthernet1/0/1 Interface
System name :S9300-D
System description :Quidway S9303
Huawei Versatile Routing Platform Software
VRP (R) Software, Version 5.50 (S9300 V100R002C00SPC001)
Copyright (c) 2003-2009 Huawei Technologies Co., Ltd
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
interface Ethernet0/0/0
ip address 10.10.10.1 255.255.255.0
#
lldp enable
#
lldp management-address 10.10.10.1
#
return
Context
NOTE
Networking Requirements
As shown in Figure 5-54, S9300 A and S9300 B must be connected at Layer 3 through the
VLANIF interface.
S9300A S9300B
GE1/0/0 GE1/0/0
vlanif10 vlanif10
10.1.1.1/24 10.1.1.2/24
NQA agent
Configuration Roadmap
The configuration roadmap is as follows:
1. Perform the NQA ICMP test to check whether the route between the local end (S9300 A)
and the specified destination end (S9300 B) is reachable and check the RTT of a test packet.
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Create a VLAN and add interfaces to the VLAN.
# Configure S9300 A.
<Quidway> system-view
[Quidway] sysname S9300A
[S9300A] vlan 10
[S9300A-Vlan10] quit
[S9300A] interface gigabitethernet1/0/0
[S9300A-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[S9300A-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[S9300A-GigabitEthernet1/0/0] quit
# Configure S9300 B.
<Quidway> system-view
[Quidway] sysname S9300B
[S9300B] vlan 10
[S9300B-Vlan10] quit
[S9300B] interface gigabitethernet 1/0/0
[S9300B-GigabitEthernet1/0/0] port hybrid pvid vlan 10
Step 2 Configure the VLANIF interface and assign an IP address to the VLANIF interface.
# Configure S9300 A.
[S9300A] interface vlanif 10
[S9300A-Vlanif10] ip address 10.1.1.1 24
# Configure S9300 B.
[S9300B] interface vlanif 10
[S9300B-Vlanif10] ip address 10.1.1.2 24
Step 3 Enable the NQA client and create an NQA ICMP test.
<S9300A> system-view
[S9300A] nqa test-instance admin icmp
[S9300A-nqa-admin-icmp] test-type icmp
[S9300A-nqa-admin-icmp] destination-address ipv4 10.1.1.2
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
vlan batch 10
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
nqa test-instance admin icmp
test-type icmp
destination-address ipv4 10.1.1.2
#
return
Networking Requirements
As shown in Figure 5-55:
l S9300 functions as the DCHP client and Router functions as the DHCP server.
l The NQA DHCP test is used to check the time when the DHCP server assigns an IP address.
S9300 Router
GE1/0/0 GE1/0/0
Vlanif10 Vlanif10
10.1.1.1/24 10.1.1.2/24
NQA agent DHCP Server
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Configure the VLAN and VLANIF interface and assign an IP address to the interface.
The configuration details are not mentioned here.
Step 2 Enable DHCP snooping globally.
<Quidway> system-view
[Quidway] dhcp snooping enable
Step 3 Enable the NQA client and create an NQA DHCP test.
[Quidway] nqa test-instance admin dhcp
[Quidway-nqa-admin-dhcp] test-type dhcp
[Quidway-nqa-admin-dhcp] source-interface vlanif 10
[Quidway-nqa-admin-dhcp] timeout 20
----End
Configuration Files
l Configuration file of S9300
#
sysname quidway
#
vlan batch 10
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
nqa test-instance admin dhcp
test-type dhcp
timeout 20
source-interface vlanif10
#
return
Networking Requirements
As shown in Figure 5-56:
Figure 5-56 Networking diagram for configuring the FTP download test
S9300A S9300B
GE1/0/0 GE1/0/0
Vlanif10 Vlanif10
10.1.1.1/24 10.1.1.2/24
FTP Client
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure S9300 A as the NQA client.
2. Create and perform the FTP test on S9300 A to check whether a connection between
S9300 A and the FTP server can be set up and to check the time for downloading a file
from the FTP server.
Data Preparation
To complete the configuration, you need the following data:
l IP address of the FTP server
l Source IP address for the test
l FTP user name and password
l Operation file of the FTP test
Procedure
Step 1 Configure the IP addresses of S9300 A and S9300 B. The configuration details are not mentioned
here.
Step 2 Configure S9300 B as the FTP server.
<S9300B> system-view
[S9300B] ftp server enable
[S9300B] aaa
[S9300B-aaa] local-user user1 password cipher hello
[S9300B-aaa] local-user user1 service-type ftp
[S9300B-aaa] local-user user1 ftp-directory cfcard:/
[S9300B-aaa] quit
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
vlan batch 100
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
nqa test-instance admin ftp
test-type ftp
destination-address ipv4 10.1.1.2
source-address ipv4 10.1.1.1
ftp-operation get
ftp-filename test.txt
ftp-username user1
ftp-password hello
#
return
#
return
Networking Requirements
As shown in Figure 5-57:
You are required to test the speed of uploading a file from S9300 C to the FTP server.
Figure 5-57 Networking diagram for configuring the FTP upload test
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure S9300 A as the NQA client and the FTP client. Create and perform the FTP test
on S9300 A to check whether a connection between S9300 A and the FTP server can be
set up and to test the time for uploading a file to the FTP server.
2. A user with the name user1 and the password hello logs in to the FTP server to upload a
file whose size is 10k.
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Configure reachable routes between S9300 A and S9300 B, between S9300 A and S9300 C, and
between S9300 B and S9300 C. The configuration details are not mentioned here.
Step 3 Configure an NQA FTP test on S9300 A and create a file of 10K bytes for uploading.
<S9300A> system-view
[S9300A] nqa test-instance admin ftp
[S9300A-nqa-admin-ftp] test-type ftp
[S9300A-nqa-admin-ftp] destination-address ipv4 10.2.1.2
[S9300A-nqa-admin-ftp] source-address ipv4 10.1.1.1
[S9300A-nqa-admin-ftp] ftp-operation put
[S9300A-nqa-admin-ftp] ftp-username user1
[S9300A-nqa-admin-ftp] ftp-password hello
[S9300A-nqa-admin-ftp] ftp-filesize 10
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
vlan batch 10
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
nqa test-instance admin ftp
test-type ftp
destination-address ipv4 10.2.1.2
source-address ipv4 10.1.1.1
ftp-operation put
ftp-filesize 10
ftp-username user1
ftp-password hello
#
ip route-static 10.2.1.0 255.255.255.0 10.1.1.2
#
return
Networking Requirements
As shown in Figure 5-58, S9300 is connected to the HTTP server through a WAN.
S9300
10.1.1.2/24
GE1/0/0 IP
Network
Vlanif10
10.1.1.1/24
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the S9300 as the NQA client.
2. Create and perform the HTTP test on the S9300 to check whether the a connection between
the S9300 and the HTTP server can be set up and to check the time for transferring a file
between them.
Data Preparation
To complete the configuration, you need the following data:
l Host address of the HTTP server
l HTTP operation type
Procedure
Step 1 Configure a VLAN and add an interface to the VLAN. Create a VLANIF interface and assign
an IP address to the VLANIF interface.
The configuration details are not mentioned here.
Step 2 Enable the NQA client and create an NQA HTTP test.
<Quidway> system-view
[Quidway] nqa test-instance admin http
[Quidway-nqa-admin-http] test-type http
[Quidway-nqa-admin-http] destination-address ipv4 10.2.1.1
[Quidway-nqa-admin-http] http-operation get
[Quidway-nqa-admin-http] http-url www.huawei.com
----End
Configuration Files
Configuration file of S9300
#
sysname quidway
#
vlan batch 10
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
nqa test-instance admin http
test-type http
destination-address ipv4 10.2.1.1
http-operation get
http-url www.huawei.com
#
ip route-static 10.2.1.0 255.255.255.0 10.1.1.2
#
return
Networking Requirements
As shown in Figure 5-59, S9300 functions as the DNS client to access the host whose IP address
is 10.2.1.1/24 through a domain named server.com.
S9300
GE1/0/0 10.1.1.2/24 IP
Network
Vlanif100
10.1.1.1/24
DNS Server
10.3.1.1/24
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the S9300 as the NQA client.
2. Create and perform the DNS test on the S9300 to check whether a connection between the
S9300 and the DNS server can be set up and to check the speed of responding to an address
resolution request.
Data Preparation
To complete the configuration, you need the following data:
l IP address of the DNS server
l Name of the host to be accessed
Procedure
Step 1 Configure reachable routes between S9300 A and the DNS server, between S9300 A and the
host to be accessed, and between the DNS server and the host to be accessed. The configuration
details are not mentioned here.
Step 2 Create an NQA DNS test.
<Quidway> system-view
[Quidway] dns server 10.3.1.1
[Quidway] nqa test-instanc admin dns
[Quidway-nqa-admin-dns] test-type dns
[Quidway-nqa-admin-dns] dns-server ipv4 10.3.1.1
[Quidway-nqa-admin-dns] destination-address url server.com
----End
Configuration Files
Configuration file of S9300
#
sysname Quidway
#
dns server 10.3.1.1
#
vlan batch 100
#
interface Vlanif100
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
nqa test-instance admin dns
test-type dns
destination-address url server.com
dns-server ipv4 10.3.1.1
#
ip route-static 10.3.1.0 255.255.255.0 10.1.1.2
#
return
Networking Requirements
As shown in Figure 5-60:
The traceroute test is used to check the IP address of the VLANIF 110 interface of S9300 C on
S9300 A.
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure S9300 A as the NQA client.
2. Create and perform the traceroute test on S9300 A to check the statistics on each hop from
S9300 A to S9300 C.
Data Preparation
To complete the configuration, you need the following data:
l Destination address for the traceroute test
Procedure
Step 1 Configure reachable routes between S9300 A and S9300 B, between S9300 A and S9300 C, and
between S9300 B and S9300 C. The configuration details are not mentioned here.
Step 2 Create an NQA traceroute test on S9300 A and set the destination IP address to 10.2.1.2.
<S9300A> system-view
[S9300A] nqa test-instance admin trace
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
vlan batch 100
#
interface Vlanif100
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
nqa test-instance admin trace
test-type trace
destination-address ipv4 10.2.1.2
#
ip route-static 10.2.1.0 255.255.255.0 10.1.1.2
#
return
interface Vlanif110
ip address 10.2.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 110
port hybrid untagged vlan 110
#
return
Networking Requirements
As shown in Figure 5-61, SNMP agent is enabled on S9300 C. The NQA SNMP query test is
used to measure the time from sending an SNMP query packet to receiving an Echo packet.
Figure 5-61 Networking diagram for configuring the SNMP query test
S9300A S9300B S9300C
GE1/0/0 GE1/0/0 GE2/0/0 GE1/0/0
Vlanif100 Vlanif100 Vlanif110 Vlanif110
10.1.1.1/24 10.1.1.2/24 10.2.1.1/24 10.2.1.2/24
SNMP Agent
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure S9300 A as the NQA client.
2. Create and perform the SNMP query test on S9300 A.
3. Enable SNMP agent on S9300 C.
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Configure reachable routes between S9300 A and S9300 B, between S9300 A and S9300 C, and
between S9300 B and S9300 C. The configuration details are not mentioned here.
Step 2 Enable SNMP agent on S9300 C.
<S9300C> system-view
[S9300C] snmp-agent
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
vlan batch 100
#
interface Vlanif100
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
nqa test-instance admin snmp
test-type snmp
destination-address ipv4 10.2.1.2
#
ip route-static 10.2.1.0 255.255.255.0 10.1.1.2
#
return
Networking Requirements
As shown in Figure 5-62, the NQA TCP Private test is used to obtain the time for setting up a
TCP connection between S9300 A and S9300 B.
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure S9300 A as the NQA client and configure S9300 C as the NQA server.
2. Configure the monitoring port number on the NQA server and create an NQA TCP test on
the NQA client.
Data Preparation
To complete the configuration, you need the following data:
l Host address of the server
l Port number used to monitor the TCP service on the server
Procedure
Step 1 Configure reachable routes between S9300 A and S9300 B, between S9300 A and S9300 C, and
between S9300 B and S9300 C. The configuration details are not mentioned here.
Step 2 Configure the NQA server on S9300 C.
# Configure the IP address and port number used to monitor TCP connections on the NQA server.
<S9300C> system-view
[S9300C] nqa-server tcpconnect 10.2.1.2 9000
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
vlan batch 100
#
interface Vlanif100
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
nqa test-instance admin tcp
test-type tcp
destination-address ipv4 10.2.1.2
destination-port 9000
#
ip route-static 10.2.1.0 255.255.255.0 10.1.1.2
#
return
Networking Requirements
As shown in Figure 5-63, the NQA UDP Public test is used to obtain RTT of a UDP packet
transmitted between S9300 A and S9300 C.
Configuration Roadmap
1. Configure S9300 A as the NQA client and configure S9300 C as the NQA server.
2. Configure the monitoring port number on the NQA server and create an NQA UDP Public
test on the NQA client.
Data Preparation
To complete the configuration, you need the following data:
l Host address of the server
l Port number used to monitor the UDP service on the server
Procedure
Step 1 Configure reachable routes between S9300 A and S9300 B, between S9300 A and S9300 C, and
between S9300 B and S9300 C. The configuration details are not mentioned here.
Step 2 Configure the NQA server on S9300 C.
# Configure the IP address and UDP port number monitored by the NQA server.
<S9300C> system-view
[S9300C] nqa-server udpecho 10.2.1.2 6000
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
vlan batch 100
#
interface Vlanif100
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
nqa test-instance admin udp
test-type udp
destination-address ipv4 10.2.1.2
destination-address port 6000
#
ip route-static 10.2.1.0 255.255.255.0 10.1.1.2
#
return
#
return
Networking Requirements
As shown in Figure 5-64, the NQA Jitter test needs to be used to obtain the jitter time of
transmitting a packet from S9300 A to S9300 C. S9300 A and S9300 C synchronize the clock
from S9300 B so that the test precision is improved.
NOTE
For information about clock synchronization, see "NTP" in the Quidway S9300 Terabit Routing Switch
Feature Description - Network Management.
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure S9300 C as the NTP client and configure S9300 B as the NTP server.
2. Configure S9300 A as the NQA client and configure S9300 C as the NQA server.
3. Configure the service type and port number monitored by the NQA server.
4. Create and perform the NQA Jitter test on the NQA client.
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Configure reachable routes between S9300 A and S9300 B, between S9300 A and S9300 C, and
between S9300 B and S9300 C. The configuration details are not mentioned here.
# Configure the IP address and UDP port number monitored by the NQA server.
<S9300C> system-view
[S9300C] nqa-server udpecho 10.2.1.2 9000
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
vlan batch 100
#
interface Vlanif100
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
nqa test-instance admin jitter
test-type jitter
destination-address ipv4 10.2.1.2
destination-port 9000
#
ip route-static 10.2.1.0 255.255.255.0 10.1.1.2
#
return
l Configuration file of S9300 B
#
sysname S9300B
vlan batch 100 110
#
interface Vlanif100
ip address 10.1.1.2 255.255.255.0
#
interface Vlanif110
ip address 10.2.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 110
port hybrid untagged vlan 110
#
return
l Configuration file of S9300 C
#
sysname S9300C
#
#
vlan batch 110
#
interface Vlanif110
ip address 10.2.1.2 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 110
port hybrid untagged vlan 110
#
nqa-server udpecho 10.2.1.2 9000
#
ip route-static 10.1.1.0 255.255.255.0 10.2.1.1
#
return
Networking Requirements
As shown in Figure 5-65:
l CFM is enabled on S9300 A and S9300 B.
l MAs and MDs are configured on S9300 A and S9300 B.
The NQA MAC Ping test is used to test the connectivity between S9300 A and S9300 B.
Figure 5-65 Networking diagram for configuring the MAC Ping test
NQA Client
GE2/0/1 GE2/0/1
S9300A S9300B
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure S9300 A as the NQA client.
2. Configure S9300 B as the NQA server.
3. Create a MAC Ping test on S9300 A.
Data Preparation
To complete the configuration, you need the following data:
l IP address and mask of the NQA server
Procedure
Step 1 Configure the MA and MD between S9300 A and S9300 B.
<S9300A> system-view
[S9300A]cfm enable
[S9300A]cfm md test
[S9300A-md-test]ma test
[S9300A-md-test-ma-test]map vlan 11
[S9300A-md-test-ma-test]mep mep-id 11 interface GigabitEthernet2/0/1 outward
[S9300A-md-test-ma-test]quit
[S9300A-md-test]quit
[S9300A]
[Quidway]system-view
[S9300B]cfm enable
[S9300B]cfm md test
[S9300B-md-test]ma test
[S9300B-md-test-ma-test]map vlan 12
[S9300B-md-test-ma-test]mep mep-id 12 interface GigabitEthernet2/0/1 outward
[S9300B-md-test-ma-test]quit
[S9300B-md-test]quit
[S9300B]
Step 2 # Enable the NQA client and create a MAC Ping test for a common tunnel on S9300 A.
[S9300A]nqa test-instance admin macping
[S9300A-nqa-admin-macping]test-type macping
[S9300A-nqa-admin-macping]md test ma test
[S9300A-nqa-admin-macping]destination-address mac 00e0-fc88-aaaa
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
vlan batch 11
#
interface GigabitEthernet2/0/1
port hybrid pvid vlan 11
port hybrid untagged vlan 11
#
cfm enable
#
cfm md test
ma test
map vlan 11
mep mep-id 11 interface GigabitEthernet2/0/1 outward
#
nqa test-instance admin macping
test-type macping
destination mac 00e0-fc01-aaaa
md test ma test
#
return
#
sysname S9300B
#
vlan batch 11
#
interface GigabitEthernet2/0/1
port hybrid pvid vlan 11
port hybrid untagged vlan 11
#
cfm enable
#
cfm md test
ma test
map vlan 11
mep mep-id 12 interface GigabitEthernet2/0/1 outward
#
return
Example for Configuring the LSP Ping Test for a Common Tunnel
Networking Requirements
As shown in Figure 5-66:
l The OSPF protocol runs on S9300 A, S9300 B, and S9300 C. The three S9300s learn the
32-bit host routes on their loopback interfaces.
l MPLS and MPLS LDP are enabled on S9300 A, S9300 B, and S9300 C.
l MPLS and MPLS LDP are enabled on VLANIF interfaces connected to S9300 A, S9300
B, and S9300 C to trigger the establishment of an LDP LSP.
The NQA LSP Ping test needs to be performed to check the connectivity of the LSP between
S9300 A and S9300 C.
Figure 5-66 Networking diagram for configuring the LSP Ping test
area 0
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Configure reachable routes between S9300 A and S9300 B, between S9300 A and S9300 C, and
between S9300 B and S9300 C. The configuration details are not mentioned here.
Step 2 # Configure S9300 A.
# Enable the NQA client and create an LSP Ping test for a common tunnel.
<S9300A> system-view
[S9300A] nqa test-instance admin lspping
[S9300A-nqa-admin-lspping] test-type lspping
[S9300A-nqa-admin-lspping] lsp-type ipv4
[S9300A-nqa-admin-lspping] destination-address ipv4 3.3.3.9 lsp-masklen 32
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
mpls lsr-id 1.1.1.9
mpls
#
mpls ldp
#
vlan batch 100
#
interface Vlanif100
ip address 10.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 1.1.1.9 0.0.0.0
#
nqa test-instance admin lspping
test-type lspping
destination-address ipv4 3.3.3.9 lsp-masklen 32
#
return
l Configuration file of S9300 B
#
sysname S9300B
vlan batch 100 110
#
interface Vlanif100
ip address 10.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif110
ip address 10.2.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 110
port hybrid untagged vlan 110
#
mpls lsr-id 2.2.2.9
mpls
#
mpls ldp
#
interface LoopBack1
ip address 2.2.2.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.9 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.2.1.0 0.0.0.255
#
return
l Configuration file of S9300 C
#
sysname S9300C
#
mpls lsr-id 3.3.3.9
mpls
#
mpls ldp
#
vlan batch 110
#
interface Vlanif110
ip address 10.2.1.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 110
port hybrid untagged vlan 110
#
interface LoopBack1
ip address 3.3.3.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 3.3.3.9 0.0.0.0
network 10.2.1.0 0.0.0.255
#
Return
Example for Configuring the LSP Jitter Test for a Common Tunnel
Networking Requirements
As shown in Figure 5-67:
l The OSPF protocol runs on S9300 A, S9300 B, and S9300 C. The three S9300s learn the
32-bit host routes on their loopback interfaces.
l MPLS and MPLS LDP are enabled on S9300 A, S9300 B, and S9300 C.
l MPLS and MPLS LDP are enabled on POS interfaces connected to S9300 A, S9300 B,
and S9300 C to trigger the establishment of an LDP LSP.
The NQA LSP Ping test is used to check the connectivity of the LSP between S9300 A and
S9300 C.
Figure 5-67 Networking diagram for configuring the LSP Jitter test
area 0
Loopback
Loopback1 Loopback1
2.2.2.9/32 1
3.3.3.9/32
1.1.1.9/32
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l Host address and mask of the NQA server
Procedure
Step 1 Configure reachable routes between S9300 A and S9300 B, between S9300 A and S9300 C, and
between S9300 B and S9300 C. The configuration details are not mentioned here.
Step 2 Configure S9300 A as the NQA client.
# Enable the NQA client and configure the LDP LSP Ping test.
<S9300A> system-view
[S9300A] nqa test-instance admin lspjitter
[S9300A-nqa-admin-lspjitter] test-type lspjitter
[S9300A-nqa-admin-lspjitter] lsp-type ipv4
[S9300A-nqa-admin-lspjitter] destination-address ipv4 3.3.3.9 lsp-masklen 32 lsp-
loopback 127.0.0.1
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
mpls lsr-id 1.1.1.9
mpls
#
mpls ldp
#
vlan batch 100
#
interface Vlanif100
ip address 10.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
interface LoopBack1
undo shutdown
ip address 1.1.1.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 1.1.1.9 0.0.0.0
#
nqa test-instance admin lspjitter
test-type lspjitter
destination-address ipv4 3.3.3.9 lsp-masklen 32 lsp-loopback 127.0.0.1
#
return
l Configuration file of S9300 B
#
sysname S9300B
#
mpls lsr-id 2.2.2.9
mpls
#
mpls ldp
vlan batch 100 110
#
interface Vlanif100
ip address 10.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif110
ip address 10.2.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 110
port hybrid untagged vlan 110
#
interface LoopBack1
undo shutdown
ip address 2.2.2.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.9 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.2.1.0 0.0.0.255
#
return
l Configuration file of S9300 C
#
sysname S9300C
#
mpls lsr-id 3.3.3.9
mpls
#
mpls ldp
#
vlan batch 110
#
interface Vlanif110
ip address 10.2.1.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 110
port hybrid untagged vlan 110
#
interface LoopBack1
ip address 3.3.3.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 3.3.3.9 0.0.0.0
network 10.2.1.0 0.0.0.255
#
Return
Example for Configuring the LSP Traceroute Test for the TE Tunnel
Networking Requirements
As shown in Figure 5-68:
l The OSPF protocol runs on S9300 A, S9300 B, and S9300 C. The three S9300s learn the
32-bit host routes on their loopback interfaces.
l MPLS, MPLS TE, and MPLS RSVP-TE are enabled on S9300 A, S9300 B, and S9300 C.
l MPLS, MPLS TE, and MPLS RSVP-TE are enabled on the POS interfaces connected
toS9300 A, S9300 B, and S9300 C to set up a TE tunnel from S9300 A to S9300 C.
Figure 5-68 Networking diagram for configuring the LSP traceroute test
area 0
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure S9300 A as the NQA client. Create an LSP traceroute test on S9300 A.
Data Preparation
To complete the configuration, you need the following data:
l LSP TE tunnel interface number
Procedure
Step 1 Configure reachable routes between S9300 A and S9300 B, between S9300 A and S9300 C, and
between S9300 B and S9300 C. The configuration details are not mentioned here.
Step 2 Enable MPLS RSVP-TE on S9300 A, S9300 B, and S9300 C. The configuration details are not
mentioned here.
Step 3 Configure a TE tunnel on S9300 A to connect S9300 C. The configuration details are not
mentioned here.
Step 4 Create an NQA test on S9300 A.
# Enable the NQA client and configure the LSP traceroute test for the TE tunnel.
<S9300A> system-view
[S9300A] nqa test-instance admin lsptracert
[S9300A-nqa-admin-lsptracert] test-type lsptracert
[S9300A-nqa-admin-lsptracert] lsp-type te
[S9300A-nqa-admin-lsptracert] lsp-tetunnel tunnel 1/0/0
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
mpls lsr-id 1.1.1.9
mpls
mpls te
mpls rsvp-te
mpls te cspf
#
vlan batch 100
#
interface Vlanif100
ip address 10.1.1.1 255.255.255.0
mpls
mpls te
mpls te max-link-bandwidth 10000
mpls te max-reservable-bandwidth 5000
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
#
interface Tunnel1/0/0
undo shutdown
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 3.3.3.9
mpls te tunnel-id 100
mpls te bandwidth bc0 3000
mpls te commit
#
ospf 1
opaque-capability enable
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 1.1.1.9 0.0.0.0
mpls-te enable
#
nqa test-instance admin lspjitter
test-type lspjitter
lsp-type te
lsp-tetunnel Tunnel1/0/0
#
return
l Configuration file of S9300 B
#
sysname S9300B
#
mpls lsr-id 2.2.2.9
mpls
mpls te
mpls rsvp-te
#
vlan batch 100 110
#
interface Vlanif100
ip address 10.1.1.2 255.255.255.0
mpls
mpls te
mpls te max-link-bandwidth 10000
mpls te max-reservable-bandwidth 5000
mpls rsvp-te
#
interface Vlanif110
ip address 10.2.1.1 255.255.255.0
mpls
mpls te
Networking Requirements
As shown in Figure 5-69, S9300 A, S9300 B, and S9300 F are connected to a shared network
segment. OSPF runs on the interface connecting S9300 A to the network segment. This test is
performed to check the S9300s that run OSPF IGP on this network segment.
You need to reserve the multicast group 224.0.0.5 to present all the OSPF IGP S9300s on this
segment. Then the MPing function is used to check whether any network device on this segment
uses the IP address of the reserved multicast group.
S9300B S9300A
GE3/0/0 GE3/0/0
Vlanif100 Vlanif100
11.1.6.2/24 11.1.6.3/24
GE3/0/0
Vlanif100
11.1.6.1/24
S9300F
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure S9300 A as the NQA client and create an NQA MPing test whose group IP
address is 224.0.0.5 and outgoing interface is VLANIF 100.
2. Verify the configuration.
3. Perform the test and view the test result. If S9300 A receives responses from S9300 B and
S9300 F, it indicates that OSPF also runs on the interfaces of S9300 B and S9300 F.
Data Preparation
To complete the configuration, you need the following data:
l Test instance name: admin mping
l IP address of the reserved group: 224.0.0.5
Procedure
Step 1 Configure an NQA MPing test on S9300 A.
<Quidway> system-view
[Quidway] sysname S9300A
[S9300A] nqa test-instance admin mping
[S9300A-nqa-admin-mping] test-type mping
----End
Configuration Files
Configuration file of S9300 A
#
sysname S9300A
#
vlan batch 100
#
interface Vlanif100
ip address 11.1.6.3 255.255.255.0
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
ospf 1
area 0.0.0.0
network 11.1.6.0 0.0.0.255
#
nqa admin mping
test-type mping
destination-address ipv4 224.0.0.5
source-interface vlanif100
#
return
Networking Requirements
As shown in Figure 5-70, OSPF runs between S9300s and unicast routes are normal. The PIM-
DM multicast function is deployed on the network. This test is performed to check whether every
S9300 can process the multicast data normally.
You need to enable the MPing function to create certain multicast traffic from the IP address of
a common group, and then to trigger a multicast spanning tree. Then each S9300 is checked to
ensure that correct multicast routing entries exist. The NQA MPing test is used to implement
MPing.
Figure 5-70 Networking diagram of the MPing for common group addresses
Loopback0
S9300E 2.2.2.2/32
GE3/0/0
Vlanif120 GE3/0/0
11.1.2.2/24 Vlanif120
GE2/0/0 11.1.2.1/24
Vlanif130 GE1/0/0
Vlanif110
GE2/0/0 11.1.4.2/24
Vlanif130 11.1.5.2/24 GE1/0/0
Vlanif110
11.1.4.1/24 S9300D 11.1.5.1/24
S9300B S9300A
GE3/0/0 GE3/0/0
Vlanif140 Vlanif140
11.1.6.2/24 11.1.6.3/24
GE3/0/0
Vlanif140 GE1/0/0
11.1.6.1/24 Vlanif150
11.1.7.2/24
S9300F
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l Test instance name: admin mping
l IP address of the common group: 225.0.0.1
Procedure
Step 1 Add VLANIF 150 of S9300 F to the multicast group 225.0.0.1.
<S9300F> system-view
[S9300F] interface Vlanif 150
[S9300F-Vlanif150] igmp enable
[S9300F-Vlanif150] igmp static-group 225.0.0.1
(2.2.2.2, 225.0.0.1)
Protocol: pim-dm, Flag: LOC
UpTime: 00:05:41
Upstream interface: looback0
Upstream neighbor: NULL
RPF prime neighbor: NULL
Downstream interface(s) information:
Total number of downstreams: 1
1: Vlanif120
Protocol: pim-dm, UpTime: 00:04:27, Expires: never
# # Check the multicast forwarding entries on S9300 D. You can find that S9300 D generates
an entry (2.2.2.2, 225.0.0.1) after receiving the multicast packets from the upstream interface
VLANIF 120.
<S9300D> display pim routing-table
Vpn-instance: public net
Total 0 (*, G) entry; 1 (S, G) entry
(2.2.2.2, 225.0.0.1)
Protocol: pim-dm, Flag:
UpTime: 00:06:23
Upstream interface: Vlanif120
Upstream neighbor: 11.1.2.2
RPF prime neighbor: 11.1.2.2
Downstream interface(s) information:
Total number of downstreams: 1
1: GigabitEthernet2/0/0
Protocol: pim-dm, UpTime: 00:05:09, Expires: never
# # Check the multicast forwarding entries on S9300 A. You can find that S9300 A generates
an entry (2.2.2.2, 225.0.0.1) after receiving the multicast packets from the upstream interface
VLANIF 120.
<S9300A> display pim routing-table
Vpn-instance: public net
Total 0 (*, G) entry; 1 (S, G) entry
(2.2.2.2, 225.0.0.1)
Protocol: pim-dm, Flag: ACT
UpTime: 00:01:23
Upstream interface: GigabitEthernet3/0/0
Upstream neighbor: 11.1.6.2
RPF prime neighbor: 11.1.6.2
Downstream interface(s) information: None
# # Check the multicast forwarding entries on S9300 B. You can find that S9300 B generates
an entry (2.2.2.2, 225.0.0.1) after receiving the multicast packets from the upstream interface
GE 2/0/0.
<S9300B> display pim routing-table
Vpn-instance: public net
(2.2.2.2, 225.0.0.1)
Protocol: pim-dm, Flag: ACT
UpTime: 00:02:44
Upstream interface: GigabitEthernet2/0/0
Upstream neighbor: 11.1.4.2
RPF prime neighbor: 11.1.4.2
Downstream interface(s) information:
Total number of downstreams: 1
1: GigabitEthernet3/0/0
Protocol: pim-dm, UpTime: 00:01:30, Expires: never
# # Check the multicast forwarding entries on S9300 F. You can find that S9300 F generates an
entry (2.2.2.2, 225.0.0.1) after receiving the multicast packets from the upstream interface GE
3/0/0.
<S9300F> display pim routing-table
Vpn-instance: public net
Total 1 (*, G) entry; 1 (S, G) entry
(*, 225.0.0.1)
Protocol: pim-dm, Flag: WC
UpTime: 00:06:36
Upstream interface: NULL
Upstream neighbor: NULL
RPF prime neighbor: NULL
Downstream interface(s) information:
Total number of downstreams: 1
1: GigabitEthernet1/0/0
Protocol: igmp, UpTime: 00:06:36, Expires: never
(2.2.2.2, 225.0.0.1)
Protocol: pim-dm, Flag: ACT
UpTime: 00:03:40
Upstream interface: GigabitEthernet3/0/0
Upstream neighbor: 11.1.6.2
RPF prime neighbor: 11.1.6.2
Downstream interface(s) information:
Total number of downstreams: 1
1: GigabitEthernet1/0/0
Protocol: pim-dm, UpTime: 00:03:40, Expires: -
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
multicast routing-enable
#
vlan batch 110 140
#
interface Vlanif110
ip address 11.1.5.1 255.255.255.0
pim dm
#
interface Vlanif140
ip address 11.1.6.3 255.255.255.0
pim dm
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 110
port hybrid untagged vlan 110
#
interface GigabitEthernet3/0/0
interface GigabitEthernet1/0/0
port hybrid pvid vlan 150
port hybrid untagged vlan 150
pim dm
#
pim
#
ospf 1
area 0.0.0.0
network 11.1.6.0 0.0.0.255
network 11.1.7.0 0.0.0.255
#
return
Example for Checking the RPF Path from the Source to the S9300 Through the
MTrace Test
Networking Requirements
As shown in Figure 5-71, on the PIM-SM multicast network, implement the NTP protocal on
all S9300s to make S9300s work synchronously, receiver is added to the multicast group
225.1.1.1 and receives multicast data from Source normally. This test is performed to check how
the traffic is transmitted to the RTB from Source along the RPF route.
You need to enable MTrace on S9300 B to check the RPF path from the multicast source to the
current S9300.
The NQA MTrace test is used to implement the MTrace function.
Source
11.1.0.2/24
Vlanif150
11.1.0.1/24
Vlanif150
11.1.1.2/24 Vlanif130
Loopback0 11.1.2.2/24
S9300E Vlanif130
1.1.1.1/32
11.1.2.1/24
Vlanif150 Vlanif120 S9300D
11.1.1.1/2411.1.4.2/24 Vlanif110
S9300C
11.1.5.2/24
Vlanif160
11.1.3.2/24 S9300B Vlanif110
Vlanif160 11.1.5.1/24
11.1.3.1/24
Vlanif170
Vlanif170 S9300A
11.1.6.2/24
11.1.6.3/24
Receiver
11.1.6.4/24
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure S9300 B as the NQA client and create an MTrace test on it.
2. Perform the test and view the test result.
Data Preparation
To complete the configuration, you need the following data:
l Test instance name: admin mtrace
l IP address of the multicast source: 11.1.0.2/24
NOTE
Procedure
Step 1 Configure an NQA MTrace test on S9300 B.
<S9300B> system-view
[S9300B] nqa test-instance admin mtrace
[S9300B-nqa-admin-mtrace] test-type mtrace
[S9300B-nqa-admin-mtrace] mtrace-source-address ipv4 11.1.0.2
Step 3 Verify the test result. You can find that the RPF path from the multicast source to S9300B is
S9300E-S9300D-S9300B.
[S9300B-nqa-admin-mtrace] display nqa results test-instance admin mtrace
NQA entry(admin, mtrace) :testFlag is inactive ,testtype is mtrace
1 . Test 1 result The test is finished
Completions: success Query Mode: max-hop
Current Hop:3 Current Probe:1
SendProbe:1 ResponseProbe:1
Timeout Count:0 Busy Count:0
Drop Count:0 Max Path Ttl:4
Responser:127.0.0.1 Response Rtt: 10
mtrace start time: 2009-2-18 21:46:49.3
Last Good Probe Time: 2009-2-18 21:46:49.3
Last Good Path Time: 2009-2-18 21:46:49.3
1 . Hop 1
Outgoing Interface Address: 0.0.0.0
Incoming Interface Address: 11.1.4.1
Prehop Router Address: 11.1.4.2
Protocol : PIM(assert) Forward Code:NO_ERROR
Forward Ttl:1 Current Path Ttl:4
SG Packet Count:13316240 Hop Time Delay(ms): 0xffffffff
Input Packet Count:0 Output Packet Count:0
Input Rate(pps): 0xffffffff Output Rate(pps): 0xffffffff
Input Loss Rate: 0xffffffff SG Loss Rate: 0xffffffff
2 . Hop 2,Outgoing Interface Address:
11.1.4.2
Incoming Interface Address: 11.1.2.1
Prehop Router Address: 11.1.2.2
Protocol : PIM(assert) Forward Code:NO_ERROR
Forward Ttl:1 Current Path Ttl:3
SG Packet Count:26813234 Hop Time Delay(ms):39131
Input Packet Count:0 Output Packet Count:0
Input Rate(pps): 0xffffffff Output Rate(pps): 0xffffffff
Input Loss Rate: 0xffffffff SG Loss Rate: 0xffffffff
3 . Hop 3
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
multicast routing-enable
#
vlan batch 110 170
#
interface Vlanif110
ip address 11.1.5.1 255.255.255.0
pim sm
#
interface Vlanif170
ip address 11.1.6.3 255.255.255.0
igmp enable
pim sm
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 110
port hybrid untagged vlan 110
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 170
port hybrid untagged vlan 170
#
#
ospf 1
area 0.0.0.0
network 11.1.5.0 0.0.0.255
network 11.1.6.0 0.0.0.255
#
pim
#
return
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 160
port hybrid untagged vlan 160
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 120
port hybrid untagged vlan 120
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 170
port hybrid untagged vlan 170
#
ospf 1
area 0.0.0.0
network 11.1.3.0 0.0.0.255
network 11.1.4.0 0.0.0.255
network 11.1.6.0 0.0.0.255
#
pim
#
nqa admin mtrace
test-type mtrace
mtrace-source-address ipv4 11.1.0.2
#
Return
#
sysname S9300D
#
multicast routing-enable
#
vlan batch 110 120 130
#
interface Vlanif110
ip address 11.1.5.2 255.255.255.0
pim sm
#
interface Vlanif120
ip address 11.1.4.2 255.255.255.0
pim sm
#
interface Vlanif130
ip address 11.1.2.1 255.255.255.0
igmp enable
pim sm
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 110
port hybrid untagged vlan 110
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 120
port hybrid untagged vlan 120
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 130
port hybrid untagged vlan 130
#
ospf 1
area 0.0.0.0
network 11.1.2.0 0.0.0.255
network 11.1.4.0 0.0.0.255
network 11.1.5.0 0.0.0.255
#
pim
#
Return
l Configuration file of S9300 E
#
sysname S9300E
#
multicast routing-enable
#
vlan batch 130 140 150
#
interface Vlanif130
ip address 11.1.2.2 255.255.255.0
igmp enable
pim sm
#
interface Vlanif140
ip address 11.1.0.1 255.255.255.0
pim sm
#
interface Vlanif150
ip address 11.1.1.2 255.255.255.0
pim sm
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 140
port hybrid untagged vlan 140
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 150
port hybrid untagged vlan 150
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 130
port hybrid untagged vlan 130
#
ospf 1
area 0.0.0.0
network 11.1.0.0 0.0.0.255
network 11.1.1.0 0.0.0.255
network 11.1.26.0 0.0.0.255
#
pim
#
Return
Example for Checking the Multicast Path from the Source to the S9300 Through the
MTrace Test
Networking Requirements
As shown in Figure 5-72, on the PIM-SM multicast network, implement the NTP protocal on
all S9300s to make S9300s work synchronously, receiver is added to the multicast group
225.1.1.1 and receives multicast data from Source normally. The RTB can receive multicast
data. This test is performed to check how the multicast traffic is transmitted to RTB from Source.
You need to configure an NQA MTrace test on S9300 B to implement the MTrace function.
You can check the multicast path from the multicast source to the local S9300.
Figure 5-72 Networking diagram for checking the multicast path from the multicast source to
the local S9300
Source
11.1.0.2/24
Vlanif150
11.1.0.1/24
Vlanif150
Vlanif130
11.1.1.2/24
11.1.2.2/24
Loopback0
1.1.1.1/32 S9300E Vlanif130
11.1.2.1/24
Vlanif150 Vlanif120 S9300D
S9300C 11.1.1.1/24 11.1.4.2/24
Vlanif110
Vlanif160 11.1.5.2/24
11.1.3.2/24 S9300B
Vlanif160 Vlanif120
11.1.3.1/24 11.1.4.1/24
Vlanif170 S9300A
Vlanif170
11.1.6.2/24
11.1.6.3/24
Receiver
11.1.6.4/24
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure S9300 B as the NQA client and create an MTrace test on it.
2. Perform the test and view the test result.
Data Preparation
To complete the configuration, you need the following data:
l Test instance name: admin mtrace
l IP address of the multicast source: 11.1.0.2
l IP address of the multicast group: 225.1.1.1
Procedure
Step 1 Configure an NQA MTrace test on S9300 B.
<S9300B> system-view
[S9300B] nqa test-instance admin mtrace
[S9300B-nqa-admin-mtrace] test-type mtrace
[S9300B-nqa-admin-mtrace] mtrace-source-address ipv4 11.1.0.2
[S9300B-nqa-admin-mtrace] mtrace-group-address ipv4 225.1.1.1
Step 3 Verify the test result. You can find that the RPF path from the multicast source to S9300 B is
S9300 E-S9300 D-S9300 B.
[S9300B-nqa-admin-mtrace] display nqa results test-instance admin mtrace
NQA entry(admin, mtrace) :testFlag is inactive ,testtype is mtrace
1 . Test 1 result The test is finished
Completions: success Query Mode: max-hop
Current Hop:3 Current Probe:1
SendProbe:1 ResponseProb:1
Timeout Count:0 Busy Count:0
Drop Count:0 Max Path Ttl:4
Responser:11.1.2.2 Response Rtt: 64
mtrace start time: 2009-2-7 17:9:11.1
Last Good Probe Time: 2009-2-7 17:9:11.1
Last Good Path Time: 2009-2-7 17:9:11.1
1 . Hop 1
Outgoing Interface Address: 0.0.0.0
Incoming Interface Address: 11.1.4.1
Prehop Router Address: 11.1.4.2
Protocol : PIM Forward Code:NO_ERROR
Forward Ttl:1 Current Path Ttl:4
SG Packet Count:62 Hop Time Delay(ms):1
Input Packet Count:8845 Output Packet Count: 0xffffffff
Input Rate(pps): 0xffffffff Output Rate(pps): 0xffffffff
Input Loss Rate: 0xffffffff SG Loss Rate: 0xffffffff
2 . Hop 2
Outgoing Interface Address: 11.1.4.2
Incoming Interface Address: 11.1.2.1
Prehop Router Address: 11.1.2.2
Protocol : PIM Forward Code:NO_ERROR
Forward Ttl:1 Current Path Ttl:3
SG Packet Count:65 Hop Time Delay(ms): 0xffffffff
Input Packet Count:9264 Output Packet Count:8792
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
multicast routing-enable
#
vlan batch 110 170
#
interface Vlanif110
ip address 11.1.5.1 255.255.255.0
pim sm
#
interface Vlanif170
ip address 11.1.6.3 255.255.255.0
igmp enable
pim sm
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 110
port hybrid untagged vlan 110
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 170
port hybrid untagged vlan 170
#
ospf 1
area 0.0.0.0
network 11.1.5.0 0.0.0.255
network 11.1.6.0 0.0.0.255
#
pim
#
return
#
Return
l Configuration file of S9300 D
#
sysname S9300D
#
multicast routing-enable
vlan batch 110 120 130
#
interface Vlanif110
ip address 11.1.5.2 255.255.255.0
pim sm
#
interface Vlanif120
ip address 11.1.4.2 255.255.255.0
pim sm
#
interface Vlanif130
ip address 11.1.2.1 255.255.255.0
igmp enable
pim sm
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 110
port hybrid untagged vlan 110
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 120
port hybrid untagged vlan 120
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 130
port hybrid untagged vlan 130
#
ospf 1
area 0.0.0.0
network 11.1.2.0 0.0.0.255
network 11.1.4.0 0.0.0.255
network 11.1.5.0 0.0.0.255
#
pim
#
Return
l Configuration file of S9300 E
#
sysname S9300E
#
multicast routing-enable
#
vlan batch 130 140 150
#
interface Vlanif130
ip address 11.1.2.2 255.255.255.0
igmp enable
pim sm
#
interface Vlanif140
ip address 11.1.0.1 255.255.255.0
pim sm
#
interface Vlanif150
ip address 11.1.1.2 255.255.255.0
pim sm
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 140
port hybrid untagged vlan 140
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 150
port hybrid untagged vlan 150
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 130
port hybrid untagged vlan 130
#
ospf 1
area 0.0.0.0
network 11.1.0.0 0.0.0.255
network 11.1.1.0 0.0.0.255
network 11.1.2.0 0.0.0.255
#
pim
#
Return
Example for Checking the RPF Path from the Source to Destination Host Through
the MTrace Test
Networking Requirements
As shown in Figure 5-73, on the PIM-SM multicast network, implement the NTP protocal on
all S9300s to make S9300s work synchronously, Receiver is added to the multicast group
225.1.1.1 and receives multicast data from Source normally. S9300 B is the S9300 at the last
hop. This test is performed to check how the traffic is transmitted to Receiver from Source along
the RPF route.
You need to configure an NQA MTrace test on S9300 C to implement the MTrace function.
You can check the RPF path from the multicast source to the destination host.
Figure 5-73 Networking diagram for checking the multicast path from the multicast source to
the local S9300
Source
11.1.0.2/24
Vlanif150
11.1.0.1/24
Vlanif150 Vlanif130
11.1.1.2/24 11.1.2.2/24
Loopback0
1.1.1.1/32 S9300E Vlanif130
11.1.2.1/24
Vlanif150 Vlanif120 S9300D
11.1.1.1/24 11.1.4.2/24
S9300C Vlanif110
Vlanif160 11.1.5.2/24
11.1.3.2/24 S9300B Vlanif110
Vlanif160 Vlanif120 11.1.5.1/24
11.1.3.1/24 11.1.4.1/24
Vlanif170
Vlanif170 S9300A
11.1.6.2/24
11.1.6.3/24
Receiver
11.1.6.4/24
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure S9300 C as the NQA client and create an MTrace test on it.
2. Perform the test and view the test result.
Data Preparation
To complete the configuration, you need the following data:
l Test instance name: admin mtrace
l IP address of the multicast source: 11.1.0.2/24
l IP address of the destination host: 11.1.6.4
l IP address of the S9300 at the last hop: 11.1.6.2
Procedure
Step 1 Configure an NQA MTrace test on S9300 C.
<S9300C> system-view
[S9300C] nqa test-instance admin mtrace
[S9300C-nqa-admin-mtrace] test-type mtrace
[S9300C-nqa-admin-mtrace] mtrace-source-address ipv4 11.1.0.2
Step 3 Verify the test result. You can find that the RPF path from the multicast source to S9300 C is
S9300 E-S9300 D-S9300 C.
[S9300C-nqa-admin-mtrace] display nqa results test-instance admin mtrace
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
multicast routing-enable
#
#
vlan batch 110 170
#
interface Vlanif110
#
multicast routing-enable
#
#
vlan batch 150 160
#
interface Vlanif150
ip address 11.1.1.1 255.255.255.0
pim sm
#
interface Vlanif160
ip address 11.1.3.2 255.255.255.0
pim sm
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 160
port hybrid untagged vlan 160
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 150
port hybrid untagged vlan 150
#
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
pim sm
#
ospf 1
area 0.0.0.0
network 11.1.3.0 0.0.0.255
network 11.1.1.0 0.0.0.255
network 1.1.1.1 0.0.0.0
#
pim
c-bsr LoopBack0
c-rp LoopBack0
#
nqa admin mtrace
test-type mtrace
destination-address ipv4 11.1.6.4
mtrace-query-type last-hop
mtrace-last-hop-address ipv4 11.1.6.2
mtrace-source-address ipv4 11.1.0.2
#
return
#
l Configuration file of S9300 D
#
sysname S9300D
#
multicast routing-enable
#
vlan batch 110 120 130
#
interface Vlanif110
ip address 11.1.5.2 255.255.255.0
pim sm
#
interface Vlanif120
ip address 11.1.4.2 255.255.255.0
pim sm
#
interface Vlanif130
ip address 11.1.2.1 255.255.255.0
igmp enable
pim sm
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 110
Example for Checking the Multicast Path from the Source to Destination Host
Through the MTrace Test
Networking Requirements
As shown in Figure 5-74, on the PIM-SM multicast network, implement the NTP protocal on
all S9300s to make S9300s work synchronously, Receiver is added to the multicast group
225.1.1.1 and receives multicast data from Source normally. This test is performed to check how
the multicast traffic is transmitted to Receiver from Source.
You can configure an NQA MTrace test on S9300 C to implement the MTrace function. You
can check the multicast path from the multicast source to the destination host.
Figure 5-74 Networking diagram for checking the multicast path from the multicast source to
the local S9300
Source
11.1.0.2/24
Vlanif150
11.1.0.1/24
Vlanif150
Vlanif130
11.1.1.2/24
11.1.2.2/24
Loopback0 Vlanif130
S9300E
1.1.1.1/32 11.1.2.1/24
Vlanif150 Vlanif120 S9300D
S9300C 11.1.1.1/2411.1.4.2/24 Vlanif110
11.1.5.2/24
Vlanif160
S9300B Vlanif110
11.1.3.2/24
Vlanif160 Vlanif120 11.1.5.1/24
11.1.3.1/24 11.1.4.1/24
Vlanif170
Vlanif170 S9300A
11.1.6.2/24
11.1.6.3/24
Receiver
11.1.6.4/24
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure S9300 C as the NQA client and create an MTrace test on it.
2. Perform the test and view the test result.
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Configure an NQA MTrace test on S9300 C.
<S9300C> system-view
[S9300C] nqa test-instance admin mtrace
[S9300C-nqa-admin-mtrace] test-type mtrace
[S9300C-nqa-admin-mtrace] mtrace-source-address ipv4 11.1.0.2
[S9300C-nqa-admin-mtrace] mtrace-group-address ipv4 225.1.1.1
[S9300C-nqa-admin-mtrace] destination-address ipv4 11.1.6.4
[S9300C-nqa-admin-mtrace] mtrace-query-type destination
Step 3 Verify the test result. You can find that the RPF path from the multicast source to S9300 C is
S9300 E-S9300 D-S9300 C.
[S9300C-nqa-admin-mtrace] display nqa results test-instance admin mtrace
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
multicast routing-enable
#
vlan batch 110 170
#
interface Vlanif110
ip address 11.1.5.1 255.255.255.0
pim sm
#
interface Vlanif170
ip address 11.1.6.3 255.255.255.0
igmp enable
pim sm
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 110
port hybrid untagged vlan 110
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 170
port hybrid untagged vlan 170
#
ospf 1
area 0.0.0.0
network 11.1.5.0 0.0.0.255
network 11.1.6.0 0.0.0.255
#
pim
#
return
interface Vlanif110
ip address 11.1.5.2 255.255.255.0
pim sm
#
interface Vlanif120
ip address 11.1.4.2 255.255.255.0
pim sm
#
interface Vlanif130
ip address 11.1.2.1 255.255.255.0
igmp enable
pim sm
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 110
port hybrid untagged vlan 110
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 120
port hybrid untagged vlan 120
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 130
port hybrid untagged vlan 130
#
ospf 1
area 0.0.0.0
network 11.1.2.0 0.0.0.255
network 11.1.4.0 0.0.0.255
network 11.1.5.0 0.0.0.255
#
pim
#
Return
l Configuration file of S9300 E
#
sysname S9300E
#
multicast routing-enable
#
#
vlan batch 130 140 150
#
interface Vlanif130
ip address 11.1.2.2 255.255.255.0
igmp enable
pim sm
#
interface Vlanif140
ip address 11.1.0.1 255.255.255.0
pim sm
#
interface Vlanif150
ip address 11.1.1.2 255.255.255.0
pim sm
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 140
port hybrid untagged vlan 140
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 150
port hybrid untagged vlan 150
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 130
port hybrid untagged vlan 130
#
ospf 1
area 0.0.0.0
network 11.1.0.0 0.0.0.255
network 11.1.1.0 0.0.0.255
network 11.1.2.0 0.0.0.255
#
pim
#
Return
Networking Requirements
As shown in Figure 5-75, CE-A and CE-B are connected to PE-A and PE-B respectively. PE-
A and PE-B are connected through the MPLS backbone network. A dynamic PW needs to be
set up between PE-A and PE-B through the LSP tunnel.
The PWE3 Ping function of the single-hop PW needs to be performed to test the connectivity
of the PW between PE-A and PE-B.
Figure 5-75 Networking diagram for configuring the PWE3 Ping test on the single-hop PW
MPLS Backbone
CE-A CE-B
Configuration Roadmap
The configuration roadmap is as follows:
1. Run the IGP protocol on the backbone network to make the routes between S9300s on the
backbone network reachable.
2. Configure the basic MPLS functions on the backbone network and set up an LSP tunnel.
Set up the MPLS LDP peer relation between the two PE devices on the two ends of the
PW.
3. Create an MPLS L2VC connection between the two PE devices.
4. Configure a PWE3 Ping test on the single-hop PW on PE-A.
Data Preparation
To complete the configuration, you need the following data:
l L2VC IDs of the two ends of the PW, which must be the same
l MPLS LSR-IDs of the PE and P devices
l IP address of the remote peer
Procedure
Step 1 Configure a dynamic single-hop PW.
For the detailed configuration procedure, see "PWE3 Configuration" in the Quidway S9300
Terabit Routing Switch Configuration Guide - VPN.
# Configure PE-A.
<PE-A> system-view
[PE-A] nqa test-instance test pwe3ping
[PE-A-nqa-test-pwe3ping] test-type pwe3ping
[PE-A-nqa-test-pwe3ping] local-pw-id 100
[PE-A-nqa-test-pwe3ping] local-pw-type vlan
[PE-A-nqa-test-pwe3ping] label-type control-word
After running the display nqa results command on the PE device, you can see that the test is
successful.
[PE-A-nqa-test-pwe3ping] display nqa results
NQA entry(test, pwe3ping) :testFlag is inactive ,testtype is pwe3ping
1 . Test 1 result The test is finished
Send operation times: 3 Receive response times: 3
Completion:success OverThresholds number: 0
Attempts number:1 Drop operation number:0
Disconnect operation number:0 Operation timeout number:0
System busy operation number:0 Connection fail number:0
Operation sequence errors number:0 RTT Stats errors number:0
Min Positive Jitter: 0 Min Negative Jitter: 0
Max Positive Jitter: 0 Max Negative Jitter: 0
Positive Jitter Num: 0 Negative Jitter Num: 0
Positive Jitter Sum: 0 Negative Jitter Sum: 0
Positive Jitter Square Sum: 0 Negative Jitter Square Sum: 0
Packet Loss: 0 Packet Loss Ratio: 0
Destination ip address:10.2.2.2
Min/Max/Average Completion Time: 60/110/86
Sum/Square-Sum Completion Time: 260/23800
Average Single-Way Completion Time: 30
Last Good Probe Time: 2008-9-29 14:35:43.2
----End
Configuration Files
l Configuration file of CE-A
#
sysname CE-A
#
vlan batch 110
#
interface Vlanif110
ip address 100.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 110
port hybrid untagged vlan 110
#
return
l Configuration file of PE-A
#
sysname PE-A
#
mpls lsr-id 192.2.2.2
mpls
#
mpls l2vpn
#
mpls ldp
#
mpls ldp remote-peer 192.3.3.3
remote-ip 192.3.3.3
#
vlan batch 110 120
#
interface Vlanif110
mpls l2vc 192.3.3.3 100
#
interface Vlanif120
ip address 10.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 110
port hybrid untagged vlan 110
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 120
port hybrid untagged vlan 120
#
#
interface LoopBack0
ip address 192.2.2.2 0.0.0.0
#
nqa test-instance test pwe3ping
test-type pwe3ping
local-pw-id 100
local-pw-type vlan
remote-pw-id 100
#
ospf 1
area 0.0.0.0
network 192.2.2.2 0.0.0.0
network 10.1.1.0 0.0.0.255
#
return
l Configuration file of P
#
sysname P
#
mpls lsr-id 192.4.4.4
mpls
#
mpls ldp
#
vlan batch 120 130
#
interface Vlanif120
ip address 10.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif130
ip address 10.2.2.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 120
port hybrid untagged vlan 120
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 130
port hybrid untagged vlan 130
#
interface LoopBack0
ip address 192.4.4.4 255.255.255.255
#
ospf 1
area 0.0.0.0
network 192.4.4.4 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.2.2.0 0.0.0.255
#
return
l Configuration file of PE-B
#
sysname PE-B
#
mpls lsr-id 192.3.3.3
mpls
#
mpls l2vpn
#
mpls ldp
#
mpls ldp remote-peer 192.2.2.2
remote-ip 192.2.2.2
#
vlan batch 130 140
#
interface Vlanif130
ip address 10.2.2.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif140
mpls l2vc 192.2.2.2 100
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 140
port hybrid untagged vlan 140
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 130
port hybrid untagged vlan 130
#
#
interface LoopBack0
ip address 192.3.3.3 255.255.255.255
#
ospf 1
area 0.0.0.0
network 192.3.3.3 0.0.0.0
network 10.2.2.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-76, CE-A and CE-B are connected to U-PE1 and U-PE2 respectively
through PPP. U-PE1 and U-PE2 are connected through the MPLS backbone network. The LSP
needs to be used and S-PE is set as the switching node to set up a dynamic multi-hop PW between
U-PE1 and U-PE2.
The PWE3 Ping function of the multi-hop PW needs to be performed to test the connectivity of
the PW between U-PE1 and U-PE2.
Figure 5-76 Networking diagram for configuring the PWE3 Ping test on a multi-hop PW
Loopback0 Loopback0 Loopback0
2.2.2.9/32 3.3.3.9/32 4.4.4.9/32
GE1/0/0 GE1/0/0
P1 Vlanif130 S-PE Vlanif140 P2
20.1.1.2/24 30.1.1.2/24
GE2/0/0 GE2/0/0
GE1/0/0 Vlanif130 GE2/0/0
Vlanif120 Vlanif140 Vlanif150
20.1.1.1/24 30.1.1.1/24
10.1.1.2/24 40.1.1.1/24
Loopback0 Loopback0
100 PW
1.1.1.9/32 PW 200 5.5.5.9/32
GE2/0/0 GE1/0/0
Vlanif120 Vlanif150
10.1.1.1/24 40.1.1.2/24 U-PE2
GE1/0/0 GE2/0/0
U-PE1 Vlanif110 Vlanif160
GE1/0/0 GE1/0/0
Vlanif110 Vlanif160
100.1.1.1/24 100.1.1.2/24
CE-A CE-B
Configuration Roadmap
The configuration roadmap is as follows:
1. Run the IGP protocol on the backbone network to make the routes between S9300s on the
backbone network reachable.
2. Configure the basic MPLS functions on the backbone network and set up an LSP tunnel.
Set up MPLS LDP peer relations between U-PE1 and S-PE, and between U-PE2 and S-
PE.
3. Create an MPLS L2VC connection between the two U-PEs.
4. Create a switching PW on the switching node S-PE.
5. Configure a PWE3 Ping test on the multi-hop PW on U-PE1.
Data Preparation
To complete the configuration, you need the following data:
l L2VC IDs on U-PE1 and U-PE2, which must be different
l MPLS LSR-IDs of U-PE1, S-PE, and U-PE2
l IP address of the remote peer
l Encapsulation type of the switching PW
l Name and parameters of the PW template on U-PE devices
Procedure
Step 1 Configure a dynamic multi-hop PW.
Configure a dynamic multi-hop PW on the MPLS backbone network.
For the detailed configuration procedure, see "PWE3 Configuration" in the Quidway S9300
Terabit Routing Switch Configuration Guide - VPN.
Step 2 Configure a PWE3 Ping test on a multi-hop PW.
# Configure U-PE1.
<U-PE1> system-view
[U-PE1] nqa test-instance test pwe3ping
[U-PE1-nqa-test-pwe3ping] test-type pwe3ping
[U-PE1-nqa-test-pwe3ping] local-pw-id 100
[U-PE1-nqa-test-pwe3ping] local-pw-type ppp
[U-PE1-nqa-test-pwe3ping] label-type control-word
[U-PE1-nqa-test-pwe3ping] remote-pw-id 200
----End
Configuration Files
l Configuration file of CE-A
#
sysname CE-A
#
vlan batch 110
#
interface Vlanif110
ip address 100.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 110
port hybrid untagged vlan 110
#
return
#
mpls ldp remote-peer 1.1.1.9
remote-ip 1.1.1.9
#
mpls ldp remote-peer 5.5.5.9
remote-ip 5.5.5.9
#
vlan batch 130 140
#
interface Vlanif130
ip address 20.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif140
ip address 30.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 130
port hybrid untagged vlan 130
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 140
port hybrid untagged vlan 140
#
interface LoopBack0
ip address 3.3.3.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 3.3.3.9 0.0.0.0
network 20.1.1.0 0.0.0.255
network 30.1.1.0 0.0.0.255
#
return
l Configuration file of P2
#
sysname P2
#
mpls lsr-id 4.4.4.9
mpls
#
mpls ldp
#
vlan batch 140 150
#
interface Vlanif140
ip address 30.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif150
ip address 40.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 140
port hybrid untagged vlan 140
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 150
port hybrid untagged vlan 140
#
interface LoopBack0
ip address 4.4.4.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 4.4.2.9 0.0.0.0
network 30.1.1.0 0.0.0.255
network 40.1.1.0 0.0.0.255
#
Networking Requirements
As shown in Figure 5-77, CE-A and CE-B are respectively connected to PE-A and PE-B through
VLAN. PE-A and PE-B are connected through the MPLS backbone network. A dynamic PW
needs to be set up between PE-A and PE-B through the LSP tunnel.
The PWE3 Trace function of the single-hop PW needs to be performed to test the connectivity
of the PW between PE-A and PE-B.
Figure 5-77 Networking diagram for configuring the PWE3 Trace test on a single-hop PW
MPLS Backbone
Loopback0 Loopback0 Loopback0
192.2.2.2/32 192.4.4.4/32 192.3.3.3/32
GE2/0/0 GE2/0/0
GE1/0/0
Vlanif120 GE2/0/0 Vlanif130
10.1.1.1/24 Vlanif120
Vlanif13010.2.2.2/24
GE1/0/0 GE1/0/0
10.2.2.1/24
PE-A Vlanif110 10.1.1.2/24 P Vlanif140 PE-B
PW
GE1/0/0 GE1/0/0
Vlanif110 Vlanif140
100.1.1.1/24 100.1.1.2/24
CE-A CE-B
Configuration Roadmap
The configuration roadmap is as follows:
1. Run the IGP protocol on the backbone network to make the routes between S9300s on the
backbone network reachable.
2. Configure the basic MPLS functions on the backbone network and set up an LSP tunnel.
Set up the MPLS LDP peer relation between the two PE devices on the two ends of the
PW.
3. Create an MPLS L2VC connection between the two PE devices.
4. Configure a PWE3 Trace test on a single-hop PW on PE-A.
Data Preparation
To complete the configuration, you need the following data:
l L2VC IDs of the two ends of the PW, which must be the same
l MPLS LSR-IDs of the PE and P devices
l IP address of the remote peer
Procedure
Step 1 Configure a dynamic single-hop PW.
For the detailed configuration procedure, see "PWE3 Configuration" in the Quidway S9300
Terabit Routing Switch Configuration Guide - VPN.
# Configure PE-A.
<PE-A> system-view
[PE-A] nqa test-instance test pwe3trace
[PE-A -nqa-test-pwe3trace] test-type pwe3trace
[PE-A -nqa-test-pwe3trace] local-pw-type vlan
[PE-A -nqa-test-pwe3trace] local-pw-id 100
Run the display nqa history command on the PE device, and you can see that the status is
successful.
[PE-A-nqa-test-pwe3trace] display nqa history
NQA entry(test, pwe3trace)
history:
Index T/H/P Response Status Address Time
1 1/1/1 4 success 10.1.1.2 2006-9-30 9:33:3.301
2 1/1/2 5 success 10.1.1.2 2006-9-30 9:33:3.307
3 1/1/3 3 success 10.1.1.2 2006-9-30 9:33:3.311
4 1/2/1 6 success 3.3.3.9 2006-9-30 9:33:3.318
5 1/2/2 6 success 3.3.3.9 2006-9-30 9:33:3.324
6 1/2/3 6 success 3.3.3.9 2006-9-30 9:33:3.331
After running the display nqa results command on the PE device, you can see that the test is
successful.
[PE-A-nqa-test- pwe3trace] display nqa results
NQA entry(test, pwe3trace) :testFlag is inactive ,testtype is pwe3trace
1 . Test 1 result The test is finished
Completion:success Attempts number:1
Disconnect operation number:0 Operation timeout number:0
System busy operation number:0 Connection fail number:0
Operation sequence errors number:0 RTT Stats errors number:0
Drop operation number:0
Last good path Time:2006-9-24 11:22:21.2
1 . Hop 1
Send operation times: 3 Receive response times: 3
Min/Max/Average Completion Time: 1050/1090/1053
Sum/Square-Sum Completion Time: 3160/3331000
RTD OverThresholds number: 0
Last Good Probe Time: 2006-9-24 11:22:17.2
Destination ip address:10.1.1.2
2 . Hop 2
Send operation times: 3 Receive response times: 3
Min/Max/Average Completion Time: 1050/1490/1323
Sum/Square-Sum Completion Time: 3970/5367500
RTD OverThresholds number: 0
Last Good Probe Time: 2006-8-24 11:22:21.2
Destination ip address:10.2.2.2
----End
Configuration Files
l Configuration file of CE-A
#
sysname CE-A
#
vlan batch 110
#
interface Vlanif110
ip address 100.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 110
port hybrid untagged vlan 110
#
return
l Configuration file of P
#
sysname P
#
mpls lsr-id 192.4.4.4
mpls
#
mpls ldp
#
vlan batch 120 130
#
interface Vlanif120
ip address 10.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif130
ip address 10.2.2.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 120
port hybrid untagged vlan 120
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 130
port hybrid untagged vlan 130
#
interface LoopBack0
ip address 192.4.4.4 255.255.255.255
#
ospf 1
area 0.0.0.0
network 192.4.4.4 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.2.2.0 0.0.0.255
#
return
l Configuration file of PE-B
#
sysname PE-B
#
mpls lsr-id 192.3.3.3
mpls
#
mpls l2vpn
#
mpls ldp
#
mpls ldp remote-peer 192.2.2.2
remote-ip 192.2.2.2
#
vlan batch 130 140
#
interface Vlanif130
ip address 10.2.2.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif140
mpls l2vc 192.2.2.2 100
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 140
port hybrid untagged vlan 140
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 130
port hybrid untagged vlan 130
#
interface LoopBack0
ip address 192.3.3.3 255.255.255.255
#
ospf 1
area 0.0.0.0
network 192.3.3.3 0.0.0.0
network 10.2.2.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-78, CE-A and CE-B are respectively connected to U-PE1 and U-PE2
through PPP. U-PE1 and U-PE2 are connected through the MPLS backbone network. The LSP
needs to be used and S-PE is set as the switching node to set up a dynamic multi-hop PW between
U-PE1 and U-PE2.
The PWE3 Trace function of the multi-hop PW needs to be performed to test the connectivity
of the PW between U-PE1 and U-PE2.
Figure 5-78 Networking diagram for configuring the PWE3 Trace test on a multi-hop PW
Loopback0 Loopback0 Loopback0
2.2.2.9/32 3.3.3.9/32 4.4.4.9/32
GE1/0/0 GE1/0/0
P1 Vlanif130 S-PE Vlanif140 P2
20.1.1.2/24 30.1.1.2/24
GE1/0/0 GE2/0/0 GE2/0/0
GE2/0/0
Vlanif120 Vlanif140
Vlanif130 Vlanif150
10.1.1.2/24 30.1.1.1/24
20.1.1.1/24 40.1.1.1/24
Loopback0 Loopback0
100 PW 5.5.5.9/32
1.1.1.9/32 PW 200
GE2/0/0 GE1/0/0
Vlanif120 Vlanif150 U-PE2
40.1.1.2/24
10.1.1.1/24
GE1/0/0 GE2/0/0
U-PE1 Vlanif110 Vlanif160
GE1/0/0 GE1/0/0
Vlanif110 Vlanif160
100.1.1.1/24 100.1.1.2/24
CE-A CE-B
Configuration Roadmap
The configuration roadmap is as follows:
1. Run the IGP protocol on the backbone network to make the routes between S9300s on the
backbone network reachable.
2. Configure the basic MPLS functions on the backbone network and set up an LSP tunnel.
Set up MPLS LDP peer relations between U-PE1 and S-PE, and between U-PE2 and S-
PE.
3. Create an MPLS L2VC connection between the two U-PEs.
4. Create a switching PW on the switching node S-PE.
5. Configure a PWE3 Trace test on the multi-hop PW on U-PE1.
Data Preparation
To complete the configuration, you need the following data:
l L2VC IDs on U-PE1 and U-PE2, which must be different
l MPLS LSR-IDs of U-PE1, S-PE, and U-PE2
l IP address of the remote peer
l Encapsulation type of the switching PW
l Name and parameters of the PW template on U-PE devices
Procedure
Step 1 Configure a dynamic multi-hop PW.
Configure a dynamic multi-hop PW on the MPLS backbone network.
For the detailed configuration procedure, see "PWE3 Configuration" in the Quidway S9300
Terabit Routing Switch Configuration Guide - VPN.
Step 2 Configure a PWE3 Trace test of the multi-hop PW.
# Configure U-PE1.
<U-PE1> system-view
[U-PE1] nqa test-instance test pwe3trace
[U-PE1-nqa-test-pwe3trace] test-type pwe3trace
[U-PE1-nqa-test-pwe3trace] local-pw-id 100
[U-PE1-nqa-test-pwe3trace] local-pw-type ppp
[U-PE1-nqa-test-pwe3trace] label-type control-word
[U-PE1-nqa-test-pwe3trace] remote-pw-id 200
Running the display nqa results command on the PE device, you can see that the test is
successful.
[U-PE1-nqa-test-pwe3trace] display nqa results
NQA entry(test, pwe3trace) :testFlag is inactive ,testtype is pwe3trace
1 . Test 1 result The test is finished
Completion:success Attempts number:1
Disconnect operation number:0 Operation timeout number:0
System busy operation number:0 Connection fail number:0
Operation sequence errors number:0 RTT Stats errors number:0
Drop operation number:0
Last good path Time:2006-9-24 11:22:21.2
1 . Hop 1
Send operation times: 3 Receive response times: 3
Min/Max/Average Completion Time: 1050/1090/1053
Sum/Square-Sum Completion Time: 3160/3331000
RTD OverThresholds number: 0
Last Good Probe Time: 2006-9-24 11:22:17.2
Destination ip address:10.1.1.2
2 . Hop 2
Send operation times: 3 Receive response times: 3
Min/Max/Average Completion Time: 1050/1490/1323
Sum/Square-Sum Completion Time: 3970/5367500
RTD OverThresholds number: 0
Last Good Probe Time: 2006-8-24 11:22:21.2
Destination ip address:20.1.1.2
3 . Hop 3
Send operation times: 3 Receive response times: 3
Min/Max/Average Completion Time: 1050/1490/1323
Sum/Square-Sum Completion Time: 3970/5367500
RTD OverThresholds number: 0
Last Good Probe Time: 2006-8-24 11:22:21.2
Destination ip address:30.1.1.2
4 . Hop 4
Send operation times: 3 Receive response times: 3
Min/Max/Average Completion Time: 1050/1490/1323
Sum/Square-Sum Completion Time: 3970/5367500
RTD OverThresholds number: 0
Last Good Probe Time: 2006-8-24 11:22:21.2
Destination ip address:5.5.5.9
----End
Configuration Files
l Configuration file of CE-A
#
sysname CE-A
#
vlan batch 110
#
interface Vlanif110
ip address 100.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 110
#
return
l Configuration file of P2
#
sysname P2
#
mpls lsr-id 4.4.4.9
mpls
#
mpls ldp
#
vlan batch 140 150
#
interface Vlanif140
ip address 30.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif150
ip address 40.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 140
port hybrid untagged vlan 140
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 150
port hybrid untagged vlan 150
#
interface LoopBack0
ip address 4.4.4.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 4.4.2.9 0.0.0.0
network 30.1.1.0 0.0.0.255
network 40.1.1.0 0.0.0.255
#
l Configuration file of U-PE2
#
sysname U-PE2
#
mpls lsr-id 5.5.5.9
mpls
#
mpls l2vpn
#
mpls ldp
#
mpls ldp remote-peer 3.3.3.9
remote-ip 3.3.3.9
#
vlan batch 150 160
#
interface Vlanif150
ip address 40.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif160
mpls l2vc 3.3.3.9 200
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 150
port hybrid untagged vlan 150
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 160
port hybrid untagged vlan 160
#
interface LoopBack0
ip address 5.5.5.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 5.5.5.9 0.0.0.0
network 40.1.1.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-79:
S9300 A functions as the NQA client to check whether S9300 B and S9300 C are reachable.
test2
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l Host addresses of S9300 B and S9300 C
l Time when the test group is enabled
Procedure
Step 1 Configure reachable routes between S9300 A and S9300 B, between S9300 A and S9300 C, and
between S9300 B and S9300 C. The configuration details are not mentioned here.
Step 2 Create an ICMP NQA test group on S9300 A.
<S9300A> system-view
[S9300A] nqa test-instance group icmp
[S9300A-nqa-group-icmp] test-type icmp
[S9300A-nqa-group-icmp] switch-to group
[S9300A-nqa-group-icmp] quit
Step 3 On S9300 A, create two tests named admin test1 and admin test2 respectively to check whether
S9300 B and S9300 C are reachable.
[S9300A] nqa test-instance admin test1
[S9300A-nqa-admin-test1] test-type icmp
[S9300A-nqa-admin-test1] join group nqa group icmp
[S9300A-nqa-admin-test1] destination-address ipv4 10.1.1.2
[S9300A-nqa-admin-test1] quit
[S9300A] nqa test-instance admin test2
[S9300A-nqa-admin-test2] test-type icmp
[S9300A-nqa-admin-test2] join group nqa group icmp
[S9300A-nqa-admin-test2] destination-address ipv4 10.2.1.2
[S9300A-nqa-admin-test2] quit
Step 4 Return to the test group view and set the test to be performed after 10 seconds.
[S9300A] nqa test-instance group icmp
[S9300A-nqa-group-icmp] start delay seconds 10
# After running the display nqa-agent command, you can view the status of the test group and
the test members on the client.
[S9300A-nqa-group-icmp] display nqa-agent
NQA Tests Max:2000 NQA Tests Num:3
NQA Concurrent Requests Max:1000 NQA Concurrent Requests Num:1
NQA Jitter Concurrent Max:5 NQA Jitter Concurrent Num:0
NQA icmp Concurrent Max:50 NQA icmp Concurrent Num:1
NQA Trace Concurrent Max:50 NQA Trace Concurrent Mum:0
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
vlan batch 110
#
interface Vlanif110
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 110
port hybrid untagged vlan 110
#
nqa test-instance group icmp
switch-to group
test-type icmp
nqa test-instance admin test1
test-type icmp
join group nqa group icmp
destination-address ipv4 10.1.1.2
Example for Configuring the Test of Sending NQA Threshold Traps to the NMS
Networking Requirements
As shown in Figure 5-80, the trap threshold are configured and the function of sending trap
messages is enabled when a Jitter test is configured. After the Jitter test is complete, S9300 A
sends a trap message to the NMS when the interval for transmitting the test packet from
S9300 A to S9300 C or from S9300 C to S9300 A exceeds the configured unidirectional
transmission threshold, or when the RTT of the test packet exceeds the configured bidirectional
transmission threshold. Network administrators can view the cause of a trap in the trap message
received by the NMS.
NM Station
GE 2/0/0 20.1.1.2/24
Vlanif110 S9300 GE 1/0/0 S9300C
20.1.1.1/24 B Vlanif130
30.1.1.2/24
GE 1/0/0 GE 1/0/0 GE 2/0/0
S9300A Vlanif120 Vlanif120 Vlanif130
10.1.1.1/24 10.1.1.2/24 30.1.1.1/24 NQA Server
NOTE
For the information about clock synchronization, see "NTP" in the Quidway S9300 Terabit Routing
Switch Feature Description - Device Management.
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a Jitter test.
2. Configure the NQA thresholds.
3. Enable the function of sending trap messages.
4. Configure the function of sending trap messages to the NMS.
Data Preparation
To complete the configuration, you need the following data:
l IP address and port number of the server-side host.
l Type of the monitored service and monitoring port number
l RTD threshold and OWD threshold
l IP address of the NMS
Procedure
Step 1 Configure reachable routes between S9300 A and S9300 B, between S9300 A and S9300 C, and
between S9300 B and S9300 C. The configuration details are not mentioned here.
Step 2 Configure a Jitter test.
# Configure the IP address and UDP port number monitored by the NQA server on S9300 C.
<S9300C> system-view
[S9300C] nqa-server udpecho 30.1.1.2 9000
# # Enable the NQA client on S9300 A and create an NQA Jitter test on it.
<S9300A> system-view
[S9300A] nqa test-instance admin jitter
# Verify that the NMS can receive the trap message successfully. The displayed information is
not provided here.
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
vlan batch 110 120
#
interface Vlanif110
ip address 20.1.1.1 255.255.255.0
#
interface Vlanif120
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 120
port hybrid untagged vlan 120
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 110
port hybrid untagged vlan 110
#
ospf 1
area 0.0.0.0
network 10.1.1.0 0.0.0.0
#
nqa test-instance test jitter
test-type jitter
destination-address ipv4 30.1.1.2
destination-port 9000
threshold rtd 20
threshold owd-sd 100
threshold owd-ds 100
send-trap rtd
send-trap owd-sd
send-trap owd-ds
#
snmp-agent
snmp-agent local-engineid 000007DB7F00000100007B29
snmp-agent sys-info version v2c
snmp-agent target-host trap address udp-domain 20.1.1.2 params securityname
public v2c
snmp-agent trap enable eth-
trunk
snmp-agent trap enable
l2service
snmp-agent trap enable
bfd
snmp-agent trap enable
bgp
snmp-agent trap enable static-
lsp
snmp-agent trap enable te tunnel-
reop
This chapter describes the basic knowledge, methods, and examples for configuring VLAN
mapping.
5.4.5 QinQ Configuration
This chapter describes the basic knowledge, methods, and examples for configuring QinQ.
5.4.6 MAC Address Table Configuration
This chapter describes the basic knowledge, methods, and examples for configuring the MAC
address table.
5.4.7 MSTP Configuration
This chapter describes the basic knowledge, methods, and examples for configuring the
Spanning Tree Protocol (STP), Rapid Spanning Tree Protocol (RSTP), and Multiple Spanning
Tree Protocol (MSTP).
5.4.8 BPDU Tunnel Configuration
This chapter describes the basic knowledge, methods, and examples for configuring BPDU
tunnel.
5.4.9 LDT Configuration
This chapter describes the concepts, configuration procedures, and configuration examples of
loop detection (LDT).
5.4.10 RRPP Configuration
This chapter describes the basic knowledge, methods, and examples for configuring the Rapid
Ring Protection Protocol (RRPP).
Networking Requirements
As shown in Figure 5-81, GE1/0/1 of S9300-A is connected to GE1/0/2 of S9300-B; S9300-B
connects to user network 2 through GE2/0/1; GE2/0/2 of S9300-C is connected to a LAN switch,
namely, LSW.
To ensure normal operation of the services on the network, perform the following operations on
the Ethernet interfaces of the S9300:
l Set the ratio of broadcast packets to 15%.
l Set the ratio of unknown multicast packets to 25%.
l Set the ratio of unknown unicast packets to 90%.
MAN
User GE1/0/1 GE1/0/2 GE
network 1 2 /0 /
2 User
/1
S9300-A S9300-B S9300-C
/0
network 3
E2
G
User LSW
network 2
Configuration Roadmap
The configuration roadmap is as follows:
1. Limit traffic volume on the interfaces of S9300-A, S9300-B, and S9300-C.
Data Preparation
To complete the configuration, you need the following data:
l Numbers of the interfaces connecting S9300-A and S9300-B
l Number of the interface connecting S9300-B to user network 2
l Number of the interface connecting S9300-C to the LSW
Procedure
Step 1 Set the maximum traffic volume of packets.
# Set the maximum traffic volume of broadcast packets, unknown multicast packets, and
unknown unicast packets respectively on GE1/0/1 of S9300-A.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] interface gigabitethernet 1/0/1
[S9300-A-GigabitEthernet1/0/1] broadcast-suppression percent 15
[S9300-A-GigabitEthernet1/0/1] multicast-suppression percent 25
[S9300-A-GigabitEthernet1/0/1] unknown-unicast-suppression percent 90
# Set the maximum traffic volume of broadcast packets, unknown multicast packets, and
unknown unicast packets respectively on GE1/0/2 of S9300-B.
<Quidway> system-view
[Quidway] sysname S9300-B
[S9300-B] interface gigabitethernet 1/0/2
[S9300-B-GigabitEthernet1/0/2] broadcast-suppression percent 15
[S9300-B-GigabitEthernet1/0/2] multicast-suppression percent 25
[S9300-B-GigabitEthernet1/0/2] unknown-unicast-suppression percent 90
# Set the maximum traffic volume of broadcast packets, unknown multicast packets, and
unknown unicast packets respectively on GE2/0/2 of S9300-C.
<Quidway> system-view
[Quidway] sysname S9300-C
[S9300-C] interface gigabitethernet 2/0/2
[S9300-C-GigabitEthernet2/0/2] broadcast-suppression percent 15
[S9300-C-GigabitEthernet2/0/2] multicast-suppression percent 25
[S9300-C-GigabitEthernet2/0/2] unknown-unicast-suppression percent 90
----End
Configuration Files
The following lists the configuration files of the S9300.
Networking Requirements
As shown in Figure 5-82, the S9300 is connected to the BRAS through an Eth-Trunk. The link
between the S9300 and BRAS must ensure high reliability, and data traffic needs to be load
balanced among the LPUs of the S9300. To meet this requirement, you need to configure an
inter-board Eth-Trunk on the S9300.
Figure 5-82 Networking diagram for configuring link aggregation in manual load balancing
mode
BRAS
Eth-Trunk 60
Eth-Trunk
Eth-Trunk 120
GE3/0/0 GE2/0/0
S9300
GE1/0/0 GE1/0/5
VLAN 100-150 VLAN 151-200
DSLAM DSLAM
Precautions
During the configuration, pay attention to the following:
l The Ethernet interfaces on the two ends that form an Eth-Trunk must be directly connected.
l The two ends of the Eth-Trunk must contain the same number of member interfaces.
l Before Ethernet interfaces are added to the Eth-Trunk, ensure that no configuration is made
on the Ethernet interfaces.
l The Eth-Trunk in manual load balancing mode can contain member interfaces with
different rates. For example, an FE interface and a GE interface can be added to the same
Eth-Trunk.
l Each Eth-Trunk contains up to eight member interfaces.
Configuration Roadmap
The configuration roadmap is as follows:
1. Create an Eth-Trunk.
2. Add member interfaces to the Eth-Trunk.
Data Preparation
To complete the configuration, you need the following data:
l Number of the Eth-Trunk
l Types and numbers of the member interfaces in the Eth-Trunk
Procedure
Step 1 Create an Eth-Trunk.
# Create Eth-Trunk 120.
<Quidway> system-view
[Quidway] sysname S9300
[S9300] interface eth-trunk 120
[S9300-Eth-Trunk120] quit
The preceding information indicates that Eth-Trunk 120 consists of member interfaces GE 2/0/0
and GE 3/0/0. The member interfaces are both in Up state.
----End
Configuration Files
Configuration file of the S9300
#
sysname S9300
#
interface Eth-Trunk120
port link-type trunk
port trunk allow-pass vlan 100 to 200
#
interface GigabitEthernet2/0/0
eth-trunk 120
#
interface GigabitEthernet3/0/0
eth-trunk 120
#
return
Networking Requirements
To improve the bandwidth and the connection reliability, configure the link aggregation group
on two directly connected S9300s, as shown in Figure 5-83. The requirements are as follows:
Figure 5-83 Networking diagram for configuring link aggregation in static LACP mode
Eth-Trunk 1 Eth-Trunk 1
S9300-A GE 1/0/1 S9300-B
GE 1/0/1
GE 1/0/2 GE 1/0/2 Active link
Eth-Trunk
GE 1/0/3 GE 1/0/3 Backup link
Configuration Roadmap
The configuration roadmap is as follows:
1. Create an Eth-Trunk on the S9300 and configure the Eth-Trunk to work in static LACP
mode.
2. Add member interfaces to the Eth-Trunk.
3. Set the system priority and determine the Actor.
4. Set the upper threshold of the active interfaces.
5. Set the priority of the interface and determine the active link.
Data Preparation
To complete the configuration, you need the following data:
l Numbers of the link aggregation groups on the S9300s
l System priority of S9300-A
l Upper threshold of active interfaces
l LACP priority of the active interface
Procedure
Step 1 Create Eth-Trunk 1 and set the load balancing mode of the Eth-Trunk to static LACP mode.
# Configure S9300-A.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] interface eth-trunk 1
[S9300-A-Eth-Trunk1] mode lacp-static
[S9300-A-Eth-Trunk1] quit
# Configure S9300-B.
<Quidway> system-view
[Quidway] sysname S9300-B
[S9300-B] interface eth-trunk 1
[S9300-B-Eth-Trunk1] mode lacp-static
[S9300-B-Eth-Trunk1] quit
# Configure S9300-B.
[S9300-B] interface gigabitethernet 1/0/1
[S9300-B-Gigabitethernet1/0/1] eth-trunk 1
[S9300-B-Gigabitethernet1/0/1] quit
[S9300-B] interface gigabitethernet 1/0/2
[S9300-B-Gigabitethernet1/0/2] eth-trunk 1
[S9300-B-Gigabitethernet1/0/2] quit
[S9300-B] interface gigabitethernet 1/0/3
[S9300-B-Gigabitethernet1/0/3] eth-trunk 1
[S9300-B-Gigabitethernet1/0/3] quit
Step 3 Set the system priority on S9300-A to 100 so that S9300-A becomes the Actor.
Step 5 Set the priority of the interface and determine active links on S9300-A.
[S9300-A] interface gigabitethernet 1/0/1
[S9300-A-Gigabitethernet1/0/1] lacp priority 100
[S9300-A-Gigabitethernet1/0/1] quit
[S9300-A] interface gigabitethernet 1/0/2
[S9300-A-Gigabitethernet1/0/2] lacp priority 100
[S9300-A-Gigabitethernet1/0/2] quit
# Check information about the Eth-Trunk of the S9300s and check whether the negotiation is
successful on the link.
[S9300-A] display eth-trunk 1
Eth-Trunk1's state information is:
Local:
LAG ID: 1 WorkingMode: STATIC
Preempt Delay: Disabled Hash arithmetic: According to SA-XOR-DA
System Priority: 100 System ID: 00e0-fca8-0417
Least Active-linknumber: 1 Max Active-linknumber: 2
Operate status: Up Number Of Up Port In Trunk: 2
------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState
Weight
GigabitEthernet1/0/1 Selected 1GE 100 6145 2865 11111100
1
GigabitEthernet1/0/2 Selected 1GE 100 6146 2865 11111100
1
GigabitEthernet1/0/3 Unselect 1GE 32768 6147 2865 11100000
1
Partner:
------------------------------------------------------------------------------
PartnerPortName SysPri SystemID PortPri PortNo PortKey PortState
GigabitEthernet1/0/1 32768 00e0-fca6-7f85 32768 6145 2609 11111100
GigabitEthernet1/0/2 32768 00e0-fca6-7f85 32768 6146 2609 11111100
GigabitEthernet1/0/3 32768 00e0-fca6-7f85 32768 6147 2609 11110000
Partner:
------------------------------------------------------------------------------
PartnerPortName SysPri SystemID PortPri PortNo PortKey
PortState
GigabitEthernet1/0/1 100 00e0-fca8-0417 100 6145 2865 11111100
GigabitEthernet1/0/2 100 00e0-fca8-0417 100 6146 2865 11111100
GigabitEthernet1/0/3 100 00e0-fca8-0417 32768 6147 2865 11110000
The preceding information shows that the system priority of S9300-A is 100 and it is higher than
the system priority of S9300-B. Member interfaces GE1/0/1 and GE1/0/2 become the active
interfaces and are in Selected state. Interface GE1/0/3 is in Unselect state. M active links work
in load balancing mode and N links are the backup links.
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
lacp priority 100
#
interface Eth-Trunk1
mode lacp-static
max active-linknumber 2
#
interface GigabitEthernet1/0/1
eth-trunk 1
lacp priority 100
#
interface GigabitEthernet1/0/2
eth-trunk 1
lacp priority 100
#
interface GigabitEthernet1/0/3
eth-trunk 1
#
return
Networking Requirements
As shown in Figure 5-84, an enterprise has four departments. Department 1 is connected to an
S9300, which connects to GE 1/0/1 of another S9300. Department 2 is connected a Layer 2
switch (LSW) LSW-A, which connects to GE 1/0/2 of an S9300. Department 3 is connected to
LSW-B, which connects to GE 1/0/3 of an S9300. Department 4 is connected to an S9300, which
connects to GE 1/0/4 of another S9300. The networking requirements are as follows:
l Department 1 and Department 2 in VLAN 2 are isolated from Department 3 and Department
4 in VLAN 3.
l Department 1 and Department 2 in VLAN 2 can communicate with each other.
l Department 3 and Department 4 in VLAN 3 can communicate with each other.
MAN
S9300
VLAN2 VLAN3
GE1/0/1 GE1/0/4
S9300 GE1/0/2 GE1/0/3 S9300
LSW-A
LSW-B
…… …… …… ……
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs.
2. Add interfaces to the VLAN.
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Configure the S9300.
# Create VLAN 2.
<Quidway> system-view
[Quidway] vlan 2
[Quidway-vlan2] quit
# Set the link type of GE 1/0/1 to trunk and add GE 1/0/1 to VLAN 2.
[Quidway] interface gigabitethernet 1/0/1
[Quidway-GigabitEthernet1/0/1] port link-type trunk
[Quidway-GigabitEthernet1/0/1] port trunk allow-pass vlan 2
[Quidway-GigabitEthernet1/0/1] quit
# Set the link type of GE 1/0/2 to trunk and add GE 1/0/2 to VLAN 2.
[Quidway]interface gigabitethernet 1/0/2
[Quidway-GigabitEthernet1/0/2] port link-type trunk
[Quidway-GigabitEthernet1/0/2] port trunk allow-pass vlan 2
[Quidway-GigabitEthernet1/0/2] quit
# Create VLAN 3.
[Quidway] vlan 3
[Quidway-vlan3] quit
# Set the link type of GE 1/0/3 to trunk and add GE 1/0/3 to VLAN 3.
[Quidway] interface gigabitethernet 1/0/3
[Quidway-GigabitEthernet1/0/3] port link-type trunk
[Quidway-GigabitEthernet1/0/3] port trunk allow-pass vlan 3
[Quidway-GigabitEthernet1/0/3] quit
# Set the link type of GE 1/0/4 to trunk and add GE 1/0/4 to VLAN 3.
[Quidway] interface gigabitethernet 1/0/4
[Quidway-GigabitEthernet1/0/4] port link-type trunk
[Quidway-GigabitEthernet1/0/4] port trunk allow-pass vlan 3
[Quidway-GigabitEthernet1/0/4] quit
----End
Configuration Files
The following lists the configuration file of the S9300.
#
sysname Quidway
#
vlan batch 2 to 3
#
interface GigabitEthernet1/0/1
Networking Requirements
As shown in Figure 5-85, VLAN 2 and VLAN 3 compose a super-VLAN, namely, VLAN 4.
The sub-VLANs, namely, VLAN 2 and VLAN 3 cannot ping each other.
After proxy ARP is configured, VLAN 2 and VLAN 3 can ping each other.
S9300
GE1/0/0 GE3/0/0
GE2/0/0 GE4/0/0
VLAN2 VLAN3
VLAN4
VLANIF4:100.1.1.12/24
VLAN2 VLAN3
Configuration Roadmap
The configuration roadmap is as follows:
1. Add interfaces of the S9300 to sub-VLANs.
2. Add the sub-VLANs to a super-VLAN.
3. Configure routes for the super-VLAN.
Data Preparation
To complete the configuration, you need the following data:
l GE 1/0/0 and GE 2/0/0 belong to VLAN 2.
l GE 3/0/0 and GE 4/0/0 belong to VLAN 3.
l The VLAN ID of the super-VLAN is 4.
l The IP address of the super-VLAN is 100.1.1.12.
Procedure
Step 1 Set the interface type.
# Configure GE 1/0/0 as an access interface.
<Quidway> system-view
[Quidway] interface gigabitethernet 1/0/0
[Quidway-GigabitEthernet1/0/0] port link-type access
[Quidway-GigabitEthernet1/0/0] quit
----End
Configuration Files
Configuration file of the S9300
#
sysname Quidway
#
vlan batch 2 to 4
#
vlan 4
aggregate-vlan
access-vlan 2 to 3
#
interface Vlanif4
ip address 100.1.1.12 255.255.255.0
arp-proxy enable
arp-proxy inter-sub-vlan-proxy enable
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 2
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 2
#
interface GigabitEthernet3/0/0
port link-type access
port default vlan 3
#
interface GigabitEthernet4/0/0
port link-type access
Networking Requirements
As shown in Figure 5-86, VLAN 2 is configured on GE 1/0/1 of the S9300 and VLAN 2 is set
as the MUX VLAN; GE 1/0/2 and GE 1/0/3 are added to VLAN 3, which is set as the group
VLAN; GE 1/0/4 and GE 1/0/5 are added to VLAN 4, which is set as the separate VLAN.
Host A can ping Host B and Host C. Host B and Host C can also ping Host A.
Host A can ping Host D and Host E. Host D and Host E can also ping Host A.
Host B and Host C cannot ping Host D or host E. Host D and Host E cannot ping Host B or Host
C.
GE1/0/1
GE1/0/2
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l GE 1/0/1 belongs to VLAN 2.
l GE 1/0/2 and GE 1/0/3 belong to VLAN 3.
l GE 1/0/4 and GE 1/0/5 belong to VLAN 4.
Procedure
Step 1 Configure the MUX VLAN.
# Create VLAN 2, VLAN 3, and VLAN 4.
<Quidway> system-view
[Quidway] vlan batch 2 3 4
[Quidway] quit
----End
Configuration Files
Configuration file of the S9300
#
sysname Quidway
#
vlan batch 2 to 4
#
vlan 2
mux-vlan
subordinate group 3
subordinate separate 4
#
interface gigabitethernet 1/0/1
port link-type access
port default vlan 2
port mux-vlan enable
#
interface gigabitethernet 1/0/2
port link-type access
port default vlan 3
port mux-vlan enable
#
interface gigabitethernet 1/0/3
port link-type access
port default vlan 3
port mux-vlan enable
#
interface gigabitethernet 1/0/4
port link-type access
port default vlan 4
port mux-vlan enable
#
interface gigabitethernet 1/0/5
port link-type access
port default vlan 4
port mux-vlan enable
#
return
Networking Requirements
As shown in Figure 5-87, the hosts in VLAN 10 communicate with the hosts outside VLAN 10
through VLANIF 10.
The VLAN damping feature is configured on VLANIF 10 to prevent route flapping caused by
the change of the VLANIF interface status.
S9300-A S9300-B
GE2/0/0 GE1/0/0
10.100.101.10/24 10.100.101.20/24
VLANIF10
10.100.100.100/24
10.100.100.111/24 10.100.100.110/24
VLAN 10
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Create VLAN 10. The procedure is not given here.
----End
Configuration Files
#
sysname A
#
vlan batch 10
#
interface Vlanif10
ip address 10.100.100.100 255.255.255.0
damping time 20
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet1/0/1
port link-type access
port default vlan 10
#
return
Networking Requirements
As shown in Figure 5-88, users in VLAN 6 need to communicate with user 5 through VLAN
10, that is, the ISP network.
Figure 5-88 Networking diagram for configuring VLAN mapping of single VLAN tag
ISP
VLAN10
S9300-C S9300-D
GE1/0/1 GE1/0/1
S9300-A S9300-B
GE1/0/1 GE2/0/2
VLAN6 VLAN5
GE3/0/1 GE3/0/2 GE3/0/1 GE3/0/2
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs on S9300-A, S9300-B, S9300-C, and S9300-D.
2. Add interfaces of 9300-A, S9300-B, S9300-C, and S9300-D to the corresponding VLANs.
3. Configure VLAN mapping of single tag on GE 1/0/1 of S9300-A.
4. Configure VLAN mapping of single tag on GE 2/0/2 of S9300-B.
Data Preparation
To complete the configuration, you need the following data:
l VLAN to be created on S9300-A: VLAN 6
l VLAN to be created on S9300-B: VLAN 5
l VLAN to be created on S9300-C and S9300-D: VLAN 10
Procedure
Step 1 Create VLANs on the S9300s.
# Create VLAN 6 on S9300-A.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] vlan 6
<Quidway> system-view
[Quidway] sysname S9300-B
[S9300-B] vlan 5
The hosts in VLAN 6 and the hosts in VLAN 5 can ping each other.
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 6
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 6
port vlan-mapping vlan 10 map-vlan 6
#
interface GigabitEthernet3/0/1
port link-type trunk
port trunk allow-pass vlan 6
#
interface GigabitEthernet3/0/2
port link-type trunk
port trunk allow-pass vlan 6
#
return
Networking Requirements
As shown in Figure 5-89, outer VLAN ID 100 and inner VLAN ID 10 are assigned to Enterprise
A; outer VLAN ID 200 and inner VLAN ID 20 are assigned to Enterprise B. Hosts in Enterprise
A and Enterprise B communicate through the ISP network. Outer VLAN ID 300 and inner VLAN
30 assigned to the ISP network.
Figure 5-89 Networking diagram for configuring VLAN mapping of double VLAN tags
ISP
Outer: VLAN 300
Inner: VLAN 30
S9300-C S9300-D
GE1/0/1 GE1/0/2
S9300-A
GE1/0/1 GE1/0/2 S9300-B
Enterprise A
Enterprise B
Outer: VLAN 100
Outer: VLAN 200
Inner: VLAN 10
Inner: VLAN 20
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs on S9300-A, S9300-B, S9300-C, and S9300-D.
2. Add interfaces of 9300-A, S9300-B, S9300-C, and S9300-D to the corresponding VLANs.
3. Configure VLAN mapping of double tags on GE 1/0/1 of S9300-A.
4. Configure VLAN mapping of double tags on GE 1/0/2 of S9300-A.
Data Preparation
To complete the configuration, you need the following data:
l VLAN to be created on S9300-A: VLAN 100
l VLAN to be created on S9300-B: VLAN 200
l VLAN to be created on S9300-C and S9300-D: VLAN 300
Procedure
Step 1 Create VLANs on the S9300s.
# Create VLAN 100 on S9300-A.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] vlan 100
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 100
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 100
port vlan-mapping vlan 300 inner-vlan 30 map-vlan 100 map-inner-vlan 10
#
return
Networking Requirements
As shown in Figure 5-90, outer VLAN ID 100 and inner VLAN ID 10 are assigned Enterprise
A; outer VLAN ID 200 and inner VLAN ID 20 are assigned to Enterprise B. Hosts in Enterprise
A and Enterprise B communicates through the ISP network. Outer VLAN ID 300 and inner
VLAN 30 assigned to the ISP network.
ISP
Outer: VLAN 300
Inner: VLAN 30
S9300-C S9300-D
GE1/0/1 GE1/0/2
S9300-A
GE1/0/1 GE1/0/2 S9300-B
Enterprise A
Enterprise B
Outer: VLAN 100
Inner: VLAN 10 Outer: VLAN 200
Inner: VLAN 20
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs on S9300-A, S9300-B, S9300-C, and S9300-D.
2. Create traffic classifiers, traffic behaviors, and traffic policies on S9300-A and S9300-B.
3. Add interfaces of 9300-A, S9300-B, S9300-C, and S9300-D to the corresponding VLANs.
4. Configure flow-based VLAN mapping of double tags on GE 1/0/1 of S9300-A.
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Create VLANs on the S9300s.
# On S9300-A, configure the traffic classifier, traffic behavior, and traffic policy applied in the
outbound direction.
[S9300-A] traffic classifier name2 operator and
[S9300-A-classifier-name2] if-match vlan-id 100
[S9300-A-classifier-name2] if-match cvlan-id 10
[S9300-A-classifier-name2] quit
[S9300-A] traffic behavior name2
[S9300-A-behavior-name2] remark vlan-id 300
[S9300-A-behavior-name2] remark cvlan-id 30
[S9300-A-behavior-name2] quit
[S9300-A] traffic policy name2
[S9300-A-trafficpolicy-name2] classifier name2 behavior name2
# On S9300-B, configure the traffic classifier, traffic behavior, and traffic policy applied in the
inbound direction.
[S9300-B] traffic classifier name1 operator and
[S9300-B-classifier-name1] if-match vlan-id 300
[S9300-B-classifier-name1] if-match cvlan-id 30
[S9300-B-classifier-name1] quit
[S9300-B] traffic behavior name1
[S9300-B-behavior-name1] remark vlan-id 200
[S9300-B-behavior-name1] remark cvlan-id 20
[S9300-B-behavior-name1] quit
[S9300-B] traffic policy name1
[S9300-B-trafficpolicy-name1] classifier name1 behavior name1
# On S9300-B, configure the traffic classifier, traffic behavior, and traffic policy applied in the
outbound direction.
[S9300-B] traffic classifier name2 operator and
[S9300-B-classifier-name2] if-match vlan-id 200
[S9300-B-classifier-name2] if-match cvlan-id 20
[S9300-B-classifier-name2] quit
[S9300-B] traffic behavior name2
[S9300-B-behavior-name2] remark vlan-id 300
[S9300-B-behavior-name2] remark cvlan-id 30
[S9300-B-behavior-name2] quit
[S9300-B] traffic policy name2
[S9300-B-trafficpolicy-name2] classifier name2 behavior name2
<S9300-B> system-view
[S9300-B] interface GigabitEthernet 1/0/2
[S9300-B-GigabitEthernet1/0/2] traffic-policy name1 inbound
[S9300-B-GigabitEthernet1/0/2] traffic-policy name2 outbound
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 100
#
traffic classifier name1 operator and precedence 5
if-match 1 vlan-id 300
if-match 2 cvlan-id 30
traffic classifier name2 operator and precedence 10
if-match 1 vlan-id 100
if-match 2 cvlan-id 10
#
traffic behavior name1
remark vlan-id 100
remark cvlan-id 10
traffic behavior name2
remark vlan-id 300
remark cvlan-id 30
#
traffic policy name1
classifier name1 behavior name1
traffic policy name2
classifier name2 behavior name2
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 100
traffic-policy name1 inbound
traffic-policy name2 outbound
#
return
Networking Requirements
As shown in Figure 5-91, there are two Enterprises on the network, namely, Enterprise 1 and
Enterprise 2. Enterprise 1 has two office locations; Enterprise 2 has three office locations. The
office locations of the two enterprises access S9300-G or S9300-F of the ISP network. The
network of Enterprise 1 is divided into VLAN 2 to VLAN 1500; the network of Enterprise 2 is
divided into VLAN 500 to VLAN 4094. It is required that the office locations of each enterprise
communicate with each other but the two enterprises be isolated from each other.
Enterprise 2 Enterprise 2
GE1/0/1 GE2/0/1
S9300-G
…… GE3/0/1 ……
GE4/0/1
S9300-F
VLAN1000 VLAN4094 VLAN500 VLAN2500
GE1/0/1 GE3/0/1
GE2/0/1
…… …… ……
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Create VLANs.
<Quidway> system-view
[Quidway] sysname S9300-F
[S9300-F] vlan batch 10 20
# Set GE 1/0/1, GE 2/0/1, and GE 3/0/1 of S9300-F as QinQ interfaces. Set the VLAN ID of the
outer VLAN tag added by GE 1/0/1 and GE 3/0/1/ to VLAN 10; set the VLAN ID of the outer
VLAN tag added by GE 2/0/1 to VLAN 20.
[S9300-F] interface gigabitethernet 1/0/1
[S9300-F-GigabitEthernet1/0/1] port link-type dot1q-tunnel
[S9300-F-GigabitEthernet1/0/1] port default vlan 10
[S9300-F-GigabitEthernet1/0/1] quit
[S9300-F] interface gigabitethernet 2/0/1
[S9300-F-GigabitEthernet2/0/1] port link-type dot1q-tunnel
[S9300-F-GigabitEthernet2/0/1] port default vlan 20
[S9300-F-GigabitEthernet2/0/1] quit
[S9300-F] interface gigabitethernet 3/0/1
[S9300-F-GigabitEthernet3/0/1] port link-type dot1q-tunnel
[S9300-F-GigabitEthernet3/0/1] port default vlan 10
[S9300-F-GigabitEthernet3/0/1] quit
# Set GE 1/0/1 and GE 2/0/1 of S9300-G as QinQ interfaces; set the VLAN ID of the outer
VLAN tags added by GE 1/0/1 and GE 2/0/1/ to VLAN 20.
[S9300-G] interface gigabitethernet 1/0/1
[S9300-G-GigabitEthernet1/0/1] port link-type dot1q-tunnel
[S9300-G-GigabitEthernet1/0/1] port default vlan 20
[S9300-G-GigabitEthernet1/0/1] quit
[S9300-G] interface gigabitethernet 2/0/1
[S9300-G-GigabitEthernet2/0/1] port link-type dot1q-tunnel
[S9300-G-GigabitEthernet2/0/1] port default vlan 20
[S9300-G-GigabitEthernet2/0/1] quit
Ping a remote host on the same VLAN in another office location of Enterprise 1 from a host of
Enterprise 1. If it can ping the remote host, it indicates that hosts in different locations of
Enterprise 1 can communicate with each other.
Ping a remote host on the same VLAN in another office location of Enterprise 2 from a host of
Enterprise 2. If it can ping the remote host, it indicates that hosts in different locations of
Enterprise 2 can communicate with each other.
Ping a host of Enterprise 2 from a host in any office location of Enterprise 1. If it fails to ping
the host of Enterprise 2, it indicates that the two enterprises are isolated from each other.
----End
Configuration Files
The following lists the configuration files of the S9300.
l Configuration file of S9300-F
#
sysname S9300-F
#
vlan batch 10 20
#
interface GigabitEthernet1/0/1
port link-type dot1q-tunnel
port default vlan 10
#
interface GigabitEthernet2/0/1
port link-type dot1q-tunnel
port default vlan 20
#
interface GigabitEthernet3/0/1
port link-type dot1q-tunnel
port default vlan 10
#
interface GigabitEthernet4/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
return
Networking Requirements
As shown in Figure 5-92, User 1 and User 2 belong to different networks. They need to
communicate with each other through the ISP network. Two types of users exist on the network
of User 1, namely, common access users (PC1) and multicast users (TV1). Only one kind of
users exist on the network of User 2, namely, VIP user (PC2), for example, Internet cafe. It is
required that the common access users, the multicast users, and the VIP users be isolated from
each other but each type of users can communicate remotely. Each kind of users correspond to
a QoS level. The VIP users and multicast users must enjoy highest QoS level.
PC1
User 1 User 2
PC2
TV1 GE1/0/1 GE2/0/1
GE1/0/3
User 2
User 1
PC1
PC2
TV1
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLAN 2 and VLAN 3 on S9300-A; create VLAN 2 and VLAN 3 on S9300-B.
2. Set GE 1/0/1 and GE 1/0/2 of S9300-A as hybrid interfaces and enable selective QinQ.
3. Set GE 2/0/1 and GE 2/0/2 of S9300-B as hybrid interfaces and enable selective QinQ.
4. Add GE 1/0/3 of S9300-A and GE 2/0/3 of S9300-B to VLAN 2 and VLAN 3 in tagged
mode.
Data Preparation
To complete the configuration, you need the following data:
l VLAN 10 to VLAN 30 that PC1 belongs to
l VLAN 31 to VLAN 50 that TV1 belongs to
l VLAN 51 to VLAN 60 that PC2 belongs to
l VLAN 2 assigned to User 1 on the public network
l VLAN 3 assigned to User 2 on the public network
Procedure
Step 1 Create VLANs.
# On S9300-A, create VLAN 2 and VLAN 3, that is, the VLAN IDs of the outer VLAN tag to
be added.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] vlan batch 2 3
# On S9300-B, create VLAN 2 and VLAN 3, that is, the VLAN IDs of the outer VLAN tag to
be added.
<Quidway> system-view
[Quidway] sysname S9300-B
[S9300-B] vlan batch 2 3
interface GigabitEthernet1/0/1
port hybrid untagged vlan 2
port vlan-stacking vlan 10 to 50 stack-vlan 2
#
return
<S9300-A> display current-configuration interface gigabitethernet 1/0/2
#
interface GigabitEthernet1/0/2
port hybrid untagged vlan 3
port vlan-stacking vlan 51 to 60 stack-vlan 3
#
return
<S9300-A> display current-configuration interface gigabitethernet 1/0/3
#
interface GigabitEthernet1/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
return
If the configurations on S9300-A and S9300-B are correct, you can obtain the following
information:
l PC1 users on the network of User 1 can communicate with each other.
l TV1 users on the network of User 1 can communicate with each other.
l PC2 users on the network of User 2 can communicate with each other.
l PC1 users and TV1 users are separated from each other.
l The networks of User 1 and User 2 are isolated from each other.
----End
Configuration Files
The following lists the configuration files of the S9300.
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 2 to 3
#
interface GigabitEthernet1/0/1
port hybrid untagged vlan 2
port vlan-stacking vlan 10 to 50 stack-vlan 2
#
interface GigabitEthernet1/0/2
port hybrid untagged vlan 3
port vlan-stacking vlan 51 to 60 stack-vlan 3
#
interface GigabitEthernet1/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
return
Networking Requirements
As shown in Figure 5-93, User 1 and User 2 belong to different networks. They need to
communicate with each other through the ISP network. Two types of users exist on the network
of User 1, namely, common access users (PC1) and multicast users (TV1). Only one kind of
users exist on the network of User 2, namely, VIP user (PC2), for example, Internet cafe. It is
required that the common access users, the multicast users, and the VIP users be isolated from
each other but each type of users can communicate remotely. Each kind of users correspond to
a QoS level. The VIP users and multicast users must enjoy highest QoS level.
PC1
User 1 User 2
PC2
TV1 GE1/0/1 GE2/0/1
GE1/0/3
User 2
User 1
PC1
PC2
TV1
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLAN 2 and VLAN 3 on S9300-A; create VLAN 2 and VLAN 3 on S9300-B.
2. Set GE 1/0/1 and GE 1/0/2 of S9300-A as hybrid interfaces and configure flow-based
selective QinQ on the interfaces.
3. Set GE 2/0/1 and GE 2/0/2 of S9300-B as hybrid interfaces and configure flow-based
selective QinQ on the interfaces.
4. Add GE 1/0/3 of S9300-A and GE 2/0/3 of S9300-B to VLAN 2 and VLAN 3 in tagged
mode.
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Create VLAN 2 and VLAN 3.
# On S9300-A, create VLAN 2 and VLAN 3, that is, the VLAN IDs of the outer VLAN tag to
be added.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] vlan batch 2 3
# On S9300-B, create VLAN 2 and VLAN 3, that is, the VLAN IDs of the outer VLAN tag to
be added.
<Quidway> system-view
[Quidway] sysname S9300-B
[S9300-B] vlan batch 2 3
If the configurations on S9300-A and S9300-B are correct, you can obtain the following
information:
l PC1 users on the network of User 1 can communicate with each other.
l TV1 users on the network of User 1 can communicate with each other.
l PC2 users on the network of User 2 can communicate with each other.
l PC1 users and TV1 users are separated from each other.
l The networks of User 1 and User 2 are isolated from each other.
----End
Configuration Files
The following lists the configuration files of the S9300.
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 2 to 3
#
traffic classifier name1 operator or precedence 5
if-match 1 vlan-id 10 to 30
if-match 2 vlan-id 31 to 50
traffic classifier name2 operator or precedence 10
if-match 1 vlan-id 51 to 60
#
traffic behavior name1
nest top-most vlan-id 2
traffic behavior name2
nest top-most vlan-id 3
#
traffic policy name1
classifier name1 behavior name1
traffic policy name2
classifier name2 behavior name2
#
interface GigabitEthernet1/0/1
port hybrid untagged vlan 2
traffic-policy name1 inbound
#
interface GigabitEthernet1/0/2
port hybrid untagged vlan 3
traffic-policy name2 inbound
#
interface GigabitEthernet1/0/3
Networking Requirements
As shown in Figure 5-94, the MAC address of the user host PC1 is 0002-0002-0002 and the
MAC address of the user host PC2 is 0003-0003-0003. PC1 and PC2 are connected to the
S9300 through the LSW. The LSW is connected to GE 1/0/1 of the S9300. Interface GE 1/0/1
belongs to VLAN 2. The MAC address of the server is 0004-0004-0004. The server is connected
to GE 1/0/2 of the S9300. Interface GE 1/0/2 belongs to VLAN 2.
l To prevent hackers from attacking the network with MAC addresses, you need to add a
static entry to the MAC table of the S9300 for each user host. When sending packets through
GE 1/0/1, the S9300 changes the VLAN ID to VLAN 4 to which the LSW belongs. In
addition, you need to set the aging time of the dynamic entries in the MAC address table
to 500 seconds.
l To prevent hackers from forging the MAC address of the server and stealing user
information, you can configure the packet forwarding based on static MAC address entries
on the S9300.
Figure 5-94 Networking diagram for configuring the MAC address table
MAN Server
LSW VLAN4
PC1 PC2
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Add static MAC address entries.
# Create VLAN 2; add GE 1/0/1 1/0/2 to VLAN 2; configure VLAN mapping on GE 1/0/1.
<Quidway> system-view
[Quidway] vlan 2
[Quidway-vlan2] quit
[Quidway] interface gigabitethernet 1/0/1
[Quidway-GigabitEthernet1/0/1] port hybrid pvid vlan 2
[Quidway-GigabitEthernet1/0/1] port hybrid untagged vlan 2
[Quidway-GigabitEthernet1/0/1] port vlan-mapping vlan 4 map-vlan 2
[Quidway-GigabitEthernet1/0/1] quit
[Quidway] interface gigabitethernet 1/0/2
[Quidway-GigabitEthernet1/0/2] port hybrid pvid vlan 2
[Quidway-GigabitEthernet1/0/2] port hybrid untagged vlan 2
[Quidway-GigabitEthernet1/0/2] quit
-------------------------------------------------------------------------------
Total matching items displayed = 3
# Run the display mac-address aging-time command in any view. You can check whether the
aging time of dynamic entries is set successfully.
[Quidway] display mac-address aging-time
Aging time: 500 seconds
----End
Configuration Files
The following lists the configuration file of the S9300.
#
sysname Quidway
#
vlan batch 2
#
mac-address aging-time 500
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 2
Networking Requirements
As shown in Figure 5-95, user network 1 is connected to GE 1/0/1 on the S9300 through an
LSW. User network 2 is connected to GE 2/0/1 on the S9300 through another LSW. GE 1/0/1
and GE 2/0/1 belong to VLAN 2. To prevent MAC address attacks and control the number of
access users, you need to limit the MAC address learning in VLAN 2.
Figure 5-95 Networking diagram for configuring the limitation on MAC address learning based
on VLAN
MAN
S9300
GE1/0/1 GE2/0/1
User User
network 1 VLAN 2 network 2
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l VLAN to which the interfaces belong: VLAN 2
l User interfaces: GE 1/0/1 and GE 2/0/1
l Maximum number of learned MAC addresses: 100
Procedure
Step 1 Configure the limitation on MAC address learning.
# Add GE 1/0/1 and GE 2/0/1 to VLAN 2.
<Quidway> system-view
[Quidway] vlan 2
[Quidway–vlan2] quit
[Quidway] interface gigabitethernet 1/0/1
[Quidway-GigabitEthernet1/0/1] port hybrid pvid vlan 2
[Quidway-GigabitEthernet1/0/1] port hybrid untagged vlan 2
[Quidway-GigabitEthernet1/0/1] quit
[Quidway] interface gigabitethernet 2/0/1
[Quidway-GigabitEthernet2/0/1] port hybrid pvid vlan 2
[Quidway-GigabitEthernet2/0/1] port hybrid untagged vlan 2
[Quidway-GigabitEthernet2/0/1] quit
# Configure the rule of limiting MAC address learning in VLAN 2: A maximum of 100 MAC
addresses can be learned; packets are still forwarded and an alarm is generated when the number
of learned MAC addresses reaches the limit, but new MAC addresses are not added to the MAC
address table.
[Quidway-vlan2] mac-limit maximum 100 action forward alarm enable
[Quidway-vlan2] quit
----End
Configuration Files
The following lists the configuration file of the S9300.
#
sysname Quidway
#
vlan batch 2
#
vlan 2
mac-limit maximum 100
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 2
port hybrid untagged vlan 2
#
interface GigabitEthernet2/0/1
port hybrid pvid vlan 2
port hybrid untagged vlan 2
#
return
Example for Configuring the Limitation on MAC Address Learning Based on VSI
Networking Requirements
To ensure the security for the users within the VSI, configure the limitation on MAC address
learning in the VSI named huawei.
Figure 5-96 Networking diagram for configuring the limitation on MAC address learning based
on VSI
User User
network 1 network 2
Configuration Roadmap
The configuration roadmap is as follows:
1. Create a VSI.
2. Configure the limitation on MAC address learning based on the VSI.
Data Preparation
To complete the configuration, you need the following data:
l Name of the VSI: huawei
l Maximum number of learned MAC addresses: 300
Procedure
Step 1 Create a VSI.
# Configure the rule of limiting MAC address learning for the VSI: A maximum of 300 MAC
addresses can be learned; extra packets are directly discarded and alarms are generated.
[Quidway-vsi-huawei] mac-limit maximum 300 action discard alarm enable
[Quidway-vsi-huawei] quit
# Run the display mac-limit command in any view. You can check whether the rule of limiting
MAC address learning is successfully configured.
[Quidway] display mac-limit
MAC Limit is enabled
Total MAC Limit rule count : 1
----End
Configuration Files
The following lists the configuration file of the S9300.
#
sysname Quidway
#
vsi huawei static
mac-limit maximum 300
#
return
Networking Requirements
S9300A, S9300B, S9300C, and S9300D run MSTP. In this example, MSTP runs on Layer 2
interfaces of the S9300s.
S9300A S9300B
GE6/0/2 GE6/0/2
GE6/0/1 GE6/0/1
GE2/0/1 GE2/0/1
Configuration Roadmap
The configuration roadmap is as follows:
1. Add S9300A and S9300C to MST region RG1, and create MSTI1.
2. Add S9300B and S9300D to MST region RG2, and create MSTI1.
3. Configure S9300A as the CIST root.
4. In RG1, configure S9300A as the CIST regional root and regional root of MSTI1. Configure
the root protection function on GE 6/0/2 and the GE 6/0/1 on S9300A.
5. In RG2, configure S9300B as the CIST regional root and S9300D as the regional root of
MSTI1.
6. On S9300C and S9300D, connect GE 1/0/1 to a PC and configure GE 1/0/1 as an edge port.
Enable BPDU protection on S9300C and S9300D.
7. Configure the S9300s to calculate the path cost by using the algorithm of Huawei.
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Configure S9300A.
# Set the priority of S9300A in MSTI0 to 0 to ensure that S9300A functions as the CIST root.
[S9300A] stp instance 0 priority 0
# Set the priority of S9300A in MSTI1 to 1 to ensure that S9300A functions as the regional root
of MSTI1.
[S9300A] stp instance 1 priority 0
# Configure S9300A to use Huawei private algorithm to calculate the path cost.
[S9300A] stp pathcost-standard legacy
# Enable MSTP.
[S9300A] stp enable
# Set the priority of S9300B in MSTI0 to 4096 to ensure that S9300B functions as the CIST
root.
[S9300B] stp instance 0 priority 4096
# Configure S9300B to use Huawei private algorithm to calculate the path cost.
[S9300B] stp pathcost-standard legacy
# Enable MSTP.
[S9300B] stp enable
# Configure S9300C to use Huawei private algorithm to calculate the path cost.
[S9300C] stp pathcost-standard legacy
# Enable MSTP.
[S9300C] stp enable
# Set the priority of S9300D in MSTI1 to 0 to ensure that S9300D functions as the regional root
of MSTI1.
[S9300D] stp instance 1 priority 0
# Configure S9300D to use Huawei private algorithm to calculate the path cost.
[S9300D] stp pathcost-standard legacy
# Enable MSTP.
[S9300D] stp enable
The priority of S9300A is the highest in the CIST; therefore, S9300A is elected as the CIST root
and regional root of RG1. GE 6/0/2 and GE 6/0/1 of S9300A are designated ports in the CIST.
The priority of S9300A in MSTI1 is the highest in RG1; therefore, S9300A is elected as the
regional root of S9300A. GE 6/0/2 and GE 6/0/1 of S9300A are designated ports in MSTI1.
# Run the display stp interface brief commands on S9300C. The displayed information is as
follows:
<S9300C> display stp interface GigabitEthernet 2/0/1 brief
MSTID Port Role STP State Protection
0 GigabitEthernet2/0/1 ROOT FORWARDING NONE
1 GigabitEthernet2/0/1 ROOT FORWARDING NONE
<S9300C> display stp interface GigabitEthernet 1/0/2 brief
MSTID Port Role STP State Protection
0 GigabitEthernet1/0/2 DESI FORWARDING NONE
1 GigabitEthernet1/0/2 DESI FORWARDING NONE
GE 2/0/1 of S9300C is the root port in the CIST and MSTI1. GE 1/0/2 of S9300C is a designated
port in the CIST and MSTI1.
# Run the display stp brief command on S9300B. The displayed information is as follows:
<S9300B> display stp brief
MSTID Port Role STP State Protection
0 GigabitEthernet6/0/2 ROOT FORWARDING NONE
0 GigabitEthernet6/0/1 DESI FORWARDING NONE
1 GigabitEthernet6/0/2 MAST FORWARDING NONE
1 GigabitEthernet6/0/1 ROOT FORWARDING NONE
The priority of S9300B in the CIST is lower than that of S9300A; therefore, GE 6/0/2 of S9300B
functions as the root port in the CIST. S9300A and S9300B belong to different regions; therefore,
GE 6/0/2 of S9300B functions as the master port in MSTI1. In MSTI1, the priority of S9300B
is lower than that of S9300D; therefore, GE 6/0/1 of S9300B functions as the root port. The
priority of S9300B in the CIST is higher than that of S9300B; therefore, GE 6/0/1 of S9300B
functions as the designated port in the CIST.
# Run the display stp interface brief commands on S9300D. The displayed information is as
follows:
<S9300D> display stp interface GigabitEthernet 2/0/1 brief
MSTID Port Role STP State Protection
0 GigabitEthernet2/0/1 ROOT FORWARDING NONE
1 GigabitEthernet2/0/1 DESI FORWARDING NONE
<S9300D> display stp interface GigabitEthernet 1/0/2 brief
MSTID Port Role STP State Protection
0 GigabitEthernet1/0/2 ALTE DISCARDING NONE
1 GigabitEthernet1/0/2 ALTE DISCARDING NONE
On S9300D, GE 1/0/2 functions as the alternate port in the CIST. S9300D and S9300C are in
different regions; therefore, GE 1/0/2 of S9300D also functions as the alternate port in MSTI1.
GE 2/0/1 of S9300D is the root port in the CIST. The priority of S9300D is higher than that of
S9300B in MSTI1; therefore, GE 2/0/1 also functions as the designated port in MSTI1.
----End
Configuration Files
l Configuration file of S9300A
#
sysname S9300A
#
vlan batch 2 to 20
#
stp instance 0 priority 0
stp instance 1 priority 0
stp pathcost-standard legacy
stp enable
stp region-configuration
region-name RG1
instance 1 vlan 1 to 10
active region-configuration
#
interface GigabitEthernet6/0/2
port link-type trunk
port trunk allow-pass vlan 1 to 20
stp root-protection
#
interface GigabitEthernet6/0/1
port link-type trunk
port trunk allow-pass vlan 1 to 20
stp root-protection
#
return
stp region-configuration
region-name RG1
instance 1 vlan 1 to 10
active region-configuration
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 20
port hybrid untagged vlan 20
stp edged-port enable
#
interface GigabitEthernet1/0/2
port link-type trunk
port trunk allow-pass vlan 1 to 20
#
interface GigabitEthernet2/0/1
port link-type trunk
port trunk allow-pass vlan 1 to 20
#
return
Networking Requirements
As shown in Figure 5-98, the CE devices communicate with each other through the PE devices.
BPDUs of the CE devices are transmitted through the ISP network. Each port of a PE device is
connected to only one CE device. Therefore, BPDUs sent from a CE device to a PE device do
not contain VLAN tags. In this case, you can configure port-based BPDU tunnels.
In this example, the CE and PE devices play different roles, and the PE devices can transparently
transmit BPDUs from the CE devices.
l The CE devices function as customer bridges. The default destination MAC address of
BPDUs sent from the CE devices is 0180-C200-0000.
l The PE devices function as the provider bridges. The default destination MAC address of
BPDUs sent from the PE devices is 0180-C200-0008.
Figure 5-98 Networking diagram for configuring port-based BPDU tunnels (different roles)
VLAN100 VLAN100
CE1 CE2
GE 1/0/0
GE 1/0/0
PE1 PE2
GE 1/0/0 GE 1/0/2 GE 1/0/0
GE 1/0/1 GE 1/0/2 GE 1/0/1
GE 1/0/0
GE 1/0/0
CE3 CE4
VLAN200 VLAN200
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Enable spanning tree calculation on the CE and PE devices.
# Configure CE1.
[CE1] stp enable
# Configure CE2.
[CE2] stp enable
# Configure CE3.
[CE3] stp enable
# Configure CE4.
[CE4] stp enable
# Configure PE1.
[PE1] stp enable
# Configure PE2.
[PE2] stp enable
# Configure PE2.
[PE2] bpdu-tunnel stp bridge role provider
Step 3 Add GE 1/0/0 to VLAN 100 and add GE 1/0/1 to VLAN 200 on PE1 and PE2.
# Configure PE1.
[PE1] vlan 100
[PE1-vlan100] quit
[PE1] interface GigabitEthernet 1/0/0
[PE1-GigabitEthernet1/0/0] port hybrid pvid vlan 100
[PE1-GigabitEthernet1/0/0] port hybrid untagged vlan 100
[PE1-GigabitEthernet1/0/0] stp disable
[PE1-GigabitEthernet1/0/0] bpdu enable
[PE1-GigabitEthernet1/0/0] quit
[PE1] vlan 200
[PE1-vlan200] quit
[PE1] interface GigabitEthernet 1/0/1
[PE1-GigabitEthernet1/0/1] port hybrid pvid vlan 200
[PE1-GigabitEthernet1/0/1] port hybrid untagged vlan 200
[PE1-GigabitEthernet1/0/1] stp disable
[PE1-GigabitEthernet1/0/1] bpdu enable
[PE1-GigabitEthernet1/0/1] quit
# Configure PE2.
[PE2] vlan 100
[PE2-vlan100] quit
[PE2] interface GigabitEthernet 1/0/0
[PE2-GigabitEthernet1/0/0] port hybrid pvid vlan 100
[PE2-GigabitEthernet1/0/0] port hybrid untagged vlan 100
[PE2-GigabitEthernet1/0/0] stp disable
[PE2-GigabitEthernet1/0/0] bpdu enable
[PE2-GigabitEthernet1/0/0] quit
Step 4 On the PE devices, configure GE 1/0/2 at the PSN side to allow BPDUs from VLAN 100 and
VLAN 200 to pass through.
# Configure PE1.
[PE1] interface gigabitethernet 1/0/2
[PE1-GigabitEthernet1/0/2] port link-type trunk
[PE1-GigabitEthernet1/0/2] port trunk allow-pass vlan 100 200
[PE1-GigabitEthernet1/0/2] bpdu enable
[PE1-GigabitEthernet1/0/2] quit
# Configure PE2.
[PE2] interface gigabitethernet 1/0/2
[PE2-GigabitEthernet1/0/2] port link-type trunk
[PE2-GigabitEthernet1/0/2] port trunk allow-pass vlan 100 200
[PE2-GigabitEthernet1/0/2] bpdu enable
[PE2-GigabitEthernet1/0/2] quit
BPDU-Protection :disabled
TC or TCN received :3
STP Converge Mode :Fast
Time since last TC received :0 days 2h:26m:42s
Run the display stp command on CE3 and CE4 to view the roots in the MST region. You can
find that a spanning tree is calculated between CE3 and CE4. GE 1/0/0 of CE3 is a root port and
GE 1/0/0 of CE4 is a designated port.
<CE3> display stp
-------[CIST Global Info][Mode MSTP]-------
CIST Bridge :32768.000b-0967-58a0
Bridge Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :32768.000b-0952-f13e / 199999
CIST RegRoot/IRPC :32768.000b-0967-58a0 / 0
CIST RootPortId :128.82
BPDU-Protection :disabled
TC or TCN received :0
STP Converge Mode :Fast
Time since last TC received :0 days 10h:54m:37s
----[Port1(GigabitEthernet1/0/0)][FORWARDING]----
Port Protocol :enabled
Port Role :CIST Root Port
Port Priority :128
Port Cost(Dot1T ) :Config=auto / Active=199999
Desg. Bridge/Port :32768.000b-0952-f13e / 128.82
Port Edged :Config=disabled / Active=disabled
Point-to-point :Config=auto / Active=true
Transit Limit :3 packets/hello-time
Protection Type :None
PortTimes :Hello 2s MaxAge 20s FwDly 15s RemHop 0
BPDU Sent :114
TCN: 0, Config: 0, RST: 0, MST: 114
BPDU Received :885
TCN: 0, Config: 0, RST: 0, MST: 885
----[Port1(GigabitEthernet1/0/0)][FORWARDING]----
Port Protocol :enabled
Port Role :CIST Designated Port
Port Priority :128
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
stp enable
#
return
bpdu enable
#
interface GigabitEthernet1/0/2
port link-type trunk
port trunk allow-pass vlan 100 200
bpdu enable
#
return
Networking Requirements
As shown in Figure 5-99, the CE devices communicate with each other through the PE devices.
BPDUs of the CE devices are transmitted through the ISP network. Each port of a PE device is
connected to only one CE device. Therefore, BPDUs sent from a CE device to a PE device do
not contain VLAN tags. In this case, you can configure port-based BPDU tunnels.
In this example, the CE and PE devices are all configured as customer bridges. The default
destination MAC address of BPDUs is 0180-C200-0000. The PE devices cannot transparently
transmit BPDUs from the CE devices. Therefore, you need to enable the BPDU tunnel function.
Figure 5-99 Networking diagram for configuring port-based BPDU tunnels (same role)
VLAN100 VLAN100
CE1 CE2
GE 1/0/0 GE 1/0/0
PE1 PE2
GE 1/0/0 GE 1/0/2 GE 1/0/0
GE 1/0/1 GE 1/0/2 GE 1/0/1
GE 1/0/0
GE 1/0/0
CE3 CE4
VLAN200 VLAN200
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable STP on the CE and PE devices.
2. Add the PE interfaces at the CE side to the specified VLANs.
3. Disable STP on the PE interfaces at the CE side and enable the BPDU tunnel function on
the PE devices.
4. Configure the PE interfaces at the PSN side to allow BPDUs from VLAN 100 and VLAN
200 to pass through.
Data Preparation
To complete the configuration, you need the following data:
l VLAN IDs of the PE interfaces at the CE side
l IDs of VLANs whose BPDUs are allowed to pass through the PE interfaces at the PSN
side
Procedure
Step 1 Enable spanning tree calculation on the CE and PE devices.
# Configure CE1.
[CE1] stp enable
# Configure CE2.
[CE2] stp enable
# Configure CE3.
# Configure CE4.
[CE4] stp enable
# Configure PE1.
[PE1] stp enable
# Configure PE2.
[PE2] stp enable
Step 2 Configure the PE devices to change the destination MAC address of the BPDUs sent by the CE
devices.
# Configure PE1.
[PE1] bpdu-tunnel stp group-mac 0100-5e00-0011
# Configure PE2.
[PE2] bpdu-tunnel stp group-mac 0100-5e00-0011
Step 3 Add GE 1/0/0 to VLAN 100 and add GE 1/0/1 to VLAN 200 on PE1 and PE2. Enable the BPDU
tunnel function on PE1 and PE2.
# Configure PE1.
[PE1] vlan 100
[PE1-vlan100] quit
[PE1] interface GigabitEthernet 1/0/0
[PE1-GigabitEthernet1/0/0] port hybrid pvid vlan 100
[PE1-GigabitEthernet1/0/0] port hybrid untagged vlan 100
[PE1-GigabitEthernet1/0/0] quit
[PE1] vlan 200
[PE1-vlan200] quit
[PE1] interface GigabitEthernet 1/0/1
[PE1-GigabitEthernet1/0/1] port hybrid pvid vlan 200
[PE1-GigabitEthernet1/0/1] port hybrid untagged vlan 200
[PE1-GigabitEthernet1/0/1] quit
[PE1] interface gigabitethernet 1/0/0
[PE1-GigabitEthernet1/0/0] stp disable
[PE1-GigabitEthernet1/0/0] bpdu-tunnel stp enable
[PE1-GigabitEthernet1/0/0] quit
[PE1] interface gigabitethernet 1/0/1
[PE1-GigabitEthernet1/0/1] stp disable
[PE1-GigabitEthernet1/0/1] bpdu-tunnel stp enable
[PE1-GigabitEthernet1/0/1] quit
# Configure PE2.
[PE2] vlan 100
[PE2-vlan100] quit
[PE2] interface GigabitEthernet 1/0/0
[PE2-GigabitEthernet1/0/0] port hybrid pvid vlan 100
[PE2-GigabitEthernet1/0/0] port hybrid untagged vlan 100
[PE2-GigabitEthernet1/0/0] quit
[PE2] vlan 200
[PE2-vlan200] quit
[PE2] interface GigabitEthernet 1/0/1
[PE2-GigabitEthernet1/0/1] port hybrid pvid vlan 200
[PE2-GigabitEthernet1/0/1] port hybrid untagged vlan 200
[PE2-GigabitEthernet1/0/1] quit
[PE2] interface gigabitethernet 1/0/0
[PE2-GigabitEthernet1/0/0] stp disable
[PE2-GigabitEthernet1/0/0] bpdu-tunnel stp enable
[PE2-GigabitEthernet1/0/0] quit
Step 4 On the PE devices, configure GE 1/0/2 at the PSN side to allow BPDUs from VLAN 100 and
VLAN 200 to pass through.
# Configure PE1.
[PE1] interface gigabitethernet 1/0/2
[PE1-GigabitEthernet1/0/2] port link-type trunk
[PE1-GigabitEthernet1/0/2] port trunk allow-pass vlan 100 200
[PE1-GigabitEthernet1/0/2] quit
# Configure PE2.
[PE2] interface gigabitethernet 1/0/2
[PE2-GigabitEthernet1/0/2] port link-type trunk
[PE2-GigabitEthernet1/0/2] port trunk allow-pass vlan 100 200
[PE2-GigabitEthernet1/0/2] quit
Run the display stp command on CE3 and CE4 to view the roots in the MST region. You can
find that a spanning tree is calculated between CE3 and CE4. GE 1/0/0 of CE3 is a root port,
and CE 1/0/0 of CE4 is a designated port.
<CE3> display stp
-------[CIST Global Info][Mode MSTP]-------
CIST Bridge :32768.000b-0967-58a0
Bridge Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :32768.000b-0952-f13e / 199999
CIST RegRoot/IRPC :32768.000b-0967-58a0 / 0
CIST RootPortId :128.82
BPDU-Protection :disabled
TC or TCN received :0
STP Converge Mode :Fast
Time since last TC received :0 days 10h:54m:37s
----[Port1(GigabitEthernet1/0/0)][FORWARDING]----
Port Protocol :enabled
Port Role :CIST Root Port
Port Priority :128
Port Cost(Dot1T ) :Config=auto / Active=199999
Desg. Bridge/Port :32768.000b-0952-f13e / 128.82
Port Edged :Config=disabled / Active=disabled
Point-to-point :Config=auto / Active=true
Transit Limit :3 packets/hello-time
Protection Type :None
PortTimes :Hello 2s MaxAge 20s FwDly 15s RemHop 0
BPDU Sent :114
TCN: 0, Config: 0, RST: 0, MST: 114
BPDU Received :885
TCN: 0, Config: 0, RST: 0, MST: 885
----[Port1(GigabitEthernet1/0/0)][FORWARDING]----
Port Protocol :enabled
Port Role :CIST Designated Port
Port Priority :128
Port Cost(Dot1T ) :Config=auto / Active=199999
Desg. Bridge/Port :32768.000b-0952-f13e / 128.82
Port Edged :Config=disabled / Active=disabled
Point-to-point :Config=auto / Active=true
Transit Limit :3 packets/hello-time
Protection Type :None
PortTimes :Hello 2s MaxAge 20s FwDly 15s RemHop 0
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
stp enable
#
return
#
return
l Configuration file of PE2
#
sysname PE2
#
vlan batch 100 200
#
bpdu-tunnel stp group-mac 0100-5e00-0011
#
stp enable
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 100
port hybrid untagged vlan 100
bpdu-tunnel stp enable
stp disable
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 200
port hybrid untagged vlan 200
bpdu-tunnel stp enable
stp disable
#
interface GigabitEthernet1/0/2
port link-type trunk
port trunk allow-pass vlan 100 200
#
return
Networking Requirements
As shown in Figure 5-100, the CE devices communicate with each other through the PE devices.
BPDUs of the CE devices are transmitted through the ISP network. Each port of a PE is a
convergence port. Therefore, the PE devices need to distinguish BPDUs sent from different user
networks according to the VLAN tags of the BPDUs. In this case, you can configure VLAN-
based BPDU tunnels to ensure that:
l All the devices in VLAN 100 participate in calculation of a spanning tree.
l All the devices in VLAN 200 participate in calculation of a spanning tree.
In this example, the CE and PE devices are all configured as customer bridges. The default
destination MAC address of BPDUs is 0180-C200-0000. The PE devices cannot transparently
transmit BPDUs from the CE devices. Therefore, you need to enable the BPDU tunnel function.
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable STP on the CE and PE devices.
2. Configure BPDUs sent from a CE device to a PE device to contain the specified VLAN
tag.
3. Disable STP on the PE interfaces at the CE side and enable the PE devices to transparently
transmit BPDUs.
4. Configure the PE interfaces at the PSN side to allow BPDUs from VLAN 100 and VLAN
200 to pass through.
5. Configure the Layer 2 forwarding function on the P device to ensure that BPDUs of the PE
devices can be transmitted on the ISP network.
Data Preparation
To complete the configuration, you need the following data:
l VLAN tags in the BPDUs that the CE devices sent to the PE devices
l IDs of the VLANs that the PE interfaces at the CE side belong to
Procedure
Step 1 Enable spanning tree calculation on the CE and PE devices.
# Configure CE1.
[CE1] stp enable
# Configure CE2.
[CE2] stp enable
# Configure CE3.
[CE3] stp enable
# Configure CE4.
[CE4] stp enable
# Configure PE1.
[PE1] stp enable
# Configure PE2.
[PE2] stp enable
Step 2 Configure the BPDUs sent from CE1 and CE2 to contain VLAN tag 100. Configure the BPDUs
sent from CE3 and CE4 to contain VLAN tag 200.
# Configure CE1.
[CE1] vlan 100
[CE1-vlan100] quit
[CE1] interface gigabitethernet 1/0/0
[CE1-GigabitEthernet1/0/0] port link-type trunk
# Configure CE2.
[CE2] vlan 100
[CE2-vlan100] quit
[CE2] interface gigabitethernet 1/0/0
[CE2-GigabitEthernet1/0/0] port link-type trunk
[CE2-GigabitEthernet1/0/0] port trunk allow-pass vlan 100
[CE2-GigabitEthernet1/0/0] stp bpdu vlan 100
# Configure CE3.
[CE3] vlan 200
[CE3-vlan200] quit
[CE3] interface gigabitethernet 1/0/0
[CE3-GigabitEthernet1/0/0] port link-type trunk
[CE3-GigabitEthernet1/0/0] port trunk allow-pass vlan 200
[CE3-GigabitEthernet1/0/0] stp bpdu vlan 200
# Configure CE4.
[CE4] vlan 200
[CE4-vlan200] quit
[CE4] interface gigabitethernet 1/0/0
[CE4-GigabitEthernet1/0/0] port link-type trunk
[CE4-GigabitEthernet1/0/0] port trunk allow-pass vlan 200
[CE4-GigabitEthernet1/0/0] stp bpdu vlan 200
Step 3 Configure the PE devices to change the destination MAC address of the BPDUs sent by the CE
devices.
# Configure PE1.
[PE1] bpdu-tunnel stp group-mac 0100-5e00-0011
# Configure PE2.
[PE2] bpdu-tunnel stp group-mac 0100-5e00-0011
Step 4 Enable the PE interfaces to transparently transmit BPDUs of the CE devices to the PE devices.
# Configure PE1.
[PE1] vlan 100
[PE1-vlan100] quit
[PE1] vlan 200
[PE1-vlan200] quit
[PE1] interface gigabitethernet 1/0/0
[PE1-GigabitEthernet1/0/0] port link-type trunk
[PE1-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 200
[PE1-GigabitEthernet1/0/0] quit
[PE1] interface gigabitethernet 1/0/1
[PE1-GigabitEthernet1/0/1] port link-type trunk
[PE1-GigabitEthernet1/0/1] port trunk allow-pass vlan 100
[PE1-GigabitEthernet1/0/1] stp disable
[PE1-GigabitEthernet1/0/1] bpdu-tunnel stp vlan 100
[PE1-GigabitEthernet1/0/1] quit
[PE1] interface gigabitethernet 1/0/2
[PE1-GigabitEthernet1/0/2] port link-type trunk
[PE1-GigabitEthernet1/0/2] port trunk allow-pass vlan 200
[PE1-GigabitEthernet1/0/2] stp disable
[PE1-GigabitEthernet1/0/2] bpdu-tunnel stp vlan 200
[PE1-GigabitEthernet1/0/2] quit
# Configure PE2.
[PE2] vlan 100
[PE2-vlan100] quit
Step 5 Configure the basic Layer 2 forwarding function and allow packets with VLAN tags 100 and
200 to pass through.
[P] vlan 100
[P-vlan100] quit
[P] vlan 200
[P-vlan200] quit
[P] interface gigabitethernet 1/0/0
[P-GigabitEthernet1/0/0] port link-type trunk
[P-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 200
[P-GigabitEthernet1/0/0] quit
[P] interface gigabitethernet 1/0/1
[P-GigabitEthernet1/0/1] port link-type trunk
[P-GigabitEthernet1/0/1] port trunk allow-pass vlan 100 200
[P-GigabitEthernet1/0/1] quit
Run the display stp command on CE1 and CE2 to view the roots in the MST region. You can
find that a spanning tree is calculated between CE1 and CE2. GE 1/0/0 of CE1 is a root port,
and CE 1/0/0 of CE2 is a designated port.
<CE1> display stp
-------[CIST Global Info][Mode MSTP]-------
CIST Bridge :32768.000b-09f0-1b91
Bridge Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :32768.000b-09d4-b66c / 199999
CIST RegRoot/IRPC :32768.000b-09f0-1b91 / 0
CIST RootPortId :128.82
BPDU-Protection :disabled
TC or TCN received :2
STP Converge Mode :Fast
Time since last TC received :0 days 3h:53m:43s
----[Port17(GigabitEthernet1/0/0)][FORWARDING]----
Port Protocol :enabled
Port Role :CIST Root Port
Port Priority :128
Port Cost(Dot1T ) :Config=auto / Active=199999
Desg. Bridge/Port :32768.000b-09d4-b66c / 128.82
Port Edged :Config=disabled / Active=disabled
Point-to-point :Config=auto / Active=true
Transit Limit :3 packets/hello-time
Protection Type :None
PortTimes :Hello 2s MaxAge 20s FwDly 15s RemHop 0
BPDU Sent :237
TCN: 0, Config: 0, RST: 0, MST: 237
BPDU Received :9607
TCN: 0, Config: 0, RST: 0, MST: 9607
<CE2> display stp
----[Port17(GigabitEthernet1/0/0)][FORWARDING]----
Port Protocol :enabled
Port Role :CIST Designated Port
Port Priority :128
Port Cost(Dot1T ) :Config=auto / Active=199999
Desg. Bridge/Port :32768.000b-09d4-b66c / 128.82
Port Edged :Config=disabled / Active=disabled
Point-to-point :Config=auto / Active=true
Transit Limit :3 packets/hello-time
Protection Type :None
PortTimes :Hello 2s MaxAge 20s FwDly 15s RemHop 0
BPDU Sent :7095
TCN: 0, Config: 0, RST: 0, MST: 7095
BPDU Received :2
TCN: 0, Config: 0, RST: 0, MST: 2
Run the display stp command on CE3 and CE4 to view the roots in the MST region. You can
find that a spanning tree is calculated between CE3 and CE4. GE 1/0/0 of CE3 is a root port,
and CE 1/0/0 of CE4 is a designated port.
<CE3> display stp
-------[CIST Global Info][Mode MSTP]-------
CIST Bridge :32768.00e0-fc9f-3257
Bridge Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :32768.00e0-fc9a-4315 / 199999
CIST RegRoot/IRPC :32768.00e0-fc9f-3257 / 0
CIST RootPortId :128.82
BPDU-Protection :disabled
TC or TCN received :4
STP Converge Mode :Fast
Time since last TC received :0 days 3h:57m:0s
----[Port17(GigabitEthernet1/0/0)][FORWARDING]----
Port Protocol :enabled
Port Role :CIST Root Port
Port Priority :128
Port Cost(Dot1T ) :Config=auto / Active=199999
Desg. Bridge/Port :32768.00e0-fc9a-4315 / 128.82
Port Edged :Config=disabled / Active=disabled
Point-to-point :Config=auto / Active=true
Transit Limit :3 packets/hello-time
Protection Type :None
PortTimes :Hello 2s MaxAge 20s FwDly 15s RemHop 0
BPDU Sent :238
TCN: 0, Config: 0, RST: 0, MST: 238
BPDU Received :9745
TCN: 0, Config: 0, RST: 0, MST: 9745
----[Port17(GigabitEthernet1/0/0)][FORWARDING]----
Port Protocol :enabled
Port Role :CIST Designated Port
Port Priority :128
Port Cost(Dot1T ) :Config=auto / Active=199999
Desg. Bridge/Port :32768.00e0-fc9a-4315 / 128.82
Port Edged :Config=disabled / Active=disabled
Point-to-point :Config=auto / Active=true
Transit Limit :3 packets/hello-time
Protection Type :None
PortTimes :Hello 2s MaxAge 20s FwDly 15s RemHop 0
BPDU Sent :7171
TCN: 0, Config: 0, RST: 0, MST: 7171
BPDU Received :2
TCN: 0, Config: 0, RST: 0, MST: 2
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 100
#
stp enable
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 100
stp bpdu vlan 100
#
return
#
sysname CE4
#
vlan batch 200
#
stp enable
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 200
stp bpdu vlan 200
#
Return
l Configuration file of PE1
#
sysname PE1
#
vlan batch 100 200
#
bpdu-tunnel stp group-mac 0100-5e00-0011
#
stp enable
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 100 200
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 100
bpdu-tunnel stp vlan 100
stp disable
#
interface GigabitEthernet1/0/2
port link-type trunk
port trunk allow-pass vlan 200
bpdu-tunnel stp vlan 200
stp disable
#
return
l Configuration file of P
#
sysname P
#
vlan batch 100 200
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 100 200
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 100 200
#
return
l Configuration file of PE2
#
sysname PE2
#
vlan batch 100 200
#
bpdu-tunnel stp group-mac 0100-5e00-0011
#
stp enable
#
interface GigabitEthernet1/0/0
port link-type trunk
Networking Requirements
As shown in Figure 5-101, the CE devices communicate with each other through the PE devices.
BPDUs sent from CE1 and CE2 to the PE devices contain VLAN tag 100. BPDUs sent from
CE3 and CE4 to the PE devices contain VLAN tag 200. You need to configure BPUD tunnels
on the PE devices to ensure that:
To save VLAN IDs on the public network, you need to configure the VLAN stacking function
on the PE devices. That is, configure the PE devices to add outer tag 10 to the BPDUs with
VLAN tags 100 and 200. Then the BPDUs transmitted on the ISP network contain two tags.
l The CE devices function as customer bridges. The default destination MAC address of
BPDUs sent from the CE devices is 0180-C200-0000.
l The PE devices function as the provider bridges. The default destination MAC address of
BPDUs sent from the PE devices is 0180-C200-0008.
VLAN100 VLAN100
GE1/0/0
GE1/0/0
GE1/0/1 GE1/0/1
CE1 CE2
GE1/0/0
PE1 PE2
GE1/0/0
CE3 GE1/0/2 GE1/0/2 CE4
GE1/0/0
GE1/0/0
VLAN200
VLAN200
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable STP on the CE and PE devices.
2. Configure BPDUs sent from a CE device to a PE device to contain the specified VLAN
tag.
3. Disable STP on the PE interfaces at the CE side and enable the PE devices to transparently
transmit BPDUs.
4. Enable the QinQ (VLAN stacking) function on Layer 2 interfaces of the PE devices.
Configure the PE devices to add outer tag 10 to the BPDUs with VLAN tags 100 and 200.
Data Preparation
To complete the configuration, you need the following data:
l Inner VLAN tags in the BPDUs that the CE devices send to the PE devices
l Outer VLAN tag that the PE devices add to the received BPDUs
l IDs of the VLANs that the PE interfaces at the CE side belong to
Procedure
Step 1 Enable spanning tree calculation on the CE and PE devices.
# Configure CE1.
[CE1] stp enable
# Configure CE2.
[CE2] stp enable
# Configure CE3.
[CE3] stp enable
# Configure CE4.
[CE4] stp enable
# Configure PE1.
[PE1] stp enable
# Configure PE2.
[PE2] stp enable
Step 2 Configure the BPDUs sent from CE1 and CE2 to contain VLAN tag 100. Configure the BPDUs
sent from CE3 and CE4 to contain VLAN tag 200.
# Configure CE1.
[CE1] vlan 100
[CE1-vlan100] quit
[CE1] interface gigabitethernet 1/0/0
[CE1-GigabitEthernet1/0/0] port link-type trunk
[CE1-GigabitEthernet1/0/0] port trunk allow-pass vlan 100
# Configure CE2.
[CE2] vlan 100
[CE2-vlan100] quit
[CE2] interface gigabitethernet 1/0/0
[CE2-GigabitEthernet1/0/0] port link-type trunk
[CE2-GigabitEthernet1/0/0] port trunk allow-pass vlan 100
[CE2-GigabitEthernet1/0/0] stp bpdu vlan 100
[CE2-GigabitEthernet1/0/0] quit
# Configure CE3.
[CE3] vlan 200
[CE3-vlan200] quit
[CE3] interface gigabitethernet 1/0/0
[CE3-GigabitEthernet1/0/0] port link-type trunk
[CE3-GigabitEthernet1/0/0] port trunk allow-pass vlan 200
[CE3-GigabitEthernet1/0/0] stp bpdu vlan 200
[CE3-GigabitEthernet1/0/0] quit
# Configure CE4.
[CE4] vlan 200
[CE4-vlan200] quit
[CE4] interface gigabitethernet 1/0/0
[CE4-GigabitEthernet1/0/0] port link-type trunk
[CE4-GigabitEthernet1/0/0] port trunk allow-pass vlan 200
[CE4-GigabitEthernet1/0/0] stp bpdu vlan 200
[CE4-GigabitEthernet1/0/0] quit
# Configure PE2.
[PE2] bpdu-tunnel stp bridge role provider
Step 4 Configure the QinQ function on the PE devices. Configure the PE devices to add outer VLAN
tag 10 to the BPDUs with VLAN tags 100 and 200.
# Configure PE1.
[PE1] vlan 10
[PE1-Vlan10] quit
[PE1] interface gigabitethernet 1/0/0
[PE1-GigabitEthernet1/0/0] port link-type trunk
[PE1-GigabitEthernet1/0/0] port trunk allow-pass vlan 10
[PE1-GigabitEthernet1/0/0] bpdu enable
[PE1-GigabitEthernet1/0/0] quit
[PE1] interface gigabitethernet 1/0/1
[PE1-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[PE1-GigabitEthernet1/0/1] port vlan-stacking vlan 100 stack-vlan 10
[PE1-GigabitEthernet1/0/1] stp disable
[PE1-GigabitEthernet1/0/1] bpdu enable
[PE1-GigabitEthernet1/0/1] quit
[PE1] interface gigabitethernet 1/0/2
[PE1-GigabitEthernet1/0/2] port hybrid untagged vlan 10
[PE1-GigabitEthernet1/0/2] port vlan-stacking vlan 200 stack-vlan 10
[PE1-GigabitEthernet1/0/2] stp disable
[PE1-GigabitEthernet1/0/2] bpdu enable
[PE1-GigabitEthernet1/0/2] quit
# Configure PE2.
[PE2] vlan 10
[PE2-Vlan10] quit
[PE2] interface gigabitethernet 1/0/0
[PE2-GigabitEthernet1/0/0] port link-type trunk
[PE2-GigabitEthernet1/0/0] port trunk allow-pass vlan 10
[PE2-GigabitEthernet1/0/0] bpdu enable
[PE2-GigabitEthernet1/0/0] quit
[PE2] interface gigabitethernet 1/0/1
[PE2-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[PE2-GigabitEthernet1/0/1] port vlan-stacking vlan 100 stack-vlan 10
[PE2-GigabitEthernet1/0/1] stp disable
[PE2-GigabitEthernet1/0/1] bpdu enable
[PE2-GigabitEthernet1/0/1] quit
[PE2] interface gigabitethernet 1/0/2
[PE2-GigabitEthernet1/0/2] port hybrid untagged vlan 10
[PE2-GigabitEthernet1/0/2] port vlan-stacking vlan 200 stack-vlan 10
[PE2-GigabitEthernet1/0/2] stp disable
[PE2-GigabitEthernet1/0/2] bpdu enable
[PE2-GigabitEthernet1/0/2] quit
Run the display stp command on CE1 and CE2 to view the roots in the MST region. You can
find that a spanning tree is calculated between CE1 and CE2. GE 1/0/0 of CE1 is a root port,
and CE 1/0/0 of CE2 is a designated port.
<CE1> display stp
-------[CIST Global Info][Mode MSTP]-------
CIST Bridge :32768.000b-09f0-1b91
Bridge Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :32768.000b-09d4-b66c / 199999
CIST RegRoot/IRPC :32768.000b-09f0-1b91 / 0
CIST RootPortId :128.82
BPDU-Protection :disabled
TC or TCN received :2
STP Converge Mode :Fast
Time since last TC received :0 days 3h:53m:43s
----[Port17(GigabitEthernet1/0/0)][FORWARDING]----
Port Protocol :enabled
Port Role :CIST Root Port
Port Priority :128
Port Cost(Dot1T ) :Config=auto / Active=199999
Desg. Bridge/Port :32768.000b-09d4-b66c / 128.82
Port Edged :Config=disabled / Active=disabled
Point-to-point :Config=auto / Active=true
Transit Limit :3 packets/hello-time
Protection Type :None
PortTimes :Hello 2s MaxAge 20s FwDly 15s RemHop 0
BPDU Sent :237
TCN: 0, Config: 0, RST: 0, MST: 237
BPDU Received :9607
TCN: 0, Config: 0, RST: 0, MST: 9607
----[Port17(GigabitEthernet1/0/0)][FORWARDING]----
Port Protocol :enabled
Port Role :CIST Designated Port
Run the display stp command on CE3 and CE4 to view the roots in the MST region. You can
find that a spanning tree is calculated between CE3 and CE4. GE 1/0/0 of CE3 is a root port,
and CE 1/0/0 of CE2 is a designated port.
<CE3> display stp
-------[CIST Global Info][Mode MSTP]-------
CIST Bridge :32768.00e0-fc9f-3257
Bridge Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :32768.00e0-fc9a-4315 / 199999
CIST RegRoot/IRPC :32768.00e0-fc9f-3257 / 0
CIST RootPortId :128.82
BPDU-Protection :disabled
TC or TCN received :4
STP Converge Mode :Fast
Time since last TC received :0 days 3h:57m:0s
----[Port17(GigabitEthernet1/0/0)][FORWARDING]----
Port Protocol :enabled
Port Role :CIST Root Port
Port Priority :128
Port Cost(Dot1T ) :Config=auto / Active=199999
Desg. Bridge/Port :32768.00e0-fc9a-4315 / 128.82
Port Edged :Config=disabled / Active=disabled
Point-to-point :Config=auto / Active=true
Transit Limit :3 packets/hello-time
Protection Type :None
PortTimes :Hello 2s MaxAge 20s FwDly 15s RemHop 0
BPDU Sent :238
TCN: 0, Config: 0, RST: 0, MST: 238
BPDU Received :9745
TCN: 0, Config: 0, RST: 0, MST: 9745
----[Port17(GigabitEthernet1/0/0)][FORWARDING]----
Port Protocol :enabled
Port Role :CIST Designated Port
Port Priority :128
Port Cost(Dot1T ) :Config=auto / Active=199999
Desg. Bridge/Port :32768.00e0-fc9a-4315 / 128.82
Port Edged :Config=disabled / Active=disabled
Point-to-point :Config=auto / Active=true
Transit Limit :3 packets/hello-time
Protection Type :None
PortTimes :Hello 2s MaxAge 20s FwDly 15s RemHop 0
BPDU Sent :7171
Run the display vlan command on the PE devices to view information about QinQ.
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 100
#
stp enable
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 100
stp bpdu vlan 100
#
return
#
return
#
return
Networking Requirements
When packets sent from a port are sent back to the port, it indicates that a loop exists on the port.
Loops may cause broadcast storm. The LDT function is used to detect loops on the interfaces
of a device.
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable LDT globally.
2. Enable LDT in a VLAN.
3. Enable LDT control on an interface.
4. Set the LDT interval on the interface.
5. Set the recovery time of a blocked interface.
Data Preparation
To complete the configuration, you need the following data:
l ID of the VLAN where LDT is enabled
l Number of the interface where LDT control is enabled
Procedure
Step 1 Enable LDT globally.
<Quidway> system-view
[Quidway] loop-detection enable
----End
Configuration Files
Configuration file of the S9300
#
sysname Quidway
#
vlan batch 200
#
loop-detection enable
loop-detection interval-time 50
loop-detection enable vlan 200
#
interface GigabitEthernet9/0/1
port hybrid pvid vlan 200
port hybrid untagged vlan 200
stp disable
loop-detection mode port-shutdown
loop-detection recovery-time 20
#
return
Networking Requirements
As shown in Figure 5-102, UPE A, UPE B, UPE C, and PE-AGG form a multi-instance RRPP
ring.
Two rings are involved in the networking, ring 1 in domain 1 and ring 1 in domain 2.
VLANs 100 to 300 are configured on CE. Domain 1 and domain 2 share the traffic of packets
from VLANs 100 to 300. Packets from VLANs 100 to 200 are transmitted through domain 1,
and packets from VLANs 201 to 300 are transmitted through domain 2.
Table 5-1 shows the mapping between protected VLANs and instances in domain 1 and domain
2.
Table 5-2 shows the master node of each ring, and the primary port and secondary port on the
master node.
Table 5-2 Master nodes, and primary and secondary ports on the master nodes
Figure 5-102 Networking diagram of single RRPP ring with multiple instances
UPE B
GE/1/0/0 GE2/0/0
CE 1
VLAN 100-300
PE-AGG
GE2/0/0 GE/1/0/0
Ring 1 Master 1 Backbone
UPE A network
Master 2
GE/1/0/0 GE2/0/0
CE 2
VLAN 100-300
Domain 1 ring 1
GE2/0/0 GE/1/0/0
Domain 2 ring 1
UPEC
Configuration Roadmap
The configuration roadmap is as follows:
1. Map instance 1 to VLANs 100 to 200. Map instance 2 to VLANs 201 to 300.
2. Add UPE A, UPE B, UPE C, and PE-AGG to ring 1 in domain 1.
3. Add UPE A, UPE B, UPE C, and PE-AGG to ring 1 in domain 2.
4. Configure protected VLANs in domain 1 and domain 2.
5. Configure control VLANs in domain 1 and domain 2.
6. Configure PE-AGG as the master node on ring 1 in domain 1 and configure UPE A, UPE
B, and UPE C as transit nodes.
7. Configure PE-AGG as the master node on ring 1 in domain 2 and configure UPE A, UPE
B, and UPE C as transit nodes.
Data Preparation
To complete the configuration, you need the following data:
l Instance IDs
l Range of the protected VLANs
l IDs of the control VLANs
l Numbers of the RRPP interfaces
Procedure
Step 1 Create instances.
l Configure UPE A.
# Create instance 1 and map it to control VLANs VLAN 5 VLAN 6 and data VLANs 100 to
200 in domain 1.
[UPEA] stp region-configuration
[UPEA-mst-region] instance 1 vlan 5 6 100 to 200
# Create instance 2 and map it to control VLANs VLAN 10 and VLAN 11 and data VLANs 201
to 300 in domain 2.
[UPEA-mst-region] instance 2 vlan 10 11 201 to 300
l # Configure UPE B.
# Create instance 1 and map it to control VLANs VLAN 5 and VLAN 6 and data VLANs 100
to 200 in domain 1.
[UPEB] stp region-configuration
[UPEB-mst-region] instance 1 vlan 5 6 100 to 200
# Create instance 2 and map it to control VLANs VLAN 10 and VLAN 11 and data VLANs 201
to 300 in domain 2.
[UPEB-mst-region] instance 2 vlan 10 11 201 to 300
l Configure UPE C.
# Create instance 1 and map it to control VLANs VLAN 5 and VLAN 6 and data VLANs 100
to 200 in domain 1.
[UPEC] stp region-configuration
[UPEC-mst-region] instance 1 vlan 5 6 100 to 200
# Create instance 2 and map it to control VLANs VLAN 10 and VLAN 11 and data VLANs 201
to 300 in domain 2.
[UPEC-mst-region] instance 2 vlan 10 11 201 to 300
l Configure PE-AGG.
# Create instance 1 and map it to control VLANs VLAN 5 and VLAN 6 and data VLANs 100
to 200 in domain 1.
[PE-AGG] stp region-configuration
[PE-AGG-mst-region] instance 1 vlan 5 6 100 to 200
# Create instance 2 and map it to control VLANs VLAN 10 and VLAN 11 and data VLANs 201
to 300 in domain 2.
[PE-AGG-mst-region] instance 2 vlan 10 11 201 to 300
Run the display stp region-configuration command on the devices to view the mapping
between instances and VLANs. The displayed information on UPE A is as follows:
<UPEA> display stp region-configuration
Oper configuration
Format selector :0
Region name :00e0cd568d00
Revision level :0
# Disable STP on the interfaces that need to be added to the RRPP ring on UPE A. Configure
the RRPP interfaces to allow packets of VLANs 100 to 300 to pass through.
<UPEA> system-view
[UPEA] interface GigabitEthernet 1/0/0
[UPEA-GigabitEthernet1/0/0] port link-type trunk
[UPEA-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 to 300
[UPEA-GigabitEthernet1/0/0] stp disable
[UPEA-GigabitEthernet1/0/0] quit
[UPEA] interface GigabitEthernet 2/0/0
[UPEA-GigabitEthernet2/0/0] port link-type trunk
[UPEA-GigabitEthernet2/0/0] port trunk allow-pass vlan 100 to 300
[UPEA-GigabitEthernet2/0/0] stp disable
[UPEA-GigabitEthernet2/0/0] quit
l # Configure UPE B.
# Disable STP on the interfaces that need to be added to the RRPP ring on UPE B. Configure
the RRPP interfaces to allow packets of VLANs 100 to 300 to pass through.
<UPEB> system-view
[UPEB] interface GigabitEthernet 1/0/0
[UPEB-GigabitEthernet1/0/0] port link-type trunk
[UPEB-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 to 300
[UPEB-GigabitEthernet1/0/0] stp disable
[UPEB-GigabitEthernet1/0/0] quit
[UPEB] interface GigabitEthernet 2/0/0
[UPEB-GigabitEthernet2/0/0] port link-type trunk
[UPEB-GigabitEthernet2/0/0] port trunk allow-pass vlan 100 to 300
[UPEB-GigabitEthernet2/0/0] stp disable
[UPEB-GigabitEthernet2/0/0] quit
l Configure UPE C.
# Disable STP on the interfaces that need to be added to the RRPP ring on UPE C. Configure
the RRPP interfaces to allow packets of VLANs 100 to 300 to pass through.
<UPEC> system-view
[UPEC] interface GigabitEthernet 1/0/0
[UPEC-GigabitEthernet1/0/0] port link-type trunk
[UPEC-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 to 300
[UPEC-GigabitEthernet1/0/0] stp disable
[UPEC-GigabitEthernet1/0/0] quit
[UPEC] interface GigabitEthernet 2/0/0
[UPEC-GigabitEthernet2/0/0] port link-type trunk
[UPEC-GigabitEthernet2/0/0] port trunk allow-pass vlan 100 to 300
[UPEC-GigabitEthernet2/0/0] stp disable
[UPEC-GigabitEthernet2/0/0] quit
l Configure PE-AGG.
# Disable STP of the interfaces that need to be added to the RRPP ring on PE-AGG. Configure
the RRPP interfaces to allow packets of VLANs 100 to 300 to pass through.
<PE-AGG> system-view
[PE-AGG] interface GigabitEthernet 1/0/0
[PE-AGG-GigabitEthernet1/0/0] port link-type trunk
[PE-AGG-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 to 300
[PE-AGG-GigabitEthernet1/0/0] stp disable
[PE-AGG-GigabitEthernet1/0/0] quit
[PE-AGG] interface GigabitEthernet 2/0/0
[PE-AGG-GigabitEthernet2/0/0] port link-type trunk
[PE-AGG-GigabitEthernet2/0/0] port trunk allow-pass vlan 100 to 300
[PE-AGG-GigabitEthernet2/0/0] stp disable
[PE-AGG-GigabitEthernet2/0/0] quit
Step 3 Create RRPP domains and configure the protected VLANs and control VLANs.
l Configure UPE A.
# Configure the VLANs mapping instance 1 as the protected VLANs in domain 1. Configure
VLAN 5 as the control VLAN.
<UPEA> system-view
[UPEA] rrpp domain 1
[UPEA-rrpp-domain-region1] protected-vlan reference-instance 1
[UPEA-rrpp-domain-region1] control-vlan 5
[UPEA-rrpp-domain-region1] quit
# Configure the VLANs mapping instance 2 as the protected VLANs in domain 2. Configure
VLAN 10 as the control VLAN.
<UPEA> system-view
[UPEA] rrpp domain 2
[UPEA-rrpp-domain-region2] protected-vlan reference-instance 2
[UPEA-rrpp-domain-region2] control-vlan 10
[UPEA-rrpp-domain-region2] quit
l # Configure UPE B.
# Configure the VLANs mapping instance 1 as the protected VLANs in domain 1. Configure
VLAN 5 as the control VLAN.
<UPEB> system-view
[UPEB] rrpp domain 1
[UPEB-rrpp-domain-region1] protected-vlan reference-instance 1
[UPEB-rrpp-domain-region1] control-vlan 5
[UPEB-rrpp-domain-region1] quit
# Configure the VLANs mapping instance 2 as the protected VLANs in domain 2. Configure
VLAN 10 as the control VLAN.
<UPEB> system-view
[UPEB] rrpp domain 2
[UPEB-rrpp-domain-region2] protected-vlan reference-instance 2
[UPEB-rrpp-domain-region2] control-vlan 10
[UPEB-rrpp-domain-region2] quit
l Configure UPE C.
# Configure the VLANs mapping instance 1 as the protected VLANs in domain 1. Configure
VLAN 5 as the control VLAN.
<UPEC> system-view
[UPEC] rrpp domain 1
[UPEC-rrpp-domain-region1] protected-vlan reference-instance 1
[UPEC-rrpp-domain-region1] control-vlan 5
[UPEC-rrpp-domain-region1] quit
# Configure the VLANs mapping instance 2 as the protected VLANs in domain 2. Configure
VLAN 10 as the control VLAN.
<UPEC> system-view
[UPEC] rrpp domain 2
[UPEC-rrpp-domain-region2] protected-vlan reference-instance 2
[UPEC-rrpp-domain-region2] control-vlan 10
[UPEC-rrpp-domain-region2] quit
l Configure PE-AGG.
# Configure the VLANs mapping instance 1 as the protected VLANs in domain 1. Configure
VLAN 5 as the control VLAN.
<PE-AGG> system-view
[PE-AGG] rrpp domain 1
# Configure the VLANs mapping instance 2 as the protected VLANs in domain 2. Configure
VLAN 10 as the control VLAN.
<PE-AGG> system-view
[PE-AGG] rrpp domain 2
[PE-AGG-rrpp-domain-region2] protected-vlan reference-instance 2
[PE-AGG-rrpp-domain-region2] control-vlan 10
[PE-AGG-rrpp-domain-region2] quit
# Configure UPE A as a transit node of ring 1 in domain 1 and specify primary and secondary
ports on UPE A.
<UPEA> system-view
[UPEA] rrpp domain 1
[UPEA-rrpp-domain-region1] ring 1 node-mode transit primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPEA-rrpp-domain-region1] ring 1 enable
[UPEA-rrpp-domain-region1] quit
# Configure UPE A as a transit node of ring 1 in domain 2 and specify primary and secondary
ports on UPE A.
<UPEA> system-view
[UPEA] rrpp domain 2
[UPEA-rrpp-domain-region2] ring 1 node-mode transit primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPEA-rrpp-domain-region2] ring 1 enable
[UPEA-rrpp-domain-region2] quit
l # Configure UPE B.
# Configure UPE B as a transit node of ring 1 in domain 1 and specify primary and secondary
ports on UPE B.
<UPEB> system-view
[UPEB] rrpp domain 1
[UPEB-rrpp-domain-region1] ring 1 node-mode transit primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPEB-rrpp-domain-region1] ring 1 enable
[UPEB-rrpp-domain-region1] quit
# Configure UPE B as a transit node of ring 1 in domain 2 and specify primary and secondary
ports on UPE B.
<UPEB> system-view
[UPEB] rrpp domain 2
[UPEB-rrpp-domain-region2] ring 1 node-mode transit primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPEB-rrpp-domain-region2] ring 1 enable
[UPEB-rrpp-domain-region2] quit
l Configure UPE C.
# Configure UPE C as a transit node of ring 1 in domain 1 and specify primary and secondary
ports on UPE C.
<UPEC> system-view
[UPEC] rrpp domain 1
[UPEC-rrpp-domain-region1] ring 1 node-mode transit primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
# Configure UPE C as a transit node of ring 1 in domain 2 and specify primary and secondary
ports on UPE C.
<UPEC> system-view
[UPEC] rrpp domain 2
[UPEC-rrpp-domain-region2] ring 1 node-mode transit primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPEC-rrpp-domain-region2] ring 1 enable
[UPEC-rrpp-domain-region2] quit
l Configure PE-AGG.
# Configure PE-AGG as the master node of ring 1 in domain 1. Configure GE 1/0/0 as the
primary port and GE 2/0/0 as the secondary port.
<PE-AGG> system-view
[PE-AGG] rrpp domain 1
[PE-AGG-rrpp-domain-region1] ring 1 node-mode master primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[PE-AGG-rrpp-domain-region1] ring 1 enable
[PE-AGG-rrpp-domain-region1] quit
# Configure PE-AGG as the master node of ring 1 in domain 2. Configure GE 2/0/0 as the
primary port and GE 1/0/0 as the secondary port.
<PE-AGG> system-view
[PE-AGG] rrpp domain 2
[PE-AGG-rrpp-domain-region2] ring 1 node-mode master primary-port GigabitEthernet
2/0/0 secondary-port GigabitEthernet 1/0/0 level 0
[PE-AGG-rrpp-domain-region2] ring 1 enable
[PE-AGG-rrpp-domain-region2] quit
After configuring an RRPP ring, you need to enable RRPP on each node on the ring to activate
the RRPP ring. The configuration procedure is as follows:
l Configure UPE A.
l # Configure UPE B.
l Configure UPE C.
l Configure PE-AGG.
Domain Index : 1
Control VLAN : major 5 sub 6
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 3 sec(default is 3 sec)
Ring Ring Node Primary Secondary/Edge Is
ID Level Mode Port Port Enabled
----------------------------------------------------------------------------
1 0 T GigabitEthernet1/0/0 GigabitEthernet2/0/0 Yes
Domain Index : 2
Control VLAN : major 10 sub 11
Protected VLAN : Reference Instance 2
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 3 sec(default is 3 sec)
Ring Ring Node Primary Secondary/Edge Is
ID Level Mode Port Port Enabled
----------------------------------------------------------------------------
1 0 T GigabitEthernet1/0/0 GigabitEthernet2/0/0 Yes
Domain Index : 1
Control VLAN : major 5 sub 6
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 3 sec(default is 3 sec)
Ring Ring Node Primary/Common Secondary/Edge Is
ID Level Mode Port Port
Enabled
---------------------------------------------------------------------------
1 0 M GigabitEthernet1/0/0 GigabitEthernet2/0/0 Yes
Domain Index : 2
The preceding information shows that the RRPP protocol is enabled on PE-AGG.
In domain 1, VLAN 5 is the control VLAN; VLANs mapping instance 1 are the protected
VLANs; PE-AGG is the master node on ring 1. The primary port is GE 1/0/0, and the secondary
port is GE 2/0/0.
In domain 2, VLAN 10 is the control VLAN; VLANs mapping instance 2 are the protected
VLANs; PE-AGG is the master node on ring 1. The primary port is GE 2/0/0, and the secondary
port is GE 1/0/0.
l Run the display rrpp verbose domain command on UPE A. You can obtain the following
results:
# View detailed information about UPE A in domain 1.
<UPEA> display rrpp verbose domain 1
Domain Index : 1
Control VLAN : major 5 sub 6
Protected VLAN: Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 3 sec(default is 3 sec)
RRPP Ring : 1
Ring Level : 0
Node Mode : Transit
Ring State : LinkUp
Is Enabled : Enable Is Active : Yes
Primary port : GigabitEthernet1/0/0 Port status: UP
Secondary port: GigabitEthernet2/0/0 Port status: UP
The preceding information shows that VLAN 5 is the control VLAN in domain 1 and VLANs
mapping instance 1 are the protected VLANs. UPE A is a transit node in domain 1 and is in
LinkUp state.
# View detailed information about UPE A in domain 2.
<UPEA> display rrpp verbose domain 2
Domain Index : 2
Control VLAN : major 10 sub 11
Protected VLAN: Reference Instance 2
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 3 sec(default is 3 sec)
RRPP Ring : 1
Ring Level : 0
Node Mode : Transit
Ring State : LinkUp
Is Enabled : Enable Is Active : Yes
Primary port : GigabitEthernet1/0/0 Port status: UP
Secondary port: GigabitEthernet2/0/0 Port status: UP
The preceding information shows that VLAN 10 is the control VLAN in domain 2, and VLANs
mapping instance 2 are the protected VLANs. UPE A is a transit node in domain 2 and is in
LinkUp state.
l Run the display rrpp verbose domain command on PE-AGG. You can obtain the following
results:
# View detailed information about PE-AGG in domain 1.
RRPP Ring : 1
Ring Level : 0
Node Mode : Master
Ring State : Complete
Is Enabled : Enable Is Active : Yes
Primary port : GigabitEthernet1/0/0 Port status: UP
Secondary port: GigabitEthernet2/0/0 Port status: BLOCKED
The preceding information shows that VLAN 5 is the control VLAN in domain 1 and VLANs
mapping instance 1 are the protected VLANs.
PE-AGG is the master node in domain 1 and is in Complete state.
The primary port is GE 1/0/0, and the secondary port is GE 2/0/0.
# View detailed information about PE-AGG in domain 2.
<PE-AGG> display rrpp verbose domain 2
Domain Index : 2
Control VLAN : major 10 sub 11
Protected VLAN: Reference Instance 2
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 3 sec(default is 3 sec)
RRPP Ring : 1
Ring Level : 0
Node Mode : Master
Ring State : Complete
Is Enabled : Enable Is Active : Yes
Primary port : GigabitEthernet2/0/0 Port status: UP
Secondary port: GigabitEthernet1/0/0 Port status: BLOCKED
The preceding information shows that VLAN 10 is the control VLAN in domain 2, and VLANs
mapping instance 2 are the protected VLANs.
PE-AGG is the master node in domain 2 and is in Complete state.
The primary port is GE 2/0/0, and the secondary port is GE 1/0/0.
----End
Configuration Files
l Configuration file of UPE A
#
sysname UPEA
#
vlan batch 5 to 6 10 to 11 100 to 300
#
rrpp enable
#
stp region-configuration
instance 1 vlan 5 6 100 to 200
instance 2 vlan 10 11 201 to 300
active region-configuration
#
rrpp domain 1
control-vlan 5
protected-vlan reference-instance 1
ring 1 node-mode transit primary-port GigabitEthernet 1/0/0 secondary-port
GigabitEthernet 2/0/0 level 0
ring 1 enable
rrpp domain 2
control-vlan 10
protected-vlan reference-instance 2
ring 1 node-mode transit primary-port GigabitEthernet 1/0/0 secondary-port
GigabitEthernet 2/0/0 level 0
ring 1 enable
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 5 to 6 10 to 11 100 to 300
stp disable
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 5 to 6 10 to 11 100 to 300
stp disable
#
return
#
rrpp domain 1
control-vlan 5
protected-vlan reference-instance 1
ring 1 node-mode transit primary-port GigabitEthernet 1/0/0 secondary-port
GigabitEthernet 2/0/0 level 0
ring 1 enable
rrpp domain 2
control-vlan 10
protected-vlan reference-instance 2
ring 1 node-mode transit primary-port GigabitEthernet 1/0/0 secondary-port
GigabitEthernet 2/0/0 level 0
ring 1 enable
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 5 to 6 10 to 11 100 to 300
stp disable
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 5 to 6 10 to 11 100 to 300
stp disable
#
Return
Example for Configuring Crossed RRPP Rings with Multiple Instances (GB
version)
Networking Requirements
As shown in Figure 5-103, UPE A, UPE B, UPE C, UPE D, and PE-AGG form two multi-
instance major rings: ring 1 in domain 1 and ring 1 in domain 2.
CE1, UPE B, and UPE C form two subrings: ring 2 in domain 1 and ring 2 in domain 2. CE1 is
connected to the major rings through GE 3/0/0 of UPE B and GE 3/0/0 of UPE C. UPE B and
UPE C are edge transit nodes.
CE2, UPE B, and UPE C form two subrings: ring 3 in domain 1 and ring 3 in domain 2. CE2 is
connected to the major rings through GE 3/0/1 of UPE B and GE 3/0/1 of UPE C. UPE B and
UPE C are edge transit nodes.
VLANs 100 to 300 are configured on the CE devices. Domain 1 and domain 2 share the traffic
of packets from VLANs 100 to 300. Packets from VLANs 100 to 200 are transmitted through
domain 1, and packets from VLANs 201 to 300 are transmitted through domain 2.
Table 5-3 shows the mapping between protected VLANs and instances in domain 1 and domain
2.
Table 5-4 shows the master node of each ring, and the primary port and secondary port on each
master node.
Table 5-4 Master nodes, and primary and secondary ports on the master nodes
Table 5-5 shows the edge transit nodes and edge nodes on the subrings.
Table 5-5 Edge transit nodes and edge nodes on the subrings
Ring ID Edge-Transit Edge Port Edge-Transit Edge Port
Node Node
To prevent topology flapping, you need to set the Link-Up timer on the master nodes.
Figure 5-103 Networking diagram of crossed RRPP rings with multiple instances
Backbone
network
GE/1/0/0 GE2/0/0
PE-AGG
Master 1
GE2/0/0 Master 2 GE/1/0/0
UPE A UPED
Domain 1 ring 1
GE/1/0/0
GE2/0/00
Domain 2 ring 1
Edge Edge
GE2/0/0 Transit Transit GE/1/0/0
UPE B GE2/0/0 UPEC
GE/1/0/0
GE3/0/0 GE3/0/1
GE3/0/1 GE3/0/0
Master 1 Master 1
Master 2 Master 2
GE2/0/0 Domain 1 ring 2 Domain 1 ring 3 GE/1/0/0
CE 1 CE 2
VLAN 100-300 VLAN 100-300
Domain 1
Domain 2
Configuration Roadmap
The configuration roadmap is as follows:
1. Map instance 1 to VLANs 100 to 200. Map instance 2 to VLANs 201 to 300.
2. Add UPE A, UPE B, UPE C, UPE D, and PE-AGG to ring 1 in domain 1 and ring 1 in
domain 2.
3. Add UPE A, UPE B, UPE C, UPE D, and PE-AGG to ring 2 in domain 1 and ring 2 in
domain 2.
4. Add UPE A, UPE B, UPE C, UPE D, and PE-AGG to ring 3 in domain 1 and ring 3 in
domain 2.
5. Configure protected VLANs in domain 1 and domain 2.
Data Preparation
To complete the configuration, you need the following data:
l Instance IDs
l Range of the protected VLANs
l IDs of the control VLANs
l Numbers of the RRPP interfaces
l Link-Up timer
Procedure
Step 1 Create instances.
l Configure CE1.
# Create instance 1 and map it to control VLANs VLAN 5 and VLAN 6 and data VLANs 100
to 200 in domain 1.
<CE1> system-view
[CE1] stp region-configuration
[CE1-mst-region] instance 1 vlan 5 6 100 to 200
# Create instance 2 and map it control VLANs VLAN 10 and VLAN 11 and data VLANs 201
to 300 in domain 2.
[CE1-mst-region] instance 2 vlan 10 11 201 to 300
l Configure CE2.
# Create instance 1 and map it to control VLANs VLAN 5 and VLAN 6 and data VLANs 100
to 200 in domain 1.
<CE2> system-view
[CE2] stp region-configuration
[CE2-mst-region] instance 1 vlan 5 6 100 to 200
# Create instance 2 and map it to control VLANs VLAN 10 and VLAN 11 and data VLANs 201
to 300 in domain 2.
[CE2-mst-region] instance 2 vlan 10 11 201 to 300
l Configure UPE A.
# Create instance 1 and map it to control VLANs VLAN 5 and VLAN 6 and data VLANs 100
to 200 in domain 1.
<UPEA> system-view
[UPEA] stp region-configuration
[UPEA-mst-region] instance 1 vlan 5 6 100 to 200
# Create instance 2 and map it to control VLANs VLAN 10 and VLAN 11 and data VLANs 201
to 300 in domain 2.
[UPEA-mst-region] instance 2 vlan 10 11 201 to 300
l # Configure UPE B.
# Create instance 1 and map it to control VLANs VLAN 5 and VLAN 6 and data VLANs 100
to 200 in domain 1.
<UPEB> system-view
[UPEB] stp region-configuration
[UPEB-mst-region] instance 1 vlan 5 6 100 to 200
# Create instance 2 and map it to control VLANs VLAN 10 and VLAN 11 and data VLANs 201
to 300 in domain 2.
[UPEB-mst-region] instance 2 vlan 10 11 201 to 300
l Configure UPE C.
# Create instance 1 and map it to control VLANs VLAN 5 and VLAN 6 and data VLANs 100
to 200 in domain 1.
<UPEC> system-view
[UPEC] stp region-configuration
[UPEC-mst-region] instance 1 vlan 5 6 100 to 200
# Create instance 2 and map it to control VLANs VLAN 10 and VLAN 11 and data VLANs 201
to 300 in domain 2.
l Configure UPE D.
# Create instance 1 and map it to control VLANs VLAN 5 and VLAN 6 and data VLANs 100
to 200 in domain 1.
<UPED> system-view
[UPED] stp region-configuration
[UPED-mst-region] instance 1 vlan 5 6 100 to 200
# Create instance 2 and map it to control VLANs VLAN 10 and VLAN 11 and data VLANs 201
to 300 in domain 2.
[UPED-mst-region] instance 2 vlan 10 11 201 to 300
l Configure PE-AGG.
# Create instance 1 and map it to control VLANs VLAN 5 and VLAN 6 and data VLANs 100
to 200 in domain 1.
<PE-AGG> system-view
[PE-AGG] stp region-configuration
[PE-AGG-mst-region] instance 1 vlan 5 6 100 to 200
# Create instance 2 and map it to control VLANs VLAN 10 and VLAN 11 and data VLANs 201
to 300 in domain 2.
[PE-AGG-mst-region] instance 2 vlan 10 11 201 to 300
Run the display stp region-configuration command on the devices to view the mapping
between instances and VLANs. The displayed information on UPE A is as follows:
<UPEA> display stp region-configuration
Oper configuration
Format selector :0
Region name :00e0cd568d00
Revision level :0
# Disable STP on the interfaces that need to be added to the RRPP ring on CE1. Configure the
RRPP interfaces to allow packets of VLANs 100 to 300 to pass through.
<CE1> system-view
[CE1] interface GigabitEthernet 1/0/0
[CE1-GigabitEthernet1/0/0] port link-type trunk
[CE1-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 to 300
[CE1-GigabitEthernet1/0/0] stp disable
[CE1-GigabitEthernet1/0/0] quit
[CE1] interface GigabitEthernet 2/0/0
[CE1-GigabitEthernet2/0/0] port link-type trunk
[CE1-GigabitEthernet2/0/0] port trunk allow-pass vlan 100 to 300
[CE1-GigabitEthernet2/0/0] stp disable
[CE1-GigabitEthernet2/0/0] quit
l Configure CE2.
# Disable STP on the interfaces that need to be added to the RRPP ring on CE2. Configure the
RRPP interfaces to allow packets of VLANs 100 to 300 to pass through.
<CE2> system-view
[CE2] interface GigabitEthernet 1/0/0
[CE2-GigabitEthernet1/0/0] port link-type trunk
[CE2-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 to 300
[CE2-GigabitEthernet1/0/0] stp disable
[CE2-GigabitEthernet1/0/0] quit
[CE2] interface GigabitEthernet 2/0/0
[CE2-GigabitEthernet2/0/0] port link-type trunk
[CE2-GigabitEthernet2/0/0] port trunk allow-pass vlan 100 to 300
[CE2-GigabitEthernet2/0/0] stp disable
[CE2-GigabitEthernet2/0/0] quit
l Configure UPE A.
# Disable STP on the interfaces that need to be added to the RRPP ring on UPE A. Configure
the RRPP interfaces to allow packets of VLANs 100 to 300 to pass through.
<UPEA> system-view
[UPEA] interface GigabitEthernet 1/0/0
[UPEA-GigabitEthernet1/0/0] port link-type trunk
[UPEA-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 to 300
[UPEA-GigabitEthernet1/0/0] stp disable
[UPEA-GigabitEthernet1/0/0] quit
[UPEA] interface GigabitEthernet 2/0/0
[UPEA-GigabitEthernet2/0/0] port link-type trunk
[UPEA-GigabitEthernet2/0/0] port trunk allow-pass vlan 100 to 300
[UPEA-GigabitEthernet2/0/0] stp disable
[UPEA-GigabitEthernet2/0/0] quit
l # Configure UPE B.
# Disable STP on the interfaces that need to be added to the RRPP ring on UPE B. Configure
the RRPP interfaces to allow packets of VLANs 100 to 300 to pass through.
<UPEB> system-view
[UPEB] interface GigabitEthernet 1/0/0
[UPEB-GigabitEthernet1/0/0] port link-type trunk
[UPEB-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 to 300
[UPEB-GigabitEthernet1/0/0] stp disable
[UPEB-GigabitEthernet1/0/0] quit
[UPEB] interface GigabitEthernet 2/0/0
[UPEB-GigabitEthernet2/0/0] port link-type trunk
[UPEB-GigabitEthernet2/0/0] port trunk allow-pass vlan 100 to 300
[UPEB-GigabitEthernet2/0/0] stp disable
[UPEB-GigabitEthernet2/0/0] quit
[UPEB] interface GigabitEthernet 3/0/0
[UPEB-GigabitEthernet3/0/0] port link-type trunk
[UPEB-GigabitEthernet3/0/0] port trunk allow-pass vlan 100 to 300
[UPEB-GigabitEthernet3/0/0] stp disable
[UPEB-GigabitEthernet3/0/0] quit
[UPEB] interface GigabitEthernet 3/0/1
[UPEB-GigabitEthernet3/0/1] port link-type trunk
[UPEB-GigabitEthernet3/0/1] port trunk allow-pass vlan 100 to 300
[UPEB-GigabitEthernet3/0/1] stp disable
[UPEB-GigabitEthernet3/0/1] quit
l Configure UPE C.
# Disable STP on the interfaces that need to be added to the RRPP ring on UPE C. Configure
the RRPP interfaces to allow packets of VLANs 100 to 300 to pass through.
<UPEC> system-view
[UPEC] interface GigabitEthernet 1/0/0
[UPEC-GigabitEthernet1/0/0] port link-type trunk
[UPEC-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 to 300
[UPEC-GigabitEthernet1/0/0] stp disable
[UPEC-GigabitEthernet1/0/0] quit
[UPEC] interface GigabitEthernet 2/0/0
[UPEC-GigabitEthernet2/0/0] port link-type trunk
[UPEC-GigabitEthernet2/0/0] port trunk allow-pass vlan 100 to 300
[UPEC-GigabitEthernet2/0/0] stp disable
[UPEC-GigabitEthernet2/0/0] quit
[UPEC] interface GigabitEthernet 3/0/0
[UPEC-GigabitEthernet3/0/0] port link-type trunk
[UPEC-GigabitEthernet3/0/0] port trunk allow-pass vlan 100 to 300
[UPEC-GigabitEthernet3/0/0] stp disable
[UPEC-GigabitEthernet3/0/0] quit
[UPEC] interface GigabitEthernet 3/0/1
[UPEC-GigabitEthernet3/0/1] port link-type trunk
[UPEC-GigabitEthernet3/0/1] port trunk allow-pass vlan 100 to 300
[UPEC-GigabitEthernet3/0/1] stp disable
[UPEC-GigabitEthernet3/0/1] quit
l Configure UPE D.
# Disable STP on the interfaces that need to be added to the RRPP ring on UPE D. Configure
the RRPP interfaces to allow packets of VLANs 100 to 300 to pass through.
<UPED> system-view
[UPED] interface GigabitEthernet 1/0/0
[UPED-GigabitEthernet1/0/0] port link-type trunk
[UPED-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 to 300
[UPED-GigabitEthernet1/0/0] stp disable
[UPED-GigabitEthernet1/0/0] quit
[UPED] interface GigabitEthernet 2/0/0
[UPED-GigabitEthernet2/0/0] port link-type trunk
[UPED-GigabitEthernet2/0/0] port trunk allow-pass vlan 100 to 300
[UPED-GigabitEthernet2/0/0] stp disable
[UPED-GigabitEthernet2/0/0] quit
l Configure PE-AGG.
# Disable STP of the interfaces that need to be added to the RRPP ring on PE-AGG. Configure
the RRPP interfaces to allow packets of VLANs 100 to 300 to pass through.
<PE-AGG> system-view
[PE-AGG] interface GigabitEthernet 1/0/0
[PE-AGG-GigabitEthernet1/0/0] port link-type trunk
[PE-AGG-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 to 300
[PE-AGG-GigabitEthernet1/0/0] stp disable
[PE-AGG-GigabitEthernet1/0/0] quit
[PE-AGG] interface GigabitEthernet 2/0/0
[PE-AGG-GigabitEthernet2/0/0] port link-type trunk
[PE-AGG-GigabitEthernet2/0/0] port trunk allow-pass vlan 100 to 300
[PE-AGG-GigabitEthernet2/0/0] stp disable
[PE-AGG-GigabitEthernet2/0/0] quit
Step 3 Create RRPP domains and configure the protected VLANs and control VLANs.
l Configure CE1.
# Configure the VLANs mapping instance 1 as the protected VLANs in domain 1. Configure
VLAN 5 as the control VLAN.
<CE1> system-view
[CE1] rrpp working-mode gb
[CE1] rrpp domain 1
[CE1-rrpp-domain-region1] protected-vlan reference-instance 1
[CE1-rrpp-domain-region1] control-vlan 5
[CE1-rrpp-domain-region1] quit
# Configure the VLANs mapping instance 2 as the protected VLANs in domain 2. Configure
VLAN 10 as the control VLAN.
<CE1> system-view
[CE1] rrpp domain 2
[CE1-rrpp-domain-region2] protected-vlan reference-instance 2
[CE1-rrpp-domain-region2] control-vlan 10
[CE1-rrpp-domain-region2] quit
l Configure CE2.
# Configure the VLANs mapping instance 1 as the protected VLANs in domain 1. Configure
VLAN 5 as the control VLAN.
<CE2> system-view
[CE2] rrpp working-mode gb
[CE2] rrpp domain 1
[CE2-rrpp-domain-region1] protected-vlan reference-instance 1
[CE2-rrpp-domain-region1] control-vlan 5
[CE2-rrpp-domain-region1] quit
# Configure the VLANs mapping instance 2 as the protected VLANs in domain 2. Configure
VLAN 10 as the control VLAN.
<CE2> system-view
[CE2] rrpp domain 2
[CE2-rrpp-domain-region2] protected-vlan reference-instance 2
[CE2-rrpp-domain-region2] control-vlan 10
[CE2-rrpp-domain-region2] quit
l Configure UPE A.
# Configure the VLANs mapping instance 1 as the protected VLANs in domain 1. Configure
VLAN 5 as the control VLAN.
<UPEA> system-view
[UPEA] rrpp working-mode gb
[UPEA] rrpp domain 1
[UPEA-rrpp-domain-region1] protected-vlan reference-instance 1
[UPEA-rrpp-domain-region1] control-vlan 5
[UPEA-rrpp-domain-region1] quit
# Configure the VLANs mapping instance 2 as the protected VLANs in domain 2. Configure
VLAN 10 as the control VLAN.
<UPEA> system-view
[UPEA] rrpp domain 2
[UPEA-rrpp-domain-region2] protected-vlan reference-instance 2
[UPEA-rrpp-domain-region2] control-vlan 10
[UPEA-rrpp-domain-region2] quit
l # Configure UPE B.
# Configure the VLANs mapping instance 1 as the protected VLANs in domain 1. Configure
VLAN 5 as the control VLAN.
<UPEB> system-view
[UPEB] rrpp working-mode gb
[UPEB] rrpp domain 1
[UPEB-rrpp-domain-region1] protected-vlan reference-instance 1
[UPEB-rrpp-domain-region1] control-vlan 5
[UPEB-rrpp-domain-region1] quit
# Configure the VLANs mapping instance 2 as the protected VLANs in domain 2. Configure
VLAN 10 as the control VLAN.
<UPEB> system-view
[UPEB] rrpp domain 2
[UPEB-rrpp-domain-region2] protected-vlan reference-instance 2
[UPEB-rrpp-domain-region2] control-vlan 10
[UPEB-rrpp-domain-region2] quit
l Configure UPE C.
# Configure the VLANs mapping instance 1 as the protected VLANs in domain 1. Configure
VLAN 5 as the control VLAN.
<UPEC> system-view
[UPEC] rrpp working-mode gb
[UPEC] rrpp domain 1
[UPEC-rrpp-domain-region1] protected-vlan reference-instance 1
[UPEC-rrpp-domain-region1] control-vlan 5
[UPEC-rrpp-domain-region1] quit
# Configure the VLANs mapping instance 2 as the protected VLANs in domain 2. Configure
VLAN 10 as the control VLAN.
<UPEC> system-view
[UPEC] rrpp domain 2
[UPEC-rrpp-domain-region2] protected-vlan reference-instance 2
[UPEC-rrpp-domain-region2] control-vlan 10
[UPEC-rrpp-domain-region2] quit
l Configure UPE D.
# Configure the VLANs mapping instance 1 as the protected VLANs in domain 1. Configure
VLAN 5 as the control VLAN.
<UPED> system-view
[UPED] rrpp working-mode gb
[UPED] rrpp domain 1
[UPED-rrpp-domain-region1] protected-vlan reference-instance 1
[UPED-rrpp-domain-region1] control-vlan 5
[UPED-rrpp-domain-region1] quit
# Configure the VLANs mapping instance 2 as the protected VLANs in domain 2. Configure
VLAN 10 as the control VLAN.
<UPED> system-view
[UPED] rrpp domain 2
[UPED-rrpp-domain-region2] protected-vlan reference-instance 2
[UPED-rrpp-domain-region2] control-vlan 10
[UPED-rrpp-domain-region2] quit
l Configure PE-AGG.
# Configure the VLANs mapping instance 1 as the protected VLANs in domain 1. Configure
VLAN 5 as the control VLAN.
<PE-AGG> system-view
[PE-AGG] rrpp working-mode gb
[PE-AGG] rrpp domain 1
[PE-AGG-rrpp-domain-region1] protected-vlan reference-instance 1
[PE-AGG-rrpp-domain-region1] control-vlan 5
[PE-AGG-rrpp-domain-region1] quit
# Configure the VLANs mapping instance 2 as the protected VLANs in domain 2. Configure
VLAN 10 as the control VLAN.
<PE-AGG> system-view
[PE-AGG] rrpp domain 2
[PE-AGG-rrpp-domain-region2] protected-vlan reference-instance 2
[PE-AGG-rrpp-domain-region2] control-vlan 10
[PE-AGG-rrpp-domain-region2] quit
# Configure CE1 as the master node of ring 2 in domain 2. Configure GE 2/0/0 as the primary
port and GE 1/0/0 as the secondary port.
<CE1> system-view
[CE1] rrpp domain 2
[CE1-rrpp-domain-region2] ring 2 node-mode master primary-port GigabitEthernet
2/0/0 secondary-port GigabitEthernet 1/0/0 level 1
[CE1-rrpp-domain-region2] ring 2 enable
[CE1-rrpp-domain-region2] quit
l Configure CE2.
# Configure CE2 as the master node of ring 3 in domain 1. Configure GE 1/0/0 as the primary
port and GE 2/0/0 as the secondary port.
<CE2> system-view
[CE2] rrpp domain 1
[CE2-rrpp-domain-region1] ring 3 node-mode master primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 1
[CE2-rrpp-domain-region1] ring 3 enable
[CE2-rrpp-domain-region1] quit
# Configure CE2 as the master node of ring 3 in domain 2. Configure GE 2/0/0 as the primary
port and GE 1/0/0 as the secondary port.
<CE2> system-view
[CE2] rrpp domain 2
[CE2-rrpp-domain-region2] ring 3 node-mode master primary-port GigabitEthernet
2/0/0 secondary-port GigabitEthernet 1/0/0 level 1
[CE2-rrpp-domain-region2] ring 3 enable
[CE2-rrpp-domain-region2] quit
l Configure UPE A.
# Configure UPE A as a transit node of ring 1 in domain 1 and specify primary and secondary
ports on UPE A.
<UPEA> system-view
[UPEA] rrpp domain 1
[UPEA-rrpp-domain-region1] ring 1 node-mode transit primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPEA-rrpp-domain-region1] ring 1 enable
[UPEA-rrpp-domain-region1] quit
# Configure UPE A as a transit node of ring 1 in domain 2 and specify primary and secondary
ports on UPE A.
<UPEA> system-view
[UPEA] rrpp domain 2
[UPEA-rrpp-domain-region2] ring 1 node-mode transit primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPEA-rrpp-domain-region2] ring 1 enable
[UPEA-rrpp-domain-region2] quit
l # Configure UPE B.
# Configure UPE B as a transit node of ring 1 in domain 1 and specify primary and secondary
ports on UPE B.
<UPEB> system-view
[UPEB] rrpp domain 1
[UPEB-rrpp-domain-region1] ring 1 node-mode transit primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPEB-rrpp-domain-region1] ring 1 enable
[UPEB-rrpp-domain-region1] quit
# Configure UPE B as a transit node of ring 1 in domain 2 and specify primary and secondary
ports on UPE B.
<UPEB> system-view
[UPEB] rrpp domain 2
[UPEB-rrpp-domain-region2] ring 1 node-mode transit primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPEB-rrpp-domain-region2] ring 1 enable
[UPEB-rrpp-domain-region2] quit
# Configure UPE B as an edge transit node on ring 2 in domain 1 and configure GE 3/0/0 as the
edge port.
<UPEB> system-view
[UPEB] rrpp domain 1
[UPEB-rrpp-domain-region1] ring 2 node-mode transit secondary-port GigabitEthernet
3/0/0
[UPEB-rrpp-domain-region1] ring 2 enable
[UPEB-rrpp-domain-region1] quit
# Configure UPE B as an edge transit node on ring 2 in domain 2 and configure GE 3/0/0 as the
edge port.
<UPEB> system-view
[UPEB] rrpp domain 2
[UPEB-rrpp-domain-region2] ring 2 node-mode transit secondary-port GigabitEthernet
3/0/0
[UPEB-rrpp-domain-region2] ring 2 enable
[UPEB-rrpp-domain-region2] quit
# Configure UPE B as an edge transit node on ring 3 in domain 1 and configure GE 3/0/1 as the
edge port.
<UPEB> system-view
[UPEB] rrpp domain 1
[UPEB-rrpp-domain-region1] ring 3 node-mode transit secondary-port GigabitEthernet
3/0/1
[UPEB-rrpp-domain-region1] ring 3 enable
[UPEB-rrpp-domain-region1] quit
# Configure UPE B as an edge transit node on ring 3 in domain 2 and configure GE 3/0/1 as the
edge port.
<UPEB> system-view
[UPEB] rrpp domain 2
[UPEB-rrpp-domain-region2] ring 3 node-mode transit secondary-port GigabitEthernet
3/0/1
[UPEB-rrpp-domain-region2] ring 3 enable
[UPEB-rrpp-domain-region2] quit
l Configure UPE C.
# Configure UPE C as a transit node of ring 1 in domain 1 and specify primary and secondary
ports on UPE C.
<UPEC> system-view
[UPEC] rrpp domain 1
[UPEC-rrpp-domain-region1] ring 1 node-mode transit primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPEC-rrpp-domain-region1] ring 1 enable
[UPEC-rrpp-domain-region1] quit
# Configure UPE C as a transit node of ring 1 in domain 2 and specify primary and secondary
ports on UPE C.
<UPEC> system-view
[UPEC] rrpp domain 2
[UPEC-rrpp-domain-region2] ring 1 node-mode transit primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPEC-rrpp-domain-region2] ring 1 enable
[UPEC-rrpp-domain-region2] quit
# Configure UPE C as an edge transit node on ring 2 in domain 1 and configure GE 3/0/0 as the
edge port.
<UPEC> system-view
[UPEC] rrpp domain 1
[UPEC-rrpp-domain-region1] ring 2 node-mode transit secondary-port GigabitEthernet
3/0/0
[UPEC-rrpp-domain-region1] ring 2 enable
[UPEC-rrpp-domain-region1] quit
# Configure UPE C as an edge transit node on ring 2 in domain 2 and configure GE 3/0/0 as the
edge port.
<UPEC> system-view
[UPEC] rrpp domain 2
[UPEC-rrpp-domain-region2] ring 2 node-mode transit secondary-port GigabitEthernet
3/0/0
[UPEC-rrpp-domain-region2] ring 2 enable
[UPEC-rrpp-domain-region2] quit
# Configure UPE C as an edge transit node on ring 3 in domain 1 and configure GE 3/0/1 as the
edge port.
<UPEC> system-view
[UPEC] rrpp domain 1
[UPEC-rrpp-domain-region1] ring 3 node-mode transit secondary-port GigabitEthernet
3/0/1
[UPEC-rrpp-domain-region1] ring 3 enable
[UPEC-rrpp-domain-region1] quit
# Configure UPE C as an edge transit node on ring 3 in domain 2 and configure GE 3/0/1 as the
edge port.
<UPEC> system-view
[UPEC] rrpp domain 2
[UPEC-rrpp-domain-region2] ring 3 node-mode transit secondary-port GigabitEthernet
3/0/1
[UPEC-rrpp-domain-region2] ring 3 enable
[UPEC-rrpp-domain-region2] quit
l Configure UPE D.
# Configure UPE D as a transit node of ring 1 in domain 1 and specify primary and secondary
ports on UPE D.
<UPED> system-view
[UPED] rrpp domain 1
# Configure UPE D as a transit node of ring 1 in domain 2 and specify primary and secondary
ports on UPE D.
<UPED> system-view
[UPED] rrpp domain 2
[UPED-rrpp-domain-region2] ring 1 node-mode transit primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPED-rrpp-domain-region2] ring 1 enable
[UPED-rrpp-domain-region2] quit
l Configure PE-AGG.
# Configure PE-AGG as the master node of ring 1 in domain 1. Configure GE 1/0/0 as the
primary port and GE 2/0/0 as the secondary port.
<PE-AGG> system-view
[PE-AGG] rrpp domain 1
[PE-AGG-rrpp-domain-region1] ring 1 node-mode master primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[PE-AGG-rrpp-domain-region1] ring 1 enable
[PE-AGG-rrpp-domain-region1] quit
# Configure PE-AGG as the master node of ring 1 in domain 2. Configure GE 2/0/0 as the
primary port and GE 1/0/0 as the secondary port.
<PE-AGG> system-view
[PE-AGG] rrpp domain 2
[PE-AGG-rrpp-domain-region2] ring 1 node-mode master primary-port GigabitEthernet
2/0/0 secondary-port GigabitEthernet 1/0/0 level 0
[PE-AGG-rrpp-domain-region2] ring 1 enable
[PE-AGG-rrpp-domain-region2] quit
l Configure CE2.
l Configure UPE A.
l # Configure UPE B.
l Configure UPE C.
l Configure UPE D.
l Configure PE-AGG.
l Configure CE2.
l Configure PE-AGG.
Domain Index : 1
Control VLAN : major 5 sub 6
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 3 sec(default is 3 sec)
Ring Ring Node Primary Secondary/Edge Is
ID Level Mode Port Port Enabled
----------------------------------------------------------------------------
1 0 T GigabitEthernet1/0/0 GigabitEthernet2/0/0 Yes
2 1 ET GigabitEthernet1/0/0 GigabitEthernet3/0/0 Yes
GigabitEthernet2/0/0
3 1 ET GigabitEthernet1/0/0 GigabitEthernet3/0/1 Yes
GigabitEthernet2/0/0
Domain Index : 2
Control VLAN : major 10 sub 11
Protected VLAN : Reference Instance 2
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 3 sec(default is 3 sec)
Ring Ring Node Primary Secondary/Edge Is
ID Level Mode Port Port Enabled
----------------------------------------------------------------------------
1 0 T GigabitEthernet1/0/0 GigabitEthernet2/0/0 Yes
2 1 ET GigabitEthernet1/0/0 GigabitEthernet3/0/0 Yes
GigabitEthernet2/0/0
3 1 ET GigabitEthernet1/0/0 GigabitEthernet3/0/1 Yes
GigabitEthernet2/0/0
The preceding information shows that the RRPP protocol is enabled on UPE B.
In domain 1:
VLAN 1 is the control VLAN and VLANs mapping instance 1 are the protected VLANs.
UPE B is a transit node on ring 1; GE 1/0/0 is the primary port; GE 2/0/0 is the secondary port.
UPE B is an edge transit node on ring 2. GE 3/0/0 is the edge port.
UPE B is an edge transit node on ring 3. GE 3/0/1 is the edge port.
In domain 2:
VLAN 10 is the control VLAN and VLANs mapping instance 2 are the protected VLANs.
UPE B is a transit node on ring 1. The primary port is GE 1/0/0, and the secondary port is GE
2/0/0.
UPE B is an edge transit node on ring 2. GE 3/0/0 is the edge port.
UPE B is an edge transit node on ring 3. GE 3/0/1 is the edge port.
l Run the display rrpp brief command on PE-AGG. The following information is displayed:
<PE-AGG> display rrpp brief
Abbreviations for Switch Node Mode :
M - Master , T - Transit , EM - Edge Master, ET - Edge Transit
Domain Index : 1
Control VLAN : major 5 sub 6
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 3 sec(default is 3 sec)
Ring Ring Node Primary Secondary/Edge Is
ID Level Mode Port Port Enabled
---------------------------------------------------------------------------
1 0 M GigabitEthernet1/0/0 GigabitEthernet2/0/0 Yes
Domain Index : 2
Control VLAN : major 10 sub 11
Protected VLAN: Reference Instance 2
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 3 sec(default is 3 sec)
Ring Ring Node Primary Secondary/Edge Is
ID Level Mode Port Port Enabled
---------------------------------------------------------------------------
1 0 M GigabitEthernet2/0/0 GigabitEthernet1/0/0 Yes
The preceding information shows that the RRPP protocol is enabled on PE-AGG, and the link-
Up timer is 1 second.
In domain 1, VLAN 1 is the control VLAN; VLANs mapping instance 1 are the protected
VLANs; PE-AGG is the master node on ring 1. The primary port is GE 1/0/0, and the secondary
port is GE 2/0/0.
In domain 2, VLAN 10 is the control VLAN; VLANs mapping instance 2 are the protected
VLANs; PE-AGG is the master node on ring 1. The primary port is GE 2/0/0, and the secondary
port is GE 1/0/0.
l Run the display rrpp verbose domain command on UPE B. You can obtain the following
results:
# View detailed information about UPE B in domain 1.
<UPEB> display rrpp verbose domain 1
Domain Index : 1
Control VLAN : major 5 sub 6
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 3 sec(default is 3 sec)
RRPP Ring : 1
Ring Level : 0
Node Mode : Transit
Ring State : LinkUp
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet1/0/0 Port status: UP
Secondary port : GigabitEthernet2/0/0 Port status: UP
RRPP Ring :
2
Ring Level :
1
Node Mode :
Edge Transit
Ring State :
LinkUp
Is Enabled :
Enable Is Active: Yes
Primary port :
GigabitEthernet1/0/0 Port status: UP
GigabitEthernet2/0/0 Port status: UP
Secondary port : GigabitEthernet3/0/0 Port status: UP
RRPP Ring :
3
Ring Level :
1
Node Mode :
Edge Transit
Ring State :
LinkUp
Is Enabled :
Enable Is Active: Yes
Primary port :
GigabitEthernet1/0/0 Port status: UP
GigabitEthernet2/0/0 Port status: UP
Secondary port : GigabitEthernet3/0/1 Port status: UP
The preceding information shows that VLAN 1 is the control VLAN in domain 1 and VLANs
mapping instance 1 are the protected VLANs.
UPE B is a transit node on ring 1 in domain 1 and is in LinkUp state.
UPE B is a transit node on ring 2 in domain 1 and is in LinkUp state. GE 3/0/0 is the edge port.
UPE B is an edge transit node on ring 3 in domain 1 and is in LinkUp state. GE 3/0/1 is the edge
port.
# View detailed information about UPE B in domain 2.
<UPEB> display rrpp verbose domain 2
Domain Index : 2
Control VLAN : major 10 sub 11
Protected VLAN : Reference Instance 2
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 3 sec(default is 3 sec)
RRPP Ring : 1
Ring Level : 0
Node Mode : Transit
RRPP Ring :
2
Ring Level :
1
Node Mode :
Edge Transit
Ring State :
LinkUp
Is Enabled :
Enable Is Active: Yes
Primary port :
GigabitEthernet1/0/0 Port status: UP
GigabitEthernet2/0/0 Port status: UP
Secondary port : GigabitEthernet3/0/0 Port status: UP
RRPP Ring :
3
Ring Level :
1
Node Mode :
Edge Transit
Ring State :
LinkUp
Is Enabled :
Enable Is Active: Yes
Primary port :
GigabitEthernet1/0/0 Port status: UP
GigabitEthernet2/0/0 Port status: UP
Secondary port : GigabitEthernet3/0/1 Port status: UP
The preceding information shows that VLAN 10 is the control VLAN in domain 2, and VLANs
mapping instance 2 are the protected VLANs.
UPE B is a transit node in domain 2 and is in LinkUp state.
UPE B is a transit node on ring 2 in domain 2 and is in LinkUp state. GE 3/0/0 GE 3/0/0 is the
edge port.
UPE B is an edge transit node on ring 3 in domain 2 and is in LinkUp state. GE 3/0/1 is the edge
port.
l Run the display rrpp verbose domain command on PE-AGG. You can obtain the following
results:
# View detailed information about PE-AGG in domain 1.
<PE-AGG> display rrpp verbose domain 1
Domain Index : 1
Control VLAN : major 5 sub 6
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 3 sec(default is 3 sec)
RRPP Ring : 1
Ring Level : 0
Node Mode : Master
Ring State : Complete
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet1/0/0 Port status: UP
Secondary port : GigabitEthernet2/0/0 Port status: BLOCKED
The preceding information shows that VLAN 1 is the control VLAN in domain 1 and VLANs
mapping instance 1 are the protected VLANs.
PE-AGG is the master node in domain 1 and is in Complete state.
The primary port is GE 1/0/0, and the secondary port is GE 2/0/0.
# View detailed information about PE-AGG in domain 2.
<PE-AGG> display rrpp verbose domain 2
Domain Index : 2
Control VLAN : major 10 sub 11
RRPP Ring : 1
Ring Level : 0
Node Mode : Master
Ring State : Complete
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet2/0/0 Port status: UP
Secondary port : GigabitEthernet1/0/0 Port status: BLOCKED
The preceding information shows that VLAN 10 is the control VLAN in domain 2, and VLANs
mapping instance 2 are the protected VLANs.
PE-AGG is the master node in domain 2 and is in Complete state.
The primary port is GE 2/0/0, and the secondary port is GE 1/0/0.
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 5 to 6 10 to 11 100 to 300
#
rrpp working-mode GB
rrpp enable
rrpp linkup-delay-timer 1
#
stp region-configuration
instance 1 vlan 5 to 6 100 to 200
instance 2 vlan 10 to 11 201 to 300
active region-configuration
#
rrpp domain 1
control-vlan 5
protected-vlan reference-instance 1
ring 2 node-mode master primary-port GigabitEthernet 1/0/0 secondary-port
GigabitEthernet 2/0/0 level 1
ring 2 enable
rrpp domain 2
control-vlan 10
protected-vlan reference-instance 2
ring 2 node-mode master primary-port GigabitEthernet 2/0/0 secondary-port
GigabitEthernet 1/0/0 level 1
ring 2 enable
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 6 11 100 to 300
stp disable
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 6 11 100 to 300
stp disable
#
return
rrpp working-mode GB
rrpp enable
#
stp region-configuration
instance 1 vlan 5 to 6 100 to 200
instance 2 vlan 10 to 11 201 to 300
active region-configuration
#
rrpp domain 1
control-vlan 5
protected-vlan reference-instance 1
ring 1 node-mode transit primary-port GigabitEthernet 1/0/0 secondary-port
GigabitEthernet 2/0/0 level 0
ring 1 enable
ring 2 node-mode transit secondary-port GigabitEthernet 3/0/0
ring 2 enable
ring 3 node-mode transit secondary-port GigabitEthernet 3/0/1
ring 3 enable
rrpp domain 2
control-vlan 10
protected-vlan reference-instance 2
ring 1 node-mode transit primary-port GigabitEthernet 1/0/0 secondary-port
GigabitEthernet 2/0/0 level 0
ring 1 enable
ring 2 node-mode transit secondary-port GigabitEthernet 3/0/0
ring 2 enable
ring 3 node-mode transit secondary-port GigabitEthernet 3/0/1
ring 3 enable
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 5 to 6 10 to 11 100 to 300
stp disable
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 5 to 6 10 to 11 100 to 300
stp disable
#
interface GigabitEthernet3/0/0
port link-type trunk
port trunk allow-pass vlan 6 11 100 to 300
stp disable
#
interface GigabitEthernet3/0/1
port link-type trunk
port trunk allow-pass vlan 6 11 100 to 300
stp disable
#
Return
Networking Requirements
As shown in Figure 5-104, UPE A, UPE B, UPE C, UPE D, and PE-AGG form two multi-
instance major rings: ring 1 in domain 1 and ring 1 in domain 2.
CE1, UPE B, and UPE C form two subrings: ring 2 in domain 1 and ring 2 in domain 2. CE1 is
connected to the major rings through GE 3/0/0 of UPE B and GE 3/0/0 of UPE C. UPE B is an
edge node, and UPE is an assistant edge node.
CE2, UPE B, and UPE C form two subrings: ring 3 in domain 1 and ring 3 in domain 2. CE2 is
connected to the major rings through GE 3/0/1 of UPE B and GE 3/0/1 of UPE C. UPE B is an
edge node, and UPE is an assistant edge node.
VLANs 100 to 300 are configured on CE. Domain 1 and domain 2 share the traffic of packets
from VLANs 100 to 300. Packets from VLANs 100 to 200 are transmitted through domain 1,
and packets from VLANs 201 to 300 are transmitted through domain 2.
Table 5-6 shows the mapping between protected VLANs and instances in domain 1 and domain
2.
Table 5-7 shows the master node of each ring, and the primary port and secondary port on each
master node.
Table 5-7 Master nodes, and primary and secondary ports on the master nodes
Table 5-8 shows the edge nodes, assistant edge nodes, public port, and edge port of the subrings.
Table 5-8 Edge nodes, assistant edge nodes, public port, and edge port of the subrings
Ring Edge Comm Edge Port Edge- Common Edge Port
ID Node on Port Assistant Port
Node
To reduce the Edge-Hello packets sent on the major ring and increase available bandwidth, you
can add the four subrings to a ring group.
To prevent topology flapping, you need to set the Link-Up timer on the master nodes.
Figure 5-104 Networking diagram of crossed RRPP rings with multiple instances
Backbone
network
GE/1/0/0 GE2/0/0
PE-AGG
Master 1
GE2/0/0 Master 2 GE/1/0/0
UPE A Domain 1 ring 1
UPED
GE/1/0/0
GE2/0/00
Domain 2 ring 1
Master 1 Master 1
Master 2 Domain 1 ring 2 Domain 1 ring 3 GE/1/0/0 Master 2
GE2/0/0
CE 1 CE 2
VLAN 100-300 VLAN 100-300
Domain 1
Domain 2
Configuration Roadmap
The configuration roadmap is as follows:
1. Map instance 1 to VLANs 100 to 200. Map instance 2 to VLANs 201 to 300.
2. Add UPE A, UPE B, UPE C, UPE D, and PE-AGG to ring 1 in domain 1 and ring 1 in
domain 2.
3. Add CE1, UPE B, and UPE C to ring 2 in domain 1 and ring 2 in domain 2.
4. Add CE2, UPE B, and UPE C to ring 3 in domain 1 and ring 3 in domain 2.
5. Configure protected VLANs in domain 1 and domain 2.
6. Configure control VLANs in domain 1 and domain 2.
7. Configure PE-AGG as the master node and configure UPE A, UPE B, and UPE C as transit
nodes on ring 1 in domain 1 and ring 1 in domain 2.
8. Configure CE1 as the master node and configure UPE B and UPE C as transit nodes on
ring 2 in domain 1 and ring 2 in domain 2.
9. Configure CE2 as the master node and configure UPE B and UPE C as transit nodes on
ring 3 in domain 1 and ring 3 in domain 2.
10. Configure a ring group.
11. Set the link-Up timer.
Data Preparation
To complete the configuration, you need the following data:
l Instance IDs
l Range of the protected VLANs
l IDs of the control VLANs
l Numbers of the RRPP interfaces
l ID of the ring group
l Link-Up-Delay timer
Procedure
Step 1 Create instances.
l Configure CE1.
# Create data VLANs 100 to 300 on CE1.
<CE1> system-view
[CE1] vlan batch 100 to 300
# Create instance 1 and map it to control VLANs VLAN 5 and VLAN 6 and data VLANs
100 to 200 in domain 1.
[CE1] stp region-configuration
[CE1-mst-region] instance 1 vlan 5 6 100 to 200
# Create instance 2 and map it to control VLANs VLAN 10 and VLAN 11 and data VLANs
201 to 300 in domain 2.
[CE1-mst-region] instance 2 vlan 10 11 201 to 300
l Configure CE2.
# Create data VLANs 100 to 300 on CE2.
<CE2> system-view
[CE2] vlan batch 100 to 300
# Create instance 1 and map it to control VLANs VLAN 5 and VLAN 6 and data VLANs
100 to 200 in domain 1.
[CE2] stp region-configuration
[CE2-mst-region] instance 1 vlan 5 6 100 to 200
# Create instance 2 and map it to control VLANs VLAN 10 and VLAN 11 and data VLANs
201 to 300 in domain 2.
[CE2-mst-region] instance 2 vlan 10 11 201 to 300
l Configure UPE A.
# Create data VLANs 100 to 300 on UPE A.
<UPEA> system-view
[UPEA] vlan batch 100 to 300
# Create instance 1 and map it to control VLANs VLAN 5 and VLAN 6 and data VLANs
100 to 200 in domain 1.
[UPEA] stp region-configuration
[UPEA-mst-region] instance 1 vlan 5 6 100 to 200
# Create instance 2 and map it to control VLANs VLAN 10 and VLAN 11 and data VLANs
201 to 300 in domain 2.
[UPEA-mst-region] instance 2 vlan 10 11 201 to 300
l # Configure UPE B.
# Create data VLANs 100 to 300 on UPE B.
<UPEB> system-view
[UPEB] vlan batch 100 to 300
# Create instance 1 and map it to control VLANs VLAN 5 and VLAN 6 and data VLANs
100 to 200 in domain 1.
[UPEB] stp region-configuration
[UPEB-mst-region] instance 1 vlan 5 6 100 to 200
# Create instance 2 and map it to control VLANs VLAN 10 and VLAN 11 and data VLANs
201 to 300 in domain 2.
[UPEB-mst-region] instance 2 vlan 10 11 201 to 300
l Configure UPE C.
# Create data VLANs 100 to 300 on UPE C.
<UPEC> system-view
[UPEC] vlan batch 100 to 300
# Create instance 1 and map it to control VLANs VLAN 5 and VLAN 6 and data VLANs
100 to 200 in domain 1.
[UPEC] stp region-configuration
[UPEC-mst-region] instance 1 vlan 5 6 100 to 200
# Create instance 2 and map it to control VLANs VLAN 10 and VLAN 11 and data VLANs
201 to 300 in domain 2.
[UPEC-mst-region] instance 2 vlan 10 11 201 to 300
l Configure UPE D.
# Create data VLANs 100 to 300 on UPE D.
<UPED> system-view
[UPED] vlan batch 100 to 300
# Create instance 1 and map it to control VLANs VLAN 5 and VLAN 6 and data VLANs
100 to 200 in domain 1.
[UPED] stp region-configuration
[UPED-mst-region] instance 1 vlan 5 6 100 to 200
# Create instance 2 and map it to control VLANs VLAN 10 and VLAN 11 and data VLANs
201 to 300 in domain 2.
[UPED-mst-region] instance 2 vlan 10 11 201 to 300
l Configure PE-AGG.
# Create data VLANs 100 to 300 on PE-AGG.
<PE-AGG> system-view
[PE-AGG] vlan batch 100 to 300
# Create instance 1 and map it to control VLANs VLAN 5 and VLAN 6 and data VLANs
100 to 200 in domain 1.
[PE-AGG] stp region-configuration
[PE-AGG-mst-region] instance 1 vlan 5 6 100 to 200
# Create instance 2 and map it to control VLANs VLAN 10 and VLAN 11 and data VLANs
201 to 300 in domain 2.
[PE-AGG-mst-region] instance 2 vlan 10 11 201 to 300
l Configure CE2.
# Disable STP on the interfaces that need to be added to the RRPP ring on CE2. Configure
the RRPP interfaces to allow packets of VLANs 100 to 300 to pass through.
<CE2> system-view
[CE2] interface GigabitEthernet 1/0/0
[CE2-GigabitEthernet1/0/0] port link-type trunk
[CE2-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 to 300
[CE2-GigabitEthernet1/0/0] stp disable
[CE2-GigabitEthernet1/0/0] quit
[CE2] interface GigabitEthernet 2/0/0
[CE2-GigabitEthernet2/0/0] port link-type trunk
[CE2-GigabitEthernet2/0/0] port trunk allow-pass vlan 100 to 300
[CE2-GigabitEthernet2/0/0] stp disable
[CE2-GigabitEthernet2/0/0] quit
l Configure UPE A.
# Disable STP on the interfaces that need to be added to the RRPP ring on UPE A. Configure
the RRPP interfaces to allow packets of VLANs 100 to 300 to pass through.
<UPEA> system-view
[UPEA] interface GigabitEthernet 1/0/0
[UPEA-GigabitEthernet1/0/0] port link-type trunk
[UPEA-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 to 300
[UPEA-GigabitEthernet1/0/0] stp disable
[UPEA-GigabitEthernet1/0/0] quit
[UPEA] interface GigabitEthernet 2/0/0
[UPEA-GigabitEthernet2/0/0] port link-type trunk
[UPEA-GigabitEthernet2/0/0] port trunk allow-pass vlan 100 to 300
[UPEA-GigabitEthernet2/0/0] stp disable
[UPEA-GigabitEthernet2/0/0] quit
l # Configure UPE B.
# Disable STP on the interfaces that need to be added to the RRPP ring on UPE B. Configure
the RRPP interfaces to allow packets of VLANs 100 to 300 to pass through.
<UPEB> system-view
[UPEB] interface GigabitEthernet 1/0/0
[UPEB-GigabitEthernet1/0/0] port link-type trunk
[UPEB-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 to 300
[UPEB-GigabitEthernet1/0/0] stp disable
[UPEB-GigabitEthernet1/0/0] quit
[UPEB] interface GigabitEthernet 2/0/0
[UPEB-GigabitEthernet2/0/0] port link-type trunk
[UPEB-GigabitEthernet2/0/0] port trunk allow-pass vlan 100 to 300
[UPEB-GigabitEthernet2/0/0] stp disable
[UPEB-GigabitEthernet2/0/0] quit
[UPEB] interface GigabitEthernet 3/0/0
[UPEB-GigabitEthernet3/0/0] port link-type trunk
[UPEB-GigabitEthernet3/0/0] port trunk allow-pass vlan 100 to 300
[UPEB-GigabitEthernet3/0/0] stp disable
[UPEB-GigabitEthernet3/0/0] quit
[UPEB] interface GigabitEthernet 3/0/1
[UPEB-GigabitEthernet3/0/1] port link-type trunk
[UPEB-GigabitEthernet3/0/1] port trunk allow-pass vlan 100 to 300
[UPEB-GigabitEthernet3/0/1] stp disable
[UPEB-GigabitEthernet3/0/1] quit
l Configure UPE C.
# Disable STP on the interfaces that need to be added to the RRPP ring on UPE C. Configure
the RRPP interfaces to allow packets of VLANs 100 to 300 to pass through.
<UPEC> system-view
[UPEC] interface GigabitEthernet 1/0/0
[UPEC-GigabitEthernet1/0/0] port link-type trunk
[UPEC-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 to 300
[UPEC-GigabitEthernet1/0/0] stp disable
[UPEC-GigabitEthernet1/0/0] quit
[UPEC] interface GigabitEthernet 2/0/0
[UPEC-GigabitEthernet2/0/0] port link-type trunk
[UPEC-GigabitEthernet2/0/0] port trunk allow-pass vlan 100 to 300
[UPEC-GigabitEthernet2/0/0] stp disable
[UPEC-GigabitEthernet2/0/0] quit
[UPEC] interface GigabitEthernet 3/0/0
[UPEC-GigabitEthernet3/0/0] port link-type trunk
[UPEC-GigabitEthernet3/0/0] port trunk allow-pass vlan 100 to 300
[UPEC-GigabitEthernet3/0/0] stp disable
[UPEC-GigabitEthernet3/0/0] quit
l Configure UPE D.
# Disable STP on the interfaces that need to be added to the RRPP ring on UPE D. Configure
the RRPP interfaces to allow packets of VLANs 100 to 300 to pass through.
<UPED> system-view
[UPED] interface GigabitEthernet 1/0/0
[UPED-GigabitEthernet1/0/0] port link-type trunk
[UPED-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 to 300
[UPED-GigabitEthernet1/0/0] stp disable
[UPED-GigabitEthernet1/0/0] quit
[UPED] interface GigabitEthernet 2/0/0
[UPED-GigabitEthernet2/0/0] port link-type trunk
[UPED-GigabitEthernet2/0/0] port trunk allow-pass vlan 100 to 300
[UPED-GigabitEthernet2/0/0] stp disable
[UPED-GigabitEthernet2/0/0] quit
l Configure PE-AGG.
# Disable STP of the interfaces that need to be added to the RRPP ring on PE-AGG. Configure
the RRPP interfaces to allow packets of VLANs 100 to 300 to pass through.
<PE-AGG> system-view
[PE-AGG] interface GigabitEthernet 1/0/0
[PE-AGG-GigabitEthernet1/0/0] port link-type trunk
[PE-AGG-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 to 300
[PE-AGG-GigabitEthernet1/0/0] stp disable
[PE-AGG-GigabitEthernet1/0/0] quit
[PE-AGG] interface GigabitEthernet 2/0/0
[PE-AGG-GigabitEthernet2/0/0] port link-type trunk
[PE-AGG-GigabitEthernet2/0/0] port trunk allow-pass vlan 100 to 300
[PE-AGG-GigabitEthernet2/0/0] stp disable
[PE-AGG-GigabitEthernet2/0/0] quit
Step 3 Create RRPP domains and configure the protected VLANs and control VLANs.
l Configure CE1.
# Configure the VLANs mapping instance 1 as the protected VLANs in domain 1. Configure
VLAN 5 as the control VLAN.
<CE1> system-view
[CE1] rrpp domain 1
[CE1-rrpp-domain-region1] protected-vlan reference-instance 1
[CE1-rrpp-domain-region1] control-vlan 5
[CE1-rrpp-domain-region1] quit
# Configure the VLANs mapping instance 2 as the protected VLANs in domain 2. Configure
VLAN 10 as the control VLAN.
<CE1> system-view
[CE1] rrpp domain 2
[CE1-rrpp-domain-region2] protected-vlan reference-instance 2
[CE1-rrpp-domain-region2] control-vlan 10
[CE1-rrpp-domain-region2] quit
l Configure CE2.
# Configure the VLANs mapping instance 1 as the protected VLANs in domain 1. Configure
VLAN 5 as the control VLAN.
<CE2> system-view
[CE2] rrpp domain 1
[CE2-rrpp-domain-region1] protected-vlan reference-instance 1
[CE2-rrpp-domain-region1] control-vlan 5
[CE2-rrpp-domain-region1] quit
# Configure the VLANs mapping instance 2 as the protected VLANs in domain 2. Configure
VLAN 10 as the control VLAN.
<CE1> system-view
[CE2] rrpp domain 2
[CE2-rrpp-domain-region2] protected-vlan reference-instance 2
[CE2-rrpp-domain-region2] control-vlan 10
[CE2-rrpp-domain-region2] quit
l Configure UPE A.
# Configure the VLANs mapping instance 1 as the protected VLANs in domain 1. Configure
VLAN 5 as the control VLAN.
<UPEA> system-view
[UPEA] rrpp domain 1
[UPEA-rrpp-domain-region1] protected-vlan reference-instance 1
[UPEA-rrpp-domain-region1] control-vlan 5
[UPEA-rrpp-domain-region1] quit
# Configure the VLANs mapping instance 2 as the protected VLANs in domain 2. Configure
VLAN 10 as the control VLAN.
<UPEA> system-view
[UPEA] rrpp domain 2
[UPEA-rrpp-domain-region2] protected-vlan reference-instance 2
[UPEA-rrpp-domain-region2] control-vlan 10
[UPEA-rrpp-domain-region2] quit
l # Configure UPE B.
# Configure the VLANs mapping instance 1 as the protected VLANs in domain 1. Configure
VLAN 5 as the control VLAN.
<UPEB> system-view
[UPEB] rrpp domain 1
[UPEB-rrpp-domain-region1] protected-vlan reference-instance 1
[UPEB-rrpp-domain-region1] control-vlan 5
[UPEB-rrpp-domain-region1] quit
# Configure the VLANs mapping instance 2 as the protected VLANs in domain 2. Configure
VLAN 10 as the control VLAN.
<UPEB> system-view
[UPEB] rrpp domain 2
[UPEB-rrpp-domain-region2] protected-vlan reference-instance 2
[UPEB-rrpp-domain-region2] control-vlan 10
[UPEB-rrpp-domain-region2] quit
l Configure UPE C.
# Configure the VLANs mapping instance 1 as the protected VLANs in domain 1. Configure
VLAN 5 as the control VLAN.
<UPEC> system-view
[UPEC] rrpp domain 1
[UPEC-rrpp-domain-region1] protected-vlan reference-instance 1
[UPEC-rrpp-domain-region1] control-vlan 5
[UPEC-rrpp-domain-region1] quit
# Configure the VLANs mapping instance 2 as the protected VLANs in domain 2. Configure
VLAN 10 as the control VLAN.
<UPEC> system-view
[UPEC] rrpp domain 2
[UPEC-rrpp-domain-region2] protected-vlan reference-instance 2
[UPEC-rrpp-domain-region2] control-vlan 10
[UPEC-rrpp-domain-region2] quit
l Configure UPE D.
# Configure the VLANs mapping instance 1 as the protected VLANs in domain 1. Configure
VLAN 5 as the control VLAN.
<UPED> system-view
[UPED] rrpp domain 1
# Configure the VLANs mapping instance 2 as the protected VLANs in domain 2. Configure
VLAN 10 as the control VLAN.
<UPED> system-view
[UPED] rrpp domain 2
[UPED-rrpp-domain-region2] protected-vlan reference-instance 2
[UPED-rrpp-domain-region2] control-vlan 10
[UPED-rrpp-domain-region2] quit
l Configure PE-AGG.
# Configure the VLANs mapping instance 1 as the protected VLANs in domain 1. Configure
VLAN 5 as the control VLAN.
<PE-AGG> system-view
[PE-AGG] rrpp domain 1
[PE-AGG-rrpp-domain-region1] protected-vlan reference-instance 1
[PE-AGG-rrpp-domain-region1] control-vlan 5
[PE-AGG-rrpp-domain-region1] quit
# Configure the VLANs mapping instance 2 as the protected VLANs in domain 2. Configure
VLAN 10 as the control VLAN.
<PE-AGG> system-view
[PE-AGG] rrpp domain 2
[PE-AGG-rrpp-domain-region2] protected-vlan reference-instance 2
[PE-AGG-rrpp-domain-region2] control-vlan 10
[PE-AGG-rrpp-domain-region2] quit
# Configure PE-AGG as the master node of ring 1 in domain 2. Configure GE 2/0/0 as the
primary port and GE 1/0/0 as the secondary port.
<PE-AGG> system-view
[PE-AGG] rrpp domain 2
[PE-AGG-rrpp-domain-region2] ring 1 node-mode master primary-port
GigabitEthernet 2/0/0 secondary-port GigabitEthernet 1/0/0 level 0
[PE-AGG-rrpp-domain-region2] ring 1 enable
[PE-AGG-rrpp-domain-region2] quit
l Configure UPE A.
# Configure UPE A as a transit node of ring 1 in domain 1 and specify primary and secondary
ports on UPE A.
<UPEA> system-view
[UPEA] rrpp domain 1
[UPEA-rrpp-domain-region1] ring 1 node-mode transit primary-port
GigabitEthernet 1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPEA-rrpp-domain-region1] ring 1 enable
[UPEA-rrpp-domain-region1] quit
# Configure UPE A as a transit node of ring 1 in domain 2 and specify primary and secondary
ports on UPE A.
<UPEA> system-view
[UPEA] rrpp domain 2
l Configure UPE D.
# Configure UPE D as a transit node of ring 1 in domain 1 and specify primary and secondary
ports on UPE D.
<UPED> system-view
[UPED] rrpp domain 1
[UPED-rrpp-domain-region1] ring 1 node-mode transit primary-port
GigabitEthernet 1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPED-rrpp-domain-region1] ring 1 enable
[UPED-rrpp-domain-region1] quit
# Configure UPE D as a transit node of ring 1 in domain 2 and specify primary and secondary
ports on UPE D.
<UPED> system-view
[UPED] rrpp domain 2
[UPED-rrpp-domain-region2] ring 1 node-mode transit primary-port
GigabitEthernet 1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPED-rrpp-domain-region2] ring 1 enable
[UPED-rrpp-domain-region2] quit
l # Configure UPE B.
# Configure UPE B as a transit node of ring 1 in domain 1 and specify primary and secondary
ports on UPE B.
<UPEB> system-view
[UPEB] rrpp domain 1
[UPEB-rrpp-domain-region1] ring 1 node-mode transit primary-port
GigabitEthernet 1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPEB-rrpp-domain-region1] ring 1 enable
[UPEB-rrpp-domain-region1] quit
# Configure UPE B as a transit node of ring 1 in domain 2 and specify primary and secondary
ports on UPE B.
<UPEB> system-view
[[UPEB] rrpp domain 2
[UPEB-rrpp-domain-region2] ring 1 node-mode transit primary-port
GigabitEthernet 1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPEB-rrpp-domain-region2] ring 1 enable
[UPEB-rrpp-domain-region2] quit
# Configure UPE B as an edge node of ring 2 in domain 1. Configure GE 1/0/0 as the public
port and GE 3/0/0 as the edge port.
<UPEB> system-view
[UPEB] rrpp domain 1
[UPEB-rrpp-domain-region1] ring 2 node-mode edge common-port GigabitEthernet
1/0/0 edge-port GigabitEthernet 3/0/0
[UPEB-rrpp-domain-region1] ring 2 enable
[UPEB-rrpp-domain-region1] quit
# Configure UPE B as an edge node of ring 2 in domain 2. Configure GE 1/0/0 as the public
port and GE 3/0/0 as the edge port.
<UPEB> system-view
[UPEB] rrpp domain 2
[UPEB-rrpp-domain-region2] ring 2 node-mode edge common-port GigabitEthernet
1/0/0 edge-port GigabitEthernet 3/0/0
[UPEB-rrpp-domain-region2] ring 2 enable
[UPEB-rrpp-domain-region2] quit
# Configure UPE B as an edge node of ring 3 in domain 1. Configure GE 1/0/0 as the public
port and GE 3/0/1 as the edge port.
<UPEB> system-view
[UPEB] rrpp domain 1
# Configure UPE B as an edge node of ring 3 in domain 2. Configure GE 1/0/0 as the public
port and GE 3/0/1 as the edge port.
<UPEB> system-view
[UPEB] rrpp domain 2
[UPEB-rrpp-domain-region2] ring 3 node-mode edge common-port GigabitEthernet
1/0/0 edge-port GigabitEthernet 3/0/1
[UPEB-rrpp-domain-region2] ring 3 enable
[UPEB-rrpp-domain-region2] quit
l Configure UPE C.
# Configure UPE C as a transit node of ring 1 in domain 1 and specify primary and secondary
ports on UPE C.
<UPEC> system-view
[UPEC] rrpp domain 1
[UPEC-rrpp-domain-region1] ring 1 node-mode transit primary-port
GigabitEthernet 1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPEC-rrpp-domain-region1] ring 1 enable
[UPEC-rrpp-domain-region1] quit
# Configure UPE C as a transit node of ring 1 in domain 2 and specify primary and secondary
ports on UPE C.
<UPEC> system-view
[UPEC] rrpp domain 2
[UPEC-rrpp-domain-region2] ring 1 node-mode transit primary-port
GigabitEthernet 1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPEC-rrpp-domain-region2] ring 1 enable
[UPEC-rrpp-domain-region2] quit
# Configure UPE B as an edge node of ring 2 in domain 1. Configure GE 2/0/0 as the public
port and GE 3/0/0 as the edge port.
<UPEC> system-view
[UPEC] rrpp domain 1
[UPEC-rrpp-domain-region1] ring 2 node-mode assistant-edge common-port
GigabitEthernet 2/0/0 edge-port GigabitEthernet 3/0/0
[UPEC-rrpp-domain-region1] ring 2 enable
[UPEC-rrpp-domain-region1] quit
# Configure UPE B as an edge node of ring 2 in domain 2. Configure GE 2/0/0 as the public
port and GE 3/0/0 as the edge port.
<UPEC> system-view
[UPEC] rrpp domain 2
[UPEC-rrpp-domain-region2] ring 2 node-mode assistant-edge common-port
GigabitEthernet 2/0/0 edge-port GigabitEthernet 3/0/0
[UPEC-rrpp-domain-region2] ring 2 enable
[UPEC-rrpp-domain-region2] quit
# Configure UPE C as an edge node of ring 3 in domain 1. Configure GE 1/0/0 as the public
port and GE 3/0/1 as the edge port.
<UPEC> system-view
[UPEC] rrpp domain 1
[UPEC-rrpp-domain-region1] ring 3 node-mode assistant-edge common-port
GigabitEthernet 2/0/0 edge-port GigabitEthernet 3/0/1
[UPEC-rrpp-domain-region1] ring 3 enable
[UPEC-rrpp-domain-region1] quit
# Configure UPE C as an edge node of ring 3 in domain 2. Configure GE 2/0/0 as the public
port and GE 3/0/1 as the edge port.
<UPEC> system-view
[UPEC] rrpp domain 2
[UPEC-rrpp-domain-region2] ring 3 node-mode assistant-edge common-port
GigabitEthernet 2/0/0 edge-port GigabitEthernet 3/0/1
l Configure CE1.
# Configure CE1 as the master node of ring 2 in domain 1. Configure GE 1/0/0 as the primary
port and GE 2/0/0 as the secondary port.
<CE1> system-view
[CE1] rrpp domain 1
[CE1-rrpp-domain-region1] ring 2 node-mode master primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 1
[CE1-rrpp-domain-region1] ring 2 enable
[CE1-rrpp-domain-region1] quit
# Configure CE1 as the master node of ring 2 in domain 2. Configure GE 2/0/0 as the primary
port and GE 1/0/0 as the secondary port.
<CE1> system-view
[CE1] rrpp domain 2
[CE1-rrpp-domain-region2] ring 2 node-mode master primary-port GigabitEthernet
2/0/0 secondary-port GigabitEthernet 1/0/0 level 1
[CE1-rrpp-domain-region2] ring 2 enable
[CE1-rrpp-domain-region2] quit
l Configure CE2.
# Configure CE2 as the master node of ring 3 in domain 1. Configure GE 1/0/0 as the primary
port and GE 2/0/0 as the secondary port.
<CE2> system-view
[CE2] rrpp domain 1
[CE2-rrpp-domain-region1] ring 3 node-mode master primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 1
[CE2-rrpp-domain-region1] ring 3 enable
[CE2-rrpp-domain-region1] quit
# Configure CE2 as the master node of ring 3 in domain 2. Configure GE 2/0/0 as the primary
port and GE 1/0/0 as the secondary port.
<CE2> system-view
[CE2] rrpp domain 2
[CE2-rrpp-domain-region2] ring 3 node-mode master primary-port GigabitEthernet
2/0/0 secondary-port GigabitEthernet 1/0/0 level 1
[CE2-rrpp-domain-region2] ring 3 enable
[CE2-rrpp-domain-region2] quit
l Configure UPE A.
# Enable the RRPP protocol.
<UPEA> system-view
[UPEA] rrpp enable
l Configure UPE D.
# Enable the RRPP protocol.
<UPED> system-view
[UPED] rrpp enable
l # Configure UPE B.
# Enable the RRPP protocol.
<UPEB> system-view
[UPEB] rrpp enable
l Configure UPE C.
# Enable the RRPP protocol.
<UPEC> system-view
[UPEC] rrpp enable
l Configure CE1.
# Enable the RRPP protocol.
<CE1> system-view
[CE1] rrpp enable
l Configure CE2.
# Enable the RRPP protocol.
<CE2> system-view
[CE2] rrpp enable
l Configure CE2.
# Set the link-Up timer to 1 second.
[CE2] rrpp linkup-delay-timer 1
l Configure PE-AGG.
# Set the link-Up timer to 1 second.
[PE-AGG] rrpp linkup-delay-timer 1
Domain Index : 1
Control VLAN : major 5 sub 6
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 3 sec(default is 3 sec)
Ring Ring Node Primary/Common Secondary/Edge Is
ID Level Mode Port Port
Enabled
-------------------------------------------------------------------------------
--
1 0 T GigabitEthernet1/0/0 GigabitEthernet2/0/0 Yes
2 1 E GigabitEthernet1/0/0 GigabitEthernet3/0/0 Yes
3 1 E GigabitEthernet1/0/0 GigabitEthernet3/0/1 Yes
Domain Index : 2
Control VLAN : major 10 sub 11
Protected VLAN: Reference Instance 2
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 3 sec(default is 3 sec)
Ring Ring Node Primary/Common Secondary/Edge Is
ID Level Mode Port Port
Enabled
-------------------------------------------------------------------------------
--
1 0 T GigabitEthernet1/0/0 GigabitEthernet2/0/0 Yes
2 1 E GigabitEthernet1/0/0 GigabitEthernet3/0/0 Yes
3 1 E GigabitEthernet1/0/0 GigabitEthernet3/0/1 Yes
Domain Index : 1
Control VLAN : major 5 sub 6
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 3 sec(default is 3 sec)
Ring Ring Node Primary/Common Secondary/Edge Is
ID Level Mode Port Port
Enabled
-------------------------------------------------------------------------------
--
1 0 M GigabitEthernet1/0/0 GigabitEthernet2/0/0 Yes
Domain Index : 2
Control VLAN : major 10 sub 11
Protected VLAN: Reference Instance 2
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 3 sec(default is 3 sec)
Ring Ring Node Primary/Common Secondary/Edge Is
ID Level Mode Port Port
Enabled
-------------------------------------------------------------------------------
--
1 0 M GigabitEthernet2/0/0 GigabitEthernet1/0/0 Yes
The preceding information shows that the RRPP protocol is enabled on PE-AGG, and the
link-Up timer is 2 seconds.
In domain 1, VLAN 5 is the control VLAN; VLANs mapping instance 1 are the protected
VLANs; PE-AGG is the master node on ring 1. GE 1/0/0 is the primary port, and GE 2/0/0
is the secondary port.
In domain 2, VLAN 10 is the control VLAN; VLANs mapping instance 2 are the protected
VLANs; PE-AGG is the master node on ring 1. GE 2/0/0 is the primary port, and GE 1/0/0
is the secondary port.
l Run the display rrpp verbose domain command on UPE B. You can obtain the following
results:
# View detailed information about UPE B in domain 1.
<UPEB> display rrpp verbose domain 1
Domain Index : 1
Control VLAN : major 5 sub 6
Protected VLAN: Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 3 sec(default is 3 sec)
RRPP Ring : 1
Ring Level : 0
Node Mode : Transit
Ring State : LinkUp
Is Enabled : Enable Is Active : Yes
Primary port : GigabitEthernet1/0/0 Port status: UP
Secondary port: GigabitEthernet2/0/0 Port status: UP
RRPP Ring : 2
Ring Level : 1
Node Mode : Edge
Ring State : LinkUp
Is Enabled : Enable Is Active : Yes
Common port : GigabitEthernet1/0/0 Port status: UP
Edge port : GigabitEthernet3/0/0 Port status: UP
RRPP Ring : 3
Ring Level : 1
Node Mode : Edge
Ring State : LinkUp
Is Enabled : Enable Is Active : Yes
The preceding information shows that VLAN 5 is the control VLAN in domain 1, and VLANs
mapping instance 1 are the protected VLANs.
UPE B is a transit node on ring 1 in domain 1 and is in LinkUp state.
UPE B is a transit node on ring 2 in domain 1 and is in LinkUp state. GE 1/0/0 is the public
port, and GE 3/0/0 is the edge port.
UPE B is a transit node on ring 3 in domain 1 and is in LinkUp state. GE 1/0/0 is the public
port, and GE 3/0/1 is the edge port.
# View detailed information about UPE B in domain 2.
<UPEB> display rrpp verbose domain 2
Domain Index : 2
Control VLAN : major 10 sub 11
Protected VLAN: Reference Instance 2
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 3 sec(default is 3 sec)
RRPP Ring : 1
Ring Level : 0
Node Mode : Transit
Ring State : LinkUp
Is Enabled : Enable Is Active : Yes
Primary port : GigabitEthernet1/0/0 Port status: UP
Secondary port: GigabitEthernet2/0/0 Port status: UP
RRPP Ring : 2
Ring Level : 1
Node Mode : Edge
Ring State : LinkUp
Is Enabled : Enable Is Active : Yes
Common port : GigabitEthernet1/0/0 Port status: UP
Edge port : GigabitEthernet3/0/0 Port status: UP
RRPP Ring : 3
Ring Level : 1
Node Mode : Edge
Ring State : LinkUp
Is Enabled : Enable Is Active : Yes
Common port : GigabitEthernet1/0/0 Port status: UP
Edge port : GigabitEthernet3/0/1 Port status: UP
The preceding information shows that VLAN 10 is the control VLAN in domain 2, and
VLANs mapping instance 2 are the protected VLANs.
UPE B is a transit node in domain 2 and is in LinkUp state.
UPE B is a transit node on ring 2 in domain 2 and is in LinkUp state. GE 1/0/0 is the public
port, and GE 3/0/0 is the edge port.
UPE B is a transit node on ring 3 in domain 2 and is in LinkUp state. GE 1/0/0 is the public
port, and GE 3/0/1 is the edge port.
l Run the display rrpp verbose domain command on PE-AGG. You can obtain the following
results:
# View detailed information about PE-AGG in domain 1.
<PE-AGG> display rrpp verbose domain 1
Domain Index : 1
Control VLAN : major 5 sub 6
Protected VLAN: Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 3 sec(default is 3 sec)
RRPP Ring : 1
Ring Level : 0
Node Mode : Master
Ring State : Complete
The preceding information shows that VLAN 5 is the control VLAN in domain 1, and VLANs
mapping instance 1 are the protected VLANs.
PE-AGG is the master node in domain 1 and is in Complete state.
GE 1/0/0 is the primary port, and GE 2/0/0 is the secondary port.
# View detailed information about PE-AGG in domain 2.
<PE-AGG> display rrpp verbose domain 2
Domain Index : 2
Control VLAN : major 10 sub 11
Protected VLAN: Reference Instance 2
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 3 sec(default is 3 sec)
RRPP Ring : 1
Ring Level : 0
Node Mode : Master
Ring State : Complete
Is Enabled : Enable Is Active : Yes
Primary port : GigabitEthernet2/0/0 Port status: UP
Secondary port: GigabitEthernet1/0/0 Port status: BLOCKED
The preceding information shows that VLAN 10 is the control VLAN in domain 2, and
VLANs mapping instance 2 are the protected VLANs.
PE-AGG is the master node in domain 2 and is in Complete state.
GE 2/0/0 is the primary port, and GE 1/0/0 is the secondary port.
l Run the display rrpp ring-group command on UPE B to view the configuration of the ring
group.
# View the configuration of ring group 1.
<UPEB> display rrpp ring-group 1
Ring Group 1:
domain 1 ring 2 to 3
domain 2 ring 2 to 3
domain 1 ring 2 send Edge-Hello packet
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 5 to 6 10 to 11 100 to 300
#
rrpp enable
rrpp linkup-delay-timer 1
#
stp region-configuration
instance 1 vlan 5 to 6 100 to 200
instance 2 vlan 10 to 11 201 to 300
active region-configuration
#
rrpp domain 1
control-vlan 5
protected-vlan reference-instance 1
ring 2 node-mode master primary-port GigabitEthernet 1/0/0 secondary-port
GigabitEthernet 2/0/0 level 1
ring 2 enable
rrpp domain 2
control-vlan 10
protected-vlan reference-instance 2
ring 2 node-mode master primary-port GigabitEthernet 2/0/0 secondary-port
GigabitEthernet 1/0/0 level 1
ring 2 enable
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 6 11 100 to 300
stp disable
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 6 11 100 to 300
stp disable
#
return
l Configuration file of CE2
#
#
sysname CE2
#
vlan batch 5 to 6 10 to 11 100 to 300
#
rrpp enable
rrpp linkup-delay-timer 1
#
stp region-configuration
instance 1 vlan 5 to 6 100 to 200
instance 2 vlan 10 to 11 201 to 300
active region-configuration
#
rrpp domain 1
control-vlan 5
protected-vlan reference-instance 1
ring 3 node-mode master primary-port GigabitEthernet 1/0/0 secondary-port
GigabitEthernet 2/0/0 level 1
ring 3 enable
rrpp domain 2
control-vlan 10
protected-vlan reference-instance 2
ring 3 node-mode master primary-port GigabitEthernet 2/0/0 secondary-port
GigabitEthernet 1/0/0 level 1
ring 3 enable
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 6 11 100 to 300
stp disable
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 6 11 100 to 300
stp disable
#
Return
l Configuration file of UPE A
#
#
sysname UPEA
#
vlan batch 5 to 6 10 to 11 100 to 300
#
rrpp enable
#
stp region-configuration
instance 1 vlan 5 to 6 100 to 200
instance 2 vlan 10 to 11 201 to 300
active region-configuration
#
rrpp domain 1
control-vlan 5
protected-vlan reference-instance 1
ring 1 node-mode transit primary-port GigabitEthernet 1/0/0 secondary-port
GigabitEthernet 2/0/0 level 0
ring 1 enable
rrpp domain 2
control-vlan 10
protected-vlan reference-instance 2
ring 1 node-mode transit primary-port GigabitEthernet 1/0/0 secondary-port
GigabitEthernet 2/0/0 level 0
ring 1 enable
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 5 to 6 10 to 11 100 to 300
stp disable
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 5 to 6 10 to 11 100 to 300
stp disable
#
return
l Configuration file of UPE B
#
sysname UPEB
#
vlan batch 5 to 6 10 to 11 100 to 300
#
rrpp enable
#
stp region-configuration
instance 1 vlan 5 to 6 100 to 200
instance 2 vlan 10 to 11 201 to 300
active region-configuration
#
rrpp domain 1
control-vlan 5
protected-vlan reference-instance 1
ring 1 node-mode transit primary-port GigabitEthernet 1/0/0 secondary-port
GigabitEthernet 2/0/0 level 0
ring 1 enable
ring 2 node-mode edge common-port GigabitEthernet 1/0/0 edge-port
GigabitEthernet 3/0/0
ring 2 enable
ring 3 node-mode edge common-port GigabitEthernet 1/0/0 edge-port
GigabitEthernet 3/0/1
ring 3 enable
rrpp domain 2
control-vlan 10
protected-vlan reference-instance 2
ring 1 node-mode transit primary-port GigabitEthernet 1/0/0 secondary-port
GigabitEthernet 2/0/0 level 0
ring 1 enable
ring 2 node-mode edge common-port GigabitEthernet 1/0/0 edge-port
GigabitEthernet 3/0/0
ring 2 enable
ring 3 node-mode edge common-port GigabitEthernet 1/0/0 edge-port
GigabitEthernet 3/0/1
ring 3 enable
#
rrpp ring group 1
domain 1 ring 2 to 3
domain 2 ring 2 to 3
#
interface GigabitEthernet1/0/0
Networking Requirements
As shown in Figure 5-105, UPE A, UPE B, UPE C, and UPE D form two multi-instance rings:
ring 1 in domain 1 and ring 1 in domain 2. UPE D, UPE E, UPE F, and UPE G form ring 1 in
domain 3. Packets of the data VLANs connected to CE are forwarded to the backbone network
through the two tangent rings.
VLANs 100 to 300 are configured on CE. Domain 1 and domain 2 share the traffic of packets
from VLANs 100 to 300. Packets from VLANs 100 to 200 are transmitted through domain 1,
and packets from VLANs 201 to 300 are transmitted through domain 2.
Table 5-9 shows the mapping between protected VLANs and instances in domain 1, domain 2,
and domain 3.
Table 5-10 shows the master node of each ring, and the primary port and secondary port on each
master node.
Table 5-10 Master nodes, and primary and secondary ports on the master nodes
Figure 5-105 Networking diagram of tangent RRPP rings with multiple instances
UPE B UPE E
GE1/0/0 GE2/0/0 GE1/0/0 GE2/0/0
Domain 1 ring 1
GE2/0/0 GE1/0/0
GE1/0/0 GE1/0/1
Master 1 UPE F
UPE A UPE D Master 3
Master 2
CE GE1/0/0 GE2/0/0 GE2/0/1 GE2/0/0
VLAN 100-300
Domain 2 ring 1 Domain 3 ring 1
domain 1
domain 2
domain 3
Configuration Roadmap
The configuration roadmap is as follows:
1. Map instance 1 to VLANs 100 to 200. Map instance 2 to VLANs 201 to 300.
2. Add UPE A, UPE B, UPE C, and UPE D to ring 1 in domain 1 and ring 1 in domain 2.
3. Add UPE D, UPE E, UPE F, and UPE G to ring 1 in domain 3.
4. Configure protected VLANs in domain 1 and domain 2.
5. Configure control VLANs in domain 1 and domain 2.
6. Configure the control VLAN in domain 3.
7. Configure UPE D as the master node and configure UPE A, UPE B, and UPE C as transit
nodes on ring 1 in domain 1 and ring 1 in domain 2.
8. Configure UPE F as the master node and configure UPE D, UPE E, and UPE G as transit
nodes on ring 1 in domain 3.
Data Preparation
To complete the configuration, you need the following data:
l Instance IDs
l Range of the protected VLANs
l IDs of the control VLANs
l Numbers of the RRPP interfaces
Procedure
Step 1 Create instances.
l Configure UPE A.
# Create instance 1 and map it to control VLANs VLAN 5 and VLAN 6 and data VLANs 100
to 200 in domain 1.
<UPEA> system-view
[UPEA] stp region-configuration
[UPEA-mst-region] instance 1 vlan 5 6 100 to 200
# Create instance 2 and map it to control VLANs VLAN 10 and VLAN 11 and data VLANs 201
to 300 in domain 2.
[UPEA-mst-region] instance 2 vlan 10 11 201 to 300
l # Configure UPE B.
# Create instance 1 and map it to control VLANs VLAN 5 and VLAN 6 and data VLANs 100
to 200 in domain 1.
<UPEB> system-view
[UPEB] stp region-configuration
[UPEB-mst-region] instance 1 vlan 5 6 100 to 200
# Create instance 2 and map it to control VLANs VLAN 10 and VLAN 11 and data VLANs 201
to 300 in domain 2.
[UPEB-mst-region] instance 2 vlan 10 11 201 to 300
l Configure UPE C.
# Create instance 1 and map it to control VLANs VLAN 5 and VLAN 6 and data VLANs 100
to 200 in domain 1.
<UPEC> system-view
[UPEC] stp region-configuration
[UPEC-mst-region] instance 1 vlan 5 6 100 to 200
# Create instance 2 and map it to control VLANs VLAN 10 and VLAN 11 and data VLANs 201
to 300 in domain 2.
[UPEC-mst-region] instance 2 vlan 10 11 201 to 300
l Configure UPE D.
# Create instance 1 and map it to control VLANs VLAN 5 and VLAN 6 and data VLANs 100
to 200 in domain 1.
<UPED> system-view
[UPED] stp region-configuration
[UPED-mst-region] instance 1 vlan 5 6 100 to 200
# Create instance 2 and map it to control VLANs VLAN 10 and VLAN 11 and data VLANs 201
to 300 in domain 2.
[UPED-mst-region] instance 2 vlan 10 11 201 to 300
# Create instance 3 and map it to control VLANs VLAN 20 and VLAN 21 in domain 3.
[UPED-mst-region] instance 3 vlan 20 21
l Configure UPE E.
# Create instance 1 and map it to control VLANs VLAN 20 and VLAN 21 and data VLANs 100
to 300 in domain 3.
<UPEE> system-view
[UPEE] stp region-configuration
[UPEE-mst-region] instance 1 vlan 20 21 100 to 300
l Configure UPE F.
# Create instance 1 and map it to control VLANs VLAN 20 and VLAN 21 and data VLANs 100
to 300 in domain 3.
<UPEF> system-view
[UPEF] stp region-configuration
[UPEF-mst-region] instance 1 vlan 20 21 100 to 300
l Configure UPE G.
# Create instance 1 and map it to control VLANs VLAN 20 and VLAN 21 and data VLANs 100
to 300 in domain 3.
<UPEG> system-view
[UPEG] stp region-configuration
[UPEG-mst-region] instance 1 vlan 20 21 100 to 300
Run the display stp region-configuration command on the devices to view the mapping
between instances and VLANs. The displayed information on UPE A is as follows:
<UPEA> display stp region-configuration
Oper configuration
Format selector :0
Region name :00e0cd568d00
Revision level :0
# Disable STP on the interfaces that need to be added to the RRPP ring on UPE A. Configure
the RRPP interfaces to allow packets of VLANs 100 to 300 to pass through.
<UPEA> system-view
[UPEA] interface GigabitEthernet 1/0/0
[UPEA-GigabitEthernet1/0/0] port link-type trunk
[UPEA-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 to 300
[UPEA-GigabitEthernet1/0/0] stp disable
[UPEA-GigabitEthernet1/0/0] quit
[UPEA] interface GigabitEthernet 2/0/0
[UPEA-GigabitEthernet2/0/0] port link-type trunk
[UPEA-GigabitEthernet2/0/0] port trunk allow-pass vlan 100 to 300
[UPEA-GigabitEthernet2/0/0] stp disable
[UPEA-GigabitEthernet2/0/0] quit
l # Configure UPE B.
# Disable STP on the interfaces that need to be added to the RRPP ring on UPE B. Configure
the RRPP interfaces to allow packets of VLANs 100 to 300 to pass through.
<UPEB> system-view
[UPEB] interface GigabitEthernet 1/0/0
[UPEB-GigabitEthernet1/0/0] port link-type trunk
[UPEB-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 to 300
l Configure UPE C.
# Disable STP on the interfaces that need to be added to the RRPP ring on UPE C. Configure
the RRPP interfaces to allow packets of VLANs 100 to 300 to pass through.
<UPEC> system-view
[UPEC] interface GigabitEthernet 1/0/0
[UPEC-GigabitEthernet1/0/0] port link-type trunk
[UPEC-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 to 300
[UPEC-GigabitEthernet1/0/0] stp disable
[UPEC-GigabitEthernet1/0/0] quit
[UPEC] interface GigabitEthernet 2/0/0
[UPEC-GigabitEthernet2/0/0] port link-type trunk
[UPEC-GigabitEthernet2/0/0] port trunk allow-pass vlan 100 to 300
[UPEC-GigabitEthernet2/0/0] stp disable
[UPEC-GigabitEthernet2/0/0] quit
l Configure UPE D.
# Disable STP on the interfaces that need to be added to the RRPP ring on UPE D. Configure
the RRPP interfaces to allow packets of VLANs 100 to 300 to pass through.
<UPED> system-view
[UPED] interface GigabitEthernet 1/0/0
[UPED-GigabitEthernet1/0/0] port link-type trunk
[UPED-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 to 300
[UPED-GigabitEthernet1/0/0] stp disable
[UPED-GigabitEthernet1/0/0] quit
[UPED] interface GigabitEthernet 1/0/1
[UPED-GigabitEthernet1/0/1] port link-type trunk
[UPED-GigabitEthernet1/0/1] port trunk allow-pass vlan 100 to 300
[UPED-GigabitEthernet1/0/1] stp disable
[UPED-GigabitEthernet1/0/1] quit
[UPED] interface GigabitEthernet 2/0/0
[UPED-GigabitEthernet2/0/0] port link-type trunk
[UPED-GigabitEthernet2/0/0] port trunk allow-pass vlan 100 to 300
[UPED-GigabitEthernet2/0/0] stp disable
[UPED-GigabitEthernet2/0/0] quit
[UPED] interface GigabitEthernet 2/0/1
[UPED-GigabitEthernet2/0/1] port link-type trunk
[UPED-GigabitEthernet2/0/1] port trunk allow-pass vlan 100 to 300
[UPED-GigabitEthernet2/0/1] stp disable
[UPED-GigabitEthernet2/0/1] quit
l Configure UPE E.
# Disable STP on the interfaces that need to be added to the RRPP ring on UPE E. Configure
the RRPP interfaces to allow packets of VLANs 100 to 300 to pass through.
<UPEE> system-view
[UPEE] interface GigabitEthernet 1/0/0
[UPEE-GigabitEthernet1/0/0] port link-type trunk
[UPEE-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 to 300
[UPEE-GigabitEthernet1/0/0] stp disable
[UPEE-GigabitEthernet1/0/0] quit
[UPEE] interface GigabitEthernet 2/0/0
[UPEE-GigabitEthernet2/0/0] port link-type trunk
[UPEE-GigabitEthernet2/0/0] port trunk allow-pass vlan 100 to 300
[UPEE-GigabitEthernet2/0/0] stp disable
[UPEE-GigabitEthernet2/0/0] quit
l Configure UPE F.
# Disable STP on the interfaces that need to be added to the RRPP ring on UPE F. Configure
the RRPP interfaces to allow packets of VLANs 100 to 300 to pass through.
<UPEF> system-view
[UPEF] interface GigabitEthernet 1/0/0
[UPEF-GigabitEthernet1/0/0] port link-type trunk
[UPEF-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 to 300
[UPEF-GigabitEthernet1/0/0] stp disable
[UPEF-GigabitEthernet1/0/0] quit
[UPEF] interface GigabitEthernet 2/0/0
[UPEF-GigabitEthernet2/0/0] port link-type trunk
[UPEF-GigabitEthernet2/0/0] port trunk allow-pass vlan 100 to 300
[UPEF-GigabitEthernet2/0/0] stp disable
[UPEF-GigabitEthernet2/0/0] quit
l Configure UPE G.
# Disable the STP function on the interfaces to be added to the RRPP ring on UPE G. Configure
the RRPP interfaces to allow packets of VLANs 100 to 300 to pass through.
<UPEG> system-view
[UPEG] interface GigabitEthernet 1/0/0
[UPEG-GigabitEthernet1/0/0] port link-type trunk
[UPEG-GigabitEthernet1/0/0] port trunk allow-pass vlan 100 to 300
[UPEG-GigabitEthernet1/0/0] stp disable
[UPEG-GigabitEthernet1/0/0] quit
[UPEG] interface GigabitEthernet 2/0/0
[UPEG-GigabitEthernet2/0/0] port link-type trunk
[UPEG-GigabitEthernet2/0/0] port trunk allow-pass vlan 100 to 300
[UPEG-GigabitEthernet2/0/0] stp disable
[UPEG-GigabitEthernet2/0/0] quit
Step 3 Create RRPP domains and configure the protected VLANs and control VLANs.
l Configure UPE A.
# Configure the VLANs mapping instance 1 as the protected VLANs in domain 1. Configure
VLAN 5 as the control VLAN.
<UPEA> system-view
[UPEA] rrpp domain 1
[UPEA-rrpp-domain-region1] protected-vlan reference-instance 1
[UPEA-rrpp-domain-region1] control-vlan 5
[UPEA-rrpp-domain-region1] quit
# Configure the VLANs mapping instance 2 as the protected VLANs in domain 2. Configure
VLAN 10 as the control VLAN.
<UPEA> system-view
[UPEA] rrpp domain 2
[UPEA-rrpp-domain-region2] protected-vlan reference-instance 2
[UPEA-rrpp-domain-region2] control-vlan 10
[UPEA-rrpp-domain-region2] quit
l # Configure UPE B.
# Configure the VLANs mapping instance 1 as the protected VLANs in domain 1. Configure
VLAN 5 as the control VLAN.
<UPEB> system-view
[UPEB] rrpp domain 1
[UPEB-rrpp-domain-region1] protected-vlan reference-instance 1
[UPEB-rrpp-domain-region1] control-vlan 5
[UPEB-rrpp-domain-region1] quit
# Configure the VLANs mapping instance 2 as the protected VLANs in domain 2. Configure
VLAN 10 as the control VLAN.
<UPEB> system-view
[UPEB] rrpp domain 2
[UPEB-rrpp-domain-region2] protected-vlan reference-instance 2
[UPEB-rrpp-domain-region2] control-vlan 10
[UPEB-rrpp-domain-region2] quit
l Configure UPE C.
# Configure the VLANs mapping instance 1 as the protected VLANs in domain 1. Configure
VLAN 5 as the control VLAN.
<UPEC> system-view
[UPEC] rrpp domain 1
[UPEC-rrpp-domain-region1] protected-vlan reference-instance 1
[UPEC-rrpp-domain-region1] control-vlan 5
[UPEC-rrpp-domain-region1] quit
# Configure the VLANs mapping instance 2 as the protected VLANs in domain 2. Configure
VLAN 10 as the control VLAN.
<UPEC> system-view
[UPEC] rrpp domain 2
[UPEC-rrpp-domain-region2] protected-vlan reference-instance 2
[UPEC-rrpp-domain-region2] control-vlan 10
[UPEC-rrpp-domain-region2] quit
l Configure UPE D.
# Configure the VLANs mapping instance 1 as the protected VLANs in domain 1. Configure
VLAN 5 as the control VLAN.
<UPED> system-view
[UPED] rrpp domain 1
[UPED-rrpp-domain-region1] protected-vlan reference-instance 1
[UPED-rrpp-domain-region1] control-vlan 5
[UPED-rrpp-domain-region1] quit
# Configure the VLANs mapping instance 2 as the protected VLANs in domain 2. Configure
VLAN 10 as the control VLAN.
<UPED> system-view
[UPED] rrpp domain 2
[UPED-rrpp-domain-region2] protected-vlan reference-instance 2
[UPED-rrpp-domain-region2] control-vlan 10
[UPED-rrpp-domain-region2] quit
l Configure UPE E.
l Configure UPE F.
<UPEF> system-view
[UPEF] rrpp domain 3
[UPEF-rrpp-domain-region3] protected-vlan reference-instance 1
[UPEF-rrpp-domain-region3] control-vlan 20
[UPEF-rrpp-domain-region3] quit
l Configure UPE G.
# Configure UPE A as a transit node of ring 1 in domain 1 and specify primary and secondary
ports on UPE A.
<UPEA> system-view
[UPEA] rrpp domain 1
[UPEA-rrpp-domain-region1] ring 1 node-mode transit primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPEA-rrpp-domain-region1] ring 1 enable
[UPEA-rrpp-domain-region1] quit
# Configure UPE A as a transit node of ring 1 in domain 2 and specify primary and secondary
ports on UPE A.
<UPEA> system-view
[UPEA] rrpp domain 2
[UPEA-rrpp-domain-region2] ring 1 node-mode transit primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPEA-rrpp-domain-region2] ring 1 enable
[UPEA-rrpp-domain-region2] quit
l # Configure UPE B.
# Configure UPE B as a transit node of ring 1 in domain 1 and specify primary and secondary
ports on UPE B.
<UPEB> system-view
[UPEB] rrpp domain 1
[UPEB-rrpp-domain-region1] ring 1 node-mode transit primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPEB-rrpp-domain-region1] ring 1 enable
[UPEB-rrpp-domain-region1] quit
# Configure UPE B as a transit node of ring 1 in domain 2 and specify primary and secondary
ports on UPE B.
<UPEB> system-view
[UPEB] rrpp domain 2
[UPEB-rrpp-domain-region2] ring 1 node-mode transit primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPEB-rrpp-domain-region2] ring 1 enable
[UPEB-rrpp-domain-region2] quit
l Configure UPE C.
# Configure UPE C as a transit node of ring 1 in domain 1 and specify primary and secondary
ports on UPE C.
<UPEC> system-view
[UPEC] rrpp domain 1
# Configure UPE C as a transit node of ring 1 in domain 2 and specify primary and secondary
ports on UPE C.
<UPEC> system-view
[UPEC] rrpp domain 2
[UPEC-rrpp-domain-region2] ring 1 node-mode transit primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPEC-rrpp-domain-region2] ring 1 enable
[UPEC-rrpp-domain-region2] quit
l Configure UPE D.
# Configure UPE D as the master node of ring 1 in domain 1. Configure GE 1/0/0 as the primary
port and GE 2/0/0 as the secondary port.
<UPED> system-view
[UPED] rrpp domain 1
[UPED-rrpp-domain-region1] ring 1 node-mode master primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPED-rrpp-domain-region1] ring 1 enable
[UPED-rrpp-domain-region1] quit
# Configure UPE D as the master node of ring 1 in domain 2. Configure GE 2/0/0 as the primary
port and GE 1/0/0 as the secondary port.
<UPED> system-view
[UPED] rrpp domain 2
[UPED-rrpp-domain-region2] ring 1 node-mode master primary-port GigabitEthernet
2/0/0 secondary-port GigabitEthernet 1/0/0 level 0
[UPED-rrpp-domain-region2] ring 1 enable
[UPED-rrpp-domain-region2] quit
# Configure UPE D as a transit node of ring 1 in domain 3 and specify primary and secondary
ports on UPE D.
<UPED> system-view
[UPED] rrpp domain 3
[UPED-rrpp-domain-region3] ring 1 node-mode transit primary-port GigabitEthernet
1/0/1 secondary-port GigabitEthernet 2/0/1 level 0
[UPED-rrpp-domain-region3] ring 1 enable
[UPED-rrpp-domain-region3] quit
l Configure UPE E.
# Configure UPE E as a transit node of ring 1 in domain 3 and specify primary and secondary
ports on UPE E.
<UPEE> system-view
[UPEE] rrpp domain 3
[UPEE-rrpp-domain-region3] ring 1 node-mode transit primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPEE-rrpp-domain-region3] ring 1 enable
[UPEE-rrpp-domain-region3] quit
l Configure UPE F.
# Configure UPE F as the master node of ring 1 in domain 3. Configure GE 1/0/0 as the primary
port and GE 2/0/0 as the secondary port.
<UPEF> system-view
[UPEF] rrpp domain 3
[UPEF-rrpp-domain-region3] ring 1 node-mode master primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
l Configure UPE G.
# Configure UPE G as a transit node of ring 1 in domain 3 and specify primary and secondary
ports on UPE G.
<UPEG> system-view
[UPEG] rrpp domain 3
[UPEG-rrpp-domain-region3] ring 1 node-mode transit primary-port GigabitEthernet
1/0/0 secondary-port GigabitEthernet 2/0/0 level 0
[UPEG-rrpp-domain-region3] ring 1 enable
[UPEG-rrpp-domain-region3] quit
l # Configure UPE B.
l Configure UPE C.
l Configure UPE D.
l Configure UPE E.
l Configure UPE F.
l Configure UPE G.
After the preceding configurations are complete and the network topology becomes stable,
perform the following operations to verify the configuration. Here, UPE D is taken for example.
l Run the display rrpp brief command on UPE D. The following information is displayed:
<UPED> display rrpp brief
Abbreviations for Switch Node Mode :
M - Master , T - Transit , E - Edge , A - Assistant-Edge
Domain Index : 1
Control VLAN : major 5 sub 6
Protected VLAN : Reference Instance 1
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 3 sec(default is 3 sec)
Ring Ring Node Primary Secondary/Edge Is
ID Level Mode Port Port Enabled
----------------------------------------------------------------------------
1 0 M GigabitEthernet1/0/0 GigabitEthernet2/0/0 Yes
Domain Index : 2
Control VLAN : major 10 sub 11
Protected VLAN : Reference Instance 2
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 3 sec(default is 3 sec)
Ring Ring Node Primary Secondary/Edge Is
ID Level Mode Port Port Enabled
----------------------------------------------------------------------------
1 0 M GigabitEthernet2/0/0 GigabitEthernet1/0/0 Yes
Domain Index : 3
Control VLAN : major 20 sub 21
Protected VLAN : Reference Instance 1 to 3
Hello Timer : 1 sec(default is 1 sec) Fail Timer : 3 sec(default is 3 sec)
Ring Ring Node Primary Secondary/Edge Is
ID Level Mode Port Port Enabled
----------------------------------------------------------------------------
1 0 T GigabitEthernet1/0/1 GigabitEthernet2/0/1 Yes
The preceding information shows that the RRPP protocol is enabled on UPE D.
In domain 1:
VLAN 1 is the control VLAN and VLANs mapping instance 1 are the protected VLANs.
UPE D is the master on ring 1; GE 1/0/0 is the primary port; GE 2/0/0 is the secondary port.
In domain 2:
VLAN 10 is the control VLAN and VLANs mapping instance 2 are the protected VLANs.
UPE D is the master node on ring 1. The primary port is GE 2/0/0, and the secondary port is GE
1/0/0.
In domain 3:
VLAN 20 is the control VLAN and VLANs mapping instance 1 to 3 are the protected VLANs.
UPE D is a transit node on ring 1. The primary port is GE 1/0/1, and the secondary port is GE
2/0/1.
l Run the display rrpp verbose domain command on UPE D. You can obtain the following
results:
# View detailed information about UPE D in domain 1.
RRPP Ring : 1
Ring Level : 0
Node Mode : Master
Ring State : Complete
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet1/0/0 Port status: UP
Secondary port : GigabitEthernet2/0/0 Port status: BLOCKED
The preceding information shows that VLAN 1 is the control VLAN in domain 1 and VLANs
mapping instance 1 are the protected VLANs.
RRPP Ring : 1
Ring Level : 0
Node Mode : Master
Ring State : Complete
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet2/0/0 Port status: UP
Secondary port : GigabitEthernet1/0/0 Port status: BLOCKED
The preceding information shows that VLAN 10 is the control VLAN in domain 2, and VLANs
mapping instance 2 are the protected VLANs.
RRPP Ring : 1
Ring Level : 0
Node Mode : Transit
Ring State : LinkUp
Is Enabled : Enable Is Active: Yes
Primary port : GigabitEthernet1/0/1 Port status: UP
Secondary port : GigabitEthernet2/0/1 Port status: UP
The preceding information shows that VLAN 20 is the control VLAN in domain 3 and VLANs
mapping instance 1 to 3 are the protected VLANs.
----End
Configuration Files
l Configuration file of UPE A
#
sysname UPEA
#
vlan batch 5 to 6 10 to 11 100 to 300
#
rrpp enable
#
stp region-configuration
instance 1 vlan 5 to 6 100 to 200
instance 2 vlan 10 to 11 201 to 300
active region-configuration
#
rrpp domain 1
control-vlan 5
protected-vlan reference-instance 1
ring 1 node-mode transit primary-port GigabitEthernet 1/0/0 secondary-port
GigabitEthernet 2/0/0 level 0
ring 1 enable
rrpp domain 2
control-vlan 10
protected-vlan reference-instance 2
ring 1 node-mode transit primary-port GigabitEthernet 1/0/0 secondary-port
GigabitEthernet 2/0/0 level 0
ring 1 enable
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 5 to 6 10 to 11 100 to 300
stp disable
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 5 to 6 10 to 11 100 to 300
stp disable
#
return
ring 1 enable
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 5 to 6 10 to 11 100 to 300
stp disable
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 5 to 6 10 to 11 100 to 300
stp disable
#
return
This document guides you through the configuration of the multicast service of the S9300.
5.5.1 Layer 2 Multicast Configuration
This chapter describes the procedures for configuring static Layer 2 multicast, multicast VLAN
replication, and IGMP snooping, and provides configuration examples.
5.5.2 IGMP Snooping Configuration
This chapter describes the procedure for configuring IGMP snooping and the commands for
maintaining IGMP snooping, and provides configuration examples.
5.5.3 IGMP Proxy Configuration
This chapter describes the procedure for configuring the IGMP proxy and the commands for
maintaining the IGMP proxy, and provides configuration examples.
5.5.4 IGMP Configuration
This chapter describes the procedure for configuring IGMP and commands for maintaining
IGMP, and provides configuration examples.
5.5.5 PIM-DM Configuration
This chapter describes the procedure for configuring PIM-DM on the IP network and the
commands for maintaining PIM-DM, and provides configuration examples.
5.5.6 PIM-SM Configuration
This chapter describes the procedure for configuring PIM-SM on the IP network and the
commands for maintaining PIM-SM, and provides configuration examples.
5.5.7 MSDP Configuration
This chapter describes the procedure for configuring MSDP and commands for maintaining
MSDP, and provides configuration examples.
5.5.8 Multicast Route Management
This chapter describes the principle of RPF, procedures for configuring multicast static routes
and forwarding policies, and commands for maintaining multicast static routes and forwarding
policies, and provides configuration examples.
Networking Requirements
As shown in Figure 5-106, GE 3/0/1 of the S9300 is connected to a router, and GE 1/0/1 of the
S9300 is connected to Host 3, Host 4, and Host 5. It is required that all the hosts in VLAN 3
should receive the multicast packets from the multicast group 225.0.0.1.
Figure 5-106 Networking diagram for configuring static Layer 2 multicast for a VLAN
IP/MPLS core
GE3/0/1
S9300
GE1/0/1
VLAN3
Configuration Roadmap
The configuration roadmap is as follows:
1. Create a VLAN.
2. Add interfaces to the VLAN.
3. Add interfaces to the multicast group statically.
Data Preparation
To complete the configuration, you need the following data:
l ID of the VLAN
l Type and number of each interface
l Address of the multicast group
Procedure
Step 1 Create a VLAN.
# Configure GE 1/0/1 on the S9300 to allow data frames from VLAN 3 to pass through.
[S9300] interface gigabitethernet 1/0/1
[S9300-GigabitEthernet1/0/1] port hybrid tagged vlan 3
[S9300-GigabitEthernet1/0/1] quit
# Configure GE 3/0/1 on the S9300 to allow data frames from VLAN 3 to pass through.
[S9300] interface gigabitethernet 3/0/1
[S9300-GigabitEthernet3/0/1] port hybrid tagged vlan 3
[S9300-GigabitEthernet3/0/1] quit
Run the display l2-multicast forwarding-table vlan command on the S9300. You can view
information about the outgoing interface of the multicast group 225.0.0.1.
<S9300> display l2-multicast forwarding-table vlan 3
VLAN ID : 3, Forwarding Mode : IP
-----------------------------------------------------------------------
(Source, Group) Interface Out-Vlan
-----------------------------------------------------------------------
(*, 225.0.0.1) GigabitEthernet1/0/1 3
-----------------------------------------------------------------------
Total Group(s) : 1
The preceding output shows that GE 1/0/1 is added to the multicast group 225.0.0.1.
----End
Configuration Files
l Configuration file of the S9300
#
sysname S9300
#
vlan batch 3
#
igmp-snooping enable
#
vlan 3
igmp-snooping enable
#
interface GigabitEthernet1/0/1
port hybrid tagged vlan 3
l2-multicast static-group group-address 225.0.0.1 vlan 3
#
interface GigabitEthernet3/0/1
port hybrid tagged vlan 3
#
return
Networking Requirements
As shown in Figure 5-107, GE 3/0/1 of the S9300 is connected to a router, and is added to VLAN
3. GE 1/0/2 and GE 1/0/3 of the S9300 are connected to hosts, and are respectively added to
VLAN 100 and VLAN 200. It is required that the four hosts connected to the S9300 should
receive the multicast flow from the multicast groups 225.0.0.1 to 225.0.0.3. VLAN 3 is the
multicast VLAN; VLAN 100 and VLAN 200 are user VLANs.
Figure 5-107 Networking diagram for configuring multicast VLAN replication on the S9300
IP/MPLS core
VLAN3 GE3/0/1
S9300
GE1/0/2 GE1/0/3
VLAN100 VLAN200
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l Interface connected to the router and the VLAN that the interface belongs to
l Interfaces connected to hosts and the VLANs that the interfaces belong to
l IP address of the multicast group in entries of the static multicast VLAN
Procedure
Step 1 Create a multicast VLAN.
<S9300> system-view
[S9300] igmp-snooping enable
[S9300] vlan 3
[S9300-vlan3] igmp-snooping enable
[S9300-vlan3] multicast-vlan enable
[S9300-vlan3] quit
Step 3 Configure the mapping between the multicast VLAN and the user VLANs.
[S9300] vlan 3
[S9300-vlan3] multicast-vlan user-vlan 100 200
[S9300-vlan3] quit
Step 4 Configure the VLAN that the interfaces of the S9300 belong to and static multicast entries.
# Allow packets from VLAN 3 to pass through GE 3/0/1.
[S9300] interface gigabitethernet 3/0/1
[S9300-GigabitEthernet3/0/1] port hybrid tagged vlan 3
[S9300-GigabitEthernet3/0/1] quit
# Add GE 1/0/2 to VLAN 100 and add the interface to the multicast groups.
[S9300] interface gigabitethernet 1/0/2
[S9300-GigabitEthernet1/0/2] port hybrid tagged vlan 100
[S9300-GigabitEthernet1/0/2] l2-multicast static-group group-address 225.0.0.1
vlan 100
[S9300-GigabitEthernet1/0/2] l2-multicast static-group group-address 225.0.0.2
vlan 100
[S9300-GigabitEthernet1/0/2] l2-multicast static-group group-address 225.0.0.3
vlan 100
[S9300-GigabitEthernet1/0/2] quit
# Add GE 1/0/3 to VLAN 200 and add the interface to the multicast groups.
[S9300] interface gigabitethernet 1/0/3
[S9300-GigabitEthernet1/0/3] port hybrid tagged vlan 200
[S9300-GigabitEthernet1/0/3] l2-multicast static-group group-address 225.0.0.1
vlan 200
[S9300-GigabitEthernet1/0/3] l2-multicast static-group group-address 225.0.0.2
vlan 200
[S9300-GigabitEthernet1/0/3] l2-multicast static-group group-address 225.0.0.3
vlan 200
[S9300-GigabitEthernet1/0/3] quit
(*, 225.0.0.2) Ok No 1 1
(*, 225.0.0.3) Ok No 2 1
--------------------------------------------------------------------
Total Entry(s) : 3
----End
Configuration Files
l Configuration file of the S9300
#
sysname S9300
#
vlan batch 3 100 200
#
igmp-snooping enable
#
vlan 3
igmp-snooping enable
multicast-vlan enable
multicast-vlan user-vlan 100 200
vlan 100
igmp-snooping enable
vlan 200
igmp-snooping enable
#
interface GigabitEthernet1/0/2
port hybrid tagged vlan 100
l2-multicast static-group group-address 225.0.0.1 vlan 100
l2-multicast static-group group-address 225.0.0.2 vlan 100
l2-multicast static-group group-address 225.0.0.3 vlan 100
#
interface GigabitEthernet1/0/3
port hybrid tagged vlan 200
l2-multicast static-group group-address 225.0.0.1 vlan 200
l2-multicast static-group group-address 225.0.0.2 vlan 200
l2-multicast static-group group-address 225.0.0.3 vlan 200
#
interface GigabitEthernet3/0/1
port hybrid tagged vlan 3
#
return
Networking Requirements
As shown in Figure 5-108, GE 3/0/1 of the S9300 is connected to a router on the multicast
source side, and GE 1/0/1 is connected to hosts. You are required to configure IGMP snooping
to ensure that three hosts in VLAN 3 can receive multicast data from multicast groups in the
range of 225.1.1.1 to 225.1.1.3 permanently.
IP/MPLS core
GE3/0/1
S9300
GE1/0/1
VLAN3
Configuration Roadmap
The configuration roadmap is as follows:
1. Create a VLAN and add interfaces to the VLAN.
2. Enable IGMP snooping globally and in the VLAN.
3. Configure a static router interface.
4. Configure static multicast groups 225.1.1.1, 225.1.1.2, and 225.1.1.3.
Data Preparation
To complete the configuration, you need the following data:
l ID of the VLAN that GE 1/0/1 and GE 3/0/1 belong to: VLAN 3
l Static router interface: GE 3/0/1
l Addresses of static multicast groups: 225.1.1.1, 225.1.1.2, 225.1.1.3
Procedure
Step 1 Create a VLAN and add interfaces to the VLAN.
<S9300> system-view
[S9300] vlan 3
[S9300-vlan3] quit
[S9300] interface gigabitethernet 3/0/1
[S9300-GigabitEthernet3/0/1] port hybrid tagged vlan 10
[S9300-GigabitEthernet3/0/1] quit
[S9300] interface gigabitethernet 1/0/1
[S9300-GigabitEthernet1/0/1] port hybrid tagged vlan 10
[S9300-GigabitEthernet1/0/1] quit
According to the preceding information, the IGMP snooping of the VLAN is enabled.
# Check the configuration of the static router interface.
Run the display igmp-snooping router-port vlan 3 command on the S9300.
<S9300> display igmp-snooping router-port vlan 3
Port Name UpTime Expires Flags
---------------------------------------------------------------------
VLAN 3, 1 router-port(s)
GE3/0/1 2d:10h 00:01:02 STATIC
According to the preceding information, multicast groups 225.1.1.1 to 225.1.1.3 are configured
with static forwarding entries.
The preceding information shows the VLAN ID and outgoing interface mapping the data from
multicast groups 225.1.1.1 to 225.1.1.3.
----End
Configuration Files
l Configuration file of the S9300
#
sysname S9300
#
vlan batch 3
#
igmp-snooping enable
#
vlan 3
igmp-snooping enable
#
interface GigabitEthernet1/0/1
port hybrid tagged vlan 3
l2-multicast static-group group-address 225.1.1.1 vlan 3
l2-multicast static-group group-address 225.1.1.2 vlan 3
l2-multicast static-group group-address 225.1.1.3 vlan 3
#
interface GigabitEthernet3/0/1
port hybrid tagged vlan 3
igmp-snooping static-router-port vlan 3
#
return
Networking Requirements
As shown in Figure 5-109, the S9300 is connected to a router and multiple hosts. IGMP runs
on the router. The S9300 should send multicast packets to each host steadily for a long time. In
this case, you can configure a static router interface.
DHCP server
IP/MPLS core
GE3/0/1
S9300
GE1/0/2
GE1/0/3
VLAN100
Host1 Host2
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLAN 100 and add GE 1/0/2, GE 1/0/3, and GE 3/0/1 to VLAN 100.
2. Enable IGMP proxy globally.
3. Configure GE 3/0/1 as a static router interface in VLAN 100.
4. Enable IGMP proxy for VLAN 100.
Data Preparation
To complete the configuration, you need the following data:
l Sstatic router interface: GE 3/0/1
l VLAN that Host1 and Host2 belong to: VLAN 100
Procedure
Step 1 Configure VLAN 100.
# Create VLAN 100.
<S9300> system-view
[S9300] vlan 100
[S9300] quit
# Add GE 1/0/2, GE 1/0/3, and GE 3/0/1 to VLAN 100. The configurations of GE 1/0/3 and GE
3/0/1 are similar to the configuration of GE 1/0/2, and are not mentioned here.
[S9300] interface gigabitethernet 1/0/2
[S9300-GigabitEthernet1/0/2] port hybrid tagged vlan 100
[S9300-GigabitEthernet1/0/2] quit
----End
Configuration Files
l Configuration file of the S9300
#
sysname S9300
#
igmp-proxy enable
#
vlan batch 100
#
vlan 100
igmp-proxy enable
#
interface GigabitEthernet1/0/2
port hybrid tagged vlan 100
#
interface GigabitEthernet1/0/3
port hybrid tagged vlan 100
#
interface GigabitEthernet3/0/1
port hybrid tagged vlan 100
igmp-proxy static-router-port vlan 100
#
return
Networking Requirements
As shown in Figure 5-110, three hosts are all in VLAN3. You are required to configure data to
ensure that the three hosts cannot receive data from multicast group 225.0.0.10.
DHCP server
Multicast source
IP/MPLS core
GE3/0/1
S9300
GE1/0/5
VLAN3
Configuration Roadmap
The configuration roadmap is as follows:
1. Create a VLAN and add interfaces to the VLAN.
2. Enable IGMP proxy globally and in the VLAN.
3. Configure a multicast group policy the VLAN.
Data Preparation
To complete the configuration, you need the following data:
l VLAN that Host3, Host4, and Host5 belong to: VLAN 3
l Address of multicast groups that Host3, Host4, and Host5 can join: 225.0.0.10
Procedure
Step 1 Create a VLAN and add interfaces to the VLAN.
# Create VLAN 3.
<S9300> system-view
[S9300] vlan 3
[S9300] quit
According to the preceding information, no information about the outgoing interface of multicast
group 225.0.0.10 is displayed. It indicates that GE 1/0/5 does not join the multicast group
225.0.0.10.
----End
Configuration Files
l Configuration file of the S9300
#
sysname S9300
#
igmp-proxy enable
#
vlan batch 3
#
vlan 3
igmp-proxy enable
igmp-proxy group-policy 2000
#
acl number 2000
rule 5 deny source 225.0.0.10 0
#
interface GigabitEthernet1/0/5
port hybrid tagged vlan 3
#
interface GigabitEthernet3/0/1
port hybrid tagged vlan 3
#
return
Networking Requirements
As shown in Figure 5-111, GE 1/0/3 and GE 1/0/4 of the S9300 are connected to only one host
respectively. Other hosts connected to the two interfaces do not need to receive multicast packets.
Therefore, when receiving IGMP Leave messages from the two interfaces, the S9300 deletes
the forwarding entries of the multicast group that the hosts leave, without waiting for the timeout
of the aging timer. This saves the bandwidth and system resources.
Figure 5-111 Networking diagram for configuring prompt leave for interfaces in a VLAN
IP/MPLS core
VLAN3 GE3/0/1
S9300
GE1/0/3 GE1/0/4
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l ID of the VLAN where prompt leave is enabled: 3
Procedure
Step 1 Create a VLAN and add interfaces to the VLAN.
# Add GE 1/0/3, GE 1/0/4, and GE 3/0/1 to VLAN3. The configurations of GE 1/0/4 and GE
3/0/1 are similar to the configuration of GE 1/0/3, and are not mentioned here.
[S9300] interface gigabitethernet 1/0/3
[S9300-GigabitEthernet1/0/3] port hybrid tagged vlan 3
[S9300-GigabitEthernet1/0/3] quit
According to the preceding information, "IGMP Prompt Leave Enable" indicates that the
configuration of prompt leave for interface in VLAN 3 succeeds.
----End
Configuration Files
l Configuration file of the S9300
#
sysname S9300
#
igmp-proxy enable
#
vlan batch 3
#
vlan 3
igmp-proxy enable
igmp-proxy prompt-leave
#
interface GigabitEthernet1/0/3
port hybrid tagged vlan 3
#
interface GigabitEthernet1/0/4
port hybrid tagged vlan 3
#
interface GigabitEthernet3/0/1
port hybrid tagged vlan 3
#
return
Networking Requirements
On the network as shown in Figure 5-112, GE 3/0/1 of the S9300 is connected to a multicast
router. GE 1/0/1, GE 1/0/2, and GE 1/0/3 are connected to hosts. You are required to configure
IGMP proxy on the S9300 to ensure that:
l Two hosts in VLAN 100 can receive multicast data continuously for a long time.
l Two hosts in VLAN 200 do not receive multicast data from the multicast group 225.0.0.10.
l Only the host Host 5 in VLAN 300 receives multicast data and is required to release
bandwidth and system resources rapidly.
IP/MPLS core
GE3/0/1
S9300
GE1/0/1 GE1/0/3
GE1/0/2
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs and add interfaces to the VLANs.
2. Enable IGMP proxy globally and in the multicast VLAN.
3. Enable multicast VLAN replication.
4. Configure a static router interface.
5. Configure a multicast group policy for VLAN 200.
6. Configure prompt leave for interfaces in VLAN 300.
Data Preparation
To complete the configuration, you need the following data:
l Number of each interface and ID of the VLAN that each interface belongs to
l Static router interface: GE 3/0/1
l IP address of the multicast group that hosts in VLAN 200 cannot join: 225.0.0.10
Procedure
Step 1 Create VLANs and add interfaces to the VLANs.
<S9300> system-view
[S9300] vlan batch 10 100 200 300
[S9300] interface gigabitethernet 3/0/1
[S9300-GigabitEthernet3/0/1] port hybrid tagged vlan 10
[S9300-GigabitEthernet3/0/1] quit
[S9300] interface gigabiethernet 1/0/1
[S9300-GigabitEthernet1/0/1] port hybrid tagged vlan 100
[S9300-GigabitEthernet1/0/1] quit
[S9300] interface gigabiethernet 1/0/2
[S9300-GigabitEthernet1/0/2] port hybrid tagged vlan 200
[S9300-GigabitEthernet1/0/2] quit
[S9300] interface gigabiethernet 1/0/3
[S9300-GigabitEthernet1/0/3] port hybrid tagged vlan 300
[S9300-GigabitEthernet1/0/3] quit
Step 3 Enable multicast VLAN replication. VLAN 10 is a multicast VLAN, and VLAN 100, VLAN
200, and VLAN 300 are user VLANs.
[S9300] vlan 10
[S9300-vlan10] multicast-vlan enable
[S9300-vlan10] multicast-vlan user-vlan 100 200 300
[S9300-vlan10] quit
Step 5 Configure a multicast group policy in VLAN 200 to prohibit hosts from joining the multicast
group 225.0.0.10.
Create an ACL.
[S9300] acl 2008
[S9300-acl-basic-2008] rule deny source 225.0.0.10 0
[S9300-acl-basic-2008] quit
According to the preceding information, VLAN 10 is the multicast VLAN and the corresponding
user VLANs are VLAN 100, VLAN 200, and VLAN 300.
# Check the configuration of the static router interface.
According to the preceding information, no information about the outgoing interface of multicast
group 225.0.0.10 is displayed. It indicates that GE 1/0/5 does not join the multicast group
225.0.0.10.
----End
Configuration Files
l Configuration file of the S9300
#
sysname S9300
#
vlan batch 10 100 200 300
#
igmp-proxy enable
#
vlan 10
igmp-proxy enable
multicast-vlan enable
multicast-vlan user-vlan 100 200 300
#
vlan 100
igmp-proxy enable
#
vlan 200
igmp-proxy enable
igmp-proxy group-policy 2008
#
vlan 300
igmp-proxy enable
igmp-proxy prompt-leave
#
acl number 2008
rule 5 deny source 225.0.0.10 0
#
interface GigabitEthernet1/0/1
port hybrid tagged vlan 100
#
interface GigabitEthernet1/0/2
port hybrid tagged vlan 200
#
interface GigabitEthernet1/0/3
port hybrid tagged vlan 300
#
interface GigabitEthernet3/0/1
Networking Requirements
On the network as shown in Figure 5-113, the unicast routing function is normal. You are
required to implement multicast on the network to enable hosts to receive the Video On Demand
(VOD) information.
When the hosts connected to a certain interface need to receive a popular program for a long
time, you can add the interface to a multicast group statically. As shown in the following figure,
if HostA needs to receive the multicast data from the multicast group 225.1.1.1 for a long time,
you need to add GE 1/0/0 on the S9300-A to the multicast group 225.1.1.1 statically.
Ethernet
HostA
S9300-A
Receiver
GE2/0/0 GE1/0/0 N1
HostB
S9300-B
GE1/0/0 Leaf network
GE2/0/0
Ethernet
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
This configuration example describes only the commands used to configure IGMP.
Procedure
Step 1 Configure the IP addresses of interfaces and the unicast routing protocol on each S9300.
Configure the IP address and mask of each interface according to Figure 5-113. Configure OSPF
to ensure the communication between S9300-A, S9300-B, and S9300-C on the network layer,
and to ensure the dynamic update through the unicast routing protocol.
# Enable multicast on S9300-A and enable PIM-SM on all interfaces. The configurations of
S9300-B and S9300-C are similar to the configuration of S9300-A, and are not mentioned here.
[S9300-A] multicast routing-enable
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] pim sm
[S9300-A-Vlanif10] quit
[S9300-A] interface vlanif 11
[S9300-A-Vlanif11] pim sm
[S9300-A-Vlanif11] quit
# Enable IGMP on VLANIF 10 on S9300-A and configure the IGMP version as IGMPv2. The
configurations of S9300-B and S9300-C are similar to the configuration of S9300-A, and are
not mentioned here.
NOTE
By default, IGMPv2 is used and you do not need to set the IGMP version here. To use other IGMP versions,
run the igmp version command to set the version.
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] igmp enable
Step 4 Add VLANIF 10 on S9300-A to the multicast group 225.1.1.1 statically. In this manner, the
hosts connected to VLANIF 10 can steadily receive the multicast data sent to the multicast group
225.1.1.1.
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] igmp static-group 225.1.1.1
# Run the display igmp routing-table command on S9300-A. You can check whether VLANIF
10 is added to the multicast group 225.1.1.1 statically. If the (*, 225.1.1.1) entry exists on
S9300-A, the downstream interface is VLANIF 10, and the protocol type is STATIC, you can
infer that VLANIF 10 is added to the multicast group 225.1.1.1 statically.
<S9300-A> display igmp routing-table
Routing table of VPN-Instance: public net
Total 1 entry
00001. (*, 225.1.1.1)
List of 1 downstream interface
Vlanif10 (10.110.1.1),
Protocol: STATIC
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10 11
#
multicast routing-enable
#
interface vlanif 10
ip address 10.110.1.1 255.255.255.0
pim sm
igmp enable
igmp static-group 225.1.1.1
#
interface vlanif 11
ip address 192.168.1.1 255.255.255.0
pim sm
#
interface gigabitethernet 1/0/0
port hybrid tagged vlan 10
#
Networking Requirements
On the multicast network as shown in Figure 5-114, PIM-SM is run and ASM and SSM models
are used to provide multicast services. IGMPv3 is run on the interface on the S9300 connected
to the Receiver. The IGMP version on the Receiver is IGMPv2 and cannot be upgraded to
IGMPv3.
The range of SSM group addresses on the current network is 232.1.1.0/24. S1, S2, and S3 send
multicast data to the multicast group whose IP address is in this range. The Receiver receives
the multicast data only from S1 and S3.
GE2/0/0 GE2/0/0
PIM-SM
S1 Receiver
133.133.1.1/24 GE2/0/0 GE2/0/0 133.133.4.1/24
GE1/0/0 GE1/0/0
GE3/0/0 GE3/0/0
S9300-A
S9300-D
Configuration Roadmap
The configuration roadmap is as follows:
2. Set the range of SSM group addresses on all the S9300s in the PIM-SM domain.
3. Configure the static SSM mapping rules on the S9300s where SSM mapping is enabled.
Data Preparation
To complete the configuration, you need the following data:
This configuration example describes only the commands used to configure SSM mapping.
Procedure
Step 1 Create VLANs and add interfaces to the VLANs.
Step 2 Configure the IP address of each VLANIF and the unicast routing protocol according to Figure
5-114.
Step 3 Enable IGMP and SSM mapping on the interfaces connected to hosts.
[S9300-D] multicast routing-enable
[S9300-D] interface vlanif 10
[S9300-D-Vlanif10] igmp enable
[S9300-D-Vlanif10] igmp version 3
[S9300-D-Vlanif10] igmp ssm-mapping enable
[S9300-D-Vlanif10] quit
# Set the range of SSM group addresses to 232.1.1.0/24 on all S9300s. The configurations of
S9300-B, S9300-C, and S9300-D are similar to configuration of S9300-A, and are not mentioned
here.
[S9300-A] acl number 2000
[S9300-A-acl-basic-2000] rule permit source 232.1.1.0 0.0.0.255
[S9300-A-acl-basic-2000] quit
[S9300-A] pim
[S9300-A-pim] ssm-policy 2000
Step 5 Configure static SSM mapping rules on the S9300s connected to hosts.
# Map the multicast group in the range of 232.1.1.0/24 to Source 1 and Source 3.
[S9300-D] igmp
[S9300-D-igmp] ssm-mapping 232.1.1.0 24 133.133.1.1
[S9300-D-igmp] ssm-mapping 232.1.1.0 24 133.133.3.1
# Check the information about SSM mapping of specific sources and group addresses on S9300s.
<S9300-D> display igmp ssm-mapping group
IGMP SSM-Mapping conversion table of VPN-Instance: public net
Total 2 entries
Total 2 entries matched
00001. (133.133.1.1, 232.1.1.0)
00002. (133.133.3.1, 232.1.1.0)
# Run the display igmp group ssm-mapping command to view the information about the
specific sources or group addresses on the S9300s. Take the information about the specific source
or group address on S9300-D for example:
<S9300-D> display igmp group ssm-mapping
IGMP SSM mapping interface group report information of VPN-Instance: public net
Vlanif10 (133.133.4.2):
Total 1 IGMP SSM-Mapping Group reported
Group Address Last Reporter Uptime Expires
232.1.1.1 133.133.4.1 00:01:44 00:00:26
# Run the display pim routing-table command to view the PIM-SM multicast routing table on
an S9300. Take the information displayed on S9300-D for example:
<S9300-D> display pim routing-table
VPN-Instance: public net
Total 0 (*, G) entry; 2 (S, G) entries
(133.133.1.1, 232.1.1.1)
RP: 192.168.3.2
Protocol: pim-sm, Flag:
UpTime: 00:11:25
Upstream interface: Vlanif30
Upstream neighbor: 192.168.4.2
RPF prime neighbor: 192.168.4.2
Downstream interface(s) information:
Total number of downstreams: 1
1: Vlanif13
Protocol: igmp, UpTime: 00:11:25, Expires:-
(133.133.3.1, 232.1.1.1)
RP: 192.168.3.2
Protocol: pim-sm, Flag:
UpTime: 00:11:25
Upstream interface: Vlanif21
Upstream neighbor: 192.168.3.1
RPF prime neighbor: 192.168.3.1
Downstream interface(s) information:
Total number of downstreams: 1
1: Vlanif13
Protocol: igmp, UpTime: 00:11:25, Expires:-
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10 20 30
#
multicast routing-enable
#
acl number 2000
rule 5 permit source 232.1.1.0 0.0.0.255
#
interface vlanif 10
ip address 133.133.1.2 255.255.255.0
pim sm
#
interface vlanif 20
ip address 192.168.1.1 255.255.255.0
pim sm
#
interface vlanif 30
ip address 192.168.4.2 255.255.255.0
pim sm
#
interface GigabitEthernet1/0/0
port hybrid untagged vlan 10
#
interface GigabitEthernet2/0/0
port hybrid tagged vlan 20
#
interface GigabitEthernet3/0/0
port hybrid tagged vlan 30
#
ospf 1
area 0.0.0.0
network 133.133.1.0 0.0.0.255
network 192.168.1.0 0.0.0.255
network 192.168.4.0 0.0.0.255
#
pim
ssm-policy 2000
#
return
l Configuration file of S9300-B
#
sysname S9300-B
#
vlan batch 11 20 31
#
multicast routing-enable
#
acl number 2000
rule 5 permit source 232.1.1.0 0.0.0.255
#
interface vlanif 11
ip address 133.133.2.2 255.255.255.0
pim sm
#
interface vlanif 20
ip address 192.168.1.2 255.255.255.0
pim sm
#
interface vlanif 31
ip address 192.168.2.1 255.255.255.0
pim sm
#
interface GigabitEthernet1/0/0
port hybrid untagged vlan 11
#
interface GigabitEthernet2/0/0
port hybrid tagged vlan 20
#
interface GigabitEthernet3/0/0
port hybrid tagged vlan 31
#
ospf 1
area 0.0.0.0
#
interface vlanif 30
ip address 192.168.4.1 255.255.255.0
pim sm
#
interface GigabitEthernet1/0/0
port hybrid untagged vlan 13
#
interface GigabitEthernet2/0/0
port hybrid tagged vlan 21
#
interface GigabitEthernet3/0/0
port hybrid tagged vlan 30
#
pim
c-bsr vlanif30
c-rp vlanif30
ssm-policy 2000
#
acl number 2000
rule 5 permit source 232.1.1.0 0.0.0.255
#
igmp
ssm-mapping 232.1.1.0 255.255.255.0 133.133.1.1
ssm-mapping 232.1.1.0 255.255.255.0 133.133.3.1
#
return
Networking Requirements
On the experiment network shown in Figure 5-115, multicast is deployed. The unicast routes
work normally. The S9300s on the network need to be configured properly so that hosts can
receive the VOD information in multicast mode.
S9300-A Ethernet
Receiver
GE2/0/0
Ethernet HostA
GE1/0/0 N1
PIM-DM
Source GE3/0/0 Leaf network
GE4/0/0
GE1/0/0 GE2/0/0
S9300-D
GE1/0/0 N2
GE2/0/0 S9300-B
GE1/0/0 Receiver
HostB
GE2/0/0
Ethernet
S9300-C
Configuration Roadmap
In a small-scale experiment network, PIM-DM is adopted to configure multicast. Enable PIM
silent on the VLANIF interfaces of S9300-A to protect S9300-A from Hello message attacks.
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
This configuration example describes only the commands used to configure PIM-DM.
Procedure
Step 1 Enable multicast on all S9300s and enable PIM-DM on all interfaces.
# Enable multicast on S9300-A and enable PIM-DM on each interface. The configurations of
S9300-B, S9300-C, and S9300-D are similar to the configuration of S9300-A, and are not
mentioned here.
[S9300-A] multicast routing-enable
[S9300-A] interface vlanif 100
[S9300-A-Vlanif100] pim dm
[S9300-A-Vlanif100] quit
[S9300-A] interface vlanif 101
[S9300-A-Vlanif101] pim dm
[S9300-A-Vlanif101] quit
Step 2 Configure the interfaces connected to hosts to be PIM silent and configure IGMP on the interface.
# On S9300-A, configure the vlanif interfaces connected to hosts to be PIM silent, and configure
IGMP on the interface. The configurations of S9300-B, S9300-C, and S9300-D are similar to
configuration of S9300-A, and are not mentioned here.
[S9300-A] interface vlanif 101
[S9300-A-Vlanif101] pim slient
[S9300-A-Vlanif101] igmp enable
[S9300-A-Vlanif101] quit
# Run the display pim neighbor command to check the PIM neighbor relation between the
S9300s. The display of the PIM neighbor relation S9300-D is as follows:
<S9300-D> display pim neighbor
VPN-Instance: public net
Total Number of Neighbors = 3
# Run the display pim routing-table command to view the PIM multicast routing table on the
S9300. Assume that HostA needs to receive the information about multicast group G
225.1.1.1/24. When sending multicast packets to multicast group G, multicast source S
10.110.5.100/24 generates an SPT through flooding and the (S, G) entries exist on S9300-A and
S9300-D that are in the SPT. When HostA joins multicast group G, an (*, G) entry is generated
on S9300-A. The information displayed on S9300-B and S9300-C is similar to the information
displayed on S9300-A. The displayed information is as follows:
<S9300-A> display pim routing-table
VPN-Instance: public net
(*, 225.1.1.1)
Protocol: pim-dm, Flag: WC
UpTime: 03:54:19
Upstream interface: NULL
Upstream neighbor: NULL
RPF prime neighbor: NULL
Downstream interface(s) information:
Total number of downstreams: 1
1: Vlanif101
Protocol: igmp, UpTime: 01:38:19, Expires: never
(10.110.5.100, 225.1.1.1)
Protocol: pim-dm, Flag: ACT
UpTime: 00:00:44
Upstream interface: Vlanif100
Upstream neighbor: 192.168.1.2
RPF prime neighbor: 192.168.1.2
Downstream interface(s) information:
Total number of downstreams: 1
1: Vlanif101
Protocol: pim-dm, UpTime: 00:00:44, Expires: never
(10.110.5.100, 225.1.1.1)
Protocol: pim-dm, Flag: LOC ACT
UpTime: 01:35:25
Upstream interface: Vlanif103
Upstream neighbor: NULL
RPF prime neighbor: NULL
Downstream interface(s) information:
Total number of downstreams: 2
1: Vlanif100
Protocol: pim-dm, UpTime: 00:03:27, Expires: never
2: Vlanif200
Protocol: pim-dm, UpTime: 00:03:27, Expires: never
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
multicast routing-enable
#
vlan batch 100 101
#
interface vlanif 100
ip address 192.168.1.1 255.255.255.0
pim dm
#
interface vlanif 101
ip address 10.110.1.1 255.255.255.0
pim dm
pim silent
igmp enable
#
interface GigabitEthernet1/0/0
port hybrid tagged vlanif 100
#
interface GigabitEthernet2/0/0
Networking Requirements
As shown in Figure 5-116, multicast is deployed on the network of an Internet Service Provider
(ISP). The Interior Gateway Protocol (IGP) is deployed on the network. The unicast routing
routes work normally and are connected to the Internet. The routers on the network need to be
configured properly so that hosts can receive the video on demand (VOD) in multicast mode.
N2
GE1/0/0
Ethernet
S9300-C
Configuration Roadmap
The ISP network connects to the Internet. The PIM-SM protocol is used to configure the
multicast function, which facilitates service expansion. The ASM and SSM models provide
multicast services. The configuration roadmap is as follows:
1. Configure the IP addresses of interfaces and the unicast routing protocol. PIM is an intra-
domain multicast routing protocol that depends on a unicast routing protocol. The multicast
routing protocol can work normally after the unicast routing protocol works normally.
2. Enable multicast on all S9300s providing multicast services. Before configuring other PIM-
SM functions, you must enable the multicast function.
3. Enable PIM-SM on all the interfaces of S9300s. After PIM-SM is enabled, you can
configure other PIM-SM functions.
NOTE
If IGMP is also required on this interface, PIM-SM must be enabled before IGMP is enabled. The
configuration order cannot be reversed; otherwise, the configuration of PIM fails.
4. Enable IGMP on the interfaces of S9300s connected to hosts. A receiver can join and leave
a multicast group freely by sending an IGMP message. The leaf S9300s maintain the
multicast membership through IGMP.
5. Enable the PIM silent function on interface that is directly connected to hosts. In this
manner, malicious hosts are prevented from simulating PIM Hello messages and security
of multicast routers is ensured.
NOTE
PIM silent is applicable only to the interfaces of an S9300 directly connected to the host network
segment that is connected only to this S9300.
6. Configure the RP. The RP is a root node of an RPT on the PIM-SM network. It is
recommended that you configure the RP on a device that has more multicast flows, for
example, S9300-E in Figure 5-116.
NOTE
l After creating an (*, G) entry according to the new multicast membership, the DR on the user
side sends Join/Prune messages towards the RP and updates the shared tree on the path.
l When a multicast data source starts to send data to groups, the DR unicasts the Register message
to the RP. After receiving the Register message, the RP decapsulates it and then forwards it to
other multicast members along the shared tree. At the same time, the RP sends a Register-Stop
message to the DR on the multicast source side. After the Register-Stop is performed, the RPT
can be switched to the SPT.
7. (Optional) Set the BSR boundary on the interfaces connected to the Internet. The Bootstrap
message cannot pass through the BSR boundary; therefore, the BSR serves only this PIM-
SM domain. In this manner, multicast services can be controlled effectively.
8. (Optional) Configure range of SSM group addresses on each S9300. Ensure that S9300s
in the PIM-SM domain provide services only for multicast groups in the range of SSM
group addresses. In this manner, multicast can be controlled effectively.
NOTE
This configuration example describes only the commands used to configure PIM-SM.
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Configure the IP address of each interface and the unicast routing protocol.
# Configure IP addresses and masks of interfaces on the S9300s according to Figure 5-116.
Configure OSPF between S9300s to ensure that the S9300s can communicate at the network
layer and update routes through the unicast routing protocol.
The RP can be configured in two modes: the static RP and the dynamic RP. The static RP can be configured
together with the dynamic RP. You can also configure only the static RP or the dynamic RP. When the
static RP and the dynamic RP are configured simultaneously, you can change the parameter values to
specify which RP is preferred.
This example shows how to configure the static RP and the dynamic RP and to specify the
dynamic RP as the preferred RP and the static RP as the standby RP.
# Configure the dynamic RP on one or more S9300s in the PIM-SM domain. In this example,
set the service range of the RP and specify the locations of the C-BSR and the C-RP on S9300-
E.
[S9300-E] acl number 2008
[S9300-E-acl-basic-2008] rule permit source 225.1.1.0 0.0.0.255
[S9300-E-acl-basic-2008] quit
[S9300-E] pim
[S9300-E-pim] c-bsr vlanif 100
[S9300-E-pim] c-rp vlanif 100 group-policy 2008 priority 0
# Configure static RPs on all S9300s. The configurations of S9300-B, S9300-C, S9300-D, and
S9300-E are similar to configuration on S9300-A, and are not mentioned here.
NOTE
If you enter preferred to the right of static-rp X.X.X.X, the static RP is selected as the RP in the PIM-SM
domain.
[S9300-A] pim
[S9300-A-pim] static-rp 192.168.2.2
Step 6 Configure the BSR boundary on the interface connecting S9300-D to the Internet.
[S9300-D] interface vlanif 104
[S9300-D-Vlanif104] pim bsr-boundary
[S9300-D-Vlanif104] quit
# Run the display pim bsr-info command to view information about BSR election on the
S9300s. For example, the BSR information on S9300-A and S9300-E (including the C-BSR
information on S9300-E) is as follows:
<S9300-A> display pim bsr-info
VPN-Instance: public net
Elected AdminScoped BSR Count: 0
Elected BSR Address: 192.168.9.2
Priority: 0
Hash mask length: 30
State: Accept Preferred
Scope: Not scoped
Uptime: 01:40:40
Expires: 00:01:42
C-RP Count: 1
# Run the display pim rp-info command to view the RP information on the S9300s. For example,
the RP information displayed on S9300-A is as follows:
# Run the display pim routing-table command. You can view the PIM multicast routing table.
Host A needs to receive the information from group 225.1.1.1/24, and HostB needs to receive
the information sent by the source 10.110.5.100/24 to the group 232.1.1.1/24. The displayed
information is as follows:
<S9300-A> display pim routing-table
VPN-Instance: public net
Total 1 (*, G) entry; 1 (S, G) entry
(*, 225.1.1.1)
RP: 192.168.9.2
Protocol: pim-sm, Flag: WC
UpTime: 00:13:46
Upstream interface: vlanif100,
Upstream neighbor: 192.168.9.2
RPF neighbor: 192.168.9.2
Downstream interface(s) information:
Total number of downstreams: 1
1: vlanif101
Protocol: igmp, UpTime: 00:13:46, Expires:-
(10.110.5.100, 225.1.1.1)
RP: 192.168.9.2
Protocol: pim-sm, Flag: SPT ACT
UpTime: 00:00:42
Upstream interface: vlanif200
Upstream neighbor: 192.168.1.2
RPF neighbor: 192.168.1.2
Downstream interface(s) information:
Total number of downstreams: 1
1: vlanif101
Protocol: pim-sm, UpTime: 00:00:42, Expires:-
(10.110.5.100, 225.1.1.1)
RP: 192.168.9.2
Protocol: pim-sm, Flag: SPT ACT
UpTime: 00:00:42
Upstream interface: vlanif103
Upstream neighbor: 10.110.5.100
RPF neighbor: 10.110.5.100
Downstream interface(s) information:
Total number of downstreams: 1
1: vlanif200
Protocol: pim-sm, UpTime: 00:00:42, Expires:-
(10.110.5.100, 232.1.1.1)
Protocol: pim-ssm, Flag:
UpTime: 00:01:20
Upstream interface: vlanif103
Upstream neighbor: 10.110.5.100
RPF neighbor: 10.110.5.100
Downstream interface(s) information:
Total number of downstreams: 1
1: vlanif500
(*, 225.1.1.1)
RP: 192.168.9.2 (local)
Protocol: pim-sm, Flag: WC
UpTime: 00:13:16
Upstream interface: Register
Upstream neighbor: 192.168.4.2
RPF neighbor: 192.168.4.2
Downstream interface(s) information:
Total number of downstreams: 1
1: vlanif100
Protocol: pim-sm, UpTime: 00:13:16, Expires: 00:03:22
(10.110.5.100, 232.1.1.1)
Protocol: pim-ssm, Flag:
UpTime: 00:01:22
Upstream interface: vlanif500
Upstream neighbor: 192.168.4.2
RPF neighbor: 192.168.4.2
Downstream interface(s) information:
Total number of downstreams: 1
1: vlanif400
Protocol: pim-ssm, UpTime: 00:01:22, Expires:-
(10.110.5.100, 232.1.1.1)
Protocol: pim-ssm, Flag:
UpTime: 00:01:25
Upstream interface: vlanif400
Upstream neighbor: 192.168.3.2
RPF neighbor: 192.168.3.2
Downstream interface(s) information:
Total number of downstreams: 1
1: vlanif102
Protocol: igmp, UpTime: 00:01:25, Expires:-
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 100 101 200
#
multicast routing-enable
#
acl number 2000
rule 5 permit source 232.1.1.0 0.0.0.255
#
interface vlanif 100
ip address 192.168.9.1 255.255.255.0
pim sm
#
interface vlanif 101
ip address 10.110.1.1 255.255.255.0
pim sm
igmp enable
igmp version 3
pim silent
#
interface vlanif 200
ip address 192.168.1.1 255.255.255.0
pim sm
#
interface GigabitEthernet1/0/0
port hybrid tagged vlan 100
#
interface GigabitEthernet2/0/0
port hybrid tagged vlan 101
#
interface GigabitEthernet3/0/0
port hybrid tagged vlan 200
#
ospf 1
area 0.0.0.0
network 10.110.1.0 0.0.0.255
network 192.168.1.0 0.0.0.255
network 192.168.9.0 0.0.0.255
#
pim
static-rp 192.168.2.2
ssm-policy 2000
#
return
l Configuration file of S9300-B
#
sysname S9300-B
#
multicast routing-enable
#
vlan batch 102 300
#
acl number 2000
rule 5 permit source 232.1.1.0 0.0.0.255
#
interface vlanif 102
ip address 10.110.2.1 255.255.255.0
pim sm
igmp enable
igmp version 3
#
interface vlanif 300
ip address 192.168.2.1 255.255.255.0
pim sm
#
interface GigabitEthernet1/0/0
port hybrid tagged vlan 300
#
interface GigabitEthernet2/0/0
port hybrid tagged vlan 102
#
ospf 1
area 0.0.0.0
network 10.110.2.0 0.0.0.255
network 192.168.2.0 0.0.0.255
#
Pim
static-rp 192.168.2.2
ssm-policy 2000
#
return
l Configuration file of S9300-C
#
sysname S9300-C
#
vlan batch 102 400
#
multicast routing-enable
#
acl number 2000
rule 5 permit source 232.1.1.0 0.0.0.255
#
interface vlanif 102
ip address 10.110.2.2 255.255.255.0
pim sm
igmp enable
igmp version 3
#
interface vlanif 400
ip address 192.168.3.1 255.255.255.0
pim sm
#
interface GigabitEthernet1/0/0
port hybrid tagged vlan 102
#
interface GigabitEthernet2/0/0
port hybrid tagged vlan 400
#
ospf 1
area 0.0.0.0
network 10.110.2.0 0.0.0.255
network 192.168.3.0 0.0.0.255
#
pim
static-rp 192.168.2.2
ssm-policy 2000
#
return
l Configuration file of S9300-D
#
sysname S9300-D
#
vlan batch 103 104 200 500
#
multicast routing-enable
#
acl number 2000
rule 5 permit source 232.1.1.0 0.0.0.255
#
interface vlanif 103
ip address 10.110.5.1 255.255.255.0
pim sm
#
interface vlanif 104
ip address 10.110.4.1 255.255.255.0
pim sm
pim bsr-boundary
#
interface vlanif 200
ip address 192.168.1.2 255.255.255.0
pim sm
#
interface vlanif 500
ip address 192.168.4.2 255.255.255.0
pim sm
#
interface GigabitEthernet1/0/0
port hybrid tagged vlan 500
#
interface GigabitEthernet2/0/0
port hybrid tagged vlan 200
#
interface GigabitEthernet3/0/0
port hybrid tagged vlan 103
#
interface GigabitEthernet4/0/0
port hybrid tagged vlan 104
#
ospf 1
area 0.0.0.0
network 10.110.4.0 0.0.0.255
network 10.110.5.0 0.0.0.255
network 192.168.1.0 0.0.0.255
network 192.168.4.0 0.0.0.255
#
pim
static-rp 192.168.2.2
ssm-policy 2000
#
return
l Configuration file of S9300-E
#
sysname S9300-E
#
vlan batch 100 300 400 500
#
multicast routing-enable
#
acl number 2000
rule 5 permit source 232.1.1.0 0.0.0.255
#
acl number 2008
rule 5 permit source 225.1.1.0 0.0.0.255
#
interface vlanif 100
ip address 192.168.9.2 255.255.255.0
pim sm
#
interface vlanif 300
ip address 192.168.2.2 255.255.255.0
pim sm
#
interface vlanif 400
ip address 192.168.3.2 255.255.255.0
pim sm
#
interface vlanif 500
ip address 192.168.4.1 255.255.255.0
pim sm
#
interface GigabitEthernet1/0/0
port hybrid tagged vlan 400
#
interface GigabitEthernet2/0/0
port hybrid tagged vlan 300
#
interface GigabitEthernet3/0/0
port hybrid tagged vlan 100
#
interface GigabitEthernet4/0/0
port hybrid tagged vlan 500
#
ospf 1
area 0.0.0.0
network 192.168.3.0 0.0.0.255
network 192.168.2.0 0.0.0.255
network 192.168.9.0 0.0.0.255
network 192.168.4.0 0.0.0.255
#
pim
c-bsr vlanif 100
c-rp vlanif 100 group-policy 2005 priority 0
static-rp 192.168.2.2
ssm-policy 2000
#
return
Networking Requirements
Receivers can receive the VOD information in multicast mode. The entire PIM network adopts
a single BSR administrative domain. By default, after receiving the first multicast data packet,
the RP and the DR on the receiver side perform the SPT switchover, finding the optimal path to
receive the multicast information from the multicast source. If the receiver requires that the SPT
switchover be performed after the traffic reaches the threshold, you need to configure the SPT
switchover function.
As shown in Figure 5-117, you need to configure the S9300s properly. In this way, HostA on
the leaf network then can receive multicast data from the RP (GE1/0/0 of S9300-A). When the
transmission rate of multicast packets reaches 1024 kbit/s, the SPT switchover is performed.
After the SPT switchover, the path through which HostA receive multicast packets is Source--
S9300-B--S9300-C--HostA.
Figure 5-117 Networking diagram for performing the SPT switchover in PIM-SM domain
S9300-A
GE2/0/0
Ethernet GE1/0/0
PIM-SM
GE2/0/0 Leaf networks
GE1/0/0
Source GE3/0/0 GE1/0/0
Receiver
GE3/0/0 GE2/0/0
S9300-B S9300-C
HostA
Ethernet
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Configure the IP addresses of interfaces and the unicast routing protocol on each S9300.
# Based on Figure 5-117, configure the IP address and mask of each interface on S9300s; connect
the S9300s through OSPF to ensure that S9300-A, S9300-B, and S9300-C can connect to each
other at the network layer and can dynamically update routes through the unicast routing
protocol.
Step 2 Enable multicast on all S9300s, PIM-SM on all interfaces, and IGMP on the interfaces connected
to hosts.
# Enable multicast on all S9300s, PIM-SM on all interfaces, and IGMP on the interface through
which S9300-C is connected to the leaf network. The configurations of S9300-A and S9300-B
are similar to the configuration of S9300-C, and are not mentioned here.
[S9300-C] multicast routing-enable
[S9300-C] interface vlanif 102
[S9300-C-Vlanif102] pim sm
[S9300-C-Vlanif102] igmp enable
[S9300-C-Vlanif102] igmp version 2
[S9300-C-Vlanif102] quit
[S9300-C] interface vlanif 300
[S9300-C-Vlanif300] pim sm
[S9300-C-Vlanif300] quit
[S9300-C] interface vlan 100
[S9300-C-Vlanif100] pim sm
[S9300-C-Vlanif100] quit
# Configure the static RP on S9300-A, S9300-B, and S9300-C. The configurations of S9300-B
and S9300-C are similar to configuration of S9300-A, and are not mentioned here.
[S9300-A] pim
[S9300-A-pim] static-rp 192.168.1.1
(*, 225.1.1.1)
RP: 192.168.1.1
Protocol: pim-sm, Flag: WC
UpTime: 00:13:46
Upstream interface: vlanif100
Upstream neighbor: 192.168.1.1
RPF neighbor: 192.168.1.1
Downstream interface(s) information:
Total number of downstreams: 1
1: vlanif102
Protocol: igmp, UpTime: 00:13:46, Expires:-
(10.110.5.100, 225.1.1.1)
RP: 192.168.1.1
Protocol: pim-sm, Flag: ACT
UpTime: 00:00:42
Upstream interface: vlanif100
Upstream neighbor: 192.168.1.1
RPF neighbor: 192.168.1.1
Downstream interface(s) information:
Total number of downstreams: 1
1: vlanif102
Protocol: pim-sm, UpTime: 00:00:42, Expires:-
# When the rate is higher than 1024 kbit/s, you can run the display pim routing-table command
to view the PIM multicast routing table on S9300-C. You can find that the upstream neighbor
is S9300-B. The displayed information is as follows:
<S9300-C> display pim routing-table
VPN-Instance: public net
Total 1 (*, G) entry; 1 (S, G) entry
(*, 225.1.1.1)
RP: 192.168.1.1
Protocol: pim-sm, Flag: WC
UpTime: 00:13:46
Upstream interface: vlanif300,
Upstream neighbor: 192.168.2.2
RPF neighbor: 192.168.2.2
Downstream interface(s) information:
Total number of downstreams: 1
1: vlanif102,
Protocol: igmp, UpTime: 00:13:46, Expires:-
(10.110.5.100, 225.1.1.1)
RP: 192.168.1.1
Protocol: pim-sm, Flag:RPT SPT ACT
UpTime: 00:00:42
Upstream interface: vlanif300
Upstream neighbor: 192.168.2.2
RPF neighbor: 192.168.2.2
Downstream interface(s) information:
Total number of downstreams: 1
1: vlanif102
Protocol: pim-sm, UpTime: 00:00:42, Expires:-
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 100 200
#
multicast routing-enable
#
interface vlanif 100
ip address 192.168.1.1 255.255.255.0
pim sm
#
interface vlanif 200
ip address 192.168.3.1 255.255.255.0
pim sm
#
interface GigabitEthernet1/0/0
port hybrid tagged vlan 100
#
interface GigabitEthernet2/0/0
port hybrid tagged vlan 200
#
pim
static-rp 192.168.1.1
#
ospf 1
area 0.0.0.0
network 192.168.1.0 0.0.0.255
network 192.168.3.0 0.0.0.255
#
return
interface GigabitEthernet2/0/0
port hybrid tagged vlan 200
#
interface GigabitEthernet3/0/0
port hybrid tagged vlan 101
#
pim
static-rp 192.168.1.1
#
ospf 1
area 0.0.0.0
network 10.110.5.0 0.0.0.255
network 192.168.2.0 0.0.0.255
network 192.168.3.0 0.0.0.255
#
return
Networking Requirements
On the multicast network shown in Figure 5-118, PIM-SM is run between S9300s. Hosts receive
the VOD information from the multicast source. S9300-A is the DR on the source side. S9300-
B and S9300-C are connected to the segment where hosts reside. When the DR changes, other
S9300s on the network segment can detect the change of the DR quickly.
You can set up the BFD session on the network segment where the host is located to respond to
the changes of the DR quickly. In addition, you can configure the DR switchover delay. In this
case, when an S9300 is added to the network segment and may become a DR, the multicast
routing table of the original DR is reserved until the routing entries of the new DR are created.
Therefore, the packet loss due to the delay in creating multicast entries is prevented.
NOTE
After the delay of PIM DR switchover is set, the downstream receiver may receive two copies of the same
data during the DR switchover and the assert mechanism will be triggered. If you do not want to trigger
the assert mechanism, you do not need to set the DR switchover delay.
Figure 5-118 Configuring the PIM BFD networking in the shared network segment
S9300-A
Source
10.1.7.1/24 PIM-SM GE1/0/0
S9300-C
GE1/0/0
GE2/0/0
S9300-B
GE2/0/0
VLAN100
User1 User2
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure PIM BFD on the interfaces that connect S9300s to the network segment where
the host is located.
2. Set the PIM DR switchover delay on the interfaces that connect S9300s to the network
segment where the host is located.
Data Preparation
To complete the configuration, you need the following data:
l Parameters of PIM BFD sessions
l PIM DR switchover delay
NOTE
This configuration example describes only the commands used to configure PIM-SM BFD.
Procedure
Step 1 Configure the IP address of each interface and the unicast routing protocol.
# Configure IP addresses and masks of interfaces on the S9300s according to Figure 5-118.
Configure OSPF between S9300s to ensure that the S9300s can communicate at the network
layer and update routes through the unicast routing protocol.
For how to configure IP addresses of interfaces, see Assigning an IP Address to an
Interface in the Quidway S9300 Terabit Routing Switch - Basic Configuration. For how to
configure OSPF, see OSPF Configuration in the Quidway S9300 Terabit Routing Switch - IP
Routing.
Step 2 Enable BFD globally and configure PIM BFD in the interface view.
# Enable BFD globally on S9300-B and S9300-C, enable PIM BFD on the interfaces that are
connected to the network segment where the host resides, and set PIM BFD parameters. The
configuration on S9300-C is similar to the configuration on S9300-B and is not mentioned here.
[S9300-B] bfd
[S9300-B-bfd] quit
[S9300-B] interface vlanif 100
[S9300-B-Vlanif100] pim bfd enable
[S9300-B-Vlanif100] pim bfd min-tx-interval 100 min-rx-interval 100 detect-
multiplie 3
# Run the display pim bfd session command to display information about the BFD session on
each S9300. You can check whether the BFD session is set up on each S9300.
<S9300-B> display pim bfd session
VPN-Instance: public net
Total 1 BFD session Created
# Run the display pim routing-table command to view the PLM routing table. S9300-C
functions as the DR. The (S, G) and (*, G) entries exist. The displayed information is as follows:
<S9300-C> display pim routing-table
VPN-Instance: public net
Total 1 (*, G) entry; 1 (S, G) entry
(*, 225.1.1.1)
RP: 10.1.5.2
Protocol: pim-sm, Flag: WC
UpTime: 00:13:46
Upstream interface: vlanif200,
Upstream neighbor: 10.1.2.2
RPF neighbor: 10.1.2.2
Downstream interface(s) information:
Total number of downstreams: 1
1: Vlanif100,
Protocol: igmp, UpTime: 00:13:46, Expires:-
(10.1.7.1, 225.1.1.1)
RP: 10.1.5.2
Protocol: pim-sm, Flag: SPT ACT
UpTime: 00:00:42
Upstream interface: vlanif200
Upstream neighbor: 10.1.2.2
RPF neighbor: 10.1.2.2
Downstream interface(s) information:
Total number of downstreams: 1
1: Vlanif100
Protocol: pim-sm, UpTime: 00:00:42, Expires:-
----End
Configuration Files
l S9300-A needs to be configured with only basic PIM SM functions. The configuration file
is not provided here.
l The following is the configuration file of S9300-B. The configuration file of S9300-C is
similar to the configuration file of S9300-B, and is not provided here.
#
sysname S9300-B
#
vlan batch 100 200
#
multicast routing-enable
#
bfd
#
interface vlanif 100
ip address 10.1.1.1 255.255.255.0
pim sm
igmp enable
pim bfd enable
pim bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 3
pim timer dr-switch-delay 20
#
interface vlanif 200
ip address 10.1.2.1 255.255.255.0
pim sm
#
interface GigabitEthernet1/0/0
port hybrid tagged vlan 200
#
interface GigabitEthernet2/0/0
port hybrid tagged vlan 100
#
ospf 1
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.1.2.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-119, two ASs exist on the network. Each AS contains one or more PIM-
SM domains; each PIM-SM domain has 0 or 1 multicast source and receiver. The receivers in
PIM-SM2 need to receive the multicast data sent by S3 in the PIM-SM3 domain and multicast
data sent by S1 in the PIM-SM1 domain.
AS100 AS200
Loopback0 Receiver
2.2.2.2/32
Loopback0
1.1.1.1/32
PIM-SM2
S9300-A S9300-C GE1/0/0
GE2/0/0 GE1/0/0 GE1/0/0 GE2/0/0
GE2/0/0 GE2/0/0
S9300-B GE3/0/0 S9300-D
GE1/0/0
PIM-SM1
S9300-F
S1 GE3/0/0
GE2/0/0
GE2/0/0
GE1/0/0
S9300-E
PIM-SM3
S3
Loopback0
3.3.3.3/32
MSDP peer
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the IP addresses of the interfaces on each S9300 and configure OSPF in the AS
to ensure that the unicast routes within the AS are reachable.
2. Configure EBGP peers and import BGP and OSPF routes into each other's routing table to
ensure that the unicast routes between ASs are reachable.
3. Enable multicast and PIM-SM on each interface, configure the boundary domain, and
enable the IGMP function on the interfaces connected to hosts.
4. Configure the C-BSR and C-RP. Configure the RPs of PIM-SM1 and PIM-SM2 on the
ASBR.
5. Establish MSDP peer relation between RPs of each doman. The MSDP peers and the EBGP
peers between ASs use the same interface addresses. According to the RPF rule, the S9300s
receive SA messages from the next hop toward the source RP.
Data Preparation
To complete the configuration, you need the following data:
l Address of multicast group G: 225.1.1.1/24
l Number of the AS that S9300-A and S9300-B belong to, namely 100, and router ID of
S9300-B, namely, 1.1.1.1
l Number of the AS that S9300-C and S9300-D belong to, namely 200, and Router ID of
S9300-C, namely, 2.2.2.2
l Number of the AS that S9300-E and S9300-F belong to, namely 200
NOTE
This configuration example describes only the commands related to MSDP configuration.
Procedure
Step 1 Configure the IP addresses of interfaces and the unicast routing protocol.
# According to Figure 5-119, configure IP addresses and masks for the interfaces on each S9300.
Configure the OSPF protocol between S9300s. Ensure the communication on the network layer
within an AS. Ensure the dynamic route update between S9300s through unicast routing
protocol. The configuration procedure is not mentioned.
Step 2 Configure EBGP peer relation between ASs and import routes of BGP and OSPF into each
other's routing table.
# Configure EBGP on S9300-B and import OSPF routes.
[S9300-B] bgp 100
[S9300-B-bgp] router-id 1.1.1.1
[S9300-B-bgp] peer 192.168.2.2 as-number 200
[S9300-B-bgp] import-route ospf 1
[S9300-B-bgp] quit
# Import BGP routes to OSPF on S9300-B. The configuration on S9300-C is similar to the
configuration on S9300-B, and is not mentioned here.
[S9300-B] ospf 1
[S9300-B-ospf-1] import-route bgp
[S9300-B-ospf-1] quit
Step 3 Enable multicast, enable PIM-SM on all interfaces, configure the domain boundary, and enable
IGMP on the interface connecting to the host.
# Enable multicast on S9300-B and enable PIM-SM on each interface. The configurations of
other S9300s are similar to the configuration of S9300-B, and are not mentioned here.
[S9300-B] multicast routing-enable
[S9300-B] interface vlanif 100
[S9300-B-Vlanif100] pim sm
[S9300-B-Vlanif100] quit
[S9300-B] interface vlanif 200
[S9300-B-Vlanif200] pim sm
# Configure the domain boundary on VLANIF 200 and VLANIF 400 of S9300-C. Configure
the service boundary of BSR on VLANIF 400 of S9300-E. The configuration on S9300-E is
similar to the configuration on S9300-B, and is not mentioned here.
# Enable IGMP on the interface connecting S9300-D to the leaf network.
[S9300-D] interface vlanif 102
[S9300-D-Vlanif102] igmp enable
# Run the display bgp routing-table command to view the BGP routing table on an S9300. For
example, the BGP routing table displayed on S9300-C is as follows:
<S9300-C> display bgp routing-table
# Run the display msdp brief command to view the status of the MSDP peer relation between
S9300s. The information about establishing MSDP peer relation among S9300-B, S9300-C and
S9300-E is as follows:
<S9300-B> display msdp brief
# Run the display msdp peer-status command to view the details about MSDP peer relations
between S9300s. The details displayed on S9300-B are as follows:
# Run the display pim routing-table command to view the PIM routing table on an S9300.
When multicast sources S1 (10.110.1.2/24) in PIM-SM1 and S3 (10.110.3.2/24) in PIM-SM3
send multicast data to multicast group G (225.1.1.1/24), Receiver (10.110.2.2/24) in PIM-SM2
can receive the multicast data. The PIM routing tables displayed on S9300-B and S9300-C are
as follows:
<S9300-B> display pim routing-table
VPN-Instance: public net
Total 0 (*, G) entry; 1 (S, G) entry
(10.110.1.2, 225.1.1.1)
RP: 1.1.1.1(local)
Protocol: pim-sm, Flag: SPT EXT ACT
UpTime: 00:00:42
Upstream interface: vlanif200
Upstream neighbor: 192.168.1.1
RPF neighbor: 192.168.1.1
Downstream interface(s) information:
Total number of downstreams: 1
1: vlanif100
Protocol: pim-sm, UpTime: 00:00:42, Expires:-
(*, 225.1.1.1)
RP: 2.2.2.2(local)
Protocol: pim-sm, Flag: WC RPT
UpTime: 00:13:46
Upstream interface: NULL,
Upstream neighbor: NULL
RPF prime neighbor: NULL
Downstream interface(s) information:
Total number of downstreams: 1
1: vlanif300,
Protocol: pim-sm, UpTime: 00:13:46, Expires:-
(10.110.1.2, 225.1.1.1)
RP: 2.2.2.2
Protocol: pim-sm, Flag: SPT MSDP ACT
UpTime: 00:00:42
Upstream interface: vlanif200
Upstream neighbor: 192.168.2.1
RPF neighbor: 192.168.2.1
Downstream interface(s) information:
Total number of downstreams: 1
1: vlanif300
Protocol: pim-sm, UpTime: 00:00:42, Expires:-
(10.110.3.2, 225.1.1.1)
RP: 2.2.2.2
Protocol: pim-sm, Flag: SPT MSDP ACT
UpTime: 00:00:42
Upstream interface: vlanif400
Upstream neighbor: 192.168.4.2
RPF neighbor: 192.168.4.2
Downstream interface(s) information:
Total number of downstreams: 1
1: vlanif300
Protocol: pim-sm, UpTime: 00:00:42, Expires:-
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 100 101
#
multicast routing-enable
#
interface vlanif 100
ip address 192.168.1.1 255.255.255.0
pim sm
#
interface vlanif 200
ip address 10.110.1.1 255.255.255.0
pim sm
#
interface GigabitEthernet1/0/0
port hybrid untagged vlan 101
#
interface GigabitEthernet2/0/0
port hybrid tagged vlan 100
#
ospf 1
area 0.0.0.0
network 192.168.1.0 0.0.0.255
network 10.110.1.0 0.0.0.255
#
return
pim bsr-boundary
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
pim sm
#
interface GigabitEthernet1/0/0
port hybrid tagged vlan 200
#
interface GigabitEthernet2/0/0
port hybrid tagged vlan 100
#
bgp 100
router-id 1.1.1.1
peer 192.168.2.2 as-number 200
import-route ospf 1
#
ospf 1
import-route bgp
area 0.0.0.0
network 192.168.1.0 0.0.0.255
network 1.1.1.1 0.0.0.0
#
pim
c-bsr LoopBack0
c-rp LoopBack0
#
msdp
peer 192.168.2.2 connect-interface vlanif200
#
return
l Configuration file of S9300-C
#
sysname S9300-C
#
vlan batch 200 300 400
#
multicast routing-enable
#
interface vlanif 200
ip address 192.168.2.2 255.255.255.0
pim sm
pim bsr-boundary
#
interface vlanif 300
ip address 192.168.3.1 255.255.255.0
pim sm
#
interface vlanif 400
ip address 192.168.4.1 255.255.255.0
pim sm
pim bsr-boundary
#
interface GigabitEthernet1/0/0
port hybrid tagged vlan 200
#
interface GigabitEthernet2/0/0
port hybrid tagged vlan 300
#
interface GigabitEthernet3/0/0
port hybrid tagged vlan 400
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
pim sm
#
bgp 200
router-id 2.2.2.2
peer 192.168.2.1 as-number 100
import-route ospf 1
#
ospf 1
import-route bgp
area 0.0.0.0
network 192.168.3.0 0.0.0.255
network 192.168.4.0 0.0.0.255
network 2.2.2.2 0.0.0.0
#
pim
c-bsr LoopBack0
c-rp LoopBack0
#
msdp
peer 192.168.2.1 connect-interface vlanif200
peer 192.168.4.2 connect-interface vlanif400
#
return
l Configuration file of S9300-D
#
sysname S9300-D
#
vlan batch 102 300
#
multicast routing-enable
#
interface vlanif 102
ip address 10.110.2.1 255.255.255.0
pim sm
igmp enable
#
interface vlanif 300
ip address 192.168.3.2 255.255.255.0
pim sm
#
interface GigabitEthernet1/0/0
port hybrid untagged vlan 102
#
interface GigabitEthernet2/0/0
port hybrid tagged vlan 300
#
ospf 1
area 0.0.0.0
network 192.168.3.0 0.0.0.255
network 10.110.2.0 0.0.0.255
#
return
l Configuration file of S9300-E
#
sysname S9300-E
#
vlan batch 400 500
#
multicast routing-enable
#
interface vlanif 400
ip address 192.168.4.2 255.255.255.0
pim sm
pim bsr-boundary
#
interface vlanif 500
ip address 192.168.5.1 255.255.255.0
pim sm
#
interface GigabitEthernet2/0/0
port hybrid tagged vlan 500
#
interface GigabitEthernet3/0/0
Networking Requirements
As shown in Figure 5-120, two ASs exist on the network. Each AS contains one or more PIM-
SM domains; each PIM-SM domain has 0 or 1 multicast source and receiver. MSDP peers need
to be set up between PIM-SM domains to share the information of the multicast source.
Figure 5-120 Networking diagram for configuring inter-AS multicast by using static RPF peers
AS100 AS200
2.2.2.2/32
Loopback0
S9300-E
GE1/0/0
1.1.1.1/32 GE2/0/0
Loopback0 GE1/0/0
GE3/0/0 S9300-D
GE2/0/0
GE3/0/0 S9300-G GE3/0/0
GE1/0/0 GE1/0/0 GE2/0/0
S1
S9300-F GE2/0/0
S9300-A GE1/0/0
PIM-SM3
S2
BGP peers
Configuration Roadmap
Set up an MSDP peer on the RP in each PIM-SM domain. Establish the static RPF peer relation
between MSDP peers. In this way, the source information can be transmitted across domains
without changing unicast topology.
1. Configure IP addresses for the interfaces on each S9300, configure OSPF in the AS,
configure EBGP between ASs, and import BGP and OSPF routes into each other's routing
table.
2. Enable multicast on all S9300s and PIM-SM on all interfaces and enable IGMP on the
interfaces at the user side. Configure Loopback0, C-BSR, and C-RP. The Loopback 0
interfaces on S9300-C, S9300-D, and S9300-F function as the C-BSR and the C-RP of each
PIM-SM domain.
3. Establish MSDP peer relation between RPs of each domain. Establish the MSDP peer
relation between S9300-C and S9300-D and establish the MSDP peer relation between
S9300-C and S9300-F.
4. Specify a static RPF peer for the MSDP peer. The static RPF peers of S9300-C are S9300-
D and S9300-F. S9300-D and S9300-F have only one static RPF peer, namely, S9300-C.
According to RPF rules, S9300s receive SA messages from static RPF peers.
Data Preparation
To complete the configuration, you need the following data:
l Number of the AS that S9300-A, S9300-B, and S9300-C belong to: 100
l Router IDs of S9300-A, S9300-B, and S9300-C: 1.1.1.3, 1.1.1.2 and 1.1.1.1
l Number of the AS that S9300-D and S9300-E belong to: 200
l Router IDs of S9300-D and S9300-E: 2.2.2.2 and 2.2.2.1
l Number of the AS that S9300-F and S9300-G belong to: 200
l Router ID of S9300-F: 3.3.3.3
l S9300-C uses the list-df policy to filter the SA messages from S9300-D and S9300-F.
l S9300-D and S9300-F use the list-c policy to filter the SA messages from S9300-C.
NOTE
This configuration example describes only the commands used to configure static RPF peers.
Procedure
Step 1 Configure the IP addresses of interfaces and the unicast routing protocol
# According to Figure 5-120, configure IP addresses and masks for the interfaces of each S9300.
Configure OSPF in the AS. Configure EBGP between S9300-A and S9300-F, and between
S9300-B and S9300-E. Import BGP and OSPF routes into each other's routing table. Ensure that
the S9300s can communicate with each other through the network layer. Ensure the dynamic
route update between routers through the unicast routing protocol. The configuration procedure
is not mentioned.
Step 2 Enable multicast on all S9300s and PIM-SM on all interfaces, and enable the IGMP function on
the interfaces connected to the hosts. In addition, configure the service boundary of BSR on the
interfaces of S9300s on the AS boundary.
# Enable multicast all the S9300s and enable PIM-SM on each interface. The configurations of
other S9300s are similar to configuration of S9300-C, and are not mentioned here.
[S9300-C] multicast routing-enable
[S9300-C] interface vlanif 100
[S9300-C-Vlanif100] pim sm
[S9300-C-Vlanif100] quit
[S9300-C] interface vlanif 400
[S9300-C-Vlanif400] pim sm
[S9300-C-Vlanif400] quit
# Configure the service boundary of BSR on VLANIF 500 of S9300-A, VLANIF 200 of S9300-
B, VLANIF 200 of S9300-E, and VLANIF 500 of S9300-F. The configurations of S9300-B,
S9300-E, and S9300-F are similar to configuration of S9300-A, and are not mentioned here.
[S9300-A] interface vlanif 500
[S9300-A-Vlanif500] pim bsr-boundary
[S9300-A-Vlanif500] quit
# Configure S9300-C as the static RPF peer of S9300-D and S9300-F. The configuration of
S9300-F is similar to the configuration of S9300-D, and is not mentioned here.
[S9300-D] ip ip-prefix list-c permit 192.168.0.0 16 greater-equal 16 less-equal 32
[S9300-D] msdp
[S9300-D-msdp] peer 192.168.1.1 connect-interface vlanif300
[S9300-D-msdp] static-rpf-peer 192.168.1.1 rp-policy list-c
----End
Configuration Files
l Configuration file of S9300-A The configuration files of S9300-D and S9300-F are similar
to the configuration file of S9300-A, and are not provided here.
#
sysname S9300-A
#
vlan batch 101 400 500
#
multicast routing-enable
#
interface vlanif 101
ip address 10.110.1.1 255.255.255.0
pim sm
#
interface vlanif 400
ip address 192.168.4.2 255.255.255.0
pim sm
#
interface vlanif 500
ip address 192.168.5.2 255.255.255.0
pim sm
pim bsr-boundary
#
interface GigabitEthernet1/0/0
port hybrid tagged vlan 500
#
interface GigabitEthernet2/0/0
port hybrid tagged vlan 400
#
interface GigabitEthernet3/0/0
port hybrid untagged vlan 101
pim sm
#
ospf 1
area 0.0.0.0
network 192.168.4.0 0.0.0.255
network 192.168.5.0 0.0.0.255
network 10.110.1.0 0.0.0.255
#
return
#
interface vlanif 100
ip address 192.168.1.1 255.255.255.0
pim sm
#
interface vlanif 400
ip address 192.168.4.1 255.255.255.0
pim sm
#
interface GigabitEthernet1/0/0
port hybrid tagged vlan 100
#
interface GigabitEthernet2/0/0
port hybrid tagged vlan 400
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
pim sm
#
ospf 1
area 0.0.0.0
network 192.168.1.0 0.0.0.255
network 192.168.4.0 0.0.0.255
network 1.1.1.1 0.0.0.0
#
pim
c-bsr LoopBack0
c-rp LoopBack0
#
ip ip-prefix list-df permit 192.168.0.0 16 greater-equal 16 less-equal 32
#
msdp
peer 192.168.3.2 connect-interface vlanif100
peer 192.168.5.1 connect-interface vlanif400
static-rpf-peer 192.168.3.2 rp-policy list-df
static-rpf-peer 192.168.5.1 rp-policy list-df
#
return
l Configuration file of S9300-D
#
sysname S9300-D
#
vlan batch 300
#
multicast routing-enable
#
interface vlanif 300
ip address 192.168.3.2 255.255.255.0
pim sm
#
interface GigabitEthernet1/0/0
port hybrid tagged vlan 300
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
pim sm
#
ospf 1
area 0.0.0.0
network 192.168.3.0 0.0.0.255
network 2.2.2.2 0.0.0.0
#
pim
c-bsr LoopBack0
c-rp LoopBack0
#
ip ip-prefix list-c permit 192.168.0.0 16 greater-equal 16 less-equal 32
#
msdp
#
interface GigabitEthernet1/0/0
port hybrid untagged vlan 103
#
interface GigabitEthernet2/0/0
port hybrid tagged vlan 600
#
interface GigabitEthernet3/0/0
port hybrid untagged vlan 104
#
ospf 1
area 0.0.0.0
network 192.168.6.0 0.0.0.255
network 10.110.3.0 0.0.0.255
network 10.110.4.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-121, a PIM-SM domain contains multiple multicast sources and receivers.
The MSDP peer relation needs to be set up in the PIM-SM domain to implement RP load
balancing.
Receiver
user2
GE2/0/0 S9300-B
Loopback10
PIM-SM GE1/0/0
GE3/0/0 GE2/0/0
Source
S1
Loopback1 S9300-D
Source
GE1/0/0 GE1/0/0 S2
S9300-A Loopback0
GE2/0/0 Loopback0
GE1/0/0
GE2/0/0
GE1/0/0
Loopback1
GE2/0/0
S9300-C GE3/0/0 S9300-E
Loopback10 Receiver
user1
MSDP peers
Configuration Roadmap
Configure anycast RPs. Then the receiver sends a Join message to the nearest RP and the
multicast source sends a Register message to the nearest RP.
1. Configure IP addresses for the interfaces of each S9300 and configure OSPF in the PIM-
SM domain.
2. Enable multicast on all S9300s and PIM-SM on all interfaces and enable the IGMP function
on the interfaces connected the hosts.
3. Configure Loopback10 interfaces on S9300-C and S9300-D. Configure C-RPs on
Loopback10 interfaces, and configure the C-BSR on Loopback1.
4. Configure MSDP peers on Loopback0 interfaces of S9300-C and S9300-D. According to
RPF rules, the S9300s receive SA messages from the source RP.
Data Preparation
To complete the configuration, you need the following data:
This configuration example describes only the commands used to configure anycast RP.
Procedure
Step 1 Configure the IP addresses of interfaces and the unicast routing protocol
# According to Figure 5-121, configure IP addresses and masks for the interfaces in the PIM-
SM domain. Configure the OSPF protocol between S9300s. The configuration procedure is not
mentioned.
# Run the display pim routing-table command to view the PIM routing table on an S9300. In
the PIM-SM domain, multicast source S1 (10.110.5.100/24) sends multicast packets to multicast
group G (225.1.1.1). User 1 that joins G receives the multicast packets. Comparing information
about the PIM routing tables on S9300-C and S9300-D, you can find that S9300-C is the valid
RP. That is, S1 registers to S9300-C, and User 1 sends a Join message to S9300-C.
<S9300-C> display pim routing-table
VPN-Instance: public net
Total 1 (*, G) entry; 1 (S, G) entry
(*, 225.1.1.1)
RP: 10.1.1.1 (local)
Protocol: pim-sm, Flag: WC
UpTime: 00:28:49
Upstream interface: Register
Upstream neighbor: NULL
RPF prime neighbor: NULL
Downstream interface(s) information:
Total number of downstreams: 1
1: vlanif104
Protocol: static, UpTime: 00:28:49, Expires: -
(10.110.5.1, 225.1.1.1)
RP: 10.1.1.1 (local)
Protocol: pim-sm, Flag: SPT 2MSDP ACT
UpTime: 00:02:26
Upstream interface: vlanif101
Upstream neighbor: 10.110.1.2
RPF prime neighbor: 10.110.1.2
Downstream interface(s) information:
Total number of downstreams: 1
1: vlanif104
Protocol: pim-sm, UpTime: 00:02:26, Expires: -
# User 1 leaves group G, and multicast source S1 stops sending multicast packets to G. You can
run the reset multicast routing-table all and reset multicast forwarding-table all commands
to clear the multicast routing entries and multicast forwarding entries on S9300-C.
<S9300-C> reset multicast routing-table all
<S9300-C> reset multicast forwarding-table all
# User 2 joins group G, and multicast source S2 (10.110.6.100/24) sends multicast packets to
G. Comparing information about the PIM routing tables on S9300-C and S9300-D, you can find
that S9300-D is the valid RP. That is, S2 registers to S9300-D, and User 2 sends a Join message
to S9300-D.
<S9300-C> display pim routing-table
(*, 225.1.1.1)
RP: 10.1.1.1 (local)
Protocol: pim-sm, Flag: WC RPT
UpTime: 00:07:23
Upstream interface: NULL,
Upstream neighbor: NULL
RPF prime neighbor: NULL
Downstream interface(s) information:
Total number of downstreams: 1
1: vlanif103,
Protocol: pim-sm, UpTime: 00:07:23, Expires:-
(10.110.6.100, 225.1.1.1)
RP: 10.1.1.1 (local)
Protocol: pim-sm, Flag: SPT 2MSDP ACT
UpTime: 00:10:20
Upstream interface: vlanif102
Upstream neighbor: 10.110.2.2
RPF prime neighbor: 10.110.2.2
Downstream interface(s) information:
Total number of downstreams: 1
1: vlanif103
Protocol: pim-sm, UpTime: 00:10:22, Expires: -
----End
Configuration Files
l Configuration file of S9300-A The configuration files of S9300-B and S9300-E are similar
to the configuration file of S9300-A, and are not provided here.
#
sysname S9300-A
#
vlan batch 101 105
#
multicast routing-enable
#
interface vlanif 101
ip address 10.110.1.2 255.255.255.0
pim sm
#
interface vlanif 105
ip address 10.110.5.1 255.255.255.0
pim sm
#
interface GigabitEthernet1/0/0
port hybrid untagged vlan 105
#
interface GigabitEthernet2/0/0
port hybrid tagged vlan 101
#
ospf 1
area 0.0.0.0
network 10.110.1.0 0.0.0.255
network 10.110.5.0 0.0.0.255
#
return
multicast routing-enable
#
interface vlanif 100
ip address 192.168.1.1 255.255.255.0
pim sm
#
interface vlanif 101
ip address 10.110.1.1 255.255.255.0
pim sm
#
interface vlanif 104
ip address 10.110.4.1 255.255.255.0
igmp enable
pim sm
#
interface GigabitEthernet1/0/0
port hybrid tagged vlan 100
#
interface GigabitEthernet2/0/0
port hybrid tagged vlan 101
#
interface GigabitEthernet3/0/0
port hybrid untagged vlan 104
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
pim sm
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
pim sm
#
interface LoopBack10
ip address 10.1.1.1 255.255.255.255
pim sm
#
ospf 1
area 0.0.0.0
network 10.110.1.0 0.0.0.255
network 10.110.4.0 0.0.0.255
network 1.1.1.1 0.0.0.0
network 3.3.3.3 0.0.0.0
network 10.1.1.1 0.0.0.0
network 192.168.1.0 0.0.0.255
#
pim
c-bsr LoopBack1
c-rp LoopBack10
#
msdp
originating-rp LoopBack0
peer 2.2.2.2 connect-interface LoopBack0
#
return
Networking Requirements
As shown in Figure 5-122, PIM-DM runs on the network and all the S9300s support multicast.
The receiver can receive information from the multicast source. S9300-A, S9300-B, and S9300-
C run OSPF. You need to configure a static multicast route to make the multicast path from the
source to the receiver different from the unicast path from the source to the receiver.
Figure 5-122 Networking diagram for changing static multicast routes to RPF routes
S9300-C
GE3/0/0 GE2/0/0
S9300-A S9300-B
GE1/0/0 GE1/0/0
GE2/0/0 GE3/0/0
8.1.1.2/24 7.1.1.2/24
Source Receiver
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the IP addresses of interfaces and the unicast routing protocol on each S9300.
2. Enable the multicast function on all S9300s, PIM-SM on all interfaces, and IGMP on the
interfaces at the host side.
3. Configure static multicast RPF routes on S9300-B, and configure S9300-C as the RPF
neighbor.
Data Preparation
To complete the configuration, you need the following data:
l IP address of the source
l Outgoing interface of the route from S9300-B to S9300-C: VLANIF 40
NOTE
This configuration example describes only the commands used to configure static multicast routes.
Procedure
Step 1 Configure the IP addresses of interfaces and the unicast routing protocol on each S9300.
# Configure the IP addresses and masks on the interfaces on each S9300 according to Figure
5-122. IP addresses must be configured on the VLANIF interfaces. OSPF runs between S9300-
A, S9300-B and S9300-C, and the S9300s can update routes among them through the unicast
routing protocol. The configuration procedure is not provided here.
Step 2 Enable multicast on all S9300s and PIM-DM on all interfaces.
# Enable multicast on all S9300s, and PIM-SM on all interfaces. Enable the IGMP function on
the interfaces at the host side. The configurations of other S9300s are similar to configuration
of S9300-B, and are not mentioned here.
[S9300-B] multicast routing-enable
[S9300-B] interface vlanif 10
[S9300-B-Vlanif10] pim dm
[S9300-B-Vlanif10] quit
[S9300-B] interface vlanif 20
[S9300-B-Vlanif20] pim dm
[S9300-B-Vlanif20] quit
[S9300-B] interface vlanif 30
[S9300-B-Vlanif30] pim dm
[S9300-B-Vlanif30] igmp enable
[S9300-B-Vlanif30] quit
# Run the display multicast rpf-info command on S9300-B to view the RPF information of the
source. The RPF routes are unicast routes, and the RPF neighbor is S9300-A. The following
information is displayed:
<S9300-B> display multicast rpf-info 8.1.1.2
VPN-Instance: public net
RPF information about source 8.1.1.2:
RPF interface: vlanif10, RPF neighbor: 9.1.1.1
Referenced route/mask: 8.1.1.0/24
Referenced route type: unicast
Route selection rule: preference-preferred
Load splitting rule: disable
----End
Configuration Files
l Configuration file of S9300-B
#
sysname S9300-B
#
vlan batch 10 40 50
#
multicast routing-enable
#
interface vlanif 10
ip address 9.1.1.2 255.255.255.0
pim dm
#
interface vlanif 40
ip address 13.1.1.1 255.255.255.0
pim dm
#
interface vlanif 50
ip address 7.1.1.1 255.255.255.0
pim dm
igmp enable
#
interface GigabitEthernet1/0/0
port hybrid tagged vlan 10
#
interface GigabitEthernet2/0/0
port hybrid tagged vlan 40
#
interface GigabitEthernet3/0/0
port hybrid untagged vlan 50
#
ospf 1
area 0.0.0.0
network 7.1.1.0 0.0.0.255
network 9.1.1.0 0.0.0.255
network 13.1.1.0 0.0.0.255
#
ip rpf-route-static 8.1.1.0 255.255.255.0 13.1.1.2
#
return
Networking Requirements
As shown in Figure 5-123, PIM-DM runs on the network and all S9300 support multicast. The
receiver can receive information from the multicast source Source1. S9300-B and S9300-C run
OSPF. No unicast route is available between S9300-A and S9300-B. You need to use a multicast
static route to enable the receiver to receive information sent by Source2.
Figure 5-123 Networking diagram for connecting the RPF route through static multicast routes
OSPF PIM-DM
Source1
10.1.3.2/24
GE2/0/0
S9300-A
GE3/0/0 GE3/0/0
S9300-B
GE1/0/0 GE1/0/0
GE1/0/0
S9300-C
Source2
GE2/0/0 10.1.5.2/24
Receiver
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the IP addresses of interfaces and the unicast routing protocol on each S9300.
2. Enable the multicast function on all routers, PIM-SM on all interfaces, and IGMP on the
interfaces connected to hosts.
3. Configure static multicast RPF routes on S9300-B and S9300-C.
Data Preparation
To complete the configuration, you need the following data:
l IP address of Source2
l RPF interface, VLANIF 40, through which S9300-B connects to Source 2 and the RPF
neighbor, namely, S9300-A
l RPF interface, VLANIF 20, through which S9300-C connects to Source 2 and the RPF
neighbor, namely, S9300-C
NOTE
This configuration example describes only the commands used to configure static multicast routes.
Procedure
Step 1 Configure the IP addresses of interfaces and the unicast routing protocol on each S9300.
# Configure the IP addresses and masks on the interfaces on each S9300 according to Figure
5-123. S9300-B and S9300-C belong to the same OSPF area, and they can update routes between
them through the unicast routing protocol. The configuration procedure is not provided here.
# Enable multicast on all S9300s, and PIM-DM on all interfaces. Enable the IGMP function on
the interfaces connected to hosts.
[S9300-A] multicast routing-enable
[S9300-A] interface vlanif11
[S9300-A-Vlanif11] pim dm
[S9300-A-Vlanif11] quit
[S9300-A] interface vlanif 40
[S9300-A-Vlanif40] pim dm
[S9300-A-Vlanif40] quit
# Source 1 (10.1.3.2/24) and Source 2 (10.1.5.2/24) send multicast data to the multicast group
G (225.1.1.1). The receiver joins multicast group G. Therefore, the receiver can receive the
multicast data sent by Source1, but cannot receive the multicast data sent by Source2.
# Run the display multicast rpf-info 10.1.5.2 command on S9300-B and S9300-C. If no
information is displayed, it indicates that S9300-B and S9300-C have no RPF route to Source2.
# Configure a static multicast RPF route on S9300-B, and configure S9300-A as the RPF
neighbor.
[S9300-B] ip rpf-route-static 10.1.5.0 255.255.255.0 10.1.4.2
# Configure a static multicast RPF route on S9300-C, and configure S9300-B as the RPF
neighbor.
[S9300-C] ip rpf-route-static 10.1.5.0 255.255.255.0 10.1.2.2
# Run the display pim routing-table command on S9300-C to view the routing table. S9300-
C has the multicast entries of Source2. The receiver can receive the multicast data from Source2.
<S9300-C> display pim routing-table
VPN-Instance: public net
Total 1 (*, G) entry; 2 (S, G) entry
(*, 225.1.1.1)
Protocol: pim-dm, Flag: WC
UpTime: 03:54:19
Upstream interface: NULL
Upstream neighbor: NULL
RPF prime neighbor: NULL
Downstream interface(s) information:
Total number of downstreams: 1
1: vlanif12
Protocol: pim-dm, UpTime: 01:38:19, Expires: never
(10.1.3.2, 225.1.1.1)
Protocol: pim-dm, Flag: ACT
UpTime: 00:00:44
Upstream interface: vlanif20
Upstream neighbor: 10.1.2.2
RPF prime neighbor: 10.1.2.2
Downstream interface(s) information:
Total number of downstreams: 1
1: vlanif12
Protocol: pim-dm, UpTime: 00:00:44, Expires: never
(10.1.5.2, 225.1.1.1)
Protocol: pim-dm, Flag: ACT
UpTime: 00:00:44
Upstream interface: vlanif20
Upstream neighbor: 10.1.2.2
RPF prime neighbor: 10.1.2.2
Downstream interface(s) information:
Total number of downstreams: 1
1: vlanif12
Protocol: pim-dm, UpTime: 00:00:44, Expires: never
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
multicast routing-enable
#
vlan batch 11 40
#
interface vlanif 11
ip address 10.1.5.1 255.255.255.0
pim dm
#
interface vlanif 40
ip address 10.1.4.2 255.255.255.0
pim dm
#
interface GigabitEthernet1/0/0
port hybrid untagged vlan 11
#
interface GigabitEthernet3/0/0
port hybrid tagged vlan 40
#
ospf 1
area 0.0.0.0
network 10.1.5.0 0.0.0.255
network 10.1.4.0 0.0.0.255
#
return
The document provides the configuration procedures and configuration examples to illustrate
the service configuration methods and application scenario.
5.6.1 DLDP Configuration
This chapter describes the principle, configuration procedure, and configuration example of the
Device Link Detection Protocol (DLDP).
5.6.2 Smart Link Configuration
This chapter describes the principle, configuration procedure, and configuration example of the
Smart Link.
5.6.3 VRRP Configuration
This chapter describes the principle, basic functions, and advanced functions of the Virtual
Router Redundancy Protocol (VRRP).
5.6.4 BFD Configuration
This chapter describes the principle and configuration of BFD.
5.6.5 Ethernet OAM Configuration
This chapter describes the principle, configuration procedure, and configuration example of
Ethernet operations administration and maintenance (OAM).
5.6.6 Hot Backup and Active/Standby Switchover Configuration
This chapter describes the principle and configuration of hot backup and active/standby
switchover.
Networking Requirements
As shown in Figure 5-124, one of the fibers between two S9300s is disconnected. All interfaces
of the two S9300s work in non-auto negotiation mode.
GE2/0/1 GE2/0/2
GE2/0/1 GE2/0/2
S9300-B
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable DLDP.
2. Set the operation mode of DLDP.
3. Set the interval for sending Advertisement packets.
4. Set the Delay Down timer.
5. Set the mode of disabling the interface when a unidirectional link is detected.
6. Set the authentication mode of DLDP packets.
Data Preparation
To complete the configuration, you need the following data:
l Type and number of each interface
l Interval for sending Advertisement packets
l Value of the Delay Down timer
Procedure
Step 1 Enable DLDP globally
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] dldp enable
Step 6 Set the mode of disabling the interface when a unidirectional link is detected.
[S9300-A] dldp unidirectional-shutdown auto
----End
Configuration Files
Configuration file of S9300-A
#
sysname S9300-A
#
dldp enable
dldp interval 80
dldp delaydown-timer 4
dldp authentication-mode simple 12345
#
interface GigabitEthernet2/0/1
dldp enable
#
return
Context
Example for Configuring Load Balancing of Active and Standby Links of the Smart
Link Group
Networking Requirements
As shown in Figure 5-125, the user-side network is connected to the MAN in dual-homing mode
to guarantee the reliability of the network. This networking ensures rapid switching of traffic
over the standby link when the active link fails so that the duration of service interruption is
limited to several milliseconds.
Figure 5-125 Networking diagram for configuring load balancing of active and standby links
of the Smart Link group
MAN
Switch-D Switch-C
GE1/0/0 GE1/0/2
GE1/0/1 GE1/0/0
GE1/0/1
GE1/0/2
Smart Link group Smart Link group
GE1/0/1 GE1/0/2
GE1/0/2 GE1/0/1
Switch-A Switch-B
User1 User2
Active link
Inactive link
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure Smart Link multi-instance on Switch-A and Switc-B, and add uplink interfaces
to the groups.
2. Enable revertive switching on Switch-A and Switch-B.
3. Enable Switch-A and Switch-B to send Flush packets.
4. Enable Switch-C and Switch-D to receive Flush packets.
5. Enable functions of the Smart Link group on Switch-A and Switch-B.
Data Preparation
To complete the configuration, you need the following data:
l IDs of the instances on Switch-A and Switch-B and IDs of the VLANs bound to the
instances
l IDs of the Smart Link groups
l Numbers of the uplink interfaces on Switch-A and Switch-B
l Control VLAN ID and password contained in Flush packets
Procedure
Step 1 Create the same control VLAN on Switch-A and Switch-B, and add uplink interfaces to the
VLAN.
The configuration procedure is not mentioned here. For details, see "VLAN Configuration" in
the Quidway S9300 Terabit Routing Switch Configuration Guide - Ethernet.
Step 2 Configure Smart Link multi-instance.
# Configure Switch-A.
<Switch-A> system-view
[Switch-A] stp region-configuration
[Switch-A-mst-region] instance 10 vlan 100 500
[Switch-A-mst-region] active region-configuration
[Switch-A-mst-region] quit
[Switch-A] smart-link group 1
[Switch-A-smlk-group1] protected-vlan reference-instance 0 10
[Switch-A-smlk-group1] load-balance reference-instance 10 slave
# Configure Switch-B.
<Switch-B> system-view
[Switch-B] stp region-configuration
[Switch-B-mst-region] instance 15 vlan 600 1000
[Switch-B-mst-region] active region-configuration
[Switch-B-mst-region] quit
[Switch-B] smart-link group 2
[Switch-B-smlk-group2] protected-vlan reference-instance 0 15
[Switch-B-smlk-group2] load-balance reference-instance 15 slave
Step 3 Add the uplink interfaces to the Smart Link group and specify the master and slave interfaces.
Ensure that STP is disabled on the uplink interfaces.
# Disable STP on interfaces.
[Switch-A-GigabitEthernet1/0/1] stp disable
[Switch-A-GigabitEthernet1/0/2] stp disable
[Switch-B-GigabitEthernet1/0/1] stp disable
[Switch-B-GigabitEthernet1/0/2] stp disable
# Configure Switch-A.
[Switch-A-smlk-group1] port gigabitethernet 1/0/1 master
[Switch-A-smlk-group1] port gigabitethernet 1/0/2 slave
# Configure Switch-B.
[Switch-B-smlk-group2] port gigabitethernet 1/0/2 master
[Switch-B-smlk-group2] port gigabitethernet 1/0/1 slave
Step 4 Enable revertive switching and set the interval of revertive switching.
# Configure Switch-A.
[Switch-A-smlk-group1] restore enable
[Switch-A-smlk-group1] timer wtr 30
# Configure Switch-B.
[Switch-B-smlk-group2] restore enable
[Switch-B-smlk-group2] timer wtr 30
# Configure Switch-B.
[Switch-B-smlk-group2] flush send control-vlan 10 password simple 123
# Configure Switch-B.
[Switch-B-smlk-group2] smart-link enable
# Configure Switch-D.
[Switch-D-GigabitEthernet1/0/1] smart-link flush receive control-vlan 10 password
simple 123
[Switch-D-GigabitEthernet1/0/2] smart-link flush receive control-vlan 10 password
simple 123
[Switch-D-GigabitEthernet1/0/0] smart-link flush receive control-vlan 10 password
simple 123
# Run the shutdown command to shut down GE 1/0/1, and you can find that GE 1/0/1 is in
Inactive state and GE 1/0/2 is in Active state.
[Switch-A-GigabitEthernet1/0/1] shutdown
[Switch-A-GigabitEthernet1/0/1] display smart-link group 1
Smart Link group 1 information :
Smart Link group was enabled
Wtr-time is: 30 sec.
Load-Balance Instance: 10
Reference Instance: 0 10
DeviceID: 0018-2000-0083 Control-vlan ID: 10
Member Role State Flush Count Last-Flush-Time
------------------------------------------------------------------------
GigabitEthernet1/0/1 Master Inactive 1 2009/01/05 10:33:46
GigabitEthernet1/0/2 Slave Active 1 2009/01/05 10:37:58
# Run the undo shutdown command to enable GE 1/0/1, and you can find that GE 1/0/1 is in
Active state and GE 1/0/2 is in Inactive state after 30 seconds.
[Switch-A-GigabitEthernet1/0/1] undo shutdown
[Switch-A-GigabitEthernet1/0/1] display smart-link group 1
----End
Configuration Files
The following lists only the configuration files of the user-side switches.
l Configuration file of Switch-A
#
sysname Switch-A
#
vlan batch 10 100 500 600 1000
#
stp region-configuration
instance 10 vlan 100 500
active region-configuration
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 10 100 500 600 1000
stp disable
#
interface GigabitEthernet1/0/2
port link-type trunk
port trunk allow-pass vlan 10 100 500 600 1000
stp disable
#
smart-link group 1
protected-vlan reference-instance 0 10
load-balance reference-instance 10 slave
restore enable
smart-link enable
port GigabitEthernet1/0/1 master
port GigabitEthernet1/0/2 slave
timer wtr 30
flush send control-vlan 10 password simple 123
#
return
#
smart-link group 2
protected-vlan reference-instance 0 15
load-balance reference-instance 15 slave
restore enable
smart-link enable
port GigabitEthernet1/0/2 master
port GigabitEthernet1/0/1 slave
timer wtr 30
flush send control-vlan 10 password simple 123
#
Return
Networking Requirements
As shown in Figure 5-126, S9300-C on the MAN is connected to user networks. It accesses the
backbone network through uplink devices S9300-A and S9300-B in dual-homed mode.
S9300-A and S9300-C are connected to uplink devices in dual-homed mode. One out of each
link pair needs to be blocked to prevent loops. When the active link fails, the data flows can be
rapidly switched to the standby link to ensure normal services.
IP/MPLS
core
network
S9300-A GE2/0/1
GE2/0/1 S9300-B
S9300-C
Active link
User1 User2 Inactive link
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure Smart Link groups on S9300-A and S9300-C, and add uplink interfaces to the
groups.
2. Configure Monitor Link groups on S9300-A and S9300-B.
3. Enable S9300-A and S9300-C to send Flush packets.
4. Enable S9300-A and S9300-C to receive Flush packets.
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Configure the same control VLAN on S9300-A, S9300-B, and S9300-C. Add the interfaces of
the Smart Link group or Monitor Link group to this VLAN.
The configuration procedures are not mentioned here. For details, see "VLAN Configuration"
in the Quidway S9300 Terabit Routing Switch Configuration Guide - Ethernet.
Step 2 Create Smart Link groups and enable the functions of the groups.
# Configure S9300-A.
<S9300-A> system-view
[S9300-A] smart-link group 1
[S9300-A-smlk-group1] protected-vlan reference-instance 0
[S9300-A-smlk-group1] smart-link enable
# Configure S9300-C.
<S9300-C> system-view
[S9300-C] smart-link group 2
[S9300-C-smlk-group2] protected-vlan reference-instance 0
[S9300-C-smlk-group2] smart-link enable
Step 3 Add interfaces to Smart Link groups and specify the master and slave interfaces of each Smart
Link group
# Configure S9300-A.
[S9300-A-smlk-group1] port gigabitethernet 1/0/1 master
[S9300-A-smlk-group1] port gigabitethernet 1/0/2 slave
# Configure S9300-C.
[S9300-C-smlk-group2] port gigabitethernet 1/0/1 master
[S9300-C-smlk-group2] port gigabitethernet 1/0/2 slave
Step 4 Enable revertive switching and set the interval of revertive switching.
# Configure S9300-A.
[S9300-A-smlk-group1] restore enable
[S9300-A-smlk-group1] timer wtr 30
# Configure S9300-C.
# Configure S9300-B.
<S9300-B> system-view
[S9300-B] interface gigabitethernet 2/0/1
[S9300-B- gigabitethernet2/0/1] smart-link flush receive control-vlan 10 password
simple 123
# Configure S9300-C.
[S9300-C-smlk-group2] flush send control-vlan 10 password simple 123
Step 6 Create Monitor Link groups and add the uplink and downlink interfaces to the Monitor Link
groups.
# Configure S9300-A.
[S9300-A] monitor-link group 1
[S9300-A-mtlk-group1] smart-link group 1 uplink
[S9300-A-mtlk-group1] port gigabitethernet 2/0/1 downlink 1
# Configure S9300-B.
[S9300-B] monitor-link group 2
[S9300-B-mtlk-group2] port gigabitethernet 1/0/1 uplink
[S9300-B-mtlk-group2] port gigabitethernet 2/0/1 downlink 1
Step 7 Set the revertive switching interval of the Monitor Link groups.
# Configure S9300-A.
[S9300-A-mtlk-group1] timer recover-time 10
# Configure S9300-B.
[S9300-B-mtlk-group2] timer recover-time 10
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 10
stp disable
#
interface GigabitEthernet1/0/2
port link-type trunk
port trunk allow-pass vlan 10
stp disable
#
interface GigabitEthernet2/0/1
port link-type trunk
port trunk allow-pass vlan 10
smart-link flush receive control-vlan 10 password simple 123
#
smart-link group 1
protected-vlan reference-instance 0
smart-link enable
port GigabitEthernet1/0/1 master
port GigabitEthernet1/0/2 slave
timer wtr 30
restore enable
flush send control-vlan 10 password simple 123
#
monitor-link group 1
smart-link group 1 uplink
port GigabitEthernet2/0/1 downlink 1
timer recover-time 10
#
return
#
return
Networking Requirements
As shown in Figure 5-127, Host A communicates with Host B through the default gateway.
l The VRRP backup group that consists of S9300 A and S9300 B functions as the default
gateway of Host A.
l S9300 A functions as the gateway. When S9300 A fails, S9300 B becomes the gateway.
l After S9300 A recovers, it preempts to be the master router within 20 seconds.
Backup group 1
Virtual IP Address:
10.1.1.111
S9300A
Master
VLANIF200
VLANIF100 192.168.1.1/24
10.1.1.1/24
VLANIF400
192.168.1.2/24
S9300C VLANIF300
HostA 20.1.1.1/24
10.1.1.100/24 VLANIF500 HostB
192.168.2.2/24 20.1.1.100/24
VLANIF100 VLANIF200
10.1.1.2/24 192.168.2.1/24
Ethernet S9300B
Backup
Configuration Roadmap
The configuration roadmap is as follows:
1. Create backup group 1 on VLANIF 100 of S9300 A. Set the highest priority for S9300 A
in the backup group to ensure that S9300 A functions as the master. Configure the
preemption mode on S9300 A.
2. Create backup group 1 on VLANIF 100 of S9300 B and use the default priority.
Data Preparation
To complete the configuration, you need the following data:
l ID and virtual IP address of the VRRP backup group
l Priorities of S9300 A and S9300 B in the backup group
l Preemption mode
Procedure
Step 1 Configure interworking between devices on the network.
# Configure the default gateway address of Host A to 10.1.1.111 and default gateway address
of Host B to 20.1.1.1.
# Configure Open Shortest Path First (OSPF) between S9300 A, S9300 B, and S9300 C.
Step 2 Configure a VRRP backup group.
# On S9300 A, assign an IP address to the VLANIF interface. Create backup group 1 and set
the priority of S9300 A in the backup group to 120 so that S9300 A functions as the master.
<S9300A> system-view
[S9300A] interface Vlanif 100
[S9300A-Vlanif100] ip address 10.1.1.1 24
[S9300A-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.111
[S9300A-Vlanif100] vrrp vrid 1 priority 120
[S9300A-Vlanif100] vrrp vrid 1 preempt-mode timer delay 20
[S9300A-Vlanif100] quit
# On S9300 B, assign an IP address to the VLANIF interface. Create backup group 1 and retain
the default priority of S9300 B in the backup group so that S9300 B functions as the backup.
<S9300B> system-view
[S9300B] interface Vlanif 100
[S9300B-Vlanif100] ip address 10.1.1.2 24
[S9300B-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.111
[S9300B-Vlanif100] quit
After the preceding configuration, Host A can ping Host B. Run the display vrrp command on
S9300 A, and you can find that S9300 A is the master switch. Run the display vrrp command
on S9300 B, and you can find that S9300 B is the backup switch.
<S9300A> display vrrp
Vlanif100 | Virtual Router 1
state : Master
Virtual IP : 10.1.1.111
PriorityRun : 120
PriorityConfig : 120
MasterPriority : 120
Preempt : YES Delay Time : 20
TimerRun : 1
TimerConfig : 1
Auth Type : NONE
Virtual Mac : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Run the display ip routing-table command on S9300 A and S9300 B. You can find a direct
route to the virtual IP address in the routing table of S9300 A. In the routing table of S9300 B,
this direct route is an OSPF route. The displayed information on S9300 A and S9300 B is as
follows:
<S9300A> display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.1.1.0/24 Direct 0 0 D 10.1.1.1 Vlanif100
10.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.1.1.111/32 Direct 0 0 D 127.0.0.1 InLoopBack0
20.1.1.0/24 OSPF 10 2 D 192.168.1.2 Vlanif200
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 Direct 0 0 D 192.168.1.1 Vlanif200
192.168.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.2/32 Direct 0 0 D 192.168.1.2 Vlanif200
192.168.2.0/24 OSPF 10 2 D 10.1.1.2 Vlanif100
<S9300B> display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.1.1.0/24 Direct 0 0 D 10.1.1.2 Vlanif100
10.1.1.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.1.1.111/32 OSPF 10 2 D 10.1.1.1 Vlanif100
20.1.1.0/24 OSPF 10 2 D 192.168.2.2 Vlanif200
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 OSPF 10 2 D 10.1.1.1 Vlanif100
192.168.2.0/24 Direct 0 0 D 192.168.2.1 Vlanif200
192.168.2.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.2.2/32 Direct 0 0 D 192.168.2.2 Vlanif200
Run the shutdown command on VLANIF 100 of S9300 A to simulate a link fault.
Run the display vrrp command on S9300 B to view information about the VRRP status. You
can find that S9300 B is the master switch.
<S9300B> display vrrp
Vlanif100 | Virtual Router 1
state : Master
Virtual IP : 10.1.1.111
PriorityRun : 100
PriorityConfig : 100
MasterPriority : 100
Preempt : YES Delay Time : 0
TimerRun : 1
TimerConfig : 1
Auth Type : NONE
Virtual Mac : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
interface Vlanif100
ip address 10.1.1.1 255.255.255.0
vrrp vrid 1 virtual-ip 10.1.1.111
vrrp vrid 1 priority 120
vrrp vrid 1 preempt-mode timer delay 20
#
interface Vlanif200
ip address 192.168.1.1 255.255.255.0
#
ospf 1
area 0.0.0.0
network 192.168.1.0 0.0.0.255
network 10.1.1.0 0.0.0.255
#
return
area 0.0.0.0
network 192.168.1.0 0.0.0.255
network 192.168.2.0 0.0.0.255
network 20.1.1.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-128,
l S9300 A is the master switch in backup group 1 and the backup switch in backup group 2.
l S9300 B is the master switch in backup group 2 and the backup switch in backup group 1.
l Host A on the internal network uses backup group 1 as the gateway, and Host C uses backup
group 2 as the gateway. The backup groups share data flows and back up each other.
Figure 5-128 Networking diagram for configuring VRRP in load balancing mode
Backup group 2
Virtual IP Address: S9300A
10.1.1.112 group 1:Master
group 2:Backup
VLANIF200
192.168.1.1/24
VLANIF100
10.1.1.1/24 VLANIF400
HostA 192.168.1.2/24
10.1.1.100/24 VLANIF300
S9300C 20.1.1.1/24
VLANIF500 HostB
192.168.2.2/24 20.1.1.100/24
HostC VLANIF200
10.1.1.101/24 VLANIF100 192.168.2.1/24
10.1.1.2/24 S9300B
Ethernet group 2:Master
Backup group 1 group 1:Backup
Virtual IP Address:
10.1.1.111
Configuration Roadmap
The configuration roadmap is as follows:
1. Create two backup groups on VLANIF 100 of S9300 A. Configure S9300 A as the master
switch in backup group 1 and the backup switch in backup group 2.
2. Create two backup groups on VLANIF 100 of S9300 B. Configure S9300 B as the master
switch in backup group 2 and the backup switch in backup group 1.
Data Preparation
To complete the configuration, you need the following data:
l IDs and virtual IP addresses of the VRRP backup groups
l Priorities of S9300 A and S9300 B in the backup groups
Procedure
Step 1 Configure interworking between devices on the network.
# Configure the default gateway of Host A to the virtual IP address 10.1.1.111 of backup group
1, the default gateway of Host B to 20.1.1.1, and the default gateway of Host C to the virtual IP
address 10.1.1.112 of backup group 2.
# Configure OSPF between S9300 A, S9300 B, and S9300 C.
Step 2 Configure VRRP backup groups.
# On S9300 A, assign an IP address to VLANIF 100. Create backup group 1 and set the priority
of S9300 A in backup group 1 to 120 so that S9300 A functions as the master. Create backup
group 2 and retain the default priority (100) of S9300 A in backup group 2 so that S9300 A
functions as the backup switch in backup group 2.
<S9300A> system-view
[S9300A] interface Vlanif 100
[S9300A-Vlanif100] ip address 10.1.1.1 24
[S9300A-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.111
[S9300A-Vlanif100] vrrp vrid 1 priority 120
[S9300A-Vlanif100] vrrp vrid 2 virtual-ip 10.1.1.112
[S9300A-Vlanif100] quit
# On S9300 B, assign an IP address to VLANIF 100. Create backup group 1 and retain the default
priority (100) of S9300 B in backup group 1 so that S9300 B functions as the backup. # Create
backup group 2 on S9300 B and set the priority of S9300 B in backup group 2 to 120 so that
S9300 B functions as the master in backup group 2.
<S9300B> system-view
[S9300B] interface Vlanif 100
[S9300B-Vlanif100] ip address 10.1.1.2 24
[S9300B-Vlanif100] vrrp vrid 1 virtual-ip 10.1.1.111
[S9300B-Vlanif100] vrrp vrid 2 virtual-ip 10.1.1.112
[S9300B-Vlanif100] vrrp vrid 2 priority 120
[S9300B-Vlanif100] quit
Run the display vrrp command on S9300 A, you can find that S9300 A is the master in backup
group 1 and the backup in backup group 2.
<S9300A> display vrrp
Vlanif100 | Virtual Router 1
state : Master
Virtual IP : 10.1.1.111
PriorityRun : 120
PriorityConfig : 120
MasterPriority : 120
Preempt : YES Delay Time : 0
TimerRun : 1
TimerConfig : 1
Auth Type : NONE
Virtual Mac : 0000-5e00-0101
Check TTL : YES
Config type : normal-vrrp
Vlanif100 | Virtual Router 2
state : Backup
Virtual IP : 10.1.1.112
PriorityRun : 100
PriorityConfig : 100
MasterPriority : 120
Preempt : YES Delay Time : 0
TimerRun : 1
TimerConfig : 1
Auth Type : NONE
Virtual Mac : 0000-5e00-0102
Check TTL : YES
Config type : normal-vrrp
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
interface Vlanif100
ip address 10.1.1.1 255.255.255.0
vrrp vrid 1 virtual-ip 10.1.1.111
vrrp vrid 1 priority 120
vrrp vrid 2 virtual-ip 10.1.1.112
#
interface Vlanif200
ip address 192.168.1.1 255.255.255.0
#
ospf 1
area 0.0.0.0
network 192.168.1.0 0.0.0.255
network 10.1.1.0 0.0.0.255
#
return
ospf 1
area 0.0.0.0
network 192.168.2.0 0.0.0.255
network 10.1.1.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-129, S9300 A, S9300 B, Switch A, Switch B and the Universal Medium
Gateway (UMG) form a simple next generation network (NGN).
The networking is as follows:
l The UMG connects to S9300 A and S9300 B through Switch A and Switch B.
l S9300 A and S9300 B run VRRP. S9300 A functions as the master, and S9300 B functions
as the backup.
When S9300 A fails, or when the GE link between S9300 A and S9300 B fails, the master/
backup switchover should be completed within 1 second. That is, fast switchover is required on
the bearer network.
Backbone
Network
VLANIF200 VLANIF200
S9300A 192.168.0.1/24 192.168.0.2/24
S9300B
VLANIF100 VLANIF100
10.1.1.1/24 Backup group 10 10.1.1.2/24
Virtual IP address: 10.1.1.3/24
SwitchA SwitchB
VLAN
UMG
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a BFD session on S9300 A and S9300 B to monitor S9300 A and its downlink
S9300 A - Switch A - Switch B - S9300 B.
2. Enable VRRP to track the BFD session on S9300 B. When the BFD session becomes Down,
the priority of S9300 B increases by 40 and then the switchover is triggered.
NOTE
Data Preparation
To complete the configuration, you need the following data:
l Local and remote discriminators of the BFD session
l ID and virtual IP address of the VRRP backup group
l Priorities of the S9300s in the backup group
Procedure
Step 1 Assign IP addresses to the interfaces.
Step 2 Create a BFD session.
# Create a BFD session on S9300 A.
<S9300A> system-view
[S9300A] bfd
[S9300A-bfd] quit
[S9300A] bfd atob bind peer-ip 10.1.1.2 interface Vlanif 100
[S9300A-bfd-session-atob] discriminator local 1
[S9300A-bfd-session-atob] discriminator remote 2
[S9300A-bfd-session-atob] min-rx-interval 50
[S9300A-bfd-session-atob] min-tx-interval 50
[S9300A-bfd-session-atob] commit
[S9300A-bfd-session-atob] quit
Run the display bfd session command on S9300 A and S9300 B, and you can see that the BFD
session is Up. Take S9300 A for example. The display is as follows:
[S9300A] display bfd session all
--------------------------------------------------------------------------------
Local Remote Peer IP Address Interface Name State Type
--------------------------------------------------------------------------------
1 2 10.1.1.2 Vlanif100 Up Static
--------------------------------------------------------------------------------
Total UP/DOWN Session Number : 1/0
# Create backup group 10 on S9300 B and set the priority of S9300 B in backup group 10 to 140
so that S9300 B functions as the backup in backup group 10.
[S9300B] interface Vlanif 100
[S9300B-Vlanif100] vrrp vrid 10 virtual-ip 10.1.1.3
[S9300B-Vlanif100] vrrp vrid 10 priority 140
# Configure VRRP to track the status of the BFD session on the backup switch. If the BFD
session becomes Down, the priority of S9300 B increases by 40.
[S9300B-Vlanif100] vrrp vrid 10 track bfd-session 2 increased 40
[S9300B-Vlanif100] quit
Run the display vrrp command on S9300 A or S9300B, and you can see that S9300 A is the
master and S9300 B is the backup. You can also view the tracked BFD session and its status on
S9300 B.
[S9300A] display vrrp
Vlanif100 | Virtual Router 10
state : Master
Virtual IP : 10.1.1.3
PriorityRun : 160
PriorityConfig : 160
MasterPriority : 160
Preempt : YES Delay Time : 0
TimerRun : 1
TimerConfig : 1
Auth Type : NONE
Virtual Mac : 0000-5e00-0110
Check TTL : YES
Config type : normal-vrrp
[S9300B] display vrrp
Vlanif100 | Virtual Router 10
state : Backup
Virtual IP : 10.1.1.3
PriorityRun : 140
PriorityConfig : 140
MasterPriority : 160
Preempt : YES Delay Time : 0
TimerRun : 1
TimerConfig : 1
Auth Type : NONE
Virtual Mac : 0000-5e00-0110
Check TTL : YES
Config type : normal-vrrp
Track BFD : 2 Priority increased : 40
BFD-Session State : UP
Run the display vrrp command on S9300 A, and you can see that the status of S9300 A changes
to Initialize.
[S9300A] display vrrp
Vlanif100 | Virtual Router 10
state : Initialize
Virtual IP : 10.1.1.3
PriorityRun : 160
PriorityConfig : 160
MasterPriority : 0
Preempt : YES Delay Time : 0
TimerRun : 1
TimerConfig : 1
Auth Type : NONE
Virtual Mac : 0000-5e00-0110
Check TTL : YES
Config type : normal-vrrp
Run the display vrrp command on S9300 B, and you can see that S9300 becomes the master,
and the status of the BFD session changes to Down.
[S9300B] display vrrp
Vlanif100 | Virtual Router 10
state : Master
Virtual IP : 10.1.1.3
PriorityRun : 180
PriorityConfig : 140
MasterPriority : 180
Preempt : YES Delay Time : 0
TimerRun : 1
TimerConfig : 1
Auth Type : NONE
Virtual Mac : 0000-5e00-0110
Check TTL : YES
Config type : normal-vrrp
Track BFD : 2 Priority increased : 40
BFD-Session State : DOWN
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
bfd
#
interface Vlanif100
ip address 10.1.1.1 255.255.255.0
vrrp vrid 10 virtual-ip 10.1.1.3
vrrp vrid 10 priority 160
#
bfd atob bind peer-ip 10.1.1.2 interface Vlanif 100
discriminator local 1
discriminator remote 2
min-tx-interval 50
min-rx-interval 50
#
return
Networking Requirements
Backup group 1
Virtual IP Address
10.100.10.1/24
Network1 S9300A
VLANIF100 Master
10.100.10.0/24 10.100.10.2/24 VLANIF300
202.38.10.2/24 Network3
0 0 4
N IF2 .2/2 202.38.10.0/24
L A . 20
V 0
.10
10 10V
.10 LA
0.1 NIF
0.3 100 Backup group 3
/24 Virtual IP Address
Network2 VLANIF200 VLANIF300 202.38.10.1/24
10.100.20.3/24 202.38.10.3/24
10.100.20.0/24
S9300B
Backup
Backup group 2
Virtual IP Address
10.100.20.1/24
l S9300 A and S9300 B work in master/backup mode. S9300 A functions as the master switch
and S9300 B functions as the backup switch.
l The address of Network 1 is 10.100.10.0/24; the address of Network 2 is 10.100.20.0/24;
Network 3 is an external network. Two switches connect to the networks through LAN
switches.
l The virtual IP address of the backup group configured for Network 1 is 10.100.10.1; the
virtual IP address of the backup group configured for Network 2 is 10.100.20.1; the virtual
IP address of the backup group configured for Network 3 is 202.38.10.1.
S9300 A and S9300 B connect to Network 1, Network 2, and Network 3 through VLANIF 100,
VLANIF 200, and VLANIF 300 respectively.
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l IP address of each interface
l Virtual IP address of each VRRP backup group
l Priority of each VRRP backup group
According to the algorithm of the priority of the VRRP management group, the priority of
each member of a VRRP backup group must be greater than 128 to ensure that the priority
of the VRRP management group is reduced by at least 1 when an interface fails.
l Priority of the VRRP management group
Procedure
Step 1 Assign IP addresses to interfaces of the S9300s.
# Assign IP addresses to interfaces of S9300 A.
<S9300A> system-view
[S9300A] interface Vlanif 100
[S9300A-Vlanif100] ip address 10.100.10.2 24
[S9300A-Vlanif100] quit
[S9300A] interface Vlanif 200
[S9300A-Vlanif200] ip address 10.100.20.2 24
[S9300A-Vlanif200] quit
[S9300A] interface Vlanif 300
[S9300A-Vlanif300] ip address 202.38.10.2 24
[S9300A-Vlanif300] quit
Step 4 Add the VRRP backup groups to the VRRP management group on the S9300s. Ensure that the
management group has at least one data channel.
Step 5 Set the priority of the VRRP management group and enable the VRRP management group.
In this example, the priority of the VRRP management is calculated through the priorities of the
VRRP backup groups.
Run the display vrrp-group verbose command on S9300 A and S9300 B to view information
about the VRRP management group.
<S9300A> display vrrp-group verbose
total number of vrrp-groups: 1
vrrp-group 1
state: master
enable: yes
priority config: 100
using vrrp priority: yes
priority run: 130
preempt: no
timer: 1000
group-send: no
peer status: online
create time: 00:04:24
last change time: 00:04:24
vrrp number: 3
interface: Vlanif100, vrrp id: 1 peer up, data
interface: Vlanif200, vrrp id: 2 peer up
interface: Vlanif300, vrrp id: 3 peer up
<S9300B> display vrrp-group verbose
total number of vrrp-groups: 1
vrrp-group 1
state: slave
enable: yes
priority config: 100
using vrrp priority: yes
priority run: 100
preempt: yes, delay time: 0
timer: 1000
group-send: no
peer status: online
create time: 00:02:19
last change time: 00:00:21
vrrp number: 3
interface: Vlanif100, vrrp id: 1 up, data
interface: Vlanif200, vrrp id: 2 up
interface: Vlanif300, vrrp id: 3 up
Disable VLANIF 200 of S9300 A, and you can see that the status of S9300 A and S9300 B
changes.
[S9300A] interface Vlanif 200
[S9300A-Vlanif200] shutdown
[S9300A-Vlanif200] quit
[S9300A] quit
<S9300A> display vrrp-group verbose
vrrp-group 1
state: master
priority config: 100
using vrrp priority: yes
priority run: 100
preempt: yes, delay time: 0
timer: 1000
group-send: no
peer status: online
create time: 00:05:35
last change time: 00:00:30
vrrp number: 3
interface: Vlanif100, vrrp id: 1 up, data
interface: Vlanif200, vrrp id: 2 peer down
interface: Vlanif300, vrrp id: 3 up
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
vrrp-group 1
vrrp-group enable
vrrp-group priority using-vrrp-priority
vrrp-group preempt delay 0
#
interface Vlanif100
ip address 10.100.10.2 255.255.255.0
vrrp vrid 1 virtual-ip 10.100.10.1
vrrp vrid 1 priority 130
add vrrp vrid 1 data to vrrp-group 1
#
interface Vlanif200
ip address 10.100.20.2 255.255.255.0
vrrp vrid 2 virtual-ip 10.100.20.1
vrrp vrid 2 priority 130
add vrrp vrid 2 to vrrp-group 1
#
interface Vlanif300
ip address 202.38.10.2 255.255.255.0
vrrp vrid 3 virtual-ip 202.38.10.1
vrrp vrid 3 priority 130
add vrrp vrid 3 to vrrp-group 1
#
return
Networking Requirements
Figure 5-131 Networking diagram of VRRP management groups in load balancing mode
VLANIF200 VLANIF300
10.100.20.3/24 202.38.10.3/24
S9300B Backup group 3
Network2 Virtual IP Address
Slave /Master
10.100.20.0/24 202.38.10.1/24
l S9300 A and S9300 B connect to Network 1, Network 2, and Network 3 through VLANIF
100, VLANIF 200, and VLANIF 300 respectively.
l Add three interfaces of S9300 A and S9300 B to six VRRP backup groups.
l Create two VRRP management groups to control these six VRRP backup groups:
– VRRP backup group 1, VRRP backup group 2, and VRRP backup group 3 are added
into VRRP management group 1.
– VRRP backup group 4, VRRP backup group 5, and VRRP backup group 6 are added
into VRRP management group 2.
l The status of the VRRP management groups on S9300 A and S9300 B:
– S9300 A: VRRP management group 1 works in the Master state, and the VRRP
management group 2 works in Backup state.
– S9300 B: VRRP management group 1 works in Backup state, and the VRRP
management group 2 works in Master state.
l The address of Network 1 is 10.100.10.0/24; the address of Network 2 is 10.100.20.0/24;
Network 3 is an external network. The S9300s connect to the networks through LAN
switches.
l The virtual IP addresses of backup groups configured for Network 1 are 10.100.10.1 and
10.100.10.101. The default gateway of part of hosts in Network 1 is 10.100.10.1, and the
default gateway of other hosts in Network 1 is 10.100.10.101. The two gateways performs
load balancing. The configuration of default gateways for hosts on Network 2 and Network
3 are the same as that on Network 1.
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Assign IP addresses to interfaces. The configuration procedure is not mentioned here.
Step 2 # Create VRRP backup groups.
# Create VRRP backup groups on S9300 A and set virtual IP addresses and priorities of these
backup groups.
<S9300A> system-view
[S9300A] interface Vlanif 100
[S9300A-Vlanif100] vrrp vrid 1 virtual-ip 10.100.10.1
[S9300A-Vlanif100] vrrp vrid 1 priority 130
[S9300A-Vlanif100] vrrp vrid 4 virtual-ip 10.100.10.101
[S9300A-Vlanif100] vrrp vrid 4 priority 130
[S9300A-Vlanif100] quit
[S9300A] interface Vlanif 200
[S9300A-Vlanif200] vrrp vrid 2 virtual-ip 10.100.20.1
[S9300A-Vlanif200] vrrp vrid 5 virtual-ip 10.100.20.101
[S9300A-Vlanif200] vrrp vrid 2 priority 130
[S9300A-Vlanif200] vrrp vrid 5 priority 130
[S9300A-Vlanif200] quit
# Create VRRP backup groups on S9300 B and set virtual IP addresses and priorities of these
backup groups.
<S9300B> system-view
[S9300B] interface Vlanif 100
[S9300B-Vlanif100] vrrp vrid 1 virtual-ip 10.100.10.1
[S9300B-Vlanif100] vrrp vrid 4 virtual-ip 10.100.10.101
[S9300B-Vlanif100] vrrp vrid 1 priority 130
[S9300B-Vlanif100] vrrp vrid 4 priority 130
[S9300B-Vlanif100] interface Vlanif 200
[S9300B-Vlanif200] vrrp vrid 2 virtual-ip 10.100.20.1
[S9300B-Vlanif200] vrrp vrid 5 virtual-ip 10.100.20.101
[S9300B-Vlanif200] vrrp vrid 2 priority 130
[S9300B-Vlanif200] vrrp vrid 5 priority 130
[S9300B-Vlanif200] interface Vlanif 300
[S9300B-Vlanif300] vrrp vrid 3 virtual-ip 202.38.10.1
[S9300B-Vlanif300] vrrp vrid 6 virtual-ip 202.38.10.101
[S9300B-Vlanif300] vrrp vrid 3 priority 130
[S9300B-Vlanif300] vrrp vrid 6 priority 130
# Create VRRP management group 1 and VRRP management group 2 on S9300 B. Set the
priority of VRRP management group 2 to 101, and retain the default priority 100 of VRRP
management group 1. Enable preemption in VRRP management group 1 and VRRP
management group 1.
<S9300B> system-view
[S9300B] vrrp-group 1
[S9300B-vrrp-group-1] vrrp-group preempt
[S9300B-vrrp-group-1] vrrp group 2
[S9300B-vrrp-group-2] vrrp-group priority 101
[S9300B-vrrp-group-2] vrrp-group preempt
Step 4 Add the VRRP backup groups to the VRRP management groups.
# On S9300 A, add backup groups 1, 2, and 3 to VRRP management group 1. Ensure that the
VRRP management group has at least one data channel. Repeat this procedure on S9300 B.
<S9300A> system-view
[S9300A] interface Vlanif 100
[S9300A-Vlanif100] add vrrp vrid 1 data to vrrp-group 1
[S9300A-Vlanif100] interface Vlanif 200
[S9300A-Vlanif200] add vrrp vrid 2 to vrrp-group 1
[S9300A-Vlanif200] interface Vlanif 300
[S9300A-Vlanif300] add vrrp vrid 3 to vrrp-group 1
# On S9300 A, add backup groups 4, 5, and 6 to VRRP management group 2. Ensure that the
VRRP management group has at least one data channel. Repeat this procedure on S9300 B.
<S9300A> system-view
[S9300A] interface Vlanif 100
[S9300A-Vlanif100] add vrrp vrid 4 to vrrp-group 2
[S9300A-Vlanif100] interface Vlanif 200
[S9300A-Vlanif200] add vrrp vrid 5 data to vrrp-group 2
[S9300A-Vlanif200] interface Vlanif 300
[S9300A-Vlanif300] add vrrp vrid 6 to vrrp-group 2
# Run the display vrrp-group verbose command on S9300 A to view the configuration of the
VRRP management groups.
<S9300A> display vrrp-group verbose
total number of vrrp-groups: 2
vrrp-group 1
state: master
enable: yes
priority config: 101
using vrrp priority: no
priority run: 101
preempt: yes, delay time: 0
timer: 1000
group-send: no
peer status: online
create time: 01:01:20
last change time: 00:00:06
vrrp number: 3
interface: Vlanif100, vrrp id: 1 up, data
interface: Vlanif200, vrrp id: 2 up
interface: Vlanif300, vrrp id: 3 up
vrrp-group 2
state: slave
enable: yes
priority config: 100
using vrrp priority: no
priority run: 100
preempt: yes, delay time: 0
timer: 1000
group-send: no
peer status: online
create time: 00:06:17
last change time: 00:00:08
vrrp number: 3
interface: Vlanif100, vrrp id: 5 up, data
interface: Vlanif200, vrrp id: 4 up
interface: Vlanif300, vrrp id: 6 up
# Run the display vrrp-group verbose command on S9300 B to view the configuration of the
VRRP management groups.
<S9300B> display vrrp-group verbose
total number of vrrp-groups: 2
vrrp-group 1
state: slave
priority config: 100
using vrrp priority: no
priority run: 100
preempt: yes, delay time: 0
timer: 1000
group-send: no
peer status: online
create time: 00:40:48
last change time: 00:00:26
vrrp number: 3
interface: Vlanif100, vrrp id: 1 up, data
interface: Vlanif200, vrrp id: 2 up
interface: Vlanif300, vrrp id: 3 up
vrrp-group 2
state: master
priority config: 101
using vrrp priority: no
priority run: 101
preempt: yes, delay time: 0
timer: 1000
group-send: no
peer status: online
create time: 00:05:05
last change time: 00:01:08
vrrp number: 3
interface: Vlanif200, vrrp id: 5 up, data
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
vrrp-group 1
vrrp-group enable
vrrp-group priority 101
vrrp-group preempt delay 0
vrrp-group 2
vrrp-group enable
vrrp-group preempt delay 0
#
interface Vlanif100
ip address 10.100.10.2 255.255.255.0
vrrp vrid 1 virtual-ip 10.100.10.1
vrrp vrid 1 priority 130
add vrrp vrid 1 data to vrrp-group 1
vrrp vrid 4 virtual-ip 10.100.10.101
vrrp vrid 4 priority 130
add vrrp vrid 4 to vrrp-group 2
bfd
#
interface Vlanif200
ip address 10.100.20.2 255.255.255.0
vrrp vrid 2 virtual-ip 10.100.20.1
vrrp vrid 2 priority 130
add vrrp vrid 2 to vrrp-group 1
vrrp vrid 5 virtual-ip 10.100.20.101
vrrp vrid 5 priority 130
add vrrp vrid 5 data to vrrp-group 2
#
interface Vlanif300
ip address 202.38.10.2 255.255.255.0
vrrp vrid 3 virtual-ip 202.38.10.1
vrrp vrid 3 priority 130
add vrrp vrid 3 to vrrp-group 1
vrrp vrid 6 virtual-ip 202.38.10.101
vrrp vrid 6 priority 130
add vrrp vrid 6 to vrrp-group 2
#
return
Networking Requirements
VRRP backup groups perform master/backup switchover fast in preemption mode. In non-
preemption mode or in the case where the VRRP interface is Down, the switchover takes several
seconds, which cannot meet the requirements of telecommunication.
BFD can detect the failure of links within one second. The VRRP management group speeds up
the switchover by tracking BFD sessions. Thus, the master/backup switchover completes within
one second.
When the BFD sessions are tracked, the interval at which the VRRP management group sends
packets can be set to a relatively large value to reduce the load of the main control board.
Backup group 1
Virtual IP Address
10.100.10.1/24
Network1
10.100.10.0/24 S9300A
Master/Slave
VLANIF300
VLANIF100 202.38.10.2/24
10.100.10.2/24
00 4
IF2 .2/2
AN .20
V L 100 Network3
.
10 10VLA 202.38.10.0/24
.10
0.1 NIF1
0.3 00
/24
VLANIF200 VLANIF300
10.100.20.3/24 202.38.10.3/24Backup group 3
Network2 S9300B
Slave/Master Virtual IP Address
10.100.20.0/24 202.38.10.1/24
Backup group 2
Virtual IP Address
10.100.20.1/24
Configuration Roadmap
The configuration roadmap is as follows:
1. Create a VRRP management group.
2. Enable BFD in the system and interface views.
3. Create a BFD session.
4. Configure the VRRP management group to track the BFD session.
Data Preparation
To complete the configuration, you need the following data:
l IP address, type and number of the interfaces of the direct link detected by the BFD session
l Local and remote discriminators of the BFD session
Procedure
Step 1 Assign IP addresses to interfaces. The configuration procedure is not mentioned here.
Step 2 Create VRRP backup groups on the S9300s.
# Configure VRRP backup groups on interfaces of S9300 A.
<S9300A> system-view
[S9300A] interface Vlanif 100
Step 4 Add the VRRP backup groups to the VRRP management group on the S9300s. Ensure that the
management group has at least one data channel.
Step 5 Set the priority of the VRRP management group and enable the VRRP management group.
In this example, the priority of the VRRP management is calculated through the priorities of the
VRRP backup groups.
<S9300B> system-view
[S9300B] vrrp-group 1
[S9300B-vrrpgroup-1] vrrp-group priority using-vrrp-priority
[S9300B-vrrpgroup-1] vrrp-group preempt
[S9300B-vrrpgroup-1] vrrp-group enable
Step 8 Configure the VRRP management group to track the BFD sessions.
# Configure the VRRP management group to track the BFD session in preemption mode on
S9300 A and S9300 B.
<S9300A> system-view
[S9300A] vrrp-group 1 track bfd-session 1 preempt
# Run the display vrrp-group verbose command to view the result of the configuration.
<S9300A> display vrrp-group verbose
Total number of vrrp-groups: 1
Vrrp-group 1
state: master
enable: yes
priority config: 100
using vrrp priority: yes
priority run: 100
preempt: yes, delay time: 0
timer: 1000
group-send: no
peer status: online
create time: 00:40:25
last change time: 00:40:25
track bfd: 1, preempt mode, bfd-session state: up
vrrp number: 3
Interface: Vlanif100, vrrp id: 1 Up, data
Interface: Vlanif200, vrrp id: 2 Up,
Interface: Vlanif300, vrrp id: 3 Up,
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
bfd
#
vrrp-group 1
vrrp-group enable
vrrp-group priority using-vrrp-priority
vrrp-group preempt delay 0
#
interface Vlanif100
ip address 10.100.10.2 255.255.255.0
vrrp vrid 1 virtual-ip 10.100.10.1
add vrrp vrid 1 to vrrp-group 1
bfd
#
interface Vlanif200
ip address 10.100.20.2 255.255.255.0
vrrp vrid 2 virtual-ip 10.100.20.1
add vrrp vrid 2 to vrrp-group 1
#
interface Vlanif300
ip address 202.38.10.2 255.255.255.0
vrrp vrid 3 virtual-ip 202.38.10.1
add vrrp vrid 3 to vrrp-group 1
#
bfd atob bind peer-ip 10.100.10.3 interface Vlanif100
discriminator local 1
discriminator remote 2
min-tx-interval 20
min-rx-interval 20
commit
#
vrrp-group 1 track bfd-session 1 preempt
#
return
Networking Requirements
Interfaces of the S9300 are Layer 2 interfaces. If you need to detect the connectivity of the Layer
2 forwarding link between two directly connected S9300s, configure single-hop BFD, and bind
the BFD session to a multicast IP address and local interface.
As shown in Figure 5-133, a BFD session is created to detect the connectivity of the Layer 2
link between S9300-A and S9300-B.
Figure 5-133 Networking diagram of single-hop BFD (for Layer 2 forwarding link)
GE1/0/1 GE1/0/1
S9300-A S9300-B
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a BFD session on S9300-A to detect the direct link from S9300-A to S9300-B.
2. Configure a BFD session on S9300-B to detect the direct link from S9300-B to S9300-A.
Data Preparation
To complete the configuration, you need the following data:
l Type and number of the interface bound to the BFD session
l Local and remote identifiers of the BFD session
Use the default values of the minimum sending interval, the minimum receiving interval, and
the local detection multiplier of BFD control packets.
Procedure
Step 1 Configure single-hop BFD on S9300-A.
# Enable BFD on S9300-A.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] bfd
[S9300-A-bfd] quit
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
bfd
#
bfd atob bind peer-ip default-ip interface GigabitEthernet1/0/1
discriminator local 1
discriminator remote 2
commit
#
return
Networking Requirements
As shown in Figure 5-134, a BFD session is used to test the multi-hop path between S9300-A
and S9300-C.
Interfaces of the S9300 are Layer 2 interfaces. To configure multi-hop BFD, you need to add an
interface to a VLAN, create a VLANIF interface, and assign an IP address to the VLANIF
interface.
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a BFD session on S9300-A to detect the multi-hop path from S9300-A to
S9300-C.
2. Configure a BFD session on S9300-C to detect the multi-hop path from S9300-C to
S9300-A.
Data Preparation
To complete the configuration, you need the following data:
Use the default values of the minimum sending interval, the minimum receiving interval, and
the local detection multiplier of a BFD control packet.
Procedure
Step 1 Add interfaces to VLANs, create VLANIF interfaces, and assign an IP address to each VLANIF
interface.
The configurations of S9300-B and S9300-C are the same as the configuration of S9300-A, and
are not mentioned here.
The configuration of S9300-C is the same as the configuration of S9300-A, and is not mentioned
here.
After the configuration is complete, run the display bfd session command on S9300-A and
S9300-C, and you can find that a BFD session is set up and is in Up state.
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
bfd
#
interface Vlanif10
ip address 10.1.1.1 255.255.0.0
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
bfd atoc bind peer-ip 10.2.1.2
discriminator local 10
discriminator remote 20
commit
#
ip route-static 10.2.0.0 255.255.0.0 10.1.1.2
#
return
#
return
Example for Associating the BFD Status with the Interface Status (1)
Networking Requirements
As shown in Figure 5-135, transmission devices exist on the link. After the BFD status is
associated with the interface status, the status change of the BFD session between GE 1/0/0 of
S9300 A and GE 1/0/0 of S9300 B affects the protocol status of the interfaces when the link
between transmission devices fails. Fast convergence of routes is thus triggered.
Figure 5-135 Networking diagram for associating the BFD session status with the interface
status
GE1/0/0 GE1/0/0
S9300A S9300B
Configuration Roadmap
The configuration roadmap is as follows:
1. Create a BFD session on S9300 A.
2. Create a BFD session on S9300 B.
3. Associate the BFD status with the interface status on S9300 A when the BFD session is
Up.
4. Associate the BFD status with the interface status on S9300 B when the BFD session is
Up.
Data Preparation
To complete the configuration, you need the following data:
l Peer IP address bound to the BFD session
l Local interface that sends and receives BFD control packets
l Local discriminator and remote discriminator of the BFD session
Use the default values of the minimum sending interval, the minimum receiving interval, and
the local detection multiplier of a BFD control packet.
Procedure
Step 1 Set the IP addresses of the interfaces through which S9300 A and S9300 B are directly connected.
# Assign an IP address to the interface of S9300 A.
<Quidway> system-view
[Quidway] sysname S9300A
[S9300A] vlan 10
[S9300A-vlan10] quit
[S9300A] interface gigabitethernet 1/0/0
[S9300A-GigabitEthernet1/0/0] port link-type access
[S9300A-GigabitEthernet1/0/0] port default vlan 10
[S9300A-GigabitEthernet1/0/0] quit
[S9300A] interface vlanif 10
[S9300A-Vlanif10] ip address 10.1.1.1 24
[S9300A-Vlanif10] quit
# Run the display bfd session all verbose command on S9300 A and S9300 B, and you can
find that a single-hop BFD session is set up and is in Up state. Take S9300 A for example. The
display is as follows:
[S9300A] display bfd session all verbose
--------------------------------------------------------------------------------
Session MIndex : 16384 (One Hop) State : Up Name : atob
--------------------------------------------------------------------------------
Local Discriminator : 10 Remote Discriminator : 20
Session Detect Mode : Asynchronous Mode Without Echo Function
BFD Bind Type : Interface(GigabitEthernet1/0/0)
Bind Session Type : Static
Bind Peer Ip Address : 224.0.0.184
NextHop Ip Address : 224.0.0.184
Bind Interface : GigabitEthernet1/0/0
FSM Board Id : 3 TOS-EXP : 6
Min Tx Interval (ms) : 10 Min Rx Interval (ms) : 10
Actual Tx Interval (ms): 10 Actual Rx Interval (ms): 10
Local Detect Multi : 3 Detect Interval (ms) : 30
Echo Passive : Disable Acl Number : --
Proc interface status : Enable Process PST : Disable
WTR Interval (ms) : -- Local Demand Mode : Disable
Active Multi : 3
Session Description : --
--------------------------------------------------------------------------------
Step 3 Associate the BFD session status with the interface status.
# Associate the BFD status with the interface status on S9300 A.
[S9300A] bfd
[S9300A-bfd] quit
[S9300A] bfd atob
[S9300A-bfd-session-atob] process-interface-status
[S9300A-bfd-session-atob] commit
[S9300A-bfd-session-atob] quit
Run the shutdown command on GE 1/0/0 of S9300 B so that the BFD session is Down.
Run the display bfd session all verbose and display interface gigabitethernet 1/0/0 commands
on S9300 A, and you can find that the status of the BFD session is Down, and the status of GE
1/0/0 is Up (BFD status down).
[S9300A] display bfd session all verbose
--------------------------------------------------------------------------------
Session MIndex : 16384 (One Hop) State : Down Name : atob
--------------------------------------------------------------------------------
Local Discriminator : 10 Remote Discriminator : 20
Session Detect Mode : Asynchronous Mode Without Echo Function
BFD Bind Type : Interface(GigabitEthernet1/0/0)
Bind Session Type : Static
Bind Peer Ip Address : 224.0.0.184
NextHop Ip Address : 224.0.0.184
Bind Interface : GigabitEthernet1/0/0
FSM Board Id : 3 TOS-EXP : 6
Min Tx Interval (ms) : 10 Min Rx Interval (ms) : 10
Actual Tx Interval (ms): 10 Actual Rx Interval (ms): 10
Local Detect Multi : 3 Detect Interval (ms) : 30
Echo Passive : Disable Acl Number : --
Proc interface status : Enable Process PST : Disable
WTR Interval (ms) : -- Local Demand Mode : Disable
Active Multi : 3
Last Local Diagnostic : Neighbor Signaled Session Down
Bind Application : IFNET
Session TX TmrID : -- Session Detect TmrID : --
Session Init TmrID : -- Session WTR TmrID : --
PDT Index : FSM-0 | RCV-0 | IF-0 | TOKEN-0
Session Description : --
--------------------------------------------------------------------------------
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
vlan batch 10
#
bfd
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
bfd atob bind peer-ip default-ip interface GigabitEthernet1/0/0
discriminator local 10
discriminator remote 20
process-interface-status
commit
#
return
Networking Requirements
As shown in Figure 5-136, a user network is connected to an ISP network through S9300 A and
S9300 B. S9300 A functions as the CE device, and S9300 B functions as the underlayer PE
(UPE) device. The networking requirements are as follows:
l Automatic connectivity detection can be performed between S9300 A and S9300 B. After
detecting connectivity faults, S9300 A and S9300 B generate alarms.
l S9300 B monitors the errored frames, errored codes, and errored frame seconds on GE
2/0/1. When the number of errored frames, errored codes, or errored frame seconds exceeds
the threshold, S9300 B generates an alarm.
S9300A S9300B
User ISP
network network
GE1/0/1 GE2/0/1
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l Period for detecting errored frames on GE2/0/1 of S9300 B (5 seconds) and threshold of
number of errored frames (5)
l Period for detecting errored codes on GE2/0/1 of S9300 B (5 seconds) and threshold of
number of errored codes (5)
l Period for detecting errored frame seconds on GE 2/0/1 of S9300 B (120 seconds) and
threshold of number of errored frame seconds (5)
Procedure
Step 1 Enable EFM OAM globally.
Step 4 Configure GE 2/0/1 of S9300 B to detect the errored frames, errored codes, and errored frame
seconds.
# Configure GE 2/0/1 of S9300 B to detect the errored frames.
[S9300B] interface gigabitethernet 2/0/1
[S9300B-GigabitEthernet2/0/1] efm error-frame period 5
[S9300B-GigabitEthernet2/0/1] efm error-frame threshold 5
[S9300B-GigabitEthernet2/0/1] efm error-frame notification enable
# Run the display efm command on S9300 B. If the function of detecting errored frames, errored
codes, and errored frame seconds on GE 2/0/1 is configured corrected, the following information
is displayed:
[S9300B] display efm interface gigabitethernet 2/0/1
Item Value
-------------------------------------
Interface: GigabitEthernet2/0/1
EFM Enable Flag: enable
Mode: active
OAMPDU MaxSize: 128
ErrCodeNotification: enable
ErrCodePeriod: 5
ErrCodeThreshold: 5
ErrFrameNotification: enable
ErrFramePeriod: 5
ErrFrameThreshold: 5
ErrFrameSecondNotification: enable
ErrFrameSecondPeriod: 120
ErrFrameSecondThreshold: 5
TriggerIfDown: disable
Remote MAC: 0010-0010-0010
Remote EFM Enable Flag: enable
Remote Mode: passive
Remote MaxSize: 128
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
efm enable
#
interface GigabitEthernet1/0/1
efm mode passive
efm enable
#
return
Networking Requirements
As shown in Figure 5-137, a user network is connected to an ISP network through S9300 A and
S9300 B. S9300 A functions as the CE device, and S9300 B functions as the UPE device. The
link between S9300 A and S9300 B is newly established. The ISP needs to test the packet loss
ratio on the link on S9300 B before using the link.
Figure 5-137 Networking diagram for testing the packet loss ratio on the link
S9300A S9300B
User ISP
network network
GE1/0/1 GE2/0/1
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable EFM OAM on S9300 A and S9300 B. Configure EFM OAM on GE 1/0/1 of
S9300 A to work in passive mode.
2. Enable EFM OAM remote loopback on S9300 B.
3. Send test packets from S9300 B to S9300 A.
4. Check the returned test packets on S9300 B.
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Configure basic functions of EFM OAM.
# If EFM OAM is configured correctly on S9300 A and S9300 B, GE 2/0/1 and GE 1/0/1 start
the handshake after negotiation. Run the display efm session command on S9300 A or S9300
B, and you can find that the EFM OAM protocol is in detect state.
[S9300B] display efm session interface gigabitethernet 2/0/1
Interface EFM State Loopback Timeout
--------------------------------------------------------------------
GigabitEthernet2/0/1 detect --
Run the display efm session command on S9300 B. If the EFM OAM protocol on GE 2/0/1 is
in Loopback (control) state, that is, GE 2/0/1 initiates remote loopback, it indicates that the
configuration is successful. The displayed information is as follows:
[S9300B] display efm session interface gigabitethernet2/0/1
Interface EFM State Loopback Timeout
----------------------------------------------------------------------
GigabitEthernet2/0/1 Loopback(control) 20
Run the display efm session command on S9300 A. If the EFM OAM protocol on GE 1/0/1 is
in Loopback (be controlled) state, that is, GE 1/0/1 responds to remote loopback, it indicates
that the configuration is successful. The displayed information is as follows:
[S9300A] display efm session interface gigabitethernet1/0/1
Interface EFM State Loopback Timeout
----------------------------------------------------------------------
GigabitEthernet1/0/1 Loopback(be controlled) --
You can obtain the packet loss ratio on the link based on the preceding data.
Step 5 Disable EFM OAM remote loopback.
[S9300B] interface gigabitethernet 2/0/1
[S9300B-GigabitEthernet2/0/1] efm loopback stop
[S9300B-GigabitEthernet2/0/1] quit
NOTE
By default, the timeout interval for remote loopback is 20 minutes. After 20 minutes, remote loopback
stops. To disable remote loopback, you can perform the preceding step.
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
efm enable
#
interface GigabitEthernet1/0/1
efm mode passive
efm enable
#
return
Networking Requirements
As shown in Figure 5-138, the Ethernet is managed by two ISPs. S9300 A, S9300 B, and
S9300 D are managed by ISP 1; S9300 C, S9300 E, S9300 F, S9300 G, S9300 H, and S9300 I
are managed by ISP 2. Connectivity of links needs to be tested on the network.
Figure 5-138 Networking diagram for configuring basic functions of Ethernet CFM
VLAN2
GE1/0/1
S9300A S9300E
S9300I GE1/0/1
GE1/0/0
S9300B GE1/0/0
S9300C GE1/0/2
GE1/0/0
MD1 S9300G
S9300H
GE1/0/0
GE1/0/2 GE1/0/1
MD1 MD2
M EP in MA1 M EP in MA3
M EP in MA2
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l Level of MD 1: 6
l Level of MD 2: 4
Procedure
Step 1 Create VLANs and add interfaces to the VLANs. The configuration procedure is not mentioned
here.
Step 2 Create MD 1.
# Create MD 1 on S9300 A.
<S9300A> system-view
[S9300A] cfm enable
[S9300A] cfm md md1 level 6
# Create MD 1 on S9300s B to I.
The configurations of these S9300s are similar to the configuration of S9300 A, and are not
mentioned here.
Step 3 Create MA 1 in MD 1 on all the S9300s except S9300 G.
# Create MA 1 in MD 1 on S9300 A.
[S9300A-md-md1] ma ma1
[S9300A-md-md1-ma-ma1] map vlan 2
[S9300A-md-md1-ma-ma1] quit
# Create MA 1 in MD 1 on S9300s B to I.
The configurations of these S9300s are similar to the configuration of S9300 A, and are not
mentioned here.
Step 4 Create MA 2 in MD 1 on all the S9300s except S9300 E and S9300 I.
# Create MA 2 in MD 1 on S9300 A.
[S9300A-md-md1] ma ma2
[S9300A-md-md1-ma-ma2] map vlan 3
[S9300A-md-md1-ma-ma2] quit
[S9300A-md-md1] quit
# Create MA 2 in MD 1 on S9300s B to H.
The configurations of these S9300s are similar to the configuration of S9300 A, and are not
mentioned here.
Step 5 Create MD 2 and create MA 3 in MD 2 on S9300 A, S9300 B, S9300 C, and S9300 D.
# Create MD 2 and create MA 3 in MD 2 on S9300 A.
[S9300A] cfm md md2 level 4
[S9300A-md-md2] ma ma3
[S9300A-md-md2-ma-ma3] map vlan 4
[S9300A-md-md2-ma-ma3] quit
[S9300A-md-md2] quit
The configurations of these S9300s are similar to the configuration of S9300 A, and are not
mentioned here.
Step 6 Create MEPs and RMEPs in MA 1 of MD 1 on S9300 I, S9300 H, and S9300 E.
# Create a MEP in MA 1 of MD 1 on S9300 E.
[S9300E] cfm md md1
[S9300rE-md-md1] ma ma1
[S9300E-md-md1-ma-ma1] mep mep-id 3 interface gigabitethernet 1/0/1 inward
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
vlan batch 2 to 4
#
cfm enable
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 2 to 4
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4
#
interface GigabitEthernet1/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4
#
cfm md md1 level 6
ma ma1
map vlan 2
ma ma2
map vlan 3
#
cfm md md2 level 4
ma ma3
map vlan 4
mep mep-id 1 interface gigabitethernet 1/0/0 inward
mep ccm-send mep-id 1 enable
remote-mep mep-id 2
remote-mep ccm-receive mep-id 2 enable
remote-mep mep-id 3
remote-mep ccm-receive mep-id 3 enable
#
return
l Configuration file of S9300 B
#
sysname S9300B
#
vlan batch 2 to 4
#
cfm enable
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 2 to 4
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4
#
cfm md md1 level 6
ma ma1
map vlan 2
ma ma2
map vlan 3
#
cfm md md2 level 4
ma ma3
map vlan 4
#
return
l Configuration file of S9300 C
#
sysname S9300C
#
vlan batch 2 to 4
#
cfm enable
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 2 to 4
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4
#
cfm md md1 level 6
ma ma1
map vlan 2
ma ma2
map vlan 3
#
cfm md md2 level 4
ma ma3
map vlan 4
mep mep-id 2 interface gigabitethernet 1/0/0 outward
mep ccm-send mep-id 2 enable
remote-mep mep-id 1
#
sysname S9300F
#
vlan batch 2 to 3
#
cfm enable
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 2
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
interface GigabitEthernet1/0/2
port link-type trunk
port trunk allow-pass vlan 3
#
cfm md md1 level 6
ma ma1
map vlan 2
ma ma2
map vlan 3
#
return
l Configuration file of S9300 G
#
sysname S9300G
#
vlan batch 3
#
cfm enable
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 3
#
interface GigabitEthernet1/0/2
port link-type trunk
port trunk allow-pass vlan 3
#
cfm md md1 level 6
ma ma2
map vlan 3
mep mep-id 2 interface gigabitethernet 1/0/0 inward
mep ccm-send mep-id 2 enable
remote-mep mep-id 1
remote-mep ccm-receive mep-id 1 enable
#
return
l Configuration file of S9300 H
#
sysname S9300H
#
vlan batch 2 to 3
#
cfm enable
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 2 to 3
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 3
#
interface GigabitEthernet1/0/2
Networking Requirements
As shown in Figure 5-139, to implement end-to-end link fault detection, you need to enable
EFM OAM between S9300 A and S9300 B and between S9300 C and S9300 D. and enable
Ethernet CFM between S9300 B and S9300 C. When a fault occurs on the link between
S9300 A and S9300 B, Ethernet CFM is triggered to send trap message to S9300 D. When a
fault occurs on the link between S9300 C and S9300 D, Ethernet CFM is triggered to send trap
message to S9300 A.
Figure 5-139 Networking diagram for associating EFM OAM with Ethernet CFM
S9300A S9300B S9300C S9300D
VLAN10 VLAN10
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs and add interfaces to the VLANs.
2. Configure EFM OAM between S9300 A and S9300 B.
3. Configure Ethernet CFM between the S9300 B and S9300 C.
4. Configure EFM OAM between S9300 C and S9300 D.
5. Associate EFM OAM with Ethernet CFM on S9300 B and S9300 C.
Procedure
Step 1 Create VLAN 10 and add interfaces to VLAN 10.
Step 2 Enable EFM OAM globally on S9300 A and S9300 B.
# Configure S9300 A.
[S9300A] efm enable
[S9300A] interface gigabitethernet 1/0/0
[S9300A-GigabitEthernet1/0/0] efm mode passive
[S9300A-GigabitEthernet1/0/0] efm enable
[S9300A-GigabitEthernet1/0/0] quit
# Configure S9300 B.
[S9300B] efm enable
[S9300B] interface gigabitethernet 1/0/0
[S9300B-GigabitEthernet1/0/0] efm enable
[S9300B-GigabitEthernet1/0/0] quit
# Configure S9300 C.
[S9300C] cfm enable
[S9300C] cfm md md1
[S9300C-md-md1] ma ma1
[S9300C-md-md1-ma-ma1] map vlan 10
# Configure S9300 D.
[S9300D] efm enable
[S9300D] interface gigabitethernet 1/0/0
[S9300D-GigabitEthernet1/0/0] efm mode passive
[S9300D-GigabitEthernet1/0/0] efm enable
[S9300D-GigabitEthernet1/0/0] quit
# Associate EFM OAM between S9300 C and S9300 D with Ethernet CFM between S9300 B
and S9300 C in both directions. That is, enable the EFM OAM and Ethernet CFM modules to
send trap messages to each other.
[S9300C] oam-mgr
[S9300C-oam-mgr] oam-bind cfm md md1 ma ma1 efm interface gigabitethernet 1/0/0
----End
Configuration Files
l Configuration file of S9300 A
#
sysname S9300A
#
vlan batch 10
#
efm enable
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
efm mode passive
efm enable
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
return
Networking Requirements
During routine maintenance, for example, when you need to replace the main control board, you
can perform active/standby switchover on the S9300 to minimize the impact on services.
Configuration Roadmap
The configuration roadmap is as follows:
1. Run the slave switchover command to make the slave main control board active.
Data Preparation
To complete the configuration, you need the following data:
l Slot IDs of the master and slave main control board In this example, the master main control
board is in slot 4, and the slave main control board is in slot 5.
Procedure
Step 1 Perform active/standby switchover.
Run the slave switchover command when the slave main control board is in real-time backup
state. Then the slave main control board becomes active, and the master main control board is
restarted.
[S9300] slave switchover
Step 2 Check the hot backup state of the master main control board.
[S9300] display switchover state 4
Slave MPU: Receiving realtime and routine data.
As shown in the preceding output, the master main control board is in real-time backup state,
indicating that the active/standby switchover is successful. You can replace the main control
board if necessary.
----End
Configuration Files
None.
Networking Requirements
As shown in Figure 5-140, the S9300 is connected to the router through GE 2/0/1; enterprise
and individual users access the network through the S9300 and router. Enterprise and individual
users belong to VLANs 100 and 200. Enterprise users require better QoS guarantee; therefore,
the priority of data packets from enterprise users is mapped to 4 and the priority of data packets
from individual users is mapped to 2. In this manner, differentiated services are provided.
Figure 5-140 Networking diagram for configuring priority mapping based on simple traffic
classification
Core network
GE 2/0/1
GE 1/0/1 GE 1/0/2
VLAN 100 S9300 VLAN 200
Switch Switch
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs and configure interfaces so that enterprise and individual users can access
the network through the S9300.
2. Create DiffServ domains and map 802.1p priorities to PHBs and colors.
3. Bind the DiffServ domain to incoming interfaces GE 1/0/1 and GE 1/0/2 on the S9300.
Data Preparation
To complete the configuration, you need the following data:
l Names of DiffServ domains
l 802.1p priorities of packets of enterprise and individual users
l CoS of enterprise and individual users
Procedure
Step 1 Create VLANs and configure interfaces.
# Create VLANs 100, 200, and 300.
<Quidway> system-view
[Quidway] sysname S9300
[S9300] vlan batch 100 200 300
# Configure the type of GE 1/0/1, GE 1/0/2, and GE 2/0/1 as trunk, add GE1/0/1 to VLAN 100,
add GE1/0/2 to VLAN 200, and add GE2/0/1 to VLAN 100, VLAN 200, and VLAN 300.
# Create VLANIF 300 and assign interface IP address uo192.168.1.1/24 to VLANIF 300.
[S9300] interface vlanif 300
[S9300-Vlanif300] ip address 192.168.1.1 24
NOTE
Assign IP address 192.168.1.2/24 to the interface connecting the router and S9300.
----End
Configuration Files
l Configuration file of the S9300
#
sysname S9300
#
vlan batch 100 200 300
#
diffserv domain ds1
8021p-inbound 0 phb af4 green
#
diffserv domain ds2
8021p-inbound 0 phb af2 green
#
interface Vlanif300
ip address 192.168.1.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 100
trust upstream ds1
#
interface GigabitEthernet1/0/2
port link-type trunk
port trunk allow-pass vlan 200
trust upstream ds2
#
interface GigabitEthernet2/0/1
port link-type trunk
port trunk allow-pass vlan 100 200 300
#
return
Networking Requirements
The S9300 is connected to the router through GE 2/0/1; enterprise and individual users can access
the network through the S9300 and router. See Figure 5-141.
Data services of enterprise and individual users come from VLANs 100 and 200 respectively.
When the data service packets of enterprise and individual users pass the S9300, the S9300 needs
to add the outer VLAN tag with the VLAN ID as 300 to the packets so that these packets are
identified as data services on the ISP. In addition, enterprise users require better QoS guarantee;
therefore, the priority of data packets from enterprise users is mapped to 4 and the priority of
data packets from individual users is mapped to 2. In this manner, differentiated services are
provided.
Figure 5-141 Networking diagram for re-marking the priorities based on complex traffic
classification
Core network
GE 1/0/1 GE 1/0/2
S9300
VLAN 100 VLAN 200
Individual
users
Enterprise
users
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs and configure interfaces so that enterprise and individual users can access
the network through the S9300.
2. Create traffic classifiers based on the VLAN ID in the inner VLAN tag on the S9300.
3. Create traffic behaviors on the S9300 and re-mark 802.1p priorities of packets.
4. Create a traffic policy on the S9300, bind traffic behaviors to traffic classifiers in the traffic
policy, and apply the traffic policy to the interface at the outbound direction.
Data Preparation
To complete the configuration, you need the following data:
l Re-marked priorities of packets with different VLAN IDs in the inner VLAN tags
l Type, direction, and number of the interface that a traffic policy needs to be applied to
Procedure
Step 1 Create VLANs and configure interfaces.
# Create VLANs 100, 200, and 300 on the S9300 and configure GE 1/0/1, GE 1/0/2, and GE
2/0/1 so that the S9300 adds the outer VLAN tag with the VLAN ID as 300 to the packets sent
from GE 1/0/1 and GE 1/0/2 and GE 2/0/1 can forward packets in VLAN 300.
<Quidway> system-view
[Quidway] sysname S9300
[S9300] vlan batch 100 200 300
[S9300] interface gigabitethernet 1/0/1
[S9300-GigabitEthernet1/0/1] port link-type trunk
[S9300-GigabitEthernet1/0/1] port vlan-stacking vlan 100 stack-vlan 300
[S9300-GigabitEthernet1/0/1] port trunk allow-pass vlan 100 300
[S9300-GigabitEthernet1/0/1] quit
[S9300] interface gigabitethernet 1/0/2
[S9300-GigabitEthernet1/0/2] port link-type trunk
[S9300-GigabitEthernet1/0/2] port vlan-stacking vlan 200 stack-vlan 300
[S9300-GigabitEthernet1/0/1] port trunk allow-pass vlan 200 300
[S9300-GigabitEthernet1/0/2] quit
[S9300] interface gigabitethernet 2/0/1
[S9300-GigabitEthernet2/0/1] port link-type trunk
[S9300-GigabitEthernet2/0/1] port trunk allow-pass vlan 300
[S9300-GigabitEthernet2/0/1] quit
# Create traffic classifiers c1 to c2 on the S9300 to classify incoming packets based on the VLAN
ID in the inner VLAN tag.
[S9300] traffic classifier c1 operator and
[S9300-classifier-c1] if-match cvlan-id 100
[S9300-classifier-c1] quit
[S9300] traffic classifier c2 operator and
[S9300-classifier-c2] if-match cvlan-id 200
[S9300-classifier-c2] quit
Classifier: c1
Precedence: 5
Operator: AND
Rule(s) : if-match cvlan-id 100
# Check the statistics about the traffic policy applied to the interface.
<S9300> display traffic policy statistics interface gigabitethernet 2/0/1 outbound
verbose rule-base
Interface: GigabitEthernet2/0/1
Traffic policy outbound: p1
Rule number: 2
Current status: OK!
Classifier: c1 operator and
Behavior: b1
if-match cvlan-id 100
Board : 2
Passed Packet 2000,Passed Bytes -
Droped Packet 0,Droped Bytes -
Classifier: c2 operator and
Behavior: b2
if-match cvlan-id 200
Board : 2
Passed Packet 1000,Passed Bytes -
Droped Packet 0,Droped Bytes -
----End
Configuration Files
l Configuration file of the S9300
#
sysname S9300
#
vlan batch 100 200 300
#
traffic classifier c2 operator and precedence 5
if-match cvlan-id 200
traffic classifier c1 operator and precedence 10
if-match cvlan-id 100
#
traffic behavior b2
remark 8021p 2
traffic behavior b1
remark 8021p 4
#
traffic policy p1
classifier c1 behavior b1
classifier c2 behavior b2
#
interface Vlanif300
ip address 192.168.1.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 100 300
port vlan-stacking vlan 100 stack-vlan 300
#
interface GigabitEthernet1/0/2
port link-type trunk
port trunk allow-pass vlan 200 300
port vlan-stacking vlan 200 stack-vlan 300
#
interface GigabitEthernet2/0/1
port link-type trunk
port trunk allow-pass vlan 300
traffic-policy p1 outbound
#
return
Networking Requirements
The Layer 2 switch of a company is connected to the ISP device through the S9300; one is a 1-
Gbit/s link with the gateway as 20.20.20.1 and the other is a 10-Gbit/s link with the gateway as
20.20.30.1. The company requires that the 10 Gbit/s links send only the packets with priorities
as 4, 5, 6, and 7 and 1 Gbit/s links send packets of lower priorities to the ISP. See Figure
5-142.
Figure 5-142 Networking diagram for redirecting packets based on complex traffic
classification
20.20.20.2/24
GE 3/0/2 20.20.20.1/24
GE 3/0/1
ISP
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs and configure interfaces so that the S9300 can ping the ISP device.
2. Create ACL rules to match the packets with priorities as 4, 5, 6, and 7 and priorities as 0,
1, 2, and 3.
3. Create traffic classifiers to match the preceding ACL rules.
4. Create traffic behaviors to redirect matching packets to 20.20.20.1/24 and 20.20.30.1/24.
5. Create a traffic policy, bind traffic classifiers to traffic behaviors in the traffic policy, and
apply the traffic policy to an interface.
Data Preparation
To complete the configuration, you need the following data:
l VLAN 20 that GE 2/0/1 is added to and VLAN 30 that GE 3/0/2 is added to
l ACL rules 3001 and 3002
l Traffic classifiers c1 and c2
l Traffic behaviors b1 and b2
l Traffic policy p1
Procedure
Step 1 Create VLANs and configure interfaces.
# Create VLANs 20 and 30.
<Quidway> system-view
[Quidway] sysname S9300
[S9300] vlan batch 20 30
# Configure the type of GE 3/0/1, GE 3/0/2, and GE 2/0/1 as trunk, and add GE 2/0/1 to VLAN
30 and GE 3/0/2 to VLAN 20.
[S9300] interface gigabitethernet 3/0/1
[S9300-GigabitEthernet3/0/1] port link-type trunk
[S9300-GigabitEthernet3/0/1] port trunk allow-pass vlan 20 30
[S9300-GigabitEthernet3/0/1] quit
[S93001] interface gigabitethernet 3/0/2
[S9300-GigabitEthernet3/0/2] port link-type trunk
[S9300-GigabitEthernet3/0/2] port trunk allow-pass vlan 20
[S9300-GigabitEthernet3/0/2] quit
NOTE
Assign network segment addresses 20.20.20.1/24 and 20.20.30.1/24 to the interfaces connecting the router
and S9300. The details are not mentioned here.
Classifier: c1
Precedence: 10
Operator: OR
Rule(s) : if-match 10 acl 3001
----End
Configuration Files
l Configuration file of the S9300
#
sysname S9300
#
vlan batch 20 30
#
acl number 3001
rule 5 permit ip precedence routine
rule 10 permit ip precedence priority
rule 15 permit ip precedence immediate
rule 20 permit ip precedence flash
#
acl number 3002
rule 5 permit ip precedence flash-override
rule 10 permit ip precedence critical
rule 15 permit ip precedence internet
rule 20 permit ip precedence network
#
traffic classifier c2 operator or precedence 5
if-match acl 3002
traffic classifier c1 operator or precedence 10
if-match acl 3001
#
traffic behavior b2
redirect ip-nexthop 20.20.30.1
traffic behavior b1
redirect ip-nexthop 20.20.20.1
#
traffic policy p1
classifier c1 behavior b1
classifier c2 behavior b2
#
interface Vlanif20
ip address 20.20.20.2 255.255.255.0
#
interface Vlanif30
ip address 20.20.30.2 255.255.255.0
#
interface GigabitEthernet2/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
interface GigabitEthernet3/0/1
port link-type trunk
port trunk allow-pass vlan 20 30
traffic-policy p1 inbound
#
interface GigabitEthernet3/0/2
port link-type trunk
port trunk allow-pass 20
#
return
Networking Requirements
PC1 with the MAC address as 0000-0000-0003 is connected to other devices through GE 2/0/1
on the S9300. It is required that the S9300 should take the statistics on the packets with the
source MAC address as 0000-0000-0003. See Figure 5-143.
Figure 5-143 Networking diagram for configuring traffic statistics based on complex traffic
classification
MAC:0000-0000-0003
GE 2/0/1 GE 3/0/1 Core
network
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure interfaces so that the S9300 is connected to PC1 and the router.
2. Create an ACL to match the packets with the source MAC address as 0000-0000-0003.
3. Create a traffic classifier to match the ACL.
4. Create a traffic behavior to take the statistics on the matching packets.
5. Create a traffic policy, bind the traffic classifier to the traffic behavior in the traffic policy,
and apply the traffic policy to GE 2/0/1 in the inbound direction.
Data Preparation
To complete the configuration, you need the following data:
l VLAN 20 and IP address of GE 3/0/1 being 20.20.20.1/24
l ACL 4000
l Traffic classifier c1
l Traffic behavior b1
l Traffic policy p1
Procedure
Step 1 Create a VLAN and configure interfaces.
# Configure the type of GE 2/0/1 as access and GE 3/0/1 as trunk, and add GE 2/0/1 and GE
3/0/1 to VLAN 20.
[S9300] interface gigabitethernet 2/0/1
[S9300-GigabitEthernet2/0/1] port link-type access
[S9300-GigabitEthernet2/0/1] port default vlan 20
[S9300-GigabitEthernet2/0/1] quit
[S9300] interface gigabitethernet 3/0/1
[S9300-GigabitEthernet3/0/1] port link-type trunk
[S9300-GigabitEthernet3/0/1] port trunk allow-pass vlan 20
[S9300-GigabitEthernet3/0/1] quit
NOTE
Assign network segment address 20.20.20.2/24 to the interface connecting the router and S9300. The details
are not mentioned here.
# Create MAC address ACL 4000 on the S9300 to match the packets with the source MAC
address as 0000-0000-0003.
[S9300] acl 4000
[S9300-acl-ethernetframe-4000] rule permit source-mac 0000-0000-0003 ffff-ffff-
ffff
[S9300-acl-ethernetframe-4000] quit
Create traffic classifier c1 on the S9300 with ACL 4000 as the matching rule.
<S9300> system-view
[S9300] traffic classifier c1
[S9300-classifier-c1] if-match acl 4000
[S9300-classifier-c1] quit
# Create traffic behavior b1 on the S9300 and configure the traffic statistics action.
[S9300] traffic behavior b1
[S9300-behavior-b1] statistic enable
[S9300-behavior-b1] quit
# Create traffic policy p1 on the S9300 and bind the traffic classifier to the traffic behavior in
the traffic policy.
[S9300] traffic policy p1
[S9300-trafficpolicy-p1] classifier c1 behavior b1
[S9300-trafficpolicy-p1] quit
Behavior: b1
statistic: enable
----End
Configuration Files
l Configuration file of the S9300
#
sysname S9300
#
vlan batch 20
#
acl number 4000
rule 5 permit source-mac 0000-0000-0003 ffff-ffff-ffff
#
traffic classifier c1 operator or precedence 5
if-match acl 4000
#
traffic behavior b1
statistic enable
#
traffic policy p1
classifier c1 behavior b1
#
interface Vlanif20
ip address 20.20.20.1 255.255.255.0
#
interface GigabitEthernet2/0/1
port link-type access
port default vlan 20
traffic-policy p1 inbound
#
interface GigabitEthernet3/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
return
Networking Requirements
As shown in Figure 5-144, the S9300 is connected to the router through GE 2/0/1; enterprise
and individual users access the S9300 through GE 1/0/1 and GE 1/0/2 and access the network
through the S9300 and router. It is required that the fixed bandwidth of enterprise users be 8
Mbit/s and the maximum bandwidth be 10 Mbit/s, and the fixed bandwidth of individual users
be 5 Mbit/s and the maximum bandwidth be 8 Mbit/s.
Core network
Router
GE 2/0/1
GE 1/0/1 GE 1/0/2
S9300
Switch Switch
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure each interface of the S9300 so that users can access the network.
2. Create QoS CAR templates and set the CIR and PIR.
3. Apply QoS CAR templates on GE 1/0/1 and GE 1/0/2 of the S9300 at inbound direction.
Data Preparation
To complete the configuration, you need the following data:
l IP address of the upstream interface on the S9300 being 192.168.1.1/24
l VLANs 100 and 200 that enterprise and individual users belong to
l CIR 8000 kbit/s and PIR 10000 kbit/s of enterprise users, and CIR 5000 kbit/s and PIR
8000 kbit/s of individual users
Procedure
Step 1 Create VLANs and configure each interface of the S9300.
# Create VLANs 100, 200, and 300, and add GE 1/0/1, GE 1/0/2, and GE 1/0/1 to VLANs 100,
200, and 300 respectively.
<Quidway> system-view
[Quidway] sysname S9300
[S9300] vlan batch 100 200 300
# Configure the type of GE 1/0/1, GE 1/0/2, and GE 2/0/1 as trunk and permit packets from
VLANs 100, 200, and 300 to pass through.
# Create VLANIF 300 and assign network segment address 192.168.1.1/24 to VLANIF 300.
NOTE
Assign IP address 192.168.1.2/24 to the interface connecting the router and S9300.
GigabitEthernet1/0/2
Applied number on Interface outbound : 1
GigabitEthernet1/0/2
Applied number on Trunk inbound : 0
Applied number on Trunk outbound : 0
Applied number on Vlan Unknown Unicast : 0
Applied number on Vlan Multicast : 0
Applied number on Vlan Broadticast : 0
# Send traffic to GE 1/0/1 and GE 1/0/2 at the rate of 6000 kbit/s, 9000 kbit/s, and 11000 kbit/
s, and then use the display qos car statistics command to check the statistics on QoS CAR. If
the configuration succeeds, you can obtain the following results:
l When packets are sent to GE 1/0/1 and GE 1/0/2 at the rate of 6000 kbit/s, all the packets are
forwarded.
l When packets are sent to GE 1/0/1 and GE 1/0/2 at the rate of 9000 kbit/s, all the packets on
GE 1/0/1 are forwarded but certain packets on GE 1/0/2 are discarded.
l When packets are sent to GE 1/0/1 and GE 1/0/2 at the rate of 11000 kbit/s, certain packets
on GE 1/0/1 and GE 1/0/2 are discarded.
Use the display qos car statistics command on GE 1/0/1 in the inbound direction, and the
following information is displayed:
<S9300> display qos car statistics interface gigabitethernet 1/0/1 inbound
Passed packets: 100
Passed bytes: 104800
Discard packets: 1
Discard bytes: 1048
----End
Configuration Files
l Configuration file of the S9300
#
sysname S9300
#
vlan batch 100 200 300
#
qos car qoscar1 cir 8000 pir 10000 cbs 1000000 pbs 1250000
qos car qoscar2 cir 5000 pir 8000 cbs 625000 pbs 1000000
#
interface Vlanif300
ip address 192.168.1.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 100
qos car inbound qoscar1
#
interface GigabitEthernet1/0/2
port link-type trunk
port trunk allow-pass vlan 200
qos car inbound qoscar2
#
interface GigabitEthernet2/0/1
port link-type trunk
port trunk allow-pass vlan 100 200 300
#
return
Networking Requirements
The S9300 is connected to the router through GE 2/0/1; enterprise and individual users can access
the network through the S9300 and router. SeeTable 5-11.
l The voice services of enterprise and individual users belong to VLANs 120 and 220.
l The video services of enterprise and individual users belong to VLANs 110 and 210.
l The data services of enterprise and individual users belong to VLANs 100 and 200.
On the S9300, packets of different services need to be policed, and the total traffic of enterprise
and individual users needs to be controlled in a proper range.
The DSCP priorities carried in service packets sent from the user side are unreliable and services
require different QoS in actual applications; therefore, you need to re-mark DSCP priorities of
different service packets on the S9300. In this manner, the downstream router can process
packets according to different priorities.
The requirements are as follows:
Enterprise Voice 10 15 46
users
Video 50 75 30
Data 40 60 14
Individual Voice 10 15 46
users
Video 40 60 30
Data 30 45 14
Figure 5-145 Networking diagram for configuring traffic policing based on a traffic classifier
Core network
GE 2/0/1
GE 1/0/1 GE 1/0/2
VLAN S9300
VLAN
100 200
LSW
LSW
Enterprise
users Individual
VLAN users VLAN
VLAN VLAN
110 210
120 220
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs and configure interfaces so that enterprise and individual users can access
the network through the S9300.
2. Create traffic classifiers based on the VLAN ID on the S9300.
3. Configure QoS CAR on the S9300 to police the incoming and outgoing traffic of enterprise
and individual users.
4. Create traffic behaviors on the S9300 to police the traffic received from the user side and
re-mark DSCP priorities of packets, and police the traffic sent to the user side.
5. Create traffic policies on the S9300, bind traffic behaviors to traffic classifiers in the traffic
policies, and apply the traffic policies to the interfaces that packets pass through.
Data Preparation
To complete the configuration, you need the following data:
l Re-marked priorities of packets with different VLAN IDs
l Parameters for packets with different VLAN IDs: CIR and PIR
l Type, direction, and number of the interface on which a traffic policy needs to be applied
Procedure
Step 1 Create VLANs and configure interfaces.
# Create VLAN 100, VLAN 110, VLAN 120, VLAN 200, VLAN 210, and VLAN 220 on the
S9300.
<Quidway> system-view
[Quidway] sysname S9300
[S9300] vlan batch 100 110 120 200 210 220
# Configure the access types of GE1/0/1, GE1/0/2, and GE2/0/1 to trunk, add GE1/0/1 to VLAN
100, VLAN 110, and VLAN 120, add GE1/0/2 to VLAN 200, VLAN 210, and VLAN 220, and
add GE2/0/1 to VLAN 100, VLAN 110, VLAN 120, VLAN 200, VLAN 210, and VLAN 220.
[S9300] interface gigabitethernet 1/0/1
[S9300-GigabitEthernet1/0/1] port link-type trunk
[S9300-GigabitEthernet1/0/1] port trunk allow-pass vlan 100 110 120
[S9300-GigabitEthernet1/0/1] quit
[S9300] interface gigabitethernet 1/0/2
[S9300-GigabitEthernet1/0/2] port link-type trunk
[S9300-GigabitEthernet1/0/2] port trunk allow-pass vlan 200 210 220
[S9300-GigabitEthernet1/0/2] quit
[S9300] interface gigabitethernet 2/0/1
[S9300-GigabitEthernet2/0/1] port link-type trunk
[S9300-GigabitEthernet2/0/1] port trunk allow-pass vlan 100 110 120 200 210 220
[S9300-GigabitEthernet2/0/1] quit
Classifier: c4
Precedence: 20
Operator: AND
Rule(s) : if-match 5 vlan-id 220
Classifier: c2
Precedence: 10
Operator: AND
Classifier: c5
Precedence: 25
Operator: AND
Rule(s) : if-match 5 vlan-id 210
Classifier: c3
Precedence: 15
Operator: AND
Rule(s) : if-match 5 vlan-id 100
Classifier: c1
Precedence: 5
Operator: AND
Rule(s) : if-match 5 vlan-id 120
# Check the configuration of the traffic policy. Here, the configuration of traffic policy p1 is
displayed.
[S9300] display traffic policy user-defined p1
User Defined Traffic Policy Information:
Policy: p1
Classifier: default-class
Behavior: be
-none-
Classifier: c1
Behavior: b1
Committed Access Rate:
CIR 10000 (Kbps), PIR 15000 (Kbps), CBS 1250000 (byte), PBS 1875000 (byt
e)
Color Mode: color Blind
Conform Action: pass
Yellow Action: pass
Exceed Action: discard
Marking:
Remark DSCP ef
Share car:
car qoscar1 share
statistic: enable
Classifier: c2
Behavior: b2
Committed Access Rate:
CIR 50000 (Kbps), PIR 75000 (Kbps), CBS 6250000 (byte), PBS 9375000 (byt
e)
Color Mode: color Blind
Conform Action: pass
Yellow Action: pass
Exceed Action: discard
Marking:
Remark DSCP af33
Share car:
car qoscar1 share
statistic: enable
Classifier: c3
Behavior: b3
Committed Access Rate:
CIR 40000 (Kbps), PIR 60000 (Kbps), CBS 5000000 (byte), PBS 7500000 (
byte)
Color Mode: color Blind
Conform Action: pass
Yellow Action: pass
Exceed Action: discard
Share car:
car qoscar1 share
statistic: enable
Classifier: c4
Behavior: b4
Committed Access Rate:
CIR 10000 (Kbps), PIR 15000 (Kbps), CBS 1250000 (byte), PBS 1875000 (byt
e)
Color Mode: color Blind
Conform Action: pass
Yellow Action: pass
Exceed Action: discard
Share car:
car qoscar2 share
statistic: enable
Classifier: c5
Behavior: b5
Committed Access Rate:
CIR 40000 (Kbps), PIR 60000 (Kbps), CBS 5000000 (byte), PBS 7500000 (
byte)
Color Mode: color Blind
Conform Action: pass
Yellow Action: pass
Exceed Action: discard
Share car:
car qoscar2 share
statistic: enable
Classifier: c6
Behavior: b6
Committed Access Rate:
CIR 30000 (Kbps), PIR 45000 (Kbps), CBS 3750000 (byte), PBS 5625000 (b
yte)
Color Mode: color Blind
Conform Action: pass
Yellow Action: pass
Exceed Action: discard
Share car:
car qoscar2 share
statistic: enable
# Check the configuration of the traffic policy applied on an interface. Here, the configuration
of the traffic policy applied on GE 1/0/1 is displayed.
[S9300] display traffic policy statistics interface gigabitethernet 1/0/1
Interface: GigabitEthernet1/0/1
Traffic policy inbound: p1
Rule number: 0
Current status: OK!
Item Packets Bytes
---------------------------------------------------------------------
Matched 10 10000
+--Passed 8 8000
+--Dropped 2 2000
+--Filter 2 2000
+--URPF 0 0
+--CAR 2 2000
----End
Configuration Files
l Configuration file of the S9300
#
sysname S9300
#
vlan batch 100 110 120 200 210 220
#
qos car qoscar1 cir 150000 cbs 28200000
qos car qoscar2 cir 120000 cbs 22560000
#
traffic classifier c6 operator and precedence 30
if-match 5 vlan-id 200
traffic classifier c4 operator and precedence 20
if-match 5 vlan-id 220
traffic classifier c2 operator and precedence 10
port trunk allow-pass vlan 100 110 120 200 210 220
#
return
Networking Requirements
As shown in Figure 5-146, PC1 at 10.10.10.10 is connected to GE 2/0/1 of the S9300; PC2 at
10.10.10.20 is connected to GE 3/0/1 of the S9300; PC1 and PC2 belong to VLAN 10. It is
required that traffic policing for host packets on the S9300 be used to limit ICMP traffic received
on GE 2/0/1 and GE 3/0/1 to 2048 kbit/s and discard the excessive traffic.
Figure 5-146 Networking diagram for configuring traffic policing for host packets
S9300
GE 2/0/1 GE 3/0/1
VLAN 10 VLAN 10
10.10.10.10/24 10.10.10.20/24
PC1 PC2
Configuration Roadmap
The configuration roadmap is as follows:
1. Create a VLAN and configure each interface to ensure that routes between the PC and
devices are reachable.
2. Configure CPCAR to limit ICMP traffic less than 2048 kbit/s.
Data Preparation
To complete the configuration, you need the following data:
l ID of the VLAN, that is, 10
l CIR of ICMP traffic, that is, 2048 kbit/s
Procedure
Step 1 Create a VLAN and configure each interface.
# Create VLAN 10 on the S9300 and add GE 2/0/1 and GE 3/0/1 to VLAN 10.
<Quidway> system-view
[Quidway] sysname S9300
[S9300] vlan 10
[S9300-vlan10] quit
[S9300] interface gigabitethernet2/0/1
[S9300-GigabitEthernet2/0/1] port link-type trunk
[S9300-GigabitEthernet2/0/1] port trunk allow-pass vlan 10
[S9300-GigabitEthernet2/0/1] quit
[S9300] interface gigabitethernet3/0/1
[S9300-GigabitEthernet3/0/1] port link-type trunk
[S9300-GigabitEthernet3/0/1] port trunk allow-pass vlan 10
[S9300-GigabitEthernet3/0/1] quit
----End
Configuration Files
l Configuration file of the S9300
#
sysname S9300
#
vlan batch 10
#
cpcar icmp
car cir 2048 cbs 385024
#
interface Vlanif10
ip address 10.10.10.1 255.255.255.0
#
interface Ethernet2/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet3/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
return
Networking Requirements
The S9300 is connected to GE 2/0/1 and the router; the 802.1p priorities of voice, video, and
data services from the Internet are 6, 5, and 2 respectively, and these services can reach individual
users through the router and S9300, as shown in Figure 5-147. The rate of the traffic from the
network side is greater than the rate of the LSW interface; therefore, a jitter may occur in the
outbound direction of GE 1/0/1. To reduce the jitter and ensure the bandwidth of various services,
the requirements are as follows:
Phone
802.1p = 6
802.1p = 5
TV
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure priority mapping based on simple traffic classification to map priorities of
packets to PHBs.
2. Configure traffic shaping on an interface to limit the bandwidth of the interface.
3. Configure traffic shaping in an interface queue to limit the CIRs of voice, video, and data
services.
Data Preparation
To complete the configuration, you need the following data:
l 802.1p priorities being 6, 5, and 2 mapped to PHBs
l Rate for traffic shaping on an interface
Procedure
Step 1 Create VLANs and configure interfaces.
# Configure the type of GE 1/0/1 and GE 2/0/1 as trunk, and then add GE1/0/1 and GE2/0/1 to
VLAN 10.
[S9300] interface gigabitethernet1/0/1
[S9300-GigabitEthernet1/0/1] port link-type trunk
[S9300-GigabitEthernet1/0/1] port trunk allow-pass vlan 10
[S9300-GigabitEthernet1/0/1] quit
[S9300] interface gigabitethernet2/0/1
[S9300-GigabitEthernet2/0/1] port link-type trunk
[S9300-GigabitEthernet2/0/1] port trunk allow-pass vlan 10
[S9300-GigabitEthernet2/0/1] quit
# Create VLANIF 10 and assign network segment address 10.10.10.1/24 to VLANIF 10.
[S9300] interface vlanif 10
[S9300-Vlanif10] ip address 10.10.10.1 255.255.255.0
NOTE
Assign IP address 10.10.10.2/24 to the interface connecting the router and S9300.
# Create DiffServ domain ds1 in which 802.1p priorities being 6, 5, and 2 are mapped to PHBs
CS7, EF, and AF2.
<Quidway> system-view
[Quidway] sysname S9300
[S9300] diffserv domain ds1
[S9300-dsdomain-ds1] 8021p-inbound 6 phb cs7
[S9300-dsdomain-ds1] 8021p-inbound 5 phb ef
[S9300-dsdomain-ds1] 8021p-inbound 2 phb af2
[S9300-dsdomain-ds1] quit
[S9300] interface gigabitethernet2/0/1
[S9300-GigabitEthernet2/0/1] trust upstream ds1
# Configure traffic shaping on an interface of the S9300 and set the CIR to 10000 kbit/s.
[S9300-GigabitEthernet1/0/1] port shaping cir 10000
# Set the scheduling mode of each queue to WRR. Set the WRR weight of queue 7 to 60, WRR
weight of queue 5 to 40, and WRR weight of queue 2 to 20. The other queues retain the default
weight.
[S9300-GigabitEthernet1/0/1] qos wrr 0 to 7
[S9300-GigabitEthernet1/0/1] qos queue 7 wrr weight 60
[S9300-GigabitEthernet1/0/1] qos queue 5 wrr weight 40
[S9300-GigabitEthernet1/0/1] qos queue 2 wrr weight 20
# Configure traffic shaping in the interface queues on the S9300, and then set the CIR and PIR
of the voice service to 3000 kbit/s and 5 000kbit/s, the CIR and PIR of the video service to 5000
kbit/s and 8000 kbit/s, and the CIR and PIR of the data service to 2000 kbit/s and 3000 kbit/s.
[S9300-GigabitEthernet1/0/1] qos queue 7 shaping cir 3000 pir 5000
[S9300-GigabitEthernet1/0/1] qos queue 5 shaping cir 5000 pir 8000
[S9300-GigabitEthernet1/0/1] qos queue 2 shaping cir 2000 pir 3000
[S9300-GigabitEthernet1/0/1] quit
[S9300] quit
# If the configuration succeeds, the committed bandwidth for the packets transmitted by
GE1/0/1is 10000 kbit/s; the transmission rate of the voice service ranges from 3000 kbit/s to
5000 kbit/s; the transmission rate of the video service ranges from 5000 kbit/s to 8000 kbit/s;
the transmission rate of the data service ranges from 2000 kbit/s to 3000 kbit/s.
----End
Configuration Files
l Configuration file of the S9300
#
sysname S9300
#
vlan batch 10
#
diffserv domain ds1
8021p-inbound 6 phb cs7 green
#
interface Vlanif10
ip address 10.10.10.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 10
qos lr cir 10000 cbs 1250000 outbound
qos wrr
qos queue 2 wrr weight 20
qos queue 5 wrr weight 40
qos queue 7 wrr weight 60
qos queue 2 shaping cir 2000 pir 3000
qos queue 5 shaping cir 5000 pir 8000
qos queue 7 shaping cir 3000 pir 5000
#
interface GigabitEthernet2/0/1
port link-type trunk
port trunk allow-pass vlan 10
trust upstream ds1
#
return
Networking Requirements
The S9300 is connected to the router through GE 2/0/1; the 802.1p priorities of voice, video,
and data services on the Internet are 6, 5, and 2 respectively, and these services can reach
individual users through the router and S9300, as shown in Figure 5-148. The rate of incoming
interface GE 2/0/1 on the S9300 is greater than the rates of outgoing interfaces GE 1/0/1 and
GE 1/0/2; therefore, congestion may occur on these two outgoing interfaces. To reduce the effect
caused by congestion and ensure that high-priority and short-delay services are processed first,
the requirements are as follows.
Video Yellow 60 80 20
Data Red 40 60 40
Voice CS7
Video EF
Data AF2
Figure 5-148 Networking diagram for configuring congestion avoidance and congestion
management
Core network
Router
GE 2/0/1
GE 1/0/1 GE 1/0/2
S9300
PC TV
802.1p 802.1p
=2 Switch Switch =5
Individual
Individual
user n
user 1
802.1p 802.1p 802.1p
802.1p =6
=5 =2
=6
TV Phone PC Phone
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the VLAN for each interface so that the devices can communicate with each
other through the link layer.
2. Create and configure a DiffServ domain on the S9300, map packets of 802.1p priorities to
PHBs and colors of packets, and bind an incoming interface on the S9300 to the DiffServ
domain.
3. Create a WRED drop profile on the S9300 and apply the WRED drop profile on an outgoing
interface.
4. Set scheduling parameters of queues of different CoS on outgoing interfaces of the
S9300.
Data Preparation
To complete the configuration, you need the following data:
l VLAN IDs of data packets, video packets, and voice packets, namely, 2, 5, and 6
l PHBs mapped to 802.1p priorities being 6, 5, and 2 and colors
l Name of the WRED drop profile and WRED parameters
l Scheduling parameters of queues of different CoS
Procedure
Step 1 Configure the VLAN for each interface so that the devices can communicate with each other
through the link layer.
<Quidway> system-view
[Quidway] sysname S9300
[S9300] vlan batch 2 5 6
[S9300] interface gigabitethernet1/0/1
[S9300-GigabitEthernet1/0/1] port link-type trunk
[S9300-GigabitEthernet1/0/1] port trunk allow-pass vlan 2 5 6
[S9300-GigabitEthernet1/0/1] quit
[S9300] interface gigabitethernet1/0/2
[S9300-GigabitEthernet1/0/2] port link-type trunk
[S9300-GigabitEthernet1/0/2] port trunk allow-pass vlan 2 5 6
[S9300-GigabitEthernet1/0/2] quit
[S9300] interface gigabitethernet2/0/1
[S9300-GigabitEthernet2/0/1] port link-type trunk
[S9300-GigabitEthernet2/0/1] port trunk allow-pass vlan 2 5 6
[S9300-GigabitEthernet2/0/1] quit
# Create DiffServ domain ds1, map packets of 802.1p priorities being 6, 5, and 2 to PHBs CS6,
EF, and AF2, and color packets as green, yellow, and red.
<Quidway> system-view
[Quidway] sysname S9300
[S9300] diffserv domain ds1
[S9300-dsdomain-ds1] 8021p-inbound 6 phb cs7 green
[S9300-dsdomain-ds1] 8021p-inbound 5 phb ef yellow
[S9300-dsdomain-ds1] 8021p-inbound 2 phb af2 red
[S9300-dsdomain-ds1] quit
# Create drop profile wred1 on the S9300 and set parameters of packets of three colors.
[S9300] drop-profile wred1
[S9300-drop-wred1] color green low-limit 80 high-limit 100 discard-percentage 10
[S9300-drop-wred1] color yellow low-limit 60 high-limit 80 discard-percentage 20
[S9300-drop-wred1] color red low-limit 40 high-limit 60 discard-percentage 40
[S9300-drop-wred1] quit
# Apply drop profile wred1 on outgoing interfaces GE 1/0/1 and GE 1/0/2 of the S9300.
[S9300] interface gigabitethernet1/0/1
[S9300-GigabitEthernet1/0/1] qos wred wred1
[S9300-GigabitEthernet1/0/1] qos queue 7 wred wred1
[S9300-GigabitEthernet1/0/1] qos queue 5 wred wred1
[S9300-GigabitEthernet1/0/1] qos queue 2 wred wred1
[S9300-GigabitEthernet1/0/1] quit
[S9300] interface gigabitethernet1/0/2
[S9300-GigabitEthernet1/0/2] qos wred wred1
[S9300-GigabitEthernet1/0/2] qos queue 7 wred wred1
[S9300-GigabitEthernet1/0/2] qos queue 5 wred wred1
[S9300-GigabitEthernet1/0/2] qos queue 2 wred wred1
[S9300-GigabitEthernet1/0/2] quit
# Set scheduling parameters of queues of different CoS on outgoing interfaces GE 1/0/1 and GE
1/0/2 of the S9300.
[S9300] interface gigabitethernet1/0/1
[S9300-GigabitEthernet1/0/1] qos pq 7
[S9300-GigabitEthernet1/0/1] qos drr 0 to 6
[S9300-GigabitEthernet1/0/1] qos queue 5 drr weight 100
[S9300-GigabitEthernet1/0/1] qos queue 2 drr weight 50
[S9300-GigabitEthernet1/0/1] quit
[S9300] interface gigabitethernet1/0/2
[S9300-GigabitEthernet1/0/2] qos pq 7
[S9300-GigabitEthernet1/0/2] qos drr 0 to 6
[S9300-GigabitEthernet1/0/2] qos queue drr 5 weight 100
[S9300-GigabitEthernet1/0/2] qos queue drr 2 weight 50
[S9300-GigabitEthernet1/0/2] quit
[S9300] quit
----End
Configuration Files
l Configuration file of the S9300
#
sysname S9300
#
vlan batch 2 5 6
#
diffserv domain ds1
8021p-inbound 2 phb af2 red
8021p-inbound 5 phb ef yellow
8021p-inbound 6 phb cs7 green
#
drop-profile wred1
color green low-limit 80 high-limit 100 discard-percentage 10
color yellow low-limit 60 high-limit 80 discard-percentage 20
color red low-limit 40 high-limit 60 discard-percentage 40
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 2 5 6
#
interface GigabitEthernet2/0/1
port link-type trunk
port trunk allow-pass vlan 2 5 6
trust upstream ds1
#
return
Networking Requirements
The R&D department and marketing department access the S9300 through GE 1/0/1 and
GE1/0/2; a data detection device, that is, a server, is connected to GE 1/0/3 of the S9300. It is
required that the server should monitor received and sent packets of the R&D department and
marketing department through local port mirroring. Figure 5-149 shows the networking
diagram.
GE 1/0/1
R&D LSWA
department GE 1/0/3
S9300 Server
GE 1/0/2 192.168.1.100
Marketing LSWB
department
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure GE 1/0/3 as an observing interface.
2. Configure GE 1/0/1 and GE 1/0/2 as mirroring interfaces.
Data Preparation
To complete the configuration, you need the following data:
l Type and number of the observing interface
l Type and number of the mirroring interface
l Index number of the observing interface, that is, 1
Procedure
Step 1 Configure each interface to ensure that the routes between hosts are reachable.
# Create VLANs 1, 2, and 3, and add GE 1/0/1, GE 1/0/2, and GE 1/0/3 to VLANs 1, 2, and 3
respectively.
<Quidway> system-view
[Quidway] sysname S9300
[S9300] vlan batch 1 to 3
[S9300] interface gigabitethernet 1/0/1
[S9300-GigabitEthernet1/0/1] port link-type trunk
[S9300-GigabitEthernet1/0/1] port default vlan 1
[S9300-GigabitEthernet1/0/1] quit
[S9300] interface gigabitethernet 1/0/2
[S9300-GigabitEthernet1/0/2] port link-type trunk
[S9300-GigabitEthernet1/0/2] port default vlan 2
[S9300-GigabitEthernet1/0/2] quit
[S9300] interface gigabitethernet 1/0/3
[S9300-GigabitEthernet1/0/3] port link-type trunk
[S9300-GigabitEthernet1/0/3] port trunk allow-pass vlan 1 2 3
[S9300-GigabitEthernet1/0/3] quit
[S9300] interface vlanif 3
[S9300-Vlanif3] ip address 192.168.1.1 24
[S9300-Vlanif3] quit
# Configure GE 1/0/2 on the S9300 as a local mirroring interface to monitor received and sent
packets of the purchase department.
[S9300] interface gigabitethernet 1/0/2
[S9300-GigabitEthernet1/0/2] port-mirroring observe-port 1 both
[S9300-GigabitEthernet1/0/2] quit
[S9300] quit
# Check the number of packets on GE 1/0/1, GE 1/0/2, and GE 1/0/3, and you can view that the
number of packets on GE1/0/3 is the sum of packets on GE 1/0/1 and GE 1/0/2. On the server,
you can view that all the packets received and sent on GE 1/0/1 and GE 1/0/2. This indicates
that packets on GE 1/0/1 and GE 1/0/2 are mirrored by the S9300.
<S9300> display interface GigabitEthernet 1/0/1
GigabitEthernet1/0/1 current state : Up
Description:HUAWEI, Quidway Series, GigabitEthernet1/0/1 Interface
Switch Port,PVID : 1,The Maximum Frame Length is 1526
Internet protocol processing : disabled
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc00-1704
Speed : 1000, Loopback: NONE
Duplex: FULL, Negotiation: ENABLE
Vlan Shaping: Not supported
Input: 342496 bytes
Unicast: 0, NUnicast: 0
Discard: 0, Error : 0
Output: 0 bytes
Unicast: 0, NUnicast: 0
Discard: 0, Error : 0
<S9300> display interface GigabitEthernet 1/0/2
GigabitEthernet1/0/1 current state : Up
Description:HUAWEI, Quidway Series, GigabitEthernet1/0/1 Interface
Switch Port,PVID : 2,The Maximum Frame Length is 1526
Internet protocol processing : disabled
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc00-1704
Speed : 1000, Loopback: NONE
Duplex: FULL, Negotiation: ENABLE
Vlan Shaping: Not supported
Input: 171248 bytes
Unicast: 0, NUnicast: 0
Discard: 0, Error : 0
Output: 0 bytes
Unicast: 0, NUnicast: 0
Discard: 0, Error : 0
<S9300> display interface GigabitEthernet 1/0/3
GigabitEthernet1/0/1 current state : Up
Description:HUAWEI, Quidway Series, GigabitEthernet1/0/1 Interface
Switch Port,PVID : 3,The Maximum Frame Length is 1526
Internet protocol processing : disabled
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc00-1704
Speed : 1000, Loopback: NONE
Duplex: FULL, Negotiation: ENABLE
Vlan Shaping: Not supported
Input: 513744 bytes
Unicast: 0, NUnicast: 0
Discard: 0, Error : 0
Output: 0 bytes
Unicast: 0, NUnicast: 0
Discard: 0, Error : 0
----End
Configuration Files
l Configuration file of the S9300
#
sysname S9300
#
vlan batch 1 to 3
#
observe-port 1 interface GigabitEthernet1/0/3
#
interface Vlanif3
ip address 192.168.1.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port link-type trunk
port default vlan 1
port-mirroring observe-port 1 both
#
interface GigabitEthernet1/0/2
port link-type trunk
port default vlan 2
port-mirroring observe-port 1 both
#
interface GigabitEthernet1/0/3
port link-type trunk
port trunk allow-pass vlan 1 to 3
#
return
Networking Requirements
The packets of the marketing department is sent to S9300A; S9300A, S9300B, and S9300C are
connected through trunks; a detection device, that is, a server, is connected to GE 1/0/1 of
S9300C. It is required that the server should monitor received and sent packets of the marketing
department through remote port mirroring.
VLAN 1
Marketing Server
department
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure each interface to ensure that the routes between Layer 2 devices are reachable.
2. Configure GE 1/0/1 on S9300A as a remote observing interface.
3. Configure GE 1/0/2 on S9300A as a mirroring interface.
Data Preparation
To complete the configuration, you need the following data:
l ID of the VLAN to which packets are mirrored
l Index of the observing interface
Procedure
Step 1 Configure each interface to ensure that the routes between Layer 2 devices are reachable.
# Configure S9300A.
<<Quidway> system-view
[Quidway] sysname S9300A
[S9300A] vlan 1
[S9300A-vlan1] port gigabitethernet 1/0/1 1/0/2
[S9300A-vlan1] quit
[S9300A] interface gigabitethernet 1/0/1
[S9300A-GigabitEthernet1/0/1] port link-type trunk
[S9300A-GigabitEthernet1/0/1] quit
[S9300A] interface gigabitethernet 1/0/2
[S9300A-GigabitEthernet1/0/2] port link-type trunk
[S9300A-GigabitEthernet1/0/2] quit
# Configure S9300B.
<<Quidway> system-view
[Quidway] sysname S9300B
[S9300B] vlan 1
[S9300B-vlan1] port GigabitEthernet 1/0/1 1/0/2
[S9300B-vlan1] quit
[S9300B] interface gigabitethernet 1/0/1
[S9300B-GigabitEthernet1/0/1] port link-type trunk
[S9300B-GigabitEthernet1/0/1] quit
[S9300B] interface gigabitethernet 1/0/2
[S9300B-GigabitEthernet1/0/2] port link-type trunk
[S9300B-GigabitEthernet1/0/2] quit
# Configure S9300C.
<Quidway> system-view
[Quidway] sysname S9300C
[S9300C] vlan 1
[S9300C-vlan1] port GigabitEthernet 1/0/1 1/0/2
[S9300C-vlan1] quit
[S9300C] interface gigabitethernet 1/0/1
[S9300C-GigabitEthernet1/0/1] port link-type trunk
[S9300C-GigabitEthernet1/0/1] quit
[S9300C] interface gigabitethernet 1/0/2
[S9300C-GigabitEthernet1/0/2] port link-type trunk
[S9300C-GigabitEthernet1/0/2] quit
# On the server, you can view that all the packets received and sent on GE 1/0/2 of S9300A.
This indicates that packets on GE 1/0/2 are mirrored by S9300A.
----End
Configuration Files
l Configuration file of S9300A
#
sysname S9300A
#
vlan batch 1
#
observe-port 1 interface GigabitEthernet1/0/1 vlan 1
#
interface GigabitEthernet1/0/1
port link-type trunk
port default vlan 1
#
interface GigabitEthernet1/0/2
port link-type trunk
port default vlan 1
port-mirroring observe-port 1 both
#
return
#
interface GigabitEthernet1/0/1
port link-type trunk
port default vlan 1
#
interface GigabitEthernet1/0/2
port link-type trunk
port default vlan 1
#
return
Networking Requirements
The R&D department and marketing department are connected to GE 1/0/1 and GE1/0/2 of the
S9300 through LSWA and LSWB. It is required that the S9300 should monitor the packets with
the 802.1p priority as 6 and the outgoing interface as GE 1/0/3 of the R&D department and
marketing department through local port mirroring. See Figure 5-151.
GE 1/0/1
R&D LSWA
department GE 1/0/3
S9300 Server
GE 1/0/2 192.168.1.100
Marketing LSWB
department
Configuration Roadmap
The configuration roadmap is as follows:
1. Create a VLAN on the S9300 and add GE 1/0/1, GE 1/0/2, and GE 1/0/3 to the VLAN.
2. Configure GE 1/0/3 as an observing interface.
3. Create a traffic classifier and set the traffic classification rule of matching the packets with
the 802.1p priority as 6.
4. Create a traffic behavior and configure flow mirroring actions in the traffic behavior.
5. Create a traffic policy to bind the traffic classifier and traffic behavior.
6. Apply the traffic policy on GE 1/0/1 and GE 1/0/2.
Data Preparation
To complete the configuration, you need the following data:
l Name of the traffic classifier, that is, c1
l Name of the traffic behavior, that is, b1
l Name of the traffic policy, that is, p1
l ID of the VLAN, that is, 2
Procedure
Step 1 Create a VLAN.
# Create VLAN 2 on the S9300 and add GE 1/0/1, GE 1/0/2, and GE 1/0/3 to the VLAN.
<Quidway> system-view
[Quidway] sysname S9300[S9300] vlan 2
[S9300-vlan2] port gigabitethernet 2/0/1 to 2/0/3
[S9300-vlan2] quit
# Check the number of packets forwarded by the S9300 on GE 1/0/1, GE 1/0/2, and GE 1/0/3,
or check all the packets received from and sent to GE 1/0/1 and GE 1/0/2 on the server. This
indicates that packets on GE 1/0/1 and GE 1/0/2 are mirrored by the S9300.
<S9300> display interface GigabitEthernet 1/0/1
GigabitEthernet1/0/1 current state : Up
Description:HUAWEI, Quidway Series, GigabitEthernet1/0/1 Interface
Switch Port,PVID : 1,The Maximum Frame Length is 1526
Internet protocol processing : disabled
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc00-1704
Speed : 1000, Loopback: NONE
Duplex: FULL, Negotiation: ENABLE
Vlan Shaping: Not supported
Input: 342496 bytes
Unicast: 0, NUnicast: 0
Discard: 0, Error : 0
Output: 0 bytes
Unicast: 0, NUnicast: 0
Discard: 0, Error : 0
<S9300> display interface GigabitEthernet 1/0/2
GigabitEthernet1/0/1 current state : Up
Description:HUAWEI, Quidway Series, GigabitEthernet1/0/1 Interface
Switch Port,PVID : 2,The Maximum Frame Length is 1526
Internet protocol processing : disabled
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc00-1704
----End
Configuration Files
l Configuration file of the S9300
#
sysname S9300
#
vlan batch 2
#
observe-port 1 interface GigabitEthernet1/0/3
#
traffic classifier c1 operator or precedence 5
if-match 5 vlan-8021p 6
#
traffic behavior b1
mirroring observing-port 1
#
traffic policy p1
classifier c1 behavior b1
#
interface GigabitEthernet1/0/1
port link-type trunk
port default vlan 2
traffic-policy p1 inbound
#
interface GigabitEthernet1/0/2
port link-type trunk
port default vlan 2
traffic-policy p1 inbound
#
interface GigabitEthernet1/0/3
port link-type trunk
port default vlan 2
#
return
trail, Unicast Reverse Path Forwarding (URPF), local attack defense, PPPoE+, MAC-forced
forwarding (MFF), interface security, traffic suppression, and ACL from aspects of function
introduction, configuration methods, maintenance, and configuration examples.
This document guides you through the principle and configuration of security features.
5.8.1 AAA and User Management Configuration
This chapter describes the principle and configuration of Authentication, Authorization, and
Accounting (AAA), local user management, Remote Authentication Dial in User Service
(RADIUS), HUAWEI Terminal Access Controller Access Control System (HWTACACS), and
domain.
5.8.2 DHCP Snooping Configuration
This chapter describes how to configure Dynamic Host Configuration Protocol (DHCP)
snooping on the S9300 to defend against DHCP attacks.
5.8.3 IP Source Guard Configuration
This chapter describes the principle and configuration of IP source guard.
5.8.4 ARP Security Configuration
This chapter describes the principle and configuration of ARP security features.
5.8.5 Traffic Suppression Configuration
This chapter describes the principle and configuration of traffic suppression .
5.8.6 IP Source Trail Configuration
This chapter describes the principle of IP source trail, and provides configuration methods and
examples of IP source trail.
5.8.7 URPF Configuration
This chapter describes the principle of Unicast Reverse Path Forwarding (URPF), and provides
configuration methods and examples of URPF.
5.8.8 ACL Configuration
This chapter describes how to configure the Access Control List (ACL).
Networking Requirements
As shown in Figure 5-152, the ISP user on an IP/MPLS backbone network needs to remotely
log in to the S9300 to perform configurations. The user accesses the S9300 through Telnet and
the RADIUS server authenticates the access user.
Metro
S9300-B
S9300-A
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
The configuration of S9300-A is the same as the configuration of S9300-B; therefore, devices
are not differentiated in the following example. Quidway represents to the device.
NOTE
This configuration example provides only the commands on the S9300. For the configuration of the
RADIUS server, see relevant descriptions.
Procedure
Step 1 Configure an authentication scheme.
# Enter the AAA view.
<Quidway> system-view
[Quidway] aaa
# Configure the IP address and port number of the primary RADIUS authentication server.
[Quidway-radius-rrr] radius-server authentication 10.1.1.1 1812
# Configure the IP address and port number of the secondary RADIUS authentication server.
[Quidway-radius-rrr] radius-server authentication 10.1.1.2 1812 secondary
# Set the shared key and number of times for retransmitting packets on the RADIUS server.
[Quidway-radius-rrr] radius-server shared-key hello
[Quidway-radius-rrr] radius-server retransmit 2
[Quidway-radius-rrr] quit
Traffic-unit : B
Shared-secret-key : hello
Timeout-interval(in second) : 5
Primary-authentication-server : 10.1.1.1:1812:LoopBack-1
Primary-accounting-server : 0.0.0.0:0:LoopBack0
Secondary-authentication-server : 10.1.1.2:1812:LoopBack-1
Secondary-accounting-server : 0.0.0.0:0:LoopBack0
Retransmission : 2
Domain-included : YES
------------------------------------------------------------------
Run the display domain command on the S9300, and you can view the configuration of the
domain.
[Quidway] display domain huawei
------------------------------------------------------------------
Domain-name : huawei
Domain-state : Active
Authentication-scheme-name : scheme1
Accounting-scheme-name : default
Authorization-scheme-name : default
Web-IP-address : -
Primary-DNS-IP-address : -
Second-DNS-IP-address : -
Primary-NBNS-IP-address : -
Second-NBNS-IP-address : -
Idle-data-attribute (time,flow) : 0, 60
User-access-limit : 384
Online-number : 0
RADIUS-server-template : rrr
HWTACACS-server-template : -
-------------------------------------------------------------------
----End
Configuration Files
#
sysname Quidway
#
radius-server template rrr
radius-server shared-key hello
radius-server authentication 10.1.1.1 1812
radius-server authentication 10.1.1.2 1812 secondary
radius-server retransmit 2
#
aaa
authentication-scheme default
authentication-scheme scheme1
authentication-mode radius
#
authorization-scheme default
#
domain default
domain huawei
authentication-scheme scheme1
radius-server rrr
#
#
user-interface vty 0 4
authentication-mode aaa
#
return
Networking Requirements
As shown in Figure 5-153, users on an IP/MPLS backbone network access the S9300 through
Telnet; the HWTACACS server is used to authenticate access users. The requirements are as
follows:
l The local authentication mode is first used to authenticate access users. If no response is
received, the HWTACACS server is used to authenticate access users.
l To upgrade user levels, the HWTACACS server is first used to authenticate access users.
If no response is received, the local authentication mode is used to authenticate access users.
l The HWTACACS server is used to authorize access users.
Figure 5-153 Networking diagram for using HWTACACS to authenticate and authorize users
Primary server
10.1.1.1/24
Metro
S9300-B
S9300-A
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
This configuration example provides only the commands on the S9300. For the configuration of the
HWTACACS server, see relevant descriptions.
Procedure
Step 1 Configure an authentication scheme.
Run the display hwtacacs-server template command on the S9300, and you can view the
configuration of the HWTACACS server template.
[Quidway] display hwtacacs-server template hhh
-----------------------------------------------------------------------
HWTACACS-server template name : hhh
Primary-authentication-server : 10.1.1.1:49
Primary-authorization-server : 10.1.1.1:49
Primary-accounting-server : 0.0.0.0:0
Secondary-authentication-server : 10.1.1.2:49
Secondary-authorization-server : 10.1.1.2:49
Secondary-accounting-server : 0.0.0.0:0
Current-authentication-server : 10.1.1.1:49
Current-authorization-server : 10.1.1.1:49
Current-accounting-server : 0.0.0.0:0
Source-IP-address : 0.0.0.0
Shared-key : crystal
Quiet-interval(min) : 5
Response-timeout-Interval(sec) : 5
Domain-included : Yes
Traffic-unit : B
----------------------------------------------------------------------
Run the display domain command on the S9300, and you can view the configuration of the
domain.
[Quidway] display domain huawei
-------------------------------------------------------------------
Domain-name : huawei
Domain-state : Active
Authentication-scheme-name : scheme1
Accounting-scheme-name : default
Authorization-scheme-name : scheme1
Web-IP-address : -
Primary-DNS-IP-address : -
Second-DNS-IP-address : -
Primary-NBNS-IP-address : -
Second-NBNS-IP-address : -
Idle-data-attribute (time,flow) : 0, 60
User-access-limit : 384
Online-number : 0
RADIUS-server-template : rrr
HWTACACS-server-template : hhh
-------------------------------------------------------------------
----End
Configuration Files
#
sysname Quidway
#
hwtacacs-server template hhh
hwtacacs-server authentication 10.1.1.1 49
hwtacacs-server authentication 10.1.1.2 49 secondary
hwtacacs-server authorization 10.1.1.1 49
hwtacacs-server authorization 10.1.1.2 49 secondary
hwtacacs-server shared-key crystal
#
aaa
authentication-scheme default
authentication-scheme scheme1
authentication-mode local hwtacacs
#
authorization-scheme default
authorization-scheme shceme1
authorization-mode hwtacacs
authentication-super hwtacacs super
#
domain default
domain huawei
authentication-scheme scheme1
authorization-scheme scheme1
hwtacacs-server hhh
#
user-interface vty 0 4
authentication-mode aaa
#
return
Networking Requirements
As shown in Figure 5-154, the S9300 is deployed between the user network and the Layer 2
network of the ISP. To prevent the bogus DHCP server attack, it is required that DHCP snooping
be configured on the S9300, the user-side interface be configured as untrusted, the network-side
interface be configured as trusted, and the packet discarding alarm function be configured.
Figure 5-154 Networking diagram for preventing the bogus DHCP server attack
ISP network
L3 network
GE2/0/0
User network
Configuration Roadmap
The configuration roadmap is as follows: (Assume that the DHCP server has been configured.)
1. Enable DHCP snooping globally and on the interface.
2. Configure the interface connected to the DHCP server as a trusted interface.
3. Configure the user-side interface as an untrusted interface. The DHCP Request messages
including Offer, ACK, and NAK messages received from the untrusted interface are
discarded.
4. Configure the packet discarding alarm function.
Data Preparation
To complete the configuration, you need the following data:
l GE 1/0/0 being the trusted interface and GE 2/0/0 being the untrusted interface
l Alarm threshold being 120
NOTE
This configuration example provides only the commands related to the DHCP snooping configuration.
Procedure
Step 1 Enable DHCP snooping.
# Enable DHCP snooping globally.
<Quidway> system-view
[Quidway] dhcp enable
[Quidway] dhcp snooping enable
----End
Configuration Files
#
sysname Quidway
#
dhcp enable
Example for Preventing the DoS Attack by Changing the CHADDR Field
Networking Requirements
As shown in Figure 5-155, the S9300 is deployed between the user network and the ISP Layer
2 network. To prevent the DoS attack by changing the CHADDR field, it is required that DHCP
snooping be configured on the S9300. The CHADDR field of DHCP Request messages is
checked. If the CHADDR field of DHCP Request messages matches the source MAC address
in the frame header, the messages are forwarded. Otherwise, the messages are discarded. The
packet discarding alarm function is configured.
Figure 5-155 Networking diagram for preventing the DoS attack by changing the CHADDR
field
ISP network
L3 network
GE2/0/0
User network
Configuration Roadmap
The configuration roadmap is as follows:
2. Enable the checking of the CHADDR field of DHCP Request messages on the user-side
interface.
3. Configure the packet discarding alarm function.
Data Preparation
To complete the configuration, you need the following data:
l Alarm threshold
NOTE
This configuration example provides only the commands related to the DHCP snooping configuration.
Procedure
Step 1 Enable DHCP snooping.
# Enable DHCP snooping globally.
<Quidway> system-view
[Quidway] dhcp enable
[Quidway] dhcp snooping enable
Step 2 Enable the checking of the CHADDR field of DHCP Request messages on the user-side
interface.
[Quidway] interface gigabitethernet 2/0/0
[Quidway-GigabitEthernet2/0/0] dhcp snooping check mac-address enable
----End
Configuration Files
#
sysname Quidway
#
dhcp enable
dhcp snooping enable
#
interface GigabitEthernet2/0/0
dhcp snooping enable
dhcp snooping check mac-address enable
dhcp snooping alarm mac-address enable
dhcp snooping alarm mac-address threshold 120
#
return
Example for Preventing the Attacker from Sending Bogus DHCP Messages for
Extending IP Address Leases
Networking Requirements
As shown in Figure 5-156, the S9300 is deployed between the user network and the ISP Layer
2 network. To prevent the attacker from sending bogus DHCP messages for extending IP address
leases, it is required that DHCP snooping be configured on the S9300 and the DHCP snooping
binding table be created. If the received DHCP Request messages match entries in the binding
table, they are forwarded; otherwise, they are discarded. The packet discarding alarm function
is configured.
Figure 5-156 Networking diagram for preventing the attacker from sending bogus DHCP
messages for extending IP address leases
ISP network
L3 network
GE2/0/0
User network
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable DHCP snooping globally and on the interface.
2. Use the operation mode of the DHCP snooping binding table to check DHCP Request
messages.
3. Configure the packet discarding alarm function.
4. Configure the Option 82 function and create a binding table that contains information about
the interface.
Data Preparation
To complete the configuration, you need the following data:
l ID of the VLAN that each interface belongs to
l Static IP addresses from which packets are forwarded
l Alarm threshold
NOTE
This configuration example provides only the commands related to the DHCP snooping configuration.
Procedure
Step 1 Enable DHCP snooping.
# Enable DHCP snooping globally.
<Quidway> system-view
[Quidway] dhcp enable
[Quidway] dhcp snooping enable
Run the display user-bind all command, and you can view all the static binding entries of users.
<Quidway> display user-bind all
bind-table:
ifname vsi O/I-vlan mac-address ip-address tp lease
-------------------------------------------------------------------------------
GE2/0/0 -- 3/ -- 0000-005e-008a 10.1.1.3 S 0
-------------------------------------------------------------------------------
Static binditem count: 1 Static binditem total count: 1
Run the display dhcp option82 interface command, and you can find that the function of
inserting the Option 82 field into packets is enabled on the interface.
<Quidway> display dhcp option82 interface gigabitethernet 2/0/0
dhcp option82 insert enable
----End
Configuration Files
#
sysname Quidway
#
dhcp enable
dhcp snooping enable
#
user-bind static ip-address 10.1.1.3 mac-address 0000-005e-008a interface
gigabitethernet 2/0/0 vlan 3
#
interface gigabitethernet 2/0/0
dhcp snooping enable
dhcp snooping check user-bind enable
dhcp snooping alarm user-bind enable
dhcp snooping alarm user-bind threshold 120
dhcp option82 insert enable
#
return
Networking Requirements
As shown in Figure 5-157, to prevent the attacker from sending a large number of DHCP Request
messages, it is required that DHCP snooping be enabled on the S9300 to control the rate of
sending DHCP Request messages to the protocol stack. At the same time, the packet discarding
alarm function is enabled.
Figure 5-157 Networking diagram for limiting the rate for sending DHCP messages
Attacker
L2 network
GE1/0/1
L2 network L3 network
GE1/0/2 GE2/0/1
DHCP client DHCP relay
S9300
DHCP server
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable DHCP snooping globally and in the interface view.
2. Set the rate of sending DHCP Request messages to the protocol stack.
3. Configure the packet discarding alarm function.
Data Preparation
To complete the configuration, you need the following data:
l Rate of sending DHCP Request messages
l Alarm threshold
NOTE
This configuration example provides only the commands related to the DHCP snooping configuration.
Procedure
Step 1 Enable DHCP snooping.
# Enable DHCP snooping globally.
<Quidway> system-view
[Quidway] dhcp enable
[Quidway] dhcp snooping enable
# Enable DHCP snooping on the user-side interface. The configuration procedure of GE 1/0/2
is the same as the configuration procedure of GE 1/0/1, and is not mentioned here.
[Quidway] interface gigabitethernet 1/0/1
[Quidway-GigabitEthernet1/0/1] dhcp snooping enable
[Quidway-GigabitEthernet1/0/1] quit
Run the display dhcp snooping global command on the S9300, and you can view that DHCP
snooping is enabled globally, and packet discarding alarm is enabled.
[Quidway] display dhcp snooping global
dhcp snooping enable
dhcp snooping check dhcp-rate enable
dhcp snooping check dhcp-rate 90
dhcp snooping check dhcp-rate alarm enable
dhcp snooping check dhcp-rate alarm threshold 80
----End
Configuration Files
#
sysname Quidway
#
dhcp enable
dhcp snooping enable
dhcp snooping check dhcp-rate enable
dhcp snooping check dhcp-rate alarm enable
dhcp snooping check dhcp-rate 90
dhcp snooping check dhcp-rate alarm threshold 80
#
interface GigabitEthernet1/0/1
dhcp snooping enable
#
interface GigabitEthernet1/0/2
dhcp snooping enable
#
return
Networking Requirements
As shown in Figure 5-158, DHCP clients are connected to the S9300 through VLAN 10. DHCP
client1 uses the dynamically allocated IP address and DHCP client2 uses the statically configured
IP address. It is required that DHCP snooping be configured on user-side interfaces GE 1/0/0
and GE 1/0/1 of the S9300 to prevent the following type of attacks:
GE2/0/0
S9300
GE1/0/0 GE1/0/1
Configuration Roadmap
The configuration roadmap is as follows:
6. Configure the Option 82 function and create the binding table that contains information
about the interface.
7. Configure the packet discarding alarm function and the alarm function for checking the
rate of sending packets.
Data Preparation
To complete the configuration, you need the following data:
This configuration example provides only the commands related to the DHCP snooping configuration.
Procedure
Step 1 Enable DHCP snooping.
# Enable DHCP snooping on the interface at the user side. The configuration procedure of GE
1/0/1 is the same as the configuration procedure of GE 1/0/0, and is not mentioned here.
[Quidway] interface gigabitethernet 1/0/0
[Quidway-GigabitEthernet1/0/0] dhcp snooping enable
[Quidway-GigabitEthernet1/0/0] quit
# Configure the interface connecting to the DHCP server as trusted and enable DHCP snooping
on all the interfaces connecting to the DHCP client. If the interface on the client side is not
configured as trusted, the default mode of the interface is untrusted after DHCP snooping is
enabled on the interface. This prevents bogus DHCP server attacks.
[Quidway] interface gigabitethernet 2/0/0
[Quidway-GigabitEthernet2/0/0] dhcp snooping trusted
[Quidway-GigabitEthernet2/0/0] quit
# Enable the checking of DHCP Request messages on the interfaces at the DHCP client side to
prevent attackers from sending bogus DHCP messages for extending IP address leases. The
configuration of GE 1/0/1 is the same as the configuration of GE 1/0/0, and is not mentioned
here.
# Enable the checking of the CHADDR field on the interfaces at the DHCP client side to prevent
attackers from changing the CHADDR field in DHCP Request messages. The configuration of
GE 1/0/1 is the same as the configuration of GE 1/0/0, and is not mentioned here.
[Quidway] interface gigabitethernet 1/0/0
[Quidway-GigabitEthernet1/0/0] dhcp snooping check mac-address enable
[Quidway-GigabitEthernet1/0/0] quit
# Enable the alarm function for checking the rate of sending packets, and set the alarm threshold
for checking the rate of sending packets.
[Quidway] dhcp snooping check dhcp-rate alarm enable
[Quidway] dhcp snooping check dhcp-rate alarm threshold 80
Run the display dhcp snooping interface command, and you can view information about DHCP
snooping on the interface.
Run the display user-bind all command, and you can view the static binding entries of users.
[Quidway] display user-bind all
bind-table:
ifname vsi O/I-vlan mac-address ip-address tp lease
-------------------------------------------------------------------------------
GE1/0/1 -- 10/ -- 0001-0002-0003 10.1.1.1 S 0
-------------------------------------------------------------------------------
Static binditem count: 1 Static binditem total count: 1
Run the display dhcp option82 interface command, and you can view the configuration of
Option 82 on the interface.
[Quidway] display dhcp option82 interface gigabitethernet 1/0/0
dhcp option82 insert enable
----End
Configuration Files
#
sysname Quidway
#
vlan batch 10
#
dhcp enable
dhcp snooping enable
dhcp snooping check dhcp-rate enable
Networking Requirements
As shown in Figure 5-159, the S9300 is connected to the DHCP server and DHCP client; the
DHCP relay function is enabled; DHCP client1 uses the dynamically allocated IP address and
DHCP client2 uses the statically configured IP address. It is required that DHCP snooping be
configured on the S9300 to prevent the following types of attacks:
l Bogus DHCP server attack
l DoS attack by changing the value of the CHADDR field
l Attack by sending bogus messages for extending IP address leases
l Attack by sending a large number of DHCP Request messages
When users log out abnormally after requesting for IP addresses, the system detects this failure
automatically, and then deletes the binding in the DHCP binding table, and notifies the DHCP
server to release IP addresses.
Figure 5-159 Networking diagram for enabling DHCP snooping on the DHCP relay agent
S9300
DHCP relay
GE1/0/0
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable DHCP snooping globally and in the interface view.
2. Configure interfaces to be trusted or untrusted to prevent bogus DHCP server attacks.
3. Configure the DHCP snooping binding table and check DHCP Request messages by
matching them with entries in the binding table to prevent attackers from sending bogus
DHCP messages for extending IP address leases.
4. Configure the checking of the CHADDR field in DHCP Request messages to prevent
attackers from changing the CHADDR field in DHCP Request messages.
5. Set the rate of sending DHCP Request messages to the protocol stack to prevent attackers
from sending a large number of DHCP Request messages.
6. Configure the Option 82 function and create the binding table that contains information
about the interface.
7. Configure the packet discarding alarm function and the alarm function for checking the
rate of sending packets.
Data Preparation
To complete the configuration, you need the following data:
l GE 1/0/0 belonging to VLAN 10 and GE 2/0/0 belonging to VLAN 20
l Static IP address from which packets are forwarded being 10.1.1.1/24 and corresponding
MAC address being 0001-0002-0003
l GE 1/0/0 configured as untrusted and GE 2/0/0 configured as trusted
l Rate of sending DHCP messages to the CPU being 90
l Mode of the Option 82 function being insert
This configuration example provides only the commands related to the DHCP snooping configuration.
For the configuration of DHCP Relay, see Configuring the DHCP Relay Agent in Quidway S9300 Terabit
Routing Switch Configuration Guide - IP Service.
Procedure
Step 1 Enable DHCP snooping.
# Configure the interface connecting to the DHCP server as trusted and enable DHCP snooping
on the interfaces connecting to the DHCP client. If the interface on the client side is not
configured as trusted, the default mode of the interface is untrusted after DHCP snooping is
enabled on the interface. This prevents bogus DHCP server attacks.
[Quidway] interface gigabitethernet 2/0/0
[Quidway-GigabitEthernet2/0/0] dhcp snooping trusted
[Quidway-GigabitEthernet2/0/0] quit
Step 3 Enable the checking for certain types of packets and configure the DHCP snooping binding table.
# Enable the checking of DHCP Request messages on the interface at the DHCP client side to
prevent attackers from sending bogus DHCP messages for extending IP address leases.
[Quidway] interface gigabitethernet 1/0/0
[Quidway-GigabitEthernet1/0/0] dhcp snooping check user-bind enable
[Quidway-GigabitEthernet1/0/0] quit
# Enable the checking of the CHADDR field on the interface at the DHCP client side to prevent
attackers from changing the CHADDR field in DHCP Request messages.
[Quidway] interface gigabitethernet 1/0/0
[Quidway-GigabitEthernet1/0/0] dhcp snooping check mac-address enable
[Quidway-GigabitEthernet1/0/0] quit
# If you use the static IP address, configuring DHCP snooping static entries is required.
[Quidway] user-bind static ip-address 10.1.1.1 mac-address 0001-0002-0003
interface gigabitethernet 1/0/0 vlan 10
# Check the rate of sending DHCP messages to prevent attackers from sending DHCP Request
messages.
# Configure the user-side interface to append the Option 82 field to DHCP messages.
[Quidway] interface gigabitethernet 1/0/0
[Quidway-GigabitEthernet1/0/0] dhcp option82 insert enable
[Quidway-GigabitEthernet1/0/0] quit
# Enable the packet discarding alarm function, and set the alarm threshold of the number of
discarded packets.
[Quidway] interface gigabitethernet 1/0/0
[Quidway-GigabitEthernet1/0/0] dhcp snooping alarm user-bind enable
[Quidway-GigabitEthernet1/0/0] dhcp snooping alarm mac-address enable
[Quidway-GigabitEthernet1/0/0] dhcp snooping alarm untrust-reply enable
[Quidway-GigabitEthernet1/0/0] dhcp snooping alarm user-bind threshold 120
[Quidway-GigabitEthernet1/0/0] dhcp snooping alarm mac-address threshold 120
[Quidway-GigabitEthernet1/0/0] dhcp snooping alarm untrust-reply threshold 120
[Quidway-GigabitEthernet1/0/0] quit
# Enable the alarm function for checking the rate of sending packets and set the alarm threshold
for checking the rate of sending packets.
[Quidway] dhcp snooping check dhcp-rate alarm enable
[Quidway] dhcp snooping check dhcp-rate alarm threshold 80
# The system sends the ARP packet to probe the IP address that expires within the aging time
in the DHCP snooping entry and does not exist in the ARP entry. If no user is detected within
the specified number of detection times, the system deletes the binding relation in the DHCP
binding table and notifies the DHCP server to release the IP address.
[Quidway] arp dhcp-snooping-detect enable
Run the display dhcp snooping global command on the S9300, and you can view that DHCP
snooping is enabled globally. You can also view the statistics on alarms.
[Quidway] display dhcp snooping global
dhcp snooping enable
dhcp snooping check dhcp-rate enable
dhcp snooping check dhcp-rate 90
dhcp snooping check dhcp-rate alarm enable
dhcp snooping check dhcp-rate alarm threshold 80
Run the display dhcp snooping interface command, and you can view information about DHCP
snooping on the interface.
Run the display user-bind all command, and you can view the static binding entries of users.
[Quidway] display user-bind all
bind-table:
ifname vsi O/I-vlan mac-address ip-address tp lease
-------------------------------------------------------------------------------
GE1/0/0 -- 10/ -- 0001-0002-0003 10.1.1.1 S 0
-------------------------------------------------------------------------------
Static binditem count: 1 Static binditem total count: 1
Run the display dhcp option82 interface command, and you can view the configuration of
Option 82 on the interface.
[Quidway] display dhcp option82 interface gigabitethernet 1/0/0
dhcp option82 insert enable
----End
Configuration Files
#
sysname Quidway
#
vlan batch 10
#
dhcp enable
dhcp snooping enable
dhcp snooping check dhcp-rate enable
dhcp snooping check dhcp-rate alarm enable
dhcp snooping check dhcp-rate 90
dhcp snooping check dhcp-rate alarm threshold 80
#
user-bind static ip-address 10.1.1.1 mac-address 0001-0002-0003 interface
gigabitethernet 1/0/0 vlan 10
#
interface GigabitEthernet1/0/0
dhcp snooping enable
dhcp snooping alarm untrust-reply enable
dhcp snooping alarm untrust-reply threshold 120
dhcp snooping check mac-address enable
dhcp snooping alarm mac-address enable
dhcp snooping alarm mac-address threshold 120
dhcp snooping check user-bind enable
dhcp snooping alarm user-bind enable
dhcp snooping alarm user-bind threshold 120
dhcp option82 insert enable
#
interface GigabitEthernet2/0/0
dhcp snooping trusted
#
arp dhcp-snooping-detect enable
#
return
Networking Requirements
As shown in Figure 5-160, Host A is connected to the S9300through GE 1/0/1 and Host B is
connected to the S9300 through GE 1/0/2. You need to configure the IP source guard function
on the S9300 so that Host B cannot forge the IP address and MAC address on Host A and the
IP packets from Host A can be sent to the server.
S9300
GE1/0/1 GE1/0/2
Packets:
SIP:10.0.0.1/24
SMAC:2-2-2
Configuration Roadmap
Assume that the user is configured with an IP address statically. The configuration roadmap is
as follows:
1. Enable the IP source guard function on the interfaces connected to Host A and Host B.
2. Configure the check items of IP packets.
3. Configure a static binding table.
Data Preparation
To complete the configuration, you need the following data:
This configuration example provides only the commands related to the IP Source Guard configuration.
Procedure
Step 1 Enable the IP source guard function.
# Enable the IP source guard function on GE 1/0/1 connected to Host A.
[Quidway] interface gigabitethernet 1/0/1
[Quidway-GigabitEthernet1/0/1] ip source check user-bind enable
[Quidway-GigabitEthernet1/0/1] ip source check user-bind check-item ip-address mac-
address
[Quidway-GigabitEthernet1/0/1] quit
The preceding information indicates that Host A exists in the static binding table, whereas Host
B does not exist.
----End
Configuration Files
#
sysname Quidway
#
user-bind static ip-address 10.0.0.1 mac-address 0001-0001-0001 interface
GigabitEthernet 1/0/1 vlan 10
#
interface GigabitEthernet 1/0/1
ip source check user-bind enable
Networking Requirements
As shown in Figure 5-161, the S9300 is connected to a server through GE 1/0/3 and is connected
to four users in VLAN 10 and VLAN 20 through GE 1/0/1 and GE 1/0/2. There are the following
ARP attacks on the network:
l The server may send several packets with an unreachable destination IP address, and the
number of these packets is larger than the number of packets from common users.
l After virus attacks occur on User 1, a large number of ARP packets are sent. Among these
packets, the source IP address of certain ARP packets changes on the local network segment
and the source IP address of certain ARP packets is the same as the IP address of the
gateway.
l User 3 constructs a large number of ARP packets with a fixed IP address to attack the
network.
l User 4 constructs a large number of ARP packets with an unreachable destination IP address
to attack the network.
It is required that ARP security functions be configured on the S9300 to prevent the preceding
attacks. The suppression rate of ARP Miss packets set on the server should be greater than the
suppression rate of other users.
VLAN10 VLAN20
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable strict ARP learning.
2. Enable interface-based ARP entry restriction.
3. Enable the ARP anti-spoofing function.
4. Enable the ARP anti-attack function for preventing ARP packets with the bogus gateway
address.
5. Configure the rate suppression function for ARP packets.
6. Configure the rate suppression function for ARP Miss packets.
7. Enable log and alarm functions for potential attacks.
Data Preparation
To complete the configuration, you need the following data:
l Number of limited ARP entries on the interface being 20
l Anti-spoofing mode used to prevent attacks that is initiated by User 1 being fixed-mac
l IP address of the server being 2.2.2.2/24
l IP address of User 4 that sends a large number of ARP packets being 2.2.4.2/24
l Maximum suppression rate for ARP packets of User 4 being 200 pps and maximum
suppression rate for ARP packets of other users being 300 pps
l Maximum suppression rate for ARP Miss packets of common users being 400 pps and
maximum suppression rate for ARP Miss packets on the server being 1000 pps
l Interval for writing an ARP log and sending an alarm being 30 seconds
Procedure
Step 1 Enable strict ARP learning.
<Quidway> system-view
[Quidway] arp learning strict
Step 4 Enable the ARP anti-attack function for preventing ARP packets with the bogus gateway
address.
# Enable the ARP anti-attack function for preventing ARP packets with the bogus gateway
address to prevent User 1 from sending ARP packets with the bogus gateway address.
[Quidway] arp anti-attack gateway-duplicate enable
Step 6 Configure the rate suppression function for ARP Miss packets.
# Set the suppression rate for ARP Miss packets of the system to 400 pps to prevent users from
sending a large number of IP packets with an unreachable destination IP address.
[Quidway] arp-miss speed-limit source-ip maximum 400
# Set the suppression rate for ARP Miss packets on the server to 1000 pps to prevent the server
from sending a large number of IP packets with an unreachable destination IP address, and to
prevent communication on the network when the rate for the server to send IP packets with an
unreachable destination IP address is not as required.
[Quidway] arp-miss speed-limit source-ip 2.2.2.2 maximum 1000
You can use the display arp-limit command to check the maximum number of ARP entries
learned by the interface.
<Quidway> display arp-limit interface GigabitEthernet1/0/1
interface LimitNum VlanID LearnedNum(Mainboard)
---------------------------------------------------------------------------
GigabitEthernet1/0/1 20 10 0
---------------------------------------------------------------------------
Total:1
You can use the display arp anti-attack configuration all command to check the configuration
of ARP anti-attack.
<Quidway> display arp anti-attack configuration all
ARP anti-attack entry-check mode: fixed-MAC
You can use the display arp packet statistics command to view the number of discarded ARP
packets and the number of learned ARP entries. In addition, you can also use the display arp
anti-attack gateway-duplicate item command to view information about attacks from the
packets with the forged gateway address on the current network.
<Quidway> display arp packet statistics
ARP Pkt Received: sum 167
ARP Learnt Count: sum 8
ARP Pkt Discard For Limit: sum 5
ARP Pkt Discard For SpeedLimit: sum 0
ARP Pkt Discard For Other: sum 3
----End
Configuration Files
#
sysname Quidway
#
vlan batch 10 20 30
#
arp speed-limit source-ip maximum 300
arp-miss speed-limit source-ip maximum 400
arp learning strict
arp anti-attack log-trap-timer 30
#
arp anti-attack entry-check fixed-mac enable
arp anti-attack gateway-duplicate enable
arp-miss speed-limit source-ip 2.2.2.2 maximum 1000
arp speed-limit source-ip 2.2.4.2 maximum 200
#
interface GigabitEthernet 1/0/1
port hybrid pvid vlan 10
port hybrid tagged vlan 10
arp-limit vlan 10 maximum 20
#
interface GigabitEthernet 1/0/2
port hybrid pvid vlan 20
port hybrid tagged vlan 20
arp-limit vlan 20 maximum 20
#
interface GigabitEthernet 1/0/3
port hybrid pvid vlan 30
port hybrid untagged vlan 30
arp-limit vlan 30 maximum 20
#
return
Networking Requirements
As shown in Figure 5-162, two users are connected to the S9300 through GE 1/0/1 and GE 1/0/2
respectively. Assume that the user connected to GE 1/0/2 is an attacker. To prevent the man-in-
the-middle attacks, you can configure the IP source guard function. After the IP source guard
function is configured on the S9300, the S9300 checks the IP packets according to the binding
table. Only the IP packets that match the content of the binding table can be forwarded; the other
IP packets are discarded. In addition, you can enable the alarm function for discarded packets.
Attacker
S9300
GE1/0/2
GE1/0/1
Server
IP:10.0.0.1/24
MAC:1-1-1
Client VLAN ID:10
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Configure the IP source guard function.
Run the display arp anti-attack check user-bind interface command, and you can view the
configuration of the IP source guard function on the interface.
<Quidway> display arp anti-attack check user-bind interface gigabitethernet 1/0/1
arp anti-attack check user-bind enable
arp anti-attack check user-bind alarm enable
ARP packet drop count = 0
The preceding information indicates that GE 1/0/1 does not discard ARP packets, whereas GE
1/0/2 has discarded ARP packets. It indicates that the anti-attack function takes effect.
----End
Configuration Files
#
sysname Quidway
#
vlan batch 10
#
arp anti-attack check user-bind alarm threshold 80
#
user-bind static ip-address 10.0.0.1 mac-address 0001-0001-0001 interface
gigabitethernet 1/0/1 vlan 10
#
interface gigabitethernet 1/0/1
arp anti-attack check user-bind enable
arp anti-attack check user-bind check-item ip-address mac-address
#
interface gigabitethernet 1/0/2
arp anti-attack check user-bind enable
arp anti-attack check user-bind check-item ip-address mac-address
#
return
Networking Requirements
As shown in Figure 5-163, the S9300 is connected to the Layer 2 network and Layer 3 router.
To limit the number of broadcast, multicast, or unknown unicast packets forwarded on the Layer
2 network, you can configure traffic suppression on GE 1/0/2.
GE1/0/2 GE1/0/3
L2 network L3 network
S9300
Configuration Roadmap
Configure traffic suppression in the interface view of GE 1/0/2.
Data Preparation
To complete the configuration, you need the following data:
l GE 1/0/2 where traffic suppression is configured
l Traffic suppression for broadcast and unknown unicast packets based on the bit rate
l Traffic suppression for multicast packets based on the rate percentage
l Maximum rate of broadcast and unknown unicast packets being 100 kbit/s after traffic
suppression is configured
l Maximum rate of multicast packets being 80 percent of the interface rate after traffic
suppression is configured
Procedure
Step 1 Enter the interface view.
<Quidway> system-view
[Quidway] interface gigabitethernet 1/0/2
Run the display flow-suppression interface command, and you can view the configuration of
traffic suppression on GE 1/0/2.
<Quidway> display flow-suppression interface gigabitethernet 1/0/2
storm type rate mode set rate value
-------------------------------------------------------------------------------
unknown-unicast bps cir: 100(kbit/s), cbs: 18800(byte)
multicast percent percent: 80%
broadcast bps cir: 100(kbit/s), cbs: 18800(byte)
-------------------------------------------------------------------------------
----End
Configuration Files
#
sysname Quidway
#
interface gigabitethernet 1/0/2
unicast-suppression cir 100 cbs 18800
multicast-suppression percent 80
broadcast-suppression cir 100 cbs 18800
#
return
Networking Requirements
As shown in Figure 5-164, the S9300 is connected to the Layer 2 network and Layer 3 router.
To ensure that users on the Layer 2 network can first access the S9300, you can configure
whitelist items that contain MAC addresses, VLAN IDs, and interfaces of the users.
Figure 5-164 Networking diagram for sending a whitelist item to the CPU
GE1/0/2 GE1/0/3
L2 network L3 network
S9300
Configuration Roadmap
Configure the whitelist item in the system view of the S9300.
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Enter the system view.
<Quidway> system-view
----End
Configuration Files
#
sysname Quidway
#
whitelist item 00e0-fc5e-008a interface gigabitethernet 1/0/2 vlan 10
#
return
Networking Requirements
As shown in Figure 5-165, User A is connected to GE 1/0/1 on the S9300. It is required that IP
source trail be enabled on the S9300 so that the attack source can be traced after User A suffers
from DoS attacks.
GE1/0/1
ISP
UserA S9300
10.0.0.3
Configuration Roadmap
Configure IP source trail in the system view of the S9300.
Data Preparation
To complete the configuration, you need the following data:
l Interface connecting the S9300 and the user host: GE 1/0/1
l IP address of the attacked user host: 10.0.0.3
Procedure
Step 1 Configure IP source trail based on the destination IP address.
<Quidway> system-view
[Quidway] ip source-trail ip-address 10.0.0.3
----End
Configuration Files
#
sysname Quidway
#
ip source-trail ip-address 10.0.0.3
#
return
Networking Requirements
As shown in Figure 5-166, the S9300 is connected to the router of the ISP through GE 1/0/0
and is connected to the user network through GE 2/0/0. To protect the S9300 against the attack
based on the source address at the user side, you need to enable the URPF check function and
matching of the default route on the S9300.
GE2/0/0 GE1/0/0
User network ISP
S9300
Configuration Roadmap
Enable URPF on user side interface GE 2/0/0 of the S9300.
Data Preparation
To complete the configuration, you need the following data:
l URPF strict check mode
NOTE
As shown in Figure 5-166, the networking of symmetric routes is adopted. URPF strict check is
recommended in the case of symmetric routes.
The URPF takes effect when the unicast route functions normally. The following configuration
procedure lists only URPF-related configurations, and the configurations of IP addresses and
unicast route are not mentioned.
Procedure
Step 1 Enable URPF on an LPU.
<Quidway> system-view
[Quidway] urpf slot 2
interface GigabitEthernet2/0/0
urpf strict allow-default-route
#
return
----End
Configuration Files
#
sysname Quidway
#
urpf slot 2
#
interface GigabitEthernet2/0/0
urpf strict allow-default-route
#
return
Networking Requirements
As shown in Figure 5-167, GE 1/0/1 of the S9300 is connected to the user, and GE 2/0/1 is
connected to the upstream router. To prevent source address spoofing, you need to configure
strict URPF check on GE 1/0/1 and GE 2/0/1. In addition, it is required that the S9300 trusts the
packets from user A whose IP address is 10.0.0.2/24. In this case, you also need to disable URPF
check for the packets sent by user A.
Figure 5-167 Networking diagram for disabling URPF for the specified traffic
PC A
IP:10.0.0.2/24
GE1/0/1 GE2/0/1
S9300
PC B
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the URPF function.
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Configure the URPF function.
Step 2 Configure the traffic classifier that is based on the ACL rules.
# Define the traffic behavior and disable the URPF function in the traffic behavior view.
[Quidway] traffic behavior tb1
[Quidway-behavior-tb1] ip uprf disable
[Quidway-behavior-tb1] quit
# Define the traffic policy and associate the traffic classifier and traffic behavior with the traffic
policy.
[Quidway] traffic policy tp1
[Quidway-trafficpolicy-tp1] classifier tc1 behavior tb1
[Quidway-trafficpolicy-tp1] quit
----End
Configuration Files
#
sysname Quidway
#
urpf slot 1
urpf slot 2
#
acl number 2000
rule 5 permit source 10.0.0.0 0.0.0.255
#
traffic classifier tc1 operator or precedence 20
if-match acl 2000
#
traffic behavior tb1
statistic enable
ip urpf disable
#
traffic policy tp1
classifier tc1 behavior tb1
#
interface GigabitEthernet1/0/1
urpf strict
traffic-policy tp1 inbound
#
interface GigabitEthernet2/0/1
urpf strict
#
return
NOTE
l The MPLS function of the S9300 is controlled by the license. By default, the MPLS function is
disabled on the S9300. To use the MPLS function of the S9300,buy the license from the Huawei
local office.
l The G24SA,G24CA and X12SA boards do not support the MPLS function.
Networking Requirements
As shown in Figure 5-168, the nodes support MPLS and OSPF as an IGP is run on the MPLS
backbone network.
Bidirectional static LSPs are set up between S9300_A and S9300_D. The LSP from S9300_A
to S9300_D is S9300_A → S9300_B → S9300_D; the LSP from S9300_D to S9300_A is
S9300_D → S9300_C → S9300_A.
/ 0
1/0 GE
2/0
GE / 0
Loopback1 S9300_B Loopback1
1.1.1.9/32 4.4.4.9/32
/ 0 GE
1/0 1/0
GE / 0
S9300_A GE / 0 S9300_D
2/0
/ 2/0
0 GE
S9300_C
GE /0
1/0
/ 2/0
0 GE
Loopback1
3.3.3.9/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs on the S9300 and add interfaces to the VLANs.
2. Assign an IP address to each VLANIF interface on each node and assign the loopback
address used as the LSR ID, and configure OSPF to advertise the network segments that
the interfaces are connected to and the host route of the LSR ID.
3. Enable MPLS globally on each node.
4. Enable MPLS on each VLANIF interface.
5. Configure the destination IP address, next hop, value of the outgoing label for the LSP on
the ingress node.
6. Configure the incoming interface, value of the incoming label corresponding to the
outgoing label of the last node, and next hop and value of the outgoing label of the LSP on
the transit node.
7. Configure the incoming interface and value of the incoming label corresponding to the
outgoing label of the last node of the LSP on the egress node.
Data Preparation
To complete the configuration, you need the following data:
l IP address of each interface on each node shown in Figure 5-168, OSPF process ID, and
OSPF area ID
l Name of the static LSP
l Value of the outgoing label on each interface
Procedure
Step 1 Create VLANs on the S9300 and add GE interfaces to the VLANs, create VLANIF interfaces,
and assign IP addresses to the VLANIF interfaces.
# Configure S9300_A..
<Quidway> system-view
[Quidway] sysname S9300_A
[S9300_A] interface loopback1
[S9300_A-LoopBack1] ip address 1.1.1.9 32
[S9300_A-LoopBack1] quit
[S9300_A] interface gigabitethernet1/0/0
# Configure S9300_B.
<Quidway> system-view
[Quidway] sysname S9300_B
[S9300_B] interface loopback1
[S9300_B-LoopBack1] ip address 2.2.2.9 32
[S9300_B] interface gigabitethernet1/0/0
[S9300_B-GigabitEthernet1/0/0] port link-type access
[S9300_B-GigabitEthernet1/0/0] quit
[S9300_B-LoopBack1] quit
[S9300_B] vlan 10
[S9300_B-vlan10] port gigabitethernet1/0/0
[S9300_B-vlan10] quit
[S9300_B] interface vlanif 10
[S9300_B-Vlanif10] ip address 10.1.1.2 24
[S9300_B-Vlanif10] quit
[S9300_B] interface gigabitethernet2/0/0
[S9300_B-GigabitEthernet2/0/0] port link-type access
[S9300_B-GigabitEthernet2/0/0] quit
[S9300_B] vlan 20
[S9300_B-vlan20] port gigabitethernet2/0/0
[S9300_B-vlan20] quit
[S9300_B] interface vlanif 20
[S9300_B-Vlanif20] ip address 10.2.1.1 24
[S9300_B-Vlanif20] quit
# Configure S9300_C.
<Quidway> system-view
[Quidway] sysname S9300_C
[S9300_C] interface loopback1
[S9300_C-LoopBack1] ip address 3.3.3.9 32
[S9300_C-LoopBack1] quit
[S9300_C] interface gigabitethernet1/0/0
[S9300_C-GigabitEthernet1/0/0] port link-type access
[S9300_C-GigabitEthernet1/0/0] quit
[S9300_C] vlan 30
[S9300_C-vlan30] port gigabitethernet1/0/0
[S9300_C-vlan30] quit
[S9300_C] interface vlanif 30
[S9300_C-Vlanif30] ip address 10.3.1.2 24
[S9300_C-Vlanif30] quit
[S9300_C] interface gigabitethernet2/0/0
[S9300_C-GigabitEthernet2/0/0] port link-type access
[S9300_C-GigabitEthernet2/0/0] quit
[S9300_C] vlan 40
[S9300_C-vlan40] port gigabitethernet2/0/0
[S9300_C-vlan40] quit
[S9300_C] interface vlanif 40
[S9300_C-Vlanif40] ip address 10.4.1.1 24
[S9300_C-Vlanif40] quit
# Configure S9300_D.
<Quidway> system-view
[Quidway] sysname S9300_D
[S9300_D] interface loopback1
[S9300_D-LoopBack1] ip address 4.4.4.9 32
[S9300_D-LoopBack1] quit
[S9300_D] interface gigabitethernet1/0/0
[S9300_D-GigabitEthernet1/0/0] port link-type access
[S9300_D-GigabitEthernet1/0/0] quit
[S9300_D] vlan 20
[S9300_D-vlan20] port gigabitethernet1/0/0
[S9300_D-vlan20] quit
[S9300_D] interface vlanif 20
[S9300_D-Vlanif20] ip address 10.2.1.2 24
[S9300_D-Vlanif20] quit
[S9300_D] interface gigabitethernet2/0/0
[S9300_D-GigabitEthernet2/0/0] port link-type access
[S9300_D-GigabitEthernet2/0/0] quit
[S9300_D] vlan 40
[S9300_D-vlan40] port gigabitethernet2/0/0
[S9300_D-vlan40] quit
[S9300_D] interface vlanif 40
[S9300_D-Vlanif40] ip address 10.4.1.2 24
[S9300_D-Vlanif40] quit
Step 2 Configure OSPF to advertise the network segments that the interfaces are connected to and the
host route of the LSR ID.
# Configure S9300_A.
[S9300_A] ospf 1
[S9300_A-ospf-1] area 0
[S9300_A-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0
[S9300_A-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[S9300_A-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.255
[S9300_A-ospf-1-area-0.0.0.0] quit
[S9300_A-ospf-1] quit
# Configure S9300_B.
[S9300_B] ospf 1
[S9300_B-ospf-1] area 0
[S9300_B-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0
[S9300_B-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[S9300_B-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
[S9300_B-ospf-1-area-0.0.0.0] quit
[S9300_B-ospf-1] quit
# Configure S9300_C.
[S9300_C] ospf 1
[S9300_C-ospf-1] area 0
[S9300_C-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0
[S9300_C-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.255
[S9300_C-ospf-1-area-0.0.0.0] network 10.4.1.0 0.0.0.255
[S9300_C-ospf-1-area-0.0.0.0] quit
[S9300_C-ospf-1] quit
# Configure S9300_D.
[S9300_D] ospf 1
[S9300_D-ospf-1] area 0
[S9300_D-ospf-1-area-0.0.0.0] network 4.4.4.9 0.0.0.0
[S9300_D-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
[S9300_D-ospf-1-area-0.0.0.0] network 10.4.1.0 0.0.0.255
[S9300_D-ospf-1-area-0.0.0.0] quit
[S9300_D-ospf-1] quit
After the configuration, run the display ip routing-table command on each node. You can view
that the nodes learn the routes from each other.
The next hop of the static LSP on 4.4.4.9/32 from S9300_A to S9300_D is determined by the
routing table. It is shown in boldface. In this example, the next hop IP address is 10.1.1.2/30.
The next hop of the static LSP on 1.1.1.9/32 from S9300_D to S9300_A is determined by the
routing table. It is shown in boldface. In this example, the next hop IP address is 10.4.1.1/24.
# Configure S9300_A.
[S9300_A] mpls lsr-id 1.1.1.9
[S9300_A] mpls
[S9300_A-mpls]
# Configure S9300_B.
# Configure S9300_C.
[S9300_C] mpls lsr-id 3.3.3.9
[S9300_C] mpls
[S9300_C-mpls]
# Configure S9300_D.
[S9300_D] mpls lsr-id 4.4.4.9
[S9300_D] mpls
[S9300_D-mpls]
# Configure S9300_A.
[S9300_A] interface Vlanif 10
[S9300_A-Vlanif10] mpls
[S9300_A-Vlanif10] quit
[S9300_A] interface Vlanif 30
[S9300_A-Vlanif30] mpls
[S9300_A-Vlanif30] quit
# Configure S9300_B.
[S9300_B] interface Vlanif 10
[S9300_B-Vlanif10] mpls
[S9300_B-Vlanif10] quit
[S9300_B] interface Vlanif 20
[S9300_B-Vlanif20] mpls
[S9300_B-Vlanif20] quit
# Configure S9300_C.
[S9300_C] interface Vlanif 30
[S9300_C-Vlanif30] mpls
[S9300_C-Vlanif30] quit
[S9300_C] interface Vlanif 40
[S9300_C-Vlanif40] mpls
[S9300_C-Vlanif40] quit
# Configure S9300_D.
[S9300_D] interface Vlanif 20
[S9300_D-Vlanif20] mpls
[S9300_D-Vlanif20] quit
[S9300_D] interface Vlanif 40
[S9300_D-Vlanif40] mpls
[S9300_D-Vlanif40] quit
After the configuration, run the display mpls static-lsp command on each node to view the
status of the static LSP. Take the display on S9300_A as an example.
[S9300_A] display mpls static-lsp
TOTAL : 1 STATIC LSP(S)
UP : 1 STATIC LSP(S)
DOWN : 0 STATIC LSP(S)
Name FEC I/O Label I/O If Stat
SAtoSD 4.4.4.9/32 NULL/20 -/Vlanif10 Up
The LSP is unidirectional, you need to configure a static LSP from S9300_D to S9300_A.
# After the configuration, run the ping lsp ip 1.1.1.9 32 command on S9300_D, and you can
find that the LSP can be pinged.
Run the display mpls static-lsp or display mpls static-lsp verbose command on each node to
check the status and detailed information about the static LSP. Take the display on S9300_D as
an example.
[S9300_D] display mpls static-lsp
TOTAL : 2 STATIC LSP(S)
UP : 2 STATIC LSP(S)
DOWN : 0 STATIC LSP(S)
Name FEC I/O Label I/O If Stat
SAtoSD -/- 40/NULL Vlanif20/- Up
SDtoSA 1.1.1.9/32 NULL/30 -/Vlanif40 Up
[S9300_D] display mpls static-lsp verbose
No : 1
LSP-Name : SAtoSD
LSR-Type : Egress
FEC : -/-
In-Label : 40
Out-Label : NULL
In-Interface : Vlanif20
Out-Interface : -
NextHop : -
Static-Lsp Type: Normal
Lsp Status : Up
No : 2
LSP-Name : SDtoSA
LSR-Type : Ingress
FEC : 1.1.1.9/32
In-Label : NULL
Out-Label : 30
In-Interface : -
Out-Interface : Vlanif40
NextHop : 10.4.1.1
----End
Configuration Files
l Configuration file of S9300_A
#
sysname S9300_A
#
vlan batch 10 30
#
mpls lsr-id 1.1.1.9
mpls
#
interface Vlanif 10
ip address 10.1.1.1 255.255.255.0
mpls
#
interface Vlanif 30
ip address 10.3.1.1 255.255.255.0
mpls
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 30
#
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 1.1.1.9 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.3.1.0 0.0.0.255
#
static-lsp ingress SAtoSD destination 4.4.4.9 32 nexthop 10.1.1.2 out-labe
20
static-lsp egress SDtoSA incoming-interface Vlanif30 in-label 60
#
return
interface GigabitEthernet2/0/0
port link-type access
port default vlan 20
#
interface LoopBack1
ip address 2.2.2.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.9 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.2.1.0 0.0.0.255
#
static-lsp transit SAtoSD incoming-interface Vlanif 10 in-label 20 nexthop
10.2
.1.2 out-label 40
#
return
l Configuration file of S9300_C
#
sysname S9300_C
#
vlan batch 30 40
#
mpls lsr-id 3.3.3.9
mpls
#
interface Vlanif30
ip address 10.3.1.2 255.255.255.0
mpls
#
interface Vlanif40
ip address 10.4.1.1 255.255.255.0
mpls
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 30
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 40
#
interface LoopBack1
ip address 3.3.3.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 3.3.3.9 0.0.0.0
network 10.3.1.0 0.0.0.255
network 10.4.1.0 0.0.0.255
#
static-lsp transit SDtoSA incoming-interface vlanif 40 in-label 30 nexthop
10.3.1.1 out-label 60
#
return
l Configuration file of S9300_D
#
sysname S9300_D
#
vlan batch 20 40
#
mpls lsr-id 4.4.4.9
mpls
#
interface Vlanif20
ip address 10.2.1.2 255.255.255.0
mpls
#
interface Vlanif40
ip address 10.4.1.2 255.255.255.0
mpls
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 20
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 40
#
interface LoopBack1
ip address 4.4.4.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 4.4.4.9 0.0.0.0
network 10.2.1.0 0.0.0.255
network 10.4.1.0 0.0.0.255
#
static-lsp egress SAtoSD incoming-interface vlanif 20 in-label 40
static-lsp ingress SDtoSA destination 1.1.1.9 32 nexthop 10.4.1.1 out-label
30
#
return
Networking Requirements
As shown in Figure 5-169:
l PE1, PE2, P1, and P2 are in an MPLS domain.
l Two static LSPs are set up between PE1 and PE2; P1 functions as the transit node of
LSP1 and P2 functions as the transit node of LSP2.
P and PE devices are S9300s.
It is required that the connectivity of LSP1 be detected when MPLS OAM is not used. When
the static LSP fails, PE1 can receive the defect notification within 50 ms.
P1
GE1/0/ 2
Loopback1 GE1/0/0 Loopback1
1.1.1.1/32 4.4.4.4/32
Static LSP1
GE1/0/ 0
GE1/0/0
GE1/0/ 1
GE1/0/ 1 Static LSP2
PE1 PE2
GE1/0/ 0 GE1/0/ 2
P2
Loopback1
3.3.3.3/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure VLANIF interfaces.
2. Configure OSPF in the MPLS domain to ensure the connectivity between nodes.
3. On PE1, create a BFD session to detect the static LSP.
4. On PE2, create a BFD session to notify PE1 of defects on the static LSP.
Data Preparation
To complete the configuration, you need the following data:
l IP address of each interface on each node
l OSPF process ID
l BFD session parameters including the configuration name and minimum intervals for
sending and receiving packets
Procedure
Step 1 Create VLANs on PE and P devices and add GE interfaces to the VLANs,create VLANIF
interfaces,and assign IP addresses to the VLANIF interfaces.
# Configure PE1.
<Quidway> system-view
[Quidway] sysname PE1
[PE1] interface loopback1
[PE1-LoopBack1] ip address 1.1.1.1 32
[PE1-LoopBack1] quit
[PE1] interface gigabitethernet1/0/0
[PE1-GigabitEthernet1/0/0] port link-type access
[PE1-GigabitEthernet1/0/0] quit
[PE1] vlan 10
[PE1-vlan10] port gigabitethernet1/0/0
[PE1-vlan10] quit
[PE1] interface vlanif 10
[PE1-Vlanif10] ip address 10.1.1.1 24
[PE1-Vlanif10] quit
[PE1] interface gigabitethernet1/0/1
[PE1-GigabitEthernet1/0/1] port link-type access
[PE1-GigabitEthernet1/0/1] quit
[PE1] vlan 30
[PE1-vlan30] port gigabitethernet1/0/1
[PE1-vlan30] quit
[PE1] interface vlanif 30
[PE1-Vlanif30] ip address 10.3.1.1 24
[PE1-Vlanif30] quit
# Configure P1.
<Quidway> system-view
[Quidway] sysname P1
[P1] interface loopback1
[P1-LoopBack1] ip address 2.2.2.2 32
[P1-LoopBack1] quit
[P1] interface gigabitethernet1/0/0
[P1-GigabitEthernet1/0/0] port link-type access
[P1-GigabitEthernet1/0/0] quit
[P1] vlan 10
[P1-vlan10] port gigabitethernet1/0/0
[P1-vlan10] quit
[P1] interface vlanif 10
[P1-Vlanif10] ip address 10.1.1.2 24
[P1-Vlanif10] quit
[P1] interface gigabitethernet1/0/2
[P1-GigabitEthernet1/0/2] port link-type access
[P1-GigabitEthernet1/0/2] quit
[P1] vlan 20
[P1-vlan20] port gigabitethernet1/0/2
[P1-vlan20] quit
[P1] interface vlanif 20
[P1-Vlanif20] ip address 10.2.1.1 24
[P1-Vlanif20] quit
# Configure P2.
<Quidway> system-view
[Quidway] sysname P2
[P2] interface loopback1
[P2-LoopBack1] ip address 3.3.3.3 32
[P2-LoopBack1] quit
[P2] interface gigabitethernet1/0/0
[P2-GigabitEthernet1/0/0] port link-type access
[P2-GigabitEthernet1/0/0] quit
[P2] vlan 30
[P2-vlan30] port gigabitethernet1/0/0
[P2-vlan30] quit
[P2] interface vlanif 30
[P2-Vlanif30] ip address 10.3.1.2 24
[P2-Vlanif30] quit
[P2] interface gigabitethernet1/0/2
[P2-GigabitEthernet1/0/2] port link-type access
[P2-GigabitEthernet1/0/2] quit
[P2] vlan 40
[P2-vlan40] port gigabitethernet1/0/2
[P2-vlan40] quit
[P2] interface vlanif 40
[P2-Vlanif40] ip address 10.4.1.1 24
[P2-Vlanif40] quit
# Configure PE2.
<Quidway> system-view
[Quidway] sysname PE2
[PE2] interface loopback1
[PE2-LoopBack1] ip address 4.4.4.4 32
[PE2-LoopBack1] quit
[PE2] interface gigabitethernet1/0/0
[PE2-GigabitEthernet1/0/0] port link-type access
[PE2-GigabitEthernet1/0/0] quit
[PE2] vlan 20
[PE2-vlan20] port gigabitethernet1/0/0
[PE2-vlan20] quit
[PE2] interface vlanif 20
[PE2-Vlanif20] ip address 10.2.1.2 24
[PE2-Vlanif20] quit
[PE2] interface gigabitethernet1/0/1
[PE2-GigabitEthernet1/0/1] port link-type access
[PE2-GigabitEthernet1/0/1] quit
[PE2] vlan 40
[PE2-vlan40] port gigabitethernet1/0/1
[PE2-vlan40] quit
[PE2] interface vlanif 40
[PE2-Vlanif40] ip address 10.4.1.2 24
[PE2-Vlanif40] quit
Step 2 Configure OSPF to advertise the network segments that the interfaces are connected to and the
host route of the LSR ID.
# Configure PE1.
[PE1] ospf 1
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
# Configure P1.
[P1] ospf 1
[P1-ospf-1] area 0
# Configure P2.
[P2] ospf 1
[P2-ospf-1] area 0
[P2-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[P2-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.255
[P2-ospf-1-area-0.0.0.0] network 10.4.1.0 0.0.0.255
[P2-ospf-1-area-0.0.0.0] quit
[P2-ospf-1] quit
# Configure PE2.
[PE2] ospf 1
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 4.4.4.4 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
[PE2-ospf-1-area-0.0.0.0] network 10.4.1.0 0.0.0.255
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
# Configure PE1.
[PE1] mpls lsr-id 1.1.1.1
[PE1] mpls
[PE1-mpls]
# Configure P1.
[P1] mpls lsr-id 2.2.2.2
[P1] mpls
[P1-mpls]
# Configure P2.
[P2] mpls lsr-id 3.3.3.3
[P2] mpls
[P2-mpls]
# Configure PE2.
[PE2] mpls lsr-id 4.4.4.4
[PE2] mpls
[PE2-mpls]
# Configure PE1.
[PE1] interface Vlanif 10
[PE1-Vlanif10] mpls
[PE1-Vlanif10] quit
[PE1] interface Vlanif 30
[PE1-Vlanif30] mpls
[PE1-Vlanif30] quit
# Configure P1.
[P1] interface Vlanif 10
[P1-Vlanif10] mpls
[P1-Vlanif10] quit
[P1] interface Vlanif 20
[P1-Vlanif20] mpls
[P1-Vlanif20] quit
# Configure P2.
[P2] interface Vlanif 30
[P2-Vlanif30] mpls
[P2-Vlanif30] quit
[P2] interface Vlanif 40
[P2-Vlanif40] mpls
[P2-Vlanif40] quit
# Configure PE2.
[PE2] interface Vlanif 20
[PE2-Vlanif20] mpls
[PE2-Vlanif20] quit
[PE2] interface Vlanif 40
[PE2-Vlanif40] mpls
[PE2-Vlanif40] quit
Step 5 Create a static LSP named LSP1 with PE1 being the ingress node, P1 being the transit node,
and PE2 being the egress node.
# Configure ingress node PE1.
[PE1] static-lsp ingress LSP1 destination 4.4.4.4 32 nexthop 10.1.1.2 out-label 20
Step 6 Create a static LSP named LSP2 with PE2 being the ingress node, P2 being the transit node,
and PE1 being the egress node.
# Configure ingress node PE1.
[PE1] static-lsp ingress LSP2 destination 4.4.4.4 32 nexthop 10.3.1.2 out-label 30
After the configuration, run the ping lsp ip 4.4.4.4 32 command on PE1, and you can find that
the LSP can be pinged.
Run the display mpls static-lsp or display mpls static-lsp verbose command on each node to
check the status and detailed information about the static LSP. Take the display on PE1 as an
example:
[PE1] display mpls static-lsp
TOTAL : 2 STATIC LSP(S)
UP : 2 STATIC LSP(S)
DOWN : 0 STATIC LSP(S)
Name FEC I/O Label I/O If Stat
LSP1 4.4.4.4/32 NULL/20 Vlanif10/- Up
LSP2 4.4.4.4/32 NULL/30 Vlanif30/- Up
[PE1] display mpls static-lsp verbose
No : 1
LSP-Name : LSP1
LSR-Type : Ingress
FEC : 4.4.4.4/32
In-Label : -
Out-Label : 20
In-Interface : -
Out-Interface : Vlanif10
NextHop : 10.1.1.2
Static-Lsp Type: Normal
Lsp Status : Up
No : 2
LSP-Name : LSP2
LSR-Type : Ingress
FEC : 4.4.4.4/32
In-Label : NULL
Out-Label : 30
In-Interface : -
Out-Interface : Vlanif30
NextHop : 10.3.1.2
Static-Lsp Type: Normal
Lsp Status : Up
# On egress node PE2, configure a BFD session to notify PE1 of defects about the static LSP.
[PE2] bfd
[PE2-bfd] quit
[PE2] bfd PE2toPE1 bind peer-ip 1.1.1.1
[PE2-bfd-session-PE2toPE1] discriminator local 2
[PE2-bfd-session-PE2toPE1] discriminator remote 1
[PE2-bfd-session-PE2toPE1] min-tx-interval 500
[PE2-bfd-session-PE2toPE1] min-rx-interval 500
[PE2-bfd-session-PE2toPE1] commit
[PE2-bfd-session-PE2toPE1] quit
# Run the display bfd session all verbose command on PE1, and you can view that the BFD
session is on PE1 Up.
[PE1] display bfd session all verbose
--------------------------------------------------------------------------------
Session MIndex : 4096 State : Up Name : PE1toPE2
--------------------------------------------------------------------------------
Local Discriminator : 1 Remote Discriminator : 2
Session Detect Mode : Asynchronous Mode Without Echo Function
BFD Bind Type : STATIC_LSP Bind
Bind Session Type : Static
Bind Peer IP Address : 4.4.4.4
NextHop Ip Address : 10.1.1.2
Bind Interface : -
Static LSP name : LSP1
LSP Token : 0x10002
# Run the display bfd session all verbose command on PE2 to check the configuration.
[PE2] display bfd session all verbose
--------------------------------------------------------------------------------
Session MIndex : 4096 State : Up Name : PE2toPE1
--------------------------------------------------------------------------------
Local Discriminator : 2 Remote Discriminator : 1
Session Detect Mode : Asynchronous Mode Without Echo Function
BFD Bind Type : STATIC_LSP Bind
Bind Session Type : Static
Bind Peer IP Address : 1.1.1.1
NextHop Ip Address : 10.2.1.1
Bind Interface : -
Static LSP name : LSP1
LSP Token : 0x10002
FSM Board Id : 0 TOS-EXP : 6
Min Tx Interval (ms) : 500 Min Rx Interval (ms) : 500
Actual Tx Interval (ms) : 500 Actual Rx Interval (ms) : 500
Local Detect Multi : 3 Detect Interval (ms) : 3000
Echo Passive : Disable Acl Number : -
Proc Interface Status : Disable Process PST :
Disable
WTR Interval (ms) : - Local Demand Mode :
Disable
Active Multi : 3
Last Local Diagnostic : No Diagnostic
Bind Application : LSPM | L2VPN | OAM_MANAGER
Session TX TmrID : 16407
Session Detect TmrID : 16408
Session Init TmrID : - Session WTR TmrID : -
Session Echo Tx TmrID : -
PDT Index : FSM-0 | RCV-0 | IF-0 | TOKEN-0
Session Description : -
--------------------------------------------------------------------------------
Total UP/DOWN Session Number : 1/0
# Run the display bfd session all verbose command to check the status of the BFD session.
[PE2] display bfd session all verbose
--------------------------------------------------------------------------------
Session MIndex : 4096 State : Up Name : PE2toPE1
--------------------------------------------------------------------------------
Local Discriminator : 2 Remote Discriminator : 1
----End
Configuration Files
l Configuration file of PE1
#
sysname PE1
#
vlan batch 10 30
#
bfd
#
mpls lsr-id 1.1.1.1
mpls
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
mpls
#
interface Vlanif30
ip address 10.3.1.1 255.255.255.0
mpls
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet1/0/1
port link-type access
port default vlan 30
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
bfd PE1toPE2 bind static-lsp LSP1
discriminator local 1
discriminator remote 2
min-tx-interval 500
min-rx-interval 500
commit
#
ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.3.1.0 0.0.0.255
#
static-lsp ingress LSP1 destination 4.4.4.4 32 nexthop 10.1.1.2 out-labe 20
static-lsp ingress LSP2 destination 4.4.4.4 32 nexthop 10.3.1.2 out-labe 30
#
return
l Configuration file of P1
#
sysname P1
#
vlan batch 10 20
#
mpls lsr-id 2.2.2.2
mpls
#
interface Vlanif10
ip address 10.1.1.2 255.255.255.0
mpls
#
interface Vlanif20
ip address 10.2.1.1 255.255.255.0
mpls
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet1/0/2
port link-type access
port default vlan 20
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.2.1.0 0.0.0.255
#
static-lsp transit LSP1 incoming-interface Vlanif 10 in-label 20 nexthop 10.2
.1.2 out-label 40
#
return
l Configuration file of P2
#
sysname P2
#
vlan batch 30 40
#
mpls lsr-id 3.3.3.3
mpls
#
interface Vlanif30
ip address 10.3.1.2 255.255.255.0
mpls
#
interface Vlanif40
ip address 10.4.1.1 255.255.255.0
mpls
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 30
#
interface GigabitEthernet1/0/2
port link-type access
port default vlan 40
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
#
ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 10.3.1.0 0.0.0.255
network 10.4.1.0 0.0.0.255
#
static-lsp transit LSP2 incoming-interface vlanif 30 in-label 30 nexthop
10.4.1.2 out-label 60
#
return
l Configuration file of PE2
#
sysname PE2
#
vlan batch 20 40
#
bfd
#
mpls lsr-id 4.4.4.4
mpls
#
interface Vlanif20
ip address 10.2.1.2 255.255.255.0
mpls
#
interface Vlanif40
ip address 10.4.1.2 255.255.255.0
mpls
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 20
#
interface GigabitEthernet1/0/1
port default vlan 40
#
interface LoopBack1
ip address 4.4.4.4 255.255.255.255
#
bfd PE2toPE1 bind peer-ip 1.1.1.1
discriminator local 1
discriminator remote 2
min-tx-interval 500
min-rx-interval 500
commit
#
ospf 1
area 0.0.0.0
network 4.4.4.4 0.0.0.0
network 10.2.1.0 0.0.0.255
network 10.4.1.0 0.0.0.255
#
static-lsp egress LSP1 incoming-interface vlanif 20 in-label 40
static-lsp egress LSP2 incoming-interface vlanif 40 in-label 60
#
return
Networking Requirements
As shown in Figure 5-170, local LDP sessions are set up between S9300_A and S9300_B, and
between S9300_B and S9300_C.
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs and add interfaces to the VLANs, and create VLANIF interfaces.
2. Enable global MPLS and MPLS LDP on the LSRs.
3. Enable MPLS on interfaces of the LSRs.
4. Enable MPLS LDP on interfaces of the two LSRs of the local LDP session.
Data Preparation
To complete the configuration, you need the following data:
l IP address of each interface on each LSR shown in Figure 5-170, OSPF process ID, and
OSPF area ID
l LSR ID of each node
Procedure
Step 1 Create VLANs on the S9300 and add GE interfaces to the VLANs, create VLANIF interfaces,
and assign IP addresses to the VLANIF interfaces.
# Configure S9300_A.
<Quidway> system-view
[Quidway] sysname S9300_A
[S9300_A] interface loopback0
[S9300_A-LoopBack0] ip address 1.1.1.1 32
[S9300_A-LoopBack0] quit
[S9300_A] interface gigabitethernet1/0/0
[S9300_A-GigabitEthernet1/0/0] port link-type access
[S9300_A-GigabitEthernet1/0/0] quit
[S9300_A] vlan 10
[S9300_A-vlan10] port gigabitethernet1/0/0
[S9300_A-vlan10] quit
[S9300_A] interface vlanif 10
[S9300_A-Vlanif10] ip address 10.1.1.1 24
# Configure S9300_B.
<Quidway> system-view
[Quidway] sysname S9300_B
[S9300_B] interface loopback0
[S9300_B-LoopBack0] ip address 2.2.2.2 32
[S9300_B-LoopBack0] quit
# Configure S9300_C.
<Quidway> system-view
[Quidway] sysname S9300_C
[S9300_C] interface loopback0
[S9300_C-LoopBack0] ip address 3.3.3.3 32
[S9300_C-LoopBack0] quit
[S9300_C] interface gigabitethernet2/0/0
[S9300_C-GigabitEthernet2/0/0] port link-type access
[S9300_C-GigabitEthernet2/0/0] quit
[S9300_C] vlan 20
[S9300_C-vlan20] port gigabitethernet2/0/0
[S9300_C-vlan20] quit
[S9300_C] interface vlanif 20
[S9300_C-Vlanif20] ip address 10.2.1.2 24
Step 2 Configure OSPF to advertise the network segments that the interfaces are connected to and the
host route of the LSR ID.
# Configure S9300_A.
[S9300_A] ospf 1
[S9300_A-ospf-1] area 0
[S9300_A-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[S9300_A-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
# Configure S9300_B.
[S9300_B] ospf 1
[S9300_B-ospf-1] area 0
[S9300_B-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[S9300_B-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[S9300_B-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
# Configure S9300_C.
[S9300_C] ospf 1
[S9300_C-ospf-1] area 0
[S9300_C-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[S9300_C-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
# Configure S9300_B.
# Configure S9300_C.
[S9300_C] mpls lsr-id 3.3.3.3
[S9300_C] mpls
[S9300_C-mpls]
[S9300_C-mpls]quit
[S9300_C] mpls ldp
# Configure S9300_B.
[S9300_B] interface vlanif 10
[S9300_B-Vlanif10] mpls
[S9300_B-Vlanif10] quit
[S9300_B] interface Vlanif 20
[S9300_B-Vlanif20] mpls
# Configure S9300_C.
[S9300_C] interface vlanif 20
[S9300_C-Vlanif20] mpls
# Configure S9300_B.
[S9300_B] interface vlanif 10
[S9300_B-Vlanif10] mpls ldp
[S9300_B-Vlanif10] quit
[S9300_B] interface vlanif 20
[S9300_B-Vlanif20] mpls ldp
# Configure S9300_C.
[S9300_C] interface vlanif 20
[S9300_C-Vlanif20] mpls ldp
----End
Configuration Files
l Configuration file of S9300_A
#
sysname S9300_A
#
vlan batch 10
#
mpls lsr-id 1.1.1.1
mpls
#
mpls ldp
#
interface Vlanif 10
ip address 10.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.1.1.0 0.0.0.255
#
return
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.2.1.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-171, a remote LDP session is set up between S9300_A and S9300_C.
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs and add interfaces to the VLANs, and create VLANIF interfaces.
2. Enable global MPLS and MPLS LDP on each LSR.
3. Enable MPLS on interfaces of the LSRs.
4. Enable MPLS LDP on interfaces of the two LSRs of the remote LDP session.
Data Preparation
To complete the configuration, you need the following data:
l IP address of each interface on each LSR shown in Figure 5-171, OSPF process ID, and
OSPF area ID
l LSR ID of each node
Procedure
Step 1 Create VLANs on the S9300 and add GE interfaces to the VLANs, create VLANIF interfaces,
and assign IP addresses to the VLANIF interfaces.
# Configure S9300_A.
<Quidway> system-view
[Quidway] sysname S9300_A
[S9300_A] interface loopback0
[S9300_A-LoopBack0] ip address 1.1.1.1 32
[S9300_A-LoopBack0] quit
[S9300_A] interface gigabitethernet1/0/0
[S9300_A-GigabitEthernet1/0/0] port link-type access
[S9300_A-GigabitEthernet1/0/0] quit
[S9300_A] vlan 10
[S9300_A-Vlan10] port gigabitethernet1/0/0
[S9300_A-Vlan10] quit
[S9300_A] interface vlanif 10
[S9300_A-Vlanif10] ip address 10.1.1.1 24
# Configure S9300_B.
<Quidway> system-view
[Quidway] sysname S9300_B
[S9300_B] interface loopback0
[S9300_B-LoopBack0] ip address 2.2.2.2 32
[S9300_B-LoopBack0] quit
[S9300_B] interface gigabitethernet1/0/0
[S9300_B-GigabitEthernet1/0/0] port link-type access
[S9300_B-GigabitEthernet1/0/0] quit
[S9300_B] vlan 10
[S9300_B-Vlan10] port gigabitethernet1/0/0
[S9300_B-Vlan10] quit
[S9300_B] interface vlanif 10
[S9300_B-Vlanif10] ip address 10.1.1.2 24
[S9300_B-Vlanif10] quit
[S9300_B] interface gigabitethernet2/0/0
[S9300_B-GigabitEthernet2/0/0] port link-type access
[S9300_B-GigabitEthernet2/0/0] quit
[S9300_B] vlan 20
[S9300_B-Vlan20] port gigabitethernet2/0/0
[S9300_B-Vlan20] quit
[S9300_B] interface vlanif 20
[S9300_B-Vlanif20] ip address 10.2.1.1 24
# Configure S9300_C.
<Quidway> system-view
[Quidway] sysname S9300_C
[S9300_C] interface loopback0
[S9300_C-LoopBack0] ip address 3.3.3.3 32
[S9300_C-LoopBack0] quit
[S9300_C] interface gigabitethernet2/0/0
[S9300_C-GigabitEthernet2/0/0] port link-type access
[S9300_C-GigabitEthernet2/0/0] quit
[S9300_C] vlan 20
[S9300_C-Vlan20] port gigabitethernet2/0/0
[S9300_C-Vlan20] quit
[S9300_C] interface vlanif 20
[S9300_C-Vlanif20] ip address 10.2.1.2 24
Step 2 Configure OSPF to advertise the network segments that the interfaces are connected to and the
host route of the LSR ID.
# Configure S9300_A.
[S9300_A] ospf 1
[S9300_A-ospf-1] area 0
[S9300_A-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[S9300_A-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
# Configure S9300_B.
[S9300_B] ospf 1
[S9300_B-ospf-1] area 0
[S9300_B-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[S9300_B-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[S9300_B-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
# Configure S9300_C.
[S9300_C] ospf 1
[S9300_C-ospf-1] area 0
[S9300_C-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[S9300_C-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
# Configure S9300_B.
[S9300_B] mpls lsr-id 2.2.2.2
[S9300_B] mpls
[S9300_B-mpls]quit
[S9300_B] mpls ldp
# Configure S9300_C.
[S9300_C] mpls lsr-id 3.3.3.3
[S9300_C] mpls
[S9300_C-mpls] quit
[S9300_C] mpls ldp
# Configure S9300_B.
[S9300_B] interface vlanif 10
[S9300_B-Vlanif10] mpls
[S9300_B-Vlanif10] quit
[S9300_B] interface vlanif 20
[S9300_B-Vlanif20] mpls
# Configure S9300_C.
[S9300_C] interface vlanif 20
[S9300_C-Vlanif20] mpls
Step 5 Specify the name and IP address of the remote peer on the two LSRs of a remote LDP session.
# Configure S9300_A.
[S9300_A] mpls ldp remote-peer s9300_C
[S9300_A-mpls-ldp-remote-s9300_C] remote-ip 3.3.3.3
[S9300_A-mpls-ldp-remote-s9300_C] quit
# Configure S9300_C.
[S9300_C] mpls ldp remote-peer s9300a
[S9300_C-mpls-ldp-remote-s9300a] remote-ip 1.1.1.1
[S9300_C-mpls-ldp-remote-s9300a] quit
Run the display mpls ldp remote-peer command on the two LSRs of the remote LDP session,
and you can view information about the remote peer.
Take the display on S9300_A as an example.
[S9300_A] display mpls ldp remote-peer
------------------------------------------------------------------------------
TOTAL: 1 Peer(s) Found.
----End
Configuration Files
l Configuration file of S9300_A
#
sysname S9300_A
#
vlan batch 10
#
mpls lsr-id 1.1.1.1
mpls
#
mpls ldp
#
mpls ldp remote-peer s9300_c
remote-ip 3.3.3.3
#
interface Vlanif 10
ip address 10.1.1.1 255.255.255.0
mpls
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.1.1.0 0.0.0.255
#
return
interface GigabitEthernet2/0/0
port link-type access
port default vlan 20
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.2.1.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-172, an LDP LSP is set up between S9300_A and S9300_C.
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l IP address of each interface on each LSR shown in Figure 5-172, OSPF process ID, and
OSPF area ID
l Modified the policy for triggering the establishement of LDP LSPs.
Procedure
Step 1 Configure the LDP LSP.
After the configuration in Example for Configuring an LDP LSP, all the LSRs triggers the
establishment of LDP LSPs according to the host route, which is the default triggering policy.
Run the display mpls ldp lsp command on the LSRs, and you can view that all the host routes
trigger the establishment of LDP LSPs.
NOTE
Generally, the default triggering policy is used. That is, the establishment of an LDP LSP is triggered by
the host route. You can perform the following procedures to modify the policy for triggering the
establishement of LDP LSPs as required.
Step 2 Modify the policy for triggering the establishement of LDP LSPs.
Modify the policy for triggering the establishement of as all on the LSRs so that all the static
routes and IGP routes can trigger the establishment of the LDP LSPs.
# Configure S9300_A.
[S9300_A] mpls
[S9300_A-mpls] lsp-trigger all
[S9300_A-mpls] quit
# Configure S9300_B.
[S9300_B] mpls
[S9300_B-mpls] lsp-trigger all
[S9300_B-mpls] quit
# Configure S9300_C.
[S9300_C] mpls
[S9300_C-mpls] lsp-trigger all
[S9300_C-mpls] quit
----End
Configuration Files
l Configuration file of S9300_A
#
sysname S9300_A
#
vlan batch 10
#
mpls lsr-id 1.1.1.1
mpls
lsp-trigger all
#
mpls ldp
#
interface Vlanif 10
ip address 10.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.1.1.0 0.0.0.255
#
return
l Configuration file of S9300_B
#
sysname S9300_B
#
vlan batch 10 20
#
mpls lsr-id 2.2.2.2
mpls
lsp-trigger all
#
mpls ldp
#
interface Vlanif 10
ip address 10.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif 20
ip address 10.2.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 20
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.2.1.0 0.0.0.255
#
return
l Configuration file of S9300_C
#
sysname S9300_C
#
vlan batch 20
#
mpls lsr-id 3.3.3.3
mpls
lsp-trigger all
#
mpls ldp
#
interface Vlanif 20
ip address 10.2.1.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 20
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
#
ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 10.2.1.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-173, the LDP LSPs are set up between the nodes. S9300_B, however,
permits only the FEC of 4.4.4.9/32 to establish the transit LSP.
GE1/0/0
GE2/0/0
GE1/0/0 GE1/0/0
S9300_A S9300_D
Loopback0 Loopback0
1.1.1.9/32 4.4.4.9/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs and add physical interfaces to the VLANs, and create VLANIF interfaces.
2. Configure the IP address of each interface on each node and the address of the loopback
interface used as the LSR ID, and configure OSPF to advertise the network segments that
the interfaces are connected to and the host route of the LSR ID.
3. Enable MPLS and MPLS LDP globally on the nodes and configure the policy for triggering
the establishment of LSPs.
4. Configure the IP prefix list for controlling the LSPs.
5. Filter the routes of transit LSPs by using the IP prefix list on transit node S9300_B.
6. Enable MPLS and MPLS LDP on each interface.
Data Preparation
To complete the configuration, you need the following data:
l IP address of each interface on each LSR shown in Figure 5-173, OSPF process ID, and
OSPF area ID
l Policy for triggering the establishment of LSPs
l Name of the IP prefix list and routes to be filtered on the transit node
Procedure
Step 1 Create VLANs and add interfaces to the VLANs, and create VLANIF interfaces.
For details, see Example for Configuring a Remote LDP Session.
Step 2 Configure the IP address of each interface on each node and configure OSPF to advertise the
network segments that the interfaces are connected to and the host route of the LSR ID.
# As shown in Figure 5-173, configure the IP address and mask of each interface, including the
loopback interface, and configure OSPF to advertise the network segments that the interfaces
are connected to and the host route of the LSR ID. The configuration details are not mentioned
here.
Step 3 Configure the IP prefix list on transit node S9300_B.
# Configure the IP prefix list on transit node S9300_B to permit only 4.4.4.9/32 on S9300_D to
establish the transit LSP.
[S9300_B]ip ip-prefix FilterOnTransit permit 4.4.4.9 32
Step 4 Configure basic MPLS functions on each node and interface and enable LDP.
# Configure S9300_A.
[S9300_A] mpls lsr-id 1.1.1.1
[S9300_A] mpls
# Configure S9300_B.
[S9300_B] mpls lsr-id 2.2.2.9
[S9300_B] mpls
[S9300_B-mpls] lsp-trigger all
[S9300_B-mpls] quit
[S9300_B] mpls ldp
[S9300_B-mpls-ldp] propagate mapping for ip-prefix FilterOnTransit
[S9300_B-mpls-ldp] quit
[S9300_B] interface Vlanif10
[S9300_B-Vlanif10] mpls
[S9300_B-Vlanif10] mpls ldp
[S9300_B-Vlanif10] quit
[S9300_B] interface Vlanif20
[S9300_B-Vlanif20] mpls
[S9300_B-Vlanif20] mpls ldp
[S9300_B-Vlanif20] quit
The configurations of S9300_C and S9300_D are similar to the configuration of S9300_A, and
are not mentioned here.
Step 5 Verify the configuration.
Run the display mpls ldp lsp command, and you can view the establishment of the LDP LSPs.
# Check the LDP LSP on S9300_A.
[S9300_A] display mpls ldp lsp
LDP LSP Information
------------------------------------------------------------------------------
SN DestAddress/Mask In/OutLabel Next-Hop In/Out-Interface
------------------------------------------------------------------------------
1 1.1.1.9/32 3/NULL 127.0.0.1 Vlanif10/InLoop0
2 2.2.2.9/32 NULL/3 10.1.1.2 -------/Vlanif10
3 4.4.4.9/32 NULL/1027 10.1.1.2 -------/Vlanif10
4 10.2.1.0/24 NULL/3 10.1.1.2 -------/Vlanif10
------------------------------------------------------------------------------
TOTAL: 4 Normal LSP(s) Found.
TOTAL: 0 Liberal LSP(s) Found.
According to the preceding information, only the LDP LSP to the destination 4.4.4.4/32 that
takes S9300_B as the transit node exists on each node, and other LDP LSPs that do not take
S9300_B as the transit node exist on each node. This is because the IP prefix list is configured.
----End
Configuration Files
l Configuration file of S9300_A
#
sysname S9300_A
#
vlan batch 10
#
mpls lsr-id 1.1.1.9
mpls
lsp-trigger all
#
mpls ldp
#
interface Vlanif 10
ip address 10.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface LoopBack0
ip address 1.1.1.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 1.1.1.9 0.0.0.0
network 10.1.1.0 0.0.0.255
#
return
l Configuration file of S9300_B
#
sysname S9300_B
#
vlan batch 10 20
#
mpls lsr-id 2.2.2.9
mpls
lsp-trigger all
#
mpls ldp
propagate mapping for ip-prefix FilterOnTransit
#
interface Vlanif 10
ip address 10.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif 20
ip address 10.2.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 20
#
interface LoopBack0
ip address 2.2.2.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.9 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.2.1.0 0.0.0.255
#
ip ip-prefix FilterOnTransit index 10 permit 4.4.4.9 32
#
return
l Configuration file of S9300_C
#
sysname S9300_C
#
vlan batch 20 30
#
mpls lsr-id 3.3.3.9
mpls
lsp-trigger all
#
mpls ldp
#
interface Vlanif 20
ip address 10.2.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif 30
ip address 10.3.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 20
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 30
#
interface LoopBack0
ip address 3.3.3.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 3.3.3.9 0.0.0.0
network 10.2.1.0 0.0.0.255
network 10.3.1.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-174, an LDP LSP is set up along the path PE1 → P1→ PE2 and the path
PE2 → P2 → PE1 is an IP link. Static BFD is required to detect the connectivity of the LDP
LSP.
Figure 5-174 Networking diagram for configuring static BFD for LDP LSPs
Loopback1
2.2.2.2/32
P1
GE1/0/ 1
Loopback1 GE1/0/0 Loopback1
1.1.1.1/32 4.4.4.4/32
LSP
GE1/0/ 0
GE1/0/0
GE1/0/ 1
GE1/0/ 1
PE1 PE2
GE1/0/ 0 GE1/0/ 1
P2
Loopback1
3.3.3.3/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANIF interfaces, and use OSPF in the entire MPLS domain to ensure the
connectivity between the nodes.
2. Set up an LDP LSP along the path PE1 → P1 → PE2.
3. On PE1, configure a BFD session that is bound to the LDP LSP.
4. On PE2, configure a BFD session that is bound to the IP link to notify PE1 of the detected
LDP LSP faults.
Data Preparation
To complete the configuration, you need the following data:
l IP address of each interface on each node
l OSPF process ID
l BFD configuration name, local discriminator, and remote discriminator
Procedure
Step 1 Create VLANs on PE and P devices and add GE interfaces to the VLANs, create VLANIF
interfaces, and assign IP addresses to the VLANIF interfaces and configure OSPF.
As shown in Figure 5-174, configure IP addresses and masks for the interfaces, including
loopback interfaces.
Configure OSPF on all the nodes and advertise host routes of the loopback interfaces. The
configuration details are not mentioned here.
After the configuration, LSRs can ping each other. Run the display ip routing-table command
on each LSR, and you can view the routing entries to the LSRs.
# Configure P1.
[P1] mpls lsr-id 2.2.2.1
[P1] mpls
[P1-mpls] quit
[P1] mpls ldp
[P1-mpls-ldp] quit
[P1] interface vlanif 10
[P1-Vlanif10] mpls
[P1-Vlanif10] mpls ldp
[P1] interface vlanif 20
[P1-Vlanif20] mpls
[P1-Vlanif20] mpls ldp
# Configure PE2.
[PE2] mpls lsr-id 4.4.4.1
[PE2] mpls
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlanif 20
[PE2-Vlanif20] mpls
[PE2-Vlanif120] mpls ldp
# Run the display mpls ldp lsp command, and you can view that an LDP LSP destined for
4.4.4.9/32 is set up on PE1.
<PE1> display mpls ldp lsp
Step 3 Enable global BFD on the two nodes of the detected link.
# Configure PE1.
<PE1> system-view
[PE1] bfd
[PE1-bfd] quit
# Configure PE2.
<PE2> system-view
[PE2] bfd
[PE2-bfd] quit
Step 4 On the ingress node, configure a BFD session that is bound to the LDP LSP.
# Configure PE1.
<PE1> system-view
[PE1] bfd pe1tope2 bind ldp-lsp peer-ip 4.4.4.4 nexthop 10.1.1.2 interface
vlanif10
[PE1-bfd-lsp-session-pe1tope2] discriminator local 1
[PE1-bfd-lsp-session-pe1tope2] discriminator remote 2
[PE1-bfd-lsp-session-pe1tope2] process-pst
[PE1-bfd-lsp-session-pe1tope2] commit
[PE1-bfd-lsp-session-pe1tope2] quit
Step 5 On the egress node, configure a BFD session that is bound to the IP link to notify the ingress
node of LDP LSP faults.
# Configure PE2.
<PE2> system-view
[PE2] bfd pe1tope2 bind peer-ip 1.1.1.1
[PE2-bfd-session-pe1tope2] discriminator local 2
[PE2-bfd-session-pe1tope2] discriminator remote 1
[PE2-bfd-session-pe1tope2] commit
[PE2-bfd-session-pe1tope2] quit
# After the configuration, run the display bfd session all verbose command on the ingress node,
and you can view that the State field is displayed as Up and the BFD Bind Type field is displayed
as LDP_LSP.
[PE1] display bfd session all verbose
--------------------------------------------------------------------------------
Session MIndex : 256 State : Up Name : 1to4
--------------------------------------------------------------------------------
Local Discriminator : 1 Remote Discriminator : 2
Session Detect Mode : Asynchronous Mode Without Echo Function
BFD Bind Type : LDP_LSP
Bind Session Type : Static
Bind Peer IP Address : 4.4.4.4
NextHop Ip Address : 10.1.1.2
Bind Interface : Vlanif10
LSP Token : 0x10000
FSM Board Id : 6 TOS-EXP : 6
Min Tx Interval (ms) : 1000 Min Rx Interval (ms) : 1000
Actual Tx Interval (ms): 1000 Actual Rx Interval (ms): 1000
Local Detect Multi : 3 Detect Interval (ms) : 3000
Echo Passive : Disable Acl Number : -
Proc Interface Status : Disable Process PST : Enable
WTR Interval (ms) : - Local Demand Mode : Disable
Active Multi : 3
Last Local Diagnostic : Neighbor Signaled Session Down(Receive AdminDown)
Bind Application : LSPM | L2VPN | OAM_MANAGER
Session TX TmrID : 94 Session Detect TmrID : 95
Session Init TmrID : - Session WTR TmrID : -
Session Echo Tx TmrID : -
PDT Index : FSM-0 | RCV-0 | IF-0 | TOKEN-0
Session Description : -
--------------------------------------------------------------------------------
# After the configuration, run the display bfd session all verbose command on the egress node,
and you can view that the (Multi Hop) State field is displayed as Up and the BFD Bind Type
field is displayed as Peer IP Address.
[PE2] display bfd session all verbose
--------------------------------------------------------------------------------
Session MIndex : 256 (Multi Hop) State : Up Name : 4to1
--------------------------------------------------------------------------------
Local Discriminator : 2 Remote Discriminator : 1
Session Detect Mode : Asynchronous Mode Without Echo Function
BFD Bind Type : Peer IP Address
Bind Session Type : Static
Bind Peer IP Address : 1.1.1.1
Bind Interface : -
FSM Board Id : 6 TOS-EXP : 6
Min Tx Interval (ms) : 1000 Min Rx Interval (ms) : 1000
Actual Tx Interval (ms): 1000 Actual Rx Interval (ms): 1000
Local Detect Multi : 3 Detect Interval (ms) : 3000
Echo Passive : Disable Acl Number : -
Proc Interface Status : Disable Process PST : Disable
WTR Interval (ms) : - Local Demand Mode : Disable
Active Multi : 3
Last Local Diagnostic : No Diagnostic
Bind Application : No Application Bind
Session TX TmrID : 75 Session Detect TmrID : 76
Session Init TmrID : - Session WTR TmrID : -
Session Echo Tx TmrID : -
PDT Index : FSM-0 | RCV-0 | IF-0 | TOKEN-0
Session Description : -
--------------------------------------------------------------------------------
----End
Configuration Files
l Configuration file of PE1
#
sysname PE1
#
vlan batch 10 30
#
bfd
#
mpls lsr-id 1.1.1.1
mpls
#
mpls ldp
#
interface Vlanif 10
ip address 10.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface Vlanif 30
ip address 10.3.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet1/0/1
port link-type access
port default vlan 30
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
bfd pe1tope2 bind ldp-lsp peer-ip 4.4.4.9 nexthop 10.1.1.2 interface vlanif10
discriminator local 1
discriminator remote 2
process-pst
commit
#
ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.3.1.0 0.0.0.255
#
static-lsp ingress LSP1 destination 4.4.4.4 32 nexthop 10.1.1.2 out-labe 20
static-lsp ingress LSP2 destination 4.4.4.4 32 nexthop 10.3.1.2 out-labe 30
#
return
l Configuration file of P1
#
sysname P1
#
vlan batch 10 20
#
mpls lsr-id 2.2.2.2
mpls
#
mpls ldp
#
interface Vlanif 10
ip address 10.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif 20
ip address 10.2.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet1/0/1
port link-type access
port default vlan 20
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.2.1.0 0.0.0.255
#
return
l Configuration file of P2
#
sysname P2
#
vlan batch 30 40
#
interface Vlanif 30
ip address 10.3.1.2 255.255.255.0
#
interface Vlanif 40
ip address 10.4.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 30
#
interface GigabitEthernet1/0/1
port link-type access
port default vlan 40
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
#
ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 10.3.1.0 0.0.0.255
network 10.4.1.0 0.0.0.255
#
return
l Configuration file of PE2
#
sysname PE2
#
vlan batch 20 40
#
bfd
#
mpls lsr-id 4.4.4.4
mpls
#
mpls ldp
#
interface Vlanif 20
ip address 10.2.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif 40
ip address 10.4.1.2 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 20
#
interface GigabitEthernet1/0/1
port link-type access
port default vlan 40
#
interface LoopBack1
ip address 4.4.4.4 255.255.255.255
#
bfd 4to1 bind peer-ip 1.1.1.1
discriminator local 2
discriminator remote 1
commit
#
ospf 1
area 0.0.0.0
network 4.4.4.4 0.0.0.0
network 10.2.1.0 0.0.0.255
network 10.4.1.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-175, S9300_A, S9300_B, and S9300_C belong to one MPLS domain; an
LDP LSP is established between S9300_A and S9300_C. Dynamic BFD is required to detect
the connectivity of the LDP LSP.
Figure 5-175 Networking diagram for configuring dynamic BFD for LDP LSPs
Loopback0 Loopback0 Loopback0
1.1.1.1/32 2.2.2.2/32 3.3.3.3/32
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Create VLANs on PE and P devices and add GE interfaces to the VLANs, create VLANIF
interfaces, and assign IP addresses to the VLANIF interfaces and configure OSPF.
As shown in Figure 5-175, configure IP addresses and masks for the interfaces, including
loopback interfaces.
Configure OSPF on all the nodes and advertise host routes of the loopback interfaces. The
configuration details are not mentioned here.
After the configuration, LSRs can ping each other. Run the display ip routing-table command
on each LSR, and you can view the routing entries to the LSRs.
# Configure S9300_A.
<S9300_A> system-view
[S9300_A] mpls lsr-id 1.1.1.1
[S9300_A] mpls
[S9300_A-mpls] quit
[S9300_A] mpls ldp
[S9300_A-mpl-ldp] quit
[S9300_A] interface vlanif 10
[S9300_A-Vlanif10] mpls
[S9300_A-Vlanif10] mpls ldp
[S9300_A-Vlanif10] quit
# Configure S9300_B.
<S9300_B> system-view
[S9300_B] mpls lsr-id 2.2.2.2
[S9300_B] mpls
[S9300_B-mpls] quit
[S9300_B] mpls ldp
[S9300_B-mpl-ldp] quit
[S9300_B] interface vlanif 10
[S9300_B-Vlanif10] mpls
[S9300_B-Vlanif10] mpls ldp
[S9300_B-Vlanif10] quit
[S9300_B] interface vlanif 20
[S9300_B-Vlanif20] mpls
[S9300_B-Vlanif20] mpls ldp
# Configure S9300_C.
<S9300_C> system-view
[S9300_C] mpls lsr-id 3.3.3.3
[S9300_C] mpls
[S9300_C-mpls] quit
[S9300_C] mpls ldp
[S9300_C-mpl-ldp] quit
[S9300_C] interface vlanif 20
[S9300_C-Vlanif20] mpls
[S9300_C-Vlanif20] mpls ldp
[S9300_C-Vlanif20] quit
After the configuration, run the display mpls ldp lsp command on S9300_A, and you can view
that an LDP LSP is set up between S9300_A and S9300_C. Take the display on S9300_A as an
example.
[S9300_A] display mpls ldp lsp
Step 3 Configure dynamic BFD to detect the connectivity of the LDP LSP between S9300_A and
S9300_C.
# Configure an FEC list on S9300_A to ensure that BFD detects only the connectivity of the
LDP LSP between S9300_A and S9300_C.
[S9300_A] fec-list tortc
[S9300_A-fec-list-tortc] fec-node 3.3.3.3
# Enable BFD on S9300_A, specify the FEC list that triggers a BFD session dynamically, and
adjust BFD parameters.
[S9300_A] bfd
[S9300_A-bfd] quit
[S9300_A] mpls
[S9300_A-mpls] mpls bfd-trigger fec-list tortc
[S9300_A-mpls] mpls bfd enable
[S9300_A-mpls] mpls bfd min-tx-interval 100 min-rx-interval 600 detect-multiplier 4
# Check the status of the BFD session created dynamically on S9300_C. The BFD Bind Type
field is displayed as Peer IP Address, which indicates that BFD packets sent by S9300_C are
transmitted through the IP route.
[S9300_C] display bfd session passive-dynamic verbose
-----------------------------------------------------------
Session MIndex : 257 (Multi Hop) State : Up Name : bfd2
-----------------------------------------------------------
Local Discriminator : 8193 Remote Discriminator : 8192
Session Detect Mode : Asynchronous Mode Without Echo Function
BFD Bind Type : Peer Ip Address
Bind Session Type : Entire_Dynamic
Bind Peer Ip Address : 1.1.1.1
Bind Interface : --
FSM Board Id : 1 TOS-EXP : 6
Min Tx Interval (ms) : 100 Min Rx Interval (ms) : 100
Actual Tx Interval (ms): 600 Actual Rx Interval (ms): 100
Local Detect Multi : 3 Detect Interval (ms) : 400
Echo Passive : Disabl Acl Number : --
Proc interface status : Disable Process PST : Disable
WTR Interval (ms) : -- Local Demand Mode : Disable
Active Multi : 4
Last Local Diagnostic : No Diagnostic
Bind Application
Session TX TmrID : 75 Session Detect TmrID : 76
Session Init TmrID : -- Session WTR TmrID : --
Session Echo Tx TmrID : --
PDT Index : FSM-0 | RCV-0 | IF-0 | TOKEN-0
Session Description : --
-----------------------------------------------------------
----End
Configuration Files
l Configuration file of S9300_A
#
sysname S9300_A
#
vlan batch 10
#
bfd
#
mpls lsr-id 1.1.1.1
mpls
#
sysname S9300_C
#
bfd
mpls-passive
#
vlan batch 20
#
mpls lsr-id 3.3.3.3
mpls
#
mpls ldp
#
interface Vlanif 20
ip address 10.2.1.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 20
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
#
ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 10.2.1.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-176, two LSPs are required from S9300-A to S9300-C. One is a primary
LSP, namely, S9300-A → S9300-C and another is a backup LSP, namely, S9300-A → S9300-
B → S9300-C. LDP FRR is required to be configured on S9300-A so that port protection can
be implemented on S9300-A and traffic loss is reduced.
NOTE
On a network where LDP FRR is enabled, the backup LSP must be in liberal state. That is, run the display
ip routing-table ip-address verbose command on an LSR that is enabled with FRR, and you can view that
the status of the route of the backup LSP is "Inactive Adv".
GE1/0/0
S9300-B
Loopback1 GE2/0/0
1.1.1.9/32
GE1/0/0
S9300-A
GE2/0/0
GE2/0/0
GE1/0/0 S9300-C
Primary LSP
Loopback1
3.3.3.9/32 Bypass
LSP
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l IP address of each interface on each node shown in Figure 5-176, OSPF process ID, and
OSPF area ID
l Policy for triggering the establishment of LSPs
l Next hop address used by LDP FRR for generating the backup LSP
l Value of the LDP FRR protection timer
Procedure
Step 1 Create VLANs on the S9300 and add GE interfaces to the VLANs, create VLANIF interfaces,
and assign IP addresses to the VLANIF interfaces.
As shown in Figure 5-176, configure IP addresses and masks for the interfaces, including
loopback interfaces.
Step 2 Configure OSPF to advertise the network segments that the interfaces are connected to and the
host route of the LSR ID.
<S9300-A> system-view
[S9300-A] ospf 1
[S9300-A-ospf-1] area 0
[S9300-A-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0
[S9300-A-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.3
[S9300-A-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.3
[S9300-A-ospf-1-area-0.0.0.0] quit
[S9300-A-ospf-1] quit
# Configure S9300-B.
<S9300-B> system-view
[S9300-B] ospf 1
[S9300-B-ospf-1] area 0
[S9300-B-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0
[S9300-B-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.3
[S9300-B-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.3
[S9300-B-ospf-1-area-0.0.0.0] quit
[S9300-B-ospf-1] quit
# Configure S9300-C.
<S9300-C> system-view
[S9300-C] ospf 1
[S9300-C-ospf-1] area 0
[S9300-C-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0
[S9300-C-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.3
[S9300-C-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.3
[S9300-C-ospf-1-area-0.0.0.0] quit
[S9300-C-ospf-1] quit
After the configuration, run the display ip routing-table command on each node, and you can
view that the nodes learn the routes from each other. Take the display on S9300-A as an example.
<S9300-A> display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 12 Routes : 13
Destination/Mask Proto Pre Cost Flags NextHop Interface
Step 3 Enable MPLS and MPLS LDP on each node globally and on the interfaces to forward the MPLS
traffic on the network.
# Configure S9300-A.
[S9300-A] mpls lsr-id 1.1.1.9
[S9300-A] mpls
[S9300-A] label advertise non-null
[S9300-A-mpls] quit
[S9300-A] mpls ldp
[S9300-A-mpls-ldp] quit
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] mpls
[S9300-A-Vlanif10] mpls ldp
[S9300-A-Vlanif10] quit
[S9300-A] interface vlanif 30
[S9300-A-Vlanif30] mpls
[S9300-A-Vlanif30] mpls ldp
[S9300-A-Vlanif30] quit
# Configure S9300-B.
[S9300-B] mpls lsr-id 2.2.2.9
[S9300-B] mpls
[S9300-B] label advertise non-null
[S9300-B-mpls] quit
[S9300-B] mpls ldp
[S9300-B-mpls-ldp] quit
[S9300-B] interface vlanif 10
[S9300-B-Vlanif10] mpls
[S9300-B-Vlanif10] mpls ldp
[S9300-B-Vlanif10] quit
[S9300-B] interface vlanif20
[S9300-B-Vlanif20] mpls
[S9300-B-Vlanif20] mpls ldp
[S9300-B-Vlanif20] quit
# Configure S9300-C.
[S9300-C] mpls lsr-id 3.3.3.9
[S9300-C] mpls
[S9300-C] label advertise non-null
[S9300-C-mpls] quit
[S9300-C] mpls ldp
[S9300-C-mpls-ldp] quit
[S9300-C] interface vlanif 20
[S9300-C-Vlanif20] mpls
[S9300-C-Vlanif20] mpls ldp
[S9300-C-Vlanif20] quit
[S9300-C] interface vlanif 30
[S9300-C-Vlanif30] mpls
[S9300-C-Vlanif30] mpls ldp
[S9300-C-Vlanif30] quit
After the configuration, LDP sessions are established between neighboring nodes. Run the
display mpls ldp session command on each node, and you can view that Status is displayed as
Operational. Take the display on S9300-A as an example.
<S9300-A> display mpls ldp session
LDP Session(s) in Public Network
------------------------------------------------------------------------------
Peer-ID Status LAM SsnRole SsnAge KA-Sent/Rcv
------------------------------------------------------------------------------
2.2.2.9:0 Operational DU Passive 000:00:01 8/8
3.3.3.9:0 Operational DU Passive 000:00:01 6/6
------------------------------------------------------------------------------
TOTAL: 2 session(s) Found.
LAM : Label Advertisement Mode SsnAge Unit : DDD:HH:MM
Step 4 Enable LDP FRR on VLANIF 30 of S9300-A, and specify the next hop address used to create
the backup LSP.
# Configure S9300-A.
[S9300-A] interface vlanif 30
[S9300-A-Vlanif30] mpls ldp frr nexthop 10.1.1.2
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10 30
#
mpls lsr-id 1.1.1.9
mpls
label advertise non-null
#
mpls ldp
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface Vlanif30
ip address 10.3.1.1 255.255.255.0
mpls
mpls ldp
mpls ldp frr timer protect-time 11
mpls ldp frr nexthop 10.1.1.2
#
interface GigabitEthernet1/0/0
port default vlan 10
#
interface GigabitEthernet2/0/0
port default vlan 30
#
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 1.1.1.9 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.3.1.0 0.0.0.255
#
return
l Configuration file of S9300-B
#
sysname S9300-B
#
vlan batch 10 20
#
mpls lsr-id 2.2.2.9
mpls
label advertise non-null
#
mpls ldp
#
interface Vlanif10
ip address 10.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif20
ip address 10.2.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 20
#
interface LoopBack1
ip address 2.2.2.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.9 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.2.1.0 0.0.0.255
#
return
l Configuration file of S9300-C
#
sysname S9300-C
#
bfd
mpls-passive
#
vlan batch 20 30
#
mpls lsr-id 3.3.3.9
mpls
label advertise non-null
#
mpls ldp
#
interface Vlanif20
ip address 10.2.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif30
ip address 10.3.1.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 30
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 20
#
interface LoopBack1
ip address 3.3.3.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 3.3.3.9 0.0.0.0
network 10.2.1.0 0.0.0.255
network 10.3.1.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-177, two links are established between PE1 and PE2. The link PE1 →
P1 → P2 → PE2 is an active link and the link PE1 → P1 → P3 → PE2 is a standby link.
Configure synchronization of LDP and an IGP on the interfaces of both ends of the link between
crossing node P1 of the active link and the standby link and LDP neighboring node P2 on the
active link. After the faulty active link is recovered, the synchronization function can be used to
shorten the interval for switching the traffic from the standby link to the active link and reduce
the interruption at the millisecond level.
P and PE devices are the S9300s.
Figure 5-177 Networking diagram for configuring synchronization of LDP and an IGP
Loopback1
2.2.2.9/32
/0 GE
1/0 2/0
/
Loopback1 GE 0 Loopback1
1.1.1.9/32 P2 4.4.4.9/32
/0 GE
1/0 1/0
GE / 0
PE1 PE2
P1 G /0
E 2/0 2/0
/ 0 GE
GE
1/0 P3 /0
/ 0 2/0
GE
Primary link
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l IP address of each interface on each node shown in Figure 5-177, OSPF process ID, and
OSPF area ID
l Values of the hold-down timer, hold-max-cost timer, and delay timer
Procedure
Step 1 Create VLANs on the S9300 and add GE interfaces to the VLANs, create VLANIF interfaces,
and assign IP addresses to the VLANIF interfaces.
As shown in Figure 5-177, configure IP addresses and masks for the interfaces, including
loopback interfaces. Configure OSPF to advertise the network segments that the interfaces are
connected to and the host route of the LSR ID. The configuration details are not mentioned here.
The link PE1 → P1 → P2 → PE2 is an active link and the link PE1 → P1 → P3 → PE2 is a
standby link. The cost of VLANIF 30 on P1 is 1000.
After the configuration, run the display ip routing-table command on each node, and you can
view that the nodes learn routes from each other. The outgoing interface of the route from P1 to
P2 is VLANIF 10.. Take the display on P1 as an example.
<P1> display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 14 Routes : 14
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.9/32 Direct 0 0 D 127.0.0.1 InLoopBack1
2.2.2.9/32 OSPF 10 2 D 10.1.1.2 Vlanif10
3.3.3.9/32 OSPF 10 4 D 10.1.1.2 Vlanif10
4.4.4.9/32 OSPF 10 3 D 10.1.1.2 Vlanif10
10.1.1.0/24 Direct 0 0 D 10.1.1.1 Vlanif10
10.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack1
10.1.1.2/32 Direct 0 0 D 10.1.1.2 Vlanif10
10.2.1.0/24 OSPF 10 2 D 10.1.1.2 Vlanif10
10.3.1.0/24 Direct 0 0 D 10.3.1.1 Vlanif30
10.3.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack1
10.3.1.2/32 Direct 0 0 D 10.3.1.2 Vlanif30
10.4.1.0/24 OSPF 10 3 D 10.1.1.2 Vlanif10
127.0.0.0/32 Direct 0 0 D 127.0.0.1 InLoopBack1
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack1
Step 2 Enable MPLS and MPLS LDP globally and on all the interfaces of the nodes.
# Configure P1.
<P1> system-view
[P1] mpls lsr-id 1.1.1.9
[P1] mpls
[P1-mpls] quit
[P1] mpls ldp
[P1-mpls-ldp] quit
[P1] interface vlanif 10
[P1-Vlanif10] mpls
[P1-Vlanif10] mpls ldp
[P1-Vlanif10] quit
[P1] interface vlanif 30
[P1-Vlanif30] mpls
[P1-Vlanif30] mpls ldp
[P1-Vlanif30] quit
# Configure P2.
<P2> system-view
[P2] mpls lsr-id 2.2.2.9
[P2] mpls
[P2-mpls] quit
[P2] mpls ldp
[P2-mpls-ldp] quit
[P2] interface vlanif 10
[P2-Vlanif10] mpls
[P2-Vlanif10] mpls ldp
[P2-Vlanif10] quit
[P2] interface vlanif 20
[P2-Vlanif20] mpls
[P2-Vlanif20] mpls ldp
[P2-Vlanif20] quit
# Configure P3.
<P3> system-view
[P3] mpls lsr-id 3.3.3.9
[P3] mpls
[P3-mpls] quit
[P3] mpls ldp
[P3-mpls-ldp] quit
[P3] interface vlanif 30
[P3-Vlanif30] mpls
[P3-Vlanif30] mpls ldp
[P3-Vlanif30] quit
[P3] interface vlanif 40
[P3-Vlanif40] mpls
[P3-Vlanif40] mpls ldp
[P3-Vlanif40] quit
# Configure PE2.
<PE2> system-view
[PE2] mpls lsr-id 4.4.4.9
[PE2] mpls
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlanif 20
[PE2-Vlanif20] mpls
[PE2-Vlanif20] mpls ldp
[PE2-Vlanif20] quit
[PE2] interface vlanif 40
[PE2-Vlanif40] mpls
[PE2-Vlanif40] mpls ldp
[PE2-Vlanif40] quit
After the configuration, LDP sessions are established between neighboring nodes. Run the
display mpls ldp session command on each node, and you can view that Status is displayed as
Operational. Take the display on P1 as an example.
<P1> display mpls ldp session
LDP Session(s) in Public Network
------------------------------------------------------------------------------
Peer-ID Status LAM SsnRole SsnAge KA-Sent/Rcv
------------------------------------------------------------------------------
2.2.2.9:0 Operational DU Passive 000:00:56 227/227
3.3.3.9:0 Operational DU Passive 000:00:56 227/227
------------------------------------------------------------------------------
TOTAL: 2 session(s) Found.
LAM : Label Advertisement Mode SsnAge Unit : DDD:HH:MM
Step 3 Configure synchronization of LDP and an IGP on the interfaces of both ends of the link between
crossing node P1 of the active link and the standby link and LDP neighboring node P2 on the
active link.
# Configure P1.
<P1> system-view
[P1] interface vlanif 10
[P1-Vlanif10] ospf ldp-sync
[P1-Vlanif10] quit
# Configure P2.
<P2> system-view
[P2] interface vlanif 10
[P2-Vlanif20] ospf ldp-sync
[P2-Vlanif20] quit
Step 4 Set the value of the hold-down timer on the interfaces of both ends of the link between crossing
node P1 of the active link and the standby link and LDP neighboring node P2 on the active link.
# Configure P1.
<P1> system-view
[P1] interface vlanif 10
[P1-Vlanif10] ospf timer ldp-sync hold-down 8
[P1-Vlanif10] quit
# Configure P2.
<P2> system-view
[P2] interface vlanif 10
[P2-Vlanif10] ospf timer ldp-sync hold-down 8
[P2-Vlanif10] quit
Step 5 Set the value of the hold-max-cost timer on the interfaces of both ends of the link between
crossing node P1 of the active link and the standby link and LDP neighboring node P2 on the
active link.
# Configure P1.
<P1> system-view
[P1] interface vlanif 10
[P1-Vlanif10] ospf timer ldp-sync hold-max-cost 9
[P1-Vlanif10] quit
# Configure P2.
<P2> system-view
[P2] interface vlanif 10
[P2-Vlanif10] ospf timer ldp-sync hold-max-cost 9
[P2-Vlanif10] quit
Step 6 Set the value of the delay timer on the interfaces of both ends of the link between crossing node
P1 of the active link and the standby link and LDP neighboring node P2 on the active link.
# Configure P1.
<P1> system-view
[P1] interface vlanif 10
[P1-Vlanif10] mpls ldp timer igp-sync-delay 6
[P1-Vlanif10] quit
# Configure P2.
<P2> system-view
[P2] interface vlanif 10
[P2-Vlanif10] mpls ldp timer igp-sync-delay 6
[P2-Vlanif10] quit
----End
Configuration Files
l Configuration file of P1
#
sysname P1
#
vlan batch 10 30
#
mpls lsr-id 1.1.1.9
mpls
#
mpls ldp
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
ospf ldp-sync
ospf timer ldp-sync holddown 8
ospf timer ldp-sync holdmaxcost 9
mpls
mpls ldp
mpls ldp timer igp-sync-delay 6
#
interface Vlanif30
ip address 10.3.1.1 255.255.255.0
ospf cost 1000
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port default vlan 10
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 30
#
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 1.1.1.9 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.3.1.0 0.0.0.255
#
return
l Configuration file of P2
#
sysname P2
#
vlan batch 10 20
#
mpls lsr-id 2.2.2.9
mpls
#
mpls ldp
#
interface Vlanif10
ip address 10.1.1.2 255.255.255.0
ospf ldp-sync
ospf timer ldp-sync holddown 8
vlan batch 20 30
#
mpls lsr-id 4.4.4.9
#
mpls
#
mpls ldp
#
interface Vlanif20
ip address 10.2.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif40
ip address 10.4.1.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 20
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 40
#
interface LoopBack1
ip address 4.4.4.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 4.4.4.9 0.0.0.0
network 10.2.1.0 0.0.0.255
network 10.4.1.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-178, S9300-A, S9300-B, and S9300-C are S9300s with dual main control
boards. The three S9300s belong to the same OSPF area and are interconnected through OSPF.
All of them support the GR mechanism.
LDP sessions are established between S9300-A, S9300-B, and S9300-C. When the main control
board of S9300-B fails and traffic is switched, the LDP GR mechanism is used for
synchronization with neighboring nodes.
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs and VLANIF interfaces.
2. Configure IP address of each interface on each node and the address of the loopback
interface used as the LSR ID, and configure OSPF to advertise the network segments that
the interfaces are connected to and the host route of the LSR ID.
3. Configure OSPF GR on each node.
4. Enable MPLS and MPLS LDP on each node globally.
5. Enable MPLS and MPLS LDP on each interface.
6. Set parameters during LDP session negotiation on S9300-B.
7. Enable GR of MPLS LDP on each node.
8. Configure the GR session of MPLS LDP and neighboring parameters on S9300-B.
Data Preparation
To complete the configuration, you need the following data:
l IP address of each interface on each node shown in Figure 5-178, OSPF process ID, and
OSPF area ID
l Interval for performing OSPF GR
l Value of the LDP Reconnect timer (300 seconds by default)
l Value of the LDP Neighbor-liveness timer (600 seconds by default)
l Value of the LDP Recovery timer (300 seconds by default)
Procedure
Step 1 Create VLANs and VLANIF interfaces.
See Figure 5-178.
Step 2 Assign an IP address to each interface.
See Figure 5-178.
Step 3 Configure OSPF to advertise the network segments that the interfaces are connected to and the
host route of the LSR ID.
Step 4 Configure OSPF GR.
# Configure S9300-A.
<S9300-A> system-view
[S9300-A] ospf 1
[S9300-A-ospf-1] opaque-capability enable
[S9300-A-ospf-1] graceful-restart
[S9300-A-ospf-1] quit
# Configure S9300-B.
<S9300-B> system-view
[S9300-B] ospf 1
[S9300-B-ospf-1] opaque-capability enable
[S9300-B-ospf-1] graceful-restart
[S9300-B-ospf-1] quit
# Configure S9300-C.
<S9300-C> system-view
[S9300-C] ospf 1
[S9300-C-ospf-1] opaque-capability enable
[S9300-C-ospf-1] graceful-restart
[S9300-C-ospf-1] quit
# Configure S9300-B.
[S9300-B] mpls lsr-id 2.2.2.9
[S9300-B] mpls
[S9300-B-mpls] quit
[S9300-B] mpls ldp
[S9300-B-mpls-ldp] quit
# Configure S9300-C.
[S9300-C] mpls lsr-id 3.3.3.9
[S9300-C] mpls
[S9300-C-mpls] quit
[S9300-C] mpls ldp
[S9300-C-mpls-ldp] quit
# Configure S9300-B.
[S9300-B] interface vlanif 10
[S9300-B-Vlanif10] mpls
[S9300-B-Vlanif10] mpls ldp
[S9300-B-Vlanif10] quit
[S9300-B] interface vlanif 20
[S9300-B-Vlanif20] mpls
[S9300-B-Vlanif20] mpls ldp
[S9300-B-Vlanif20] quit
# Configure S9300-C.
[S9300-C] interface vlanif 20
[S9300-C-Vlanif20] mpls
[S9300-C-Vlanif20] mpls ldp
[S9300-C-Vlanif20] quit
After the configuration, the local LDP sessions between S9300-A and S9300-B, and between
S9300-B and S9300-C are established.
Run the display mpls ldp session command on each node, and you can view the establishment
of the LDP session. Take the display on S9300-A as an example.
[S9300-A] display mpls ldp session
LDP Session(s) in Public Network
--------------------------------------------------------------------------
Peer-ID Status LAM SsnRole SsnAge KA-Sent/Rcv
--------------------------------------------------------------------------
2.2.2.9:0 Operational DU Passive 000:00:02 9/9
--------------------------------------------------------------------------
TOTAL: 1 Session(s) Found.
LAM : Label Advertisement Mode SsnAge Unit : DDD:HH:MM
# Configure S9300-A.
[S9300-A] mpls ldp
[S9300-A-mpls-ldp] graceful-restart
Warning: All the related sessions will be deleted if the operation is performed
!Continue? (y/n)y
[S9300-A-mpls-ldp] quit
# Configure S9300-B.
[S9300-B] mpls ldp
[S9300-B-mpls-ldp] graceful-restart
Warning: All the related sessions will be deleted if the operation is performed
!Continue? (y/n)y
[S9300-B-mpls-ldp] quit
# Configure S9300-C.
[S9300-C] mpls ldp
[S9300-C-mpls-ldp] graceful-restart
Warning: All the related sessions will be deleted if the operation is performed
!Continue? (y/n)y
[S9300-C-mpls-ldp] quit
# Configure S9300-B.
[S9300-B] mpls ldp
[S9300-B-mpls-ldp] graceful-restart timer reconnect 300
Warning: All the related sessions will be deleted if the operation is performed
!Continue? (y/n)y
[S9300-B-mpls-ldp] graceful-restart timer neighbor-liveness 600
Warning: All the related sessions will be deleted if the operation is performed
!Continue? (y/n)y
[S9300-B-mpls-ldp] graceful-restart timer recovery 300
Warning: All the related sessions will be deleted if the operation is performed
!Continue? (y/n)y
[S9300-B-mpls-ldp] quit
# After the configuration, run the display mpls ldp session verbose command on the LSR, and
you can view that the Session FT Flag field is displayed as on. Take the display on S9300-A as
an example.
[S9300-A]display mpls ldp session verbose
------------------------------------------------------------------------------
Or, run the display mpls ldp peer verbose command on the LSR, and you can view that the
Peer FT Flag field is displayed as on. Take the display on S9300-A as an example.
[S9300-A]display mpls ldp peer verbose
------------------------------------------------------------------------------
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10
#
mpls lsr-id 1.1.1.9
mpls
#
mpls ldp
graceful-restart
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
#
ospf 1
opaque-capability enable
graceful-restart
area 0.0.0.0
network 1.1.1.9 0.0.0.0
network 10.1.1.0 0.0.0.255
#
return
l Configuration file of S9300-B
#
sysname S9300-B
#
vlan batch 10 20
#
mpls lsr-id 2.2.2.9
mpls
#
mpls ldp
graceful-restart
graceful-restart timer reconnect 300
graceful-restart timer neighbor-liveness 600
graceful-restart timer recovery 300
#
interface Vlanif10
ip address 10.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif20
ip address 10.2.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 20
#
interface LoopBack1
ip address 2.2.2.9 255.255.255.255
#
ospf 1
opaque-capability enable
graceful-restart
area 0.0.0.0
network 2.2.2.9 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.2.1.0 0.0.0.255
#
return
l Configuration file of S9300-C
#
sysname S9300-C
#
vlan batch 20
#
mpls lsr-id 3.3.3.9
mpls
#
mpls ldp
graceful-restart
#
interface Vlanif20
ip address 10.2.1.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 20
#
interface LoopBack1
ip address 3.3.3.9 255.255.255.255
#
ospf 1
opaque-capability enable
graceful-restart
area 0.0.0.0
network 3.3.3.9 0.0.0.0
network 10.2.1.0 0.0.0.255
#
Return
Networking Requirements
As shown in Figure 5-179, a static TE tunnel from S9300-A to S9300-C and a static TE tunnel
from S9300-C to S9300-A need to be set up. The bandwidth of the two tunnels is 10 Mbit/s.
Configuration Roadmap
The configuration roadmap is as follows:
l The value of the outgoing label of each node is the value of the incoming label of its next node.
l When running the static-cr-lsp ingress {tunnel-interface tunnel tunnel-number | tunnel-name }
destination destination-address { nexthop next-hop-address | outgoing-interface interface-type
interface-number } out-label out-label-value [ bandwidth [ bc0 | bc1 ] bandwidth ] command to
configure the ingress node of a CR-LSP, note that tunnel-name must be the same as the tunnel name
created by using the interface tunnel tunnel-number command. tunnel-name is a string of case-
sensitive characters without spaces. For example, the name of the tunnel created by using the interface
tunnel 2/0/0 command is Tunnel 2/0/0. In this case, the parameter of the ingress node of the static CR-
LSP is Tunnel 2/0/0; otherwise, the tunnel cannot be created. There is no such limit on the transit node
and egress node.
Data Preparation
To complete the configuration, you need the following data:
l OSPF process ID and area ID of each node
l Numbers of tunnel interfaces, IP addresses of tunnel interfaces, destination IP addresses,
tunnel IDs, and signaling protocols (CR-static) on S9300-A and S9300-C
l Maximum bandwidth and maximum reservable bandwidth of each link
l Next hop address and outgoing label of the ingress node of the static CR-LSP
l Incoming interface, next hop address, and outgoing label of the transit node of the static
CR-LSP
l Incoming interface of the egress node of the static CR-LSP
Procedure
Step 1 Create VLANs and VLANIF interfaces, and assign IP addresses to the VLANIF interfaces.
Configure S9300-A.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] interface loopback1
[S9300-A-LoopBack1] ip address 1.1.1.1 32
[S9300-A-LoopBack1] quit
[S9300-A] interface gigabitethernet 1/0/0
[S9300-A-GigabitEthernet1/0/0] port link-type access
[S9300-A-GigabitEthernet1/0/0] quit
[S9300-A] vlan 10
Configure S9300-B.
<Quidway> system-view
[Quidway] sysname S9300-B
[S9300-B] interface loopback1
[S9300-B-LoopBack1] ip address 2.2.2.2 32
[S9300-B-LoopBack1] quit
[S9300-B] interface gigabitethernet 1/0/0
[S9300-B-GigabitEthernet1/0/0] port link-type access
[S9300-B-GigabitEthernet1/0/0] quit
[S9300-B] interface gigabitethernet 2/0/0
[S9300-B-GigabitEthernet2/0/0] port link-type access
[S9300-B-GigabitEthernet2/0/0] quit
[S9300-B] vlan 10
[S9300-B-vlan10] port gigabitethernet1/0/0
[S9300-B-vlan10] quit
[S9300-B] interface vlanif 10
[S9300-B-Vlanif10] ip address 2.1.1.2 24
[S9300-B-Vlanif10] quit
[S9300-B] vlan 20
[S9300-B-vlan20] port gigabitethernet2/0/0
[S9300-B-vlan20] quit
[S9300-B] interface vlanif 20
[S9300-B-Vlanif20] ip address 3.2.1.1 24
Configure S9300-C.
<Quidway> system-view
[Quidway] sysname S9300-C
[S9300-C] interface loopback1
[S9300-C-LoopBack1] ip address 3.3.3.3 32
[S9300-C-LoopBack1] quit
[S9300-C] interface gigabitethernet 2/0/0
[S9300-C-GigabitEthernet1/0/0] port link-type access
[S9300-C-GigabitEthernet1/0/0] quit
[S9300-C] vlan 20
[S9300-C-vlan20] port gigabitethernet1/0/0
[S9300-C-vlan20] quit
[S9300-C] interface vlanif 20
[S9300-C-Vlanif20] ip address 3.2.1.2 24
[S9300-C-Vlanif20] quit
Step 2 Configure the IP address and mask of each interface and configure the routing protocol to connect
the LSRs at the network layer.
# Configure S9300-A.
[S9300-A] mpls lsr-id 1.1.1.1
[S9300-A] mpls
[S9300-A-mpls] mpls te
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] mpls
[S9300-A-Vlanif10] mpls te
[S9300-A-Vlanif10] quit
[S9300-A-mpls] quit
The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A, and
are not mentioned here.
# Configure S9300-B.
[S9300-B] interface vlanif 10
[S9300-B-Vlanif10] mpls te max-link-bandwidth 100000
[S9300-B-Vlanif10] mpls te max-reservable-bandwidth 100000
[S9300-B-Vlanif10] quit
[S9300-B] interface vlanif 20
[S9300-B-Vlanif20] mpls te max-link-bandwidth 100000
[S9300-B-Vlanif20] mpls te max-reservable-bandwidth 100000
[S9300-B-Vlanif20] quit
# Configure S9300-C.
[S9300-C] interface vlanif 20
[S9300-C-Vlanif20] mpls te max-link-bandwidth 100000
[S9300-C-Vlanif20] mpls te max-reservable-bandwidth 100000
[S9300-C-Vlanif20] quit
Run the display mpls lsp or display mpls static-cr-lsp command on each node, and you can
view the establishment of static CR-LSPs.
# Check the configuration on S9300-A.
[S9300-A] display mpls lsp
----------------------------------------------------------------------
LSP Information: STATIC CRLSP
----------------------------------------------------------------------
FEC In/Out Label In/Out IF Vrf Name
3.3.3.3/32 NULL/20 -/Vlanif10
-/- 130/NULL Vlanif10/-
----------------------------------------------------------------------
FEC In/Out Label In/Out IF Vrf Name
-/- 20/30 Vlanif10/Vlanif20
-/- 120/130 Vlanif20/Vlanif10
When the static CR-LSP is used to establish the MPLS TE tunnel, the packets on the transit node
and the egress node are forwarded according to the specified incoming label and outgoing label.
Therefore, information such as FEC is null is shown in the display of S9300-B and S9300-C.
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10
#
mpls lsr-id 1.1.1.1
mpls
mpls te
#
interface Vlanif10
ip address 2.1.1.1 255.255.255.0
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
interface Tunnel1/0/0
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 3.3.3.3
mpls
mpls te
#
interface Vlanif20
ip address 3.2.1.2 255.255.255.0
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 20
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
#
interface Tunnel2/0/0
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 1.1.1.1
mpls te signal-protocol cr-static
mpls te tunnel-id 200
mpls te commit
#
ospf 1
area 0.0.0.0
network 3.2.1.0 0.0.0.255
network 3.3.3.3 0.0.0.0
#
static-cr-lsp ingress tunnel-interface Tunnel2/0/0 destination 1.1.1.1 nexthop
3.2.1.1 out-label 120 bandwidth bc0 10000
static-cr-lsp egress tunnel1/0/0 incoming-interface vlanif 20 in-label 30
#
return
Networking Requirements
As shown in Figure 5-180, IS-IS is run on S9300-A, S9300-B, S9300-C, and S9300-D. They
are all Level 2 devices.
RSVP-TE is used to establish a TE tunnel from S9300-A to S9300-D.
S9300-A S9300-D
GE1/0/0
GE1/0/0
Vlanif30
Vlanif10
30.1.1.2/24
10.1.1.1/24
GE1/0/0 GE1/0/0
Vlanif10
Vlanif30
10.1.1.2/24 GE2/0/0 GE2/0/0
30.1.1.1/24
Vlanif20 Vlanif20
Loopback1 20.1.1.1/24 20.1.1.2/24 Loopback1
2.2.2.9/32 3.3.3.9/32
S9300-B S9300-C
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs and VLANIF interfaces.
2. Configure the IP address of each interface and configure the loopback address as the LSR
ID.
3. Enable global ISIS, set the NET, change the cost type to enable ISIS TE, and enable ISIS
on each interface, including the loopback interface.
4. Set the LSR ID and enable MPLS, MPLS TE, MPLS RSVP-TE, and MPLS CSPF globally.
5. Enable MPLS, MPLS TE, and MPLS RSVP-TE on each interface.
6. Create a tunnel interface and specify the IP address, tunneling protocol, destination IP
address, tunnel ID, dynamic signaling protocol RSVP-TE and bandwidth for the tunnel on
the ingress node.
Data Preparation
To complete the configuration, you need the following data:
l IS-IS area ID, originating system ID, and IS-IS level of each node
l Maximum bandwidth and maximum reservable bandwidth of the link along the tunnel
l Number of the tunnel interface, IP address, destination IP address, tunnel ID, signaling
protocol (RSVP-TE), and tunnel bandwidth
Procedure
Step 1 Create VLANs and VLANIF interfaces, and assign IP addresses to the VLANIF interfaces.
Configure S9300-A.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] interface loopback1
[S9300-A-LoopBack1] ip address 1.1.1.9 32
[S9300-A-LoopBack1] quit
[S9300-A] interface gigabitethernet1/0/0
[S9300-A-GigabitEthernet1/0/0] port link-type access
[S9300-A-GigabitEthernet1/0/0] quit
[S9300-A] vlan 10
[S9300-A-vlan10] port gigabitethernet1/0/0
[S9300-A-vlan10] quit
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] ip address 10.1.1.1 24
[S9300-A-Vlanif10] quit
Configure S9300-B.
<Quidway> system-view
[Quidway] sysname S9300-B
[S9300-B] interface loopback1
[S9300-B-LoopBack1] ip address 2.2.2.9 32
[S9300-B-LoopBack1] quit
[S9300-B] interface gigabitethernet1/0/0
[S9300-B-GigabitEthernet1/0/0] port link-type access
[S9300-B-GigabitEthernet1/0/0] quit
[S9300-B] vlan 10
Configure S9300-C.
<Quidway> system-view
[Quidway] sysname S9300-C
[S9300-C] interface loopback1
[S9300-C-LoopBack1] ip address 3.3.3.9 32
[S9300-C-LoopBack1] quit
[S9300-C] vlan 20
[S9300-C] interface gigabitethernet2/0/0
[S9300-C-GigabitEthernet2/0/0] port link-type access
[S9300-C-GigabitEthernet2/0/0] quit
[S9300-C-vlan20] port gigabitethernet2/0/0
[S9300-C-vlan20] quit
[S9300-C] interface gigabitethernet1/0/0
[S9300-C-GigabitEthernet1/0/0] port link-type access
[S9300-C-GigabitEthernet1/0/0] quit
[S9300-C] vlan 30
[S9300-C-vlan30] port gigabitethernet1/0/0
[S9300-C-vlan30] quit
[S9300-C] interface vlanif 20
[S9300-C-Vlanif20] ip address 20.1.1.2 24
[S9300-C-Vlanif20] quit
[S9300-C] interface vlanif 30
[S9300-C-Vlanif30] ip address 30.1.1.1 24
[S9300-C-Vlanif30] quit
Configure S9300-D.
<Quidway> system-view
[Quidway] sysname S9300-D
[S9300-D] interface loopback1
[S9300-D-LoopBack1] ip address 4.4.4.9 32
[S9300-D-LoopBack1] quit
[S9300-D] vlan 30
[S9300-D] interface gigabitethernet1/0/0
[S9300-D-GigabitEthernet1/0/0] port link-type access
[S9300-D-GigabitEthernet1/0/0] quit
[S9300-D-vlan30] port gigabitethernet1/0/0
[S9300-D-vlan30] quit
[S9300-D] interface vlanif 30
[S9300-D-Vlanif30] ip address 30.1.1.2 24
[S9300-D-Vlanif30] quit
# Configure S9300-B.
[S9300-B] isis 1
[S9300-B-isis-1] network-entity 00.0005.0000.0000.0002.00
[S9300-B-isis-1] is-level level-2
[S9300-B-isis-1] quit
[S9300-B] interface vlanif 10
[S9300-B-Vlanif10] isis enable 1
[S9300-B-Vlanif10] quit
[S9300-B] interface vlanif 20
[S9300-B-Vlanif20] isis enable 1
[S9300-B-Vlanif20] quit
[S9300-B] interface loopback 1
[S9300-B-LoopBack1] isis enable 1
[S9300-B-LoopBack1] quit
# Configure S9300-C.
[S9300-C] isis 1
[S9300-C-isis-1] network-entity 00.0005.0000.0000.0003.00
[S9300-C-isis-1] is-level level-2
[S9300-C-isis-1] quit
[S9300-C] interface vlanif 20
[S9300-C-Vlanif20] isis enable 1
[S9300-C-Vlanif20] quit
[S9300-C] interface vlanif 30
[S9300-C-Vlanif30] isis enable 1
[S9300-C-Vlanif30] quit
[S9300-C] interface loopback 1
[S9300-C-LoopBack1] isis enable 1
[S9300-C-LoopBack1] quit
# Configure S9300-D.
[S9300-D] isis 1
[S9300-D-isis-1] network-entity 00.0005.0000.0000.0004.00
[S9300-D-isis-1] is-level level-2
[S9300-D-isis-1] quit
[S9300-D] interface vlanif 30
[S9300-D-Vlanif30] isis enable 1
[S9300-D-Vlanif30] quit
[S9300-D] interface loopback 1
[S9300-D-LoopBack1] isis enable 1
[S9300-D-LoopBack1] quit
After the configuration, run the display ip routing-table command on each node, and you can
view that the nodes learn the routes from each other. Take the display on S9300-A as an example.
[S9300-A] display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.9/32 Direct 0 0 D 127.0.0.1 InLoopBack1
2.2.2.9/32 ISIS 15 10 D 10.1.1.2 Vlanif10
3.3.3.9/32 ISIS 15 20 D 10.1.1.2 Vlanif10
4.4.4.9/32 ISIS 15 30 D 10.1.1.2 Vlanif10
10.1.1.0/24 Direct 0 0 D 10.1.1.1 Vlanif10
10.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack1
20.1.1.0/24 ISIS 15 20 D 10.1.1.2 Vlanif10
30.1.1.0/24 ISIS 15 30 D 10.1.1.2 Vlanif10
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack1
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack1
Step 3 Configure basic MPLS functions and enable MPLS TE, RSVP-TE, and CSPF.
# Enable MPLS, MPLS TE, and RSVP-TE globally on each node, enable MPLS, MPLS TE,
and RSVP-TE on all tunnel interfaces, and enable CSPF in the system view on the ingress node.
# Configure S9300-A.
[S9300-A] mpls lsr-id 1.1.1.9
[S9300-A] mpls
[S9300-A-mpls] mpls te
[S9300-A-mpls] mpls rsvp-te
[S9300-A-mpls] mpls te cspf
[S9300-A-mpls] quit
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] mpls
[S9300-A-Vlanif10] mpls te
[S9300-A-Vlanif10] mpls rsvp-te
[S9300-A-Vlanif10] quit
# Configure S9300-B.
[S9300-B] mpls lsr-id 2.2.2.9
[S9300-B] mpls
[S9300-B-mpls] mpls te
[S9300-B-mpls] mpls rsvp-te
[S9300-B-mpls] mpls te cspf
[S9300-B-mpls] quit
[S9300-B] interface vlanif 10
[S9300-B-Vlanif10] mpls
[S9300-B-Vlanif10] mpls te
[S9300-B-Vlanif10] mpls rsvp-te
[S9300-B-Vlanif10] quit
[S9300-B] interface vlanif 20
[S9300-B-Vlanif20] mpls
[S9300-B-Vlanif20] mpls te
[S9300-B-Vlanif20] mpls rsvp-te
[S9300-B-Vlanif20] quit
# Configure S9300-C.
[S9300-C] mpls lsr-id 3.3.3.9
[S9300-C] mpls
[S9300-C-mpls] mpls te
[S9300-C-mpls] mpls te cspf
[S9300-C-mpls] mpls rsvp-te
[S9300-C-mpls] quit
[S9300-C] interface vlanif 20
[S9300-C-Vlanif20] mpls
[S9300-C-Vlanif20] mpls te
[S9300-C-Vlanif20] mpls rsvp-te
[S9300-C-Vlanif20] quit
[S9300-C] interface vlanif 30
[S9300-C-Vlanif30] mpls
[S9300-C-Vlanif30] mpls te
[S9300-C-Vlanif30] mpls rsvp-te
[S9300-C-Vlanif30] quit
# Configure S9300-D.
[S9300-D] mpls lsr-id 4.4.4.9
[S9300-D] mpls
[S9300-D-mpls] mpls te
[S9300-D-mpls] mpls te cspf[S9300-D-mpls] mpls rsvp-te
[S9300-D-mpls] quit
[S9300-D] interface vlanif 30
[S9300-D-Vlanif30] mpls
[S9300-D-Vlanif30] mpls te
[S9300-D-Vlanif30] mpls rsvp-te
[S9300-D-Vlanif30] quit
# Configure S9300-A.
[S9300-A] isis 1
[S9300-A-isis-1] cost-style wide
[S9300-A-isis-1] traffic-eng level-2
[S9300-A-isis-1] quit
# Configure S9300-B.
[S9300-B] isis 1
[S9300-B-isis-1] cost-style wide
[S9300-B-isis-1] traffic-eng level-2
[S9300-B-isis-1] quit
# Configure S9300-C.
[S9300-C] isis 1
[S9300-C-isis-1] cost-style wide
[S9300-C-isis-1] traffic-eng level-2
[S9300-C-isis-1] quit
# Configure S9300-D.
[S9300-D] isis 1
[S9300-D-isis-1] cost-style wide
[S9300-D-isis-1] traffic-eng level-2
[S9300-D-isis-1] quit
Run the display mpls te tunnel-interface command on S9300-A, and you can view detailed
information about the tunnel.
Run the display mpls te cspf tedb all command on S9300-A, and you can view link information
in the TEDB.
[S9300-A] display mpls te cspf tedb all
Maximum Node Supported: 128 Maximum Link Supported: 256
Current Total Node Number: 4 Current Total Link Number: 6
Id Router-Id IGP Process-Id Area Link-Count
1 3.3.3.9 ISIS 1 Level-2 2
2 2.2.2.9 ISIS 1 Level-2 2
3 4.4.4.9 ISIS 1 Level-2 1
4 1.1.1.9 ISIS 1 Level-2 1
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10
#
mpls lsr-id 1.1.1.9
mpls
mpls te
mpls rsvp-te
mpls te cspf
#
isis 1
is-level level-2
cost-style wide
network-entity 00.0005.0000.0000.0001.00
traffic-eng level-2
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
isis enable 1
mpls
mpls te
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
isis enable 1
#
interface Tunnel1/0/0
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 4.4.4.9
mpls te tunnel-id 100
mpls te commit
#
return
l Configuration file of S9300-B
#
sysname S9300-B
#
vlan batch 10 20
#
mpls lsr-id 2.2.2.9
mpls
mpls te
mpls rsvp-te
mpls te cspf
#
isis 1
is-level level-2
cost-style wide
network-entity 00.0005.0000.0000.0002.00
traffic-eng level-2
#
interface Vlanif10
ip address 10.1.1.2 255.255.255.0
isis enable 1
mpls
mpls te
mpls rsvp-te
#
interface Vlanif20
ip address 20.1.1.1 255.255.255.0
isis enable 1
mpls
mpls te
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 20
#
interface LoopBack1
ip address 2.2.2.9 255.255.255.255
isis enable 1
#
return
l Configuration file of S9300-C
#
sysname S9300-C
#
vlan batch 20 30
#
mpls lsr-id 3.3.3.9
mpls
mpls te
mpls rsvp-te
mpls te cspf
#
isis 1
is-level level-2
cost-style wide
network-entity 00.0005.0000.0000.0003.00
traffic-eng level-2
#
interface Vlanif20
ip address 20.1.1.2 255.255.255.0
isis enable 1
mpls
mpls te
mpls rsvp-te
#
interface Vlanif30
ip address 30.1.1.1 255.255.255.0
isis enable 1
mpls
mpls te
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 30
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 20
#
interface LoopBack1
ip address 3.3.3.9 255.255.255.255
isis enable 1
#
return
l Configuration file of S9300-D
#
sysname S9300-D
#
vlan batch 30
#
mpls lsr-id 4.4.4.9
mpls
mpls te
mpls rsvp-te
mpls te cspf
#
isis 1
is-level level-2
cost-style wide
network-entity 00.0005.0000.0000.0004.00
traffic-eng level-2
#
interface Vlanif30
ip address 30.1.1.2 255.255.255.0
isis enable 1
mpls
mpls te
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 30
#
interface LoopBack1
ip address 4.4.4.9 255.255.255.255
isis enable 1
#
return
Networking Requirements
As shown in Figure 5-181, the VLANIF member interface between S9300-A and S9300-B is
GE 1/0/0. An MPLS TE tunnel from S9300-A to S9300-C is set up by using RSVP.
The handshake function is required to be configured so that RSVP authentication is performed
between S9300-A and S9300-B. This prevents pseudo RSVP requests for reserving resources
from causing resource exhaustion. In addition, the message window function is required to be
configured to prevent the RSVP messages that are out of sequence.
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the MPLS network and set up an RSVP-TE tunnel.
2. Configure authentication on the interface to authenticate RSVP messages.
3. Configure the handshake function on the interface.
4. Set the side of the sliding window on the interface so that the interface can save 32 sequence
numbers.
NOTE
It is recommended that you set the value of window-size to be greater than 32. If the value of window-
size is set to be very small, certain received RSVP messages may be beyond the window and are discarded,
which can close the RSVP neighbor relation.
Data Preparation
To complete the configuration, you need the following data:
l OSPF process ID and OSPF area ID of each node
l Authentication password of the local interface and authentication key
l Size of the sliding window for RSVP authentication
Procedure
Step 1 Create VLANs and VLANIF interfaces, and assign IP addresses to the VLANIF interfaces.
Configure IP addresses and masks for the interfaces according to Figure 5-181. The
configuration details are not mentioned here, see the configuration files in this example.
Step 2 Configure OSPF.
Configure OSPF to advertise the routes of network segments and the host routes of the LSR IDs.
For detailed configuration, see the configuration files in this example.
After the configuration, run the display ip routing-table command on each node, and you can
view that the nodes learn the routes from each other.
Step 3 Configure basic MPLS functions and enable MPLS TE, MPLS RSVP-TE, and CSPF.
# Configure S9300-A.
[S9300-A] mpls lsr-id 1.1.1.1
[S9300-A] mpls
[S9300-A-mpls] mpls te
[S9300-A-mpls] mpls rsvp-te
[S9300-A-mpls] mpls te cspf
[S9300-A-mpls] quit
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] mpls
[S9300-A-Vlanif10] mpls te
[S9300-A-Vlanif10] mpls rsvp-te
[S9300-A-Vlanif10] quit
NOTE
The configurations on S9300-B and S9300-C are similar to the configuration on S9300-A, and are not
mentioned here.
# Configure S9300-B.
[S9300-B] ospf 1
[S9300-B-ospf-1] opaque-capability enable
[S9300-B-ospf-1] area 0
[S9300-B-ospf-1-area-0.0.0.0] mpls-te enable
[S9300-B-ospf-1-area-0.0.0.0] quit
# Configure S9300-C.
[S9300-C] ospf 1
[S9300-C-ospf-1] opaque-capability enable
[S9300-C-ospf-1] area 0
[S9300-C-ospf-1-area-0.0.0.0] mpls-te enable
[S9300-C-ospf-1-area-0.0.0.0] quit
After the configuration, run the display interface tunnel command on S9300-A, and you can
view that the status of the tunnel interface is Up.
[S9300-A] display interface tunnel 1/0/0
Tunnel1/0/0 current state : UP
Line protocol current state : UP
Last line protocol up time: 2008-11-16, 12:26:17
Description : HUAWEI, Quidway Series, Tunnel1/0/0 Interface
The Maximum Transmit Unit is 1500 bytes
Internet Address is unnumbered, using address of LoopBack1(1.1.1.1/32)
Encapsulation is TUNNEL, loopback not set
Tunnel destination 3.3.3.3
Tunnel up/down statistics 1
Tunnel protocol/transport MPLS/MPLS, ILM disabled
300 seconds output rate 0 bits/sec, 0 packets/sec
0 packets output, 0 bits
0 output error
Step 6 On S9300-A and S9300-B, configure RSVP authentication on the interfaces that are connected
to the MPLS TE link.
# Configure S9300-A.
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] mpls rsvp-te authentication plain 123456789
[S9300-A-Vlanif10] mpls rsvp-te authentication handshake 12345678
[S9300-A-Vlanif10] mpls rsvp-te authentication window-size 32
# Configure S9300-B.
[S9300-B] interface vlanif 10
[S9300-B-Vlanif10] mpls rsvp-te authentication plain 123456789
[S9300-B-Vlanif10] mpls rsvp-te authentication handshake 12345678
[S9300-B-Vlanif10] mpls rsvp-te authentication window-size 32
Run the reset mpls rsvp-te command, and then run the display interface tunnel command on
S9300-A. You can view that the tunnel interface is Up.
Run the display mpls rsvp-te interface command on S9300-A or S9300-B, and you can view
information about RSVP authentication.
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10
#
mpls lsr-id 1.1.1.1
mpls
mpls te
mpls rsvp-te
mpls te cspf
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
mpls
mpls te
mpls rsvp-te
mpls rsvp-te authentication plain 123456789
mpls rsvp-te authentication handshake 12345678
mpls rsvp-te authentication window-size 32
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
interface Tunnel1/0/0
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 3.3.3.3
mpls te tunnel-id 1
mpls te commit
#
ospf 1
opaque-capability enable
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 1.1.1.1 0.0.0.0
mpls-te enable
#
return
Networking Requirements
Figure 5-182 Networking diagram for setting attributes on the MPLS TE tunnel
Loopback1 Loopback1 Loopback1
1.1.1.1/32 2.2.2.2/32 GE2/0/0 3.3.3.3/32
GE1/0/0 GE1/0/0 GE2/0/0
Vlanif10 Vlanif20 Vlanif20
Vlanif10
192.168.2.1/24 192.168.2.2/24
192.168.1.1/24 192.168.1.2/24
As shown in Figure 5-182, the maximum link bandwidth is 100 Mbit/s and the maximum
reservable bandwidth is 50 Mbit/s.
On S9300-A, there are two tunnels to S9300-C, namely, Tunnel 1/0/0 and Tunnel 1/0/1, both of
which require the bandwidth of 40 Mbit/s. The total bandwidth (80 Mbit/s) of these two tunnels
is greater than the bandwidth (50 Mbit/s) of the link between S9300-A and S9300-B. In addition,
Tunnel 1/0/0 has a higher priority than Tunnel 1/0/0 and preemption is allowed.
The affinity property and mask is required to be used according to the administrative group
property. In this manner, Tunnel 1/0/0 on S9300-A uses one physical link from S9300-B to
S9300-C and Tunnel 1/0/1 uses another physical link.
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the RSVP-TE tunnel. See Configuration Roadmap in Example for Configuring
an RSVP-TE Tunnel.
2. Configure the administrative group property of the outgoing interface of the tunnel on each
node.
3. Configure the affinity property and mask of each tunnel according to the administrative
group property and networking requirements.
4. Set the priority of each tunnel as required.
Data Preparation
To complete the configuration, you need the following data:
l Administrative group property of the link between S9300-A and S9300-B and
administrative group property of the link between S9300-B and S9300-C
l Affinity property and mask of each tunnel
l Number of the tunnel interface, IP address, destination IP address, tunnel ID, tunnel
bandwidth, tunnel priority, and signaling protocol (RSVP-TE by default)
Procedure
Step 1 Create VLANs and VLANIF interfaces, and assign IP addresses to the VLANIF interfaces.
Configure IP addresses and masks for the interfaces including loopback interfaces according to
Figure 5-182.
Configure OSPF on all the nodes to advertise the routes of network segments and the host routes
of LSR IDs.
Step 3 Configure basic MPLS functions, enable MPLS TE, RSVP-TE, and OSPF TE, and enable CSPF
on the ingress node.
# Configure basic MPLS functions and enable MPLS TE and RSVP-TE on S9300-A, S9300-B,
and S9300-C.
# Enable OSPF TE on S9300-A, S9300-B, and S9300-C. Take the display on S9300-A as an
example.
[S9300-A] ospf
[S9300-A-ospf-1] opaque-capability enable
[S9300-A-ospf-1] area 0
[S9300-A-ospf-1-area-0.0.0.0] mpls-te enable
[S9300-A-ospf-1-area-0.0.0.0] quit
[S9300-A-ospf-1] quit
The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A, and
are not mentioned here.
# On S9300-A, set the maximum link bandwidth to 100 Mbit/s and the maximum reservable
bandwidth to 50 Mbit/s.
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] mpls te max-link-bandwidth 100000
[S9300-A-Vlanif10] mpls te max-reservable-bandwidth 50000
After the configuration, you can view the TEDB on S9300-A, including the maximum reservable
bandwidth and the Color field that is the administrative group property of the link.
[S9300-A] display mpls te cspf tedb node
Router ID: 1.1.1.1
IGP Type: OSPF Process Id: 1
MPLS-TE Link Count: 1
Link[1]:
Interface IP Address: 192.168.1.1
Peer IP Address: 192.168.1.2
Peer Router Id: 2.2.2.2
Peer OSPF Router Id: 2.2.2.2
IGP Area: 0
Link Type: multi-access Link Status: Active
IGP Metric: 1 TE Metric: 1 Color: 0x10001
Maximum Bandwidth: 100000 (kbps)
Maximum Reservable Bandwidth: 50000 (kbps)
Bandwidth Constraints: Local Overbooking Multiplier:
BC[0]: 50000 (kbps) LOM[0]: 1
BC[1]: 0 (kbps) LOM[1]: 1
BW Unreserved for Class type 0:
[0]: 50000 (kbps), [1]: 50000 (kbps)
[2]: 50000 (kbps), [3]: 50000 (kbps)
[4]: 50000 (kbps), [5]: 50000 (kbps)
[6]: 50000 (kbps), [7]: 50000 (kbps)
BW Unreserved for Class type 1:
[0]: 0 (kbps), [1]: 0 (kbps)
[2]: 0 (kbps), [3]: 0 (kbps)
[4]: 0 (kbps), [5]: 0 (kbps)
[6]: 0 (kbps), [7]: 0 (kbps)
Router ID: 2.2.2.2
IGP Type: OSPF Process Id: 1
MPLS-TE Link Count: 3
Link[1]:
Interface IP Address: 192.168.2.1
Peer IP Address: 192.168.2.2
Peer Router Id: 3.3.3.3
Peer OSPF Router Id: 3.3.3.3
IGP Area: 0
Link Type: multi-access Link Status: Active
IGP Metric: 1 TE Metric: 1 Color: 0x10101
Maximum Bandwidth: 100000 (kbps)
Maximum Reservable Bandwidth: 50000 (kbps)
Bandwidth Constraints: Local Overbooking Multiplier:
BC[0]: 50000 (kbps) LOM[0]: 1
Here, the default setup priority and holding priority are used, that is, the lowest priority with the
value of 7.
The affinity property of the tunnel is 0x10101 and the mask is 0x11011, both of which can match
the administrative group property of the links along the tunnel.
After the configuration, check the status of the tunnel on S9300-A:
[S9300-A] display mpls te tunnel-interface
Tunnel Name : Tunnel1/0/0
Tunnel State Desc : CR-LSP is Up
Tunnel Attributes :
LSP ID : 1.1.1.1:1
Session ID : 100
Admin State : UP Oper State : UP
Ingress LSR ID : 1.1.1.1 Egress LSR ID: 3.3.3.3
Signaling Protocol : RSVP Resv Style : SE
Class Type : CLASS 0 Tunnel BW : 40000 kbps
Check the TEDB, and you can view the change of bandwidth used by the links:
[S9300-A] display mpls te cspf tedb node
Router ID: 1.1.1.1
IGP Type: OSPF Process Id: 1
MPLS-TE Link Count: 1
Link[1]:
Interface IP Address: 192.168.1.1
Peer IP Address: 192.168.1.2
Peer Router Id: 2.2.2.2
Peer OSPF Router Id: 2.2.2.2
IGP Area: 0
Link Type: multi-access Link Status: Active
IGP Metric: 1 TE Metric: 1 Color: 0x10001
Maximum Bandwidth: 100000 (kbps)
Maximum Reservable Bandwidth: 50000 (kbps)
Bandwidth Constraints: Local Overbooking Multiplier:
BC[0]: 50000 (kbps) LOM[0]: 1
BC[1]: 0 (kbps) LOM[1]: 1
BW Unreserved for Class type 0:
[0]: 50000 (kbps), [1]: 50000 (kbps)
[2]: 50000 (kbps), [3]: 50000 (kbps)
[4]: 50000 (kbps), [5]: 50000 (kbps)
[6]: 50000 (kbps), [7]: 10000 (kbps)
BW Unreserved for Class type 1:
[0]: 0 (kbps), [1]: 0 (kbps)
[2]: 0 (kbps), [3]: 0 (kbps)
[4]: 0 (kbps), [5]: 0 (kbps)
[6]: 0 (kbps), [7]: 0 (kbps)
Router ID: 2.2.2.2
IGP Type: OSPF Process Id: 1
MPLS-TE Link Count: 3
Link[1]:
Interface IP Address: 192.168.2.1
Peer IP Address: 192.168.2.2
Peer Router Id: 3.3.3.3
Peer OSPF Router Id: 3.3.3.3
IGP Area: 0
Link Type: multi-access Link Status: Active
IGP Metric: 1 TE Metric: 1 Color: 0x10101
Maximum Bandwidth: 100000 (kbps)
Maximum Reservable Bandwidth: 50000 (kbps)
Bandwidth Constraints: Local Overbooking Multiplier:
BC[0]: 50000 (kbps) LOM[0]: 1
BC[1]: 0 (kbps) LOM[1]: 1
BW Unreserved for Class type 0:
[0]: 50000 (kbps), [1]: 50000 (kbps)
[2]: 50000 (kbps), [3]: 50000 (kbps)
[4]: 50000 (kbps), [5]: 50000 (kbps)
[6]: 50000 (kbps), [7]: 10000 (kbps)
BW Unreserved for Class type 1:
[0]: 0 (kbps), [1]: 0 (kbps)
[2]: 0 (kbps), [3]: 0 (kbps)
[4]: 0 (kbps), [5]: 0 (kbps)
[6]: 0 (kbps), [7]: 0 (kbps)
Link[2]:
Interface IP Address: 192.168.1.2
Peer IP Address: 192.168.1.1
Peer Router Id: 1.1.1.1
Peer OSPF Router Id: 1.1.1.1
IGP Area: 0
Link Type: multi-access Link Status: Active
IGP Metric: 1 TE Metric: 1 Color: 0x0
Maximum Bandwidth: 0 (kbps)
Maximum Reservable Bandwidth: 0 (kbps)
Bandwidth Constraints: Local Overbooking Multiplier:
BC[0]: 0 (kbps) LOM[0]: 1
BC[1]: 0 (kbps) LOM[1]: 1
BW Unreserved for Class type 0:
[0]: 0 (kbps), [1]: 0 (kbps)
[2]: 0 (kbps), [3]: 0 (kbps)
[4]: 0 (kbps), [5]: 0 (kbps)
[6]: 0 (kbps), [7]: 0 (kbps)
BW Unreserved for Class type 1:
[0]: 0 (kbps), [1]: 0 (kbps)
[2]: 0 (kbps), [3]: 0 (kbps)
[4]: 0 (kbps), [5]: 0 (kbps)
[6]: 0 (kbps), [7]: 0 (kbps)
Link[3]:
Interface IP Address: 192.168.3.1
Peer IP Address: 192.168.3.2
Peer Router Id: 3.3.3.3
Peer OSPF Router Id: 3.3.3.3
IGP Area: 0
Link Type: multi-access Link Status: Active
IGP Metric: 1 TE Metric: 1 Color: 0x10011
Maximum Bandwidth: 100000 (kbps)
Maximum Reservable Bandwidth: 50000 (kbps)
Bandwidth Constraints: Local Overbooking Multiplier:
BC[0]: (kbps) LOM[0]: 1
BC[1]: 0 (kbps) LOM[1]: 1
BW Unreserved for Class type 0:
[0]: 50000 (kbps), [1]: 50000 (kbps)
[2]: 50000 (kbps), [3]: 50000 (kbps)
[4]: 50000 (kbps), [5]: 50000 (kbps)
[6]: 50000 (kbps), [7]: 50000 (kbps)
BW Unreserved for Class type 1:
[0]: 0 (kbps), [1]: 0 (kbps)
[2]: 0 (kbps), [3]: 0 (kbps)
[4]: 0 (kbps), [5]: 0 (kbps)
[6]: 0 (kbps), [7]: 0 (kbps)
Router ID: 3.3.3.3
IGP Type: OSPF Process Id: 1
MPLS-TE Link Count: 2
Link[1]:
Interface IP Address: 192.168.2.2
The BW Unreserved for Class type 0 field indicates the available bandwidth from the maximum
reservable bandwidth for various priorities. The display shows that the unreserved bandwidth
changes for class type 7 on the outgoing interfaces on each node along the tunnel. This indicates
that certain tunnels succeed in reserving 40 Mbit/s bandwidth with the priority of 7. According
to bandwidth allocation , you can view the path that the tunnel takes. This indicates that the
affinity property and the mask of the tunnel must match the administrative group property of the
links.
You can also run the display mpls te tunnel command on S9300-B to view the outgoing interface
of the tunnel.
[S9300-B] display mpls te tunnel
LSP-Id Destination In/Out-If
1.1.1.1:100:1 3.3.3.3 Vlanif10/Vlanif20
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10
#
mpls lsr-id 1.1.1.1
mpls
mpls te
mpls rsvp-te
mpls te cspf
#
interface Vlanif10
ip address 192.168.1.1 255.255.255.0
mpls
mpls te
mpls te link administrative group 10001
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 50000
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
interface Tunnel1/0/0
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 3.3.3.3
mpls te tunnel-id 100
mpls te affinity property 10101 mask 11011
mpls te commit
#
interface Tunnel1/0/1
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 3.3.3.3
mpls te tunnel-id 101
mpls te priority 6
mpls te affinity property 10011 mask 11101
mpls te commit
#
ospf 1
opaque-capability enable
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 192.168.1.0 0.0.0.255
mpls-te enable
#
return
l Configuration file of S9300-B
#
sysname S9300-B
#
vlan batch 10 20 30
#
mpls lsr-id 2.2.2.2
mpls
mpls te
mpls rsvp-te
#
interface Vlanif10
ip address 192.168.1.2 255.255.255.0
mpls
mpls te
mpls rsvp-te
#
interface Vlanif20
ip address 192.168.2.1 255.255.255.0
mpls
mpls te
mpls te link administrative group 10101
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 50000
mpls rsvp-te
#
interface Vlanif30
ip address 192.168.3.1 255.255.255.0
mpls
mpls te
mpls te link administrative group 10011
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 50000
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 20
#
interface GigabitEthernet3/0/0
port link-type access
port default vlan 30
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
ospf 1
opaque-capability enable
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 192.168.1.0 0.0.0.255
Networking Requirements
As shown in Figure 5-183, the primary LSP is S9300-A → S9300-B → S9300-C → S9300-D,
and the link from S9300-B to S9300-C requires link protection through FRR.
Establish a bypass LSP, and use the path S9300-B → S9300-E → S9300-C. Here, S9300-B is
the PLR and S9300-C is the MP.
Use the explicit path to establish the primary tunnel and the bypass tunnel of MPLS TE. RSVP-
TE is used.
S9300-D
GE1/0/0
Vlanif50
4.1.1.2/24
Loopback1 Loopback1
1.1.1.1/32 2.2.2.2/32 Loopback1
3.3.3.3/32 GE1/0/0
Vlanif50
S9300-A S9300-B 4.1.1.1/24
S9300-C
GE1/0/0 GE1/0/0 GE2/0/0 GE2/0/0
Vlanif10 Vlanif10 Vlanif20 Vlanif20
2.1.1.1/24 2.1.1.2/24 3.1.1.1/24 3.1.1.2/24 GE3/0/0
GE3/0/0 Vlanif40
Loopback1 3.3.1.2/24
Vlanif30 5.5.5.5/32
3.2.1.1/24
Primary LSP GE2/0/0
GE1/0/0 Vlanif40
Vlanif30 3.3.1.1/24
Bypass LSP 3.2.1.2/24
S9300-E
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l IS-IS area ID, originating system ID, and IS-IS level of each node
l Maximum bandwidth and maximum reservable bandwidth for the link along the tunnel
l Explicit paths of the primary tunnel and the bypass tunnel
l Interface names, IP addresses, destination IP addresses, tunnel IDs, signaling protocol
(RSVP-TE) of the primary tunnel and the bypass tunnel
l Interface protected by the bypass tunnel
Procedure
Step 1 Create VLANs and VLANIF interfaces, and assign IP addresses to the VLANIF interfaces.
As shown in Figure 5-183, configure IP addresses and masks for the interfaces, including
loopback interfaces. The configuration details are not mentioned here.
Step 2 Configure an IGP.
Configure IS-IS on all the nodes to advertise the host routes of the LSR IDs. The configuration
details are not mentioned here.
After the configuration, run the display ip routing-table command on each node, and you can
view that the nodes learn the routes from each other.
Step 3 Configure basic MPLS functions and enable MPLS TE, RSVP-TE, CSPF, and IS-IS TE.
# Configure S9300-A.
[S9300-A] mpls lsr-id 1.1.1.1
[S9300-A] mpls
[S9300-A-mpls] mpls te
[S9300-A-mpls] mpls rsvp-te
[S9300-A-mpls] mpls te cspf
[S9300-A-mpls] quit
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] mpls
[S9300-A-Vlanif10] mpls te
[S9300-A-Vlanif10] mpls rsvp-te
[S9300-A-Vlanif10] quit
[S9300-A] isis
[S9300-A-isis-1] cost-style wide
[S9300-A-isis-1] traffic-eng level-2
NOTE
The configurations on S9300-B, S9300-C, S9300-D, and S9300-E are similar to the configuration on
S9300-A, and are not mentioned here. CSPF needs to be enabled only on the ingress node of the primary
tunnel (S9300-A) and the ingress node of the bypass tunnel (S9300-B); CSPF does not need to be enabled
on S9300-C, S9300-D, and S9300-E.
# Configure S9300-B.
[S9300-B] interface vlanif 20
[S9300-B-Vlanif20] mpls te max-link-bandwidth 100000
[S9300-B-Vlanif20] mpls te max-reservable-bandwidth 100000
[S9300-B-Vlanif20] quit
[S9300-B] interface vlanif 30
[S9300-B-Vlanif30] mpls te max-link-bandwidth 100000
[S9300-B-Vlanif30] mpls te max-reservable-bandwidth 100000
[S9300-B-Vlanif30] quit
# Configure S9300-C.
[S9300-C] interface vlanif 50
[S9300-C-Vlanif50] mpls te max-link-bandwidth 100000
[S9300-C-Vlanif50] mpls te max-reservable-bandwidth 100000
[S9300-C-Vlanif50] quit
# Configure S9300-E.
Step 5 # Establish an MPLS TE tunnel on S9300-A that is the ingress node of the primary LSP.
# Configure the explicit path of the primary LSP.
[S9300-A] explicit-path pri-path
[S9300-A-explicit-path-pri-path] next hop 2.1.1.2
[S9300-A-explicit-path-pri-path] next hop 3.1.1.2
[S9300-A-explicit-path-pri-path] next hop 4.1.1.2
[S9300-A-explicit-path-pri-path] next hop 4.4.4.4
[S9300-A-explicit-path-pri-path] quit
# Enable FRR.
[S9300-A-Tunnel1/0/0] mpls te fast-reroute
[S9300-A-Tunnel1/0/0] mpls te commit
[S9300-A-Tunnel1/0/0] quit
After the configuration, run the display interface tunnel command on S9300-A, and you can
view that the status of Tunnel 1/0/0 is Up.
[S9300-A] display interface tunnel
Tunnel1/0/0 current state : UP
Line protocol current state : UP
Last line protocol up time: 2008-11-16, 12:26:17
Description : HUAWEI, Quidway Series, Tunnel1/0/0 Interface
The Maximum Transmit Unit is 1500 bytes
Internet Address is unnumbered, using address of LoopBack1(1.1.1.1/32)
Encapsulation is TUNNEL, loopback not set
Tunnel destination 4.4.4.4
Tunnel up/down statistics 1
Tunnel protocol/transport MPLS/MPLS, ILM is available,
300 seconds output rate 0 bits/sec, 0 packets/sec
0 packets output, 0 bits
0 output error
Run the display mpls te tunnel-interface command on S9300-A, and you can view detailed
information about the tunnel.
[S9300-A] display mpls te tunnel-interface
Tunnel Name : Tunnel1/0/0
Tunnel State Desc : CR-LSP is Up
Tunnel Attributes :
LSP ID : 1.1.1.1:1
Session ID : 100
Admin State : UP Oper State : UP
Ingress LSR ID : 1.1.1.1 Egress LSR ID: 4.4.4.4
Signaling Prot : RSVP Resv Style : SE
Class Type : CLASS 0 Tunnel BW : 0 kbps
Reserved BW : 50000 kbps
Setup Priority : 7 Hold Priority: 7
Hop Limit : -
Secondary Hop Limit : -
BestEffort Hop Limit: -
Affinity Prop/Mask : 0x0/0x0
After the configuration, run the display interface tunnel command on S9300-B, and you can
view that the status of Tunnel 3/0/0 is Up.
Run the display mpls lsp command on all the nodes, and you can view the LSP entry and that
two LSPs pass through S9300-B and S9300-C.
[S9300-A] display mpls lsp
----------------------------------------------------------------------
LSP Information: RSVP LSP
----------------------------------------------------------------------
Run the display mpls te tunnel command on all the nodes, and you can view the establishment
of the tunnel and that two tunnels pass through S9300-B and S9300-C.
[S9300-A] display mpls te tunnel
LSP-Id Destination In/Out-If
1.1.1.1:100:1 4.4.4.4 -/Vlanif10
[S9300-B] display mpls te tunnel
LSP-Id Destination In/Out-If
1.1.1.1:100:1 4.4.4.4 Vlanif10/Vlanif20
2.2.2.2:300:2 3.3.3.3 -/Vlanif30
[S9300-C] display mpls te tunnel
LSP-Id Destination In/Out-If
1.1.1.1:100:1 4.4.4.4 Vlanif20/Vlanif50
2.2.2.2:300:2 3.3.3.3 Vlanif40/-
[S9300-D] display mpls te tunnel
LSP-Id Destination In/Out-If
1.1.1.1:100:1 4.4.4.4 Vlanif50/-
Run the display mpls lsp verbose command on S9300-B, and you can view that the bypass
tunnel is bound to the outgoing interface VLANIF 20 and is not in use currently.
[S9300-B] display mpls lsp verbose
----------------------------------------------------------------------
LSP Information: RSVP LSP
----------------------------------------------------------------------
No : 1
SessionID : 100
IngressLsrID : 1.1.1.1
LocalLspID : 1
Tunnel-Interface : Tunnel1/0/0
Fec : 4.4.4.4/32
Nexthop : 3.1.1.2
In-Label : 13312
Out-Label : 13312
In-Interface : Vlanif10
Out-Interface : Vlanif20
LspIndex : 4104
Token : 0x10000
LsrType : Transit
Bypass In Use : Not Used
BypassTunnel : Tunnel Index[Tunnel3/0/0], InnerLabel[13312]
Mpls-Mtu : 1500
TimeStamp : 1265sec
No : 2
SessionID : 300
IngressLsrID : 2.2.2.2
LocalLspID : 2
Tunnel-Interface : Tunnel3/0/0
Fec : 3.3.3.3/32
Nexthop : 3.2.1.2
In-Label : NULL
Out-Label : 13313
In-Interface : ----------
Out-Interface : Vlanif30
LspIndex : 4106
Token : 0x10000
LsrType : Ingress
Bypass In Use : Not Exists
BypassTunnel : Tunnel Index[---]
Mpls-Mtu : 1500
TimeStamp : 528sec
Run the display interface tunnel 1/0/0 command on S9300-A, and you can view the status of
the primary LSP and that the status of the tunnel interface is still Up.
Run the tracert lsp te tunnel 1/0/0 command on S9300-A, and you can view the path passed
by the tunnel.
[S9300-A] tracert lsp te tunnel 1/0/0
LSP Trace Route FEC: TE TUNNEL IPV4 SESSION QUERY Tunnel1/0/0 , press CTRL_C to
break.
TTL Replier Time Type Downstream
0 Ingress 2.1.1.2/[13312 ]
1 2.1.1.2 1 ms Transit
2 3.2.1.2 16 ms Transit
3 3.3.1.2 1 ms Transit
4 4.1.1.2 1 ms Egress
The preceding information shows that services on the link are already switched to the bypass
tunnel.
NOTE
After the FRR switchover, run the display mpls te tunnel-interface command immediately, and you can
view that two CR-LSPs are in Up state. This is because FRR establishes a new LSP by using the make-
before-break mechanism. The previous LSP is deleted only after the new LSP is established successfully.
Run the display mpls lsp verbose command on S9300-B, and you can view that the bypass
tunnel is used.
[S9300-B] display mpls lsp verbose
----------------------------------------------------------------------
LSP Information: RSVP LSP
----------------------------------------------------------------------
No : 1
SessionID : 100
IngressLsrID : 1.1.1.1
LocalLspID : 1
Tunnel-Interface : Tunnel1/0/0
Fec : 4.4.4.4/32
Nexthop : 3.1.1.2
In-Label : 13312
Out-Label : 13312
In-Interface : Vlanif10
Out-Interface : Vlanif20
LspIndex : 4104
Token : 0x10000
LsrType : Transit
Bypass In Use : In Use
Bypass Tunnel Id : 0x0
BypassTunnel : Tunnel Index[Tunnel3/0/0], InnerLabel[13312]
Mpls-Mtu : 1500
TimeStamp : 3782sec
No : 2
SessionID : 300
IngressLsrID : 2.2.2.2
LocalLspID : 2
Tunnel-Interface : Tunnel3/0/0
Fec : 3.3.3.3/32
Nexthop : 3.2.1.2
In-Label : NULL
Out-Label : 13313
In-Interface : ----------
Out-Interface : Vlanif30
LspIndex : 4106
Token : 0x10000
LsrType : Ingress
Bypass In Use : Not Exists
Bypass Tunnel Id : 0x0
BypassTunnel : Tunnel Index[---]
Mpls-Mtu : 1500
TimeStamp : 1379sec
Run the display interface tunnel 1/0/0 command, and you can view the status of the primary
LSP on S9300-A. The tunnel interface is in Up state.
After a period of time, run the display mpls lsp verbose command on S9300-B, and you can
view that Tunnel 1/0/0 is bound to VLANIF 20 and remains unused.
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10
#
mpls lsr-id 1.1.1.1
mpls
mpls te
mpls rsvp-te
mpls te cspf
#
explicit-path pri-path
next hop 2.1.1.2
next hop 3.1.1.2
next hop 4.1.1.2
next hop 4.4.4.4
#
isis 1
is-level level-2
cost-style wide
network-entity 00.0005.0000.0000.0001.00
traffic-eng level-2
#
interface Vlanif10
ip address 2.1.1.1 255.255.255.0
isis enable 1
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
isis enable 1
#
interface Tunnel1/0/0
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 4.4.4.4
mpls te tunnel-id 100
mpls te record-route label
mpls te path explicit-path pri-path
mpls te fast-reroute
mpls te commit
#
return
l Configuration file of S9300-B
#
sysname S9300-B
#
vlan batch 10 20 30
#
mpls lsr-id 2.2.2.2
mpls
mpls te
mpls te timer fast-reroute 5
mpls rsvp-te
mpls te cspf
#
explicit-path by-path
next hop 3.2.1.2
next hop 3.3.1.2
next hop 3.3.3.3
#
isis 1
is-level level-2
cost-style wide
network-entity 00.0005.0000.0000.0002.00
traffic-eng level-2
#
interface Vlanif10
ip address 2.1.1.2 255.255.255.0
isis enable 1
mpls
mpls te
mpls rsvp-te
#
interface Vlanif20
ip address 3.1.1.1 255.255.255.0
isis enable 1
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
mpls rsvp-te
#
interface Vlanif30
ip address 3.2.1.1 255.255.255.0
isis enable 1
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 20
#
interface GigabitEthernet3/0/0
port link-type access
port default vlan 30
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
isis enable 1
#
interface Tunnel3/0/0
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 3.3.3.3
mpls te tunnel-id 300
mpls te record-route
mpls te bypass-tunnel bandwidth 100000
mpls te path explicit-path by-path
mpls te protected-interface Vlanif20
mpls te commit
#
return
l Configuration file of S9300-C
#
sysname S9300-C
#
vlan batch 20 40 50
#
mpls lsr-id 3.3.3.3
mpls
mpls te
mpls rsvp-te
#
isis 1
is-level level-2
cost-style wide
network-entity 00.0005.0000.0000.0003.00
traffic-eng level-2
#
interface Vlanif20
ip address 3.1.1.2 255.255.255.0
isis enable 1
mpls
mpls te
mpls rsvp-te
#
interface Vlanif40
ip address 3.3.1.2 255.255.255.0
isis enable 1
mpls
mpls te
mpls rsvp-te
#
interface Vlanif50
ip address 4.1.1.1 255.255.255.0
isis enable 1
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 50
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 20
#
interface GigabitEthernet3/0/0
port link-type access
port default vlan 40
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
isis enable 1
#
return
l Configuration file of S9300-D
#
sysname S9300-D
#
vlan batch 50
#
mpls lsr-id 4.4.4.4
mpls
mpls te
mpls rsvp-te
#
isis 1
is-level level-2
cost-style wide
network-entity 00.0005.0000.0000.0004.00
traffic-eng level-2
#
interface Vlanif50
ip address 4.1.1.2 255.255.255.0
isis enable 1
mpls
mpls te
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 50
#
interface LoopBack1
ip address 4.4.4.4 255.255.255.255
isis enable 1
#
return
Networking Requirements
As shown in Figure 5-184, a primary tunnel is set up using the explicit path of S9300-A→
S9300-B→ S9300-C. A bypass tunnel is set up on the ingress node S9300-A for node protection
and a bypass tunnel is set up on the transit node S9300-B for link protection, and both of them
provide bandwidth protection.
GE3/0/0
S9300-A S9300-B GE3/0/0 S9300-C
Vlanif20 Vlanif40
2.1.1.2/24 3.1.1.2/24
GE2/0/0 GE2/0/0 GE1/0/0
GE1/0/0 GE2/0/0 Vlanif10
Vlanif20 GE1/0/0 Vlanif40 Vlanif50
Vlanif10 Vlanif30 3.1.1.1/24 10.1.1.1/24
2.1.1.1/24 Loopback1 4.1.1.2/24
10.1.1.2/24 3.2.1.1/24
4.4.4.4/32
GE3/0/0 GE2/0/0
Vlanif30 Vlanif50
3.2.1.2/24 4.1.1.1/24
S9300-D
Configuration Roadmap
The configuration roadmap is as follows:
1. Set up a primary tunnel, enable TE FRR in the tunnel interface view, and enable MPLS
auto FRR in the MPLS view.
2. Specify the bandwidth that the bypass tunnel can protect and the setup priority and holding
priority of the bypass tunnel.
Data Preparation
To complete the configuration, you need the following data:
l OSPF process ID and OSPF area ID of each node
l Maximum bandwidth and maximum reservable bandwidth of the link
l Path that the primary tunnel passes through
l Number of the primary tunnel interface, IP address, destination IP address, tunnel ID,
signaling protocol (RSVP-TE), and tunnel bandwidth
Procedure
Step 1 Create VLANs and VLANIF interfaces, and assign IP addresses to the VLANIF interfaces.
As shown in Figure 5-184, configure IP addresses and masks for the interfaces, including
loopback interfaces. The configuration details are not mentioned here.
Step 2 Configure OSPF to advertise the routes of network segments and the host routes of the LSR IDs.
Configure OSPF on all the nodes to advertise the host routes of the LSR IDs. The configuration
details are not mentioned here.
After the configuration, run the display ip routing-table command on each node, and you can
view that the nodes learn the LSR ID from each other.
Step 3 Configure basic MPLS functions and enable MPLS TE, RSVP-TE, and CSPF.
# Configure S9300-A.
[S9300-A] mpls lsr-id 1.1.1.1
[S9300-A] mpls
[S9300-A-mpls] mpls te
[S9300-A-mpls] mpls rsvp-te
[S9300-A-mpls] mpls te cspf
[S9300-A-mpls] quit
[S9300-A] interface vlanif 20
[S9300-A-Vlanif20] mpls
[S9300-A-Vlanif20] mpls te
[S9300-A-Vlanif20] mpls rsvp-te
[S9300-A-Vlanif20] quit
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] mpls
[S9300-A-Vlanif10] mpls te
[S9300-A-Vlanif10] mpls rsvp-te
[S9300-A-Vlanif10] quit
NOTE
The configurations on S9300-B, S9300-C, and S9300-D are similar to the configuration on S9300-A, and
are not mentioned here. You need to enable CSPF only on the ingress nodes of the primary tunnel and the
bypass tunnel. That is, you need to enable CSPF only on S9300-A and S9300-B. You do not need to enable
CSPF on S9300-C and S9300-D.
# Configure S9300-B.
[S9300-B] ospf
[S9300-B-ospf-1] opaque-capability enable
[S9300-B-ospf-1] area 0
[S9300-B-ospf-1-area-0.0.0.0] mpls-te enable
[S9300-B-ospf-1-area-0.0.0.0] quit
[S9300-B-ospf-1] quit
# Configure S9300-C.
[S9300-C] ospf
[S9300-C-ospf-1] opaque-capability enable
[S9300-C-ospf-1] area 0
[S9300-C-ospf-1-area-0.0.0.0] mpls-te enable
[S9300-C-ospf-1-area-0.0.0.0] quit
[S9300-C-ospf-1] quit
# Configure S9300-D.
[S9300-D] ospf
[S9300-D-ospf-1] opaque-capability enable
[S9300-D-ospf-1] area 0
[S9300-D-ospf-1-area-0.0.0.0] mpls-te enable
[S9300-D-ospf-1-area-0.0.0.0] quit
[S9300-D-ospf-1] quit
# Configure S9300-A.
[S9300-A] interface vlanif 20
[S9300-A-Vlanif20] mpls te max-link-bandwidth 10000 bc1 3000
[S9300-A-Vlanif20] mpls te max-reservable-bandwidth 10000 bc1 3000
For convenience, these configurations are used on the outgoing interfaces on the link that the
primary tunnel and bypass tunnel pass through, and the details are not mentioned here.
Step 6 Configure the explicit path for the primary tunnel.
[S9300-A] explicit-path master
[S9300-A-explicit-path-master] next hop 2.1.1.2
[S9300-A-explicit-path-master] next hop 3.1.1.2
# Configure S9300-B.
[S9300-B] mpls
[S9300-B-mpls] mpls te auto-frr
No : 2
SessionID : 5097
IngressLsrID : 2.2.2.2
LocalLspID : 2
Tunnel-Interface : Tunnel0/0/2048
Fec : 3.3.3.3/32
Nexthop : 10.1.1.1
In-Label : 13312
Out-Label : 3
In-Interface : Vlanif20
Out-Interface : Vlanif10
LspIndex : 6149
Token : 0x10000
LsrType : Transit
Bypass In Use : Not Exists
Bypass Tunnel Id : 0x0
BypassTunnel : Tunnel Index[---]
Mpls-Mtu : ------
TimeStamp : 324sec
Bfd-State : ---
No : 3
SessionID : 5097
IngressLsrID : 1.1.1.1
LocalLspID : 3
Tunnel-Interface : Tunnel0/0/2048
Fec : 3.3.3.3/32
Nexthop : 10.1.1.1
In-Label : NULL
Out-Label : 3
In-Interface : ----------
Out-Interface : Vlanif20
LspIndex : 6150
Token : 0x10000
LsrType : Ingress
Bypass In Use : Not Exists
Bypass Tunnel Id : 0x0
BypassTunnel : Tunnel Index[---]
Mpls-Mtu : 1500
TimeStamp : 324sec
Bfd-State : ---
You can view that the primary tunnel is bound to the auto bypass tunnel, that is, Tunnel7/0/2048.
Run the display mpls te tunnel-interface auto-bypass-tunnel command, and you can view
detailed information about the auto bypass tunnel. The bandwidth, setup priority, and holding
priority of the auto bypass tunnel are the same as the bypass-attributes of the primary tunnel.
[S9300-A] display mpls te tunnel-interface auto-bypass-tunnel Tunnel0/0/2048
Tunnel Name : Tunnel0/0/2048
Tunnel State Desc : CR-LSP is Up
Tunnel Attributes :
LSP ID : 1.1.1.1:3
Session ID : 5097
Admin State : UP
Oper State : UP
Ingress LSR ID: 1.1.1.1
Egress LSR ID: 3.3.3.3
Signaling Prot: RSVP
Resv Style : SE
Class Type : CLASS 0
Tunnel BW : 200 kbps
Reserved BW : 200 kbps
Setup Priority: 5
Hold Priority: 4
Hop Limit : -
Secondary Hop Limit: -
BestEffort Hop Limit: -
Affinity Prop/Mask : 0x0/0x0
You can view that the auto bypass tunnel protects the primary tunnel through VLANIF 20 rather
than through other three interfaces on the primary tunnel. The bandwidth of the auto bypass
tunnel is 200 kbit/s, and its setup priority and the holding priority is 5 and 4 respectively.
Run the display mpls te tunnel path command on S9300-A, and you can view the path
information about the primary tunnel and the auto bypass tunnel, and node protection and
bandwidth protection are provided for the outgoing interface on the primary tunnel.
[S9300-A] display mpls te tunnel path
Tunnel Interface Name : Tunnel2/0/0
Lsp ID : 1.1.1.1 :200:1
Hop Information
Hop 0 2.1.1.1 Local-Protection available | bandwidth | node
Hop 1 2.1.1.2 Label 106497
Hop 2 2.2.2.2
Hop 3 3.1.1.1 Local-Protection available | bandwidth
Hop 4 3.1.1.2 Label 3
Hop 5 3.3.3.3
Hop 0 10.1.1.2
Hop 1 10.1.1.1
Hop 2 3.3.3.3
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10 20
#
mpls lsr-id 1.1.1.1
mpls
mpls te
mpls te auto-frr
mpls rsvp-te
mpls te cspf
#
explicit-path master
next hop 2.1.1.2
next hop 3.1.1.2
#
interface Vlanif10
ip address 10.1.1.2 255.255.255.0
mpls
mpls te
mpls te max-link-bandwidth 10000 bc1 3000
mpls te max-reservable-bandwidth 10000 bc1 3000
mpls rsvp-te
#
interface Vlanif20
ip address 2.1.1.1 255.255.255.0
mpls
mpls te
mpls te max-link-bandwidth 10000 bc1 3000
mpls te max-reservable-bandwidth 10000 bc1 3000
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 20
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
interface Tunnel2/0/0
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 3.3.3.3
mpls te tunnel-id 200
mpls te record-route label
mpls te path explicit-path master
mpls te priority 4 3
mpls te fast-reroute bandwidth
mpls te bypass-attributes bandwidth 200 priority 5 4
mpls te commit
#
ospf 1
opaque-capability enable
area 0.0.0.0
network 10.1.1.0 0.0.0.255
#
vlan batch 10 40 50
#
mpls lsr-id 3.3.3.3
mpls
mpls te
mpls rsvp-te
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
mpls
mpls te
mpls rsvp-te
#
interface Vlanif40
ip address 3.1.1.2 255.255.255.0
mpls
mpls te
mpls rsvp-te
#
interface Vlanif50
ip address 4.1.1.2 255.255.255.0
mpls
mpls te
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 50
#
interface GigabitEthernet3/0/0
port link-type access
port default vlan 40
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
#
ospf 1
opaque-capability enable
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 3.1.1.0 0.0.0.255
network 4.1.1.0 0.0.0.255
network 3.3.3.3 0.0.0.0
mpls-te enable
#
return
l Configuration file of S9300-D
#
sysname S9300-D
#
vlan batch 30 50
#
mpls lsr-id 4.4.4.4
mpls
mpls te
mpls rsvp-te
#
interface Vlanif30
ip address 3.2.1.2 255.255.255.0
mpls
mpls te
mpls rsvp-te
#
interface Vlanif50
Networking Requirements
Figure 5-185 shows the networking diagram of MPLS TE FRR. The primary tunnel is along
PLR → S9300-A → MP → S9300-C, and its bypass tunnel is along PLR → S9300-C → MP.
It is required that the TE traffic of the primary tunnel be switched to the bypass tunnel after the
LPU where GE 1/0/0 of the PLR is located is removed, and the traffic be switched back to the
primary tunnel after the removed LPU is re-installed.
Both the PLR and the MP are S9300s.
GE
0
Loopback 1 1 /0/ 0 Vla 2/0/
1
GE lanif /24 30 ni f 0 Loopback 1 Loopback 1
1.1.1.1/32 .1. 30
V .1.2 1.1 GE 4.4.4.4/32 5.5.5.5/32
/ 0 . 1 /24 Vla 1/0/
E 1/0if 10 10 S9300-A 3 n 0
G lan 1/2 4 0 i
.1. f30
V .1. 1.2 GE3/0/0 GE1/0/0
0 .1 /24 Vlanif50 Vlanif50
1
50.1.1.1/24 50.1.1.2/24
PLR MP
GE S9300-C
/0
V 2/0 2/0 f40
20 lanif /0 E i
G lan /24
.1. 20
1.1 S9300-B V .1.2
/24 .1
GE 40
V 1/0 /0
20 lanif /0 2/0 0
.1. 20 GE anif4 /24
1.2
/24 Vl .1.1 : primary LSP
.1
40
: bypass LSP
Loopback 1
3.3.3.3/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the tunnel interfaces of the primary tunnel and the bypass tunnel of the PLR on
the main control board.
2. Specify the explicit paths of the primary tunnel and the bypass tunnel when you configure
MPLS TE FRR. The explicit paths of the primary tunnel and the bypass tunnel must pass
through different LPUs of the PLR; otherwise, board removing protection cannot be
implemented.
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Create VLANs and VLANIF interfaces, and assign IP addresses to the VLANIF interfaces.
As shown in Figure 5-185, configure IP addresses and masks for the interfaces, including
loopback interfaces. The configuration details are not mentioned here.
Step 2 Configure OSPF to advertise the routes of network segments and the host routes of the LSR IDs.
Configure OSPF on all the nodes to advertise the host routes of the LSR IDs. The configuration
details are not mentioned here.
After the configuration, run the display ip routing-table command on each node, and you can
view that the nodes learn the LSR ID from each other.
Step 3 Configure basic MPLS functions and enable MPLS TE and RSVP-TE.
NOTE
The configurations on S9300-A, S9300-B, MP, and S9300-C are similar to the configuration on the PLR,
and are not mentioned here.
Step 4 Configure OSPF TE and enable CSPF on the ingress node of the tunnel.
NOTE
The configurations on S9300-B, S9300-C, and S9300-D are similar to the configuration on the PLR, and
are not mentioned here.
Set the maximum reservable bandwidth of the link to 10 Mbit/s, the BC0 bandwidth to 10 Mbit/
s, and the BC1 bandwidth to 3 Mbit/s.
# Configure link bandwidth on all the outgoing interfaces of the link along the primary tunnel
and the bypass tunnel, and the details are not mentioned here.
# Configure the explicit path for the primary tunnel on the PLR.
[PLR] explicit-path master
[PLR-explicit-path-master] next hop 10.1.1.2
[PLR-explicit-path-master] next hop 30.1.1.2
[PLR-explicit-path-master] next hop 50.1.1.2
[PLR-explicit-path-master] next hop 5.5.5.5
[PLR-explicit-path-master] quit
# Enable TE FRR.
[PLR-Tunnel0/0/1] mpls te fast-reroute
[PLR-Tunnel0/0/1] mpls te commit
[PLR-Tunnel0/0/1] quit
After the configuration, run the display interface tunnel command on the PLR, and you can
view that the status of Tunnel 1/0/1 is Up.
[PLR] display interface tunnel 0/0/1
Tunnel0/0/1 current state : UP
Line protocol current state : UP
Description : HUAWEI, Quidway Series, Tunnel0/0/1 Interface
The Maximum Transmit Unit is 1500 bytes
Internet Address is unnumbered, using address of LoopBack1(1.1.1.1/32)
Encapsulation is TUNNEL, loopback not set
Tunnel destination 5.5.5.5
Tunnel up/down statistics 1
Tunnel protocol/transport MPLS/MPLS, ILM is available,
300 seconds output rate 0 bits/sec, 0 packets/sec
0 packets output, 0 bits
0 output error
# Configure the explicit path for the bypass tunnel on the PLR.
[PLR] explicit-path by-path
[PLR-explicit-path-by-path] next hop 20.1.1.2
[PLR-explicit-path-by-path] next hop 40.1.1.2
[PLR-explicit-path-by-path] next hop 4.4.4.4
After the configuration, run the display interface tunnel command on the PLR, and you can
view that the status of Tunnel 0/0/2 is Up.
<PLR> display interface tunnel 0/0/2
Tunnel0/0/2 current state : UP
Line protocol current state : UP
Description : HUAWEI, Quidway Series, Tunnel0/0/2 Interface
The Maximum Transmit Unit is 1500 bytes
Internet Address is unnumbered, using address of LoopBack1(1.1.1.1/32)
Encapsulation is TUNNEL, loopback not set
Tunnel destination 4.4.4.4
Tunnel up/down statistics 1
Tunnel protocol/transport MPLS/MPLS, ILM is available,
300 seconds output rate 0 bits/sec, 0 packets/sec
0 packets output, 0 bits
0 output error
# After the LPU where the outgoing interface of the primary tunnel (GE 1/0/0) is located is
removed, run the display interface tunnel command, and you can view that the tunnel interface
of the primary tunnel remains Up.
# Run the display mpls te tunnel stale-interface and display mpls te tunnel stale-interface
interface-index verbose commands on the PLR, and you can view that the outgoing interface
of the primary tunnel is in Stale state.
<PLR> display mpls stale-interface
Stale-interface Status TE Attri LSP Count CRLSP Count Effective MTU
0x018000106 Up Dis 0 1 -
# Run the display mpls te tunnel path command on the PLR, and you can view that the path
of the primary tunnel passes through S9300-B.
# Run the tracert lsp te tunnel command on the PLR, and you can view that the TE traffic is
transmitted through the bypass tunnel.
<PLR> tracert lsp te tunnel 0/0/1
LSP Trace Route FEC: TE TUNNEL IPV4 SESSION QUERY Tunnel0/0/1 , press CTRL_C to
break.
TTL Replier Time Type Downstream
0 Ingress 20.1.1.2/[13312 13312 ]
1 20.1.1.2 50 ms Transit 40.1.1.2/[3 ]
2 40.1.1.2 50 ms Transit
3 5.5.5.5 60 ms Egress
# After the removed LPU where the outgoing interface of the primary tunnel is located is re-
installed, run the tracert lsp te tunnel command, and you can view that the traffic is switched
back to the primary tunnel.
<PLR> tracert lsp te tunnel 0/0/1
LSP Trace Route FEC: TE TUNNEL IPV4 SESSION QUERY Tunnel6/0/0 , press CTRL_C to
break.
TTL Replier Time Type Downstream
0 Ingress 10.1.1.2/[13312 ]
1 10.1.1.2 40 ms Transit 30.1.1.2/[13312 ]
2 30.1.1.2 50 ms Transit 50.1.1.2/[3 ]
3 5.5.5.5 60 ms Egress
----End
Configuration Files
l Configuration file of the PLR
#
sysname PLR
#
vlan batch 10 20
#
mpls lsr-id 1.1.1.1
mpls
mpls te
mpls rsvp-te
mpls te cspf
#
explicit-path master
next hop 10.1.1.2
next hop 30.1.1.2
next hop 50.1.1.2
next hop 5.5.5.5
#
explicit-path by-path
next hop 20.1.1.2
next hop 40.1.1.2
next hop 4.4.4.4
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
mpls
mpls te
mpls te max-link-bandwidth 10000 bc1 3000
mpls te max-reservable-bandwidth 10000 bc1 3000
mpls rsvp-te
#
interface Vlanif20
ip address 20.1.1.1 255.255.255.0
mpls
mpls te
mpls te max-link-bandwidth 10000 bc1 3000
mpls te max-reservable-bandwidth 10000 bc1 3000
mpls rsvp-te
#
interface GigabitEhernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEhernet2/0/0
port link-type access
port default vlan 20
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
interface Tunnel0/0/1
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 5.5.5.5
mpls te tunnel-id 100
mpls te path explicit-path master
mpls te fast-reroute
mpls te commit
#
interface Tunnel0/0/2
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 4.4.4.4
mpls te tunnel-id 200
mpls te record-route
mpls te path explicit-path by-path
mpls te bypass-tunnel bandwidth 400
mpls te protected-interface Vlanif10
mpls te commit
#
ospf 1
opaque-capability enable
area 0.0.0.0
network 10.1.1.0 0.0.0.3
network 20.1.1.0 0.0.0.3
network 1.1.1.1 0.0.0.0
mpls-te enable
#
return
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10 30
#
mpls lsr-id 2.2.2.2
mpls
mpls te
mpls rsvp-te
#
interface Vlanif10
ip address 10.1.1.2 255.255.255.0
mpls
mpls te
mpls rsvp-te
#
interface Vlanif30
ip address 30.1.1.1 255.255.255.0
mpls
mpls te
mpls te max-link-bandwidth 10000 bc1 3000
mpls te max-reservable-bandwidth 10000 bc1 3000
mpls rsvp-te
#
interface GigabitEhernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEhernet2/0/0
port link-type access
port default vlan 30
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
ospf 1
opaque-capability enable
area 0.0.0.0
network 10.1.1.0 0.0.0.3
network 30.1.1.0 0.0.0.3
network 2.2.2.2 0.0.0.0
mpls-te enable
#
return
l Configuration file of S9300-B
#
sysname S9300-B
#
vlan batch 20 40
#
mpls lsr-id 3.3.3.3
mpls
mpls te
mpls rsvp-te
#
interface Vlanif20
ip address 20.1.1.2 255.255.255.0
mpls
mpls te
mpls rsvp-te
#
interface Vlanif40
ip address 40.1.1.1 255.255.255.0
mpls
mpls te
mpls te max-link-bandwidth 10000 bc1 3000
mpls te max-reservable-bandwidth 10000 bc1 3000
mpls rsvp-te
#
interface GigabitEhernet1/0/0
port link-type access
port default vlan 20
#
interface GigabitEhernet2/0/0
port link-type access
port default vlan 40
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
#
ospf 1
opaque-capability enable
area 0.0.0.0
mpls
mpls te
mpls rsvp-te
#
interface Vlanif50
ip address 50.1.1.2 255.255.255.0
mpls
mpls te
mpls rsvp-te
#
interface GigabitEhernet1/0/0
port link-type access
port default vlan 50
#
interface LoopBack1
ip address 5.5.5.5 255.255.255.255
#
ospf 1
opaque-capability enable
area 0.0.0.0
network 50.1.1.0 0.0.0.3
network 5.5.5.5 0.0.0.0
mpls-te enable
#
return
Networking Requirements
Figure 5-186 shows an MPLS VPN. P and PE devices are S9300s. A TE tunnel with PE1 as the
ingress node and PE2 as the egress node needs to be established on PE1. CR-LSP hot standby
and best-effort path also need to be configured.
l The primary CR-LSP is PE1 → P1 → PE2.
l The backup CR-LSP is PE1 → P2 → PE2.
l The best-effort path is PE1 → P2 → P1 → PE2.
If the primary CR-LSP fails, traffic can be switched to the backup CR-LSP. After the faulty
primary CR-LSP is recovered, the traffic can be switched back to the primary CR-LSP after 15
seconds. If both the primary and backup CR-LSPs fail, traffic can be switched to the best-effort
path.
GE2/0/0 GE2/0/0
Vlanif40 Vlanif50
10.4.1.1/24 10.5.1.2 /24
GE1/0/0
GE1/0/0
PE1 Vlanif20 PE2
Vlanif30
10.2.1.2/24
10.3.1.1/24
Loopback1 Loopback1
4.4.4.4/32 3.3.3.3/32
: Primary path
: Backup path
: Best-effort path
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure an IP address for each interface and enable an IGP on each node to implement
interworking.
2. Configure MPLS and basic MPLS TE functions.
3. Configure explicit paths for the primary and backup CR-LSPs on PE1.
4. Create the tunnel interface with PE2 as the egress node on PE1 and specify the explicit
path; enable hot standby and configure the best-effort path; set the WTR time to 15 seconds.
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Create VLANs and VLANIF interfaces, and assign IP addresses to the VLANIF interfaces.
As shown in Figure 5-186, configure an IP address for each interface, create loopback interfaces
on the nodes, and then configure the IP addresses of the loopback interfaces as MPLS LSR IDs.
For detailed configuration, see the configuration files in this example.
Step 2 Configure an IGP.
Configure OSPF or IS-IS on each node to implement interworking between the nodes. In this
example, IS-IS is configured. For detailed configuration, see the configuration files in this
example.
Step 3 Configure basic MPLS functions.
On each node, enable MPLS TE and MPLS RSVP-TE in the MPLS view and in the view of the
physical interface. Set the maximum MPLS TE bandwidth and maximum reservable bandwidth
for each interface to 100 Mbit/s and 100 Mbit/s respectively. For detailed configuration, see the
configuration files in this example.
Step 4 Configure IS-IS TE and CSPF.
Configure IS-IS TE on each node and configure CSPF on PE1. For the configuration procedure,
see "Configuring an RSVP-TE Tunnel".
Step 5 Configure the explicit paths for the primary CR-LSP and the backup CR-LSP.
# Configure the explicit path for the primary CR-LSP on PE1.
<PE1> system-view
[PE1] explicit-path main
[PE1-explicit-path-main] next hop 10.4.1.2
[PE1-explicit-path-main] next hop 10.2.1.2
[PE1-explicit-path-main] next hop 3.3.3.3
[PE1-explicit-path-main] quit
# Configure hot standby on the tunnel interface, set the WTR time to 15 seconds, specify the
backup explicit path, and configure the best-effort path.
[PE1-Tunnel1/0/0] mpls te backup hot-standby wtr 15
[PE1-Tunnel1/0/0] mpls te path explicit-path backup secondary
[PE1-Tunnel1/0/0] mpls te backup ordinary best-effort
[PE1-Tunnel1/0/0] mpls te commit
[PE1-Tunnel1/0/0] quit
After the configuration, run the display mpls te tunnel-interface tunnel 1/0/0 command on
PE1, and you can find that the primary CR-LSP and the backup CR-LSP are established.
[PE1] display mpls te tunnel-interface tunnel 1/0/0
Tunnel Name : Tunnel1/0/0
Tunnel State Desc : Primary CR-LSP Up and HotBackup CR-LSP Up
Tunnel Attributes :
LSP ID : 4.4.4.4:2
Session ID : 100
Admin State : UP Oper State : UP
Ingress LSR ID : 4.4.4.4 Egress LSR ID: 3.3.3.3
Signaling Prot : RSVP Resv Style : SE
Class Type : CLASS 0 Tunnel BW : 10000 kbps
Reserved BW : 50000 kbps
Setup Priority : 7 Hold Priority: 7
Hop Limit : -
Secondary Hop Limit : -
BestEffort Hop Limit: -
Affinity Prop/Mask : 0x0/0x0
Explicit Path Name : -
Secondary Affinity Prop/Mask: 0x0/0x0
Secondary Explicit Path Name: -
BestEffort Affinity Prop/Mask: 0x0/0x0
Tie-Breaking Policy : None
Metric Type : None
Record Route : Enabled Record Label : Disabled
FRR Flag : Disabled BackUpBW Flag: Not Supported
BackUpBW Type : - BackUpBW : -
Route Pinning : Disabled
Reopt : Disabled Reopt Freq : -
Back Up Type : HotStandBy
Back Up LSPID : 4.4.4.4:32770
Auto BW : Disabled Auto BW Freq : -
Min BW : - Max BW : -
Current Collected BW: -
Interfaces Protected: -
Car Policy : Disabled
Tunnel Group : Primary
Primary Tunnel : -
Backup Tunnel : -
IPTN InLabel : -
Group Status : Up
Oam Status : Up
Bfd Capability : None
BestEffort : Enabled IsBestEffortPath: Non-existent
After installing the cable into GE 2/0/0, you can view that traffic is switched back to the primary
CR-LSP after 15 minutes.
If you remove the cable from GE 2/0/0 on PE1 or P1 and then remove the cable from GE 2/0/0
on PE2 and P2, the tunnel interface changes from Down to Up and traffic is switched to the best-
effort path.
[PE1] display mpls te tunnel-interface tunnel 1/0/0
Hop 7 10.2.1.2
Hop 8 3.3.3.3
----End
Configuration Files
l Configuration file of PE1
#
sysname PE1
#
vlan batch 30 40
#
mpls lsr-id 4.4.4.4
mpls
mpls te
mpls rsvp-te
mpls te cspf
#
explicit-path backup
next hop 10.3.1.2
next hop 10.5.1.2
next hop 3.3.3.3
#
explicit-path main
next hop 10.4.1.2
next hop 10.2.1.2
next hop 3.3.3.3
#
isis 1
cost-style wide
network-entity 10.0000.0000.0004.00
traffic-eng level-1-2
#
interface Vlanif30
ip address 10.3.1.1 255.255.255.0
isis enable 1
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
mpls rsvp-te
#
interface Vlanif40
ip address 10.4.1.1 255.255.255.0
isis enable 1
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 30
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 40
#
interface LoopBack1
ip address 4.4.4.4 255.255.255.255
isis enable 1
#
interface Tunnel1/0/0
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 3.3.3.3
#
vlan batch 10 30 50
#
mpls lsr-id 2.2.2.2
mpls
mpls te
mpls rsvp-te
#
isis 1
cost-style wide
network-entity 10.0000.0000.0002.00
traffic-eng level-1-2
#
interface Vlanif10
ip address 10.1.1.2 255.255.255.0
isis enable 1
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
mpls rsvp-te
#
interface Vlanif30
ip address 10.3.1.2 255.255.255.0
isis enable 1
mpls
mpls te
mpls rsvp-te
#
interface Vlanif50
ip address 10.5.1.1 255.255.255.0
isis enable 1
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 50
#
interface GigabitEthernet3/0/0
port link-type access
port default vlan 30
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
isis enable 1
#
return
l Configuration file of PE2
#
sysname PE2
#
vlan batch 20 50
#
mpls lsr-id 3.3.3.3
mpls
mpls te
mpls rsvp-te
#
isis 1
cost-style wide
network-entity 10.0000.0000.0003.00
traffic-eng level-1-2
#
interface Vlanif20
ip address 10.2.1.2 255.255.255.0
isis enable 1
mpls
mpls te
mpls rsvp-te
#
interface Vlanif50
ip address 10.5.1.2 255.255.255.0
isis enable 1
mpls
mpls te
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 20
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 50
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
isis enable 1
#
return
Networking Requirements
As shown in Figure 5-187, S9300-A, S9300-B, and S9300-C are configured with dual main
control boards. Three S9300s learn routes from each other through the IS-IS protocol, and then
use the RSVP protocol to set up a TE tunnel from S9300-A to S9300-C. RSVP GR is required
to ensure that MPLS forwarding is continuous when the switchover between the main control
board and the LPU occurs on S9300-A, S9300-B, or S9300-C.
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the IP addresses for the interfaces of the devices and the address of the loopback
interface that is used as the LSR ID.
2. Configure the IS-IS protocol to implement interworking and enable IS-IS TE.
3. Set the LSR ID.
4. Enable global MPLS, MPLS TE, and MPLS RSVP-TE.
5. Enable MPLS, MPLS TE, and MPLS RSVP-TE on each interface, and configure bandwidth
attributes of the MPLS TE link.
6. On the ingress node S9300-A, enable CSPF and create a tunnel interface, and specify the
IP address, tunneling protocol, destination IP address, tunnel ID, and dynamic signaling
protocol RSVP-TE.
7. Enable IS-IS GR on each node.
8. Enable RSVP GR on each node.
Data Preparation
To complete the configuration, you need the following data:
l IP address of each interface on each node
l IS-IS NET and IS-IS level that each node belongs to
l LSR ID of each node
l Bandwidth attributes of links along the tunnel
l Tunnel interface number of the ingress node, tunnel ID, and tunnel bandwidth
Procedure
Step 1 Create VLANs and VLANIF interfaces, and assign IP addresses to the VLANIF interfaces.
Configure IP addresses as shown in Figure 5-187 and create loopback interfaces on the nodes.
For detailed configuration, see the configuration files in this example.
Step 2 Configure basic IS-IS functions.
# Configure S9300-A.
[S9300-A] isis 1
[S9300-A-isis-1] network-entity 00.0005.0000.0000.0001.00
[S9300-A-isis-1] is-level level-2
[S9300-A-isis-1] quit
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] isis enable 1
[S9300-A-Vlanif10] quit
[S9300-A] interface loopback 1
[S9300-A-LoopBack1] isis enable 1
[S9300-A-LoopBack1] quit
# Configure S9300-B.
[S9300-B] isis 1
[S9300-B-isis-1] network-entity 00.0005.0000.0000.0002.00
[S9300-B-isis-1] is-level level-2
[S9300-B-isis-1] quit
[S9300-B] interface vlanif 10
[S9300-B-Vlanif10] isis enable 1
[S9300-B-Vlanif10] quit
[S9300-B] interface vlanif 20
[S9300-B-Vlanif20] isis enable 1
[S9300-B-Vlanif20] quit
[S9300-B] interface loopback 1
[S9300-B-LoopBack1] isis enable 1
[S9300-B-LoopBack1] quit
# Configure S9300-C.
[S9300-C] isis 1
[S9300-C-isis-1] network-entity 00.0005.0000.0000.0003.00
[S9300-C-isis-1] is-level level-2
[S9300-C-isis-1] quit
[S9300-C] interface vlanif 20
[S9300-C-Vlanif20] isis enable 1
[S9300-C-Vlanif20] quit
[S9300-C] interface loopback 1
[S9300-C-LoopBack1] isis enable 1
[S9300-C-LoopBack1] quit
After the configuration, run the display ip routing-table command on each node, and you can
view that the nodes learn the routes from each other.
Step 3 Configure basic MPLS functions, enable MPLS TE, RSVP-TE, and CSPF, and configure
bandwidth attributes of the link.
# Configure S9300-A.
[S9300-A] mpls lsr-id 1.1.1.1
[S9300-A] mpls
[S9300-A-mpls] mpls te
[S9300-A-mpls] mpls rsvp-te
[S9300-A-mpls] mpls te cspf
[S9300-A-mpls] quit
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] mpls
[S9300-A-Vlanif10] mpls te
[S9300-A-Vlanif10] mpls rsvp-te
[S9300-A-Vlanif10] mpls te max-link-bandwidth 100000
[S9300-A-Vlanif10] mpls te max-reservable-bandwidth 100000
[S9300-A-Vlanif10] quit
# Configure S9300-B.
[S9300-B] mpls lsr-id 2.2.2.2
[S9300-B] mpls
[S9300-B-mpls] mpls te
[S9300-B-mpls] mpls rsvp-te
[S9300-B-mpls] quit
[S9300-B] interface vlanif 10
[S9300-B-Vlanif10] mpls
[S9300-B-Vlanif10] mpls te
[S9300-B-Vlanif10] mpls rsvp-te
[S9300-B-Vlanif10] quit
[S9300-B] interface vlanif 20
[S9300-B-Vlanif20] mpls
[S9300-B-Vlanif20] mpls te
[S9300-B-Vlanif20] mpls rsvp-te
[S9300-B-Vlanif20] mpls te max-link-bandwidth 100000
[S9300-B-Vlanif20] mpls te max-reservable-bandwidth 100000
[S9300-B-Vlanif20] quit
# Configure S9300-C.
[S9300-C] mpls lsr-id 3.3.3.3
[S9300-C] mpls
[S9300-C-mpls] mpls te
[S9300-C-mpls] mpls rsvp-te
[S9300-C-mpls] quit
[S9300-C] interface vlanif 20
[S9300-C-Vlanif20] mpls
[S9300-C-Vlanif20] mpls te
[S9300-C-Vlanif20] mpls rsvp-te
[S9300-C-Vlanif20] quit
# Configure S9300-B.
[S9300-B] isis 1
[S9300-B-isis-1] cost-style wide
[S9300-B-isis-1] is-name S9300-B
[S9300-B-isis-1] traffic-eng level-2
[S9300-B-isis-1] graceful-restart
[S9300-B-isis-1] quit
# Configure S9300-C.
[S9300-C] isis 1
[S9300-C-isis-1] cost-style wide
[S9300-C-isis-1] is-name S9300-C
[S9300-C-isis-1] traffic-eng level-2
[S9300-C-isis-1] graceful-restart
[S9300-C-isis-1] quit
After the configuration, run the display interface tunnel command on S9300-A, and you can
view that the status of the tunnel interface is Up.
[S9300-A] display interface tunnel
Tunnel1/0/0 current state : UP
Line protocol current state : UP
Description : HUAWEI, Quidway Series, Tunnel1/0/0 Interface
The Maximum Transmit Unit is 1500 bytes
Internet Address is unnumbered, using address of LoopBack1(1.1.1.9/32)
Encapsulation is TUNNEL, loopback not set
Tunnel destination 3.3.3.3
Tunnel up/down statistics 1
Tunnel protocol/transport MPLS/MPLS, ILM is available,
300 seconds output rate 0 bits/sec, 0 packets/sec
0 packets output, 0 bits
0 output error
# Configure S9300-B.
[S9300-B] mpls
[S9300-B-mpls] mpls rsvp-te hello
[S9300-B-mpls] mpls rsvp-te hello full-gr
[S9300-B-mpls] quit
[S9300-B] interface vlanif 10
[S9300-B-Vlanif10] mpls rsvp-te hello
[S9300-B] interface vlanif 20
[S9300-B-Vlanif20] mpls rsvp-te hello
# Configure S9300-C.
[S9300-C] mpls
[S9300-C-mpls] mpls rsvp-te hello
[S9300-C-mpls] mpls rsvp-te hello full-gr
[S9300-C-mpls] quit
[S9300-C] interface vlanif 20
[S9300-C-Vlanif20] mpls rsvp-te hello
Run the display mpls rsvp-te graceful-restart peer command on S9300-B, and you can view
the GR status of the neighboring node.
[S9300-B] display mpls rsvp-te graceful-restart peer
Neighbor on Interface Vlanif10
Neighbor Addr: 10.1.1.1
SrcInstance: 47860 NbrSrcInstance: 49409
Neighbor Capability:
Can Do Self GR
Can Support GR
GR Status: Normal
Restart Time: 90060 Milli Second
Recovery Time: 0 Milli Second
Stored GR message number: 0
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10
#
mpls lsr-id 1.1.1.1
mpls
mpls te
mpls rsvp-te
mpls te cspf
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
mpls rsvp-te
mpls rsvp-te hello
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 20
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
isis enable 1
#
return
Networking Requirements
Figure 5-188 shows a network where CR-LSP hot standby is configured. A TE tunnel is
established between PE1 and PE2. The tunnel is enabled with hot standby and configured with
the best-effort path. If the primary CR-LSP fails, traffic is switched to the backup CR-LSP. After
the faulty primary CR-LSP is recovered, the traffic is switched back to the primary CR-LSP
after 15 seconds. If both the primary and backup CR-LSPs fail, traffic is switched to the best-
effort path.
You are required to create two static BFD sessions to detect the primary and backup CR-LSPs.
After the configuration, the following should be achieved:
l If the primary CR-LSP fails, traffic is rapidly switched to the backup CR-LSP.
l After the primary CR-LSP is recovered less than 15 seconds, traffic is switched back to the
primary CR-LSP if the backup CR-LSP fails.
GE2/0/0 GE2/0/0
Vlanif40 Vlanif50
10.4.1.1/24 10.5.1.2/24
GE1/0/0
GE1/0/0
PE1 Vlanif20 PE2
Vlanif30
10.2.1.2/24
10.3.1.1/24
Loopback1 Loopback1
4.4.4.4/32 3.3.3.3/32
: Primary path
: Backup path
: Best-effort path
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure CR-LSP hot standby according to Example for Configuring CR-LSP Hot
Standby.
2. On PE1, create two BFD sessions and bind the two sessions to the primary CR-LSP and
the backup CR-LSP; on PE2, create two BFD sessions and bind the two sessions to the IP
link (PE2 → PE1).
Data Preparation
To complete the configuration, you need the following data:
l BFD configuration name, local discriminator, and remote discriminator
l Minimum intervals for receiving and sending BFD packets
l Local detection multiplier of BFD
l For other data, see Example for Configuring CR-LSP Hot Standby.
Procedure
Step 1 Configure CR-LSP hot standby.
Configure the primary CR-LSP, backup CR-LSP, and best-effort path according to Example
for Configuring CR-LSP Hot Standby.
Step 2 Configure BFD for CR-LSPs.
# Create BFD sessions between PE1 and PE2 to detect faults on the primary CR-LSP and the
backup CR-LSP. Bind the BFD sessions on PE1 to the primary CR-LSP and the backup CR-
LSP respectively; bind the BFD session on PE2 to the IP link. Set the minimum intervals for
sending and receiving BFD packets to 100 milliseconds and the local detection multiplier of
BFD to 3.
# Configure PE1.
[PE1] bfd
[PE1-bfd] quit
[PE1] bfd mainlsptope2 bind mpls-te interface tunnel1/0/0 te-lsp
[PE1-bfd-lsp-session-mainlsptope2] discriminator local 413
[PE1-bfd-lsp-session-mainlsptope2] discriminator remote 314
[PE1-bfd-lsp-session-mainlsptope2] min-tx-interval 100
[PE1-bfd-lsp-session-mainlsptope2] min-rx-interval 100
[PE1-bfd-lsp-session-mainlsptope2] detect-multiplier 3
[PE1-bfd-lsp-session-mainlsptope2] process-pst
[PE1-bfd-lsp-session-mainlsptope2] commit
[PE1-bfd-lsp-session-mainlsptope2] quit
[PE1] bfd backuplsptope2 bind mpls-te interface tunnel1/0/0 te-lsp backup
[PE1-bfd-lsp-session-backuplsptope2] discriminator local 423
[PE1-bfd-lsp-session-backuplsptope2] discriminator remote 324
[PE1-bfd-lsp-session-backuplsptope2] min-tx-interval 100
[PE1-bfd-lsp-session-backuplsptope2] min-rx-interval 100
[PE1-bfd-lsp-session-backuplsptope2] detect-multiplier 3
[PE1-bfd-lsp-session-backuplsptope2] process-pst
[PE1-bfd-lsp-session-backuplsptope2] commit
[PE1-bfd-lsp-session-backuplsptope2] quit
Configure PE2.
[PE2] bfd
[PE2-bfd] quit
[PE2] bfd mainlsptope2 bind peer-ip 4.4.4.4
[PE2-bfd-lsp-session-mainlsptope2] discriminator local 314
[PE2-bfd-lsp-session-mainlsptope2] discriminator remote 413
[PE2-bfd-lsp-session-mainlsptope2] min-tx-interval 100
[PE2-bfd-lsp-session-mainlsptope2] min-rx-interval 100
[PE2-bfd-lsp-session-mainlsptope2] detect-multiplier 3
[PE2-bfd-lsp-session-mainlsptope2] commit
[PE2-bfd-lsp-session-mainlsptope2] quit
[PE2] bfd backuplsptope2 bind peer-ip 4.4.4.4
[PE2-bfd-lsp-session-backuplsptope2] discriminator local 324
[PE2-bfd-lsp-session-backuplsptope2] discriminator remote 423
[PE2-bfd-lsp-session-backuplsptope2] min-tx-interval 100
# After the configuration, run the display bfd session discriminator local-discriminator-
value command on PE1 and PE2, and you can find that the status of the BFD sessions is Up.
Take the display on PE1 as an example:
[PE1] display bfd session discriminator 413
--------------------------------------------------------------------------------
Local Remote PeerIpAddr InterfaceName State Type
--------------------------------------------------------------------------------
413 314 3.3.3.3 Tunnel1/0/0 Up S_TE_LSP
--------------------------------------------------------------------------------
----End
Configuration Files
l Configuration file of PE1
#
sysname PE1
#
vlan batch 30 40
#
bfd
#
mpls lsr-id 4.4.4.4
mpls
mpls te
mpls rsvp-te
mpls te cspf
#
explicit-path backup
next hop 10.3.1.2
next hop 10.5.1.2
next hop 3.3.3.3
#
explicit-path main
next hop 10.4.1.2
next hop 10.2.1.2
next hop 3.3.3.3
#
isis 1
cost-style wide
network-entity 10.0000.0000.0004.00
traffic-eng level-1-2
#
interface Vlanif30
isis 1
cost-style wide
network-entity 10.0000.0000.0001.00
traffic-eng level-1-2
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
isis enable 1
mpls
mpls te
mpls rsvp-te
#
interface Vlanif20
ip address 10.2.1.1 255.255.255.0
isis enable 1
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
mpls rsvp-te
#
interface Vlanif40
ip address 10.4.1.2 255.255.255.0
isis enable 1
mpls
mpls te
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 40
#
interface GigabitEthernet3/0/0
port link-type access
port default vlan 20
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
isis enable 1
#
return
l Configuration file of P2
#
sysname P2
#
vlan batch 10 30 50
#
mpls lsr-id 2.2.2.2
mpls
mpls te
mpls rsvp-te
#
isis 1
cost-style wide
network-entity 10.0000.0000.0002.00
traffic-eng level-1-2
#
interface Vlanif10
ip address 10.1.1.2 255.255.255.0
isis enable 1
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
mpls rsvp-te
#
interface Vlanif30
ip address 10.3.1.2 255.255.255.0
isis enable 1
mpls
mpls te
mpls rsvp-te
#
interface Vlanif50
ip address 10.5.1.1 255.255.255.0
isis enable 1
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 50
#
interface GigabitEthernet3/0/0
port link-type access
port default vlan 30
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
isis enable 1
#
return
l Configuration file of PE2
#
sysname PE2
#
vlan batch 20 50
#
bfd
#
mpls lsr-id 3.3.3.3
mpls
mpls te
mpls rsvp-te
#
isis 1
cost-style wide
network-entity 10.0000.0000.0003.00
traffic-eng level-1-2
#
interface Vlanif20
ip address 10.2.1.2 255.255.255.0
isis enable 1
mpls
mpls te
mpls rsvp-te
#
interface Vlanif50
ip address 10.5.1.2 255.255.255.0
isis enable 1
mpls
mpls te
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 20
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 50
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
isis enable 1
#
bfd backuplsptope2 bind peer-ip 4.4.4.4
discriminator local 324
discriminator remote 423
min-tx-interval 100
min-rx-interval 100
commit
#
bfd mainlsptope2 bind peer-ip 4.4.4.4
discriminator local 314
discriminator remote 413
min-tx-interval 100
min-rx-interval 100
commit
#
return
Networking Requirements
Figure 5-189 shows an MPLS network where PE and CE devices are S9300s. PE1 is configured
with VPN FRR and the MPLS TE tunnel. The primary path of VPN FRR is PE1 → PE2; the
backup path of VPN FRR is PE1 → PE3. Normally, VPN traffic is transmitted over the primary
path. If the primary path fails, VPN traffic switches to the backup path. You are required to
configure BFD for TE tunnels to detect faults on the TE tunnel over the primary path and enable
VPN to rapidly detect the faults. Thus, traffic can be switched between the primary path and
backup path in case of faults, and fault recovery is shortened.
Figure 5-189 Networking diagram for configuring static BFD for TE tunnels
Loopback1
2.2.2.2/32
/0/0
GE1 if10
Vla n
/24
.1.2
10.1
/0/0 l PE3
GE1 if10 nne
n dary t u
Vla /24 on
.1.1 Sec
CE1 PE1 10.1
CE2
GE2 Prim
/0 ary t
Vlan /0 unne
l
10.2. if20 PE2
1.1/2
4
Loopback1
GE2
1.1.1.1/32 /0
Vlan /0
10.2. if20
1.2/2
4
Loopback1
3.3.3.3/32
NOTE
For ease of description, the IP addresses of the interfaces connecting the PEs and the CEs are not described
in Figure 5-189.
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure basic MPLS functions, and establish bi-directional TE tunnels between PE1 and
PE2, and between PE1 and PE3.
2. Configure VPN FRR.
3. Enable global BFD on PE1, PE2, and PE3.
4. Configure a BFD session on PE1 to detect faults on the TE tunnel over the primary path.
5. Configure a BFD session on PE2 and PE3 and specify the TE tunnel as the BFD backward
tunnel.
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Create VLANs and VLANIF interfaces, and assign IP addresses to the VLANIF interfaces.
Configure an IP address for each interface according to the networking diagram, create loopback
interfaces on nodes, and then configure the IP addresses of the loopback interfaces as MPLS
LSR IDs. For detailed configuration, see the configuration files in this example.
Configure OSPF or IS-IS on each node to implement interworking between PE1 and PE2, and
between PE1 and PE3. OSPF is configured in this example. For detailed configuration, see the
configuration file of this example.
On each node, configure an LSR ID and enable MPLS in the system view and enable MPLS on
each physical interface. For detailed configuration, see the configuration files in this example.
# Configure PE2.
<PE2>system-view
[PE2] explicit-path tope1
[PE2-explicit-path-tope1] next hop 10.2.1.1
[PE2-explicit-path-tope1] next hop 1.1.1.1
[PE2-explicit-path-tope1] quit
# Configure PE3.
<PE3> system-view
[PE3] explicit-path tope1
[PE3-explicit-path-tope1] next hop 10.1.1.1
[PE3-explicit-path-tope1] next hop 1.1.1.1
[PE3-explicit-path-tope1] quit
# Create tunnel interfaces on PE1, PE2, and PE3, configure explicit paths, and set the bandwidth
to 10 Mbit/s. Bind the tunnel to the specified VPN. For PE1, two tunnel interfaces must be
created.
# Configure PE1.
[PE1] interface tunnel 2/0/0
[PE1-Tunnel2/0/0] ip address unnumbered interface loopback 1
[PE1-Tunnel2/0/0] tunnel-protocol mpls te
[PE1-Tunnel2/0/0] destination 3.3.3.3
[PE1-Tunnel2/0/0] mpls te tunnel-id 200
[PE1-Tunnel2/0/0] mpls te path explicit-path tope2
[PE1-Tunnel2/0/0] mpls te bandwidth bc0 10000
[PE1-Tunnel2/0/0] mpls te reserved-for-binding
[PE1-Tunnel2/0/0] mpls te commit
[PE1-Tunnel2/0/0] quit
[PE1] interface tunnel 1/0/0
[PE1-Tunnel1/0/0] ip address unnumbered interface loopback 1
[PE1-Tunnel1/0/0] tunnel-protocol mpls te
[PE1-Tunnel1/0/0] destination 2.2.2.2
[PE1-Tunnel1/0/0] mpls te tunnel-id 100
[PE1-Tunnel1/0/0] mpls te path explicit-path tope3
[PE1-Tunnel1/0/0] mpls te reserved-for-binding
# Configure PE2.
[PE2] interface tunnel 2/0/0
[PE2-Tunnel2/0/0] ip address unnumbered interface loopback 1
[PE2-Tunnel2/0/0] tunnel-protocol mpls te
[PE2-Tunnel2/0/0] destination 1.1.1.1
[PE2-Tunnel2/0/0] mpls te tunnel-id 200
[PE2-Tunnel2/0/0] mpls te path explicit-path tope1
[PE2-Tunnel2/0/0] mpls te bandwidth bc0 10000
[PE2-Tunnel2/0/0] mpls te reserved-for-binding
[PE2-Tunnel2/0/0] mpls te commit
[PE2-Tunnel2/0/0] quit
# Configure PE3.
[PE3] interface tunnel 1/0/0
[PE3-Tunnel1/0/0] ip address unnumbered interface loopback 1
[PE3-Tunnel1/0/0] tunnel-protocol mpls te
[PE3-Tunnel1/0/0] destination 1.1.1.1
[PE3-Tunnel1/0/0] mpls te tunnel-id 100
[PE3-Tunnel1/0/0] mpls te path explicit-path tope1
[PE3-Tunnel1/0/0] mpls te reserved-for-binding
[PE3-Tunnel1/0/0] mpls te commit
[PE3-Tunnel1/0/0] quit
# After the configuration, run the display mpls-te tunnel-interface tunnel interface-number
command on the PEs, and you can find that the status of Tunnel 1/0/0 and Tunnel 2/0/0 on PE1,
Tunnel 2/0/0 on PE2, and Tunnel 1/0/0 on PE3 is displayed as CR-LSP is Up.
Step 7 Configure VPN FRR.
# Create VPN instances on PE1, PE2, and PE3 respectively. Set all VPN instance names to
vpn1, RDs to 100:1, 100:2, and 100:3 respectively, and all RTs to 100:1. Connect the CEs to
the PEs. The configuration details are not mentioned here.
# Establish MP IBGP peer relations between PE1 and PE2, and between PE1 and PE3. The BGP
AS number of PE1, PE2, and PE3 are 100. The loopback interface Loopback1 on PE1, PE2, and
PE3 is used as the interface for creating BGP sessions. The configuration details are not
mentioned here.
# Configure tunnel policies for PE1, PE2, and PE3 and bind the policies to the VPN instances.
# Configure PE1.
[PE1] tunnel-policy policy1
[PE1-tunnel-policy-policy1] tunnel binding destination 3.3.3.3 te tunnel 2/0/0
[PE1-tunnel-policy-policy1] tunnel binding destination 2.2.2.2 te tunnel 1/0/0
[PE1-tunnel-policy-policy1] quit
[PE1] ip vpn-instance vpn1
[PE1-ip-vpn-instance-vpn1] tnl-policy policy1
[PE1-ip-vpn-instance-vpn1] quit
# Configure PE2.
[PE2] tunnel-policy policy1
[PE2-tunnel-policy-policy1] tunnel binding destination 1.1.1.1 te tunnel 2/0/0
[PE2-tunnel-policy-policy1] quit
[PE2] ip vpn-instance vpn1
[PE2-ip-vpn-instance-vpn1] tnl-policy policy1
[PE2-ip-vpn-instance-vpn1] quit
# Configure PE3.
[PE3] tunnel-policy policy1
[PE3-tunnel-policy-policy1] tunnel binding destination 1.1.1.1 te tunnel 1/0/0
[PE3-tunnel-policy-policy1] quit
[PE3] ip vpn-instance vpn1
[PE3-ip-vpn-instance-vpn1] tnl-policy policy1
[PE3-ip-vpn-instance-vpn1] quit
# After the configuration, the CEs can communicate, and traffic flows through PE1 and PE2.
After the cable of any interface connecting PE1 and PE2 is removed, or Switch fails, or PE2
fails, VPN traffic is switched to the backup path PE1 → PE3. Time taken in fault recovery is
close to the IGP convergence time.
# Configure a BFD session on PE1 to detect faults on the TE tunnel over the primary path. Set
the minimum intervals for sending and receiving BFD packets and the local detection multiplier
of BFD.
[PE1] bfd
[PE1-bfd] quit
[PE1] bfd test bind mpls-te interface tunnel2/0/0
[PE1-bfd-lsp-session-test] discriminator local 12
[PE1-bfd-lsp-session-test] discriminator remote 21
[PE1-bfd-lsp-session-test] min-tx-interval 100
[PE1-bfd-lsp-session-test] min-rx-interval 100
[PE1-bfd-lsp-session-test] detect-multiplier 3
[PE1-bfd-lsp-session-test] process-pst
[PE1-bfd-lsp-session-test] commit
# Configure a BFD session on PE2 and specify the TE tunnel as the backward tunnel. Set the
minimum intervals for sending and receiving BFD packets and the local detection multiplier of
BFD.
[PE2] bfd
[PE2-bfd] quit
[PE2] bfd test bind mpls-te interface tunnel2/0/0
[PE2-bfd-lsp-session-test] discriminator local 21
[PE2-bfd-lsp-session-test] discriminator remote 12
[PE2-bfd-lsp-session-test] min-tx-interval 100
[PE2-bfd-lsp-session-test] min-rx-interval 100
[PE2-bfd-lsp-session-test] detect-multiplier 3
[PE2-bfd-lsp-session-test] commit
# After the configuration, run the display bfd session { all | discriminator discr-value | mpls-
te | [ slot slot-id ] [ verbose ] command on PE1 and PE2, and you can view that the status of the
BFD sessions is Up.
Connect two interfaces, namely, Port 1 and Port 2 on a tester, to CE1 and CE2 respectively. Send
traffic from Port 1 to Port 2, and you can find that a fault can be recovered at the millisecond
level when the cable of any interface between PE1 and PE2 is removed.
----End
Configuration Files
NOTE
The configuration files of CE1 and CE2 are not mentioned here. The configurations related to the CE
accessing the PE are also not mentioned.
l Configuration file of PE1
#
sysname PE1
#
vlan batch 10 20
#
ip vpn-instance vpn1
route-distinguisher 100:1
vpn frr route-policy vpn_frr_rp
tnl-policy policy1
vpn-target 100:1 export-extcommunity
vpn-target 100:1 import-extcommunity
#
bfd
#
mpls lsr-id 1.1.1.1
mpls
mpls te
mpls rsvp-te
mpls te cspf
#
explicit-path tope2
next hop 10.2.1.2
next hop 3.3.3.3
#
explicit-path tope3
next hop 10.1.1.2
next hop 2.2.2.2
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
mpls rsvp-te
#
interface Vlanif20
ip address 10.2.1.1 255.255.255.0
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 20
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
interface Tunnel1/0/0
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 2.2.2.2
mpls te tunnel-id 100
mpls te bandwidth bc0 10000
commit
#
return
l Configuration file of PE3
#
sysname PE3
#
vlan batch 10
#
ip vpn-instance vpn1
route-distinguisher 100:3
tnl-policy policy1
vpn-target 100:1 export-extcommunity
vpn-target 100:1 import-extcommunity
#
mpls lsr-id 2.2.2.2
mpls
mpls te
mpls rsvp-te
mpls te cspf
#
explicit-path tope1
next hop 10.1.1.1
next hop 1.1.1.1
#
interface Vlanif10
ip address 10.1.1.2 255.255.255.0
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
interface Tunnel1/0/0
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 1.1.1.1
mpls te tunnel-id 100
mpls te path explicit-path tope1
mpls te reserved-for-binding
mpls te commit
#
bgp 100
peer 1.1.1.1 as-number 100
peer 1.1.1.1 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 1.1.1.1 enable
#
ipv4-family vpnv4
policy vpn-target
peer 1.1.1.1 enable
#
ipv4-family vpn-instance vpn1
import-route direct
#
ospf 1
opaque-capability enable
area 0.0.0.0
network 10.1.1.0 0.0.0.3
network 2.2.2.2 0.0.0.0
mpls-te enable
#
tunnel-policy policy1
tunnel binding destination 1.1.1.1 te Tunnel1/0/0
#
return
Networking Requirements
Figure 5-190 shows a network where CR-LSP hot standby is configured. A TE tunnel is
established between PE1 and PE2. The tunnel is enabled with hot standby and configured with
the best-effort path. If the primary CR-LSP fails, traffic is switched to the backup CR-LSP. After
the faulty primary CR-LSP is recovered, the traffic is switched back to the primary CR-LSP
after 15 seconds. If both the primary and backup CR-LSPs fail, traffic is switched to the best-
effort path.
You are required to configure dynamic BFD for CR-LSPs to detect faults on the primary and
backup CR-LSPs. After the configuration, the following should be achieved:
l If the primary CR-LSP fails, traffic is rapidly switched to the backup CR-LSP.
l After the primary CR-LSP is recovered in less than 15 seconds, traffic is switched back to
the primary CR-LSP if the backup CR-LSP fails.
GE2/0/0 GE2/0/0
Vlanif40 Vlanif50
10.4.1.1/24 10.5.1.2/24
GE1/0/0
GE1/0/0
PE1 Vlanif20 PE2
Vlanif30
10.2.1.2/24
10.3.1.1/24
Loopback1 Loopback1
4.4.4.4/32 3.3.3.3/32
: Primary path
: Backup path
: Best-effort path
NOTE
Compared with static BFD, dynamic BFD is configured easier. In addition, by using dynamic BFD, the
number of BFD sessions to be created is reduced. That is, the number of BFD packets transmitted on a
network is reduced and less network resources is thus occupied. This is because only one BFD session is
created on a tunnel interface when you use dynamic BFD.
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure CR-LSP hot standby according to Example for Configuring CR-LSP Hot
Standby.
2. Enable BFD on the ingress node of the tunnel; configure MPLS TE BFD; set the minimum
intervals for sending and receiving BFD packets and the local detection multiplier of BFD.
3. Enable the capability of passively creating BFD sessions on the egress node.
Data Preparation
To complete the configuration, you need the following data:
l Minimum intervals for sending and receiving BFD packets on the ingress node (The default
values are specified in the license.)
l Local detection multiplier of BFD on the ingress node (The default value is specified in
the license.)
l For other data, see Example for Configuring CR-LSP Hot Standby.
Procedure
Step 1 Configure CR-LSP hot standby.
Configure the primary CR-LSP, backup CR-LSP, and best-effort path according to Example
for Configuring CR-LSP Hot Standby.
Step 2 Enable BFD on the ingress node of the tunnel and configure MPLS TE BFD.
# Enable MPLS TE BFD on the tunnel interface on PE1. Set the minimum intervals for sending
and receiving BFD packets to 100 milliseconds and the local detection multiplier of BFD to 3.
<PE1> system-view
[PE1] bfd
[PE1-bfd] quit
[PE1] interface tunnel 1/0/0
[PE1-Tunnel1/0/0] mpls te bfd enable
[PE1-Tunenl1/0/0] mpls te bfd min-tx-interval 100 min-rx-interval 100 detect-
multiplier 3
[PE1-Tunenl1/0/0] mpls te commit
Step 3 Enable the capability of passively creating BFD sessions on the egress node of the tunnel.
<PE2> system-view
[PE2] bfd
[PE2-bfd] mpls-passive
[PE2-bfd] quit
# After the configuration, run the display bfd session discriminator local-discriminator-
value command on PE1 and PE2, and you can find that the status of the BFD sessions is Up.
[PE1] display bfd se mpls-te interface Tunnel 1/0/0 te-lsp
--------------------------------------------------------------------------------
----End
Configuration Files
l Configuration file of PE1
#
sysname PE1
#
vlan batch 30 40
#
bfd
#
mpls lsr-id 4.4.4.4
mpls
mpls te
mpls rsvp-te
mpls te cspf
#
explicit-path backup
next hop 10.3.1.2
next hop 10.5.1.2
next hop 3.3.3.3
#
explicit-path main
next hop 10.4.1.2
next hop 10.2.1.2
next hop 3.3.3.3
#
isis 1
cost-style wide
network-entity 10.0000.0000.0004.00
traffic-eng level-1-2
#
interface Vlanif30
ip address 10.3.1.1 255.255.255.0
isis enable 1
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
mpls rsvp-te
#
interface Vlanif40
ip address 10.4.1.1 255.255.255.252
isis enable 1
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
mpls rsvp-te
#
interface GigabitEthernet1/0/0
interface GigabitEthernet2/0/0
port link-type access
port default vlan 40
#
interface GigabitEthernet3/0/0
port link-type access
port default vlan 20
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
isis enable 1
#
return
l Configuration file of P2
#
sysname P2
#
vlan batch 10 30 50
#
mpls lsr-id 2.2.2.2
mpls
mpls te
mpls rsvp-te
#
isis 1
cost-style wide
network-entity 10.0000.0000.0002.00
traffic-eng level-1-2
#
interface Vlanif10
ip address 10.1.1.2 255.255.255.0
isis enable 1
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
mpls rsvp-te
#
interface Vlanif30
ip address 10.3.1.2 255.255.255.0
isis enable 1
mpls
mpls te
mpls rsvp-te
#
interface Vlanif50
ip address 10.5.1.1 255.255.255.0
isis enable 1
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 50
#
interface GigabitEthernet3/0/0
port link-type access
port default vlan 30
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
isis enable 1
#
return
Networking Requirements
Figure 5-191 shows an MPLS network where P and PE devices are S9300s. An MPLS TE tunnel
is established between PE1 and PE2. TE FRR with P1 as the PLR and PE1 as the MP is
configured. The primary CR-LSP is PE1 → P1 → Switch → P2 → PE2; the backup CR-LSP
is P1 → P3 → PE2. In addition, each node is configured with RSVP GR.
P1 cannot determine whether a fault occurs on the link or its neighbor is performing RSVP GR;
therefore, P1 cannot determine whether to perform TE FRR switchover in either of the following
situations:
By default, the interval for sending Hello packets of RSVP is 3 seconds; the interval for declaring
that a neighbor is Down is three times as long as the interval for sending Hello packets. That is,
a node can detect a fault on an RSVP neighbor at the second level. BFD, however, can detect a
fault at the millisecond level.
If BFD for RSVP is used on the network, P1 can rapidly detect the fault and perform TE FRR
after the link between P1 and P2 fails.
Figure 5-191 Networking diagram for configuring dynamic BFD for RSVP
Loopback1
4.4.4.4/32
GE
1/ 0
/0 Vla 2/0/0
GE nif30 24 n
10. if50
Vla 3.1.2/ 5. 1
.1/2
10. 4
GE
/0 P3 Vla 2/0/0
Loopback1 3/ 0
1.1.1.1/32 GE nif30 24 10. nif50
/ 5. 1
GE1/0/0 Vla 3.1.1 .2/2
10. 4
Vlanif10
10.1.1.1/24 P1 PE2
GE2
GE1/0/0 Vlan /0/0 /0
PE1 1/ 0
Vlanif10 10.2 if20 P2 GE nif40 24
10.1.1.2/24 .1.1
/24 GE2 /0 Vla 4.1.2/
Loopback1 1/ 0 10.
Vlan /0/0 GE nif40 Loopback1
2.2.2.2/32 10.2 if2 4
.1.2 0 Vla .1.1/2 5.5.5.5/32
/24 .4
10
Loopback1
3.3.3.3/32
: Primary CR-LSP
: Bypass CR-LSP
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure an IP address for each interface and enable an IGP on each node to implement
interworking. Enable IGP GR. To support RSVP GR, IGP GR needs to be configured.
2. Configure basic MPLS and MPLS TE functions.
3. Configure explicit paths for the primary CR-LSP and the backup CR-LSP.
4. Create a TE primary tunnel interface and enable TE FRR on PE1, and configure the bypass
tunnel on P1.
5. Configure RSVP GR on all LSRs and establish Hello sessions between P1 and PE2.
NOTE
On a network where TE FRR is configured, you need to create a Hello session between a PLR and
an MP of the bypass tunnel if you want to configure RSVP GR. Otherwise, after traffic is switched
to the bypass tunnel because the primary tunnel fails, the primary tunnel turns Down if the PLR or
MP performs RSVP GR.
Data Preparation
To complete the configuration, you need the following data:
l Type of an IGP and data required for configuring an IGP
l MPLS LSR ID
l Bandwidth attributes of the outgoing interfaces of the links along the tunnel
l Primary tunnel interface number, bandwidth occupied by the primary tunnel, and explicit
path
l Bypass tunnel interface number, bandwidth occupied by the bypass tunnel, and explicit
path
l Interfaces to be protected by the bypass tunnel
l Minimum intervals for sending and receiving BFD packets (The default values are specified
in the license.)
l Local detection multiplier of BFD (The default value is specified in the license.)
Procedure
Step 1 Create VLANs and VLANIF interfaces, and assign IP addresses to the VLANIF interfaces.
Configure an IP address for each interface according to the networking diagram, create loopback
interfaces on nodes, and then configure the IP addresses of the loopback interfaces as MPLS
LSR IDs. For detailed configuration, see the configuration files in this example.
Step 2 Configure an IGP and IGP GR.
Configure OSPF or IS-IS on each node to implement interworking between nodes and configure
IGP GR to support RSVP GR. In this example, OSPF is used. For detailed configuration, see
the configuration files in this example.
Step 3 Configure basic MPLS functions.
On each node, configure an LSR ID and enable MPLS in the system view and enable MPLS on
each physical interface. For detailed configuration, see the configuration files in this example.
Step 4 Configure basic MPLS TE functions.
On each node, enable MPLS TE and MPLS RSVP-TE in the MPLS view and in the view of the
physical interface. Set the maximum bandwidth and the maximum reservable bandwidth of the
link on each outgoing interface along the tunnel to 100 Mbit/s. For detailed configuration, see
the configuration files in this example.
Step 5 Configure OSPF TE and CSPF.
Configure OSPF TE on each node and CSPF on PE1 and P1. For the configuration procedure,
see Example for Configuring an RSVP-TE Tunnel.
Step 6 Configure the primary tunnel.
# Configure an explicit path for the primary tunnel on PE1.
<PE1> system-view
[PE1] explicit-path tope2
[PE1-explicit-path-tope2] next hop 10.1.1.2
# Create a tunnel interface on PE1, specify an explicit path, set the tunnel bandwidth to 10 Mbit/
s, and enable TE FRR.
[PE1] interface tunnel 1/0/0
[PE1-Tunnel1/0/0] ip address unnumbered interface loopback 1
[PE1-Tunnel1/0/0] tunnel-protocol mpls te
[PE1-Tunnel1/0/0] destination 5.5.5.5
[PE1-Tunnel1/0/0] mpls te tunnel-id 100
[PE1-Tunnel1/0/0] mpls te path explicit-path tope2
[PE1-Tunnel1/0/0] mpls te fast-reroute
[PE1-Tunnel1/0/0] mpls te commit
[PE1-Tunnel1/0/0] quit
# After the configuration, run the display mpls-te tunnel-interface tunnel interface-number
command on PE1, and you can find that the status of Tunnel 1/0/0 on PE1 is displayed as CR-
LSP is Up.
Step 7 Configure the bypass tunnel.
# Configure the explicit path for the bypass tunnel on P1.
<P1> system-view
[P1] explicit-path tope2
[P1-explicit-path-tope2] next hop 10.3.1.2
[P1-explicit-path-tope2] next hop 10.5.1.2
[P1-explicit-path-tope2] next hop 5.5.5.5
[P1-explicit-path-tope2] quit
# Configure the tunnel interface of the bypass tunnel on P1. Specify an explicit path for the
bypass tunne1, set the tunnel bandwidth to 20 Mbit/s and the protected bandwidth to 10 Mbit/
s, and specify the physical interface to be protected by the bypass tunnel.
[P1] interface tunnel 3/0/0
[P1-Tunnel3/0/0] ip address unnumbered interface loopback 1
[P1-Tunnel3/0/0] tunnel-protocol mpls te
[P1-Tunnel3/0/0] destination 5.5.5.5
[P1-Tunnel3/0/0] mpls te tunnel-id 300
[P1-Tunnel3/0/0] mpls te path explicit-path tope2
[P1-Tunnel3/0/0] mpls te bandwidth bc0 20000
[P1-Tunnel3/0/0] mpls te bypass-tunnel bandwidth bc0 10000
[P1-Tunnel3/0/0] mpls te protected-interface vlanif 20
[P1-Tunnel3/0/0] mpls te commit
[P1-Tunnel3/0/0] quit
Step 8 Configure RSVP GR on all LSRs and establish Hello sessions between P1 and PE2.
# Configure PE1.
[PE1] mpls
[PE1-mpls] mpls rsvp-te hello
[PE1-mpls] mpls rsvp-te hello full-gr
[PE1-mpls] quit
[PE1] interface vlanif 10
[PE1-Vlanif10] mpls rsvp-te hello
# Configure P1.
[P1] mpls
[P1-mpls] mpls rsvp-te hello
[P1-mpls] mpls rsvp-te hello full-gr
[P1-mpls] mpls rsvp-te hello nodeid-session 5.5.5.5
[P1-mpls] quit
[P1] interface vlanif 10
# Configure P2.
[P2] mpls
[P2-mpls] mpls rsvp-te hello
[P2-mpls] mpls rsvp-te hello full-gr
[P2-mpls] quit
[P2] vlanif 40
[P2-Vlanif40] mpls rsvp-te hello
[P2-Vlanif40] quit
[P2] interface vlanif 20
[P2-Vlanif20] mpls rsvp-te hello
[P2-Vlanif20] quit
# Configure P3.
[P3] mpls
[P3-mpls] mpls rsvp-te hello
[P3-mpls] mpls rsvp-te hello full-gr
[P3-mpls] quit
[P3] interface vlanif 30
[P3-Vlanif30] mpls rsvp-te hello
[P3-Vlanif30] quit
[P3] interface vlanif 50
[P3-Vlanif50] mpls rsvp-te hello
[P3-Vlanif50] quit
# Configure PE2.
[PE2] mpls
[PE2-mpls] mpls rsvp-te hello
[PE2-mpls] mpls rsvp-te hello full-gr
[PE2-mpls] mpls rsvp-te hello nodeid-session 2.2.2.2
[PE2-mpls] quit
[PE2] interface vlanif 40
[PE2-Vlanif40] mpls rsvp-te hello
[PE2-Vlanif40] quit
[PE2] interface vlanif 50
[PE2-Vlanif50] mpls rsvp-te hello
[PE2-Vlanif50] quit
# Configure P2.
[P2] bfd
[P2-bfd] quit
[P2] interface vlanif 20
# After the configuration, run the display mpls rsvp-te bfd session { all | interface interface-
name | peer ip-addr } command on PE1 and PE2, and you can view that the status of the BFD
sessions is Up.
Step 10 Verify the configuration.
Connect two interfaces, namely, Port 1 and Port 2 on a tester, to PE1 and PE2 respectively. On
Port 1, send MPLS traffic to Port 2. After the cable of any interface on P1 and P2 is removed,
you can find that the fault recovers at the millisecond level.
----End
Configuration Files
l Configuration file of PE1
#
sysname PE1
#
vlan batch 10
#
mpls lsr-id 1.1.1.1
mpls
mpls te
mpls rsvp-te
mpls rsvp-te hello
mpls rsvp-te hello full-gr
mpls te cspf
#
explicit-path tope2
next hop 10.1.1.2
next hop 10.2.1.2
next hop 10.4.1.2
next hop 5.5.5.5
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
mpls rsvp-te
mpls rsvp-te hello
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
interface Tunnel1/0/0
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 5.5.5.5
mpls te tunnel-id 100
mpls te bandwidth bc0 10000
mpls te path explicit-path tope2
mpls te fast-reroute
mpls te commit
#
ospf 1
opaque-capability enable
graceful-restart
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 1.1.1.1 0.0.0.0
mpls-te enable
#
return
l Configuration file of P1
#
sysname P1
#
vlan batch 10 20 30
#
bfd
#
mpls lsr-id 2.2.2.2
mpls
mpls te
mpls rsvp-te
mpls rsvp-te hello
mpls rsvp-te hello full-gr
mpls rsvp-te hello nodeid-session 5.5.5.5
mpls te cspf
#
explicit-path tope2
next hop 10.3.1.2
next hop 10.5.1.2
next hop 5.5.5.5
#
interface Vlanif10
ip address 10.1.1.2 255.255.255.0
mpls
mpls te
mpls rsvp-te
mpls rsvp-te hello
#
interface Vlanif20
ip address 10.2.1.1 255.255.255.0
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
mpls rsvp-te
mpls rsvp-te hello
mpls rsvp-te bfd enable
mpls rsvp-te bfd min-tx-interval 100 min-rx-interval 100 detect-multiplier 3
#
interface Vlanif30
ip address 10.3.1.1 255.255.255.0
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
mpls rsvp-te
mpls rsvp-te hello
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 20
#
interface GigabitEthernet3/0/0
port link-type access
port default vlan 30
#
interface LoopBack1
opaque-capability enable
graceful-restart
area 0.0.0.0
network 10.2.1.0 0.0.0.255
network 10.4.1.0 0.0.0.255
network 3.3.3.3 0.0.0.0
mpls-te enable
#
return
l Configuration file of P3
#
sysname P3
#
vlan batch 30 50
#
mpls lsr-id 4.4.4.4
mpls
mpls te
mpls rsvp-te
mpls rsvp-te hello
mpls rsvp-te hello full-gr
#
interface Vlanif30
ip address 10.3.1.2 255.255.255.0
mpls
mpls te
mpls rsvp-te
mpls rsvp-te hello
#
interface Vlanif50
ip address 10.5.1.1 255.255.255.0
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 100000
mpls rsvp-te
mpls rsvp-te hello
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 30
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 50
#
interface LoopBack1
ip address 4.4.4.4 255.255.255.255
#
ospf 1
opaque-capability enable
graceful-restart
area 0.0.0.0
network 10.3.1.0 0.0.0.255
network 10.5.1.0 0.0.0.255
network 4.4.4.4 0.0.0.0
mpls-te enable
#
return
l Configuration file of PE2
#
sysname PE2
#
mpls lsr-id 5.5.5.5
mpls
mpls te
mpls rsvp-te
mpls rsvp-te hello
Networking Requirements
As shown in Figure 5-192, LDP is run between S9300-A and S9300-B, and between S9300-D
and S9300-E. LDP is not run between S9300-B and S9300-C, and S9300-D. An RSVP tunnel
is configured on S9300-B, with S9300-D as its egress node. On S9300-D, an RSVP tunnel is
configured, with the egress node as S9300-B. It is required that the traffic between S9300-A and
S9300-E should pass through the tunnel.
S9300-A S9300-E
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the IP addresses for the interfaces of the nodes and the addresses of the loopback
interfaces that are used as the LSR IDs, and configure an IGP.
2. Enable OSPF TE or IS-IS TE in the area that TE can be used and create the MPLS TE
tunnel.
3. Enable MPLS LDP in the area that TE cannot be used and configure the LDP remote peer
on the border of TE.
4. Configure forwarding adjacency of TE.
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Create VLANs and VLANIF interfaces, and assign IP addresses to the VLANIF interfaces.
As shown in Figure 5-192, configure IP addresses and masks for the interfaces, including
loopback interfaces. The configuration details are not mentioned here.
Step 2 Configure IS-IS on all the nodes to advertise the host routes of the LSR IDs.
The configuration procedure is not mentioned here. For details, see the configuration files in
this example.
Step 3 Configure basic MPLS functions, enable LDP between S9300-A and S9300-B, and between
S9300-D and S9300-E, and enable RSVP between S9300-B, S9300-C, and S9300-D.
# Configure S9300-A.
[S9300-A] mpls lsr-id 1.1.1.1
[S9300-A] mpls
[S9300-A-mpls] lsp-trigger all
[S9300-A-mpls] quit
[S9300-A] mpls ldp
[S9300-A-mpls-ldp] quit
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] mpls
[S9300-A-Vlanif10] mpls ldp
[S9300-A-Vlanif10] quit
# Configure S9300-B.
[S9300-B] mpls lsr-id 2.2.2.2
[S9300-B] mpls
[S9300-B-mpls] lsp-trigger all
[S9300-B-mpls] mpls te
[S9300-B-mpls] mpls rsvp-te
[S9300-B-mpls] mpls te cspf
[S9300-B-mpls] quit
[S9300-B] mpls ldp
[S9300-B-mpls-ldp] quit
[S9300-B] interface vlanif 10
[S9300-B-Vlanif10] mpls
[S9300-B-Vlanif10] mpls ldp
[S9300-B-Vlanif10] quit
[S9300-B] interface vlanif 20
[S9300-B-Vlanif20] mpls
[S9300-B-Vlanif20] mpls te
[S9300-B-Vlanif20] mpls rsvp-te
[S9300-B-Vlanif20] quit
# Configure S9300-C.
[S9300-C] mpls lsr-id 3.3.3.3
[S9300-C] mpls
[S9300-C-mpls] lsp-trigger all
[S9300-C-mpls] mpls te
[S9300-C-mpls] mpls rsvp-te
[S9300-C-mpls] quit
[S9300-C] interface vlanif 20
[S9300-C-Vlanif20] mpls
[S9300-C-Vlanif20] mpls te
[S9300-C-Vlanif20] mpls rsvp-te
[S9300-C-Vlanif20] quit
[S9300-C] interface vlanif 30
[S9300-C-Vlanif30] mpls
[S9300-C-Vlanif30] mpls te
[S9300-C-Vlanif30] mpls rsvp-te
[S9300-C-Vlanif30] quit
# Configure S9300-D.
[S9300-D] mpls lsr-id 4.4.4.4
[S9300-D] mpls
[S9300-D-mpls] lsp-trigger all
[S9300-D-mpls] mpls te
[S9300-D-mpls] mpls rsvp-te
[S9300-D-mpls] mpls te cspf
[S9300-D-mpls] quit
[S9300-D] mpls ldp
[S9300-D-mpls-ldp] quit
[S9300-D] interface vlanif 30
[S9300-D-Vlanif30] mpls
[S9300-D-Vlanif30] mpls te
[S9300-D-Vlanif30] mpls rsvp-te
[S9300-D-Vlanif30] quit
[S9300-D] interface vlanif 40
[S9300-D-Vlanif40] mpls
[S9300-D-Vlanif40] mpls ldp
[S9300-D-Vlanif40] quit
# Configure S9300-E.
[S9300-E] mpls lsr-id 5.5.5.5
[S9300-E] mpls
[S9300-E-mpls] lsp-trigger all
[S9300-E-mpls] quit
[S9300-E] mpls ldp
[S9300-E-mpls-ldp] quit
[S9300-E] interface vlanif 40
[S9300-E-Vlanif40] mpls
[S9300-E-Vlanif40] mpls ldp
[S9300-E-Vlanif40] quit
After the configuration, the local LDP sessions between S9300-A and S9300-B, and between
S9300-D and S9300-E are established.
Run the display mpls ldp session command on S9300-A, S9300-B, S9300-D, and S9300-E,
and you can view the establishment of LDP sessions.
Run the display mpls ldp peer command, and you can view whether LDP sessions are set up.
Run the display mpls ldp command, and you can view information about the LDP LSP and that
the RSVP LSP is not set up. Take the display on S9300-A as an example:
[S9300-A] display mpls ldp session
LDP Session(s) in Public Network
---------------------------------------------------------------------
Peer-ID Status LAM SsnRole SsnAge KA-Sent/Rcv
----------------------------------------------------------------------
2.2.2.2:0 Operational DU Passive 000:00:00 1/1
-----------------------------------------------------------------------
TOTAL: 1 Session(s) Found.
LAM : Label Advertisement Mode SsnAge Unit : DDD:HH:MM
Step 4 Configure the LDP remote session between S9300-B and S9300-D.
# Configure S9300-B.
[S9300-B] mpls ldp remote-peer S9300-D
[S9300-B-mpls-ldp-remote-S9300-D] remote-ip 4.4.4.4
[S9300-B-mpls-ldp-remote-S9300-D] quit
# Configure S9300-D.
[S9300-D] mpls ldp remote-peer S9300-B
[S9300-D-mpls-ldp-remote-S9300-B] remote-ip 2.2.2.2
[S9300-D-mpls-ldp-remote-S9300-B] quit
After the configuration, run the display mpls ldp remote-peer command on S9300-B and
S9300-D, and you can view that the remote session is set up successfully between S9300-B and
S9300-D. Take the display on S9300-B as an example:
[S9300-B] display mpls ldp remote-peer
LDP Remote Entity Information
------------------------------------------------------------------------
Remote Peer Name: S9300-D
Remote Peer IP: 4.4.4.4 LDP ID: 2.2.2.2:0
Transport Address: 2.2.2.2 Entity Status: Active
Configured Keepalive Timer: 45 Sec Configured Hello Timer: 45 Sec
Negotiated Hello Timer: 45 Sec Hello Packet sent/received: 19/16
Step 5 Configure the bandwidth attributes for the outgoing interfaces of links along the TE tunnel.
# Configure S9300-B.
[S9300-B] interface vlanif 20
[S9300-B-Vlanif20] mpls te max-link-bandwidth 20000
[S9300-B-Vlanif20] mpls te max-reservable-bandwidth 20000
# Configure S9300-C.
[S9300-C] interface vlanif 20
[S9300-C-Vlanif20] mpls te max-link-bandwidth 20000
[S9300-C-Vlanif20] mpls te max-reservable-bandwidth 20000
[S9300-C] interface vlanif 30
[S9300-C-Vlanif30] mpls te max-link-bandwidth 20000
[S9300-C-Vlanif30] mpls te max-reservable-bandwidth 20000
[S9300-C-Pos2/0/0] quit
# Configure S9300-D.
[S9300-D] interface vlanif 30
[S9300-D-Vlanif30] mpls te max-link-bandwidth 20000
[S9300-D-Vlanif30] mpls te max-reservable-bandwidth 20000
[S9300-D-Vlanif30] quit
Run the display ip routing-table command on S9300-B, and you can view that the outgoing
interface destined for S9300-D and S9300-E is a tunnel interface.
[S9300-B] display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 13 Routes : 13
Destination/Mask Proto Pre Cost Flags NextHop Interface
# Run the display mpls lsp command on S9300-B, S9300-C, and S9300-D, and you can view
that the RSVP LSP is set up between them. Take the display on S9300-B as an example:
[S9300-B] display mpls lsp
-------------------------------------------------------------------------
LSP Information: RSVP LSP
-------------------------------------------------------------------------
FEC In/Out Label In/Out IF Vrf Name
4.4.4.4/32 NULL/1024 -/Vlanif30
2.2.2.2/32 3/NULL Vlanif30/-
-------------------------------------------------------------------------
LSP Information: LDP LSP
-------------------------------------------------------------------------
FEC In/Out Label In/Out IF Vrf Name
2.2.2.2/32 3/NULL -/-
20.1.1.0/24 3/NULL -/-
3.3.3.3/32 1024/NULL -/-
1.1.1.1/32 NULL/3 -/Vlanif20
1.1.1.1/32 1028/3 -/Vlanif20
4.4.4.4/32 NULL/3 -/Tun1/0/0
4.4.4.4/32 1025/3 -/Tun1/0/0
5.5.5.5/32 NULL/1029 -/Tun1/0/0
5.5.5.5/32 1026/1029 -/Tun1/0/0
30.1.1.0/24 NULL/3 -/Tun1/0/0
30.1.1.0/24 1027/3 -/Tun1/0/0
# Check the routing table of S9300-A and you can view that the cost in the routing table changes
after forwarding adjacency is configured.
[S9300-A] display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 12 Routes : 12
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
2.2.2.2/32 ISIS 15 10 D 10.1.1.2 Vlanif10
3.3.3.3/32 ISIS 15 20 D 10.1.1.2 Vlanif10
4.4.4.4/32 ISIS 15 11 D 10.1.1.2 Vlanif10
5.5.5.5/32 ISIS 15 21 D 10.1.1.2 Vlanif10
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
20.1.1.0/24 ISIS 15 20 D 10.1.1.2 Vlanif10
30.1.1.0/24 ISIS 15 21 D 10.1.1.2 Vlanif10
10.1.1.0/24 Direct 0 0 D 10.1.1.1 Vlanif10
10.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
40.1.1.0/24 ISIS 15 21 D 10.1.1.2 Vlanif10
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10
#
mpls lsr-id 1.1.1.1
mpls
lsp-trigger all
#
mpls ldp
#
isis 1
is-level level-2
cost-style wide
network-entity 86.1111.1111.1111.00
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
isis enable 1
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface LoopBack1
#
sysname S9300-C
#
vlan batch 20 30
#
mpls lsr-id 3.3.3.3
mpls
mpls te
mpls rsvp-te
#
isis 1
is-level level-2
cost-style wide
network-entity 86.3333.3333.3333.00
traffic-eng level-2
#
interface Vlanif20
ip address 20.1.1.2 255.255.255.0
isis enable 1
mpls
mpls te
mpls te max-link-bandwidth 20000
mpls te max-reservable-bandwidth 20000
mpls rsvp-te
#
interface Vlanif30
ip address 30.1.1.1 255.255.255.0
isis enable 1
mpls
mpls te
mpls te max-link-bandwidth 20000
mpls te max-reservable-bandwidth 20000
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 20
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 30
#
interface LoopBack1
#
ip address 3.3.3.3 255.255.255.255
isis enable 1
#
return
l Configuration file of S9300-D
#
sysname S9300-D
#
vlan batch 30 40
#
mpls lsr-id 4.4.4.4
mpls
mpls te
lsp-trigger all
mpls rsvp-te
mpls te cspf
#
mpls ldp
#
mpls ldp remote-peer S9300-B
remote-ip 2.2.2.2
#
isis 1
is-level level-2
cost-style wide
network-entity 86.4444.4444.4444.00
traffic-eng level-2
#
interface Vlanif30
ip address 30.1.1.1 255.255.255.0
isis enable 1
mpls
mpls te
mpls te max-link-bandwidth 20000
mpls te max-reservable-bandwidth 20000
mpls rsvp-te
#
interface Vlanif40
ip address 40.1.1.2 255.255.255.0
isis enable 1
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 30
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 40
#
interface LoopBack1
ip address 4.4.4.4 255.255.255.255
isis enable 1
#
interface Tunnel1/0/0
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 2.2.2.2
mpls te tunnel-id 100
mpls te bandwidth bc0 10000
mpls te igp advertise
mpls te igp metric absolute 1
mpls te commit
isis enable 1
#
return
l Configuration file of S9300-E
#
sysname S9300-E
#
vlan batch 40
#
mpls lsr-id 5.5.5.5
mpls
lsp-trigger all
#
mpls ldp
#
isis 1
is-level level-2
cost-style wide
network-entity 86.5555.5555.5555.00
#
interface Vlanif40
ip address 40.1.1.2 255.255.255.0
isis enable 1
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 40
#
interface LoopBack1
ip address 5.5.5.5 255.255.255.255
isis enable 1
#
return
Networking Requirements
As shown in Figure 5-193, there are four nodes on the MPLS backbone network: PE1, PE2, P1
and P2. The path PE1 → P1 → PE2 is the primary LSP and the path PE1 → P2 → PE2 is the
backup LSP. P to PE devices are the S9300s.
Configure LDP FRR and PBR on PE1 so that the packets sent from PE1 to PE2 are forwarded
through the backup LSP that is generated by LDP FRR.
Figure 5-193 Networking diagram for configuring PBR to an LSP for public network packets
Loopback1
2.2.2.9/32 G
E
/0 Vla 2/0/0
E1 /0 0 17 nif20
G nif1 /24 2.2
GE
.1 .
/ 0 / 0 Vla 1.1.2 1/2 Vla 1/0/0
1 2. 4
Loopback1 GE nif10 17 P1 17 nif
2.2 20 Loopback1
4
1.1.1.9/32 Vla 1.1/2 .1 .
2/2 3.3.3.9/32
.
2.1 4
17
MPLS backbone
GE 0
PE1 lan 2/0/0
V 0/
17 E 2/ f40 PE2
2.3 if30 G ani /24
.1 . P2 Vl .1.2
1/2
4 GE 0 2.4
1
17 Vlan /0/0 /0 / 0 4 17
2 4 2
2.3 if3
.1 . 0 GE anif 1.1/
2/2 l
V 2.4.
4
17
Loopback1
4.4.4.9/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs and add interfaces to the VLANs, and create VLANIF interfaces.
2. Establish two or more LSPs on the PE where PBR to an LSP is configured.
3. Create the policy and node on the PE where PBR to an LSP is configured, set the matching
rule of IP packets in the policy-based-route view, and specify the LSP for filtering public
network packets that meet the matching rule.
4. Enable local PBR on the PEs.
Data Preparation
To complete the configuration, you need the following data:
l IP address of each interface on each node shown in Figure 5-193, OSPF process ID, and
OSPF area ID
l Name of the policy, mode of the policy, and number of the node
l Destination address of the backup LSP generated by LDP FRR
Procedure
Step 1 Configure basic MPLS functions and establish the LSP.
For details on the application of PBR to an LSP and LDP FRR and LDP FRR configuration, see
MPLS Basic Configuration.
In this example, the default policy for triggering the establishment of LSPs is used. Run the
display mpls lsp command on PE1, and you can view the two LSPs to PE2 and the backup LSP
passing through P2.
[PE1] display mpls lsp
----------------------------------------------------------------------
LSP Information: LDP LSP
----------------------------------------------------------------------
FEC In/Out Label In/Out IF Vrf Name
1.1.1.9/32 3/NULL -/-
2.2.2.9/32 NULL/3 -/Vlanif10
2.2.2.9/32 1024/3 -/Vlanif10
3.3.3.9/32 NULL/1025 -/Vlanif10
**LDP FRR** /1025 /Vlanif30
4.4.4.9/32 NULL/1026 -/Vlanif10
**LDP FRR** /3 /Vlanif30
4.4.4.9/32 1025/1026 -/Vlanif10
**LDP FRR** /3 /Vlanif30
3.3.3.9/32 1026/1025 -/Vlanif10
**LDP FRR** /1025 /Vlanif30
To verify the configuration, perform the traceroute operation between PE1 and PE2 before PBR
to an LSP is configured.
[PE1] tracert 172.2.1.2
traceroute to 172.2.1.2(172.2.1.2) 30 hops max,40 bytes packet
1 172.1.1.2 2 ms 1 ms 1 ms
2 172.2.1.2 3 ms 3 ms 3 ms
The preceding information indicates that the packets are routed according to the routing table.
Step 2 Configure an ACL on PE1 to permit the packets destined for VLANIF 10 on PE2 to pass through.
----End
Configuration Files
l Configuration file of PE1
#
sysname PE1
#
vlan batch 10 30
#
ip local policy-based-route policy1
#
mpls lsr-id 1.1.1.9
mpls
#
mpls ldp
#
acl number 3000
rule 5 permit ip destination 172.2.1.2 0
#
interface Vlanif10
ip address 172.1.1.1 255.255.255.0
mpls
mpls ldp
mpls ldp frr nexthop 172.3.1.2
#
interface Vlanif30
ip address 172.3.1.1 255.255.255.0
ospf cost 2500
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 30
#
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 1.1.1.9 0.0.0.0
network 172.3.1.0 0.0.0.255
network 172.1.1.0 0.0.0.255
#
policy-based-route policy1 permit node 10
if-match acl 3000
apply lsp public 3.3.3.9 secondary
#
return
l Configuration file of P1
#
sysname P1
#
vlan batch 10 20
#
mpls lsr-id 2.2.2.9
mpls
#
mpls ldp
#
interface Vlanif10
ip address 172.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif20
ip address 172.2.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 20
#
interface LoopBack1
ip address 2.2.2.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.9 0.0.0.0
network 172.1.1.0 0.0.0.255
network 172.2.1.0 0.0.0.255
#
return
l Configuration file of PE2
#
sysname PE2
#
vlan batch 20 40
#
mpls lsr-id 3.3.3.9
mpls
#
mpls ldp
#
interface Vlanif20
ip address 172.2.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif40
ip address 172.4.1.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 20
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 40
#
interface LoopBack1
ip address 3.3.3.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 3.3.3.9 0.0.0.0
network 172.2.1.0 0.0.0.255
network 172.4.1.0 0.0.0.255
#
return
l Configuration file of P2
#
sysname P2
#
vlan batch 30 40
#
mpls lsr-id 4.4.4.9
mpls
#
mpls ldp
#
interface Vlanif30
ip address 172.3.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif40
ip address 172.4.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 30
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 40
#
interface LoopBack1
ip address 4.4.4.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 4.4.4.9 0.0.0.0
network 172.3.1.0 0.0.0.255
network 172.4.1.0 0.0.0.255
#
return
Example for Configuring MPLS OAM to Detect the Connectivity of the Static LSP
Networking Requirements
On an MPLS network shown in Figure 5-194, a static LSP is set up along S9300-A → S9300-
B → S9300-C.
It is required that MPLS OAM be used to detect the connectivity of the static LSP. Egress node
PE2 can notify the defect to the ingress node PE1 when a connectivity defect occurs.
Figure 5-194 Networking diagram for configuring basic MPLS OAM functions
Loopback1
4.4.4.4/32
GE1/0/0
GE2/0/0
Vlanif10
Vlanif40
10.1.1.2/24
10.1.4.1/24
S9300-D
Tunnel 1/0/0
Tunnel-id 100
Configuration Roadmap
The configuration roadmap is as follows:
1. Create a TE tunnel that is based on the static LSP between S9300-A and S9300-C.
2. Create a static CR-LSP along S9300-C → S9300-D → S9300-A as the backward tunnel to
notify the ingress node of the defect.
3. Set OAM parameters on ingress node S9300-A and enable MPLS OAM.
4. Set OAM parameters on egress node S9300-C and enable the MPLS OAM auto protocol.
Data Preparation
To complete the configuration, you need the following data:
l IP address of the interface on each node, name of each tunnel interface, and tunnel ID
l Type of detection packets
l Mode of the backward tunnel
Procedure
Step 1 Create VLANs and VLANIF interfaces, and assign IP addresses to the VLANIF interfaces, and
configure routing protocols for the VLANIF interfaces.
Configure IP addresses and masks for the interfaces including loopback interfaces according to
Figure 5-194.
Configure OSPF on all the nodes and advertise the routes on the loopback interfaces. The
configuration details are not mentioned here.
After the configuration, LSRs can ping each other. Run the display ip routing-table command
on each LSR, and you can view the routing entries to the LSRs.
Take the display on PE1 as an example:
<S9300-A> display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 14 Routes : 15
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack1
2.2.2.2/32 OSPF 10 2 D 10.1.2.2 Vlanif20
3.3.3.3/32 OSPF 10 3 D 10.1.1.2 Vlanif10
OSPF 10 3 D 10.1.2.2 Vlanif20
4.4.4.4/32 OSPF 10 2 D 10.1.1.2 Vlanif10
10.1.1.0/24 Direct 0 0 D 10.1.1.1 Vlanif10
10.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack1
10.1.1.2/32 Direct 0 0 D 10.1.1.2 Vlanif10
10.1.2.0/24 Direct 0 0 D 10.1.2.1 Vlanif20
10.1.2.1/32 Direct 0 0 D 127.0.0.1 InLoopBack1
10.1.2.2/32 Direct 0 0 D 10.1.2.2 Vlanif20
10.1.3.0/24 OSPF 10 2 D 10.1.2.2 Vlanif20
10.1.4.0/24 OSPF 10 2 D 10.1.1.2 Vlanif10
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack1
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack1
The configurations on S9300-B, S9300-C, and S9300-D are similar to the configuration on
S9300-A, and are not mentioned here.
# On S9300-A, configure a static LSP (MPLS TE tunnel) destined for S9300-C.
<S9300-A> system-view
[S9300-A] interface tunnel 2/0/0
[S9300-A-tunnel2/0/0] ip address unnumbered interface loopback 1
[S9300-A-tunnel2/0/0] tunnel-protocol mpls te
[S9300-A-tunnel2/0/0] destination 3.3.3.3
[S9300-A-tunnel2/0/0] mpls te tunnel-id 200
# Configure S9300-A as the ingress node of the static LSP and use the TE tunnel.
[S9300-A] static-lsp ingress tunnel-interface tunnel 2/0/0 destination 3.3.3.3
nexthop 10.1.2.2 out-label 20
# Configure S9300-C as the egress node of the static LSP and specify lsr-id and tunnel-id.
<S9300-C> system-view
[S9300-C] static-lsp egress oamlsp incoming-interface vlanif 30 in-label 30 lsrid
1.1.1.1 tunnel-id 200
After the configuration, run the display mpls te tunnel-interface command on S9300-A. You
can view that the TE tunnel is Up and uses the static signaling protocol. Note the following
information:
<S9300-A> display mpls te tunnel-interface
tunnel Name : tunnel2/0/0
tunnel State Desc : CR-LSP is Up
tunnel Attributes :
LSP ID : 1.1.1.1:1
Session ID : 200
Admin State : UP Oper State : UP
Ingress LSR ID : 1.1.1.1 Egress LSR ID: 3.3.3.3
Signaling Prot : STATIC
Run the display mpls static-lsp command on S9300-A, and you can view that the static LSP
corresponding to Tunnel 2/0/0 is Up.
<S9300-A> display mpls static-lsp
TOTAL : 1 STATIC LSP(S)
UP : 1 STATIC LSP(S)
DOWN : 0 STATIC LSP(S)
Name FEC I/O Label I/O If Stat
tunnel2/0/0 3.3.3.3/32 NULL/20 -/Vlanif20 Up
# Configure S9300-A as the egress node of the static LSP and specify lsr-id and tunnel-id.
<S9300-A> system-view
[S9300-A] static-cr-lsp egress tunnel1/0/0 incoming-interface vlanif 10 in-label 80
lsrid 3.3.3.3 tunnel-id 100
After the configuration, run the display mpls te tunnel-interface command on S9300-C. You
can view that the backward TE tunnel is Up. Note the following information:
<S9300-C> display mpls te tunnel-interface
tunnel Name : tunnel1/0/0
tunnel State Desc : CR-LSP is Up
tunnel Attributes :
LSP ID : 3.3.3.3:1
Session ID : 100
Admin State : UP Oper State : UP
Ingress LSR ID : 3.3.3.3 Egress LSR ID: 1.1.1.1
Signaling Prot : STATIC-CR
Run the display mpls static-cr-lsp command on S9300-C, and you can view that the static CR-
LSP is Up.
<S9300-C> display mpls static-cr-lsp
TOTAL : 1 STATIC CRLSP(S)
UP : 1 STATIC CRLSP(S)
DOWN : 0 STATIC CRLSP(S)
Name FEC I/O Label I/O If Stat
tunnel1/0/0 1.1.1.1/32 NULL/70 -/Vlanif40 Up
# Enable the MPLS OAM auto protocol on the egress node. Detect the LSP named oamlsp. The
backward LSP that is configured on tunnel 0/0/1 is in private mode.
[S9300-C] mpls oam egress lsp-name oamlsp auto-protocol backward-lsp tunnel 1/0/0
private
After the MPLS OAM auto protocol is configured on the egress node, the egress node starts
OAM when receiving the first correct detection packet.
After the previous configuration, check the MPLS OAM parameters and status of the LSP on
ingress node S9300-A and on egress node S9300-C. You can view that the ingress and egress
nodes are in normal detection state and no defects occur.
<S9300-A> display mpls oam ingress all verbose
-------------------------------------------------------------------------
Verbose information about the NO.1 oam at the ingress
-------------------------------------------------------------------------
lsp basic information: oam basic information:
----------------------------------- -----------------------------------
tunnel-name : tunnel2/0/0 Oam-Index : 256
Lsp signal status : Up Oam select board : 1
Lsp establish type : Static lsp Enable-state : Manual enable
Lsp ingress lsr-id : 1.1.1.1 Ttsi/lsr-id : 1.1.1.1
Lsp tnl-id/Lsp-id : 200/1 Ttsi/tunnel-id : 200
oam detect information: oam backward information:
----------------------------------- -----------------------------------
Type : CV Share attribute : Private
Frequency : 1 s Lsp-name : tunnel1/0/0
Detect-state : Start Lsp ingress lsr-id : 3.3.3.3
Defect-state : Non-defect Lsp tnl-id/lsp id : 100/1
Available-state : Available Lsp-inLabel : 80
Unavailable time (s): 0 Lsp signal status : Up
-------------------------------------------------------------------------
Total Oam Num: 1
Total Start Oam Num: 1
Total Defect Oam Num: 0
Total Unavaliable Oam Num: 0
# Run the display mpls oam egress all verbose command on S9300-C, and you can view that
S9300-C detects the defect with the status as dLocv.
<S9300-C> display mpls oam egress all verbose
-------------------------------------------------------------------------
Verbose information about the NO.1 oam at the egress
-------------------------------------------------------------------------
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10 20
#
mpls lsr-id 1.1.1.1
mpls
mpls te
mpls oam
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
mpls
mpls te
#
interface Vlanif20
ip address 10.1.2.1 255.255.255.0
mpls
mpls te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 20
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
interface tunnel2/0/0
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 3.3.3.3
mpls te signal-protocol static
mpls te tunnel-id 200
mpls te commit
#
ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.1.2.0 0.0.0.255
#
mpls
mpls te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 40
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 30
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
#
interface tunnel1/0/0
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 1.1.1.1
mpls te signal-protocol cr-static
mpls te tunnel-id 100
mpls te commit
#
ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 10.1.3.0 0.0.0.255
network 10.1.4.0 0.0.0.255
#
static-lsp egress oam lsp incoming-interface vlanif30 in-label 30 lsrid
1.1.1.1 tunnel-id 200
static-cr-lsp ingress tunnel1/0/0 destination 1.1.1.1 nexthop 10.1.4.1 out-
label 70 bandwidth bc0 0
#
mpls oam egress lsp-name oamlsp backward-lsp tunnel1/0/0 private
#
return
l Configuration file of S9300-D
#
sysname S9300-D
#
vlan batch 10 40
#
mpls lsr-id 4.4.4.4
mpls
mpls te
#
interface Vlanif10
ip address 10.1.1.2 255.255.255.0
mpls
mpls te
#
interface Vlanif40
ip address 10.1.4.1 255.255.255.0
mpls
mpls te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 40
#
interface LoopBack1
ip address 4.4.4.4 255.255.255.255
#
ospf 1
area 0.0.0.0
Networking Requirements
On an MPLS network shown in Figure 5-195, there are three bidirectional LSPs bound to three
tunnel interfaces, namely, Tunnel 1/0/10, Tunnel 1/0/11, and Tunnel 1/0/12, from PE1 to PE2.
Tunnel 1/0/10 and Tunnel 1/0/11 function as working tunnels; Tunnel 1/0/12 functions as the
protection tunnel.
It is required that MPLS OAM protection switching be configured. Tunnel 1/0/12 protects
Tunnel 1/0/10 and Tunnel 1/0/11. When one of the working tunnels fails, the traffic on the faulty
working tunnel is switched to the protection tunnel.
NOTE
P to PE devices are the S9300s.
Configuration Roadmap
The configuration roadmap is as follows:
1. Create VLANs and VLANIF interfaces on the nodes, assign IP addresses to the VLANIF
interfaces, and configure OSPF on the VLANIF interfaces.
2. Enable MPLS, MPLS TE, and MPLS OAM on the nodes.
3. Create three TE tunnel interfaces, that is, Tunnel 1/0/10, Tunnel 1/0/11, and Tunnel 1/0/12,
on PE1 and PE2, two of which function as working tunnels and the third one functions as
the protection tunnel.
4. Configure two static CR-LSPs on PE1 and bind the two static CR-LSPs to Tunnel1/0/10
and Tunnel1/0/12 respectively.
5. On PE1, configure an RSVP-TE tunnel to PE2.
6. On PE2, configure three static CR-LSP as the backward LSPs to PE1 and bind the three
static CR-LSPs to Tunnel 1/0/10, Tunnel 1/0/11, and Tunnel 1/0/12 respectively.
7. Set MPLS OAM parameters and enable MPLS OAM to detect bidirectional LSPs.
Data Preparation
To complete the configuration, you need the following data:
l IP address of the interface on each node, name of the tunnel interface, and tunnel ID
l Type of MPLS OAM detection packets
l Parameters of the protection group including delay in protection switching, revertive mode,
and WTR time
Procedure
Step 1 Create VLANs and VLANIF interfaces on the nodes, assign IP addresses to the VLANIF
interfaces, and configure OSPF on the VLANIF interfaces.
Configure IP addresses and masks for the interfaces, including loopback interfaces.
Configure OSPF on all the nodes and advertise the routes on the loopback interfaces. The
configuration details are not mentioned here. For details on the interfaces and IP addresses of
the nodes, see Figure 5-195.
After the configuration, LSRs can ping each other. Run the display ip routing-table command
on each LSR, and you can view the routing entries to the LSRs.
Step 2 Enable MPLS and MPLS TE globally and on the physical interfaces.
The configuration details are not mentioned here.
Step 3 Configure tunnel interfaces.
# On PE1 and PE2, configure Tunnel 1/0/10 and Tunnel 1/0/11 as working tunnels and Tunnel
1/0/12 as the protection tunnel. Tunnel 1/0/12 protects both Tunnel 1/0/10 and Tunnel 1/0/11.
RSVP-TE is used on Tunnel1/0/11 and cr-static is used on Tunnel 1/0/10 and Tunnel 1/0/11.
# Configure PE1.
<PE1> system-view
[PE1] interface tunnel1/0/10
[PE1-Tunnel1/0/10] description Working tunnel-1 to PE2
[PE1-Tunnel1/0/10] ip address unnumbered interface loopback 1
[PE1-Tunnel1/0/10] tunnel-protocol mpls te
[PE1-Tunnel1/0/10] destination 5.5.5.5
[PE1-Tunnel1/0/10] mpls te signal-protocol cr-static
[PE1-Tunnel1/0/10] mpls te tunnel-id 1010
[PE1-Tunnel1/0/10] mpls te commit
[PE1-Tunnel1/0/10] quit
[PE1] interface tunnel1/0/11
[PE1-Tunnel1/0/11] description Working tunnel-2 to PE2
[PE1-Tunnel1/0/11] ip address unnumbered interface loopback 1
[PE1-Tunnel1/0/11] tunnel-protocol mpls te
[PE1-Tunnel1/0/11] destination 5.5.5.5
[PE1-Tunnel1/0/11] mpls te signal-protocol rsvp-te
[PE1-Tunnel1/0/11] mpls te tunnel-id 1011
[PE1-Tunnel1/0/11] mpls te commit
[PE1-Tunnel1/0/11] quit
[PE1] interface tunnel1/0/12
[PE1-Tunnel1/0/12] description Protection tunnel to PE2
[PE1-Tunnel1/0/12] ip address unnumbered interface loopback 1
[PE1-Tunnel1/0/12] tunnel-protocol mpls te
[PE1-Tunnel1/0/12] destination 5.5.5.5
[PE1-Tunnel1/0/12] mpls te signal-protocol cr-static
[PE1-Tunnel1/0/12] mpls te tunnel-id 1012
[PE1-Tunnel1/0/12] mpls te commit
[PE1-Tunnel1/0/12] quit
# Configure PE2.
<PE2> system-view
[PE2] interface tunnel1/0/10
Step 4 Configure two static CR-LSPs from PE1 to PE2, and bind them to the tunnel interfaces on PE1.
# Configure PE1.
[PE1] static-cr-lsp ingress Tunnel1/0/10 destination 5.5.5.5 nexthop 10.1.2.2 out-
label 19
[PE1] static-cr-lsp ingress Tunnel1/0/12 destination 5.5.5.5 nexthop 10.1.4.2 out-
label 30
# Configure P1.
<P1> system-view
[P1] static-cr-lsp transit PE1toPE2-2 incoming-interface vlanif 20 in-label 19
nexthop 10.1.7.1 out-label 21
# Configure P3.
<P3> system-view
[P3] static-cr-lsp transit PE1toPE2-3 incoming-interface vlanif 40 in-label 30
nexthop 10.1.6.1 out-label 31
# Configure PE2.
<PE2> system-view
[PE2] static-cr-lsp egress PE1toPE2-2 incoming-interface vlanif 70 in-label 21
lsrid 1.1.1.1 tunnel-id 1010
[PE2] static-cr-lsp egress PE1toPE2-3 incoming-interface vlanif 60 in-label 31
lsrid 1.1.1.1 tunnel-id 1012
After the configuration, run the display mpls te tunnel command on PE1 and PE2, and you can
view the created TE tunnel.
Take the display on PE1 as an example.
[PE1] display mpls te tunnel
LSP-Id Destination In/Out-If
1.1.1.1:1012:1 5.5.5.5 -/Vlanif40
1.1.1.1:1010:1 5.5.5.5 -/Vlanif20
[PE1] mpls
[PE1-mpls] mpls rsvp-te
[PE1-mpls] mpls te cspf
[PE1-mpls] quit
[PE1] interface vlanif 30
[PE1-Vlanif30] mpls rsvp-te
[PE1-Vlanif30] quit
[PE1] ospf 1
[PE1-ospf-1] opaque-capability enable
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] mpls-te enable
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
# Configure P1.
[P1] mpls
[P1-mpls] mpls rsvp-te
[P1-mpls] mpls te cspf
[P1-mpls] quit
[P1] interface vlanif 30
[P1-Vlanif30] mpls rsvp-te
[P1-Vlanif30] quit
[P1] interface vlanif 80
[P1-Vlanif80] mpls rsvp-te
[P1-Vlanif80] quit
[P1] ospf 1
[P1-ospf-1] opaque-capability enable
[P1-ospf-1] area 0
[P1-ospf-1-area-0.0.0.0] mpls-te enable
[P1-ospf-1-area-0.0.0.0] quit
[P1-ospf-1] quit
# Configure PE2.
[PE2] mpls
[PE2-mpls] mpls rsvp-te
[PE2-mpls] mpls te cspf
[PE2-mpls] quit
[PE2] interface vlanif 80
[PE2-Vlanif80] mpls rsvp-te
[PE2-Vlanif80] quit
[PE2] ospf 1
[PE2-ospf-1] opaque-capability enable
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] mpls-te enable
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
Run the display mpls te tunnel-interface tunnel1/0/11 command on PE1, and you can view
information about Tunnel1/0/11.
[PE1] display mpls te tunnel-interface tunnel1/0/11
Tunnel Name : Tunnel1/0/11
Tunnel State Desc : CR-LSP is Up
Tunnel Attributes :
LSP ID : 1.1.1.1:0
Session ID : 1011
Admin State : UP Oper State : UP
Ingress LSR ID : 1.1.1.1 Egress LSR ID: 5.5.5.5
Signaling Prot : RSVP Resv Style : SE
NOTE
The display mpls te tunnel-interface tunnel1/0/11 command displays the information that needs to be
noted. Information marked in "..." is omitted.
Step 6 Configure three static CR-LSPs from PE2 to PE1, and bind them to the tunnel interfaces.
# Configure PE2.
# Configure P1.
[P1] static-cr-lsp transit PE2toPE1-2 incoming-interface vlanif 70 in-label 21
nexthop 10.1.2.1 out-label 19
[P1] static-cr-lsp transit PE2toPE1-1 incoming-interface vlanif30 in-label 21
nexthop 10.1.3.1 out-label 20
# Configure P2.
<P2> system-view
[P2] static-cr-lsp transit PE2toPE1-3 incoming-interface vlanif 50 in-label 31
nexthop 10.1.1.1 out-label 30
# Configure PE1.
[PE1] static-cr-lsp egress PE2toPE1-2 incoming-interface vlanif 20 in-label 19
lsrid 1.1.1.1 tunnel-id 1010
[PE1] static-cr-lsp egress PE2toPE1-1 incoming-interface vlanif30 in-label 20 lsrid
1.1.1.1 tunnel-id 1011
[PE1] static-cr-lsp egress PE2toPE1-3 incoming-interface vlanif10 in-label 30 lsrid
1.1.1.1 tunnel-id 1012
Step 7 Enable MPLS OAM and configure MPLS OAM to detect the LSP.
# Configure PE1.
[PE1] mpls
[PE1-mpls] mpls oam
[PE1-mpls] quit
[PE1] mpls oam ingress Tunnel1/0/10
[PE1] mpls oam ingress Tunnel1/0/11
[PE1] mpls oam ingress Tunnel1/0/12
[PE1] mpls oam ingress enable all
[PE1] mpls oam egress lsp-name PE2toPE1-1
[PE1] mpls oam egress lsp-name PE2toPE1-2
[PE1] mpls oam egress lsp-name PE2toPE1-3
[PE1] mpls oam egress enable all
# Configure PE2.
[PE2] mpls
[PE2-mpls] mpls oam
[PE2-mpls] quit
[PE2] mpls oam ingress Tunnel1/0/10
[PE2] mpls oam ingress Tunnel1/0/11
[PE2] mpls oam ingress Tunnel1/0/12
[PE2] mpls oam ingress enable all
[PE2] mpls oam egress lsr-id 1.1.1.1 tunnel-id 1011
[PE2] mpls oam egress lsp-name PE1toPE2-2
[PE2] mpls oam egress lsp-name PE1toPE2-3
[PE2] mpls oam egress enable all
# After the configuration, run the display mpls oam ingress all verbose command to check the
MPLS OAM parameters and the status of the LSP, and you can view that the detected LSP is in
Non-defect state.
Take the display on PE1 as an example.
[PE1] display mpls oam ingress all verbose
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
# After this step, run the display mpls te protection tunnel all commands on PE devices, and
you can view that all tunnels are in Non-defect state and the working tunnels forward traffic.
Take the display on PE1 as an example.
[PE1] display mpls te protection tunnel all
------------------------------------------------------------------------
No. Work-tunnel status /id Protect-tunnel status /id Switch-Result
------------------------------------------------------------------------
1 non-defect /1010 non-defect /1012 work-tunnel
2 non-defect /1011 non-defect /1012 work-tunnel
# Run the display mpls te protection binding protect-tunnel commands on PE devices, and
you can view that Tunnel 1/0/12 protects Tunnel 1/0/10 and Tunnel 1/0/10.
Take the display on PE1 as an example.
[PE1] display mpls te protection binding protect-tunnel 12
------------------------------------------------------------------------
Binding information of( tunnel id: 1012 )
------------------------------------------------------------------------
Protect-tunnel id :1012
Protect-tunnel name :Tunnel1/0/12
Maximum number of bound work-tunnels :8
Currently bound work-tunnels :Total( 2 )
:Tunnel1/0/10
:Tunnel1/0/11
WTR : 120s
Mode : revertive
# Run the mpls te protect-switch manual work-lsp command on Tunnel 1/0/10 of PE1 to
manually trigger protection switching.
[PE1] interface tunnel1/0/10
[PE1] mpls te protect-switch manual work-lsp
# Run the display mpls te protection tunnel all command on PE1, and you can view that the
"Switch-Result" field on Tunnel 1/0/10 is displayed as protect-tunnel.
[PE1] display mpls te protection tunnel all
------------------------------------------------------------------------
No. Work-tunnel status /id Protect-tunnel status /id Switch-Result
------------------------------------------------------------------------
1 non-defect /1010 non-defect /1012 protect-tunnel
2 non-defect /1011 non-defect /1012 work-tunnel
# Run the shutdown command on VLANIF 40 of PE1 to simulate defects on a physical link of
the protection tunnel.
[PE1] interface vlanif 40
[PE1-Vlanif40] shutdown
[PE1-Vlanif400] quit
# Run the display mpls te protection tunnel all command on PE1, and you can view that the
"Protect-tunnel status" field on Tunnel 1/0/10 is displayed as in-defect and the "Switch-Result"
field is displayed as work-tunnel.
[PE1] display mpls te protection tunnel all
------------------------------------------------------------------------
No. Work-tunnel status /id Protect-tunnel status /id Switch-Result
------------------------------------------------------------------------
1 non-defect /1010 in-defect /1012 work-tunnel
2 non-defect /1011 non-defect /1012 work-tunnel
NOTE
When no defects occur on all the tunnels, and the mpls te protect-switch manual work-lsp command is
used in the tunnel interface view of the working tunnel, the traffic is switched to the protection tunnel. In
this case, if the link of the protection tunnel fails, the traffic then is switched back to the working tunnel
and the mpls te protect-switch manual work-lsp command in the tunnel interface view of the working
tunnel is deleted. This is because the link defect triggers the switching request in Signaling Failure node
and Signaling Failure takes precedence over Manual Switch.
----End
Configuration Files
l Configuration file of PE1
#
sysname PE1
#
vlan batch 10 20 30 40
#
mpls lsr-id 1.1.1.1
mpls
mpls te
mpls rsvp-te
mpls te cspf
mpls oam
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
mpls
mpls te
#
interface Vlanif20
ip address 10.1.2.1 255.255.255.0
mpls
mpls te
#
interface Vlanif30
ip address 10.1.3.1 255.255.255.0
mpls
mpls te
mpls rsvp-te
#
interface Vlanif40
ip address 10.1.4.1 255.255.255.0
mpls
mpls te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 20
#
interface GigabitEthernet3/0/0
port link-type access
port default vlan 30
#
interface GigabitEthernet4/0/0
port link-type access
port default vlan 40
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
interface Tunnel1/0/10
description Working tunnel-1 to PE2
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 5.5.5.5
mpls te signal-protocol cr-static
mpls te tunnel-id 1010
mpls te protection tunnel 12 mode revertive wtr 4
mpls te commit
#
interface Tunnel1/0/11
description Working tunnel-2 to PE2
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 5.5.5.5
mpls te tunnel-id 1011
mpls te protection tunnel 12 mode revertive wtr 4
mpls te commit
#
interface Tunnel1/0/12
description Protection tunnel to PE2
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 5.5.5.5
mpls te signal-protocol cr-static
mpls te tunnel-id 1012
mpls te commit
#
ospf 100
opaque-capability enable
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.1.1.0 0.0.0.255
l Configuration file of P2
#
sysname P2
#
vlan batch 10 50
#
mpls lsr-id 2.2.2.2
mpls
mpls te
#
interface Vlanif10
ip address 10.1.1.2 255.255.255.0
mpls
mpls te
#
interface Vlanif50
ip address 10.1.5.2 255.255.255.0
mpls
mpls te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 10
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 50
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
ospf 100
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.1.5.0 0.0.0.255
#
static-cr-lsp transit PE2toPE1-3 incoming-interface vlanif 50 in-label 31
nexthop 10.1.1.1 out-label 30
#
return
l Configuration file of P1
#
sysname P1
#
vlan batch 20 30 70 80
#
mpls lsr-id 3.3.3.3
mpls
mpls te
mpls rsvp-te
mpls te cspf
#
interface Vlanif20
ip address 10.1.2.2 255.255.255.0
mpls
mpls te
#
interface Vlanif30
ip address 10.1.3.2 255.255.255.0
mpls
mpls te
mpls rsvp-te
#
interface Vlanif70
ip address 10.1.7.2 255.255.255.0
mpls
mpls te
#
interface Vlanif80
ip address 10.1.8.2 255.255.255.0
mpls
mpls te
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 80
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 20
#
interface GigabitEthernet3/0/0
port link-type access
port default vlan 30
#
interface GigabitEthernet4/0/0
port link-type access
port default vlan 70
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
#
ospf 100
opaque-capability enable
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 10.1.2.0 0.0.0.255
network 10.1.3.0 0.0.0.255
network 10.1.7.0 0.0.0.255
network 10.1.8.0 0.0.0.255
mpls-te enable
#
static-cr-lsp transit PE1toPE2-2 incoming-interface vlanif20 in-label 19
nexthop 10.1.7.1 out-label 21
static-cr-lsp transit PE2toPE1-2 incoming-interface vlanif70 in-label 21
nexthop 10.1.2.1 out-label 19
static-cr-lsp transit PE2toPE1-1 incoming-interface vlanif80 in-label 21
nexthop 10.1.3.1 out-label 20
#
return
l Configuration file of P3
#
sysname P3
#
vlan batch 40 60
#
mpls lsr-id 4.4.4.4
mpls
mpls te
#
interface Vlanif40
ip address 10.1.4.2 255.255.255.0
mpls
mpls te
#
interface Vlanif60
ip address 10.1.6.2 255.255.255.0
mpls
mpls te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 40
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 60
#
interface LoopBack1
ip address 4.4.4.4 255.255.255.255
#
ospf 100
area 0.0.0.0
network 4.4.4.4 0.0.0.0
network 10.1.4.0 0.0.0.255
network 10.1.6.0 0.0.0.255
#
static-cr-lsp transit PE1toPE2-3 incoming-interface vlanif40 in-label 30
nexthop 10.1.6.1 out-label 31
#
return
l Configuration file of PE2
#
sysname PE2
#
vlan batch 50 60 70 80
#
mpls lsr-id 5.5.5.5
mpls
mpls te
mpls rsvp-te
mpls te cspf
mpls oam
#
interface Vlanif50
ip address 10.1.5.1 255.255.255.0
mpls
mpls te
#
interface Vlanif60
ip address 10.1.6.1 255.255.255.0
mpls
mpls te
#
interface Vlanif70
ip address 10.1.7.1 255.255.255.0
mpls
mpls te
#
interface Vlanif80
ip address 10.1.8.1 255.255.255.0
mpls
mpls te
mpls rsvp-te
#
interface GigabitEthernet1/0/0
port link-type access
port default vlan 50
#
interface GigabitEthernet2/0/0
port link-type access
port default vlan 70
#
interface GigabitEthernet3/0/0
port link-type access
port default vlan 80
#
interface GigabitEthernet4/0/0
port link-type access
port default vlan 60
#
interface LoopBack1
ip address 5.5.5.5 255.255.255.255
#
interface Tunnel1/0/10
description Working tunnel-1 to PE1
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 1.1.1.1
mpls te signal-protocol static
mpls te tunnel-id 1010
mpls te protection tunnel 12 mode revertive wtr 4
mpls te commit
#
interface Tunnel1/0/11
description Working tunnel-2 to PE1
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 1.1.1.1
mpls te signal-protocol static
mpls te tunnel-id 1011
mpls te protection tunnel 12 mode revertive wtr 4
mpls te commit
#
interface Tunnel1/0/12
description Protection tunnel to PE1
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 1.1.1.1
mpls te signal-protocol static
mpls te tunnel-id 1012
mpls te commit
#
ospf 100
opaque-capability enable
area 0.0.0.0
network 5.5.5.5 0.0.0.0
network 10.1.5.0 0.0.0.255
network 10.1.6.0 0.0.0.255
network 10.1.7.0 0.0.0.255
network 10.1.8.0 0.0.0.255
mpls-te enable
#
static-cr-lsp ingress Tunnel1/0/10 destination 1.1.1.1 nexthop 10.1.7.2 out-
label 21
NOTE
MPLS is controlled by the license. By default, the MPLS function is disabled on the S9300. To use the
MPLS function of the S9300, buy the license from the Huawei local office.
The G24SA, G24CA and X24SA boards do not support the MPLS VPN function.
Networking Requirements
Figure 5-196 shows the networking diagram of the MPLS L3VPN. CE1 and CE3 belong to
VPNA, and CE2 and CE4 belongs to VPNB. Two MPLS TE tunnels and an LSP are set up
between PE1 and PE2. The bandwidth of one tunnel is 5 Mbit/s and the bandwidth of the other
tunnel is 10 Mbit/s. The CEs in VPNA require 10-Mibt/s constant bandwidth for communication;
therefore, the tunnel with 10-Mbit/s bandwidth is used by VPNA exclusively to ensure the
bandwidth. To use the tunnels more efficiently, VPNB prefers the TE tunnels.
Figure 5-196 Networking diagram for configuring the tunnel policy for the L3VPN
VPNA VPNA
CE1 CE3
GE1/0/3 GE1/0/3
Loopback1 Loopback1
1.1.1.1/32 MPLS TE tunnel 1/0/1 2.2.2.2/32
GE1/0/3
MPLS TE tunnel 1/0/2 ( binding) GE1/0/3
GE1/0/1 GE1/0/1
GE1/0/2 GE1/0/2
PE1 PE2
LSP
GE1/0/2 GE1/0/2
VPNB VPNB
CE2 CE4
Loopback1 - 1.1.1.1/32
Loopback1 - 2.2.2.2/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable the routing protocol to ensure communication between the PEs.
2. Configure the basic MPLS capability on the S9300s on the backbone network and set up
an LSP and two MPLS TE tunnels between the PEs.
3. Configure VPN instances on the PEs and connect the CEs to the PEs.
4. Configure tunnel policies and apply the tunnel policies to the VPN instances.
5. Configure MP-IBGP for exchanging routing information between the VPNs.
Data Preparation
To complete the configuration, you need the following data:
l MPLS LSR IDs of the PEs
l Names, RDs, and VPN targets of the two VPN instances
l Names of the two tunnel policies
Procedure
Step 1 Enable the IGP protocol on the MPLS backbone network to ensure IP interworking between the
PEs.
# Configure PE1.
<Quidway> system-view
[Quidway] sysname PE1
[PE1] interface loopback 1
[PE1-LoopBack1] ip address 1.1.1.1 32
[PE1-LoopBack1] quit
[PE1] vlan 10
[PE1-vlan10] quit
[PE1] interface gigabitEthernet 1/0/1
[PE1-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[PE1-GigabitEthernet1/0/1] port hybrid untagged vlan 10
[PE1] interface vlanif 10
[PE1-Vlanif10] ip address 100.1.1.1 30
[PE1-Vlanif10] quit
[PE1] ospf 1
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.3
[PE1-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
# Configure PE2.
<Quidway> system-view
[Quidway] sysname PE2
[PE2] interface loopback 1
[PE2-LoopBack1] ip address 2.2.2.2 32
[PE2-LoopBack1] quit
[PE2] vlan 10
[PE2-vlan10] quit
[PE2] interface gigabitEthernet 1/0/1
[PE2-GigabitEthernet1/0/1] port hybrid pvid vlan 10
[PE2-GigabitEthernet1/0/1] port hybrid untagged vlan 10
# By running the display ip routing-table command on the PEs, you can see that the PEs can
learn the routes of each other's Loopback1 interface.
# Take the display on PE1 as an example:
[PE1] display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 7 Routes : 7
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
2.2.2.2/32 OSPF 10 2 D 100.1.1.2 vlanif10
100.1.1.0/30 Direct 0 0 D 172.1.1.1 vlanif10
100.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
100.1.1.2/32 Direct 0 0 D 172.1.1.2 vlanif10
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
Step 2 Enable the basic MPLS capability on the MPLS backbone and establish an LDP LSP.
NOTE
The PE devices are directly connected In this example, you need to run label advertise command to enables
the egress node to assign labels normally to the penultimate hop.
# Configure PE1.
[PE1] mpls lsr-id 1.1.1.1
[PE1] mpls
[PE1-mpls] quit
[PE1] mpls ldp
[PE1-mpls-ldp] quit
[PE1] interface vlanif 10
[PE1-Vlanif10] mpls
[PE1-Vlanif10] mpls ldp
[PE1-Vlanif10] quit
# Configure PE2.
[PE2] mpls lsr-id 2.2.2.2
[PE2] mpls
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlanif 10
[PE2-Vlanif10] mpls
[PE2-Vlanif10] mpls ldp
[PE2-Vlanif10] quit
# After the configuration, an LDP LSP can be set up between PE1 and PE2. By running the
display tunnel-info all command, you can see the LSP destined for the address 2.2.2.2. By
running the display mpls ldp lsp command, you can view the LSP information.
# Take the display on PE1 as an example:
[PE1] display tunnel-info all
* -> Allocated VC Token
Tunnel ID Type Destination Token
----------------------------------------------------------------------
0x1001c lsp 2.2.2.2 0
# Configure PE2.
[PE2] mpls
[PE2-mpls] mpls te
[PE2-mpls] mpls rsvp-te
[PE2-mpls] mpls te cspf
[PE2-mpls] quit
[PE2] interface vlanif 10
[PE2-Vlanif10] mpls
[PE2-Vlanif10] mpls te
[PE2-Vlanif10] mpls rsvp-te
[PE2-Vlanif10] mpls te max-link-bandwidth 20000
[PE2-Vlanif10] mpls te max-reservable-bandwidth 15000
[PE2-Vlanif10] quit
# Enable OSPF on the devices along the TE tunnel so that the devices can transmit TE attributes.
# Configure PE1.
[PE1] ospf 1
[PE1-ospf-1] opaque-capability enable
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] mpls-te enable
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
# Configure PE2.
[PE2] ospf 1
[PE2-ospf-1] opaque-capability enable
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] mpls-te enable
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
# Configure PE1.
[PE1] interface tunnel 1/0/1
[PE1-Tunnel1/0/1] ip address unnumbered interface loopback1
[PE1-Tunnel1/0/1] tunnel-protocol mpls te
[PE1-Tunnel1/0/1] destination 2.2.2.2
[PE1-Tunnel1/0/1] mpls te tunnel-id 11
[PE1-Tunnel1/0/1] mpls te bandwidth 5000
[PE1-Tunnel1/0/1] mpls te commit
[PE1-Tunnel1/0/1] quit
# Configure PE2.
[PE2] interface tunnel 1/0/1
[PE2-Tunnel1/0/1] ip address unnumbered interface loopback1
[PE2-Tunnel1/0/1] tunnel-protocol mpls te
[PE2-Tunnel1/0/1] destination 1.1.1.1
[PE2-Tunnel1/0/1] mpls te tunnel-id 11
[PE2-Tunnel1/0/1] mpls te bandwidth 5000
[PE2-Tunnel1/0/1] mpls te commit
[PE2-Tunnel1/0/1] quit
# Configure an MPLS TE tunnel with a bandwidth of 10 Mbit/s and bind the tunnel with the
VPN.
# Configure PE1.
[PE1] interface tunnel 1/0/2
[PE1-Tunnel1/0/2] ip address unnumbered interface loopback1
[PE1-Tunnel1/0/2] tunnel-protocol mpls te
[PE1-Tunnel1/0/2] destination 2.2.2.2
[PE1-Tunnel1/0/2] mpls te tunnel-id 22
[PE1-Tunnel1/0/2] mpls te bandwidth 10000
[PE1-Tunnel1/0/2] mpls te reserved-for-binding
[PE1-Tunnel1/0/2] mpls te commit
[PE1-Tunnel1/0/2] quit
# Configure PE2.
[PE2] interface tunnel 1/0/2
[PE2-Tunnel1/0/2] ip address unnumbered interface loopback1
[PE2-Tunnel1/0/2] tunnel-protocol mpls te
[PE2-Tunnel1/0/2] destination 1.1.1.1
[PE2-Tunnel1/0/2] mpls te tunnel-id 22
[PE2-Tunnel1/0/2] mpls te bandwidth 10000
[PE2-Tunnel1/0/2] mpls te reserved-for-binding
[PE2-Tunnel1/0/2] mpls te commit
[PE2-Tunnel1/0/2] quit
# By running the display interface tunnel interface-number command on the PEs, you can see
that Tunnel1/0/1 and Tunnel1/0/2 are both Up. Take Tunnel1/0/2 on PE1 for example.
[PE1] display interface tunnel 1/0/2
Tunnel1/0/2 current state : UP
Line protocol current state : UP
Description : HUAWEI, Quidway Series, Tunnel1/0/2 Interface, Route Port
The Maximum Transmit Unit is 1500 bytes
Internet Address is unnumbered, using address of LoopBack1(1.1.1.1/32)
Encapsulation is TUNNEL, loopback not set
Tunnel destination 2.2.2.2
Tunnel protocol/transport MPLS/MPLS, ILM is available,
primary tunnel id is 0x1003d, secondary tunnel id is 0x0
5 minutes output rate 0 bits/sec, 0 packets/sec
22894187 packets output, 2958834536 bytes
0 packets output dropped
# By running the display tunnel-info all command on the PEs, you can see that Tunnel1/0/1
and Tunnel1/0/2 are both Up. Take the display on PE1 as an example:
[PE1] display tunnel-info all
* -> Allocated VC Token
Tunnel ID Type Destination Token
----------------------------------------------------------------------
0x1003c cr lsp 2.2.2.2 2
0x1003d cr lsp 2.2.2.2 3
0x1001b lsp 2.2.2.2 0
0x1001c lsp -- 1
Step 4 Configure VPN instances on each PE and connect the CEs to the PEs.
# Configure PE1.
[PE1] ip vpn-instance VPNA
[PE1-vpn-instance-VPNA] route-distinguisher 100:1
[PE1-vpn-instance-VPNA] vpn-target 111:1 both
[PE1-vpn-instance-VPNA] quit
[PE1] ip vpn-instance VPNB
[PE1-vpn-instance-VPNB] route-distinguisher 100:2
[PE1-vpn-instance-VPNB] vpn-target 222:2 both
[PE1-vpn-instance-VPNB] quit
[PE1] interface vlanif 30
[PE1-Vlanif30] ip binding vpn-instance VPNA
[PE1-Vlanif30] ip address 10.1.1.2 30
[PE1-Vlanif30] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] ip binding vpn-instance VPNB
[PE1-Vlanif20] ip address 10.2.1.2 30
[PE1-Vlanif20] quit
# Configure PE2.
[PE2] ip vpn-instance VPNA
[PE2-vpn-instance-VPNA] route-distinguisher 100:3
[PE2-vpn-instance-VPNA] vpn-target 111:1 both
[PE2-vpn-instance-VPNA] quit
[PE2] ip vpn-instance vpnb
[PE2-vpn-instance-VPNB] route-distinguisher 100:4
[PE2-vpn-instance-VPNB] vpn-target 222:2 both
[PE2-vpn-instance-VPNB] quit
[PE2] interface vlanif 50
[PE2-Vlanif50] ip binding vpn-instance VPNA
[PE2-Vlanif50] ip address 10.3.1.2 30
[PE2-Vlanif50] quit
[PE2] interface vlanif 40
[PE2-Vlanif40] ip binding vpn-instance VPNB
[PE2-Vlanif40] ip address 10.4.1.2 30
[PE2-Vlanif40] quit
# Configure the interface addresses of the VLAN where the CE interface resides and configure
the IP addresses of the VLANIF interfaces according to Figure 5-196. The configuration
procedure is not given.
# By running the display ip vpn-instance verbose command on the PEs, you can see the
configuration of the VPN instances. The PEs can ping the connected CEs successfully.
NOTE
If multiple interfaces on a PE are bound to the same VPN, you must specify the source address when you
run the ping command to ping the connected CE. That is, specify -a source-ip-address in the ping -a
source-ip-address -vpn-instance vpn-instance-name destination-address command; otherwise, the ping
operation may fail.
# Configure the tunnel policy for binding primary tunnel and apply the tunnel policy to VPNA.
# Configure PE1.
[PE1]tunnel-policy policy1
[PE1-tunnel-policy-policy1]tunnel binding destination 2.2.2.2 te tunnel1/0/2
[PE1-tunnel-policy-policy1] quit
[PE1] ip vpn-instance VPNA
[PE1-vpn-instance-VPNA] tnl-policy policy1
[PE1-vpn-instance-VPNA] quit
# Configure PE2.
[PE2] tunnel-policy policy1
[PE2-tunnel-policy-policy1] tunnel binding destination 1.1.1.1 te tunnel1/0/2
[PE2-tunnel-policy-policy1] quit
[PE2] ip vpn-instance VPNA
[PE2-vpn-instance-VPNA] tnl-policy policy1
[PE2-vpn-instance-VPNA] quit
# Configure the tunnel policy that specifies the tunnel selection sequence and apply the tunnel
policy to VPNB.
# Configure PE1.
[PE1] tunnel-policy policy2
[PE1-tunnel-policy-policy2] tunnel select-seq cr-lsp lsp load-balance-number 1
[PE1-tunnel-policy-policy2] quit
[PE1] ip vpn-instance VPNB
[PE1-vpn-instance-VPNB] tnl-policy policy2
[PE1-vpn-instance-VPNB] quit
# Configure PE2.
[PE2] tunnel-policy policy2
[PE2-tunnel-policy-policy2] tunnel select-seq cr-lsp lsp load-balance-number 1
[PE2-tunnel-policy-policy2] quit
[PE2] ip vpn-instance VPNB
[PE2-vpn-instance-VPNB] tnl-policy policy2
[PE2-vpn-instance-VPNB] quit
# Configure PE2.
[PE2] bgp 100
[PE2-bgp] peer 1.1.1.1 as-number 100
[PE2-bgp] peer 1.1.1.1 connect-interface loopback 1
[PE2-bgp] ipv4-family vpnv4
[PE2-bgp-af-vpnv4] peer 1.1.1.1 enable
[PE2-bgp-af-vpnv4] quit
[PE2-bgp] quit
# After the configuration, run the display bgp peer or display bgp vpnv4 all peer command.
You can see that the BGP peers between the PEs are established.
Step 7 Set up EBGP adjacency between PEs and CEs.
Configure PE1
Configure CE1
[CE1] bgp 65410
[CE1-bgp] peer 10.1.1.2 as-number 100
[CE1-bgp] import-route direct
[CE1-bgp] quit
Configure CE2
[CE2] bgp 65410
[CE2-bgp] peer 10.2.1.2 as-number 100
[CE2-bgp] import-route direct
[CE2-bgp] quit
Configure PE1
[PE2] bgp 100
[PE2-bgp] ipv4-family vpn-instance VPNA
[PE2-bgp-af-VPNA] peer 10.3.1.1 as-number 65420
[PE2-bgp-af-VPNA] quit
[PE2-bgp] ipv4-family vpn-instance VPNB
[PE2-bgp-af-VPNB] peer 10.4.1.1 as-number 65420
[PE2-bgp-af-VPNB] quit
[PE2-bgp] quit
Configure CE3
[CE3] bgp 65420
[CE3-bgp] peer 10.3.1.2 as-number 100
[CE3-bgp] import-route direct
[CE3-bgp] quit
Configure CE4
[CE4] bgp 65420
[CE4-bgp] peer 10.4.1.2 as-number 100
[CE4-bgp] import-route direct
[CE4-bgp] quit
# Run the display ip routing-table vpn-instance verbose command on the PEs, and you can
see the tunnels used by the VPN routes.
# Take the display on PE1 as an example:
[PE1] display ip routing-table vpn-instance VPNA 10.3.1.0 verbose
Routing Table : VPNA
Summary Count : 1
Destination: 10.3.1.0/30
Protocol: BGP Process ID: 0
Preference: 255 Cost: 0
NextHop: 2.2.2.2 Neighbour: 2.2.2.2
State: Active Adv GotQ Age: 00h00m08s
Tag: 0 Priority: 0
Label: 109568 QoSInfo: 0x0
RelayNextHop: 0.0.0.0 Interface: Tunnel1/0/2
Tunnel ID: 0x1003d
[PE1] display ip routing-table vpn-instance VPNB 10.4.1.0 verbose
Routing Table : VPNB
Summary Count : 2
Destination: 10.4.1.0/30
Protocol: BGP Process ID: 0
Preference: 255 Cost: 0
NextHop: 2.2.2.2 Neighbour: 2.2.2.2
State: Active Adv GotQ Age: 01h02m27s
Tag: 0 Priority: 0
Label: 107520 QoSInfo:0x0
RelayNextHop: 0.0.0.0 Interface: Tunnel1/0/1
Tunnel ID: 0x1001c
# The CEs in the same VPN can ping each other, and the CEs in different VPNs cannot ping
each other.
----End
Configuration Files
l Configuration file of PE1
#
sysname PE1
#
vlan batch 10 20 30
#
ip vpn-instance VPNA
route-distinguisher 100:1
tnl-policy policy1
vpn-target 111:1 export-extcommunity
vpn-target 111:1 import-extcommunity
#
ip vpn-instance VPNB
route-distinguisher 100:2
tnl-policy policy2
vpn-target 222:2 export-extcommunity
vpn-target 222:2 import-extcommunity
#
mpls lsr-id 1.1.1.1
mpls
mpls te
label advertise non-null
mpls rsvp-te
mpls te cspf
#
mpls ldp
#
interface Vlanif10
ip address 100.1.1.1 255.255.255.252
mpls
mpls te
mpls te max-link-bandwidth 20000
mpls te max-reservable-bandwidth 15000
mpls rsvp-te
mpls ldp
#
interface Vlanif30
ip binding vpn-instance VPNA
ip address 10.1.1.2 255.255.255.252
#
interface Vlanif20
ip binding vpn-instance VPNB
ip address 10.2.1.2 255.255.255.252
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface GigabitEthernet1/0/3
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
interface Tunnel1/0/1
ip address unnumbered interface loopback1
tunnel-protocol mpls te
destination 2.2.2.2
mpls te tunnel-id 11
mpls te bandwidth bc0 5000
mpls te commit
#
interface Tunnel1/0/2
ip address unnumbered interface loopback1
tunnel-protocol mpls te
destination 2.2.2.2
mpls te tunnel-id 22
mpls te bandwidth bc0 10000
mpls te reserved-for-binding
mpls te commit
#
bgp 100
peer 2.2.2.2 as-number 100
peer 2.2.2.2 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 2.2.2.2 enable
#
ipv4-family vpnv4
policy vpn-target
peer 2.2.2.2 enable
#
ipv4-family vpn-instance VPNA
peer 10.1.1.1 as-number 65410
#
ipv4-family vpn-instance VPNB
peer 10.2.1.1 as-number 65410
#
ospf 1
opaque-capability enable
area 0.0.0.0
network 100.1.1.0 0.0.0.3
network 1.1.1.1 0.0.0.0
mpls-te enable
#
tunnel-policy policy1
tunnel binding destination 2.2.2.2 te Tunnel1/0/2
#
tunnel-policy policy2
tunnel select-seq cr-lsp lsp load-balance-number 1
#
return
l Configuration file of PE2
#
sysname PE2
#
vlan batch 10 30 50
#
ip vpn-instance VPNA
route-distinguisher 100:3
tnl-policy policy1
vpn-target 111:1 export-extcommunity
vpn-target 111:1 import-extcommunity
#
ip vpn-instance VPNB
route-distinguisher 100:4
tnl-policy policy2
vpn-target 222:2 export-extcommunity
vpn-target 222:2 import-extcommunity
#
mpls lsr-id 2.2.2.2
mpls
mpls te
label advertise non-null
mpls rsvp-te
mpls te cspf
#
mpls ldp
#
interface Vlanif10
ip address 100.1.1.2 255.255.255.252
mpls
mpls te
mpls te max-link-bandwidth 20000
mpls te max-reservable-bandwidth 15000
mpls rsvp-te
mpls ldp
#
interface Vlanif50
ip binding vpn-instance VPNA
ip address 10.3.1.2 255.255.255.252
#
interface Vlanif40
ip binding vpn-instance VPNB
ip address 10.4.1.2 255.255.255.252
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
interface GigabitEthernet1/0/3
port hybrid pvid vlan 50
port hybrid untagged vlan 50
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
interface Tunnel1/0/1
ip address unnumbered interface loopback1
tunnel-protocol mpls te
destination 1.1.1.1
mpls te tunnel-id 11
mpls te bandwidth bc0 5000
mpls te commit
#
interface Tunnel1/0/2
ip address unnumbered interface loopback1
tunnel-protocol mpls te
destination 1.1.1.1
mpls te tunnel-id 22
mpls te bandwidth bc0 10000
mpls te reserved-for-binding
mpls te commit
#
bgp 100
peer 1.1.1.1 as-number 100
peer 1.1.1.1 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 1.1.1.1 enable
#
ipv4-family vpnv4
policy vpn-target
peer 1.1.1.1 enable
#
ipv4-family vpn-instance VPNA
peer 10.3.1.1 as-number 65420
#
ipv4-family vpn-instance VPNB
peer 10.4.1.1 as-number 65420
#
ospf 1
opaque-capability enable
area 0.0.0.0
network 100.1.1.0 0.0.0.3
network 2.2.2.2 0.0.0.0
mpls-te enable
#
tunnel-policy policy1
tunnel binding destination 1.1.1.1 te Tunnel1/0/2
#
tunnel-policy policy2
tunnel select-seq cr-lsp lsp load-balance-number 1
#
return
l Configuration file of CE1
#
sysname CE1
#
vlan batch 30
#
interface Vlanif30
ip address 10.1.1.1 255.255.255.252
#
interface GigabitEthernet1/0/3
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
bgp 65410
peer 10.1.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
import-route direct
peer 10.1.1.2 enable
#
return
l Configuration file of CE2
#
sysname CE2
#
vlan batch 20
#
interface vlanif 20
ip address 10.2.1.1 255.255.255.252
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
bgp 65410
peer 10.2.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
import-route direct
peer 10.2.1.2 enable
#
return
l Configuration file of CE3
#
sysname CE3
#
vlan batch 50
#
interface Vlanif50
ip address 10.3.1.1 255.255.255.252
#
interface GigabitEthernet1/0/3
port hybrid pvid vlan 50
port hybrid untagged vlan 50
#
bgp 65420
peer 10.3.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
import-route direct
peer 10.3.1.2 enable
#
return
l Configuration file of CE4
#
sysname CE4
#
vlan batch 40
#
interface Vlanif 40
ip address 10.4.1.1 255.255.255.252
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
bgp 65420
peer 10.1.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
import-route direct
peer 10.4.1.2 enable
#
return
Networking Requirements
As shown in Figure 5-197, Site 1, Site 2, and Site 3 belong to VPNA. The networking
requirements are as follows:
Figure 5-197 Networking diagram for configuring the L2VPN tunnel binding
Loopback1
2.2.2.9/32
VPNA
VLAN2
GE 1/0/1
GE 1/0/2 GE 1/0/1
Loopback1 Loopback1 PE2 CE2
Site2
1.1.1.9/32 4.4.4.9/32
GE 1/0/1 GE 1/0/2
PE1 GE 1/0/1 GE 1/0/3
GE 1/0/2 P
GE 1/0/3 PE3
GE 1/0/3 GE 1/0/1
VLAN1 VLAN4
GE 1/0/1
GE 1/0/2 GE 1/0/3 VLAN3 CE3
Loopback1 Site3
3.3.3.9/32
Site1 CE1
VPNA VPNA
GigabitEthernet1/0/2 VLANIF 1 -
GigabitEthernet1/0/3 VLANIF 4 -
Loopback1 - 1.1.1.9/32
Loopback1 - 2.2.2.9/32
Loopback1 - 3.3.3.9/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a TE tunnel.
2. Configure a tunnel policy to bind the IP address of the remote end to the tunnel.
3. Apply the tunnel policy to the L2VC.
4. Connect the CEs to the backbone network.
Data Preparation
To complete the configuration, you need the following data:
l Tunnel policy
l VC ID
l Parameters for the MPLS TE tunnel
NOTE
For different L2VPN services from a PE to the same destination, different tunnel policies and TE tunnels
are required.
Procedure
Step 1 Enable PEs to communicate with each other.
# Configure an Interior Gateway Protocol (IGP) on the MPLS backbone network to implement
interworking between the PEs. IS-IS is used in this example, and the IS-IS process ID is 1.
# Configure PE1.
<Quidway> system-view
[Quidway] sysname PE1
[PE1] vlan 7
[PE1-vlan7] quit
[PE1] interface GigabitEthernet 1/0/1
[PE1-GigabitEthernet1/0/1] port hybrid pvid vlan 7
[PE1-GigabitEthernet1/0/1] port hybrid tagged vlan 7
[PE1-GigabitEthernet1/0/1] quit
[PE1] interface vlanif 7
[PE1-Vlanif7] ip address 100.1.1.2 24
[PE1-Vlanif7] quit
[PE1]isis 1
[PE1-isis-1] network-entity 10.0000.0000.0000.0001.00
[PE1-isis-1] is-level level-2
[PE1-isis-1] quit
[PE1] interface vlanif 7
[PE1-Vlanif7] isis enable 1
[PE1-Vlanif7] quit
[PE1] interface loopback 1
[PE1-LoopBack1] ip address 1.1.1.9 32
[PE1-LoopBack1] isis enable 1
[PE1-LoopBack1] quit
# The configuration procedures of PE2 and PE3 are similar to the configuration procedure of
PE1.
# Configure the P.
<Quidway> system-view
[Quidway] sysname P
[P] vlan batch 5 6 7
[P]interface GigabitEthernet 1/0/1
[P-GigabitEthernet1/0/1] port hybrid pvid vlan 7
[P-GigabitEthernet1/0/1] port hybrid tagged vlan 7
[P-GigabitEthernet1/0/1] quit
[P]interface GigabitEthernet 1/0/2
[P-GigabitEthernet1/0/2] port hybrid pvid vlan 5
[P-GigabitEthernet1/0/2] port hybrid tagged vlan 5
[P-GigabitEthernet1/0/2] quit
[P]interface GigabitEthernet 1/0/3
[P-GigabitEthernet1/0/3] port hybrid pvid vlan 6
[P-GigabitEthernet1/0/3] port hybrid tagged vlan 6
[P-GigabitEthernet1/0/3] quit
[P] interface vlanif 7
[P-Vlanif7] ip address 100.1.1.1 24
[P-Vlanif7] quit
[P] interface vlanif 5
[P-Vlanif5] ip address 100.2.1.1 24
[P-Vlanif5] quit
[P] interface vlanif 6
[P-Vlanif6] ip address 100.3.1.1 24
[P-Vlanif6] quit
[P]isis 1
[P-isis-1] network-entity 10.0000.0000.0000.0002.00
[P-isis-1] is-level level-2
[P-isis-1] quit
[P] interface vlanif 5
[P-Vlanif5] isis enable 1
[P-Vlanif5] quit
[P] interface vlanif 6
[P-Vlanif6] isis enable 1
[P-Vlanif6] quit
[P] interface vlanif 7
[P-Vlanif7] isis enable 1
[P-Vlanif7] quit
[P] interface loopback 1
[P-LoopBack1] ip address 1.1.1.9 32
[P-LoopBack1] isis enable 1
[P-LoopBack1] quit
# Run the display ip routing-table command in any view of the PEs, and you can see that the
PEs can learn the loopback address of each other.
Step 2 Configure the basic MPLS capability, set up the LDP peers, and enable MPLS TE, Resource
Reservation Protocol-TE (RSVP-TE), and Constraint Shortest Path First (CSPF).
# In this example, RSVP-TE is used as the signaling protocol. Enable global MPLS TE and
RSVP-TE on the PEs and P along the TE tunnel. Configure CSPF on the tunnel ingress. Enable
MPLS TE and RSVP-TE on the interfaces along the tunnel. Configure the LDP remote peers
on PEs to transmit the private network routes.
# Configure PE1.
[PE1] mpls lsr-id 1.1.1.9
[PE1] mpls
[PE1-mpls] mpls te
[PE1-mpls] mpls rsvp-te
[PE1-mpls] mpls te cspf
[PE1-mpls] quit
[PE1] interface vlanif 7
[PE1-Vlanif7] mpls
[PE1-Vlanif7] mpls te
[PE1-Vlanif7] mpls rsvp-te
[PE1-Vlanif7] quit
[PE1] mpls ldp
[PE1-mpls-ldp] quit
[PE1] mpls ldp remote-peer 2.2.2.9
[PE1-mpls-ldp-remote-2.2.2.9] remote-ip 2.2.2.9
[PE1-mpls-ldp-remote-2.2.2.9] quit
[PE1] mpls ldp remote-peer 3.3.3.9
[PE1-mpls-ldp-remote-3.3.3.9] remote-ip 3.3.3.9
[PE1-mpls-ldp-remote-3.3.3.9] quit
# The configuration procedures of PE2 and PE3 are similar to the configuration procedure of
PE1.
# Configure the P.
[P] mpls lsr-id 4.4.4.9
[P] mpls
[P-mpls] mpls te
[P-mpls] mpls rsvp-te
[P-mpls] quit
[P] interface vlanif 7
[P-Vlanif7] mpls
[P-Vlanif7] mpls te
[P-Vlanif7] mpls rsvp-te
[P-Vlanif7] quit
[P] interface vlanif 5
[P-Vlanif5] mpls
[P-Vlanif5] mpls te
# Run the display mpls ldp session command on the PEs, and you can see that LDP peers are
set up between PE1 and PE2 and between PE1 and PE3.
# Take the display on PE1 as an example:
[PE1] display mpls ldp session
LDP Session(s) in Public Network
-------------------------------------------------------------------------
Peer-ID Status LAM SsnRole SsnAge KA-Sent/Rcv
-------------------------------------------------------------------------
2.2.2.9:0 Operational DU Passive 000:00:00 4/4
3.3.3.9:0 Operational DU Passive 000:00:00 4/4
-------------------------------------------------------------------------
LAM : Label Advertisement Mode SsnAge Unit : DDD:HH:MM
# The configuration procedures of P, PE2, and PE3 are similar to the configuration procedure
of PE1.
NOTE
When IS-IS TE is configured on only the local end, the session set up on the local end turns Down. When
IS-IS TE is configured on the remote end, the LDP session becomes Up again.
# The configuration procedures of PE2 and PE3 are similar to the configuration procedure of
PE1.
# Configure the P.
[P] interface vlanif 7
[P-Vlanif7] mpls te max-link-bandwidth 100000
[P-Vlanif7] mpls te max-reservable-bandwidth 80000
[P-Vlanif7] quit
[P] interface vlanif 5
[P-Vlanif5] mpls te max-link-bandwidth 100000
[P-Vlanif5] mpls te max-reservable-bandwidth 80000
[P-Vlanif5]quit
[P] interface vlanif 6
# You can manually specify a path for MPLS TE, that is, configure an explicit path for MPLS
TE. Take the configuration of explicit path on PE1 for example.
# Configure PE1.
[PE1] explicit-path PE1toPE2
[PE1-explicit-path-PE1toPE2] next hop 100.1.1.2
[PE1-explicit-path-PE1toPE2] next hop 100.2.1.2
[PE1-explicit-path-PE1toPE2] next hop 2.2.2.9
[PE1-explicit-path-PE1toPE2] quit
[PE1] explicit-path PE1toPE3
[PE1-explicit-path-PE1toPE3] next hop 100.1.1.2
[PE1-explicit-path-PE1toPE3] next hop 100.3.1.2
[PE1-explicit-path-PE1toPE3] next hop 3.3.3.9
[PE1-explicit-path-PE1toPE3] quit
An MPLS TE tunnel is unidirectional. To guarantee bidirectional QoS on the TE tunnel, you must configure
an MPLS TE tunnel on PEs.
# Create two tunnel interfaces on PE1; create a tunnel interface on each of PE2 and PE3.
# Configure PE1.
[PE1] interface tunnel 1/0/0
[PE1-Tunnel1/0/0] ip address unnumbered interface loopback 1
[PE1-Tunnel1/0/0] tunnel-protocol mpls te
[PE1-Tunnel1/0/0] destination 2.2.2.9
[PE1-Tunnel1/0/0] mpls te tunnel-id 100
[PE1-Tunnel1/0/0] mpls te signal-protocol rsvp-te
[PE1-Tunnel1/0/0] mpls te path explicit-path PE1toPE2
[PE1-Tunnel1/0/0] mpls te bandwidth 10000
[PE1-Tunnel1/0/0] mpls te bandwidth bc0 10000
[PE1-Tunnel1/0/0] mpls te commit
[PE1-Tunnel1/0/0] quit
[PE1] interface tunnel 2/0/0
[PE1-Tunnel2/0/0] ip address unnumbered interface loopback 1
[PE1-Tunnel2/0/0] tunnel-protocol mpls te
[PE1-Tunnel2/0/0] destination 3.3.3.9
[PE1-Tunnel2/0/0] mpls te tunnel-id 200
[PE1-Tunnel2/0/0] mpls te signal-protocol rsvp-te
[PE1-Tunnel2/0/0] mpls te path explicit-path PE1toPE3
[PE1-Tunnel2/0/0] mpls te bandwidth 20000
[PE1-Tunnel2/0/0] mpls te bc0 bandwidth 20000
[PE1-Tunnel2/0/0] mpls te commit
[PE1-Tunnel2/0/0] quit
# Configure PE2.
[PE2] interface tunnel 1/0/0
[PE2-Tunnel1/0/0] ip address unnumbered interface loopback 1
[PE2-Tunnel1/0/0] tunnel-protocol mpls te
[PE2-Tunnel1/0/0] destination 1.1.1.9
[PE2-Tunnel1/0/0] mpls te tunnel-id 100
[PE2-Tunnel1/0/0] mpls te signal-protocol rsvp-te
[PE2-Tunnel1/0/0] mpls te bandwidth 10000
[PE2-Tunnel1/0/0] mpls te commit
[PE2-Tunnel1/0/0] quit
# Configure PE3.
# Run the display this interface command in the tunnel interface view of the PEs, and you can
see that the TE tunnel is Up. Take Tunnel1/0/0 of PE1 for example.
[PE1-Tunnel1/0/0] display this interface
Tunnel1/0/0 current state : UP
Line protocol current state : UP
Description : HUAWEI, Quidway Series, Tunnel1/0/0 Interface, Route Port
The Maximum Transmit Unit is 1500
Internet Address is unnumbered, using address of LoopBack1(1.1.1.9/32)
Encapsulation is TUNNEL, loopback not set
Tunnel destination 2.2.2.9
Tunnel protocol/transport MPLS/MPLS, ILM is available,
primary tunnel id is 0x1003c, secondary tunnel id is 0x0
The tunnelIfIndex is 0x40020
Output queue : (Urgent queue : Size/Length/Discards) 0/50/0
Output queue : (Protocol queue : Size/Length/Discards) 0/1000/0
Output queue : (FIFO queuing : Size/Length/Discards) 0/75/0
300 seconds output rate 0 bytes/sec, 0 packets/sec
0 packets output, 0 bytes
0 output error
# Configure PE2.
[PE2] mpls l2vpn
[PE2-l2vpn] mpls l2vpn default martini
[PE2-l2vpn] quit
[PE2] interface tunnel 1/0/0
[PE2-Tunnel1/0/0] mpls te reserved-for-binding
[PE2-Tunnel1/0/0] mpls te commit
[PE2-Tunnel1/0/0] quit
[PE2] tunnel-policy policy1
[PE2-tunnel-policy-policy1] tunnel binding destination 1.1.1.9 te tunnel1/0/0
[PE2-tunnel-policy-policy1] quit
[PE2] interface vlanif 2
[PE2-Vlanif2] mpls l2vc 1.1.1.9 100 tunnel-policy policy1
[PE2-Vlanif2] quit
# Configure PE3.
[PE3] mpls l2vpn
[PE3-l2vpn] mpls l2vpn default martini
[PE3-l2vpn] quit
[PE3] interface tunnel 1/0/0
[PE3-Tunnel1/0/0] mpls te reserved-for-binding
[PE3-Tunnel1/0/0] mpls te commit
[PE3-Tunnel1/0/0] quit
[PE3] tunnel-policy policy1
[PE3-tunnel-policy-policy1] tunnel binding destination 1.1.1.9 te tunnel1/0/0
[PE3-tunnel-policy-policy1] quit
[PE3] interface vlanif 3
[PE3-Vlanif3] mpls l2vc 1.1.1.9 200 tunnel-policy policy1
[PE3-Vlanif3] quit
# The following takes the configuration of CE1 as an example. The configuration procedures of
CE2 and CE3 are the same as the configuration procedure of CE1, and are not mentioned here.
[CE1] vlan 1
[CE1] quit
[CE1] vlan 4
[CE1] quit
[CE1] interface GigabitEthernet1/0/2
[CE1-GigabitEthernet1/0/2] port link-type trunk
[CE1-GigabitEthernet1/0/2] port trunk allow-pass vlan 1
[CE1-GigabitEthernet1/0/2] quit
[CE1] interface GigabitEthernet1/0/3
[CE1-GigabitEthernet1/0/3] port link-type trunk
[CE1-GigabitEthernet1/0/3] port trunk allow-pass vlan 4
[CE1-GigabitEthernet1/0/3] quit
[CE1] interface vlanif 1
[CE1-Vlanif1] ip address 10.1.1.1 24
[CE1-Vlanif1] quit
[CE1] interface vlanif 4
[CE1-Vlanif4] ip address 20.1.1.1 24
[CE1-Vlanif4] quit
# Check the VC status on PE1. All the VCs on PE1 are Up.
[PE1] display mpls l2vc
Total ldp vc : 2 2 up 0 down
*Client Interface : Vlanif1
Session State : up
AC Status : up
VC State : up
VC ID : 100
VC Type : VLAN
Destination : 2.2.2.9
local VC Label : 17408 remote VC Label : 17409
Control Word : disable
local VC MTU : 1500 remote VC MTU : 1500
Tunnel Policy Name : policy1
Traffic Behavior Name: --
PW Template Name : --
Create time : 0 days, 0 hours, 7 minutes, 18 seconds
# You can see that the number of datagrams passing through Tunnel1/0/0 increases.
# Run the ping 20.1.1.2 command on CE1 to check information about Tunnel 1/0/0 of PE1. You
can see that the statistics of packets on Tunnel 1/0/0 remain unchanged because Tunnel 1/0/0
on PE1 transmits only the data between PE1 and PE2.
----End
Configuration Files
l Configuration file of PE1
#
sysname PE1
#
vlan batch 1 4 7
#
mpls lsr-id 1.1.1.9
mpls
mpls te
mpls rsvp-te
mpls te cspf
#
mpls l2vpn
mpls l2vpn default martini
#
explicit-path pe1tope2
next hop 100.1.1.1
next hop 100.2.1.2
next hop 2.2.2.9
#
explicit-path PE1toPE3
next hop 100.1.1.1
next hop 100.3.1.2
next hop 3.3.3.9
#
mpls ldp
#
mpls ldp remote-peer 2.2.2.9
remote-ip 2.2.2.9
#
mpls ldp remote-peer 3.3.3.9
remote-ip 3.3.3.9
#
isis 1
is-level level-2
cost-style wide
network-entity 10.0000.0000.0000.0001.00
traffic-eng level-2
#
interface Vlanif7
ip address 100.1.1.2 255.255.255.0
isis enable 1
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 80000
mpls rsvp-te
#
interface Vlanif1
mpls l2vc 2.2.2.9 100 tunnel-policy policy1
#
interface Vlanif4
mpls l2vc 3.3.3.9 200 tunnel-policy policy2
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 7
port hybrid tagged vlan 7
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 1
l Configuration file of P
#
sysname P
#
vlan batch 5 6 7
#
mpls lsr-id 4.4.4.9
mpls
mpls te
mpls rsvp-te
#
isis 1
is-level level-2
cost-style wide
network-entity 10.0000.0000.0000.0002.00
traffic-eng level-2
#
interface Vlanif7
ip address 100.1.1.1 255.255.255.0
isis enable 1
mpls
mpls te
mpls te max-link-bandwidth 100000
mpls te max-reservable-bandwidth 80000
mpls rsvp-te
#
interface Vlanif5
ip address 100.2.1.1 255.255.255.0
isis enable 1
mpls
mpls te
mpls te max-link-bandwidth 100000
interface LoopBack1
ip address 3.3.3.9 255.255.255.255
isis enable 1
#
interface Tunnel1/0/0
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 1.1.1.9
mpls te tunnel-id 100
mpls te bandwidth bc0 20000
mpls te reserved-for-binding
mpls te commit
#
tunnel-policy policy1
tunnel binding destination 1.1.1.9 te tunnel1/0/0
#
return
Networking Requirements
As shown in Figure 5-198, S9300-A, S9300-B, and S9300-C are on the VPN backbone network.
OSPF runs among the S9300s.
GRE is used between S9300-A and S9300-C to implement the interworking between PC1 and
PC2.
PC1 and PC2 use S9300-A and S9300-C as their default gateways.
GE1/0/0 GE2/0/0
GE1/0/0 GE1/0/0
S9300-A S9300-C
Tunnel7/0/0 Tunnel7/0/0
GE2/0/0 40.1.1.1/24 40.1.1.2/24 GE2/0/0
PC1 PC2
10.1.1.1/24 10.2.1.1/24
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l IDs of the VLANs that the interfaces belong to, as shown in Figure 5-198
l IP address of VLANIF interfaces, as shown in Figure 5-198
l Data for configuring OSPF
l Source address and destination address of the GRE tunnel, and IP addresses of tunnel
interfaces
Procedure
Step 1 Assign the IP address to each interface.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] vlan 10
[S9300-A-vlan10] quit
[S9300-A] vlan 30
[S9300-A-vlan30] quit
[S9300-A] interface GigabitEthernet 1/0/0
[S9300-A-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[S9300-A-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[S9300-A-GigabitEthernet1/0/0] quit
[S9300-A] interface GigabitEthernet 2/0/0
[S9300-A-GigabitEthernet2/0/0] port hybrid pvid vlan 30
[S9300-A-GigabitEthernet2/0/0] port hybrid untagged vlan 30
[S9300-A-GigabitEthernet2/0/0] quit
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] ip address 20.1.1.1 24
[S9300-A-Vlanif10] quit
[S9300-A] interface vlanif 30
[S9300-A-Vlanif30] ip address 10.1.1.2 24
[S9300-A-Vlanif30] quit
The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A, and
are not mentioned here.
# Configure S9300-A.
[S9300-A] ospf 1
[S9300-A-ospf-1] area 0
[S9300-A-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255
[S9300-A-ospf-1-area-0.0.0.0] quit
[S9300-A-ospf-1] quit
The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A, and
are not mentioned here.
# Run the display ip routing-table command on S9300-A and S9300-C. You can find that they
learn the OSPF routes destined for the network segment of the peer.
# Take S9300-A for example. The information is displayed as follows:
[S9300-A] display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 12 Routes : 12
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.1.1.0/24 Direct 0 0 D 10.1.1.2 Vlanif30
10.1.1.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.1.1.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
20.1.1.0/24 Direct 0 0 D 20.1.1.1 Vlanif10
20.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
20.1.1.2/32 Direct 0 0 D 20.1.1.2 Vlanif10
20.1.1.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
30.1.1.0/24 OSPF 10 2 D 20.1.1.2 Vlanif10
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
# Configure S9300-C.
[S9300-C] interface tunnel 1/0/1
[S9300-C-Tunnel1/0/1] tunnel-protocol gre
[S9300-C-Tunnel1/0/1] ip address 40.1.1.2 255.255.255.0
[S9300-C-Tunnel1/0/1] source 30.1.1.2
[S9300-C-Tunnel1/0/1] destination 20.1.1.1
[S9300-C-Tunnel1/0/1] quit
# After the configuration, the status of tunnel interfaces is Up, and the tunnel interfaces can ping
each other.
# Take S9300-A for example. The information is displayed as follows:
[S9300-A] ping -a 40.1.1.1 40.1.1.2
PING 40.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 40.1.1.2: bytes=56 Sequence=1 ttl=255 time=24 ms
Reply from 40.1.1.2: bytes=56 Sequence=2 ttl=255 time=33 ms
Reply from 40.1.1.2: bytes=56 Sequence=3 ttl=255 time=48 ms
Reply from 40.1.1.2: bytes=56 Sequence=4 ttl=255 time=33 ms
Reply from 40.1.1.2: bytes=56 Sequence=5 ttl=255 time=36 ms
--- 40.1.1.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 24/34/48 ms
# Configure S9300-C.
[S9300-C] ip route-static 10.1.1.0 255.255.255.0 tunnel 1/0/1
# Run the display ip routing-table command on S9300-A and S9300-C. You can see the static
route from the tunnel interface to the use-side network segment of the peer.
# Take S9300-A for example. The information is displayed as follows:
[S9300-A] display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 16 Routes : 16
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.1.1.0/24 Direct 0 0 D 10.1.1.2 Vlanif30
10.1.1.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.1.1.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
10.2.1.0/24 Static 60 0 D 40.1.1.1 Tunnel1/0/1
20.1.1.0/24 Direct 0 0 D 20.1.1.1 Vlanif10
20.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
20.1.1.2/32 Direct 0 0 D 20.1.1.2 Vlanif10
20.1.1.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
30.1.1.0/24 OSPF 10 2 D 20.1.1.2 Vlanif10
40.1.1.0/24 Direct 0 0 D 40.1.1.1 Tunnel1/0/1
40.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
40.1.1.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10 30
#
interface Vlanif10
ip address 20.1.1.1 255.255.255.0
#
interface Vlanif30
ip address 10.1.1.2 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
interface Tunnel1/0/1
ip address 40.1.1.1 255.255.255.0
tunnel-protocol gre
source 20.1.1.1
destination 30.1.1.2
#
ospf 1
area 0.0.0.0
Example for Configuring the Dynamic Routing Protocol on the GRE Tunnel
Networking Requirements
As shown in Figure 5-199, OSPF runs among the S9300-A, S9300-B, and S9300-C.
GRE is used between S9300-A and S9300-C to implement the interworking between PC1 and
PC2.
PC1 and PC2 use S9300-A and S9300-C as their default gateways.
S9300-B
GE1/0/0 GE2/0/0
OSPF 1
GE1/0/0 GE1/0/0
S9300-A S9300-C
Tunnel
Tunnel1/0/1 Tunnel2/0/1
GE2/0/0 GE2/0/0
OSPF 2 OSPF 2
PC1 PC2
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l IDs of the VLANs that the interfaces belong to, as shown in Figure 5-199
l IP address of the VLANIF interfaces , as shown in Figure 5-199
l Source addresses and destination addresses on the two ends of the GRE tunnel
l IP addresses of the interfaces on the two ends of the GRE tunnel
Procedure
Step 1 Assign the IP address to each interface.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] vlan batch 10 30
[S9300-A] interface gigabitEthernet 1/0/0
[S9300-A-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[S9300-A-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[S9300-A-GigabitEthernet1/0/0] quit
[S9300-A] interface gigabitEthernet 2/0/0
[S9300-A-GigabitEthernet2/0/0] port hybrid pvid vlan 30
[S9300-A-GigabitEthernet2/0/0] port hybrid untagged vlan 30
[S9300-A-vlan30] quit
[S9300-A] interface vlanif 10
[S9300-A-Vlanif10] ip address 20.1.1.1 24
[S9300-A-Vlanif10] quit
[S9300-A] interface vlanif 30
[S9300-A-Vlanif30] ip address 10.1.1.2 24
[S9300-A-Vlanif30] quit
The configurations of S9300-B and S9300-C are similar to the configuration of S9300-A, and
are not mentioned here.
The configuration procedure is the same as that in Example for Configuring Static Routes on
the GRE Tunnel.
The configuration procedure is the same as that in Example for Configuring Static Routes on
the GRE Tunnel.
# Configure S9300-A.
[S9300-A] ospf 1
[S9300-A-ospf-1] area 0
[S9300-A-ospf-1-area-0.0.0.0] network 40.1.1.0 0.0.0.255
[S9300-A-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[S9300-A-ospf-1-area-0.0.0.0] quit
[S9300-A-ospf-1] quit
# Configure S9300-C.
[S9300-C] ospf 1
[S9300-C-ospf-1] area 0
[S9300-C-ospf-1-area-0.0.0.0] network 40.1.1.0 0.0.0.255
[S9300-C-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
[S9300-C-ospf-1-area-0.0.0.0] quit
[S9300-C-ospf-1] quit
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10 30
#
interface Vlanif10
ip address 20.1.1.1 255.255.255.0
#
interface Vlanif30
ip address 10.1.1.2 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface Tunnel1/0/1
ip address 40.1.1.1 255.255.255.0
tunnel-protocol gre
source 20.1.1.1
destination 30.1.1.2
#
ospf 1
area 0.0.0.0
network 20.1.1.0 0.0.0.255
Example for Configuring the CE to Access a VPN Through a GRE Tunnel of the
Public Network
Networking Requirements
As shown in Figure 5-200,
Figure 5-200 Networking diagram in which CEs access a VPN through the GRE tunnel of the
public network
Loopback1
Loopback1
PE1
S9300-A GE2/0/0 GE2/0/0 PE2
GE1/0/0 GE1/0/0
GE1/0/0 GE2/0/0
el Tunnel1/0/0
nn
GE2/0/0 Tu
GE1/0/0
CE1 Tunnel2/0/0 CE2
GE2/0/0
GE1/0/0
PC1 PC1
Tunnel2/0/0 - 2.2.2.1/24
Tunnel1/0/0 - 2.2.2.2/24
Configuration Roadmap
PE1 and CE1 are indirectly connected. So the VPN instance on PE1 cannot be bound to the
physical interface on PE1. In such a situation, a GRE tunnel is required between CE1 and PE1.
vpn1 on PE1 can then be bound to the GRE tunnel, and CE1 can access the VPN through the
GRE tunnel.
1. Configure OSPF 10 on PE1 and PE2 to implement the interworking between the two
devices, and then enable MPLS.
2. Configure OSPF 20 on CE1, S9300-A, and PE1 to implement the interworking between
the three devices.
3. Establish a GRE tunnel between CE1 and PE1.
4. Create VPN instances vpn1 on PE1 and PE2. Then bind the VPN instance on PE1 to the
GRE tunnel interface, and bind the VPN instance on PE2 to the connected physical interface
of CE2.
5. Configure IS-IS routes between CE1 and PE1, and between CE2 and PE2 to implement
the interworking between the CEs and PEs.
6. Configure BGP on PEs to implement the interworking between CE1 and CE2.
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Configure the IP address for each VLANIF interface and the routing protocol for the MPLS
backbone network.
Configure OSPF10 on PE1 and PE2, and then configure MPLS and LDP. The detailed
configurations are not mentioned here.
Configure OSPF 20 on CE1, S9300-A, and PE1. The detailed configurations are not mentioned
here.
# Configure PE1.
[PE1] interface tunnel 1/0/0
[PE1-Tunnel1/0/0] ip address 2.2.2.2 255.255.255.0
[PE1-Tunnel1/0/0] tunnel-protocol gre
[PE1-Tunnel1/0/0] source 50.1.1.2
[PE1-Tunnel1/0/0] destination 30.1.1.1
[PE1-Tunnel1/0/0] quit
# After the configuration, a GRE tunnel is established between CE1 and PE1.
Step 4 Create a VPN instance named vpn1 on PE1 and bind the VPN instance to the GRE tunnel.
[PE1]ip vpn-instance vpn1
[PE1-vpn-instance-vpn1] route-distinguisher 100:1
[PE1-vpn-instance-vpn1] vpn-target 111:1 export-extcommunity
[PE1-vpn-instance-vpn1] vpn-target 111:1 import-extcommunity
[PE1-vpn-instance-vpn1] quit
[PE1] interface tunnel 1/0/0
[PE1-Tunnel1/0/0] ip binding vpn-instance vpn1
[PE1-Tunnel1/0/0] ip address 2.2.2.2 255.255.255.0
[PE1-Tunnel1/0/0] quit
Step 5 Create a VPN instance named vpn1 on PE2 and bind the VPN instance to the VLANIF interface.
[PE2]ip vpn-instance vpn1
[PE2-vpn-instance-vpn1] route-distinguisher 200:1
[PE2-vpn-instance-vpn1] vpn-target 111:1 export-extcommunity
[PE2-vpn-instance-vpn1] vpn-target 111:1 import-extcommunity
[PE2-vpn-instance-vpn1] quit
[PE2] interface vlanif 60
[PE2-Vlanif60] ip binding vpn-instance vpn1
[PE2-Vlanif60] ip address 11.1.1.2 255.255.255.0
[PE2-Vlanif60] quit
# Configure PE1.
[PE1] isis 50 vpn-instance vpn1
[PE1-isis-50] network-entity 50.0000.0000.0002.00
[PE1-isis-50] quit
[PE1] interface tunnel1/0/0
[PE1-Tunnel1/0/0] isis enable 50
[PE1-Tunnel1/0/0] quit
# Configure CE2.
[CE2] isis 50
[CE2-isis-50] network-entity 50.0000.0000.0004.00
[CE2-isis-50] quit
[CE2] interface vlanif 50
[CE2-Vlanif50] isis enable 50
[CE2-Vlanif50] quit
[CE2] interface vlanif 60
[CE2-Vlanif60] isis enable 50
[CE2-Vlanif60] quit
# Configure PE2.
[PE2] isis 50 vpn-instance vpn1
[PE2-isis-50] network-entity 50.0000.0000.0003.00
[PE2-isis-50] quit
[PE2] interface vlanif50
[PE2-Vlanif50] isis enable 50
[PE2-Vlanif50] quit
Step 8 Set up the MP-BGP peer relationship between PE1 and PE2.
# On PE1, specify PE2 as an IBGP peer, set up the IBGP connection by using the loopback
interface, and enable the capability of exchanging VPN IPv4 routing information between PE1
and PE2.
[PE1] bgp 100
[PE1-bgp] peer 3.3.3.9 as-number 100
[PE1-bgp] peer 3.3.3.9 connect-interface loopback 1
[PE1-bgp] ipv4-family vpnv4
[PE1-bgp-af-vpnv4] peer 3.3.3.9 enable
[PE1-bgp-af-vpnv4] quit
# Enter the view of the BGP VPN instance vpn1 and import the direct routes and IS-IS routes.
[PE1-bgp] ipv4-family vpn-instance vpn1
[PE1-bgp-vpn1] import-route direct
[PE1-bgp-vpn1] import-route isis 50
# On PE2, specify PE1 as an IBGP peer, set up the IBGP connection by using the loopback
interface, and enable the capability of exchanging VPN IPv4 routing information between PE2
and PE1.
[PE2] bgp 100
[PE2-bgp] peer 1.1.1.9 as-number 100
[PE2-bgp] peer 1.1.1.9 connect-interface loopback 1
[PE2-bgp] ipv4-family vpnv4
[PE2-bgp-af-vpnv4] peer 1.1.1.9 enable
[PE2-bgp-af-vpnv4] quit
# Enter the view of the BGP VPN instance vpn1 and import the direct routes and IS-IS routes.
[PE2-bgp] ipv4-family vpn-instance vpn1
[PE2-bgp-vpn1] import-route direct
[PE2-bgp-vpn1] import-route isis 50
# Configure PE2.
[PE2] isis 50
[PE2-isis-50] import-route bgp
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10 20
#
isis 50
network-entity 50.0000.0000.0001.00
#
interface Vlanif10
ip address 21.1.1.2 255.255.255.0
isis enable 50
#
interface Vlanif20
ip address 30.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid ubtagged vlan 10
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid ubtagged vlan 20
#
interface Tunnel2/0/0
ip address 2.2.2.1 255.255.255.0
tunnel-protocol gre
source 30.1.1.1
destination 50.1.1.2
isis enable 50
#
ospf 20
area 0.0.0.0
network 30.1.1.0 0.0.0.255
#
return
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 20 30
#
interface Vlanif20
ip address 30.1.1.2 255.255.255.0
#
interface Vlanif30
ip address 50.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid ubtagged vlan 20
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid ubtagged vlan 30
#
ospf 20
area 0.0.0.0
network 30.1.1.0 0.0.0.255
network 50.1.1.0 0.0.0.255
#
return
l Configuration file of PE1
#
sysname PE1
#
vlan batch 30 40
#
ip vpn-instance vpn1
route-distinguisher 100:1
vpn-target 111:1 export-extcommunity
vpn-target 111:1 import-extcommunity
#
mpls lsr-id 1.1.1.9
mpls
lsp-trigger all
#
mpls ldp
#
isis 50 vpn-instance vpn1
network-entity 50.0000.0000.0002.00
import-route bgp
#
interface Vlanif30
ip binding vpn-instance vpn1
ip address 50.1.1.2 255.255.255.0
#
interface Vlanif40
ip address 110.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid ubtagged vlan 30
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 40
port hybrid ubtagged vlan 40
#
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
#
interface Tunnel1/0/0
ip binding vpn-instance vpn1
ip address 2.2.2.2 255.255.255.0
tunnel-protocol gre
source 50.1.1.2
destination 30.1.1.1
isis enable 50
#
bgp 100
peer 3.3.3.9 as-number 100
peer 3.3.3.9 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 3.3.3.9 enable
#
ipv4-family vpnv4
policy vpn-target
peer 3.3.3.9 enable
#
ipv4-family vpn-instance vpn1
import-route direct
import-route isis 50
#
ospf 10
area 0.0.0.0
network 1.1.1.9 0.0.0.0
network 110.1.1.0 0.0.0.255
#
ospf 20
area 0.0.0.0
network 50.1.1.0 0.0.0.255
#
return
l Configuration file of PE2
#
sysname PE2
#
vlan batch 40 50
#
ip vpn-instance vpn1
route-distinguisher 200:1
vpn-target 111:1 export-extcommunity
vpn-target 111:1 import-extcommunity
#
mpls lsr-id 3.3.3.9
mpls
lsp-trigger all
#
mpls ldp
#
isis 50 vpn-instance vpn1
network-entity 50.0000.0000.0003.00
import-route bgp
#
interface Vlanif40
ip address 110.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif50
ip binding vpn-instance vpn1
ip address 11.1.1.2 255.255.255.0
isis enable 50
#
interface GigabitEthernet1/0/0
Networking Requirements
As shown in Figure 5-201, S9300 A and S9300 B are configured with the GRE protocol. The
two ends of the GRE tunnel need be configured with the Keepalive function.
Figure 5-201 Networking diagram of configuring the Keepalive function on two ends of a GRE
tunnel
Tunnel1/0/0 - 40.1.1.1/24
Tunnel1/0/0 - 40.1.1.2/24
Configuration Roadmap
To enable the Keepalive function on one end of the GRE tunnel, run the keepalive command in
the tunnel interface view on the end.
TIP
If the Keepalive function is enabled on the source end, the forwarding function is obligatory, and the
Keepalive function is optional for the destination end.
Data Preparation
To complete the configuration, you need the following data:
l Data for configuring the routing protocol for the backbone network
l Source address and destination address of the GRE tunnel
l Interval for sending Keepalive messages
l Parameters of unreachable timer
Procedure
Step 1 Configure S9300-A and S9300-B to implement the interworking between the two devices.
The detailed procedures are not mentioned here.
Step 2 Configure a tunnel on S9300-A and enable the Keepalive function.
<S9300-A> system-view
[S9300-A] interface tunnel 1/0/0
[S9300-A-Tunnel1/0/0] ip address 40.1.1.1 255.255.255.0
[S9300-A-Tunnel1/0/0] tunnel-protocol gre
[S9300-A-Tunnel1/0/0] source 20.1.1.1
[S9300-A-Tunnel1/0/0] destination 30.1.1.2
[S9300-A-Tunnel1/0/0] keepalive period 20 retry-times 3
[S9300-A-Tunnel1/0/0] quit
<S9300-B> system-view
[S9300-B] interface tunnel 1/0/0
[S9300-B-Tunnel1/0/0] ip address 40.1.1.2 255.255.255.0
[S9300-B-Tunnel1/0/0] tunnel-protocol gre
[S9300-B-Tunnel1/0/0] source 30.1.1.2
[S9300-B-Tunnel1/0/0] destination 20.1.1.1
[S9300-B-Tunnel1/0/0] keepalive period 20 retry-times 3
[S9300-B-Tunnel1/0/0] quit
# Enable the debugging of the Keepalive messages on S9300-A and view information about the
Keepalive messages.
<S9300A> debugging tunnel keepalive
*0.21628063 S9300A TUNNEL/7/debug:GRE_KEEP:Judge keepalive finished. Keepalive
packet from peer router.
*0.21628064 S9300A TUNNEL/7/debug:GRE_FWD: Receive peer keepalive on mainboard
successfully. Put into decapsulation.
*0.21628064 S9300A TUNNEL/7/debug:Slot=1;GRE_KEEP:Judge keepalive finished. Ke
epalive packet from peer router.
*0.21628064 S9300A TUNNEL/7/debug:Slot=1;GRE_FWD: IO board received keepalive
packet, resend to mainboard.
----End
Configuration Files
l Configuration file of S9300-A
#
sysname S9300-A
#
vlan batch 10
#
interface Vlanif10
ip address 20.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface Tunnel1/0/0
ip address 40.1.1.1 255.255.255.0
source 20.1.1.1
destination 30.1.1.2
keepalive period 20
#
return
#
vlan batch 20
#
interface Vlanif20
ip address 30.1.1.2 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface Tunnel1/0/0
ip address 40.1.1.2 255.255.255.0
source 30.1.1.2
destination 20.1.1.1
keepalive period 20
#
return
Networking Requirements
As shown in Figure 5-202, CE1 and CE3 belong to VPN-A and CE2 and CE4 belong to VPN-
B. The VPN target of VPN-A is 111:1, and VPN target of VPN-B is 222:2. The users in different
VPNs cannot access each other.
CE1 CE3
GE1/0/0 GE1/0/0
Loopback1
2.2.2.9/32
GE1/0/0 GE1/0/0
PE1 PE2
GE1/0/0 GE2/0/0
Loopback1 Loopback1
1.1.1.9/32 GE3/0/0 GE3/0/0 3.3.3.9/32
GE2/0/0 P GE2/0/0
MPLS backbone
AS: 100
GE1/0/0 GE1/0/0
CE2 CE4
VPN-B VPN-B
AS: 65420 AS: 65440
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure VPN instances on the PEs connected to CEs on the backbone network and bind
related VPNs to the interfaces connected to the CEs.
2. Configure OSPF on the PEs to implement interconnection between PEs.
3. Configure the basic MPLS capabilities and LDP and create an MPLS LSP.
4. Configure MP-IBGP for exchanging routing information between the VPNs.
5. Configure EBGP for exchanging VPN routing information between the CE and PE.
Data Preparation
To complete the configuration, you need the following data:
l IDs of the VLANs that the interfaces belong to, as shown in Figure 5-202
l IP address of each VLAN interface, as shown in Figure 5-202
l MPLS LSR-IDs of PE and P
l RDs of VPN-A and VPN-B
l VPN targets of received and sent routes of VPN-A and VPN-B
Procedure
Step 1 Configure IGP on the MPLS backbone network so that PEs and P can interwork.
# Configure PE1.
<Quidway> system-view
[Quidway] sysname PE1
[PE1] interface loopback 1
[PE1-LoopBack1] ip address 1.1.1.9 32
[PE1-LoopBack1] quit
[PE1] vlan batch 10 20 30
[PE1] interface GigabitEthernet 1/0/0
[PE1-GigabitEthernet1/0/0]port hybrid pvid vlan 10
[PE1-GigabitEthernet1/0/0]port hybrid untagged vlan 10
[PE1-GigabitEthernet1/0/0] quit
[PE1] interface GigabitEthernet 2/0/0
[PE1-GigabitEthernet2/0/0]port hybrid pvid vlan 20
[PE1-GigabitEthernet2/0/0]port hybrid untagged vlan 20
[PE1-GigabitEthernet2/0/0] quit
[PE1] interface GigabitEthernet 3/0/0
[PE1-GigabitEthernet3/0/0]port hybrid pvid vlan 30
[PE1-GigabitEthernet3/0/0]port hybrid untagged vlan 30
[PE1-GigabitEthernet3/0/0] quit
[PE1] interface vlanif 30
[PE1-Vlanif30] ip address 172.1.1.1 24
[PE1-Vlanif30] quit
[PE1] ospf
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] network 172.1.1.0 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
# Configure the P.
<Quidway> system-view
[Quidway] sysname P
[P] interface loopback 1
[P-LoopBack1] ip address 2.2.2.9 32
[P-LoopBack1] quit
[P] vlan 30 60
[P] interface GigabitEthernet 1/0/0
# Configure PE2.
<Quidway> system-view
[Quidway] sysname PE2
[PE2] interface loopback 1
[PE2-LoopBack1] ip address 3.3.3.9 32
[PE2-LoopBack1] quit
[PE2] vlan 40
[PE2-vlan40] port GigabitEthernet 1/0/0
[PE2-vlan40] quit
[PE2] vlan 50
[PE2-vlan50] port GigabitEthernet 2/0/0
[PE2-vlan50] quit
[PE2] vlan 60
[PE2-vlan60] port GigabitEthernet 3/0/0
[PE2-vlan60] quit
[PE2] interface vlanif 60
[PE2-Vlanif20] ip address 172.2.1.2 24
[PE2-Vlanif20] quit
[PE2] ospf
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 172.2.1.0 0.0.0.255
[PE2-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
After the configuration, OSPF adjacencies are established between PE1, P, and PE2. By running
the display ospf peer command, you can see that the status of the OSPF adjacency is Full. By
running the display ip routing-table command, you can see that the PEs can learn the routes
of each other's Loopback1 interface.
Take PE1 for example.
[PE1] display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 9 Routes : 9
Step 2 Configure basic MPLS functions and MPLS LDP on the MPLS backbone network and set up
LDP LSPs.
# Configure PE1.
[PE1] mpls lsr-id 1.1.1.9
[PE1] mpls
[PE1-mpls] quit
[PE1] mpls ldp
[PE1-mpls-ldp] quit
[PE1] interface vlanif 30
[PE1-Vlanif30] mpls
[PE1-Vlanif30] mpls ldp
[PE1-Vlanif30] quit
# Configure the P.
[P] mpls lsr-id 2.2.2.9
[P] mpls
[P-mpls] quit
[P] mpls ldp
[P-mpls-ldp] quit
[P] interface vlanif 30
[P-Vlanif30] mpls
[P-Vlanif30] mpls ldp
[P-Vlanif30] quit
[P] interface vlanif 60
[P-Vlanif60] mpls
[P-Vlanif60] mpls ldp
[P-Vlanif60] quit
# Configure PE2.
[PE2] mpls lsr-id 3.3.3.9
[PE2] mpls
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlanif 60
[PE2-Vlanif60] mpls
[PE2-Vlanif60] mpls ldp
[PE2-Vlanif60] quit
After the configuration, LDP sessions are established between PE1 and P, and between P and
PE2. By running the display mpls ldp session command, you can see that the status of the LSP
sessions is Operational. By running the display mpls ldp lsp command, you can see the
establishment status of the LDP LSP.
Take PE1 for example.
------------------------------------------------------------------------------
Step 3 Configure VPN instances on each PE and connect the CEs to the PEs.
# Configure PE1.
[PE1] ip vpn-instance vpna
[PE1-vpn-instance-vpna] route-distinguisher 100:1
[PE1-vpn-instance-vpna] vpn-target 111:1 both
[PE1-vpn-instance-vpna] quit
[PE1] ip vpn-instance vpnb
[PE1-vpn-instance-vpnb] route-distinguisher 100:2
[PE1-vpn-instance-vpnb] vpn-target 222:2 both
[PE1-vpn-instance-vpnb] quit
[PE1] interface vlanif 10
[PE1-Vlanif10] ip binding vpn-instance vpna
[PE1-Vlanif10] ip address 10.1.1.2 24
[PE1-Vlanif10] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] ip binding vpn-instance vpnb
[PE1-Vlanif20] ip address 10.2.1.2 24
[PE1-Vlanif20] quit
# Configure PE2.
[PE2] ip vpn-instance vpna
[PE2-vpn-instance-vpna] route-distinguisher 200:1
[PE2-vpn-instance-vpna] vpn-target 111:1 both
[PE2-vpn-instance-vpna] quit
[PE2] ip vpn-instance vpnb
[PE2-vpn-instance-vpnb] route-distinguisher 200:2
[PE2-vpn-instance-vpnb] vpn-target 222:2 both
[PE2-vpn-instance-vpnb] quit
[PE2] interface vlanif 40
[PE2-Vlanif40] ip binding vpn-instance vpna
[PE2-Vlanif40] ip address 10.3.1.2 24
[PE2-Vlanif40] quit
[PE2] interface vlanif 50
[PE2-Vlanif50] ip binding vpn-instance vpnb
[PE2-Vlanif50] ip address 10.4.1.2 24
[PE2-Vlanif50] quit
# Configure IP addresses of the interfaces on the CEs according to Figure 5-202. The
configuration procedure is not given here.
After the configuration, run the display ip vpn-instance verbose command on the PEs, and you
can see the configuration of the VPN instances. The PEs can ping the connected CEs
successfully.
NOTE
If multiple interfaces on a PE are bound to the same VPN, you must specify the source address when you
run the ping -vpn-instance command to ping the CE connected to the peer PE. That is, specify -a source-
ip-address in the ping -vpn-instance vpn-instance-name -a source-ip-address destination-address
command. Otherwise, the ping operation may fail.
Step 4 Set up EBGP peer relation between the PE and the CE and import VPN routes.
# Configure CE1.
[CE1] bgp 65410
[CE1-bgp] peer 10.1.1.2 as-number 100
[CE1-bgp] import-route direct
NOTE
The configuration procedures of CE2, CE3 and CE4 are similar to the configuration procedure of CE1 and
are not mentioned here.
# Configure PE1.
NOTE
The configuration procedure of PE2 is similar to the configuration procedure of PE1 and is not mentioned
here.
After the configuration, run the display bgp vpnv4 vpn-instance peer command on a PE, and
you can find that the BGP peer relation between the PE and CE is in Established state.
Take the peer relation between PE1 and CE1 for example:
[PE1] display bgp vpnv4 vpn-instance vpna peer
# Configure PE1.
[PE1] bgp 100
[PE1-bgp] peer 3.3.3.9 as-number 100
[PE1-bgp] peer 3.3.3.9 connect-interface loopback 1
[PE1-bgp] ipv4-family vpnv4
[PE1-bgp-af-vpnv4] peer 3.3.3.9 enable
[PE1-bgp-af-vpnv4] quit
[PE1-bgp] quit
# Configure PE2.
[PE2] bgp 100
[PE2-bgp] peer 1.1.1.9 as-number 100
[PE2-bgp] peer 1.1.1.9 connect-interface loopback 1
[PE2-bgp] ipv4-family vpnv4
[PE2-bgp-af-vpnv4] peer 1.1.1.9 enable
[PE2-bgp-af-vpnv4] quit
After the configuration, run the display bgp peer or display bgp vpnv4 all peer command, and
you can see that the BGP peer relation between the PEs is in Established state.
[PE1] display bgp peer
The CEs in the same VPN can ping each other, but the CEs in different VPNs cannot ping each
other.
For example, CE1 can ping CE3 (10.3.1.1) but cannot ping CE4 (10.4.1.1).
[CE1] ping 10.3.1.1
PING 10.3.1.1: 56 data bytes, press CTRL_C to break
Reply from 10.3.1.1: bytes=56 Sequence=1 ttl=253 time=72 ms
Reply from 10.3.1.1: bytes=56 Sequence=2 ttl=253 time=34 ms
Reply from 10.3.1.1: bytes=56 Sequence=3 ttl=253 time=50 ms
Reply from 10.3.1.1: bytes=56 Sequence=4 ttl=253 time=50 ms
Reply from 10.3.1.1: bytes=56 Sequence=5 ttl=253 time=34 ms
--- 10.3.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 34/48/72 ms
[CE1] ping 10.4.1.1
PING 10.4.1.1: 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out
----End
Configuration Files
l Configuration file of PE1
#
sysname PE1
#
vlan batch 10 20 30
#
ip vpn-instance vpna
route-distinguisher 100:1
vpn-target 111:1 export-extcommunity
vpn-target 111:1 import-extcommunity
ip vpn-instance vpnb
route-distinguisher 100:2
vpn-target 222:2 export-extcommunity
vpn-target 222:2 import-extcommunity
#
mpls lsr-id 1.1.1.9
mpls
#
mpls ldp
#
interface Vlanif10
ip binding vpn-instance vpna
ip address 10.1.1.2 255.255.255.0
#
interface Vlanif20
ip binding vpn-instance vpnb
ip address 10.2.1.2 255.255.255.0
#
interface Vlanif30
ip address 172.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
#
bgp 100
peer 3.3.3.9 as-number 100
peer 3.3.3.9 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 3.3.3.9 enable
#
ipv4-family vpnv4
policy vpn-target
peer 3.3.3.9 enable
#
ipv4-family vpn-instance vpna
peer 10.1.1.1 as-number 65410
import-route direct
#
ipv4-family vpn-instance vpnb
peer 10.2.1.1 as-number 65420
import-route direct
#
ospf 1
area 0.0.0.0
network 172.1.1.0 0.0.0.255
network 1.1.1.9 0.0.0.0
#
return
l Configuration file of P
#
sysname P
#
vlan batch 30 60
#
mpls lsr-id 2.2.2.9
mpls
#
mpls ldp
#
interface Vlanif30
ip address 172.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif60
ip address 172.2.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 60
port hybrid untagged vlan 60
#
interface LoopBack1
ip address 2.2.2.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 172.1.1.0 0.0.0.255
network 172.2.1.0 0.0.0.255
network 2.2.2.9 0.0.0.0
#
return
l Configuration file of PE2
#
sysname PE2
#
vlan batch 40 50 60
#
ip vpn-instance vpna
route-distinguisher 200:1
vpn-target 111:1 export-extcommunity
vpn-target 111:1 import-extcommunity
#
ip vpn-instance vpnb
route-distinguisher 200:2
interface LoopBack1
ip address 3.3.3.9 255.255.255.255
#
bgp 100
peer 1.1.1.9 as-number 100
peer 1.1.1.9 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 1.1.1.9 enable
#
ipv4-family vpnv4
policy vpn-target
peer 1.1.1.9 enable
#
ipv4-family vpn-instance vpna
peer 10.3.1.1 as-number 65430
import-route direct
#
ipv4-family vpn-instance vpnb
peer 10.4.1.1 as-number 65440
import-route direct
#
ospf 1
area 0.0.0.0
network 172.2.1.0 0.0.0.255
network 3.3.3.9 0.0.0.0
#
return
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
bgp 65410
peer 10.1.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
import-route direct
peer 10.1.1.2 enable
#
return
l Configuration file of CE2
#
sysname CE2
#
vlan batch 20
#
interface Vlanif20
ip address 10.2.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
bgp 65420
peer 10.2.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
import-route direct
peer 10.2.1.2 enable
#
return
l Configuration file of CE3
#
sysname CE3
#
vlan batch 40
#
interface Vlanif40
ip address 10.3.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
bgp 65430
peer 10.3.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
import-route direct
peer 10.3.1.2 enable
#
return
l Configuration file of CE4
#
sysname CE4
#
vlan batch 50
#
interface Vlanif50
bgp 65440
peer 10.4.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
import-route direct
peer 10.4.1.2 enable
#
return
Networking Requirements
As shown in Figure 5-203, CE1 and CE2 belong to the same VPN and access PE1 and PE2
respectively.
GE1/0/0 GE2/0/0
PE1 PE2
GE2/0/0 GE2/0/0
GE1/0/0 GE1/0/0
P
Backbone
GE1/0/0 GE1/0/0
AS 100
CE1 CE2
GE2/0/0 GE2/0/0
VPN1 VPN1
AS 600 AS 600
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable IGP on the backbone network to implement interworking between PEs, and between
PE and P so that they can learn loopback address of each other.
2. Create an MPLS LDP LSP between the PEs, create VPN instances on PEs, and connect
PEs to CEs.
3. Establish EBGP adjacencies between the PEs and CEs to import routes of the CEs to the
PEs.
4. Configure BGP ASN substitution on PEs.
Data Preparation
To complete the configuration, you need the following data:
l MPLS LSR-IDs of PE and P
l VPN instances on PE1 and PE2
l ASN used by CE1 and CE2, which is different from the ASN of the backbone network
Procedure
Step 1 Configure basic BGP/MPLS IP VPN.
The configurations are as follows:
l Configure OSPF on the MPLS backbone so that the PE and P can learn routes of the loopback
interface from each other.
l Enable MPLS capability and MPLS LDP on the MPLS backbone and establish an LDP LSP.
l Establish an MP-IBGP adjacency between PEs and advertise VPNv4 routes.
l Configure VPN instance of VPN1 on PE2 and connect PE2 to CE2.
l Configure VPN instance of VPN1 on PE1 and connect PE1 to CE1.
l Configure BGP between PE1 and CE1, and between PE2 and CE2. Import routes of the CEs
to PEs.
After the configuration, run the display ip routing-table command on CE2. You can see that
CE2 can learn the route of the network segment (10.1.1.0/24) of the interface connecting PE1
to CE1, but there is no route to VPN (100.1.1.0/24) of CE1. When you run the display ip routing-
table command on CE1, you can see the similar information.
Run the display ip routing-table vpn-instance command on PEs, and you can see the routes
to the VPNs of the peer CEs.
Enable debugging of the BGP Update packets on PE2. The debugging information shows that
PE2 advertises the route to 100.1.1.0/24 and the AS path information is "100 600".
<PE2> terminal monitor
<PE2> terminal debugging
<PE2> debugging bgp update vpn-instance vpn1 peer 10.2.1.1 verbose
<PE2> refresh bgp vpn-instance vpn1 all export
*0.4402392 PE2 RM/7/RMDEBUG:
BGP.vpn1: Send UPDATE to 10.2.1.1 for following destinations :
Origin : Incomplete
AS Path : 100 600
Next Hop : 10.2.1.2
100.1.1.0/24,
Run the display bgp routing-table peer received-routes command on CE2, and you can see
that CE2 does not accept the route to 100.1.1.0/24.
[CE2] display bgp routing-table peer 10.2.1.2 received-routes
Total Number of Routes: 4
BGP Local router ID is 10.2.1.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 10.1.1.0/24 10.2.1.2 0 100?
* 10.2.1.0/24 10.2.1.2 0 0 100?
* 10.2.1.1/32 10.2.1.2 0 0 100?
In the route advertised to CE2 by PE2, you can see that the AS path information of 100.1.1.0/24
changes from "100 600" to "100 100".
*0.13498737 PE2 RM/7/RMDEBUG:
BGP.vpn1: Send UPDATE to 10.2.1.1 for following destinations :
Origin : Incomplete
AS Path : 100 100
Next Hop : 10.2.1.2
100.1.1.0/24
After BGP ASN substitution is configured on PE1, the GE interfaces of CE1 and CE2 can ping
each other.
[CE1] ping -a 100.1.1.1 200.1.1.1
PING 200.1.1.1: 56 data bytes, press CTRL_C to break
Reply from 200.1.1.1: bytes=56 Sequence=1 ttl=253 time=109 ms
Reply from 200.1.1.1: bytes=56 Sequence=2 ttl=253 time=67 ms
Reply from 200.1.1.1: bytes=56 Sequence=3 ttl=253 time=66 ms
Reply from 200.1.1.1: bytes=56 Sequence=4 ttl=253 time=85 ms
Reply from 200.1.1.1: bytes=56 Sequence=5 ttl=253 time=70 ms
--- 200.1.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 66/79/109 ms
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10 50
#
interface Vanif10
ip address 10.1.1.1 255.255.255.0
#
interface Vlanif50
ip address 100.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
#
bgp 600
peer 10.1.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
import-route direct
peer 10.1.1.2 enable
#
return
l Configuration file of PE1
#
sysname PE1
#
vlan batch 10 20
#
ip vpn-instance vpn1
route-distinguisher 100:1
vpn-target 1:1 export-extcommunity
vpn-target 1:1 import-extcommunity
#
mpls lsr-id 1.1.1.9
mpls
#
mpls ldp
#
interface Vlanif10
ip binding vpn-instance vpn1
ip address 10.1.1.2 255.255.255.0
#
interface Vlanif20
ip address 10.2.1.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
#
bgp 100
peer 3.3.3.9 as-number 100
peer 3.3.3.9 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
mpls
#
mpls ldp
#
interface Vlanif30
ip address 30.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif40
ip binding vpn-instance vpn1
ip address 10.2.1.2 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
interface LoopBack1
ip address 3.3.3.9 255.255.255.255
#
bgp 100
peer 1.1.1.9 as-number 100
peer 1.1.1.9 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 1.1.1.9 enable
#
ipv4-family vpnv4
policy vpn-target
peer 1.1.1.9 enable
#
ipv4-family vpn-instance vpn1
peer 10.2.1.1 as-number 600
peer 10.2.1.1 substitute-as
import-route direct
#
ospf 1
area 0.0.0.0
network 3.3.3.9 0.0.0.0
network 30.1.1.0 0.0.0.255
#
return
l Configuration file of CE2
#
sysname CE2
#
interface Vlanif 40
ip address 10.2.1.1 255.255.255.0
#
interface Vlanif 60
ip address 200.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 60
port hybrid untagged vlan 60
#
bgp 600
peer 10.2.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
import-route direct
peer 10.2.1.2 enable
#
return
Networking Requirements
As shown in Figure 5-204, the communication between Spoke-CEs is controlled by the Hub-
CE in the central site. That is, the traffic between Spoke-CEs is forwarded by the Hub-CE, and
not only by the Hub-PE.
AS: 65430
Hub-CE
GE1/0/0 GE2/0/0
GE3/0/0 GE3/0/1
Hub-PE
GE1/0/0 GE2/0/0
GE2/0/0 GE2/0/0
AS100
GE1/0/0 GE1/0/0
Spoke-CE1 Spoke-CE2
AS: 65410 AS: 65420
Loopback1 - 2.2.2.9/32
Loopback1 - 1.1.1.9/32
Loopback1 - 3.3.3.9/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Set up MP-IBGP peer relation between the Hub-PE and the Spoke-PE. Do not set up MP-
IBGP peer relation between Spoke-PEs.
2. Create two VPN instances on the Hub-PE. The import targets are the export targets of the
two Spoke-PEs the export targets are different from the import targets.
3. Create a VPN instance on the Spoke-PE. The import target is the export target of the Hub-
PE.
4. Run BGP between the CE and PE.
5. Configure the Hub-PE to accept the routes with two repeated ASNs.
Data Preparation
To complete the configuration, you need the following data:
l IDs of the VLANs that the interfaces belong to, as shown in Figure 5-204
l IP address of each VLAN interface, as shown in Figure 5-204
l MPLS LSR IDs of the PEs
l VPN instance names, RDs, and VPN targets of the Hub-PE and Spoke-PE
Procedure
Step 1 Configure IGP on the backbone network to make the Hub-PE and the Spoke-PE communicate
with each other.
In this example, OSPF is used as IGP and the configuration procedure is not mentioned.
After the configuration, an OSPF adjacency can be established between the Hub-PE and the
Spoke-PEs. Run the display ospf peer command, and you can see that the status of the adjacency
is Full. Run the display ip routing-table command, and you can see that the Hub-PE and the
Spoke-PEs can learn the loopback routes of each other.
Step 2 Configure the basic MPLS capability on the backbone network and set up an LDP LSP.
NOTE
The Hub-PE and Spoke-PE devices are directly connected In this example, you need to run label
advertise command to enables the egress node to assign labels normally to the penultimate hop.
After the configuration, LDP peer relation can be set up between the Hub-PE and the Spoke-
PEs. Run the display mpls ldp session command on each S9300, and you can see that the session
status is Operational.
The configuration procedure of the Spoke-PE is similar to the configuration procedure of the
Hub-PE and is not mentioned here.
Step 3 Configure VPN instances on each PE and connect the CEs to the PEs.
NOTE
The VPN targets of the two VPNs on the Hub-PE are advertised by the two Spoke-PE, and the advertised
VPN target is different from the received VPN target. The import VPN target on the Spoke-PE is the export
VPN target on the Hub-PE.
# Configure Spoke-PE1.
<Spoke-PE1> system-view
[Spoke-PE1] ip vpn-instance vpna
[Spoke-PE1-vpn-instance-vpna] route-distinguisher 100:1
[Spoke-PE1-vpn-instance-vpna] vpn-target 100:1 export-extcommunity
[Spoke-PE1-vpn-instance-vpna] vpn-target 200:1 import-extcommunity
[Spoke-PE1-vpn-instance-vpna] quit
[Spoke-PE1] interface vlanif 50
[Spoke-PE1-Vlanif50] ip binding vpn-instance vpna
[Spoke-PE1-Vlanif50] ip address 100.1.1.2 24
[Spoke-PE1-Vlanif50] quit
# Configure Spoke-PE2.
<Spoke-PE2> system-view
[Spoke-PE2] ip vpn-instance vpna
[Spoke-PE2-vpn-instance-vpna] route-distinguisher 100:3
[Spoke-PE2-vpn-instance-vpna] vpn-target 100:1 export-extcommunity
[Spoke-PE2-vpn-instance-vpna] vpn-target 200:1 import-extcommunity
[Spoke-PE2-vpn-instance-vpna] quit
[Spoke-PE2] interface vlanif 60
[Spoke-PE2-Vlanif60] ip binding vpn-instance vpna
[Spoke-PE2-Vlanif60] ip address 120.1.1.2 24
[Spoke-PE2-Vlanif60] quit
[Hub-PE-vpn-instance-vpn_in] quit
[Hub-PE] ip vpn-instance vpn_out
[Hub-PE-vpn-instance-vpn_out] route-distinguisher 100:22
[Hub-PE-vpn-instance-vpn_out] vpn-target 200:1 export-extcommunity
[Hub-PE-vpn-instance-vpn_out] quit
[Hub-PE] interface vlanif 30
[Hub-PE-Vlanif30] ip binding vpn-instance vpn_in
[Hub-PE-Vlanif30] ip address 110.1.1.2 24
[Hub-PE-Vlanif30] quit
[Hub-PE] interface vlanif 40
[Hub-PE-Vlanif40] ip binding vpn-instance vpn_out
[Hub-PE-Vlanif40] ip address 110.2.1.2 24
[Hub-PE-Vlanif40] quit
# Configure the IP addresses of the interfaces on the CEs. The configuration procedure is not
given here.
After the configuration, run the display ip vpn-instance verbose command on the PEs, and you
can see the configuration of the VPN instances. Each PE can ping the connected CEs by using
the ping -vpn-instancevpn-name ip-address command.
NOTE
If multiple interfaces on a PE are bound to the same VPN, you must specify the source address when you
run the ping -vpn-instance command to ping the CE connected to the peer PE. That is, specify -a source-
ip-address in the ping -vpn-instance vpn-instance-name -a source-ip-address destination-address
command. Otherwise, the ping operation may fail.
Step 4 Set up EBGP peer relation between the PE and the CE and import VPN routes.
NOTE
To receive the routes advertised by the Hub-CE, configure the Hub-PE to allow the ASN to be repeated
once.
# Configure Spoke-CE1.
[Spoke-CE1] bgp 65410
[Spoke-CE1-bgp] peer 100.1.1.2 as-number 100
[Spoke-CE1-bgp] import-route direct
[Spoke-CE1-bgp] quit
# Configure Spoke-PE1.
[Spoke-PE1] bgp 100
[Spoke-PE1-bgp] ipv4-family vpn-instance vpna
[Spoke-PE1-bgp-vpna] peer 100.1.1.1 as-number 65410
[Spoke-PE1-bgp-vpna] import-route direct
[Spoke-PE1-bgp-vpna] quit
[Spoke-PE1-bgp] quit
# Configure Spoke-CE2.
[Spoke-CE2] bgp 65420
[Spoke-CE2-bgp] peer 120.1.1.2 as-number 100
[Spoke-CE2-bgp] import-route direct
[Spoke-CE2-bgp] quit
# Configure Spoke-PE2.
[Spoke-PE2] bgp 100
[Spoke-PE2-bgp] ipv4-family vpn-instance vpna
[Spoke-PE2-bgp-vpna] peer 120.1.1.1 as-number 65420
[Spoke-PE2-bgp-vpna] import-route direct
[Spoke-PE2-bgp-vpna] quit
[Spoke-PE2-bgp] quit
After the configuration, run the display bgp vpnv4 all peer command on a PE, and you can
find that the BGP peer relation between the PE and CE is in Established state.
Step 5 Set up MP-IBGP adjacency between the PEs.
NOTE
The Spoke-PE need not allow the repeated ASN, because the S9300 does not check the AS path attribute
in the routing information advertised by the IBGP peers.
# Configure Spoke-PE1.
[Spoke-PE1] bgp 100
[Spoke-PE1-bgp] peer 2.2.2.9 as-number 100
[Spoke-PE1-bgp] peer 2.2.2.9 connect-interface loopback 1
[Spoke-PE1-bgp] ipv4-family vpnv4
[Spoke-PE1-bgp-af-vpnv4] peer 2.2.2.9 enable
[Spoke-PE1-bgp-af-vpnv4] quit
# Configure Spoke-PE2.
[Spoke-PE2] bgp 100
[Spoke-PE2-bgp] peer 2.2.2.9 as-number 100
[Spoke-PE2-bgp] peer 2.2.2.9 connect-interface loopback 1
[Spoke-PE2-bgp] ipv4-family vpnv4
[Spoke-PE2-bgp-af-vpnv4] peer 2.2.2.9 enable
[Spoke-PE2-bgp-af-vpnv4] quit
After the configuration, run the display bgp peer or display bgp vpnv4 all peer command, and
you can see that the BGP peer relation between the PEs is in Established state.
Step 6 Verify the configuration.
After the configuration, the Spoke-CEs can ping each other. Run the tracert command, and you
can see that the traffic between the Spoke-CEs is forwarded through the Hub-CE. You can also
deduce the number of forwarding devices between the Spoke-CEs based on the TTL in the ping
result.
Run the display bgp routing-table command on the Spoke-CE, and you can see the repeated
ASNs in AS paths of the BGP routes to the remote Spoke-CE.
----End
Configuration Files
l Configuration file of Spoke-CE1
#
sysname Spoke-CE1
#
vlan batch 50
#
interface Vlanif50
ip address 100.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
#
bgp 65410
peer 100.1.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
import-route direct
peer 100.1.1.2 enable
#
return
l Configuration file of Spoke-PE1
#
sysname Spoke-PE1
#
vlan batch 10 50
#
ip vpn-instance vpna
route-distinguisher 100:1
vpn-target 100:1 export-extcommunity
vpn-target 200:1 import-extcommunity
#
mpls lsr-id 1.1.1.9
mpls
label advertise non-null
#
mpls ldp
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface Vlanif50
ip binding vpn-instance vpna
ip address 100.1.1.2 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
#
bgp 100
peer 2.2.2.9 as-number 100
peer 2.2.2.9 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 2.2.2.9 enable
#
ipv4-family vpnv4
policy vpn-target
peer 2.2.2.9 enable
#
ipv4-family vpn-instance vpna
peer 100.1.1.1 as-number 65410
import-route direct
#
ospf 1
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 1.1.1.9 0.0.0.0
#
return
l Configuration file of Spoke-PE2
#
sysname Spoke-PE2
#
vlan batch 20 60
#
ip vpn-instance vpna
route-distinguisher 100:3
vpn-target 100:1 export-extcommunity
vpn-target 200:1 import-extcommunity
#
mpls lsr-id 3.3.3.9
mpls
label advertise non-null
#
mpls ldp
#
interface Vlanif20
ip address 11.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface Vlanif60
ip binding vpn-instance vpna
ip address 120.1.1.2 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 60
port hybrid untagged vlan 60
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface LoopBack1
ip address 3.3.3.9 255.255.255.255
#
bgp 100
peer 2.2.2.9 as-number 100
peer 2.2.2.9 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 2.2.2.9 enable
#
ipv4-family vpnv4
policy vpn-target
peer 2.2.2.9 enable
#
ipv4-family vpn-instance vpna
peer 120.1.1.1 as-number 65420
import-route direct
#
ospf 1
area 0.0.0.0
network 3.3.3.9 0.0.0.0
network 11.1.1.0 0.0.0.255
#
return
l Configuration file of Spoke-CE2
#
sysname Spoke-CE2
#
vlan batch 60
#
interface Vlanif60
ip address 120.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 60
port hybrid untagged vlan 60
#
bgp 65420
peer 120.1.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
import-route direct
peer 120.1.1.2 enable
#
return
l Configuration file of Hub-CE
#
sysname Hub-CE
#
vlan batch 30 40
#
interface Vlanif30
ip address 110.1.1.1 255.255.255.0
#
interface Vlanif40
ip address 110.2.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
bgp 65430
peer 110.1.1.2 as-number 100
peer 110.2.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
import-route direct
peer 110.2.1.2 enable
peer 110.1.1.2 enable
#
return
l Configuration file of Hub-PE
#
sysname Hub-PE
#
vlan batch 10 20 30 40
#
ip vpn-instance vpn_in
route-distinguisher 100:21
vpn-target 100:1 import-extcommunity
#
ip vpn-instance vpn_out
route-distinguisher 100:22
vpn-target 200:1 export-extcommunity
#
mpls lsr-id 2.2.2.9
mpls
label advertise non-null
#
mpls ldp
#
interface Vlanif10
ip address 10.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif20
ip address 11.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif30
ip binding vpn-instance vpn_in
ip address 110.1.1.2 255.255.255.0
#
interface Vlanif40
ip binding vpn-instance vpn_out
ip address 110.2.1.2 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
interface GigabitEthernet3/0/1
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
interface LoopBack1
ip address 2.2.2.9 255.255.255.255
#
bgp 100
peer 1.1.1.9 as-number 100
peer 1.1.1.9 connect-interface LoopBack1
peer 3.3.3.9 as-number 100
peer 3.3.3.9 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 1.1.1.9 enable
peer 3.3.3.9 enable
#
ipv4-family vpnv4
policy vpn-target
peer 1.1.1.9 enable
peer 3.3.3.9 enable
#
ipv4-family vpn-instance vpn_in
peer 110.1.1.1 as-number 65430
import-route direct
#
ipv4-family vpn-instance vpn_out
peer 110.2.1.1 as-number 65430
peer 110.2.1.1 allow-as-loop
import-route direct
#
ospf 1
area 0.0.0.0
network 2.2.2.9 0.0.0.0
network 10.1.1.0 0.0.0.255
network 11.1.1.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-205, CE1 and CE2 belong to the same VPN and have the same VPN
target. CE1 connects to the backbone network through UPE, and CE2 connects to the network
through PE. UPE, SPE and PE are interconnected through OSPF.
Loopback1 Loopback1
2.2.2.9./32 3.3.3.9./32
GE2/0/0 PE
Loopback1
1.1.1.9./32 GE1/0/0 GE2/0/0
SPE GE1/0/0
GE2/0/0
GE1/0/0 GE1/0/0
CE1 CE2
VPN-A AS: 65410 AS: 65420 VPN-A
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure IGP on the backbone network so that PEs can learn the loopback address of each
other. Create MPLS LSPs between the PEs.
2. Create a VPN instance on UPE and set up an EBGP adjacency between UPE and CE1.
Create a VPN instance on PE and set up an EBGP adjacency between PE and CE2.
3. Set up an MP-IBGP adjacency between UPE and SPE, and between PE and SPE.
4. Create a VPN instance on the SPE and set the UPE as its under layer PE. Configure the
UPE to advertise the default route of the VPN instance.
Data Preparation
To complete the configuration, you need the following data:
l IDs of the VLANs that the interfaces of PE and CE belong to, as shown in Figure 5-205
l IP address of each VLAN interface, as shown in Figure 5-205
l MPLS LSR-IDs of UPE, SPE, and PE
l VPN instances on UPE, SPE, and PE
Procedure
Step 1 Configure OSPF on the MPLS backbone network to implement network connectivity.
After the configuration, an OSPF adjacency is set up among UPE, SPE, and PE. Run the display
ospf peer command, and you can see that the adjacency is in Full state. Run the display ip
routing-table command on the PEs, and you can see the PEs can learn the loopback routes of
each other.
The configuration procedure is not mentioned.
Step 2 Configure basic MPLS functions and MPLS LDP on the MPLS backbone network and set up
LDP LSPs.
NOTE
The PE devices are directly connected In this example, you need to run label advertise command to enables
the egress node to assign labels normally to the penultimate hop.
After the configuration, LDP sessions are established between UPE and SPE, and between SPE
and PE. By running the display mpls ldp session command, you can see that the session status
is Operational. By running the display mpls ldp lsp command, you can see the establishment
status of the LDP LSP.
The configuration procedure is not mentioned.
Step 3 Connect PEs to CEs and run BGP between them.
# Configure the UPE.
<UPE> system-view
[UPE] ip vpn-instance vpna
[UPE-vpn-instance-vpna] route-distinguisher 100:1
[UPE-vpn-instance-vpna] vpn-target 1:1
[UPE-vpn-instance-vpna] quit
[UPE] interface vlanif 20
[UPE-Vlanif20] ip binding vpn-instance vpna
[UPE-Vlanif20] ip address 10.1.1.2 24
[UPE-Vlanif20] quit
[UPE] bgp 100
[UPE-bgp] ipv4-family vpn-instance vpna
# Configure CE1.
<Quidway> system-view
[Quidway] sysname CE1
[CE1] interface vlanif 30
[CE1-Vlanif30] ip address 10.1.1.1 24
[CE1-Vlanif30] quit
[CE1] bgp 65410
[CE1-bgp] peer 10.1.1.2 as-number 100
[CE1-bgp] import-route direct
[CE1-bgp] quit
# Configure PE.
<PE> system-view
[PE] ip vpn-instance vpna
[PE-vpn-instance-vpna] route-distinguisher 100:2
[PE-vpn-instance-vpna] vpn-target 1:1
[PE-vpn-instance-vpna] quit
[PE] interface vlanif 40
[PE-Vlanif40] ip binding vpn-instance vpna
[PE-Vlanif40] ip address 10.2.1.2 24
[PE-Vlanif40] quit
[PE] bgp 100
[PE-bgp] ipv4-family vpn-instance vpna
[PE-bgp-vpna] peer 10.2.1.1 as-number 65420
[PE-bgp-vpna] import-route direct
[PE-bgp-vpna] quit
[PE-bgp] quit
# Configure CE2.
<Quidway> system-view
[Quidway] sysname CE2
[CE2] interface vlanif 40
[CE2-Vlanif40] ip address 10.2.1.1 24
[CE2-Vlanif40] quit
[CE2] bgp 65420
[CE2-bgp] peer 10.2.1.2 as-number 100
[CE2-bgp] import-route direct
[CE2-bgp] quit
After the configuration, run the display ip vpn-instance verbose command on the UPE and the
PE, and you can see the configuration of the VPN instances. By running the ping -vpn-
instance, you can see that the UPE and the PE can ping the connected CEs.
NOTE
If multiple interfaces on a PE are bound to the same VPN, you must specify the source address when you
run the ping -vpn-instance command to ping the CE connected to the peer PE. That is, specify -a source-
ip-address in the ping -vpn-instance vpn-instance-name -a source-ip-address destination-address
command. Otherwise, the ping operation may fail.
Step 4 Set up an MP-IBGP adjacency between UPE and SPE, and between PE and SPE.
[UPE-bgp-af-vpnv4] quit
[UPE-bgp] quit
Run the display bgp vpnv4 all routing-table command on the UPE, and you can see a default
route of the VPN instance vpna with the next hop being SPE.
[UPE] display bgp vpnv4 all routing-table
BGP Local router ID is 1.1.1.9
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Total number of routes from all PE: 1
Route Distinguisher: 200:1
Network NextHop MED LocPrf PrefVal Path/Ogn
*>i 0.0.0.0 2.2.2.9 100 0 i
Total routes of vpn-instance vpna: 6
Network NextHop MED LocPrf PrefVal Path/Ogn
*>i 0.0.0.0 2.2.2.9 100 0 i
*> 10.1.1.0/24 0.0.0.0 0 0 ?
* 10.1.1.2 0 0 65410?
*> 10.1.1.1/32 0.0.0.0 0 0 ?
*> 10.1.1.2/32 0.0.0.0 0 0 ?
* 10.1.1.1 0 0 65410?
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 30
#
interface VLanif30
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
bgp 65410
peer 10.1.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
import-route direct
peer 10.1.1.2 enable
#
return
interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
#
bgp 100
peer 2.2.2.9 as-number 100
peer 2.2.2.9 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 2.2.2.9 enable
#
ipv4-family vpnv4
policy vpn-target
peer 2.2.2.9 enable
#
ipv4-family vpn-instance vpna
peer 10.1.1.1 as-number 65410
import-route direct
#
ospf 1
area 0.0.0.0
network 1.1.1.9 0.0.0.0
network 172.1.1.0 0.0.0.255
#
return
#
sysname SPE
#
vlan batch 10 20
#
ip vpn-instance vpna
route-distinguisher 200:1
vpn-target 1:1 export-extcommunity
vpn-target 1:1 import-extcommunity
#
mpls lsr-id 2.2.2.9
mpls
label advertise non-null
#
mpls ldp
#
interface Vlanif10
ip address 172.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif20
ip address 172.2.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface LoopBack1
ip address 2.2.2.9 255.255.255.255
#
bgp 100
peer 1.1.1.9 as-number 100
peer 3.3.3.9 as-number 100
peer 1.1.1.9 connect-interface LoopBack1
peer 3.3.3.9 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 1.1.1.9 enable
peer 3.3.3.9 enable
#
ipv4-family vpnv4
policy vpn-target
peer 1.1.1.9 enable
peer 1.1.1.9 upe
peer 1.1.1.9 default-originate vpn-instance vpna
peer 3.3.3.9 enable
#
ospf 1
area 0.0.0.0
network 2.2.2.9 0.0.0.0
network 172.1.1.0 0.0.0.255
network 172.2.1.0 0.0.0.255
#
return
l Configuration file of PE
#
sysname PE
#
vlan batch 20 40
#
ip vpn-instance vpna
route-distinguisher 100:2
vpn-target 1:1 export-extcommunity
vpn-target 1:1 import-extcommunity
#
mpls lsr-id 3.3.3.9
mpls
label advertise non-null
#
mpls ldp
#
interface Vlanif20
ip address 172.2.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif40
ip binding vpn-instance vpna
ip address 10.2.1.2 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface LoopBack1
ip address 3.3.3.9 255.255.255.255
#
bgp 100
peer 2.2.2.9 as-number 100
peer 2.2.2.9 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 2.2.2.9 enable
#
ipv4-family vpnv4
policy vpn-target
peer 2.2.2.9 enable
#
ipv4-family vpn-instance vpna
peer 10.2.1.1 as-number 65420
import-route direct
#
ospf 1
area 0.0.0.0
network 3.3.3.9 0.0.0.0
network 172.2.1.0 0.0.0.255
#
return
l Configuration file of CE2
#
sysname CE2
#
vlan batch 40
#
interface Vlanif40
ip address 10.2.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
bgp 65420
peer 10.2.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
import-route direct
peer 10.2.1.2 enable
#
return
Networking Requirements
As shown in Figure 5-206, CE1 and CE2 belong to the same OSPF area of vpn1 and are
connected to PE1 and PE2 respectively. Assume that the cost of each link is 1.
A CE and a PE communicate through OSPF. VPN traffic is forwarded between CE1 and CE2
over the MPLS backbone, not through the OSPF intra-area routes.
Figure 5-206 Networking diagram for configuring the OSPF sham link
Loopback1 Loopback1 Loopback1
1.1.1.9/32 2.2.2.9/32 3.3.3.9/32
GE1/0/0 GE1/0/0
backdoor
Configuration Roadmap
The configuration roadmap is as follows:
1. Set up an MP-IBGP adjacency between the PEs and enable OSPF between the PE and CEs.
2. Create VPN instances on the PEs and bind the instances to the interfaces connected to the
CEs.
3. Create an OSPF sham link between the PEs.
4. Adjust the cost value of the backdoor link of the VPN to be greater than that of the sham
link.
Data Preparation
To complete the configuration, you need the following data:
l MPLS LSR-IDs of PE and P
l Name of the VPN instance, RD, and VPN target on the PE
l OSPF processes running on the interior of the backbone network and user networks, which
are different from that running on the PEs connected to CEs
l Cost of the sham link, which must be less than the cost for forwarding OSPF routes through
the user network
Procedure
Step 1 Configure OSPF on the user network.
Configure common OSPF on CE1, S9300-A and CE2 and advertise the segment address of each
interface.
# Configure CE1.
<Quidway> system-view
[Quidway] sysname CE1
[CE1] vlan batch 20 50
[CE1] interface GigabitEthernet 2/0/0
[CE1-GigabitEthernet2/0/0] port hybrid pvid vlan 20
[CE1-GigabitEthernet2/0/0] port hybrid untagged vlan 20
[CE1-GigabitEthernet2/0/0] quit
[CE1] interface GigabitEthernet 1/0/0
[CE1-GigabitEthernet1/0/0] port hybrid pvid vlan 50
[CE1-GigabitEthernet1/0/0] port hybrid untagged vlan 50
[CE1-GigabitEthernet1/0/0] quit
[CE1] interface vlanif 20
[CE1-Vlanif20] ip address 20.1.1.1 24
[CE1-Vlanif20] quit
[CE1] interface vlanif 50
[CE1-Vlanif50] ip address 100.1.1.1 24
[CE1-Vlanif50] quit
[CE1] ospf
[CE1-ospf-1] area 0
[CE1-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255
[CE1-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255
[CE1-ospf-1-area-0.0.0.0] quit
[CE1-ospf-1] quit
# Configure S9300-A.
<Quidway> system-view
[Quidway] sysname S9300-A
[S9300-A] vlan 20 30
[S9300-A] interface GigabitEthernet 1/0/0
[S9300-A-GigabitEthernet1/0/0] port hybrid pvid vlan 20
[S9300-A-GigabitEthernet1/0/0] port hybrid untagged vlan 20
[S9300-A-GigabitEthernet1/0/0] quit
[S9300-A] interface GigabitEthernet 2/0/0
[S9300-A-GigabitEthernet2/0/0] port hybrid pvid vlan 30
[S9300-A-GigabitEthernet2/0/0] port hybrid untagged vlan 30
[S9300-A-GigabitEthernet2/0/0] quit
[S9300-A] interface vlanif 20
[S9300-A-Vlanif20] ip address 20.1.1.2 24
[S9300-A-Vlanif20] quit
[S9300-A] interface vlanif 30
[S9300-A-Vlanif30] ip address 30.1.1.1 24
[S9300-A-Vlanif30] quit
[S9300-A] ospf
[S9300-A-ospf-1] area 0
[S9300-A-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255
[S9300-A-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255
[S9300-A-ospf-1-area-0.0.0.0] quit
[S9300-A-ospf-1] quit
<Quidway> system-view
[Quidway] sysname CE2
[CE2] vlan batch 30 60
[CE2] interface GigabitEthernet 2/0/0
[CE2-GigabitEthernet2/0/0] port hybrid pvid vlan 30
[CE2-GigabitEthernet2/0/0] port hybrid untagged vlan 30
[CE2-GigabitEthernet2/0/0] quit
[CE2] interface GigabitEthernet 1/0/0
[CE2-GigabitEthernet1/0/0] port hybrid pvid vlan 60
[CE2-GigabitEthernet1/0/0] port hybrid untagged vlan 60
[CE2-GigabitEthernet1/0/0] quit
[CE2] interface vlanif 30
[CE2-Vlanif30] ip address 30.1.1.2 24
[CE2-Vlanif30] quit
[CE2] interface vlanif 60
[CE2-Vlanif60] ip address 120.1.1.2 24
[CE2-Vlanif60] quit
[CE2] ospf
[CE2-ospf-1] area 0
[CE2-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255
[CE2-ospf-1-area-0.0.0.0] network 120.1.1.0 0.0.0.255
[CE2-ospf-1-area-0.0.0.0] quit
[CE2-ospf-1] quit
Step 2 Configure basic BGP/MPLS IP VPN function on the backbone network, including IGP, MPLS
and LDP on the backbone network, and MP-IBGP adjacency between the PEs.
# Configure PE1.
<Quidway> system-view
[Quidway] sysname PE1
[PE1] vlan batch 10 50
[PE1] interface GigabitEthernet 2/0/0
[PE1-GigabitEthernet2/0/0] port hybrid pvid vlan 10
[PE1-GigabitEthernet2/0/0] port hybrid untagged vlan 10
[PE1-GigabitEthernet2/0/0] quit
[PE1] interface GigabitEthernet 1/0/0
[PE1-GigabitEthernet1/0/0] port hybrid pvid vlan 50
[PE1-GigabitEthernet1/0/0] port hybrid untagged vlan 50
[PE1-GigabitEthernet1/0/0] quit
[PE1] interface loopback 1
[PE1-LoopBack1] ip address 1.1.1.9 32
[PE1-LoopBack1] quit
[PE1] mpls lsr-id 1.1.1.9
[PE1] mpls
[PE1-mpls] lsp-trigger all
[PE1-mpls] quit
[PE1] mpls ldp
[PE1-mpls-ldp] quit
[PE1] interface vlanif 10
[PE1-Vlanif10] ip address 10.1.1.1 24
[PE1-Vlanif10] mpls
[PE1-Vlanif10] mpls ldp
[PE1-Vlanif10] quit
[PE1] ospf
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
[PE1] bgp 100
[PE1-bgp] peer 3.3.3.9 as-number 100
[PE1-bgp] peer 3.3.3.9 connect-interface loopback 1
[PE1-bgp] ipv4-family vpnv4
[PE1-bgp-af-vpnv4] peer 3.3.3.9 enable
[PE1-bgp-af-vpnv4] quit
[PE1-bgp] quit
# Configure the P.
<Quidway> system-view
[Quidway] sysname P
[P] vlan batch 10 40
[P] interface GigabitEthernet 1/0/0
[P-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[P-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[P-GigabitEthernet1/0/0] quit
[P] interface GigabitEthernet 2/0/0
[P-GigabitEthernet2/0/0] port hybrid pvid vlan 40
[P-GigabitEthernet2/0/0] port hybrid untagged vlan 40
[P-GigabitEthernet2/0/0] quit
[P] interface loopback 1
[P-LoopBack1] ip address 2.2.2.9 32
[P-LoopBack1] quit
[P] mpls lsr-id 2.2.2.9
[P] mpls
[P-mpls] lsp-trigger all
[P-mpls] quit
[P] mpls ldp
[P-mpls-ldp] quit
[P] interface vlanif 10
[P-Vlanif10] ip address 10.1.1.2 24
[P-Vlanif10] mpls
[P-Vlanif10] mpls ldp
[P-Vlanif10] quit
[P] interface vlanif 40
[P-Vlanif40] ip address 40.1.1.1 24
[P-Vlanif40] mpls
[P-Vlanif40] mpls ldp
[P-Vlanif40] quit
[P] ospf
[P-ospf-1] area 0
[P-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0
[P-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[P-ospf-1-area-0.0.0.0] network 40.1.1.0 0.0.0.255
[P-ospf-1-area-0.0.0.0] quit
[P-ospf-1] quit
# Configure PE2.
<Quidway> system-view
[Quidway] sysname PE2
[PE2] vlan batch 40 60
[PE2] interface GigabitEthernet 1/0/0
After the configuration, PE1 and PE2 can learn the loopback route of each other. The MP-IBGP
adjacency is set up between PE1 and PE2.
Step 3 Configure links between PE and CE. That is, running OSPF between PE and CE.
# Configure PE1.
[PE1] ip vpn-instance vpn1
[PE1-vpn-instance-vpn1] route-distinguisher 100:1
[PE1-vpn-instance-vpn1] vpn-target 1:1
[PE1-vpn-instance-vpn1] quit
[PE1] interface vlanif 50
[PE1-Vlanif50] ip binding vpn-instance vpn1
[PE1-Vlanif50] ip address 100.1.1.2 24
[PE1-Vlanif50] quit
[PE1] ospf 100 vpn-instance vpn1
[PE1-ospf-100] domain-id 10
[PE1-ospf-100] import-route bgp
[PE1-ospf-100] area 0
[PE1-ospf-100-area-0.0.0.0] network 100.1.1.0 0.0.0.255
[PE1-ospf-100-area-0.0.0.0] quit
[PE1-ospf-100] quit
[PE1] bgp 100
[PE1-bgp] ipv4-family vpn-instance vpn1
[PE1-bgp-vpn1] import-route direct
[PE1-bgp-vpn1] import-route ospf 100
[PE1-bgp-vpn1] quit
[PE1-bgp] quit
# Configure PE2.
[PE2] ip vpn-instance vpn1
[PE2-vpn-instance-vpn1] route-distinguisher 100:2
[PE2-vpn-instance-vpn1] vpn-target 1:1
[PE2-vpn-instance-vpn1] quit
[PE2] interface vlanif 60
[PE2-Vlanif60] ip binding vpn-instance vpn1
[PE2-Vlanif60] ip address 120.1.1.1 24
[PE2-Vlanif60] quit
[PE2] ospf 100 vpn-instance vpn1
[PE2-ospf-100] import-route bgp
[PE2-ospf-100] domain-id 10
[PE2-ospf-100] area 0
[PE2-ospf-100-area-0.0.0.0] network 120.1.1.0 0.0.0.255
[PE2-ospf-100-area-0.0.0.0] quit
[PE2-ospf-100] quit
[PE2] bgp 100
[PE2-bgp] ipv4-family vpn-instance vpn1
[PE2-bgp-vpn1] import-route direct
[PE2-bgp-vpn1] import-route ospf 100
[PE2-bgp-vpn1] quit
[PE2-bgp] quit
After the configuration, run the display ip routing-table vpn-instance command on the PEs,
and you can see that the routes to the peer CEs are OSPF routes through the backbone network,
not the BGP routes through the user network.
To forward VPN traffic through the MPLS backbone, you must configure the cost of the sham link to be
smaller than the cost of the OSPF route through the user network. A commonly used method is to set the
cost of the forwarding interface on the user network to be greater than the cost of the sham link.
# Configure CE1.
[CE1] interface vlanif 20
[CE1-Vlanif20] ospf cost 10
# Configure CE2.
[CE2] interface vlanif 30
[CE2-Vlanif30] ospf cost 10
# Configure PE1.
[PE1] interface loopback 10
[PE1-LoopBack10] ip binding vpn-instance vpn1
[PE1-LoopBack10] ip address 5.5.5.5 32
[PE1-LoopBack10] quit
[PE1] ospf 100
[PE1-ospf-100] area 0
[PE1-ospf-100-area-0.0.0.0] sham-link 5.5.5.5 6.6.6.6 cost 1
[PE1-ospf-100-area-0.0.0.0] quit
[PE1-ospf-100] quit
# Configure PE2.
After the configuration, run the display ip routing-table vpn-instance command on the PEs.
You can see that the routes to the peer CEs are BGP routes through the backbone network, and
there are routes to the destination of the sham link.
Run the display ip routing-table command on the CEs, and you can see that the cost of the
OSPF route to the peer CE is changed to 3, and the next hop is changed to the VLANIF interface
connected to PE. That is, the VPN traffic to the peer CE is forwarded through the backbone
network.
NOTE
The cost of the OSPF route from CE1 to CE2 is the sum of the cost from CE1 to PE1, the cost of sham
link, and the cost from PE2 to CE2, that is, 1 + 1 + 1 =3.
Run the tracert command, and you can see that the data from CE1 to CE2 passes through the
VLANIF interface connected to PE1. That is, VPN traffic is transmitted through the backbone
network.
Run the display ospf sham-link command on the PEs, and you can see the information about
the sham link.
Take PE1 for example.
[PE1] display ospf sham-link
OSPF Process 1 with Router ID 1.1.1.9
Sham Link:
Area NeighborId Source-IP Destination-IP State Cost
OSPF Process 100 with Router ID 100.1.1.2
Sham Link:
Area NeighborId Source-IP Destination-IP State Cost
0.0.0.0 6.6.6.6 5.5.5.5 6.6.6.6 P-2-P 1
Run the display ospf sham-link area command, and you can see that the state of the peer is
Full.
[PE1] display ospf sham-link area 0
OSPF Process 1 with Router ID 1.1.1.9
OSPF Process 100 with Router ID 5.5.5.5
Sham-Link: 5.5.5.5 --> 6.6.6.6
NeighborID: 6.6.6.6, State: Full
Area: 0.0.0.0
Cost: 10 State: P-2-P, Type: Sham
Timers: Hello 10 , Dead 40 , Retransmit 5 , Transmit Delay 1
Run the display ospf routing command on the CEs, and you can see that the route to the peer
CE is learned and considered as the intra-area route.
[CE1] display ospf routing
OSPF Process 1 with Router ID 100.1.1.1
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
120.1.1.0/24 3 Transit 100.1.1.2 6.6.6.6 0.0.0.0
20.1.1.0/24 10 Stub 20.1.1.1 100.1.1.1 0.0.0.0
30.1.1.0/24 11 Stub 20.1.1.2 30.1.1.1 0.0.0.0
100.1.1.0/24 1 Transit 100.1.1.1 100.1.1.1 0.0.0.0
Routing for ASEs
Destination Cost Type Tag NextHop AdvRouter
120.1.1.1/32 1 Type2 3489661028 100.1.1.2 5.5.5.5
6.6.6.6/32 1 Type2 3489661028 100.1.1.2 5.5.5.5
5.5.5.5/32 1 Type2 3489661028 100.1.1.2 6.6.6.6
100.1.1.1/32 1 Type2 3489661028 100.1.1.2 6.6.6.6
Total Nets: 8
Intra Area: 4 Inter Area: 0 ASE: 4 NSSA: 0
----End
Configuration Files
l Configuration file of PE1
#
sysname PE1
#
vlan batch 10 50
#
ip vpn-instance vpn1
route-distinguisher 100:1
vpn-target 1:1 export-extcommunity
vpn-target 1:1 import-extcommunity
#
mpls lsr-id 1.1.1.9
mpls
lsp-trigger all
#
mpls ldp
#
interface Vlanif 10
ip address 10.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface Vlanif 50
ip binding vpn-instance vpn1
ip address 100.1.1.2 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
#
interface LoopBack10
ip binding vpn-instance vpn1
ip address 5.5.5.5 255.255.255.255
#
bgp 100
peer 3.3.3.9 as-number 100
peer 3.3.3.9 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 3.3.3.9 enable
#
ipv4-family vpnv4
policy vpn-target
peer 3.3.3.9 enable
#
ipv4-family vpn-instance vpn1
import-route direct
import-route ospf 100
#
ospf 1
area 0.0.0.0
network 1.1.1.9 0.0.0.0
network 10.1.1.0 0.0.0.255
#
ospf 100 vpn-instance vpn1
import-route bgp
domain-id 0.0.0.10
area 0.0.0.0
network 100.1.1.0 0.0.0.255
sham-link 5.5.5.5 6.6.6.6 cost 1
#
return
l Configuration file of P
#
sysname P
#
vlan batch 10 40
#
mpls lsr-id 2.2.2.9
mpls
lsp-trigger all
#
mpls ldp
#
interface Vlanif 10
ip address 10.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif 40
ip address 40.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
interface LoopBack1
ip address 2.2.2.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.9 0.0.0.0
network 10.1.1.0 0.0.0.255
network 40.1.1.0 0.0.0.255
#
return
l Configuration file of PE2
#
sysname PE2
#
vlan batch 40 60
#
ip vpn-instance vpn1
route-distinguisher 100:2
vpn-target 1:1 export-extcommunity
vpn-target 1:1 import-extcommunity
#
mpls lsr-id 3.3.3.9
mpls
lsp-trigger all
#
mpls ldp
#
interface Vlanif 40
ip address 40.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif 60
ip binding vpn-instance vpn1
ip address 120.1.1.2 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 60
port hybrid untagged vlan 60
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 40
#
vlan batch 30 60
#
interface vlanif 30
ip address 30.1.1.2 255.255.255.0
ospf cost 10
#
interface vlanif 60
ip address 120.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 60
port hybrid untagged vlan 60
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
ospf 1
area 0.0.0.0
network 30.1.1.0 0.0.0.255
network 120.1.1.0 0.0.0.255
#
return
interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
ospf 1
area 0.0.0.0
network 20.1.1.0 0.0.0.255
network 30.1.1.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-207, the networking requirements are as follows:
l CE1, CE2, CE3 and CE4 are customer edge devices. CE1 and CE2 belong to a LAN, and
CE3 and CE4 belong to another LAN.
l PE1 and PE2 are edge devices of the backbone network.
l The MCE is a multi-VPN-instance CE located on the user network.
l CE1 and CE3 belong to vpna; CE2 and CE4 belong to vpnb.
It is required that users on the same VPN can access each other, but users on different VPNs
cannot access each other. In this way, services of different VPNs on the LAN are separated from
each other.
GE1/0/0 GE1/0/0
Loopback1 - 1.1.1.9/32
Loopback1 - 2.2.2.9/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure OSPF between PEs to implement interworking between PEs and configure MP-
IBGP to exchange VPN routing information.
2. Set up an EBGP adjacency between PE and the connected CE to import the VPN routes to
the VPN routing table of PE.
3. Configure OSPF multi-instance between MCE and PE2 to exchange VPN routing
information. Configure RIPv2 between MCE and CE3, and between MCE and CE4, to
exchange VPN routing information.
NOTE
When configuring OSPF multi-instance between MCE and PE2, you need to perform the following
operations.
In the OSPF view of PE2, import the BGP route and advertise the VPN route of PE1 to the MCE.
The OSPF process is used by the MCE and PE2 for the configuration of OSPF multi-instance.
In the BGP view of PE2, import the OSPF route and advertise the VPN route of MCE to PE1.
The OSPF process is used by the MCE and PE2 for the configuration of OSPF multi-instance.
Data Preparation
To complete the configuration, you need the following data:
l A VPN instance for each isolated service is created on PE1, PE2 and MCE. Note that the
VPN targets of different VPN instances differ from each other and the VPN targets of the
same VPN instance are identical.
l The OSPF data needs to be configured. For different OSPF multi-instances, the OSPF
process IDs must be different.
l The RIP processes used to import VPN routes of CE3 and CE4 to MCE need to be
configured. The RIP processes use different process IDs.
Procedure
Step 1 Run OSPF on the PEs of the backbone network.
The configuration procedure is not mentioned.
After the configuration, PEs can learn the Loopback1 address of each other.
Take the display on PE2 as an example.
<PE2> display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 9 Routes : 9
Step 2 Configure the basic MPLS capability and MPLS LDP on the backbone network and set up an
LDP LSP.
NOTE
The PE devices are directly connected In this example, you need to run label advertise command to enables
the egress node to assign labels normally to the penultimate hop.
Step 3 Configure the VPN instance on PEs. Connect CE1 and CE2 to PE1 and connect MCE to PE2.
# Configure PE1.
<PE1> system-view
[PE1] vlan batch 10 20
[PE1] interface gigabitEthernet 1/0/0
[PE1-GigabitEthernet1/0/0] port hybrid pvid vlan 10
[PE1-GigabitEthernet1/0/0] port hybrid untagged vlan 10
[PE1-GigabitEthernet1/0/0] quit
[PE1] interface gigabitEthernet 2/0/0
[PE1-GigabitEthernet2/0/0] port hybrid pvid vlan 20
[PE1-GigabitEthernet2/0/0] port hybrid untagged vlan 20
[PE1-GigabitEthernet2/0/0] quit
[PE1] ip vpn-instance vpna
[PE1-vpn-instance-vpna] route-distinguisher 100:1
[PE1-vpn-instance-vpna] vpn-target 111:1 both
[PE1-vpn-instance-vpna] quit
[PE1] ip vpn-instance vpnb
[PE1-vpn-instance-vpnb] route-distinguisher 100:2
[PE1-vpn-instance-vpnb] vpn-target 222:2 both
[PE1-vpn-instance-vpnb] quit
[PE1] interface vlanif 10
[PE1-Vlanif10] ip binding vpn-instance vpna
[PE1-Vlanif10] ip address 10.1.1.2 24
[PE1-Vlanif10] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] ip binding vpn-instance vpnb
[PE1-Vlanif20] ip address 10.2.1.2 24
[PE1-Vlanif20] quit
# Configure PE2.
<PE2> system-view
[PE2] vlan batch 40 50
[PE2] interface gigabitEthernet 2/0/0
[PE2-GigabitEthernet2/0/0] port hybrid pvid vlan 50
[PE2-GigabitEthernet2/0/0] port hybrid untagged vlan 50
[PE2-GigabitEthernet2/0/0] quit
[PE2] interface gigabitEthernet 3/0/0
[PE2-GigabitEthernet3/0/0] port hybrid pvid vlan 40
Step 4 Configure VPN instances on the MCE. Connect CE3, CE4, and PE2 to MCE.
<Quidway> system-view
[Quidway] sysname MCE
[MCE] vlan batch 40 50 60 70
[MCE] interface gigabitEthernet 2/0/0
[MEC-GigabitEthernet2/0/0] port hybrid pvid vlan 40
[MEC-GigabitEthernet2/0/0] port hybrid untagged vlan 40
[MCE-GigabitEthernet2/0/0] quit
[MCE] interface gigabitEthernet 1/0/0
[MEC-GigabitEthernet1/0/0] port hybrid pvid vlan 50
[MEC-GigabitEthernet1/0/0] port hybrid untagged vlan 50
[MCE-GigabitEthernet1/0/0] quit
[MCE] interface gigabitEthernet 3/0/0
[MEC-GigabitEthernet3/0/0] port hybrid pvid vlan 60
[MEC-GigabitEthernet3/0/0] port hybrid untagged vlan 60
[MCE-GigabitEthernet3/0/0] quit
[MCE] interface gigabitEthernet 3/0/1
[MEC-GigabitEthernet3/0/1] port hybrid pvid vlan 70
[MEC-GigabitEthernet3/0/1] port hybrid untagged vlan 70
[MCE-GigabitEthernet3/0/1] quit
[MCE] ip vpn-instance vpna
[MCE-vpn-instance-vpna] route-distinguisher 100:1
[MCE-vpn-instance-vpna] vpn-target 111:1 both
[MCE-vpn-instance-vpna] quit
[MCE] ip vpn-instance vpnb
[MCE-vpn-instance-vpnb] route-distinguisher 100:2
[MCE-vpn-instance-vpnb] vpn-target 222:2 both
[MCE-vpn-instance-vpnb] quit
[MCE] interface vlanif 60
[MCE-Vlanif60] ip binding vpn-instance vpna
[MCE-Vlanif60] ip address 10.3.1.2 24
[MCE-Vlanif6/0] quit
[MCE] interface vlanif 70
[MCE-Vlanif70] ip binding vpn-instance vpnb
[MCE-Vlanif70] ip address 10.4.1.2 24
[MCE-Vlanif70] quit
[MCE] interface vlanif 50
[MCE-Vlanif50] ip binding vpn-instance vpna
[MCE-Vlanif50] ip address 192.1.1.2 24
[MCE-Vlanif50] quit
[MCE] interface vlanif 40
[MCE-Vlanif40] ip binding vpn-instance vpnb
[MCE-Vlanif40] ipaddress 192.2.1.2 24
[MCE-Vlanif40] quit
Step 5 Set up an MP-IBGP adjacency between PEs, and between PE1 and CE1. Set up an EBGP
adjacency between PE1 and CE1, and between PE1 and CE2.
After the configuration, run the display bgp vpnv4 all peer command on PE1, and you can see
that the IBGP adjacency between PE1 and PE2 is in Established state. The EBGP adjacency
between PE1 and CE1 and the EBGP adjacency between PE1 and CE2 are in Established state.
[PE1] display bgp vpnv4 all peer
Step 6 Configure the OSPF multi-instance between the MCE and PE2.
# Configure PE2.
<PE2> system-view
[PE2] ospf 100 vpn-instance vpna
[PE2-ospf-100] area 0
[PE2-ospf-100-area-0.0.0.0] network 192.1.1.0 0.0.0.255
[PE2-ospf-100-area-0.0.0.0] quit
[PE2-ospf-100] import-route bgp
[PE2-ospf-100] quit
[PE2] ospf 200 vpn-instance vpnb
[PE2-ospf-200] area 0
[PE2-ospf-200-area-0.0.0.0] network 192.2.1.0 0.0.0.255
[PE2-ospf-200-area-0.0.0.0] quit
[PE2-ospf-200] import-route bgp
[PE2-ospf-200] quit
[PE2] bgp 100
[PE2-bgp] ipv4-family vpn-instance vpna
[PE2-bgp-vpna] import-route ospf 100
[PE2-bgp-vpna] quit
[PE2-bgp] ipv4-family vpn-instance vpnb
[PE2-bgp-vpnb] import-route ospf 200
[PE2-bgp-vpnb] quit
# Configure MCE.
<MCE> system-view
[MCE] ospf 100 vpn-instance vpna
[MCE-ospf-100] area 0
[MCE-ospf-100-area-0.0.0.0] network 192.1.1.0 0.0.0.255
[MCE-ospf-100-area-0.0.0.0] quit
[MCE-ospf-100] quit
[MCE] ospf 200 vpn-instance vpnb
[MCE-ospf-200] area 0
[MCE-ospf-200-area-0.0.0.0] network 192.2.1.0 0.0.0.255
[MCE-ospf-200-area-0.0.0.0] quit
[MCE-ospf-200] quit
Step 7 Run RIPv2 between the MCE and CE3, and between the MCE and CE4.
# Configure MCE.
[MCE] rip 100 vpn-instance vpna
[MCE-rip-100] version 2
[MCE-rip-100] network 10.0.0.0
[MCE-rip-100] import-route ospf 100
[MCE-rip-100] quit
[MCE] rip 200 vpn-instance vpnb
[MCE-rip-200] version 2
[MCE-rip-200] network 10.0.0.0
[MCE-rip-200] import-route ospf 200
# Configure CE3.
<Quidway> system-view
[Quidway] sysname CE3
[CE3] vlan 60
[CE3] interface gigabitEthernet1/0/0
[CE3-GigabitEthernet1/0/0] port hybrid pvid vlan 60
[CE3-GigabitEthernet1/0/0] port hybrid untagged vlan 60
[CE3-GigabitEthernet1/0/0] quit
[CE3]interface vlanif 60
[CE3-Vlanif60]ip address 10.3.1.1 24
[CE3-Vlanif60] quit
[CE3] rip 100
[CE3-rip-100] version 2
[CE3-rip-100] network 10.0.0.0
[CE3-rip-100] import-route direct
# Configure CE4.
<Quidway> system-view
[Quidway] sysname CE4
[CE4] vlan 70
[CE4] interface gigabitEthernet1/0/0
[CE4-GigabitEthernet1/0/0] port hybrid pvid vlan 70
[CE4-GigabitEthernet1/0/0] port hybrid untagged vlan 70
[CE4-GigabitEthernet1/0/0] quit
[CE4]interface vlanif 70
[CE4-Vlanif70]ip address 10.4.1.1 24
[CE4-Vlanif70] quit
[CE4] rip 200
[CE4-rip-200] version 2
[CE4-rip-200] network 10.0.0.0
[CE4-rip-200] import-route direct
Run the displayiprouting-tablevpn-instance command on the PE, and you can see the route
to the peer CE.
Take vpna on PE1 for example.
[PE1] display ip routing-table vpn-instance vpna
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: vpna
Destinations : 5 Routes : 5
CE1 and CE3 can ping each other. CE2 and CE4 can ping each other.
Take CE1 for example.
[CE1] ping 10.3.1.1
PING 10.3.1.1: 56 data bytes, press CTRL_C to break
Reply from 10.3.1.1: bytes=56 Sequence=1 ttl=252 time=125 ms
Reply from 10.3.1.1: bytes=56 Sequence=2 ttl=252 time=125 ms
Reply from 10.3.1.1: bytes=56 Sequence=3 ttl=252 time=125 ms
Reply from 10.3.1.1: bytes=56 Sequence=4 ttl=252 time=125 ms
Reply from 10.3.1.1: bytes=56 Sequence=5 ttl=252 time=125 ms
CE1 cannot ping CE2 or CE4. CE3 cannot ping CE2 or CE4.
For example, if you ping CE4 from CE1, the information is displayed as follows:
[CE1] ping 10.4.1.1
PING 10.4.1.1: 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out
Request time out
Request time out
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10
#
interface vlanif10
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
#
bgp 100
peer 2.2.2.9 as-number 100
peer 2.2.2.9 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 2.2.2.9 enable
#
ipv4-family vpnv4
policy vpn-target
peer 2.2.2.9 enable
#
ipv4-family vpn-instance vpna
peer 10.1.1.1 as-number 65410
import-route direct
#
ipv4-family vpn-instance vpnb
peer 10.2.1.1 as-number 65420
import-route direct
#
ospf 1
area 0.0.0.0
network 1.1.1.9 0.0.0.0
network 172.1.1.0 0.0.0.255
#
return
l Configuration file of PE2
#
sysname PE2
#
vlan batch 30 40 50
#
ip vpn-instance vpna
route-distinguisher 200:1
vpn-target 111:1 export-extcommunity
vpn-target 111:1 import-extcommunity
#
ip vpn-instance vpnb
route-distinguisher 200:2
vpn-target 222:2 export-extcommunity
vpn-target 222:2 import-extcommunity
#
mpls lsr-id 2.2.2.9
mpls
label advertise non-null
#
mpls ldp
#
interface vlanif30
interface vlanif60
ip address 10.3.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 60
port hybrid untagged vlan 60
#
rip 100
version 2
network 10.0.0.0
import-route direct
#
return
Networking Requirements
As shown in Figure 5-208, you need to configure the backup next hop on PE1 to configure PE3
as a backup of PE2. When a fault occurs to PE2, traffic can be switched to PE3 quickly.
Loopback1
VPN backbone 2.2.2.2/32
PE2
AS100 GE2/0/0
GE1/0/0 vpn1 site
GE2/0/0 GE1/0/0
Link_A
AS65410
PE1 CE1
Loopback1 Link_B GE3/0/0
1.1.1.1/32 GE3/0/0 GE2/0/0
GE1/0/0 GE2/0/0
PE3
Loopback1
3.3.3.3/32
Loopback1 1.1.1.1/32
Loopback1 2.2.2.2/32
Loopback1 3.3.3.3/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure OSPF on the backbone routers (PE1, PE2, and PE3) to implement interworking
of these backbone routers.
2. Enable MPLS capability on the MPLS backbone and establish an LDP LSP.
3. Configure a VPN instance on PE1, PE2, and PE3 and connect CE1 to PE2 and PE3.
4. Establish EBGP adjacencies between the PEs and CE1 and import VPN routes. Establish
MP-IBGP adjacencies between the PEs.
5. On PE1, configure a routing policy for VPN FRR, configure the backup next hop, and
enable VPN FRR. If the VPN FRR is not required, run the undo vpn frr command to
disable this function.
Data Preparation
To complete the configuration, you need the following data:
l Name of VPN instance, RD, and VPN target (111:1) on PE
l Name of the routing policy on PE1 and IP prefix
Procedure
Step 1 Configure the VLAN on each interface. The configuration procedure is not given here.
Step 2 Configure IP addresses of interfaces on the VPN backbone network and VPN sites. The
configuration procedure is not mentioned here.
Step 3 Configure OSPF on the MPLS backbone network to implement interworking of the PEs. The
configuration procedure is not mentioned here.
Step 4 Configure basic MPLS functions and MPLS LDP on the MPLS backbone network and set up
LDP LSPs.
NOTE
The PE devices are directly connected In this example, you need to run label advertise command to enables
the egress node to assign labels normally to the penultimate hop.
# Configure PE1.
<PE1> system-view
[PE1] mpls lsr-id 1.1.1.1
[PE1] mpls
[PE1-mpls] label advertise non-null
[PE1-mpls] quit
[PE1] mpls ldp
[PE1-mpls-ldp] quit
[PE1] interface vlanif 10
[PE1-Vlanif10] mpls
[PE1-Vlanif10] mpls ldp
[PE1-Vlanif10] quit
[PE1] interface vlanif 30
[PE1-Vlanif30] mpls
[PE1-Vlanif30] mpls ldp
[PE1-Vlanif30] quit
# Configure PE2.
<PE2> system-view
[PE2] mpls lsr-id 2.2.2.2
[PE2] mpls
[PE2-mpls] label advertise non-null
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlanif 10
[PE2-Vlanif10] mpls
[PE2-Vlanif10] mpls ldp
[PE2-Vlanif10] quit
# Configure PE3.
<PE3> system-view
[PE3] mpls lsr-id 3.3.3.3
[PE3] mpls
[PE3-mpls] label advertise non-null
[PE3-mpls] quit
[PE3] mpls ldp
[PE3-mpls-ldp] quit
[PE3] interface vlanif 30
[PE3-Vlanif30] mpls
[PE3-Vlanif30] mpls ldp
[PE3-Vlanif30] quit
Run the display mpls lsp command on the PEs, and you can see that LSPs are established
between PE1 and PE2 and between PE1 and PE3. Take PE1 for example.
[PE1] display mpls lsp
----------------------------------------------------------------------
LSP Information: LDP LSP
----------------------------------------------------------------------
FEC In/Out Label In/Out IF Vrf Name
3.3.3.3/32 NULL/3 -/Vlanif30
1.1.1.1/32 3/NULL -/-
100.1.1.0/30 3/NULL -/-
3.3.3.3/32 1024/3 -/Vlanif30
100.2.1.0/30 3/NULL -/-
2.2.2.2/32 NULL/3 -/Vlanif10
2.2.2.2/32 1025/3 -/Vlanif10
Step 5 Configure VPN instances on each PE and connect the CEs to the PEs.
# Configure PE1.
[PE1] ip vpn-instance vpn1
[PE1-vpn-instance-vpn1] route-distinguisher 100:1
[PE1-vpn-instance-vpn1] vpn-target 111:1
[PE1-vpn-instance-vpn1] quit
# Configure PE2.
[PE2] ip vpn-instance vpn1
[PE2-vpn-instance-vpn1] route-distinguisher 100:2
[PE2-vpn-instance-vpn1] vpn-target 111:1
[PE2-vpn-instance-vpn1] quit
[PE2] interface vlanif 20
[PE2-Vlanif20] ip binding vpn-instance vpn1
[PE2-Vlanif20] ip address 10.1.1.2 30
[PE2-Vlanif20] quit
# Configure PE3.
[PE3] ip vpn-instance vpn1
[PE3-vpn-instance-vpn1] route-distinguisher 100:3
[PE3-vpn-instance-vpn1] vpn-target 111:1
[PE3-vpn-instance-vpn1] quit
[PE3] interface vlanif 40
[PE3-Vlanif40] ip binding vpn-instance vpn1
[PE3-Vlanif40] ip address 10.2.1.2 30
[PE3-Vlanif40] quit
Step 6 Import direct VPN routes to PE1. Create EBGP adjacencies between PE2 and CE and between
PE3 and CE to import VPN routes.
# Configure PE1.
[PE1] bgp 100
[PE1-bgp] ipv4-family vpn-instance vpn1
[PE1-bgp-vpn1] import-route direct
[PE1-bgp-vpn1] quit
# Configure PE2.
# Configure PE3.
[PE3] bgp 100
[PE3-bgp] ipv4-family vpn-instance vpn1
[PE3-bgp-vpn1] peer 10.2.1.1 as-number 65410
[PE3-bgp-vpn1] import-route direct
[PE3-bgp-vpn1] quit
# Configure CE.
<CE> system-view
[CE] bgp 65410
[CE-bgp] peer 10.1.1.2 as-number 100
[CE-bgp] peer 10.2.1.2 as-number 100
[CE-bgp] import-route direct
[CE-bgp] network 10.3.1.0 24
[CE-bgp] quit
Run the display bgp vpnv4 all peer command on PE2 and PE3, and you can see that EBGP
adjacencies are established between PEs and CE.
Take PE2 for example.
[PE2] display bgp vpnv4 all peer
# Configure PE2.
[PE2] bgp 100
[PE2-bgp] peer 1.1.1.1 as-number 100
[PE2-bgp] peer 1.1.1.1 connect-interface loopback 1
[PE2-bgp] ipv4-family vpnv4
[PE2-bgp-af-vpnv4] peer 1.1.1.1 enable
[PE2-bgp-af-vpnv4] quit
# Configure PE3.
[PE3] bgp 100
[PE3-bgp] peer 1.1.1.1 as-number 100
[PE3-bgp] peer 1.1.1.1 connect-interface loopback 1
[PE3-bgp] ipv4-family vpnv4
Run the display bgp vpnv4 all peer command on the PEs, and you can see that MP-IBGP
adjacencies are established between PEs.
# View the backup next hop, backup label, and backup tunnel ID.
<PE1> display ip routing-table vpn-instance vpn1 10.3.1.0 verbose
Routing Table : vpn1
Summary Count : 2
Destination: 10.3.1.0/24
Protocol: BGP Process ID: 0
Preference: 255 Cost: 0
NextHop: 3.3.3.3 Neighbour: 3.3.3.3
State: Inactive Adv GotQ Age: 00h17m56s
Tag: 0 Priority: 0
Label: 15362 QoSInfo: 0x0
RelayNextHop: 0.0.0.0 Interface: Vlanif30
TunnelID: 0x10001
Destination: 10.3.1.0/24
Protocol: BGP Process ID: 0
Preference: 255 Cost: 0
NextHop: 2.2.2.2 Neighbour: 2.2.2.2
State: Active Adv GotQ Age: 00h15m06s
Tag: 0 Priority: 0
Label: 15361 QoSInfo: 0x0
RelayNextHop: 0.0.0.0 Interface: Vlanif10
TunnelID: 0x10002
BkNextHop: 3.3.3.3 BkInterface:
BkLabel: 15362 SecTunnelID: 0x0
BkPETunnelID: 0x10001 BkPESecTunnelID: 0x0
Step 10 To disable VPN FRR, run the undo vpn frr command.
[PE1] ip vpn-instance vpn1
[PE1-vpn-instance-vpn1] undo vpn frr
[PE1-vpn-instance-vpn1] quit
# After disabling VPN FRR, view the backup next hop, backup label, and backup tunnel ID.
Destination: 10.3.1.0/24
Protocol: BGP Process ID: 0
Preference: 255 Cost: 0
NextHop: 3.3.3.3 Neighbour: 3.3.3.3
State: Inactive Adv GotQ Age: 00h19m05s
Tag: 0 Priority: 0
Label: 15362 QoSInfo: 0x0
RelayNextHop: 0.0.0.0 Interface: Vlanif30
TunnelID: 0x10001
Destination: 10.3.1.0/24
Protocol: BGP Process ID: 0
Preference: 255 Cost: 0
NextHop: 2.2.2.2 Neighbour: 2.2.2.2
State: Active Adv GotQ Age: 00h00m10s
Tag: 0 Priority: 0
Label: 15361 QoSInfo: 0x0
RelayNextHop: 0.0.0.0 Interface: Vlanif10
TunnelID: 0x10002
----End
Configuration Files
l Configuration file of PE1
#
sysname PE1
#
vlan batch 10 30
#
ip vpn-instance vpn1
route-distinguisher 100:1
vpn frr route-policy vpn_frr_rp
vpn-target 111:1 export-extcommunity
vpn-target 111:1 import-extcommunity
#
mpls lsr-id 1.1.1.1
mpls
label advertise non-null
#
mpls ldp
#
interface Vlanif10
ip address 100.1.1.1 255.255.255.252
mpls
mpls ldp
#
interface Vlanif30
ip address 100.2.1.1 255.255.255.252
mpls
mpls ldp
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
bgp 100
peer 2.2.2.2 as-number 100
peer 2.2.2.2 connect-interface LoopBack1
peer 3.3.3.3 as-number 100
peer 3.3.3.3 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 2.2.2.2 enable
peer 3.3.3.3 enable
#
ipv4-family vpnv4
policy vpn-target
peer 2.2.2.2 enable
peer 3.3.3.3 enable
#
ipv4-family vpn-instance vpn1
import-route direct
#
ospf 1
area 0.0.0.0
network 100.1.1.0 0.0.0.3
network 100.2.1.0 0.0.0.3
network 1.1.1.1 0.0.0.0
#
ip ip-prefix vpn_frr_list permit 2.2.2.2 32
#
route-policy vpn_frr_rp permit node 10
if-match ip next-hop ip-prefix vpn_frr_list
apply backup-nexthop 3.3.3.3
#
return
l Configuration file of PE2
#
sysname PE2
#
vlan batch 10 20
#
ip vpn-instance vpn1
route-distinguisher 100:2
vpn-target 111:1 export-extcommunity
vpn-target 111:1 import-extcommunity
#
mpls lsr-id 2.2.2.2
mpls
label advertise non-null
#
mpls ldp
#
interface vlanif 10
ip address 100.1.1.2 255.255.255.252
mpls
mpls ldp
#
interface vlanif 20
ip binding vpn-instance vpn1
ip address 10.1.1.2 255.255.255.252
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
bgp 100
peer 1.1.1.1 as-number 100
peer 1.1.1.1 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
peer 1.1.1.1 enable
#
ipv4-family vpnv4
policy vpn-target
peer 1.1.1.1 enable
#
ipv4-family vpn-instance vpn1
peer 10.1.1.1 as-number 65410
import-route direct
#
ospf 1
area 0.0.0.0
network 100.1.1.0 0.0.0.3
network 2.2.2.2 0.0.0.0
#
return
l Configuration file of PE3
#
sysname PE3
#
vlan batch 30 40
#
ip vpn-instance vpn1
route-distinguisher 100:3
vpn-target 111:1 export-extcommunity
vpn-target 111:1 import-extcommunity
#
mpls lsr-id 3.3.3.3
mpls
label advertise non-null
#
mpls ldp
#
interface Vlanif 30
ip address 100.2.1.2 255.255.255.252
mpls
mpls ldp
#
interface Vlanif 40
ip binding vpn-instance vpn1
ip address 10.2.1.2 255.255.255.252
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
#
bgp 100
peer 1.1.1.1 as-number 100
peer 1.1.1.1 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 1.1.1.1 enable
#
ipv4-family vpnv4
policy vpn-target
l Configuration file of CE
#
sysname CE
#
vlan batch 20 40 50
#
interface Vlanif20
ip address 10.1.1.1 255.255.255.252
#
interface Vlanif40
ip address 10.2.1.1 255.255.255.252
#
interface Vlanif50
ip address 10.3.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
#
bgp 65410
peer 10.1.1.2 as-number 100
peer 10.2.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
network 10.3.1.0 255.255.255.0
import-route direct
peer 10.1.1.2 enable
peer 10.2.1.2 enable
#
return
Networking Requirements
In VPN deployment, to improve the reliability, you can configure VPN instances with double
RRs. That is, select two Ps in the same AS as two RRs. They are backup devices of each other,
reflecting routes of the public network and VPNv4.
Figure 5-209 Networking diagram for configuring double reflectors to optimize VPN backbone
layer
Loopback1 Loopback1
2.2.2.9/32 3.3.3.9/32
P1 GE2/0/0 GE1/0/0 P2
GE1/0/0 GE1/0/0
Loopback1 Loopback1
1.1.1.9/32 GE3/0/0 GE3/0/0 4.4.4.9/32
PE1 GE2/0/0 GE2/0/0 PE2
GE1/0/0 GE1/0/0
AS65410 AS65420
CE1 CE2
Loopback1 1.1.1.9/32
Loopback1 4.4.4.9/32
Loopback1 2.2.2.9/32
Loopback1 3.3.3.9/32
As shown in Figure 5-209, PE1, PE2, P1, and P2 are on the backbone network AS100. CE1 and
CE2 belong to VPNA. Select P1 and P2 as the RRs of the VPN.
Configuration Roadmap
The configuration roadmap is as follows:
1. Set up MP-IBGP adjacencies between the PEs and RRs.
2. Set up EBGP adjacencies between the PE and CEs.
3. Enable MPLS LSP on the public tunnel and enable MPLS LDP on the devices and interfaces
along the tunnel.
4. Configure P1 and P2 to be the backup of each other and configure the same RR ID for them.
5. P1 and P2 need to store all VPNv4 routing information and advertise the routing information
to PEs, so configure P1 and P2 to accept all the VPNv4 routing information without filtering
the routing information based on VPN targets.
NOTE
At least two paths that do not use the same network segment and node must exist between the RR and PE;
otherwise, the double RRs are unnecessary.
Data Preparation
To complete the configuration, you need the following data:
l ID of the VLAN that each interface belongs to and IP address of each interface, as shown
in Figure 5-209
l MPLS LSR-IDs of PE and ASBR-PEs
l Names, RDs, and VPN targets of the VPN instances created on PE1 and PE2
l Routing protocol used to exchange routing information between the PE and CEs (EBGP is
used in this example)
l Convergence priorities of the routes in the VPN instances
l Name of the RD and name of the routing policy
Procedure
1. Configure the VLAN on each interface. The configuration procedure is not given here.
2. Configure an IGP protocol on the MPLS backbone network to implement interworking of
devices along the LSP.
OSPF is used as the IGP protocol in this example. The configuration procedure is not given
here.
NOTE
The address of the loopback interface, which functions as the LSR ID, must be advertised.
After the configuration, devices along the LSP can learn the address of the loopback
interface of each other.
Take PE1 for example.
<PE1> display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 17 Routes : 19
For the configuration procedure, see Example for Configuring the BGP/MPLS IP
VPN. The configuration details are not mentioned here.
6. Set up the MP-IBGP peer relation between PEs and RRs.
# Configure PE1.
<PE1> system-view
[PE1] bgp 100
[PE1-bgp] peer 2.2.2.9 as-number 100
[PE1-bgp] peer 2.2.2.9 connect-interface loopback 1
[PE1-bgp] peer 3.3.3.9 as-number 100
[PE1-bgp] peer 3.3.3.9 connect-interface loopback 1
[PE1-bgp] ipv4-family vpnv4
[PE1-bgp-af-vpnv4] peer 2.2.2.9 enable
[PE1-bgp-af-vpnv4] peer 3.3.3.9 enable
[PE1-bgp-af-vpnv4] quit
# Configure P1.
<P1> system-view
[P1] bgp 100
[P1-bgp] group P1 internal
[P1-bgp] peer P1 connect-interface loopback 1
[P1-bgp] peer 1.1.1.9 group P1
[P1-bgp] peer 3.3.3.9 group P1
[P1-bgp] peer 4.4.4.9 group P1
[P1-bgp] ipv4-family vpnv4
[P1-bgp-af-vpnv4] peer P1 enable
[P1-bgp-af-vpnv4] peer 1.1.1.9 group P1
[P1-bgp-af-vpnv4] peer 3.3.3.9 group P1
[P1-bgp-af-vpnv4] peer 4.4.4.9 group P1
[P1-bgp-af-vpnv4] quit
[P1-bgp] quit
# Configure P2.
<P2> system-view
[P2] bgp 100
[P2-bgp] group P2 internal
[P2-bgp] peer P2 connect-interface loopback 1
[P2-bgp] peer 1.1.1.9 group P2
[P2-bgp] peer 2.2.2.9 group P2
[P2-bgp] peer 4.4.4.9 group P2
[P2-bgp] ipv4-family vpnv4
[P2-bgp-af-vpnv4] peer P2 enable
[P2-bgp-af-vpnv4] peer 1.1.1.9 group P2
[P2-bgp-af-vpnv4] peer 2.2.2.9 group P2
[P2-bgp-af-vpnv4] peer 4.4.4.9 group P2
[P2-bgp-af-vpnv4] quit
[P2-bgp] quit
# Configure PE2.
The configuration procedure of PE2 is similar to the configuration procedure of PE1 and
is not mentioned.
After the configuration, run the display bgp vpnv4 all peer command on the PEs, and you
can see that the BGP adjacencies are established between the PEs and RRs. The EBGP
adjacencies are established between the PE and CEs.
Take the display on PE1 and P1 for example.
<PE1> display bgp vpnv4 all peer
# Configure P2.
[P2] bgp 100
[P2-bgp] ipv4-family vpnv4
[P2-bgp-af-vpnv4] reflector cluster-id 100
[P2-bgp-af-vpnv4] peer P2 reflect-client
[P2-bgp-af-vpnv4] undo policy vpn-target
[P2-bgp-af-vpnv4] quit
If CE1 and CE2 can ping each other, it indicates that the RRs are successfully configured.
After running the shutdown command in the view of VLANIF 40 on PE1 and the view of
VLANIF 50 on PE2, you can see that CE1 can ping CE2. This indicates that the RRs are
successfully configured.
Configuration Files
l Configuration file of PE1
#
sysname PE1
#
vlan batch 10 40 60
#
ip vpn-instance vpna
route-distinguisher 100:1
vpn-target 1:1 export-extcommunity
vpn-target 1:1 import-extcommunity
#
mpls lsr-id 1.1.1.9
mpls
lsp-trigger all
#
mpls ldp
#
interface Vlanif10
ip address 100.1.2.1 255.255.255.0
mpls
mpls ldp
#
interface Vlanif40
ip address 100.1.3.1 255.255.255.0
mpls
mpls ldp
#
interface Vlanif 60
ip binding vpn-instance vpna
ip address 10.1.1.2 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 60
port hybrid untagged vlan 60
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
#
bgp 100
peer 2.2.2.9 as-number 100
peer 2.2.2.9 connect-interface LoopBack1
peer 3.3.3.9 as-number 100
peer 3.3.3.9 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 2.2.2.9 enable
peer 3.3.3.9 enable
#
ipv4-family vpnv4
policy vpn-target
peer 2.2.2.9 enable
peer 3.3.3.9 enable
#
ipv4-family vpn-instance vpna
peer 10.1.1.1 as-number 65410
import-route direct
#
ospf 1
area 0.0.0.0
network 1.1.1.9 0.0.0.0
network 100.1.2.0 0.0.0.255
network 100.1.3.0 0.0.0.255
#
return
l Configuration file of P1
#
sysname P1
#
Vlan batch 10 20 50
#
mpls lsr-id 2.2.2.9
mpls
lsp-trigger all
#
mpls ldp
#
interface Vlanif 10
ip address 100.1.2.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif 20
ip address 100.2.3.1 255.255.255.0
mpls
mpls ldp
#
interface Vlanif 50
ip address 100.2.4.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
#
interface LoopBack1
ip address 2.2.2.9 255.255.255.255
#
bgp 100
peer 4.4.4.9 as-number 100
peer 1.1.1.9 as-number 100
peer 3.3.3.9 as-number 100
group P1 internal
peer P1 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
undo peer 4.4.4.9 enable
undo peer 1.1.1.9 enable
undo peer 3.3.3.9 enable
peer P1 enable
#
ipv4-family vpnv4
reflector cluster-id 100
undo policy vpn-target
peer P1 enable
peer P1 reflect-client
peer 1.1.1.9 enable
peer 1.1.1.9 group P1
peer 3.3.3.9 enable
peer 3.3.3.9 group P1
peer 4.4.4.9 enable
peer 4.4.4.9 group P1
#
ospf 1
area 0.0.0.0
network 100.1.2.0 0.0.0.255
network 100.2.3.0 0.0.0.255
network 100.2.4.0 0.0.0.255
network 2.2.2.9 0.0.0.0
#
return
l Configuration file of P2
#
sysname P2
#
vlan batch 20 30 40
#
mpls lsr-id 3.3.3.9
mpls
lsp-trigger all
#
mpls ldp
#
interface Vlanif20
ip address 100.2.3.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif30
ip address 100.3.4.1 255.255.255.0
mpls
mpls ldp
#
interface Vlanif40
ip address 100.1.3.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid untagged vlan 20
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 40
port hybrid untagged vlan 40
#
interface LoopBack1
ip address 3.3.3.9 255.255.255.255
#
bgp 100
peer 4.4.4.9 as-number 100
peer 1.1.1.9 as-number 100
peer 2.2.2.9 as-number 100
group P2 internal
peer P2 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
undo peer 4.4.4.9 enable
undo peer 1.1.1.9 enable
undo peer 2.2.2.9 enable
peer P2 enable
#
ipv4-family vpnv4
reflector cluster-id 100
undo policy vpn-target
peer P2 enable
peer P2 reflect-client
peer 1.1.1.9 enable
peer 1.1.1.9 group P2
peer 2.2.2.9 enable
peer 2.2.2.9 group P2
peer 4.4.4.9 enable
peer 4.4.4.9 group P2
#
ospf 1
area 0.0.0.0
network 100.2.3.0 0.0.0.255
network 100.3.4.0 0.0.0.255
network 100.1.3.0 0.0.0.255
network 3.3.3.9 0.0.0.0
#
return
#
sysname PE2
#
vlan batch 30 50 70
#
ip vpn-instance vpna
route-distinguisher 100:1
vpn-target 1:1 export-extcommunity
vpn-target 1:1 import-extcommunity
#
mpls lsr-id 4.4.4.9
mpls
lsp-trigger all
#
mpls ldp
#
interface Vlanif30
ip address 100.3.4.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif50
ip address 100.2.4.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif70
ip binding vpn-instance vpna
ip address 10.2.1.2 255.255.255.0
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid untagged vlan 30
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 70
port hybrid untagged vlan 70
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 50
port hybrid untagged vlan 50
#
interface LoopBack1
ip address 4.4.4.9 255.255.255.255
#
bgp 100
peer 2.2.2.9 as-number 100
peer 2.2.2.9 connect-interface LoopBack1
peer 3.3.3.9 as-number 100
peer 3.3.3.9 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 2.2.2.9 enable
peer 3.3.3.9 enable
#
ipv4-family vpnv4
policy vpn-target
peer 3.3.3.9 enable
peer 2.2.2.9 enable
#
ipv4-family vpn-instance vpna
peer 10.2.1.1 as-number 65420
import-route direct
#
ospf 1
area 0.0.0.0
network 4.4.4.9 0.0.0.0
network 100.3.4.0 0.0.0.255
interface GigabitEthernet1/0/0
port hybrid pvid vlan 60
port hybrid untagged vlan 60
#
bgp 65410
peer 10.1.1.2 as-number 100
#
ipv4-family unicast
undo synchronization
peer 10.1.1.2 enable
#
return
Networking Requirements
As shown in Figure 5-210, the CE is connected to the PE through a GE interface.
GE1/0/0
CCC local connection
CE 1 GE 2/0/0
GE 1/0/0 GE 1/0/0
PE
Loopback1
1.1.1.9/32
PE GigabitEthernet1/0/0 VLANIF 10 -
GigabitEthernet2/0/0 VLANIF 20 -
Loopback1 - 1.1.1.9/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the basic MPLS capacity on the PE and enable the MPLS L2VPN.
2. Create a local connection between CE1 and CE2 on PE. The local CCC connection is
bidirectional, so only one connection is needed.
Data Preparation
IP addresses of the interfaces
Procedure
Step 1 Configure CEs.
# Configure CE1.
<Quidway> system-view
[Quidway] sysname CE1
[CE1] vlan 10
[CE1-Vlan10] quit
[CE1]interface GigabitEthernet1/0/0
[CE1-GigabitEthernet1/0/0]port link-type trunk
[CE1-GigabitEthernet1/0/0]port trunk allow-pass vlan 10
[CE1-GigabitEthernet1/0/0]quit
[CE1] interface vlanif 10
[CE1-Vlanif10] ip address 100.1.1.1 24
[CE1-Vlanif10] quit
# Configure CE2.
<Quidway> system-view
[Quidway] sysname CE2
[CE2] vlan 20
[CE2-vlan20] quit
[CE2] interface GigabitEthernet1/0/0
[CE2-GigabitEthernet1/0/0]port link-type trunk
[CE2-GigabitEthernet1/0/0]port trunk allow-pass vlan 20
[CE2]quit
[CE2] interface vlanif 20
[CE2-Vlanif20] ip address 100.1.1.2 24
[CE2-Vlanif20] quit
After the configuration, display the CCC information on the PE. You can see that a local CCC
connection is set up and the status is Up.
<PE> display ccc
total ccc vc : 1
local ccc vc : 1, 1 up
remote ccc vc : 0, 0 up
Run the display l2vpn ccc-interface vc-type ccc command, and you can see that the VC type
is CCC and the status is Up.
<PE> display l2vpn ccc-interface vc-type all
Run the display ip routing-table command on the CE, and you can see that CE1 and CE2 can
learn the interface routes of each other. CE1 and CE2 can ping each other.
Take CE1 for example.
<CE1> display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 5 Routes : 5
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10
#
interface Vlanif 10
ip address 100.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
return
l Configuration file of PE
#
sysname PE
#
vlan batch 10 20
#
mpls lsr-id 1.1.1.9
mpls
#
mpls l2vpn
#
interface Vlanif10
#
interface Vlanif20
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid tagged vlan 10
#
interface GigabitEthernet/0/0
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
ccc ce1-ce2 interface Vlanif10 out-interface Vlanif20
#
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
#
return
Networking Requirements
The CE is connected to the PE through a GE interface.
To create a remote CCC connection between CE1 and CE2, you need to complete the following
tasks:
l Create the remote CCC connection between the two PEs.
l Configure two static LSPs on P to exchange packets.
CE 1 CE 2
Loopback1 - 1.1.1.9/32
GigabitEthernet2/0/0 VLANIF 40 -
Loopback1 - 3.3.3.9/32
Loopback1 - 2.2.2.9/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a bidirectional static LSP for the local CCC connection between PEs. The LSP
is exclusively used by the CCC connection.
2. Enable MPLS L2VPN on the PEs. MPLS L2VPN need not be enabled on P.
3. Set up two connections: one from CE1 to CE2 and the other from CE2 to CE1.
Data Preparation
To complete the configuration, you need the following data:
l Out-label and in-label of the remote CCC connection
Pay attention to the mapping between the in-labels and out-labels on the PE and P. For the settings
of the out-label and the in-label, see Figure 5-211.
Procedure
Step 1 Configure the ID of the VLAN that each interface belongs to, as shown in Figure 5-211.
# Configure CE1.
[CE1] interface vlanif 10
[CE1-Vlanif10] ip address 100.1.1.1 24
[CE1-Vlanif10] quit
# Configure CE2.
[CE2] interface vlanif 40
[CE2-Vlanif40] ip address 100.1.1.2 24
[CE2-Vlanif40] quit
# Configure PE1.
<Quidway> system-view
[Quidway] sysname PE1
[PE1] interface loopback 1
[PE1-LoopBack1] ip address 1.1.1.9 32
[PE1-LoopBack1] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] ip address 10.1.1.1 24
[PE1-Vlanif20] quit
# Configure the P.
<Quidway> system-view
[Quidway] sysname P
[P] interface loopback 1
[P-LoopBack1] ip address 2.2.2.9 32
[P-LoopBack1] quit
[P] interface vlanif 30
[P-Vlanif30] ip address 10.2.2.2 24
[P-Vlanif30] quit
[P] interface vlanif 20
[P-Vlanif20] ip address 10.1.1.2 24
[P-Vlanif20] quit
# Configure PE2.
<Quidway> system-view
[Quidway] sysname PE2
[PE2] interface loopback 1
[PE2-LoopBack1] ip address 3.3.3.9 32
[PE2-LoopBack1] quit
[PE2] interface vlanif 30
[PE2-Vlanif40] ip address 10.2.2.1 24
[PE2-Vlanif40] quit
Step 4 Configure the basic MPLS capabilities on the MPLS backbone network.
# Configure PE1.
[PE1] mpls lsr-id 1.1.1.9
[PE1] mpls
[PE1-mpls] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] mpls
[PE1-Vlanif20] quit
# Configure the P.
[P] mpls lsr-id 2.2.2.9
[P] mpls
[P-mpls] quit
[P] interface vlanif 20
[P-Vlanif20] mpls
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] mpls
[P-Vlanif30] quit
# Configure PE2.
[PE2] mpls lsr-id 3.3.3.9
[PE2] mpls
[PE2-mpls] quit
[PE2] interface vlanif 30
[PE2-Vlanif30] mpls
[PE2-Vlanif30] quit
Step 5 Create the remote CCC connection between the two PEs.
# Configure PE1: Enable MPLS L2VPN globally and create the remote CCC connection from
CE1 to CE2. Connect the incoming interface of PE1 to CE1 and the outgoing interface of PE1
to the P. Set the incoming label to 100 and the outgoing label to 200.
[PE1] mpls l2vpn
[PE1-l2vpn] quit
[PE1] interface vlanif 10
[PE1-Vlanif10] quit
[PE1] ccc CE1-CE2 interface Vlanif 10 in-label 100 out-label 200 nexthop 10.1.1.2
# Configure PE2: Enable VLL globally and create the remote CCC connection from CE2 to
CE1. Connect the incoming interface of PE2 to CE2 and the outgoing interface of PE2 to the P.
Set the incoming label to 201 and the outgoing label to 101.
[PE2] mpls l2vpn
[PE2-l2vpn] quit
[PE2] interface vlanif 40
[PE2-Vlanif40] quit
[PE2] ccc CE2-CE1 interface vlanif 40 in-label 201 out-label 101 nexthop 10.2.2.2
# Configure P: Configure a static LSP for forwarding packets from PE1 to PE2, and configure
another static LSP for forwarding packets from PE2 to PE1.
[P] static-lsp transit PE1-PE2 incoming-interface Vlanif 20 in-label 200 nexthop
10.2.2.1 out-label 201
[P] static-lsp transit PE2-PE1 incoming-interface Vlanif 30 in-label 101 nexthop
10.1.1.1 out-label 100
After the configuration, display information about the CCC connection on the PEs. You can find
that a remote CCC connection is set up on each of PE1 and PE2 and the status of the connection
is Up.
<PE1> display ccc
total ccc vc : 1
local ccc vc : 0, 0 up
remote ccc vc : 1, 1 up
Run the display l2vpn ccc-interface vc-type ccc command on PE, and you can see that the VC
type is CCC and the status is Up. Take PE1 for example.
<PE1> display l2vpn ccc-interface vc-type ccc
Run the display mpls lsp command on the P, and you can view the label and interface
information of the two static LSPs.
<P> display mpls lsp
-------------------------------------------------------------------------------
LSP Information: STATIC LSP
-------------------------------------------------------------------------------
FEC In/Out Label In/Out IF Vrf Name
-/- 200/201 Vlanif20/Vlanif30
-/- 101/100 Vlanif30/Vlanif20
Run the display ip routing-table command on the CE, and you can see that CE1 and CE2 can
learn the interface routes of each other. CE1 and CE2 can ping each other.
Take CE1 for example.
<CE1> display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 5 Routes : 5
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 100.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
return
l Configuration file of P
#
sysname P
#
vlan batch 20 30
#
mpls lsr-id 2.2.2.9
mpls
#
interface Vlanif20
ip address 10.1.1.2 255.255.255.0
mpls
#
interface Vlanif30
ip address 10.2.2.2 255.255.255.0
mpls
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
interface LoopBack1
ip address 2.2.2.9 255.255.255.255
#
static-lsp transit PE1-PE2 incoming-interface Vlanif 20 in-label 200 nexthop
10.2.2.1 out-label 201
static-lsp transit PE2-PE1 incoming-interface Vlanif 30 in-label 101 nexthop
10.1.1.1 out-label 100
#
return
Networking Requirements
The CE is connected to the PE through a GE interface.
An SVC VLL is set up between CE1 and CE2. The SVC connection is created on PEs and the
VC label is specified.
PE 1 PE 2
GE 2/0/0 GE 2/0/0 GE 1/0/0 GE 1/0/0
GE 1/0/0 GE 2/0/0
P
SVC
connection
GE 1/0/0 GE 1/0/0
CE 1 CE 2
Loopback1 - 1.1.1.9/32
GigabitEthernet2/0/0 VLANIF 40 -
Loopback1 - 3.3.3.9/32
Loopback1 - 2.2.2.9/32
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l Labels of the static L2VC connection
The out-label of PE1 is the same as the in-label of PE2; whereas the in-label of PE1 is the same
as the out-label of PE2.
Procedure
Step 1 Configure interface addresses for CE, PE and P according to Figure 5-212, including VLAN
interfaces and VLANIF interfaces.
The configuration procedure is not mentioned.
NOTE
Step 2 Configure IGP on the MPLS backbone network. (In this example, OSPF is used.)
When configuring OSPF, advertise the 32-bit addresses of loopback interfaces on PEs and P.
The loopback interface addresses are the LSR IDs.
The configuration procedure is not mentioned.
Step 3 Configure basic MPLS functions and LDP on the MPLS backbone network. That is, set up LDP
LSPs.
# Configure PE1.
[PE1] mpls lsr-id 1.1.1.9
[PE1] mpls
[PE1-mpls] quit
[PE1] mpls ldp
[PE1-mpls-ldp] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] mpls
[PE1-Vlanif20] mpls ldp
[PE1-Vlanif20] quit
# Configure the P.
[P] mpls lsr-id 2.2.2.9
[P] mpls
[P-mpls] quit
[P] mpls ldp
[P-mpls-ldp] quit
[P] interface vlanif 20
[P-Vlanif20] mpls
[P-Vlanif20] mpls ldp
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] mpls
[P-Vlanif30] mpls ldp
[P-Vlanif30] quit
# Configure PE2.
[PE2] mpls lsr-id 3.3.3.9
[PE2] mpls
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlanif 30
[PE2-Vlanif30] mpls
[PE2-Vlanif30] mpls ldp
[PE2-Vlanif30] quit
After the configuration, LDP sessions are set up between PE1, P, and PE2. Run the display mpls
ldp session command, and you can see that the status of the LDP session is Operational.
Run the display mpls ldp lsp command, and you can see the establishment status of the LDP
LSP.
View the L2VPN connection information of the SVC on the PE, and you can see that a static
L2VC connection is established.
Run the display l2vpn ccc-interface vc-type static-vc up command, and you can see that the
VC type is static VC and the status is Up. Take the display on PE1 for example.
<PE1> display l2vpn ccc-interface vc-type static-vc up
Run the display ip routing-table command on the CE, and you can see that CE1 and CE2 can
learn the interface routes of each other.
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 100.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
return
l Configuration file of P
#
sysname P
#
vlan batch 20 30
#
mpls lsr-id 2.2.2.9
mpls
#
mpls ldp
#
interface Vlanif20
#
sysname CE2
#
vlan batch 40
#
interface Vlanif40
ip address 100.1.1.2 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 40
#
return
Networking Requirements
As shown in Figure 5-213, CE1 and CE2 are connected to PE1 and PE2 respectively through
VLANs.
GE 2/0/0 GE 1/0/0
PE 1 PE 2
GE 2/0/0 GE1/0/0
GE1/0/0 GE 2/0/0
P
GE1/0/0 GE 1/0/0
Martini
CE 1 CE 2
Loopback1 - 1.1.1.9/32
GigabitEthernet2/0/0 VLANIF 40 -
Loopback1 - 3.3.3.9/32
Loopback1 - 2.2.2.9/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the routing protocol on backbone devices (PE and P) and enable MPLS.
2. Use the default tunnel policy to create an LSP and configure the LSP as the tunnel for data
transmission.
3. Enable MPLS L2VPN and create VC connections on the PEs.
Data Preparation
To complete the configuration, you need the following data:
l Name of the remote peer of each PE
l VC ID
Procedure
Step 1 Configure interface addresses for CE, PE and P according to Figure 5-213, including VLAN
and VLANIF interfaces.
The configuration procedure is not mentioned.
NOTE
Step 2 Configure IGP on the MPLS backbone network. (In this example, OSPF is used.)
When configuring OSPF, advertise the 32-bit addresses of loopback interfaces on PEs and P.
The loopback interface addresses are the LSR IDs.
The configuration procedure is not mentioned.
After the configuration, OSPF adjacencies are established between PE1, P, and PE2. By running
the display ospf peer command, you can see that the status of the OSPF adjacency is Full. Run
the display ip routing-table command, and you can see that the PEs can learn the routes of each
other's Loopback1 interface.
Step 3 Configure the basic MPLS capability and MPLS LDP on the MPLS network.
# Configure PE1.
[PE1] mpls lsr-id 1.1.1.9
[PE1] mpls
[PE1-mpls] quit
[PE1] mpls ldp
[PE1-mpls-ldp] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] mpls
[PE1-Vlanif20] mpls ldp
[PE1-Vlanif20] quit
# Configure the P.
# Configure PE2.
[PE2] mpls lsr-id 3.3.3.9
[PE2] mpls
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlanif 30
[PE2-Vlanif30] mpls
[PE2-Vlanif30] mpls ldp
[PE2-Vlanif30] quit
# Configure PE2.
[PE2] mpls ldp remote-peer 1.1.1.9
[PE2-mpls-ldp-remote-1.1.1.9] remote-ip 1.1.1.9
[PE2-mpls-ldp-remote-1.1.1.9] quit
After the configuration, run the display mpls ldp session command on PE1 to view the
establishment of the LDP session. You can find that an LDP session is set up between PE1 and
PE2.
Take the display on PE1 for example.
<PE1> display mpls ldp session
View the L2VPN connection information on the PEs, and you can see that an L2VC is set up
and is in Up state.
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 100.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
return
l Configuration file of P
#
sysname P
#
vlan batch 20 30
#
mpls lsr-id 2.2.2.9
mpls
#
mpls ldp
#
interface Vlanif 20
ip address 10.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif 30
ip address 10.2.2.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
interface LoopBack1
ip address 2.2.2.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.9 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.2.2.0 0.0.0.255
#
return
l Configuration file of PE2
#
sysname PE2
#
vlan batch 30 40
#
mpls lsr-id 3.3.3.9
mpls
#
mpls l2vpn
mpls l2vpn default martini
#
mpls ldp
#
mpls ldp remote-peer 1.1.1.9
remote-ip 1.1.1.9
#
interface Vlanif 30
ip address 10.2.2.1 255.255.255.0
mpls
mpls ldp
#
interface Vlanif 40
mpls l2vc 1.1.1.9 101
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 40
port hybrid tagged vlan 40
#
interface LoopBack1
ip address 3.3.3.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 3.3.3.9 0.0.0.0
Networking Requirements
As shown in Figure 5-214, CE1 and CE2 are connected to the same PE through GE interfaces.
GE2/0/0
GE1/0/0 GE1/0/0
PE
CE1
Loopback1
1.1.1.9/32
PE GigabitEthernet1/0/0 VLANIF 10 -
GigabitEthernet2/0/0 VLANIF 20 -
Loopback1 - 1.1.1.9/32
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l Names of VPN instances and RDs
l Names and IDs of the CEs (The CE IDs are globally unique.) CE range, namely, the label
block
Procedure
Step 1 Configure the addresses of the VLANIF interfaces of CE1 and CE2 according to Figure
5-214 and the IDs of the VLANs to which the interfaces belong.
The configuration details are not mentioned here.
NOTE
primary or not
----------------------------------------------------------------------------
2 loc up --- --- Vlanif20
primary
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 30.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
return
l Configuration file of PE
#
sysname PE1
#
vlan batch 10 20
#
mpls lsr-id 1.1.1.9
mpls
#
mpls l2vpn
#
interface Vlanif10
#
interface Vlanif20
ip address 10.1.1.1 255.255.255.0
mpls
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrif tagged vlan 10
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrif tagged vlan 20
#
#
ccc CE1-CE2 interface Vlanif 10 in-label 100 out-label 200 nexthop 10.1.1.2
#
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
#
return
Networking Requirements
As shown in Figure 5-215, CE1 and CE2 are respectively connected to PE1 and PE2 through
GE interfaces.
GE 2/0/0 GE 1/0/0
GE 1/0/0 GE 2/0/0
GE 1/0/0 PE 1 P PE 2 GE 2/0/0
Kompella
GE 1/0/0 Remote
GE 1/0/0
CE 1 CE 2
Loopback1 - 1.1.1.9/32
GigabitEthernet2/0/0 VLANIF 40 -
Loopback1 - 3.3.3.9/32
Loopback1 - 2.2.2.9/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure routing protocols on the PEs and P on the backbone network to implement
internetworking, and enable basic MPLS functions and LDP.
2. Enable MPLS L2VPN and configure BGP L2VPN on PEs.
3. Configure the VPN instance and CE connections.
Data Preparation
To complete the configuration, you need the following data:
l ASN of BGP
l Names of VPN instances, RDs, and VPN targets
l Names and IDs of the CEs (The CE IDs are globally unique.), and CE range, namely, the
label block
Procedure
Step 1 Configure the IDs of the VLANs to which the interfaces of CE, PE, and P belong according to
Figure 5-215.
The configuration procedure is not mentioned.
NOTE
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 9 Routes : 9
Run the display ospf peer command, and you can see that the OSPF neighbor relation is set up
and the neighbor status is Full.
Step 3 Configure basic MPLS functions and LDP, and set up LDP LSPs.
After the configuration, run the display mpls ldp session and display mpls ldp peer commands
on each LSR. You can see information about the LDP session and peers.
Run the display mpls lsp command, and you can see the status of the LSP.
# Configure PE2.
[PE2] mpls l2vpn
[PE2-l2vpn] quit
[PE2] bgp 100
[PE2-bgp] peer 1.1.1.9 as-number 100
[PE2-bgp] peer 1.1.1.9 connect-interface loopback 1
[PE2-bgp] l2vpn-family
[PE2-bgp-af-l2vpn] peer 1.1.1.9 enable
[PE2-bgp-af-l2vpn] quit
[PE2-bgp] quit
After the configuration, run the display bgp l2vpn peer command on PE1 and PE2, and you
can see that the peer relation between the PEs is in Established state.
Take the display on PE1 for example.
<PE1> display bgp l2vpn peer
# Configure PE2.
[PE2] mpls l2vpn vpn1 encapsulation vlan
[PE2-mpls-l2vpn-vpn1] route-distinguisher 100:1
[PE2-mpls-l2vpn-vpn1] vpn-target 1:1
[PE2-mpls-l2vpn-vpn1] ce ce2 id 2 range 10
[PE2-mpls-l2vpn-ce-vpn1-ce2] connection ce-offset 1 interface vlanif 40
[PE2-mpls-l2vpn-ce-vpn1-ce2] quit
[PE2-mpls-l2vpn-vpn1] quit
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 30.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
return
mpls l2vpn
#
mpls ldp
#
interface Vlanif10
#
interface Vlanif20
ip address 168.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid tagged vlan 10
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
mpls l2vpn vpn1 encapsulation vlan
route-distinguisher 100:1
vpn-target 1:1 import-extcommunity
vpn-target 1:1 export-extcommunity
ce ce1 id 1 range 10 default-offset 0
connection ce-offset 2 interface Vlanif 10
#
#
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
#
bgp 100
peer 3.3.3.9 as-number 100
peer 3.3.3.9 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 3.3.3.9 enable
#
l2vpn-family
policy vpn-target
peer 3.3.3.9 enable
#
ospf 1
area 0.0.0.0
network 1.1.1.9 0.0.0.0
network 168.1.1.0 0.0.0.255
#
return
l Configuration file of P
#
sysname P
#
vlan batch 20 30
#
mpls lsr-id 2.2.2.9
mpls
#
mpls ldp
#
interface VLanif20
ip address 168.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif30
ip address 169.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#
interface LoopBack1
ip address 2.2.2.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 168.1.1.0 0.0.0.255
network 169.1.1.0 0.0.0.255
network 2.2.2.9 0.0.0.0
#
return
l Configuration file of PE2
#
sysname PE2
#
vlan batch 30 40
#
mpls lsr-id 3.3.3.9
mpls
#
mpls l2vpn
#
mpls ldp
#
interface Vlanif 30
ip address 169.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif 40
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 40
port hybrid tagged vlan 40
#
#
mpls l2vpn vpn1 encapsulation vlan
route-distinguisher 100:1
vpn-target 1:1 import-extcommunity
vpn-target 1:1 export-extcommunity
ce ce2 id 2 range 10 default-offset 0
connection ce-offset 1 interface Vlanif40
#
#
interface LoopBack1
ip address 3.3.3.9 255.255.255.255
#
bgp 100
peer 1.1.1.9 as-number 100
peer 1.1.1.9 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 1.1.1.9 enable
#
l2vpn-family
policy vpn-target
peer 1.1.1.9 enable
#
ospf 1
area 0.0.0.0
network 3.3.3.9 0.0.0.0
network 169.1.1.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-216, the Option A scheme is used to establish the inter-AS Martini VLL.
Figure 5-216 Networking diagram for configuring the inter-AS Martini VLL Option A
GE1/0/0 GE1/0/0
CE1 CE2
Loopback0 - 1.1.1.9/32
GigabitEthernet2/0/0 VLANIF 50 -
Loopback0 - 4.4.4.9/32
GigabitEthernet2/0/0 VLANIF 30 -
Loopback0 - 2.2.2.9/32
Loopback0 - 3.3.3.9/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Run an IGP protocol on the backbone network so that the devices in the same AS can
communicate with each other.
2. Configure the basic MPLS capability on the backbone network and establish dynamic LSPs
between PEs and ASBR-PEs in the same AS. If PEs and ASBR-PEs are not directly
connected, establish a remote LDP session.
3. Establish MPLS L2VC connections between the PEs and ASBR-PEs in the same AS.
Data Preparation
To complete the configuration, you need the following data:
l IS-IS data
l IP address of the peer
l MPLS LSR-IDs of PE and ASBR-PEs
l L2VC ID
Procedure
Step 1 Configure the IDs of the VLANs to which the interfaces belong according to Figure 5-216.
The configuration procedure is not mentioned.
NOTE
After the configuration, the ASBR and PE in the same AS can establish an IS-IS adjacency. Run
the display isis peer command, and you can see that the IS-IS adjacency is in Up state, and the
PEs can learn each other's loopback address.
Take the display on PE1 for example.
<PE1> display isis peer
# Configure ASBR-PE1.
[ASBR-PE1] mpls l2vpn
[ASBR-PE1-l2vpn] mpls l2vpn default martini
[ASBR-PE1-l2vpn] quit
[ASBR-PE1] interface vlanif 30
[ASBR-PE1-Vlanif30] mpls l2vc 1.1.1.9 100
[ASBR-PE1-Vlanif30] quit
# Configure ASBR-PE2.
[ASBR-PE2] mpls l2vpn
[ASBR-PE2-l2vpn] mpls l2vpn default martini
[ASBR-PE2-l2vpn] quit
[ASBR-PE2] interface vlanif 30
[ASBR-PE2-Vlanif30] mpls l2vc 4.4.4.9 100
[ASBR-PE2-Vlanif30] quit
# Configure PE2.
[PE2] mpls l2vpn
[PE2-l2vpn] mpls l2vpn default martini
[PE2-l2vpn] quit
[PE2] interface vlanif 50
[PE2-Vlanif50] mpls l2vc 3.3.3.9 100
[PE2-Vlanif50] quit
# Configure CE1.
[CE1] interface vlanif 10
[CE1-Vlanif10] ip address 100.1.1.1 255.255.255.0
[CE1-Vlanif10] quit
# Configure CE2.
[CE2] interface vlanif 50
[CE2-Vlanif50] ip address 100.1.1.2 255.255.255.0
[CE2-Vlanif50] quit
PW template name : --
primary or secondary : primary
VC tunnel/token info : 1 tunnels/tokens
NO.0 TNL type : lsp , TNL ID : 0x20001
create time : 0 days, 0 hours, 5 minutes, 37 seconds
up time : 0 days, 0 hours, 4 minutes, 47 seconds
last change time : 0 days, 0 hours, 4 minutes, 47 seconds
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 100.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
return
l Configuration file of PE1
#
sysname PE1
#
vlan batch 10 20
#
mpls lsr-id 1.1.1.9
mpls
#
mpls l2vpn
mpls l2vpn default martini
#
mpls ldp
#
isis 1
network-entity 10.0000.0000.0001.00
#
interface Vlanif10
mpls l2vc 2.2.2.9 100
#
interface Vlanif20
ip address 10.1.1.1 255.255.255.0
isis enable 1
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 20
#
interface LoopBack0
ip address 1.1.1.9 255.255.255.255
isis enable 1
#
return
l Configuration file of ASBR-PE1
#
sysname ASBR-PE1
#
vlan batch 20 30
#
mpls lsr-id 2.2.2.9
mpls
#
mpls l2vpn
mpls l2vpn default martini
#
mpls ldp
#
isis 1
network-entity 10.0000.0000.0002.00
#
interface Vlanif20
#
mpls l2vpn
mpls l2vpn default martini
#
mpls ldp
#
isis 1
network-entity 10.0000.0000.0004.00
#
interface Vlanif40
ip address 30.1.1.2 255.255.255.0
isis enable 1
mpls
mpls ldp
#
interface Vlanif50
mpls l2vc 3.3.3.9 100
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 40
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 50
#
interface LoopBack0
ip address 4.4.4.9 255.255.255.255
isis enable 1
#
return
Networking Requirements
As shown in Figure 5-217, the devices on the MPLS backbone network use OSPF as IGP to
realize the communication between the devices in the same AS. The Option A scheme is used
to establish the inter-AS Kompella VLL. The peer ASBR is regarded as the CE.
Figure 5-217 Networking diagram for configuring the inter-AS Kompella VLL Option A
GE1/0/0 GE1/0/0
CE1 CE2
Loopback1 - 1.1.1.9/32
GigabitEthernet2/0/0 VLANIF 50 -
Loopback1 - 4.4.4.9/32
GigabitEthernet2/0/0 VLANIF 30 -
Loopback1 - 2.2.2.9/32
Loopback1 - 3.3.3.9/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Run an IGP protocol on the backbone network so that the devices in the same AS can
communicate with each other.
2. Enable MPLS on the backbone and establish a dynamic LSP between the PE and the ASBR-
PE.
Data Preparation
To complete the configuration, you need the following data:
l OSPF data
l MPLS LSR-IDs of PE and ASBR-PEs
l L2VPN instance name, RD, and VPN target on the PE and the ASBR-PE
l CE connection name, CE ID, CE range (10 by default), and default offset (1 or 0, the default
is 0) on the PE and ASBR-PEs
Procedure
Step 1 Configure the IDs of the VLANs to which the interfaces belong according to Figure 5-217.
The configuration procedure is not mentioned.
NOTE
The ASBR-PE and the PEs in the same AS can ping each other's Loopback1 address.
<PE1> ping 2.2.2.2
PING 2.2.2.2: 56 data bytes, press CTRL_C to break
Reply from 2.2.2.2: bytes=56 Sequence=1 ttl=255 time=90 ms
Reply from 2.2.2.2: bytes=56 Sequence=2 ttl=255 time=90 ms
Reply from 2.2.2.2: bytes=56 Sequence=3 ttl=255 time=60 ms
Reply from 2.2.2.2: bytes=56 Sequence=4 ttl=255 time=90 ms
Reply from 2.2.2.2: bytes=56 Sequence=5 ttl=255 time=60 ms
# Configure ASBR-PE1.
[ASBR-PE1] bgp 100
[ASBR-PE1-bgp] peer 1.1.1.1 as-number 100
[ASBR-PE1-bgp] peer 1.1.1.1 connect-interface loopback 1
[ASBR-PE1-bgp] quit
# Configure ASBR-PE2.
[ASBR-PE2] bgp 200
[ASBR-PE2-bgp] peer 4.4.4.4 as-number 200
[ASBR-PE2-bgp] peer 4.4.4.4 connect-interface loopback 1
[ASBR-PE2-bgp] quit
# Configure PE2.
[PE2] bgp 200
[PE2-bgp] peer 3.3.3.3 as-number 200
[PE2-bgp] peer 3.3.3.3 connect-interface loopback 1
[PE2-bgp] quit
After the configuration, run the display bgp peer command, and you can see that the IBGP peer
relation between PE1 and the ASBR-PE in the same AS is in Established state. Take the display
on PE1 for example.
[PE1] display bgp peer
Step 5 Enable BGP peers in the BGP L2VPN address family view.
After BGP peers are enabled on the PEs and ASBR-PEs in the BGP L2VPN address family
view, L2VPN instance information can be exchanged between the PEs and ASBR-PEs.
# Configure PE1.
[PE1] bgp 100
[PE1-bgp] l2vpn-family
[PE1-bgp-af-l2vpn] peer 2.2.2.2 enable
# Configure ASBR-PE1.
[ASBR-PE1] bgp 100
[ASBR-PE1-bgp] l2vpn-family
[ASBR-PE1-bgp-af-l2vpn] peer 1.1.1.1 enable
# Configure ASBR-PE2.
[ASBR-PE2] bgp 200
[ASBR-PE2-bgp] l2vpn-family
[ASBR-PE2-bgp-af-l2vpn] peer 4.4.4.4 enable
# Configure PE2.
[PE2] bgp 200
[PE2-bgp] l2vpn-family
[PE2-bgp-af-l2vpn] peer 3.3.3.3 enable
# Configure ASBR-PE1.
[ASBR-PE1] mpls l2vpn
[ASBR-PE1-l2vpn] quit
[ASBR-PE1] mpls l2vpn vpn1 encapsulation vlan
[ASBR-PE1-mpls-l2vpn-vpn1] route-distinguisher 100:2
[ASBR-PE1-mpls-l2vpn-vpn1] mtu 1500
[ASBR-PE1-mpls-l2vpn-vpn1] vpn-target 1:1 both
# Configure ASBR-PE2.
[ASBR-PE2] mpls l2vpn
[ASBR-PE2-l2vpn] quit
[ASBR-PE2] mpls l2vpn vpn1 encapsulation vlan
[ASBR-PE2-mpls-l2vpn-vpn1] route-distinguisher 200:1
[ASBR-PE2-mpls-l2vpn-vpn1] mtu 1500
[ASBR-PE2-mpls-l2vpn-vpn1] vpn-target 1:1 both
[ASBR-PE2-mpls-l2vpn-vpn1] ce ce3 id 3 range 10 default-offset 0
[ASBR-PE2-mpls-l2vpn-ce-vpn1-ce1] connection ce-offset 4 interface vlanif 30
[ASBR-PE2-mpls-l2vpn-ce-vpn1-ce1] quit
[ASBR-PE2-mpls-l2vpn-vpn1] quit
# Configure PE2.
[PE2] mpls l2vpn
[PE2-l2vpn] quit
[PE2] mpls l2vpn vpn1 encapsulation vlan
[PE2-mpls-l2vpn-vpn1] route-distinguisher 200:2
[PE2-mpls-l2vpn-vpn1] mtu 1500
[PE2-mpls-l2vpn-vpn1] vpn-target 1:1 both
[PE2-mpls-l2vpn-vpn1] ce ce4 id 4 range 10 default-offset 0
[PE2-mpls-l2vpn-ce-vpn1-ce1] connection ce-offset 3 interface vlanif 50
[PE2-mpls-l2vpn-ce-vpn1-ce1] quit
[PE2-mpls-l2vpn-vpn1] quit
# Configure CE1.
[CE1] interface vlanif 10
[CE1-Vlanif10] ip address 10.1.1.1 255.255.255.0
[CE1-Vlanif10] quit
# Configure CE2.
[CE2] interface vlanif 50
[CE2-Vlanif50] ip address 10.1.1.2 255.255.255.0
[CE2-Vlanif50] quit
AC OAM state: up
BFD for PW session index: --
BFD for PW state: invalid
BFD for LSP state: true
Local C bit is not set, Remote C bit is not set
tunnel type: lsp , id: 0x2002000
You can find that reachable routes between CE1 and CE2 exist. Take the display on CE1 for
example.
<CE1> display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 5 Routes : 5
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
return
ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 20.1.1.0 0.0.0.3
#
return
l Configuration file of ASBR-PE1
#
sysname ASBR-PE1
#
vlan batch 20 30
#
mpls lsr-id 2.2.2.2
mpls
#
mpls l2vpn
#
mpls ldp
#
interface Vlanif20
ip address 20.1.1.2 255.255.255.252
mpls
mpls ldp
#
interface Vlanif30
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 20
#
interface GigabitEthernet2/0/0
port trunk allow-pass vlan 30
#
mpls l2vpn vpn1 encapsulation vlan
route-distinguisher 100:2
vpn-target 1:1 import-extcommunity
vpn-target 1:1 export-extcommunity
ce ce2 id 2 range 10 default-offset 0
connection ce-offset 1 interface Vlanif30
#
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
bgp 100
peer 1.1.1.1 as-number 100
peer 1.1.1.1 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 1.1.1.1 enable
#
l2vpn-family
policy vpn-target
peer 1.1.1.1 enable
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 20.1.1.0 0.0.0.3
#
return
l Configuration file of ASBR-PE2
#
sysname ASBR-PE2
#
vlan batch 30 40
#
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 40
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 50
#
interface LoopBack1
ip address 4.4.4.4 255.255.255.255
#
bgp 200
peer 3.3.3.3 as-number 200
peer 3.3.3.3 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 3.3.3.3 enable
#
l2vpn-family
policy vpn-target
peer 3.3.3.3 enable
#
ospf 1
area 0.0.0.0
network 40.1.1.0 0.0.0.3
network 4.4.4.4 0.0.0.0
#
mpls l2vpn vpn1 encapsulation vlan
route-distinguisher 200:2
vpn-target 1:1 import-extcommunity
vpn-target 1:1 export-extcommunity
ce ce4 id 4 range 10 default-offset 0
connection ce-offset 3 interface Vlanif50
#
#
return
Networking Requirements
As shown in Figure 5-218, CE1 is single-homed to PE1. CE2 is dual-homed to PE2 and PE3.
The networking requirements are as follows:
l A PW is set up between PE1 and PE3. This PW is the master PW, and uses the MPLS TE
tunnel.
l A PW is set up between PE1 and PE2. This PW is the backup PW, and uses the MPLS LSP
tunnel.
l If the master link (CE2 → PE3 → PE1) becomes faulty, the L2VPN traffic can be rapidly
switched to the backup link (CE2 → PE2 → PE1).
l After the master link (CE2 → PE3 → PE1) recovers from the fault, the L2VPN traffic is
switched back.
Figure 5-218 Networking diagram for configuring Martini VLL FRR (asymmetrically
connected CEs)
P
1 P GE
2 /0/ 2 /0/
GE 2
Loopback1 Loopback1 Loopback1
1.1.1.1/32 3.3.3.3/32
4.4.4.4/32
1 GE
2 /0/ 2 /0/
GE 1
MPLS TE
PE1 PE3
Loopback1
GE2 MP
GE1/0/0 /0/2 LS 2.2.2.2/32
LSP GE1/0/0
GE2
/0/1 GE1/0/0
PE2
GE1/0/0 GE1/0/0
CE1 GE1/0/1 CE2
GE1/0/1
Client1 Client2
10.1.1.1/24 10.1.1.2/24
Loopback1 - 1.1.1.1/32
Loopback1 - 2.2.2.2/32
Loopback1 - 3.3.3.3/32
Loopback1 - 4.4.4.4/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure OSPF on the backbone network.
2. Set up an MPLS TE tunnel between PE1 and PE3, and an LSP between PE1 and PE2.
3. Set up MPLS LDP sessions between PE1 and PE2, and between PE1 and PE3.
4. Set up an MPLS LDP session between PE1 and PE3.
5. Use PW templates to configure PWs on PEs. You need to use tunnel policies to configure
the master PW because the master PW uses the MPLS TE tunnel.
Data Preparation
To complete the configuration, you need the following data:
l Tunnel policies
l Bandwidth for MPLS TE tunnels
l Name of the remote peer of MPLS LDP
l VC IDs of the master PW and the backup PW
l Name of the PW template
Procedure
Step 1 Configure the IDs of the VLANs to which the interfaces belong according to Figure 5-218.
The configuration procedure is not mentioned.
NOTE
The packets sent from CE to PE must have VLAN tags when a VLANIF interface or a sub-interface used
as an AC interface.
Step 2 Configure IGP on the MPLS backbone network so that PEs and P can interwork.
# Configure PE1.
[PE1] interface loopback 1
[PE1-LoopBack1] ip address 1.1.1.1 32
[PE1-LoopBack1] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] ip address 100.13.1.1 30
[PE1-Vlanif20] quit
[PE1] interface vlanif 40
[PE1-Vlanif40] ip address 100.12.1.1 30
[PE1-Vlanif40] quit
[PE1] ospf 1
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] network 100.13.1.0 0.0.0.3
[PE1-ospf-1-area-0.0.0.0] network 100.12.1.0 0.0.0.3
# Configure the P.
[P] interface loopback 1
[P-LoopBack1] ip address 4.4.4.4 32
[P-LoopBack1] quit
[P] interface vlanif 20
[P-Vlanif20] ip address 100.13.1.2 30
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] ip address 100.34.1.1 30
[P-Vlanif30] quit
[P] ospf 1
[P-ospf-1] area 0
[P-ospf-1-area-0.0.0.0] network 100.13.1.0 0.0.0.3
[P-ospf-1-area-0.0.0.0] network 100.34.1.0 0.0.0.3
[P-ospf-1-area-0.0.0.0] network 4.4.4.4 0.0.0.0
# Configure PE3.
[PE3] interface loopback 1
[PE3-LoopBack1] ip address 3.3.3.3 32
[PE3-LoopBack1] quit
[PE3] interface vlanif 30
[PE3-Vlanif30] ip address 100.34.1.2 30
[PE3-Vlanif30] quit
[PE3] ospf 1
[PE3-ospf-1] area 0
[PE3-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[PE3-ospf-1-area-0.0.0.0] network 100.34.1.0 0.0.0.3
# Configure PE2.
[PE2] interface loopback 1
[PE2-LoopBack1] ip address 2.2.2.2 32
[PE2-LoopBack1] quit
[PE2] interface vlanif 40
[PE2-Vlanif40] ip address 100.12.1.2 30
[PE2-Vlanif40] quit
[PE2] ospf 1
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] network 100.12.1.0 0.0.0.3
After the configuration, run the display ip routing-table command on the PEs, and you can see
that PE1 and PE2, and PE1 and PE3 have learned the routes on the Loopback1 interface of each
other.
<PE1> display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 15 Routes : 15
Step 3 Configure the basic MPLS capabilities on the MPLS backbone network.
# Enable MPLS, and set LSR-ID as the IP address of the Loopback1 interface. Enable MPLS
on the interfaces of the backbone network.
# Configure PE1.
[PE1] mpls lsr-id 1.1.1.1
[PE1] mpls
[PE1-mpls] quit
[PE1] interface Vlanif 20
[PE1-Vlanif20] mpls
[PE1-Vlanif20] quit
[PE1] interface vlanif 40
[PE1-Vlanif40] mpls
[PE1-Vlanif40] quit
# Configure the P.
[P] mpls lsr-id 4.4.4.4
[P] mpls
[P-mpls] quit
[P] interface Vlanif 20
[P-Vlanif20] mpls
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] mpls
[P-Vlanif30] quit
# Configure PE2.
[PE2] mpls lsr-id 2.2.2.2
[PE2] mpls
[PE2-mpls] quit
[PE2] interface vlanif 40
[PE2-Vlanif40] mpls
[PE2-Vlanif40] quit
# Configure PE3.
[PE3] mpls lsr-id 3.3.3.3
[PE3] mpls
[PE3-mpls] quit
[PE3] interface vlanif 30
[PE3-Vlanif30] mpls
[PE3-Vlanif30] quit
Step 4 Set up an MPLS TE tunnel between PE1 and PE3, and an LSP between PE1 and PE2.
# Configure PE1.
[PE1] mpls
[PE1-mpls] mpls te
[PE1-mpls] mpls rsvp-te
[PE1-mpls] mpls te cspf
[PE1-mpls] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] mpls te
[PE1-Vlanif20] mpls rsvp-te
[PE1-Vlanif20] quit
[PE1] interface tunnel2/0/0
[PE1-Tunnel2/0/0] ip address unnumbered interface loopback1
[PE1-Tunnel2/0/0] tunnel-protocol mpls te
[PE1-Tunnel2/0/0] destination 3.3.3.3
[PE1-Tunnel2/0/0] mpls te tunnel-id 103
[PE1-Tunnel2/0/0] mpls te commit
[PE1-Tunnel2/0/0] quit
[PE1] ospf 1
[PE1-ospf-1] opaque-capability enable
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] mpls-te enable
# Configure the P.
[P] mpls
[P-mpls] mpls te
[P-mpls] mpls rsvp-te
[P-mpls] quit
[P] interface vlanif 20
[P-Vlanif20] mpls te
[P-Vlanif20] mpls rsvp-te
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] mpls te
[P-Vlanif30] mpls rsvp-te
[P-Vlanif30] quit
[P] ospf 1
[P-ospf-1] opaque-capability enable
[P-ospf-1] area 0
[P-ospf-1-area-0.0.0.0] mpls-te enable
# Configure PE3.
[PE3] mpls
[PE3-mpls] mpls te
[PE3-mpls] mpls rsvp-te
[PE3-mpls] mpls te cspf
[PE3-mpls] quit
[PE3] interface vlanif 30
[PE3-Vlanif30] mpls te
[PE3-Vlanif30] mpls rsvp-te
[PE3-Vlanif30] quit
[PE3] interface tunnel 2/0/0
[PE3-Tunnel2/0/0] ip address unnumbered interface LoopBack1
[PE3-Tunnel2/0/0] tunnel-protocol mpls te
[PE3-Tunnel2/0/0] destination 1.1.1.1
[PE3-Tunnel2/0/0] mpls te tunnel-id 31
[PE3-Tunnel2/0/0] mpls te commit
[PE3-Tunnel2/0/0] quit
[PE3] ospf 1
[PE3-ospf-1] opaque-capability enable
[PE3-ospf-1] area 0
[PE3-ospf-1-area-0.0.0.0] mpls-te enable
# Configure PE1.
[PE1] mpls ldp
[PE1-mpls-ldp] quit
[PE1] interface vlanif 40
[PE1-Vlanif40] mpls ldp
[PE1-Vlanif40] quit
# Configure PE2.
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlanif 50
[PE2-Vlanif50] mpls ldp
[PE2-Vlanif50] quit
After the configuration, run the display tunnel-info all command on PEs. You can see that an
MPLS TE tunnel is set up between PE1 and PE3, and an MPLS LSP is set up between PE1 and
PE2.
Take the display on PE1 for example.
<PE1> display tunnel-info all
* -> Allocated VC Token
NOTE
In this example, PE1 and PE2 are directly connected and you do not need to manually configure remote
LDP sessions between them.
# Configure PE1.
[PE1] mpls ldp remote-peer 3.3.3.3
[PE1-mpls-ldp-remote-3.3.3.3] remote-ip 3.3.3.3
# Configure PE3.
[PE3] mpls ldp
[PE3-mpls-ldp] quit
[PE3] mpls ldp remote-peer 1.1.1.1
[PE3-mpls-ldp-remote-1.1.1.1] remote-ip 1.1.1.1
After the configuration, run the display mpls ldp session command on PEs. You can see that
the LDP peer relation is in Operational state. This indicates that the LDP sessions are set up.
Take the display on PE1 for example.
<PE1> display mpls ldp session
# Configure PE3.
[PE3] tunnel-policy p1
[PE3-tunnel-policy-p1] tunnel select-seq cr-lsp load-balance-number 1
[PE3-tunnel-policy-p1] quit
[PE1-l2vpn] quit
[PE1] pw-template 1to2
[PE1-pw-template-1to2] peer-address 2.2.2.2
[PE1-pw-template-1to2] control-word
[PE1-pw-template-1to2] vccv cc cw cv lsp-ping
[PE1-pw-template-1to2] quit
[PE1] pw-template 1to3
[PE1-pw-template-1to3] peer-address 3.3.3.3
[PE1-pw-template-1to3] control-word
[PE1-pw-template-1to3] vccv cc cw cv lsp-ping
[PE1-pw-template-1to3] quit
[PE1] interface vlanif 10
[PE1-Vlanif10] mpls l2vc pw-template 1to3 100 tunnel-policy p1
[PE1-Vlanif10] mpls l2vc pw-template 1to2 200 secondary
[PE1-Vlanif10] quit
# Configure PE2.
[PE2] mpls l2vpn
[PE2-l2vpn] mpls l2vpn default martini
[PE2-l2vpn] quit
[PE2] pw-template 2to1
[PE2-pw-template-2to1] peer-address 1.1.1.1
[PE2-pw-template-2to1] control-word
[PE2-pw-template-2to1] vccv cc cw cv lsp-ping
[PE2-pw-template-2to1] quit
[PE2] interface vlanif 10
[PE2-Vlanif10] mpls l2vc pw-template 2to1 200
[PE2-Vlanif10] quit
# Configure PE3.
[PE3] mpls l2vpn
[PE3-l2vpn] mpls l2vpn default martini
[PE3-l2vpn] quit
[PE3] pw-template 3to1
[PE3-pw-template-3to1] peer-address 1.1.1.1
[PE3-pw-template-3to1] control-word
[PE3-pw-template-3to1] vccv cc cw cv lsp-ping
[PE3-pw-template-3to1] quit
[PE3] interface vlanif 10
[PE3-Vlanif10] mpls l2vc pw-template 3to1 100 tunnel-policy p1
[PE3-Vlanif10] quit
After the configuration, view information about L2VPN connections on the PEs. Run the display
mpls l2vc command on the PEs. You can see that the master and backup PWs are established
and the PW status is Up. The master PW is in Active state; the backup PW is in Inactive state.
Take the display on PE1 for example.
<PE1> display mpls l2vc interface vlanif 10
*client interface : Vlanif10 is up
session state : up
AC state : up
VC state : up
VC ID : 100
VC type : VLAN
destination : 3.3.3.3
local group ID : 0 remote group ID : 0
local VC label : 21504 remote VC label : 21504
local AC OAM State : up
local PSN State : up
local forwarding state : forwarding
remote AC OAM state : up
remote PSN state : up
remote forwarding state: forwarding
BFD for PW : unavailable
manual fault : not set
active state : active
Run the display mpls 12vc interface command on PE1. You can see that the status of the master
PW becomes Inactive and the status of the backup PW becomes Active.
<PE1> display mpls l2vc interface vlanif 10
*client interface : Vlanif10 is up
session state : Down
AC state : up
VC state : Down
VC ID : 100
VC type : VLAN
destination : 3.3.3.3
local group ID : 0 remote group ID : 0
local VC label : 21504 remote VC label : 21504
local AC OAM State : up
local PSN State : up
local forwarding state : not forwarding
remote AC OAM state : up
remote PSN state : up
remote forwarding state: forwarding
Dynamic BFD for PW : enable
Detect Multipier : 3
Min Transit Interval : 100
Max Receive Interval : 100
Dynamic BFD Session : built
BFD for PW : unavailable
manual fault : not set
active state : inactive
forwarding entry : not exist
link state : down
local VC MTU : 1500 remote VC MTU : 1500
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet1/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
return
l Configuration file of CE2
#
sysname CE2
#
vlan batch 10
#
interface Vlanif10
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet1/0/2
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
return
l Configuration file of PE1
#
sysname PE1
#
vlan batch 10 20 40
#
mpls lsr-id 1.1.1.1
mpls
mpls te
mpls rsvp-te
mpls te cspf
#
mpls l2vpn
mpls l2vpn default martini
#
pw-template 1to2
peer-address 2.2.2.2
control-word
vccv cc cw cv lsp-ping
#
pw-template 1to3
peer-address 3.3.3.3
control-word
vccv cc cw cv lsp-ping
#
mpls ldp
#
mpls ldp remote-peer 3.3.3.3
remote-ip 3.3.3.3
#
interface Vlanif10
ip address 10.1.1.2 255.255.255.252
mpls l2vc pw-template 1to3 100 tunnel-policy p1
mpls l2vc pw-template 1to2 200 secondary
#
interface Vlanif20
ip address 100.13.1.1 255.255.255.252
mpls
mpls te
mpls te max-link-bandwidth 50
mpls te max-reservable-bandwidth 30
mpls rsvp-te
#
interface Vlanif40
ip address 100.12.1.1 255.255.255.252
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet2/0/1
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
interface GigabitEthernet2/0/2
port hybrid pvid vlan 40
port hybrid tagged vlan 40
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
interface Tunnel2/0/0
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 3.3.3.3
mpls te tunnel-id 103
mpls te commit
#
ospf 1
opaque-capability enable
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 100.13.1.0 0.0.0.3
network 100.12.1.0 0.0.0.3
mpls-te enable
#
tunnel-policy p1
tunnel select-seq cr-lsp load-balance-number 1
#
return
l Configuration file of P
#
sysname P
#
vlan batch 20 30
#
mpls lsr-id 4.4.4.4
mpls
mpls te
mpls rsvp-te
#
interface Vlanif20
ip address 100.13.1.2 255.255.255.252
mpls
mpls te
mpls rsvp-te
#
interface Vlanif30
ip address 100.34.1.1 255.255.255.252
mpls
mpls te
mpls rsvp-te
#
interface GigabitEthernet2/0/1
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
interface GigabitEthernet2/0/2
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#
interface LoopBack1
#
tunnel-policy p1
tunnel select-seq cr-lsp load-balance-number 1
#
return
Networking Requirements
As shown in Figure 5-219, CE1 is single-homed to PE1. CE2 is dual-homed to PE2 and PE3.
The networking requirements are as follows:
l A Kompella L2VPN connection using an MPLS TE tunnel is established between PE1 and
PE3.
l A Kompella L2VPN connection using an MPLS LSP is established between PE1 and PE2.
l If the master link (CE2 → PE3 → P → PE1) becomes faulty, the L2VPN traffic can be
rapidly switched to the backup link (CE2 → PE2 → PE1).
l After the master link (CE2 → PE3 → P → PE1) recovers from the fault, the L2VPN traffic
is switched back.
Figure 5-219 Networking diagram for configuring Kompella VLL FRR (asymmetrically
connected CEs)
P
1 P GE
2 /0/ 2 /0/
GE 2
Loopback1 Loopback1 Loopback1
1.1.1.1/32 3.3.3.3/32
4.4.4.4/32 GE
/1 2/ 0
2/0 / 1
GE
MPLS TE
PE1 PE3
Loopback1
GE1/0/0 GE2 MP GE1/0/0
/0/2 LS 2.2.2.2/32
L SP
GE2 GE1/0/0
/0/1
PE2
GE1/0/0
GE1/0/0
CE1 GE1/0/1 CE2
GE1/0/1
Client1 Client2
10.1.1.1/24 10.1.1.2/24
Loopback1 - 1.1.1.1/32
Loopback1 - 2.2.2.2/32
Loopback1 - 3.3.3.3/32
Loopback1 - 4.4.4.4/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure OSPF on the backbone network.
2. Set up an MPLS TE tunnel between PE1 and PE3, and an LSP between PE1 and PE2.
3. Set up Kompella active VLL connections on the PEs. When configuring the active VLL
connections, configure the tunnel policy because the active VLL connections are
established through MPLS TE tunnels.
Data Preparation
To complete the configuration, you need the following data:
l Tunnel policy
l ASN of BGP
l Names of VPN instances, RDs, and VPN targets
l Names and IDs of the CEs (The CE IDs are globally unique.) CE range, namely, the label
block
Procedure
Step 1 Configure the IDs of the VLANs to which the interfaces belong according to Figure 5-219.
The configuration procedure is not mentioned.
NOTE
# Configure CE2.
[CE2] interface vlanif 60
[CE2-Vlanif60] ip address 10.1.1.2 30
[CE2-Vlanif60] quit
Step 3 Configure an IGP protocol on the MPLS backbone network so that PEs and P can interwork.
# Configure PE1.
<Quidway> system-view
[Quidway] sysname PE1
[PE1] interface loopback1
[PE1-LoopBack1] ip address 1.1.1.1 32
[PE1-LoopBack1] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] ip address 100.13.1.1 30
[PE1-Vlanif20] quit
[PE1] interface vlanif 40
[PE1-Vlanif40] ip address 100.12.1.1 30
[PE1-Vlanif40] quit
[PE1] ospf 1
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] network 100.13.1.0 0.0.0.3
[PE1-ospf-1-area-0.0.0.0] network 100.12.1.0 0.0.0.3
# Configure the P.
<Quidway> system-view
[Quidway] sysname P
[P] interface loopback1
[P-LoopBack1] ip address 4.4.4.4 32
[P-LoopBack1] quit
[P] interface vlanif 20
[P-Vlanif20] ip address 100.13.1.2 30
[P-Vlanif20] quit
[P] interface vlanif 20
[P-Vlanif30] ip address 100.34.1.1 30
[P-Vlanif30] quit
[P] ospf 1
[P-ospf-1] area 0
[P-ospf-1-area-0.0.0.0] network 4.4.4.4 0.0.0.0
[P-ospf-1-area-0.0.0.0] network 100.13.1.0 0.0.0.3
[P-ospf-1-area-0.0.0.0] network 100.34.1.0 0.0.0.3
# Configure PE3.
<Quidway> system-view
[Quidway] sysname PE3
[PE3] interface loopback1
[PE3-LoopBack1] ip address 3.3.3.3 32
[PE3-LoopBack1] quit
[PE3] interface vlanif 30
[PE3-Vlanif30] ip address 100.34.1.2 30
[PE3-Vlanif30] quit
[PE3] ospf 1
[PE3-ospf-1] area 0
[PE3-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[PE3-ospf-1-area-0.0.0.0] network 100.34.1.0 0.0.0.3
# Configure PE2.
<Quidway> system-view
[Quidway] sysname PE2
[PE2] interface loopback 1
[PE2-LoopBack1] ip address 2.2.2.2 32
[PE2-LoopBack1] quit
[PE2] interface vlanif 40
[PE2-Vlanif40] ip address 100.12.1.2 30
[PE2-Vlanif40] quit
[PE2] ospf 1
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] network 100.12.1.0 0.0.0.3
After the configuration, run the display ip routing-table command on the PEs, and you can see
that PE1 and PE2, and PE1 and PE3 have learned the routes on the Loopback1 interface of each
other.
Take the display on PE1 for example.
<PE1> display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 13 Routes : 13
Step 4 Configure the basic MPLS capabilities on the MPLS backbone network.
# Enable MPLS, and set LSR-ID as the IP address of the Loopback1 interface. Enable MPLS
on the interfaces of the backbone network.
# Configure PE1.
[PE1] mpls lsr-id 1.1.1.1
[PE1] mpls
[PE1-mpls] quit
[PE1] interface vlanif 20
[PE1-Vlanif20]mpls
[PE1-Vlanif20] quit
[PE1] interface vlanif 40
[PE1-Vlanif40]mpls
[PE1-Vlanif40] quit
# Configure the P.
[P] mpls lsr-id 4.4.4.4
[P] mpls
[P-mpls] quit
[P] interface vlanif 20
[P-Vlanif20] mpls
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] mpls
[P-Vlanif30] quit
# Configure PE2.
[PE2] mpls lsr-id 2.2.2.2
[PE2] mpls
[PE2-mpls] quit
[PE2] interface vlanif 40
[PE2-Vlanif40] mpls
[PE2-Vlanif40] quit
# Configure PE3.
[PE3] mpls lsr-id 3.3.3.3
[PE3] mpls
[PE3-mpls] quit
[PE3] interface Vlanif 30
[PE3-Vlanif30] mpls
[PE3-Vlanif30] quit
Step 5 Set up an MPLS TE tunnel between PE1 and PE3, and an LSP between PE1 and PE2.
# Configure the MPLS TE tunnel.
# Configure PE1.
[PE1] mpls
[PE1-mpls] mpls te
[PE1-mpls] mpls rsvp-te
[PE1-mpls] mpls te cspf
[PE1] interface vlanif 20
[PE1-Vlanif20] mpls te
[PE1-Vlanif20] mpls rsvp-te
[PE1-Vlanif20] quit
[PE1] interface tunnel2/0/0
[PE1-Tunnel2/0/0] ip address unnumbered interface loopback1
[PE1-Tunnel2/0/0] tunnel-protocol mpls te
[PE1-Tunnel2/0/0] destination 3.3.3.3
[PE1-Tunnel2/0/0] mpls te tunnel-id 13
[PE1-Tunnel2/0/0] mpls te commit
[PE1-Tunnel2/0/0] quit
[PE1] ospf 1
[PE1-ospf-1] opaque-capability enable
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] mpls-te enable
# Configure the P.
[P] mpls
[P-mpls] mpls te
[P-mpls] mpls rsvp-te
[P] interface vlanif 20
[P-Vlanif20] mpls te
[P-Vlanif20] mpls rsvp-te
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] mpls te
[P-Vlanif30] mpls rsvp-te
[P-Vlanif30] quit
[P] ospf 1
[P-ospf-1] opaque-capability enable
[P-ospf-1] area 0
[P-ospf-1-area-0.0.0.0] mpls-te enable
# Configure PE3.
[PE3] mpls
[PE3-mpls] mpls te
[PE3-mpls] mpls rsvp-te
[PE3-mpls] mpls te cspf
[PE3] interface vlanif 30
[PE3-Vlanif30] mpls te
[PE3-Vlanif30] mpls rsvp-te
[PE3-Vlanif30] quit
[PE3] interface tunnel2/0/0
[PE3-Tunnel2/0/0] ip address unnumbered interface LoopBack1
[PE3-Tunnel2/0/0] tunnel-protocol mpls te
[PE3-Tunnel2/0/0] destination 1.1.1.1
[PE3-Tunnel2/0/0] mpls te tunnel-id 31
[PE3-Tunnel2/0/0] mpls te commit
[PE3-Tunnel2/0/0] quit
[PE3] ospf 1
[PE3-ospf-1] opaque-capability enable
[PE3-ospf-1] area 0
[PE3-ospf-1-area-0.0.0.0] mpls-te enable
# Configure PE2.
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlanif 40
[PE2-Vlanif40] mpls ldp
[PE2-Vlanif40] quit
After the configuration, run the display tunnel-info all command on PEs. You can see that an
MPLS TE tunnel is set up between PE1 and PE3, and an MPLS LSP is set up between PE1 and
PE2.
Take the display on PE1 for example.
<PE1> display tunnel-info all
* -> Allocated VC Token
Tunnel ID Type Destination Token
----------------------------------------------------------------------
0x1003d cr lsp 3.3.3.3 0
0x10027 lsp -- 1
0x10028 lsp 2.2.2.2 2
Step 6 Establish BGP L2VPN connections between PE1 and PE2, and between PE1 and PE3.
# Configure PE1.
[PE1] bgp 100
[PE1-bgp] peer 2.2.2.2 as-number 100
[PE1-bgp] peer 2.2.2.2 connect-interface loopback1
[PE1-bgp] peer 3.3.3.3 as-number 100
[PE1-bgp] peer 3.3.3.3 connect-interface loopback1
[PE1-bgp] l2vpn-family
[PE1-bgp-af-l2vpn] peer 3.3.3.3 enable
[PE1-bgp-af-l2vpn] peer 2.2.2.2 enable
# Configure PE3.
[PE3] bgp 100
[PE3-bgp] peer 1.1.1.1 as-number 100
[PE3-bgp] peer 1.1.1.1 connect-interface loopback1
[PE3-bgp] l2vpn-family
[PE3-bgp-af-l2vpn] peer 1.1.1.1 enable
# Configure PE2.
[PE2] bgp 100
[PE2-bgp] peer 1.1.1.1 as-number 100
[PE2-bgp] peer 1.1.1.1 connect-interface loopback1
[PE2-bgp] l2vpn-family
[PE2-bgp-af-l2vpn] peer 1.1.1.1 enable
After the configuration, run the display bgp l2vpn peer command on the PEs. You can see that
BGP L2VPN peers are in Established state.
# Configure PE1.
[PE1] tunnel-policy p1
[PE1-tunnel-policy-p1] tunnel select-seq cr-lsp load-balance-number 1
# Configure PE3.
[PE3] tunnel-policy p1
[PE3-tunnel-policy-p1] tunnel select-seq cr-lsp load-balance-number 1
# Configure PE1.
[PE1] interface vlanif 10
[PE1-Vlanif10] ip address 10.1.1.2 30
[PE1-Vlanif10] quit
[PE1] mpls l2vpn
[PE1-l2vpn] quit
[PE1] mpls l2vpn vpn1 encapsulation vlan control-word
[PE1-mpls-l2vpn-vpn1] route-distinguisher 100:1
[PE1-mpls-l2vpn-vpn1] vpn-target 1:1 both
[PE1-mpls-l2vpn-vpn1] ce ce1 id 1
[PE1-mpls-l2vpn-ce-vpn1-ce1] connection ce-offset 2 interface Vlanif 10 tunnel-
policy p1
[PE1-mpls-l2vpn-ce-vpn1-ce1] connection ce-offset 3 interface Vlanif 10 secondary
# Configure PE3.
[PE3] interface vlanif 60
[PE3-Vlanif60] ip address 10.1.1.1 30
[PE3-Vlanif60] quit
[PE3] mpls l2vpn
[PE3-l2vpn] quit
[PE3] mpls l2vpn vpn1 encapsulation vlan control-word
[PE3-mpls-l2vpn-vpn1] route-distinguisher 100:2
[PE3-mpls-l2vpn-vpn1] vpn-target 1:1 both
[PE3-mpls-l2vpn-vpn1] ce ce2 id 2
[PE3-mpls-l2vpn-ce-vpn1-ce2] connection ce-offset 1 interface Vlanif 60 tunnel-
policy p1
# Configure PE2.
[PE2] interface vlanif 50
[PE2-Vlanif50] ip address 10.1.1.1 30
[PE2-Vlanif50] quit
[PE2] mpls l2vpn
[PE2-l2vpn] quit
[PE2] mpls l2vpn vpn1 encapsulation vlan control-word
[PE2-mpls-l2vpn-vpn1] route-distinguisher 100:3
[PE2-mpls-l2vpn-vpn1] vpn-target 1:1 both
[PE2-mpls-l2vpn-vpn1] ce ce3 id 3
[PE2-mpls-l2vpn-ce-vpn1-ce3] connection ce-offset 1 Vlanif 50
After the configuration, view information about L2VPN connections on the PEs. Run the display
mpls l2vpn connection interface command on the PEs. You can see that the master and backup
PWs are established and the PW status is Up. The forwarding state of the master PW is True,
and that of the backup PW is False.
conn-type: remote
local vc state: up
remote vc state: up
local ce-id: 1
local ce name: ce1
remote ce-id: 3
intf(state,encap): Vlanif10(up,vlan)
peer id: 2.2.2.2
route-distinguisher: 100:3
local vc label: 25603
remote vc label: 25601
tunnel policy: default
primary or secondary: secondary
forward entry exist or not: true
forward entry active or not:false
manual fault set or not: not set
AC OAM state: up
BFD for PW session index: --
BFD for PW state: invalid
BFD for LSP state: true
Local C bit is set, Remote C bit is set
tunnel type: lsp , id: 0x10028
Step 9 Run OSPF on CE1 and CE2; advertise the route to 10.1.3.0/24 to CE2.
# Configure CE1.
[CE1] ospf 1
[CE1-ospf-1] area 0
[CE1-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.3
[CE1-ospf-1-area-0.0.0.0] network 10.1.3.0 0.0.0.255
# Configure CE2.
[CE2] ospf 1
[CE2-ospf-1] area 0
[CE2-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.3
[CE2-ospf-1-area-0.0.0.0] network 10.1.2.0 0.0.0.3
Run the display ip routing-table command on CE2. You can see that on CE2, the outgoing
interface of the routes to 10.1.3.0/24 is VLANIF 60. That is, the traffic is transmitted through
the primary path.
Take the display on CE2 for example.
<CE2> display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 5 Routes : 5
conn-type: remote
local vc state: up
remote vc state: up
local ce-id: 1
local ce name: ce1
remote ce-id: 3
intf(state,encap): Vlanif10(up,vlan)
peer id: 2.2.2.2
route-distinguisher: 100:3
local vc label: 25603
remote vc label: 25601
tunnel policy: default
primary or secondary: secondary
forward entry exist or not: true
forward entry active or not:false
manual fault set or not: not set
AC OAM state: up
BFD for PW session index: --
BFD for PW state: invalid
BFD for LSP state: true
Local C bit is set, Remote C bit is set
tunnel type: lsp , id: 0x10028
The status of the primary VC becomes Down. The forwarding state of the master PW becomes
False, and that of the backup PW becomes True. Take the display on PE1 for example.
<PE1> display mpls l2vpn connection interface vlanif 10
conn-type: remote
local vc state: up
remote vc state: down
local ce-id: 1
local ce name: ce1
remote ce-id: 2
intf(state,encap): Vlanif10(up,vlan)
peer id: 3.3.3.3
route-distinguisher: 100:2
local vc label: 25602
remote vc label: 25601
tunnel policy: p1
primary or secondary: primary
forwardEntry exist or not: false
forward entry active or not:false
manual fault set or not: not set
AC OAM state: up
BFD for PW session index: --
BFD for PW state: down
BFD for LSP state: true
Local C bit is set, Remote C bit is set
tunnel type: cr lsp, id: 0x1003d
conn-type: remote
local vc state: up
remote vc state: up
local ce-id: 1
Check the routing table on CE2, and you can see that the outgoing interface of the routes destined
for 10.1.3.0 changes to VLANIF 50. That is, L2VPN traffic is switched to the backup path.
<CE2> display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 5 Routes : 5
The status of the primary VC becomes Up. The forwarding state of the master PW becomes
True, and that of the backup PW becomes False. Take the display on PE1 for example.
<PE1> display mpls l2vpn connection interface vlanif 10
conn-type: remote
local vc state: up
remote vc state: up
local ce-id: 1
local ce name: ce1
remote ce-id: 2
intf(state,encap): Vlanif10(up,vlan)
peer id: 3.3.3.3
route-distinguisher: 100:2
local vc label: 25602
remote vc label: 25601
tunnel policy: p1
primary or secondary: primary
forwardEntry exist or not: true
forward entry active or not:true
manual fault set or not: not set
AC OAM state: up
BFD for PW session index: --
conn-type: remote
local vc state: up
remote vc state: up
local ce-id: 1
local ce name: ce1
remote ce-id: 3
intf(state,encap): Vlanif10(up,vlan)
peer id: 2.2.2.2
route-distinguisher: 100:3
local vc label: 25603
remote vc label: 25601
tunnel policy: default
primary or secondary: secondary
forwardEntry exist or not: true
forward entry active or not:false
manual fault set or not: not set
AC OAM state: up
BFD for PW session index: --
BFD for PW state: invalid
BFD for LSP state: true
Local C bit is set, Remote C bit is set
tunnel type: lsp , id: 0x10028
Check the routing table on CE2, and you can see that the outgoing interface of the routes destined
for 10.1.3.0 changes to VLANIF 60. That is, the L2VPN traffic is switched back to the primary
path.
<CE2> display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 5 Routes : 5
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10 70
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
ip address 10.1.2.1 255.255.255.0 sub
#
interface Vlanif70
ip address 10.1.3.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 70
#
ospf 1
area 0.0.0.0
network 10.1.1.0 0.0.0.3
network 10.1.2.0 0.0.0.3
network 10.1.3.0 0.0.0.255
#
return
l Configuration file of CE2
#
sysname CE2
#
vlan batch 50 60
#
interface Vlanif50
ip address 10.1.2.2 255.255.255.252
#
interface Vlanif60
ip address 10.1.1.2 255.255.255.252
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 60
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 50
#
ospf 1
area 0.0.0.0
network 10.1.1.0 0.0.0.3
network 10.1.2.0 0.0.0.3
#
return
l Configuration file of PE1
#
sysname PE1
#
vlan batch 10 20 40
#
mpls lsr-id 1.1.1.1
mpls
mpls te
mpls rsvp-te
mpls te cspf
#
mpls l2vpn
#
mpls ldp
#
interface Vlanif10
ip address 10.1.1.2 255.255.255.252
#
interface Vlanif20
ip address 100.13.1.1 255.255.255.252
mpls
mpls te
mpls rsvp-te
#
interface Vlanif40
route-distinguisher 100:3
vpn-target 1:1 import-extcommunity
vpn-target 1:1 export-extcommunity
ce ce3 id 3 range 10 default-offset 0
connection ce-offset 1 interface Vlanif50 tunnel-policy p1
#
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
bgp 100
peer 1.1.1.1 as-number 100
peer 1.1.1.1 connect-interface LoopBack1
#
ipv4-family unicast
undo synchronization
peer 1.1.1.1 enable
#
l2vpn-family
policy vpn-target
peer 1.1.1.1 enable
#
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 100.12.1.0 0.0.0.3
#
return
Networking Requirements
As shown in Figure 5-220, PE1 and PE2 are connected through an MPLS backbone network.
An LSP needs to be used to set a dynamic PW between PE1 and PE2.
Figure 5-220 Networking diagram for configuring a dynamic SH-PW (using LSP)
MPLS Backbone
GE2/0/0 GE2/0/0
GE1/0/0 GE2/0/0
PE1 GE1/0/0 P GE1/0/0 PE2
PW
GE1/0/0 GE1/0/0
CE1 CE2
Loopback1 - 192.2.2.2/32
Loopback1 - 192.3.3.3/32
Loopback1 - 192.4.4.4/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Run an IGP protocol on the devices of the backbone network to implement connectivity.
2. Configure the basic MPLS functions on the backbone network and set up an LSP. Set up
the MPLS LDP peer relation between the two PEs on the two ends of the PW.
3. Create an MPLS L2VC connection between the two PEs.
Data Preparation
To complete the configuration, you need the following data:
Procedure
Step 1 Configure the IDs of the VLANs to which the interfaces of CE, PE, and P belong according to
Figure 5-220.
NOTE
Step 2 Assign an IP address to the VLANIF interface connecting the CE to the PE.
After the configuration, run the display ip routing-table command. You can see that PE1 and
PE2 can learn the loopback 0 address of each other that is discovered by the OSPF protocol, and
can ping each other.
<PE1> display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 9 Routes : 9
Enable MPLS on the backbone network, set up LSPs and LDP remote sessions between the PEs.
After the configuration, run the related command, and you can see that LDP sessions are set up
between PEs, and between each pair of PE and P, and the session status is Operational.
Take the display on PE1 for example.
<PE1> display mpls ldp session
# Configure PE2.
[PE2] mpls l2vpn
[PE2-l2vpn] quit
[PE2] interface Vlanif 30
[PE2-Vlanif30] mpls l2vc 192.2.2.2 100
[PE2-Vlanif30] quit
tunnel policy : --
traffic behavior : --
PW template name : --
primary or secondary : primary
VC tunnel/token info : 1 tunnels/tokens
NO.0 TNL type : lsp , TNL ID : 0x20020
create time : 0 days, 0 hours, 7 minutes, 16 seconds
up time : 0 days, 0 hours, 5 minutes, 6 seconds
last change time : 0 days, 0 hours, 5 minutes, 6 seconds
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 100.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
return
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 20
#
interface LoopBack0
ip address 192.2.2.2 255.255.255.255
#
ospf 1
area 0.0.0.0
network 192.2.2.2 0.0.0.0
network 10.1.1.0 0.0.0.255
#
return
l Configuration file of P
#
sysname P
#
vlan batch 20 40
#
mpls lsr-id 192.4.4.4
mpls
#
mpls ldp
#
interface Vlanif20
ip address 10.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif40
ip address 10.2.2.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 20
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 40
#
interface LoopBack0
ip address 192.4.4.4 255.255.255.255
#
ospf 1
area 0.0.0.0
network 192.4.4.4 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.2.2.0 0.0.0.255
#
return
l Configuration file of PE2
#
sysname PE2
#
vlan batch 30 40
#
mpls lsr-id 192.3.3.3
mpls
#
mpls l2vpn
#
mpls ldp
#
mpls ldp remote-peer 192.2.2.2
remote-ip 192.2.2.2
#
interface Vlanif30
mpls l2vc 192.2.2.2 100
#
interface Vlanif40
ip address 10.2.2.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 30
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 40
#
interface LoopBack0
ip address 192.3.3.3 255.255.255.255
#
ospf 1
area 0.0.0.0
network 192.3.3.3 0.0.0.0
network 10.2.2.0 0.0.0.255
#
return
Networking Requirements
You need to set up a static MH-PW between U-PE1 and U-PE2. The S-PE is the switching node,
which sets up a two-hop static PW.
Loopback0 Loopback0
1.1.1.9/32 PW Sta 5.5.5.9/32
tic tic
Sta PW
GE2/0/0 GE1/0/0
U-PE1 U-PE2
GE1/0/0 GE2/0/0
GE1/0/0 GE1/0/0
CE1 CE2
Loopback0 - 1.1.1.9/32
GigabitEthernet2/0/0 VLANIF 60 -
Loopback0 - 5.5.5.9/32
Loopback0 - 2.2.2.9/32
Loopback0 - 4.4.4.9/32
Loopback0 - 3.3.3.9/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Run a routing protocol on the devices of the backbone network to implement connectivity.
2. Configure the basic MPLS functions on the backbone network and set up an LSP.
3. Create an MPLS L2VC connection between the two U-PEs.
4. Create a switching PW on the S-PE.
Data Preparation
To complete the configuration, you need the following data:
l L2VC IDs of U-PE1 and U-PE2
l MPLS LSR-IDs of U-PE1, S-PE, and U-PE2
l Name of the PW template and attributes of the PW template used on the U-PEs
l VC labels of the PW (pay attention to the mapping between the VC labels on the two ends)
l Encapsulation type of the S-PE
Procedure
Step 1 Configure the IDs of the VLANs to which the interfaces belong according to Figure 5-221.
The configuration procedure is not mentioned.
NOTE
[U-PE1-l2vpn] quit
[U-PE1] interface vlanif 10
[U-PE1-Vlanif10] mpls static-l2vc pw-template pwt 100 transmit-vpn-label 100
receive-vpn-label 100
[U-PE1-Vlanif10] quit
# Configure S-PE.
[S-PE] mpls l2vpn
[S-PE-l2vpn] quit
[S-PE] mpls switch-l2vc 5.5.5.9 100 trans 200 recv 200 between 1.1.1.9 100 trans
100 recv 100 encapsulation vlan
# Configure U-PE2.
[U-PE2] mpls l2vpn
[U-PE2-l2vpn] quit
[U-PE2] pw-template pwt
[U-PE2-pw-template-pwt] peer-address 3.3.3.9
[U-PE2-pw-template-pwt] quit
[U-PE2] interface vlanif 60
[U-PE2-Vlanif60] mpls static-l2vc pw-template pwt 100 transmit-vpn-label 200
receive-vpn-label 200
[U-PE2-Vlanif60] quit
NOTE
The transmit-vpn-label set on the U-PE must be consistent with the recv label on the S-PE; the receive-
vpn-label set on the U-PE must be consistent with the trans label on the S-PE. Otherwise, CEs cannot
communicate with each other.
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 100.1.1.1 255.255.255.0
#
interface GigabitEthernet21/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
return
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 20
#
interface LoopBack0
ip address 1.1.1.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 1.1.1.9 0.0.0.0
#
return
l Configuration file of P1
#
sysname P1
#
vlan batch 20 30
#
mpls lsr-id 2.2.2.9
mpls
#
mpls ldp
#
interface Vlanif20
ip address 10.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif30
ip address 20.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 20
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 30
#
interface LoopBack0
ip address 2.2.2.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 20.1.1.0 0.0.0.255
network 2.2.2.9 0.0.0.0
#
return
l Configuration file of S-PE
#
sysname S-PE
#
vlan batch 30 40
#
mpls lsr-id 3.3.3.9
mpls
#
mpls l2vpn
#
mpls switch-l2vc 5.5.5.9 100 trans 200 recv 200 between 1.1.1.9 100 trans 100
recv 100 encapsulation vlan
#
mpls ldp
#
interfave Vlanif30
ip address 20.1.1.2 255.255.255.0
mpls
mpls ldp
#
interfave Vlanif40
ip address 30.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 30
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 40
#
interface LoopBack0
ip address 3.3.3.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 20.1.1.0 0.0.0.255
network 30.1.1.0 0.0.0.255
network 3.3.3.9 0.0.0.0
#
return
l Configuration file of P2
#
sysname P2
#
vlan batch 40 50
#
mpls lsr-id 4.4.4.9
mpls
#
mpls ldp
#
interface Vlanif40
ip address 30.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif50
ip address 40.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 40
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 50
#
interface LoopBack0
ip address 4.4.4.9 255.255.255.255
#
ospf 1
area 0.0.0.0
Networking Requirements
As shown in Figure 5-222, U-PE1 and U-PE2 are connected through the MPLS backbone
network. Use the LSP and set S-PE as the switching node to set up a dynamic MH-PW between
U-PE1 and U-PE2.
Loopback0 Loopback0
1.1.1.9/32 100 PW 5.5.5.9/32
PW 200
GE2/0/0 GE1/0/0
U-PE1 U-PE2
GE1/0/0 GE2/0/0
GE1/0/0 GE1/0/0
CE1 CE2
Loopback0 - 1.1.1.9/32
GigabitEthernet2/0/0 VLANIF 60 -
Loopback0 - 5.5.5.9/32
Loopback0 - 2.2.2.9/32
Loopback0 - 4.4.4.9/32
Loopback0 - 3.3.3.9/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Run an IGP protocol on the devices of the backbone network to implement connectivity.
2. Configure the basic MPLS functions on the backbone network and set up an LSP. Set up
MPLS LDP peer relations between U-PE1 and S-PE, and between U-PE2 and S-PE.
3. Create a PW template. Enable the CW and LSP ping function.
4. Create an MPLS L2VC connection between the two U-PEs.
5. Create a switching PW on the switching node S-PE.
Data Preparation
To complete the configuration, you need the following data:
l L2VC IDs on U-PE1 and U-PE2 (the L2VC IDs should be different)
l MPLS LSR-IDs of U-PE1, S-PE, and U-PE2
l IP addresses of the remote peers
l Encapsulation type of the switching PW
l Name and parameters of the PW template on U-PEs
Procedure
Step 1 Configure the IDs of the VLANs to which the interfaces belong according to Figure 5-222.
The configuration procedure is not mentioned.
NOTE
The U-PEs can ping each other. Take the display on U-PE1 for example.
<U-PE1> ping 40.1.1.2
PING 40.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 40.1.1.2: bytes=56 Sequence=1 ttl=252 time=160 ms
Reply from 40.1.1.2: bytes=56 Sequence=2 ttl=252 time=120 ms
Reply from 40.1.1.2: bytes=56 Sequence=3 ttl=252 time=150 ms
Reply from 40.1.1.2: bytes=56 Sequence=4 ttl=252 time=150 ms
Reply from 40.1.1.2: bytes=56 Sequence=5 ttl=252 time=160 ms
Configure the basic MPLS capability on the MPLS backbone network. Set up tunnels and LDP
sessions between U-PE1 and S-PE, and between S-PE and U-PE2.
# Configure U-PE1.
[U-PE1] mpls lsr-id 1.1.1.9
[U-PE1] mpls
[U-PE1-mpls] quit
[U-PE1] mpls ldp
[U-PE1-mpls-ldp] quit
[U-PE1] interface vlanif 20
[U-PE1-Vlanif20] mpls
[U-PE1-Vlanif20] mpls ldp
[U-PE1-Vlanif20] quit
[U-PE1] mpls ldp remote-peer 3.3.3.9
[U-PE1-mpls-ldp-remote-3.3.3.9] remote-ip 3.3.3.9
[U-PE1-mpls-ldp-remote-3.3.3.9] quit
# Configure P1.
[P1] mpls lsr-id 2.2.2.9
[P1] mpls
[P1-mpls] quit
[P1] mpls ldp
[P1-mpls-ldp] quit
[P1] interface vlanif 20
[P1-Vlanif20] mpls
# Configure S-PE.
[S-PE] mpls lsr-id 3.3.3.9
[S-PE] mpls
[S-PE-mpls] quit
[S-PE] mpls ldp
[S-PE-mpls-ldp] quit
[S-PE] interface vlanif 30
[S-PE-Vlanif30] mpls
[S-PE-Vlanif30] mpls ldp
[S-PE-Vlanif30] quit
[S-PE] interface vlanif 30
[S-PE-Vlanif40] mpls
[S-PE-Vlanif40] mpls ldp
[S-PE-Vlanif40] quit
[S-PE] mpls ldp remote-peer 1.1.1.9
[S-PE-mpls-ldp-remote-1.1.1.9] remote-ip 1.1.1.9
[S-PE-mpls-ldp-remote-1.1.1.9] quit
[S-PE] mpls ldp remote-peer 5.5.5.9
[S-PE-mpls-ldp-remote-5.5.5.9] remote-ip 5.5.5.9
[S-PE-mpls-ldp-remote-5.5.5.9] quit
# Configure P2.
[P2] mpls lsr-id 4.4.4.9
[P2] mpls
[P2-mpls] quit
[P2] mpls ldp
[P2-mpls-ldp] quit
[P2] interface vlanif 40
[P2-Vlanif40] mpls
[P2-Vlanif40] mpls ldp
[P2-Vlanif40] quit
[P2] interface vlanif 50
[P2-Vlanif50] mpls
[P2-Vlanif50] mpls ldp
[P2-Vlanif50] quit
# Configure U-PE2.
[U-PE2] mpls lsr-id 5.5.5.9
[U-PE2] mpls
[U-PE2-mpls] quit
[U-PE2] mpls ldp
[U-PE2-mpls-ldp] quit
[U-PE2] interface vlanif 50
[U-PE2-Vlanif50] mpls
[U-PE2-Vlanif50] mpls ldp
[U-PE2-Vlanif50] quit
[U-PE2] mpls ldp remote-peer 3.3.3.9
[U-PE2-mpls-ldp-remote-3.3.3.9] remote-ip 3.3.3.9
[U-PE2-mpls-ldp-remote-3.3.3.9] quit
After the configuration, run thedisplay mpls ldp session command on U-PE, P, or S-PE, and
you can see that the session status is Operational. Run the display mpls ldp peer command, and
you can see the status of the LDP sessions and adjacencies. Run the display mpls lsp command,
and you can see the status of the LSP. Take the display on S-PE for example.
<S-PE> display mpls ldp session
Create a PW template on each U-PE. Enable the CW and LSP ping function.
# Configure U-PE1.
[U-PE1] pw-template pwt
[U-PE1-pw-template-pwt] peer-address 3.3.3.9
[U-PE1-pw-template-pwt] control-word
[U-PE1-pw-template-pwt] vccv cc cw cv lsp-ping
[U-PE1-pw-template-pwt] quit
# Configure U-PE2.
[U-PE2] pw-template pwt
[U-PE2-pw-template-pwt] peer-address 3.3.3.9
[U-PE2-pw-template-pwt] control-word
[U-PE2-pw-template-pwt] vccv cc cw cv lsp-ping
[U-PE2-pw-template-pwt] quit
NOTE
You can configure a dynamic PW without using a PW template. If the PW template is not used, PW
connectivity cannot be verified and path information of the PW cannot be collected. That is, the ping vc
and tracert vc commands cannot be used.
Configure the dynamic PW on the U-PE. Enable dynamic PW switching on the S-PE.
# Configure U-PE1.
[U-PE1] mpls l2vpn
[U-PE1-l2vpn] quit
[U-PE1] interface vlanif 10
[U-PE1-Vlanif10] mpls l2vc pw-template pwt 100
[U-PE1-Vlanif10] quit
# Configure S-PE.
[S-PE] mpls l2vpn
[S-PE-l2vpn] quit
[S-PE] mpls switch-l2vc 1.1.1.9 100 between 5.5.5.9 200 encapsulation vlan
# Configure U-PE2.
[U-PE2] mpls l2vpn
[U-PE2-l2vpn] quit
[U-PE2] interface vlanif 60
[U-PE2-Vlanif60] mpls l2vc pw-template pwt 200
[U-PE2-Vlanif60] quit
--- FEC: FEC 128 PSEUDOWIRE (NEW). Type = vlan, ID = 100 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 90/256/740 ms
If the S-PE is disabled from responding to an MPLS Echo Request packet, the configuration
on the S-PE is as follows:
[S-PE] undo lspv mpls-lsp-ping echo enable
Run the tracert vc command on the U-PE to collect information about LSRs and egress
PE, the U-PE displays the timeout information because it does not receive the reply packet.
Take the display on U-PE1 for example.
<U-PE1> tracert vc vlan 100 control-word remote 200 full-lsp-path
TTL Replier Time Type Downstream
0 Ingress 10.1.1.2/[1025 ]
To prevent PWE3 tracert attacks, you can configure the U-PE to filter the MPLS Echo
Request packets according to the MAC addresses. The filtering rules can be specified in
the ACL. For example, you can configure the ACL on U-PE2 that prevents U-PE1 from
obtaining the path information about U-PE2 through the tracert vc command. The
configuration is as follows:
[U-PE2] acl 3001
[U-PE2-acl-adv-3001] rule deny udp source 1.1.1.9 0
[U-PE2-acl-adv-3001] quit
[U-PE2] lspv packet-filter 3001
Run the tracert vc command on U-PE1, and then U-PE1 cannot collect information about
the egress PE of the PW. Take the display on U-PE1 for example.
<U-PE1> tracert vc vlan 100 control-word remote 200 full-lsp-path
TTL Replier Time Type Downstream
0 Ingress 10.1.1.2/[1025 ]
1 10.1.1.2 110 ms Transit 20.1.1.2/[3 ]
2 Request time out
3 30.1.1.2 60 ms Transit 40.1.1.2/[3 ]
4 Request time out
5 Request time out
6 Request time out
7 Request time out
By running the tracert vc command on U-PE2, however, you can collect information about
the LSRs where the PW passes through from U-PE2 to U-PE1 and information about the
egress PE.
[U-PE2] tracert vc vlan 200 control-word remote 100 full-lsp-path
TTL Replier Time Type Downstream
0 Ingress 40.1.1.1/[1026 ]
1 40.1.1.1 120 ms Transit 30.1.1.1/[3 ]
2 Request time out
3 20.1.1.1 60 ms Transit 10.1.1.1/[3 ]
4 10.1.1.1 160 ms Egress
Run the display lspv configuration command on U-PE2, and you can view the
configuration of PWE3 tracert.
<U-PE2> display lspv configuration
lspv packet filter 3001
Run the display lspv statistics command on U-PE, and you can view the statistics of PWE3
tracert. Take the display on U-PE2 for example.
Run the reset lspv statistics command on U-PE, and you can clear the statistics of PWE3
tracert. Take the display on U-PE2 for example.
<U-PE2> reset lspv statistics
<U-PE2> display lspv statistics
Total sent: 0 packet(s)
Total received: 0 packet(s)
MPLS echo request sent: 0 packet(s), received: 0 packet(s)
MPLS echo reply sent: 0 packet(s), received: 0 packet(s)
4. Verify the connectivity between CEs and view path information between the CEs.
CE1 and CE2 can ping each other.
<CE1> ping 100.1.1.2
PING 100.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 100.1.1.2: bytes=56 Sequence=1 ttl=255 time=180 ms
Reply from 100.1.1.2: bytes=56 Sequence=2 ttl=255 time=120 ms
Reply from 100.1.1.2: bytes=56 Sequence=3 ttl=255 time=160 ms
Reply from 100.1.1.2: bytes=56 Sequence=4 ttl=255 time=160 ms
Reply from 100.1.1.2: bytes=56 Sequence=5 ttl=255 time=130 ms
--- FEC: FEC 128 PSEUDOWIRE (NEW). Type = vlan, ID = 100 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 90/256/740 ms
If the S-PE is disabled from responding to an MPLS Echo Request packet, the configuration on
the S-PE is as follows:
[S-PE] undo lspv mpls-lsp-ping echo enable
Run the tracert vc command on the U-PE to collect information about LSRs and egress PE, the
U-PE displays the timeout information because it does not receive the reply packet. Take the
display on U-PE1 for example.
<U-PE1> tracert vc vlan 100 control-word remote 200 full-lsp-path
TTL Replier Time Type Downstream
0 Ingress 10.1.1.2/[1025 ]
1 10.1.1.2 130 ms Transit 20.1.1.2/[3 ]
2 Request time out
3 30.1.1.2 80 ms Transit 40.1.1.2/[3 ]
4 40.1.1.2 100 ms Egress
To prevent PWE3 tracert attacks, you can configure the U-PE to filter the MPLS Echo Request
packets according to the MAC addresses. The filtering rules can be specified in the ACL. For
example, you can configure the ACL on U-PE2 that prevents U-PE1 from obtaining the path
information about U-PE2 by running the tracert vc command. The configuration is as follows:
[U-PE2] acl 3001
[U-PE2-acl-adv-3001] rule deny udp source 1.1.1.9 0
[U-PE2-acl-adv-3001] quit
[U-PE2] lspv packet-filter 3001
Run the tracert vc command on U-PE1, and then U-PE1 cannot collect information about the
egress PE of the PW. Take the display on U-PE1 for example.
<U-PE1> tracert vc vlan 100 control-word remote 200 full-lsp-path
TTL Replier Time Type Downstream
0 Ingress 10.1.1.2/[1025 ]
1 10.1.1.2 110 ms Transit 20.1.1.2/[3 ]
2 Request time out
3 30.1.1.2 60 ms Transit 40.1.1.2/[3 ]
4 Request time out
5 Request time out
6 Request time out
7 Request time out
By running the tracert vc command on U-PE2, however, you can collect information about the
LSRs where the PW passes through from U-PE2 to U-PE1 and information about the egress PE.
[U-PE2] tracert vc vlan 200 control-word remote 100 full-lsp-path
TTL Replier Time Type Downstream
0 Ingress 40.1.1.1/[1026 ]
1 40.1.1.1 120 ms Transit 30.1.1.1/[3 ]
Run the display lspv configuration command on U-PE2, and you can view the configuration
of PWE3 tracert.
<U-PE2> display lspv configuration
lspv packet filter 3001
Run the display lspv statistics command on U-PE, and you can view the statistics of PWE3
tracert. Take the display on U-PE2 for example.
<U-PE2> display lspv statistics
Total sent: 10 packet(s)
Total received: 10 packet(s)
MPLS echo request sent: 0 packet(s), received: 10 packet(s)
MPLS echo reply sent: 10 packet(s), received: 0 packet(s)
Run the reset lspv statistics command on U-PE, and you can clear the statistics of PWE3 tracert.
Take the display on U-PE2 for example.
<U-PE2> reset lspv statistics
<U-PE2> display lspv statistics
Total sent: 0 packet(s)
Total received: 0 packet(s)
MPLS echo request sent: 0 packet(s), received: 0 packet(s)
MPLS echo reply sent: 0 packet(s), received: 0 packet(s)
Step 11 Verify the connectivity between CEs and view path information between the CEs.
CE1 and CE2 can ping each other.
<CE1> ping 100.1.1.2
PING 100.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 100.1.1.2: bytes=56 Sequence=1 ttl=255 time=180 ms
Reply from 100.1.1.2: bytes=56 Sequence=2 ttl=255 time=120 ms
Reply from 100.1.1.2: bytes=56 Sequence=3 ttl=255 time=160 ms
Reply from 100.1.1.2: bytes=56 Sequence=4 ttl=255 time=160 ms
Reply from 100.1.1.2: bytes=56 Sequence=5 ttl=255 time=130 ms
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 100.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
return
l Configuration file of U-PE1
#
sysname U-PE1
#
vlan batch 10 20
#
mpls lsr-id 1.1.1.9
mpls
#
mpls l2vpn
#
pw-template pwt
peer-address 3.3.3.9
control-word
vccv cc cw cv lsp-ping
#
mpls ldp
#
mpls ldp remote-peer 3.3.3.9
remote-ip 3.3.3.9
#
interface Vlanif10
mpls l2vc pw-template pwt 100
#
interface Vlanif 20
ip address 10.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 20
#
interface LoopBack0
ip address 1.1.1.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 1.1.1.9 0.0.0.0
#
return
l Configuration file of P1
#
sysname P1
#
vlan batch 20 30
#
mpls lsr-id 2.2.2.9
mpls
#
mpls ldp
#
interface Vlanif20
ospf 1
area 0.0.0.0
network 3.3.3.9 0.0.0.0
network 20.1.1.0 0.0.0.255
network 30.1.1.0 0.0.0.255
#
return
l Configuration file of P2
#
sysname P2
#
vlan batch 40 50
#
mpls lsr-id 4.4.4.9
mpls
#
mpls ldp
#
interface Vlanif40
ip address 30.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif50
ip address 40.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 40
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 50
#
interface LoopBack0
ip address 4.4.4.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 4.4.4.9 0.0.0.0
network 30.1.1.0 0.0.0.255
network 40.1.1.0 0.0.0.255
#
return
l Configuration file of U-PE2
#
sysname U-PE2
#
vlan batch 50 60
#
mpls lsr-id 5.5.5.9
mpls
#
mpls l2vpn
#
pw-template pwt
peer-address 3.3.3.9
control-word
vccv cc cw cv lsp-ping
#
mpls ldp
#
mpls ldp remote-peer 3.3.3.9
remote-ip 3.3.3.9
#
interface Vlanif50
Networking Requirements
U-PE1 and U-PE2 are connected through the MPLS backbone network.
You need to create a mixed MH-PW between U-PE1 and U-PE2 with the S-PE as the switching
node.
P1 S-PE P2
GE1/0/0 GE1/0/0
GE2/0/0 GE2/0/0
GE1/0/0 GE2/0/0
GE2/0/0
GE1/0/0
GE1/0/0 GE1/0/0
CE1 CE2
Loopback0 - 1.1.1.9/32
GigabitEthernet2/0/0 VLANIF 60 -
Loopback0 - 5.5.5.9/32
Loopback0 - 2.2.2.9/32
Loopback0 - 4.4.4.9/32
Loopback0 - 3.3.3.9/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Run an IGP protocol on the devices of the backbone network to implement connectivity.
2. Configure the basic MPLS functions on the backbone network and set up an LSP.
3. Set up a remote LDP session between the U-PE and S-PE.
4. Create a static or dynamic MPLS L2VC connection between the two U-PEs.
5. Create a switching PW on the S-PE.
Data Preparation
To complete the configuration, you need the following data:
l L2VC IDs on U-PE1 and U-PE2 (the L2VC IDs should be different)
l MPLS LSR-IDs of U-PE1, S-PE, and U-PE2
l VC label of the static PW on U-PE2 (pay attention to the mapping between the VC labels
on the two ends)
l Encapsulation type of the PW
l Name and attributes of the PW template used on U-PE2
Procedure
Step 1 Configure the IDs of the VLANs to which the interfaces belong according to Figure 5-223.
The configuration procedure is not mentioned.
NOTE
NOTE
When configuring mixed switching PW, note that ip-address vc-id on the left of between specifies the
dynamic PW, and ip-address vc-id on the right of between specifies the static PW. They cannot be
interchanged.
# Configure S-PE.
[S-PE] mpls l2vpn
[S-PE-l2vpn] quit
[S-PE] mpls switch-l2vc 1.1.1.9 100 between 5.5.5.9 200 trans 200 recv 100
encapsulation vlan
# Configure U-PE2.
[U-PE2] mpls l2vpn
[U-PE2-l2vpn] quit
[U-PE2] pw-template pwt
[U-PE2-pw-template-pwt] peer-address 3.3.3.9
[U-PE2-pw-template-pwt] quit
[U-PE2] interface vlanif 60
[U-PE2-Vlanif60] mpls static-l2vc pw-template pwt 200 transmit-vpn-label 100
receive-vpn-label 200
[U-PE2-Vlanif60] quit
tunnel policy : --
traffic behavior : --
PW template name : --
primary or secondary : primary
VC tunnel/token info : 1 tunnels/tokens
NO.0 TNL type : lsp , TNL ID : 0x20020
create time : 0 days, 13 hours, 3 minutes, 37 seconds
up time : 0 days, 12 hours, 54 minutes, 46 seconds
last change time : 0 days, 12 hours, 54 minutes, 46 seconds
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 100.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
return
l Configuration file of P1
#
sysname P1
#
vlan batch 20 30
#
mpls lsr-id 2.2.2.9
mpls
#
mpls ldp
#
interface Vlanif20
ip address 10.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif30
ip address 20.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 20
#
interface GigabitEthernet2/0/0
port link-type trunk
interface LoopBack0
ip address 5.5.5.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 5.5.5.9 0.0.0.0
network 40.1.1.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-224, CE1 is single-homed to PE1. CE2 is dual-homed to PE2 and PE3.
The networking requirements are as follows:
l The CEs are connected to the PEs through Ethernet links.
l A PW is set up between PE1 and PE3. This PW is the master PW, and uses the MPLS TE
tunnel.
l A PW is set up between PE1 and PE2. This PW is the backup PW, and uses the MPLS
LSP.
l If the master link (CE2 → PE3 → P → PE1) becomes faulty, the L2VPN traffic can be
rapidly switched to the backup link (CE2 → PE2 → PE1).
l After the master link (CE2 → PE3 → P → PE1) recovers from the fault, the L2VPN traffic
is switched back.
Figure 5-224 Networking diagram for configuring PW FRR - CEs are asymmetrically connected
to PEs through Ethernet links
P
1 GE
2 /0/ 2 /0/
Loopback1 GE 2
Loopback1
1.1.1.1/32 3.3.3.3/32
Loopback1
1 4.4.4.4/32 GE
2 /0/ 2 /0/
GE MPLS TE 1
PE1 PE3
GE2 MP Loopback1
/0/2 LS 2.2.2.2/32
GE1/0/0 LSP GE1/0/0
GE2
/0 /1 GE1/0/0
PE2
GE1/0/0
GE1/0/0
GE1/0/1
CE1 CE2
GE1/0/1 GE1/0/2
Client1 Client2
10.1.1.1/24 10.1.1.2/24
Loopback1 - 1.1.1.1/32
Loopback1 - 2.2.2.2/32
Loopback1 - 3.3.3.3/32
Loopback1 - 4.4.4.4/32
GigabitEthernet1/0/1 VLANIF 70 -
GigabitEthernet1/0/1 VLANIF 50 -
GigabitEthernet1/0/2 VLANIF 80 -
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l Tunnel policy
l Bandwidth for MPLS TE tunnels
l Name of the remote peer of MPLS LDP
l VC IDs of the master PW and the backup PW
l Name of the PW template
Procedure
Step 1 Configure the VLAN that each interface belongs to.
NOTE
Step 2 Configure an IGP protocol on the MPLS backbone network so that PEs and P can interwork.
# Configure PE1.
[PE1] interface loopback 1
[PE1-LoopBack1] ip address 1.1.1.1 32
[PE1-LoopBack1] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] ip address 100.13.1.1 30
[PE1-Vlanif20] quit
[PE1] interface vlanif 40
[PE1-Vlanif40] ip address 100.12.1.1 30
[PE1-Vlanif40] quit
[PE1] ospf 1
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] network 100.13.1.0 0.0.0.3
[PE1-ospf-1-area-0.0.0.0] network 100.12.1.0 0.0.0.3
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
# Configure the P.
# Configure PE3.
[PE3] interface loopback 1
[PE3-LoopBack1] ip address 3.3.3.3 32
[PE3-LoopBack1] quit
[PE3] interface vlanif 30
[PE3-Vlanif30] ip address 100.34.1.2 30
[PE3-Vlanif30] quit
[PE3] ospf 1
[PE3-ospf-1] area 0
[PE3-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[PE3-ospf-1-area-0.0.0.0] network 100.34.1.0 0.0.0.3
[PE3-ospf-1-area-0.0.0.0] quit
[PE3-ospf-1] quit
# Configure PE2.
[PE2] interface loopback 1
[PE2-LoopBack1] ip address 2.2.2.2 32
[PE2-LoopBack1] quit
[PE2] interface vlanif 40
[PE2-Vlanif40] ip address 100.12.1.2 30
[PE2-Vlanif40] quit
[PE2] ospf 1
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] network 100.12.1.0 0.0.0.3
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
After the configuration, run the display ip routing-table command on the PEs, and you can see
that PE1 and PE2, and PE1 and PE3 have learned the routes on the Loopback1 interface of each
other.
Take the display on PE1 for example.
<PE1> display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 13 Routes : 13
Step 3 Configure the basic MPLS capabilities on the MPLS backbone network.
# Enable MPLS, and set LSR-ID as the IP address of the Loopback1 interface. Enable MPLS
on the interfaces of the backbone network.
# Configure PE1.
[PE1] mpls lsr-id 1.1.1.1
[PE1] mpls
[PE1-mpls] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] mpls
[PE1-Vlanif20] quit
[PE1] interface vlanif 40
[PE1-Vlanif40] mpls
[PE1-Vlanif40] quit
# Configure the P.
[P] mpls lsr-id 4.4.4.4
[P] mpls
[P-mpls] quit
[P] interface vlanif 20
[P-Vlanif20] mpls
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] mpls
[P-Vlanif30] quit
# Configure PE2.
[PE2] mpls lsr-id 2.2.2.2
[PE2] mpls
[PE2-mpls] quit
[PE2] interface vlanif 40
[PE2-Vlanif40] mpls
[PE2-Vlanif40] quit
# Configure PE3.
[PE3] mpls lsr-id 3.3.3.3
[PE3] mpls
[PE3-mpls] quit
[PE3] interface vlanif 30
[PE3-Vlanif30] mpls
[PE3-Vlanif30] quit
Step 4 Set up an MPLS TE tunnel between PE1 and PE3, and an LSP between PE1 and PE2.
# Configure PE1.
[PE1] mpls
[PE1-mpls] mpls te
[PE1-mpls] mpls rsvp-te
[PE1-mpls] mpls te cspf
[PE1-mpls] quit
[PE1] interface vlanif 20
[PE1-Vlanif20] mpls te
[PE1-Vlanif20] mpls rsvp-te
[PE1-Vlanif20] mpls te max-link-bandwidth 50
[PE1-Vlanif20] mpls te max-reservable-bandwidth 30
[PE1-Vlanif20] quit
[PE1] mpls ldp
[PE1-mpls-ldp] quit
[PE1] interface vlanif 40
[PE1-Vlanif40] mpls ldp
[PE1-Vlanif40] quit
[PE1] interface tunnel2/0/0
[PE1-Tunnel2/0/0] ip address unnumbered interface loopback1
[PE1-Tunnel2/0/0] tunnel-protocol mpls te
[PE1-Tunnel2/0/0] destination 3.3.3.3
[PE1-Tunnel2/0/0] mpls te tunnel-id 13
[PE1-Tunnel2/0/0] mpls te bandwidth bc0 20
[PE1-Tunnel2/0/0] mpls te commit
[PE1-Tunnel2/0/0] quit
[PE1] ospf 1
[PE1-ospf-1] opaque-capability enable
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] mpls-te enable
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
# Configure the P.
[P] mpls
[P-mpls] mpls te
[P-mpls] mpls rsvp-te
[P-mpls] quit
[P] interface Vlanif 20
[P-Vlanif20] mpls te
[P-Vlanif20] mpls rsvp-te
[P-Vlanif20] mpls te max-link-bandwidth 50
[P-Vlanif20] mpls te max-reservable-bandwidth 30
[P-Vlanif20] quit
[P] interface vlanif 30
[P-Vlanif30] mpls te
[P-Vlanif30] mpls rsvp-te
[P-Vlanif30] mpls te max-link-bandwidth 50
[P-Vlanif30] mpls te max-reservable-bandwidth 30
[P-Vlanif30] quit
[P] ospf 1
[P-ospf-1] opaque-capability enable
[P-ospf-1] area 0
[P-ospf-1-area-0.0.0.0] mpls-te enable
[P-ospf-1-area-0.0.0.0] quit
[P-ospf-1] quit
# Configure PE3.
[PE3] mpls
[PE3-mpls] mpls te
[PE3-mpls] mpls rsvp-te
[PE3-mpls] mpls te cspf
[PE3-mpls] quit
[PE3] interface vlanif 30
[PE3-Vlanif30] mpls te
[PE3-Vlanif30] mpls rsvp-te
[PE3-Vlanif30] mpls te max-link-bandwidth 50
[PE3-Vlanif30] mpls te max-reservable-bandwidth 30
[PE3-Vlanif30] quit
[PE3] interface tunnel2/0/0
[PE3-Tunnel2/0/0] ip address unnumbered interface LoopBack1
[PE3-Tunnel2/0/0] tunnel-protocol mpls te
[PE3-Tunnel2/0/0] destination 1.1.1.1
[PE3-Tunnel2/0/0] mpls te tunnel-id 31
[PE3-Tunnel2/0/0] mpls te bandwidth bc0 20
[PE3-Tunnel2/0/0] mpls te commit
[PE3-Tunnel2/0/0] quit
[PE3] ospf 1
[PE3-ospf-1] opaque-capability enable
[PE3-ospf-1] area0
[PE3-ospf-1-area-0.0.0.0] mpls-te enable
[PE3-ospf-1-area-0.0.0.0] quit
[PE3-ospf-1] quit
# Configure PE2.
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface Vlanif 40
[PE2-Vlanif40] mpls ldp
[PE2-Vlanif40] quit
After the configuration, run the display tunnel-info all command on PEs. You can see that an
MPLS TE tunnel is set up between PE1 and PE3, and an MPLS LSP is set up between PE1 and
PE2.
# Configure remote LDP sessions and set their IP addresses as the addresses of the loopback
interfaces on LDP remote peers.
NOTE
In this example, PE1 and PE2 are directly connected and you do not need to manually configure remote
LDP sessions between them.
# Configure PE1.
[PE1] mpls ldp remote-peer 3.3.3.3
[PE1-mpls-ldp-remote-3.3.3.3] remote-ip 3.3.3.3
# Configure PE3.
[PE3] mpls ldp
[PE3-mpls-ldp] quit
[PE3] mpls ldp remote-peer 1.1.1.1
[PE3-mpls-ldp-remote-1.1.1.1] remote-ip 1.1.1.1
After the configuration, run the display mpls ldp session command on PEs. You can see that
the LDP peer relation is in Operational state. This indicates that the LDP sessions are set up.
# Configure PE1.
[PE1] tunnel-policy p1
[PE1-tunnel-policy-p1] tunnel select-seq cr-lsp load-balance-number 1
[PE1-tunnel-policy-p1] quit
# Configure PE3.
[PE3] tunnel-policy p1
[PE3-tunnel-policy-p1] tunnel select-seq cr-lsp load-balance-number 1
[PE3-tunnel-policy-p1] quit
# Configure PE2.
[PE2] mpls l2vpn
[PE2-l2vpn] quit
[PE2] pw-template 2to1
[PE2-pw-template-2to1] peer-address 1.1.1.1
[PE2-pw-template-2to1] control-word
[PE2-pw-template-2to1] vccv cc cw cv lsp-ping bfd
[PE2-pw-template-2to1] quit
[PE2] interface Vlanif 50
[PE2-Vlanif50] mpls l2vc pw-template 2to1 200
[PE2-Vlanif50] quit
# Configure PE3.
[PE3] mpls l2vpn
[PE3-l2vpn] quit
[PE3] pw-template 3to1
[PE3-pw-template-3to1] peer-address 1.1.1.1
[PE3-pw-template-3to1] control-word
[PE3-pw-template-3to1] vccv cc cw cv lsp-ping bfd
[PE3-pw-template-3to1] quit
[PE3] interface Vlanif 60
[PE3-Vlanif60] mpls l2vc pw-template 3to1 100 tunnel-policy p1
[PE3-Vlanif60] quit
After the configuration, run the display pw-template command on PEs. You can view the
configurations of PW templates, and you can see that VCCV is enabled.
Take the display on PE1 for example.
[PE1] display pw-template
Total PW template number : 2
PeerIP : 2.2.2.2
Tnl Policy Name : --
CtrlWord : Enable
VCCV Capability : cw lsp-ping bfd
Behavior Name : --
Total PW : 1, Static PW : 0, LDP PW : 1, Rsvp PW : 0
After the configuration, run the display mpls l2vc interface command on PEs. You can see that
the master PW and backup PW are Up. The master PW is in Active state; the backup PW is in
Inactive state.
Run the display mac-address dynamic command on CEs. Take the display on CE2 for example.
You can see that GE1/0/0 has learned the MAC address of Client1 (00e0-413f-8401) and
GE1/0/2 has learned the MAC address of Client2 (00e0-c279-e10a 10). This indicates that the
clients are using the master link CE2 → PE3 → P → PE1 to forward data.
[CE2] display mac-address dynamic 1
MAC Address VLAN/VSI PEVLAN CEVLAN Port Type Lsp
--------------------------------------------------------------------------------
00e0-413f-8401 10 - - GE1/0/0 dynamic 1/0
00e0-c279-e10a 10 - - GE1/0/2 dynamic 1/0
Total 2 ,2 printed
Run the display mpls l2vc interface command on PE1. If the configuration is successful, you
can see that the master PW is in Active state, the backup PW is in InActive state.
<PE1> display mpls l2vc interface Vlanif 10
*client interface : Vlanif10 is up
session state : up
AC state : up
VC state : up
VC ID : 100
VC type : VLAN
destination : 3.3.3.3
local group ID : 0 remote group ID : 0
local VC label : 21504 remote VC label : 21504
local AC OAM State : up
local PSN State : up
local forwarding state : forwarding
remote AC OAM state : up
remote PSN state : up
remote forwarding state: forwarding
BFD for PW : unavailable
manual fault : not set
active state : active
forwarding entry : exist
link state : up
local VC MTU : 1500 remote VC MTU : 1500
local VCCV : cw lsp-ping bfd
remote VCCV : cw lsp-ping bfd
local control word : enable remote control word : enable
tunnel policy : p1
traffic behavior : --
PW template name : 1to3
primary or secondary : primary
VC tunnel/token info : 1 tunnels/tokens
NO.0 TNL type : cr lsp, TNL ID : 0x42002
create time : 0 days, 1 hours, 5 minutes, 19 seconds
up time : 0 days, 0 hours, 43 minutes, 33 seconds
last change time : 0 days, 0 hours, 43 minutes, 33 seconds
Run the display mpls 12vc interface command on PE1. You can see that the status of the master
PW becomes Inactive and the status of the backup PW becomes Active.
<PE1> display mpls l2vc interface Vlanif 10
*client interface : Vlanif10 is up
session state : up
AC state : up
VC state : up
VC ID : 100
VC type : VLAN
destination : 3.3.3.3
local group ID : 0 remote group ID : 0
local VC label : 21504 remote VC label : 21504
local AC OAM State : up
local PSN State : up
local forwarding state : forwarding
remote AC OAM state : up
remote PSN state : up
remote forwarding state: forwarding
BFD for PW : unavailable
manual fault : not set
active state : inactive
forwarding entry : exist
link state : up
local VC MTU : 1500 remote VC MTU : 1500
local VCCV : cw lsp-ping bfd
remote VCCV : cw lsp-ping bfd
local control word : enable remote control word : enable
tunnel policy : p1
traffic behavior : --
PW template name : 1to3
primary or secondary : primary
VC tunnel/token info : 1 tunnels/tokens
NO.0 TNL type : cr lsp, TNL ID : 0x42002
create time : 0 days, 1 hours, 5 minutes, 19 seconds
up time : 0 days, 0 hours, 43 minutes, 33 seconds
last change time : 0 days, 0 hours, 43 minutes, 33 seconds
link state : up
local VC MTU : 1500 remote VC MTU : 1500
local VCCV : cw lsp-ping bfd
remote VCCV : cw lsp-ping bfd
local control word : enable remote control word : enable
tunnel policy : --
traffic behavior : --
PW template name : 1to2
primary or secondary : secondary
VC tunnel/token info : 1 tunnels/tokens
NO.0 TNL type : lsp , TNL ID : 0x20021
create time : 0 days, 1 hours, 6 minutes, 30 seconds
up time : 0 days, 0 hours, 1 minutes, 0 seconds
last change time : 0 days, 0 hours, 1 minutes, 0 seconds
Run the display mac-address dynamic command again on CEs. Take the display on CE2 for
example. You can see that GE1/0/1 of CE2 has learned the MAC addresses of Client1
(00e0-413f-8401) and GE1/0/2 of CE2 has learned the MAC addresses of Client2 (00e0-c279-
e10a 10). This indicates that the clients are using the backup link CE2 → PE2 → PE1 to forward
data.
[CE2] display mac-address dynamic 1
MAC Address VLAN/VSI PEVLAN CEVLAN Port Type Lsp
--------------------------------------------------------------------------------
00e0-413f-8401 10 - - GE1/0/1 dynamic 1/0
00e0-c279-e10a 10 - - GE1/0/2 dynamic 1/0
Total 2 ,2 printed
Run the display mpls 12vc interface command on PE1. You can see that the status of the master
PW becomes Active and the status of the backup PW becomes Inactive.
[PE1] display mpls l2vc interface Vlanif10
*client interface : Vlanif10 is up
session state : up
AC state : up
VC state : up
VC ID : 100
VC type : VLAN
destination : 3.3.3.3
local group ID : 0 remote group ID : 0
local VC label : 21504 remote VC label : 21504
local AC OAM State : up
local PSN State : up
local forwarding state : forwarding
remote AC OAM state : up
remote PSN state : up
remote forwarding state: forwarding
BFD for PW : unavailable
manual fault : not set
active state : active
forwarding entry : exist
link state : up
local VC MTU : 1500 remote VC MTU : 1500
local VCCV : cw lsp-ping bfd
remote VCCV : cw lsp-ping bfd
local control word : enable remote control word : enable
tunnel policy : p1
traffic behavior : --
PW template name : 1to3
primary or secondary : primary
VC tunnel/token info : 1 tunnels/tokens
NO.0 TNL type : cr lsp, TNL ID : 0x42002
create time : 0 days, 1 hours, 15 minutes, 40 seconds
up time : 0 days, 0 hours, 43 minutes, 33 seconds
last change time : 0 days, 0 hours, 43 minutes, 33 seconds
Run the display mac-address dynamic command on CEs. Take the display on CE2 for example.
You can see that GE1/0/0 has learned the MAC address of Client1 (00e0-413f-8401) and
GE1/0/2 has learned the MAC address of Client2 (00e0-c279-e10a 10). This indicates that the
clients use the master link CE2 → PE3 → P → PE1 to forward data again.
[CE2] display mac-address dynamic 1
MAC Address VLAN/VSI PEVLAN CEVLAN Port Type Lsp
--------------------------------------------------------------------------------
00e0-413f-8401 10 - - GE1/0/0 dynamic 1/0
00e0-c279-e10a 10 - - GE1/0/2 dynamic 1/0
Total 2 ,2 printed
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10 70
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet1/0/1
port link-type trunk
port trunk allow-pass vlan 70
#
return
#
return
l Configuration file of PE1
#
sysname PE1
#
vlan batch 10 20 40
#
mpls lsr-id 1.1.1.1
mpls
mpls te
mpls rsvp-te
mpls te cspf
#
mpls l2vpn
#
pw-template 1to2
peer-address 2.2.2.2
control-word
vccv cc cw cv lsp-ping bfd
#
pw-template 1to3
peer-address 3.3.3.3
control-word
vccv cc cw cv lsp-ping bfd
#
mpls ldp
#
mpls ldp remote-peer 3.3.3.3
remote-ip 3.3.3.3
#
interface Vlanif10
mpls l2vc pw-template 1to3 100 tunnel-policy p1
mpls l2vc pw-template 1to2 200 secondary
#
interface Vlanif20
ip address 100.13.1.1 255.255.255.252
mpls
mpls te
mpls te max-link-bandwidth 50
mpls te max-reservable-bandwidth 30
mpls rsvp-te
#
interface Vlanif30
ip address 100.12.1.1 255.255.255.252
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet2/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface GigabitEthernet2/0/2
port link-type trunk
port trunk allow-pass vlan 40
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
#
interface Tunnel2/0/0
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 3.3.3.3
mpls te tunnel-id 13
mpls te bandwidth bc0 20
mpls te commit
#
ospf 1
opaque-capability enable
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 100.13.1.0 0.0.0.3
network 100.12.1.0 0.0.0.3
mpls-te enable
#
tunnel-policy p1
tunnel select-seq cr-lsp load-balance-number 1
#
return
l Configuration file of P
#
sysname P
#
vlan batch 20 30
#
mpls lsr-id 4.4.4.4
mpls
mpls te
mpls rsvp-te
#
interface Vlanif20
ip address 100.13.1.2 255.255.255.252
mpls
mpls te
mpls te max-link-bandwidth 50
mpls te max-reservable-bandwidth 30
mpls rsvp-te
#
interface Vlanif30
ip address 100.34.1.1 255.255.255.252
mpls
mpls te
mpls te max-link-bandwidth 50
mpls te max-reservable-bandwidth 30
mpls rsvp-te
#
interface GigabitEthernet2/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
interface GigabitEthernet2/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
interface LoopBack1
ip address 4.4.4.4 255.255.255.255
#
ospf 1
opaque-capability enable
area 0.0.0.0
network 100.13.1.0 0.0.0.3
network 100.34.1.0 0.0.0.3
network 4.4.4.4 0.0.0.0
mpls-te enable
#
return
l Configuration file of PE3
#
sysname PE3
#
vlan batch 30 60
#
mpls lsr-id 3.3.3.3
mpls
mpls te
mpls rsvp-te
mpls te cspf
#
mpls l2vpn
#
pw-template 3to1
peer-address 1.1.1.1
control-word
vccv cc cw cv lsp-ping bfd
#
mpls ldp
#
mpls ldp remote-peer 1.1.1.1
remote-ip 1.1.1.1
#
interface Vlanif30
ip address 100.34.1.2 255.255.255.252
mpls
mpls te
mpls te max-link-bandwidth 50
mpls te max-reservable-bandwidth 30
mpls rsvp-te
#
interface Vlanif60
mpls l2vc pw-template 3to1 100 tunnel-policy p1
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 60
#
interface GigabitEthernet2/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
#
interface Tunnel2/0/0
ip address unnumbered interface LoopBack1
tunnel-protocol mpls te
destination 1.1.1.1
mpls te tunnel-id 31
mpls te bandwidth bc0 20
mpls te commit
#
ospf 1
opaque-capability enable
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 100.34.1.0 0.0.0.3
mpls-te enable
#
tunnel-policy p1
tunnel select-seq cr-lsp load-balance-number 1
#
return
l Configuration file of PE2
#
sysname PE2
#
vlan batch 40 50
#
mpls lsr-id 2.2.2.2
mpls
#
mpls l2vpn
#
pw-template 2to1
peer-address 1.1.1.1
control-word
vccv cc cw cv lsp-ping bfd
#
mpls ldp
#
interface Vlanif40
ip address 100.12.1.2 255.255.255.252
mpls
mpls ldp
#
interface Vlanif50
mpls l2vc pw-template 2to1 200
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 50
#
interface GigabitEthernet2/0/1
port link-type trunk
port trunk allow-pass vlan 40
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 100.12.1.0 0.0.0.3
#
return
Networking Requirements
As shown in Figure 5-225, the Option A scheme is used to establish the inter-AS PWE3.
GE1/0/0 GE1/0/0
CE1 CE2
Loopback0 - 1.1.1.9/32
GigabitEthernet2/0/0 VLANIF 50 -
Loopback0 - 4.4.4.9/32
GigabitEthernet2/0/0 VLANIF 30 -
Loopback0 - 2.2.2.9/32
Loopback0 - 3.3.3.9/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Run an IGP protocol on the backbone network so that the devices in the same AS can
communicate with each other.
2. Configure the basic MPLS capability on the backbone network and establish dynamic LSPs
between PEs and ASBR-PEs in the same AS. If PEs and ASBR-PEs are not directly
connected, establish a remote LDP session.
3. Establish MPLS L2VC connections between the PEs and ASBR-PEs in the same AS.
Data Preparation
To complete the configuration, you need the following data:
l IS-IS data
l IP addresses of the peers (addresses of loopback interfaces on the peers)
l MPLS LSR-IDs of PEs and ASBR-PEs (addresses of the local loopback interfaces)
l L2VC ID
Procedure
Step 1 Configure the IDs of the VLANs to which the interfaces belong according to Figure 5-225.
Run the display ip routing-table command, and you can see that the PEs and ASBR-PEs can
learn the loopback routes of each other.
Take the display on ASBR-PE1 for example.
<ASBR-PE1> display ip routing-table
Route Flags: R - relied, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 7 Routes : 7
The ASBR-PEs and PEs in the same AS can ping each other.
Step 3 Enable MPLS and configure dynamic LSPs.
Configure the basic MPLS capability on the MPLS backbone network. Establish a dynamic LDP
LSP between the PE and ASBR-PE in the same AS.
After this step, an LSP is established between the PE and ASBR-PE in the same AS.
Take the display on ASBR-PE1 for example.
<ASBR-PE1> display mpls ldp session
# Configure PE1.
[PE1] mpls l2vpn
[PE1-l2vpn] quit
[PE1] interface vlanif 10
[PE1-Vlanif10] mpls l2vc 2.2.2.9 100
[PE1-Vlanif10] quit
# Configure ASBR-PE1.
[ASBR-PE1] mpls l2vpn
[ASBR-PE1-l2vpn] quit
[ASBR-PE1] interface vlanif 30
[ASBR-PE1-Vlanif30] mpls l2vc 1.1.1.9 100
[ASBR-PE1-Vlanif30] quit
# Configure ASBR-PE2.
[ASBR-PE2] mpls l2vpn
[ASBR-PE2-l2vpn] quit
[ASBR-PE2] interface vlanif 30
[ASBR-PE2-Vlanif30] mpls l2vc 4.4.4.9 100
[ASBR-PE2-Vlanif30] quit
# Configure PE2.
[PE2] mpls l2vpn
[PE2-l2vpn] quit
[PE2] interface vlanif 50
[PE2-Vlanif50] mpls l2vc 3.3.3.9 100
[PE2-Vlanif50] quit
# Configure CE1.
[CE1] interface vlanif 10
[CE1-Vlanif10] ip address 100.1.1.1 255.255.255.0
[CE1-Vlanif10] quit
# Configure CE2.
[CE2] interface vlanif 50
[CE2-Vlanif50] ip address 100.1.1.2 255.255.255.0
[CE2-Vlanif50] quit
----End
Configuration Files
l Configuration file of CE1
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 100.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port trunk allow-pass vlan 10
#
return
mpls l2vpn
#
mpls ldp
#
isis 1
network-entity 10.0000.0000.0002.00
#
interface Vlanif20
ip address 10.1.1.2 255.255.255.0
isis enable 1
mpls
mpls ldp
#
interface Vlanif30
mpls l2vc 1.1.1.9 100
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 20
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 30
#
interface LoopBack0
ip address 2.2.2.9 255.255.255.255
isis enable 1
#
return
#
sysname PE2
#
vlan batch 40 50
#
mpls lsr-id 4.4.4.9
mpls
#
mpls l2vpn
#
mpls ldp
#
isis 1
network-entity 10.0000.0000.0004.00
#
interface Vlanif40
ip address 30.1.1.2 255.255.255.0
isis enable 1
mpls
mpls ldp
#
interface Vlanif50
mpls l2vc 3.3.3.9 100
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 40
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 50
#
interface LoopBack0
ip address 4.4.4.9 255.255.255.255
isis enable 1
#
return
Networking Requirements
As shown in Figure 5-226, VPLS needs to be enabled on PE1 and PE2; CE1 is connected to
PE1 and CE2 is connected to PE2; CE1 and CE2 belong to the same VPLS network; PWs are
established with LDP as the VPLS signaling, and VPLS is configured to implement the
interworking between CE1 and CE2.
GE2/0/0 GE2/0/0
PE1 PE2
GE1/0/0 GE1/0/0
GE1/0/0 P GE2/0/0
GE1/0/0 GE1/0/0
CE1 CE2
Loopback1 - 1.1.1.9/32
Loopback1 - 3.3.3.9/32
Loopback1 - 2.2.2.9/32
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l Names and IDs of VSIs
l IP addresses of peers and tunnel policy used for setting up peer relationships
l Interfaces to which VSIs are bound
Procedure
Step 1 Configure the VLAN to which each interface belongs according to Figure 5-226.
The configuration details are not mentioned here.
NOTE
Do not add the AC-side port and PW-side port of a PE to the same VLAN; otherwise, a loop may occur.
# Configure PE2.
[PE2] mpls ldp remote-peer 1.1.1.9
[PE2-mpls-ldp-remote-1.1.1.9] remote-ip 1.1.1.9
[PE2-mpls-ldp-remote-1.1.1.9] quit
After the configuration, run the display mpls ldp session on PE1 or PE2. You can find that the
status of the peer relationship between PE1 and PE2 is Operational, which indicates that the
peer relationship is established.
Step 5 Enable MPLS L2VPN on PEs.
# Configure PE1.
[PE1] mpls l2vpn
# Configure PE2.
# Configure PE2.
[PE2] vsi a2 static
[PE2-vsi-a2] pwsignal ldp
[PE2-vsi-a2-ldp] vsi-id 2
[PE2-vsi-a2-ldp] peer 1.1.1.9
# Configure PE2.
[PE2] interface vlanif 40
[PE2-Vlanif40] l2 binding vsi a2
[PE2-Vlanif40] quit
# Configure CE2.
<Quidway> sysname CE2
[CE2] interface vlanif 40
[CE2-Vlanif40] ip address 10.1.1.2 255.255.255.0
[CE2-Vlanif40] quit
***VSI Name : a2
Administrator VSI : no
Isolate Spoken : disable
VSI Index : 0
PW Signaling : ldp
Member Discovery Style : static
PW MAC Learn Style : unqualify
Encapsulation Type : vlan
MTU : 1500
Mode : uniform
Service Class : --
Color : --
DomainId : 0
Domain Name :
VSI State : up
VSI ID : 2
*Peer Router ID : 3.3.3.9
VC Label : 23552
Peer Type : dynamic
Session : up
Tunnel ID : 0x20021,
**PW Information:
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
return
#
return
l Configuration file of PE1
#
sysname PE1
#
vlan batch 10 20
#
mpls lsr-id 1.1.1.9
mpls
#
mpls l2vpn
#
vsi a2 static
pwsignal ldp
vsi-id 2
peer 3.3.3.9
#
mpls ldp
#
mpls ldp remote-peer 3.3.3.9
remote-ip 3.3.3.9
#
interface Vlanif10
l2 binding vsi a2
#
interface Vlanif20
ip address 168.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid tagged vlan 10
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 1.1.1.9 0.0.0.0
network 168.1.1.0 0.0.0.255
#
return
l Configuration file of P
#
sysname P
#
vlan batch 20 30
#
mpls lsr-id 2.2.2.9
mpls
#
mpls ldp
#
interface Vlanif20
ip address 168.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif30
ip address 169.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#
interface LoopBack1
ip address 2.2.2.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 168.1.1.0 0.0.0.255
network 169.1.1.0 0.0.0.255
network 2.2.2.9 0.0.0.0
#
return
Networking Requirements
As shown in Figure 5-227, PE1 and PE2 are PEs to be enabled with the VPLS function; CE1
is connected to PE1 and CE2 is connected to PE2; CE1 and CE2 belong to the same VPLS
network;
It is required to set up PWs by using BGP as the VPLS signaling, implement the automatic
discovery of VPLS PEs through VPN targets, and implement interworking between CE1 and
CE2.
GE2/0/0 GE2/0/0
PE1 PE2
GE1/0/0 GE1/0/0
GE1/0/0 P GE2/0/0
GE1/0/0 GE1/0/0
CE1 CE2
Loopback1 - 1.1.1.9/32
Loopback1 - 3.3.3.9/32
Loopback1 - 2.2.2.9/32
Configuration Roadmap
The configuration roadmap is as follows:
Data Preparation
To complete the configuration, you need the following data:
l IP addresses of peers
l Names of the VSIs on PE1 and PE2
l BGP AS numbers on PE1 and PE2
l Signaling protocol of a VSI, that is, BGP
l RDs, VPN targets, site IDs of VSIs on PEs
l Interfaces to which VSIs are bound and VLAN IDs of the interfaces
Procedure
Step 1 Configure the VLAN to which each interface belongs according to Figure 5-227.
The configuration details are not mentioned here.
NOTE
Do not add the AC-side port and PW-side port of a PE to the same VLAN; otherwise, a loop may occur.
# Configure PE2.
[PE2] bgp 100
[PE2-bgp] peer 1.1.1.9 as-number 100
[PE2-bgp] peer 1.1.1.9 connect-interface loopback1
[PE2-bgp] vpls-family
[PE2-bgp-af-vpls] peer 1.1.1.9 enable
[PE2-bgp-af-vpls] quit
# Configure PE2.
[PE2] mpls l2vpn
# Configure PE1.
[PE1] vsi bgp1 auto
[PE1-vsi-bgp1] pwsignal bgp
[PE1-vsi-bgp1-bgp] route-distinguisher 168.1.1.1:1
[PE1-vsi-bgp1-bgp] vpn-target 100:1 import-extcommunity
[PE1-vsi-bgp1-bgp] vpn-target 100:1 export-extcommunity
[PE1-vsi-bgp1-bgp] site 1 range 5 default-offset 0
# Configure PE2.
[PE2] vsi bgp1 auto
[PE2-vsi-bgp1] pwsignal bgp
[PE2-vsi-bgp1-bgp] route-distinguisher 169.1.1.2:1
[PE2-vsi-bgp1-bgp] vpn-target 100:1 import-extcommunity
[PE2-vsi-bgp1-bgp] vpn-target 100:1 export-extcommunity
[PE2-vsi-bgp1-bgp] site 2 range 5 default-offset 0
# Create a sub-interface on PE2, allow the sub-interface to receive packets from VLAN 10, and
bind a VSI to the sub-interface.
[PE2] interface vlanif 40
[PE2-Vlanif40] l2 binding vsi bgp1
# Configure CE2.
<Quidway> sysname CE2
[CE2] interface vlanif 40
[CE2-Vlanif40] ip address 10.1.1.2 255.255.255.0
BGP RD : 168.1.1.1:1
SiteID/Range/Offset : 1/5/0
Import vpn target : 100:1,
Export vpn target : 100:1,
Remote Label Block : 25600/5/0,
Local Label Block : 25600/5/0,
**PW Information:
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
return
route-distinguisher 169.1.1.2:1
vpn-target 100:1 import-extcommunity
vpn-target 100:1 export-extcommunity
site 2 range 5 default-offset 0
#
mpls ldp
#
interface Vlanif30
ip address 169.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif40
l2 binding vsi bgp1
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 40
port hybrid tagged vlan 40
#
interface LoopBack1
ip address 3.3.3.9 255.255.255.255
#
bgp 100
peer 1.1.1.9 as-number 100
peer 1.1.1.9 connect-interface LoopBack1
#
vpls-family
policy vpn-target
peer 1.1.1.9 enable
#
ospf 1
area 0.0.0.0
network 3.3.3.9 0.0.0.0
network 169.1.1.0 0.0.0.255
#
return
Networking Requirements
As shown in Figure 5-228, Site 1, Site 2, and Site 3 belong to the same VPLS; CE1 and CE2
access the basic VPLS fully-connected network through UPEs and CE3 accesses the network
through a PE.
GE1/0/0
GE1/0/0 PE
GE2/0/0
Loopback1 SPE GE2/0/0
1.1.1.9/32
GE3/0/0
UPE
GE1/0/0
GE1/0/0 GE2/0/0
CE3
GE1/0/0
CE1 GE1/0/0 CE2 Site3
Site1 Site2
Loopback1 - 1.1.1.9/32
Loopback1 - 2.2.2.9/32
Loopback1 - 3.3.3.9/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Complete the task of Configuring Martini VPLS between SPEs and PEs.
2. Establish the MPLS LDP peer relationship between UPEs and SPEs.
3. Create a VSI on an SPE, and specify the UPE as its PE of the lower layer.
4. Create a VSI on a UPE, and specify the SPE as the peer of the VSI.
5. Configure CE1 and CE2 to access UPEs, and configure CE3 to access PEs.
Data Preparation
To complete the configuration, you need the following data:
l Names and IDs of VSIs
l MPLS LSR IDs (as IP addresses of peers) of UPEs, SPEs, and PEs
l Routing protocol
Procedure
Step 1 Configure the VLAN to which each interface belongs according to Figure 5-228.
The configuration details are not mentioned here.
NOTE
Do not add the AC-side port and PW-side port of a PE to the same VLAN; otherwise, a loop may occur.
# Configure CE2.
<Quidway> sysname CE2
[CE2] interface vlanif 20
[CE2-Vlanif40] ip address 10.1.1.2 255.255.255.0
# Configure CE3.
<Quidway> sysname CE3
[CE3] interface vlanif 50
[CE23-Vlanif50] ip address 10.1.1.3 255.255.255.0
VSI ID : 123
*Peer Router ID : 3.3.3.9
VC Label : 23552
Peer Type : dynamic
Session : up
Tunnel ID : 0x20022,
*Peer Router ID : 1.1.1.9
VC Label : 23553
Peer Type : dynamic
Session : up
Tunnel ID : 0x20010,
**PW Information:
CE1, CE2, and CE3 can ping each other successfully. After you run the shutdown command
on GE 2/0/0.1 (to which the VSI is bound) of the UPE or PE, CE2 and CE3 cannot ping each
other successfully. This indicates that user data is transmitted through the PW of this VSI.
----End
Configuration Files
l Configuration file of the UPE
#
sysname UPE
#
vlan batch 10 20 30
#
mpls lsr-id 1.1.1.9
mpls
#
mpls l2vpn
#
vsi v123 static
pwsignal ldp
vsi-id 123
peer 2.2.2.9
#
mpls ldp
#
interface Vlanif10
l2 binding vsi v123
#
interface Vlanif20
l2 binding vsi v123
#
interface Vlanif30
ip address 100.1.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 10
port hybrid tagged vlan 10
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 20
port hybrid tagged vlan 20
#
interface GigabitEthernet3/0/0
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#
interface LoopBack1
ip address 1.1.1.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 1.1.1.9 0.0.0.0
network 100.1.1.0 0.0.0.255
#
return
l Configuration file of the SPE
#
sysname SPE
#
vlan batch 30 40
#
mpls lsr-id 2.2.2.9
mpls
#
mpls l2vpn
#
vsi v123 static
pwsignal ldp
vsi-id 123
peer 3.3.3.9
peer 1.1.1.9 upe
#
mpls ldp
#
interface Vlanif 30
ip address 100.1.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif40
ip address 100.2.1.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 30
port hybrid tagged vlan 30
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 40
port hybrid tagged vlan 40
#
interface LoopBack1
ip address 2.2.2.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 2.2.2.9 0.0.0.0
network 100.2.1.0 0.0.0.255
network 100.1.1.0 0.0.0.255
#
return
l Configuration file of the PE
#
sysname PE
#
vlan batch 40 50
#
mpls lsr-id 3.3.3.9
mpls
#
mpls l2vpn
#
vsi v123 static
pwsignal ldp
vsi-id 123
peer 2.2.2.9
#
mpls ldp
#
interface Vlanif40
ip address 100.2.1.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif50
l2 binding vsi v123
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 40
port hybrid tagged vlan 40
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 50
port hybrid tagged vlan 50
#
interface LoopBack1
ip address 3.3.3.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 100.2.1.0 0.0.0.255
network 3.3.3.9 0.0.0.0
#
return
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
return
l Configuration file of CE2
#
sysname CE2
#
vlan batch 20
#
interface Vlanif20
ip address 10.1.1.2 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 20
#
return
l Configuration file of CE3
#
sysname CE3
#
vlan batch 50
#
interface Vlanif50
ip address 10.1.1.3 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 50
#
return
Networking Requirements
As shown in Figure 5-229, UPEs do not support dynamic VLLs, and access SPEs through static
VLLs; VLLs are set up between UPEs and SPEs in SVC mode; CE1 and CE2 access the VPLS
fully-connected VPLS network through UPEs.
Figure 5-229 Networking diagram for configuring static VLLs to access a VPLS network
Loopback1 Loopback1 Loopback1
1.1.1.9/32 2.2.2.9/32 3.3.3.9/32
GE1/0/0 GE1/0/0
SPE1 SPE2
GE1/0/0 GE2/0/0
GE2/0/0 P GE2/0/0
Loopback1 Loopback1
4.4.4.9/32 5.5.5.9/32
GE1/0/0 GE1/0/0
UPE1 UPE2
GE2/0/0 GE2/0/0
GE1/0/0 GE1/0/0
CE1 CE2
Loopback1 - 4.4.4.9/32
Loopback1 - 1.1.1.9/32
Loopback1 - 2.2.2.9/32
Loopback1 - 3.3.3.9/32
Loopback1 - 5.5.5.9/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Complete the task of Configuring Martini VPLS between SPEs.
2. Configure basic MPLS L2VPN functions on UPEs and SPEs.
3. Configure static VLLs and VSIs on SPEs and enable MAC-withdraw function on the VSIs.
4. Configure UPEs to access SPEs through static VLLs.
Data Preparation
To complete the configuration, you need the following data:
l Names and IDs of VSIs
l MPLS LSR IDs of UPEs and SPEs, which are used as peer IP addresses
l Routing protocol
l Received and sent labels on static LSPs between UPEs and SPEs
Procedure
1. Configure IP addresses for interfaces.
As shown in Figure 5-229, configure the VLAN to which each interface belongs, and
configure the IP addresses and masks for loopback interfaces and VLANIF interfaces.
NOTE
Do not add the AC-side port and PW-side port of a PE to the same VLAN; otherwise, a loop may
occur.
2. Configure an IGP.
Configure OSPF on SPEs and the P device to advertise the network segment and LSR IDs.
# Configure SPE1.
<SPE1> system-view
[SPE1] ospf
[SPE1-ospf-1] area 0
[SPE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0
[SPE1-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255
# Configure P.
<P> system-view
[P] ospf
[P-ospf-1] area 0
[P-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0
[P-ospf-1-area-0.0.0.0] network 100.1.1.0 0.0.0.255
[P-ospf-1-area-0.0.0.0] network 100.1.2.0 0.0.0.255
[P-ospf-1-area-0.0.0.0] quit
[P-ospf-1] quit
# Configure SPE2.
<SPE2> system-view
[SPE2] ospf
[SPE2-ospf-1] area 0
[SPE2-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0
[SPE2-ospf-1-area-0.0.0.0] network 100.1.2.0 0.0.0.255
[SPE2-ospf-1-area-0.0.0.0] network 100.1.4.0 0.0.0.255
[SPE2-ospf-1-area-0.0.0.0] quit
[SPE2-ospf-1] quit
# Configure UPE1.
<UPE1> system-view
[UPE1] ospf
[UPE1-ospf-1] area 0
[UPE1-ospf-1-area-0.0.0.0] network 4.4.4.9 0.0.0.0
[UPE1-ospf-1-area-0.0.0.0] network 100.1.3.0 0.0.0.255
[UPE1-ospf-1-area-0.0.0.0] quit
[UPE1-ospf-1] quit
# Configure UPE2.
<UPE2> system-view
[UPE2] ospf
[UPE2-ospf-1] area 0
[UPE2-ospf-1-area-0.0.0.0] network 5.5.5.9 0.0.0.0
[UPE2-ospf-1-area-0.0.0.0] network 100.1.4.0 0.0.0.255
[UPE2-ospf-1-area-0.0.0.0] quit
[UPE2-ospf-1] quit
# Configure P.
[P] mpls lsr-id 2.2.2.9
[P] mpls
[P-mpls] quit
[P] quit
[P] mpls ldp
[P-mpls-ldp] quit
[P] interface vlanif 30
[P-Vlanif30] mpls
[P-Vlanif30] mpls ldp
[P-Vlanif30] quit
[P] interface vlanif 40
[P-Vlanif40] mpls
[P-Vlanif40] mpls ldp
[P-Vlanif40] quit
# Configure SPE2.
[SPE2] mpls lsr-id 3.3.3.9
[SPE2] mpls
[SPE2-mpls] quit
[SPE2] quit
[SPE2] mpls ldp
[SPE2-mpls-ldp] quit
[SPE2] interface vlanif 40
[SPE2-Vlanif40] mpls
[SPE2-Vlanif40] mpls ldp
[SPE2-Vlanif40] quit
[SPE2] interface vlanif 50
[SPE2-Vlanif50] mpls
[SPE2-Vlanif50] quit
After the configuration, run the display mpls ldp session command on SPE1, P, and SPE2.
You can find that the Status of the peer relationship between SPE1 and P or between SPE2
and P is Operational, which indicates that the peer relationship is established. Run the
display mpls lsp command, and you can view the setup of the LSP.
Take the display on SPE1 as an example.
<SPE1> display mpls ldp session
------------------------------------------------------------------------------
Peer-ID Status LAM SsnRole SsnAge KA-Sent/Rcv
------------------------------------------------------------------------------
2.2.2.9:0 Operational DU Passive 000:00:01 7/7
------------------------------------------------------------------------------
TOTAL: 1 session(s) Found.
LAM : Label Advertisement Mode SsnAge Unit : DDD:HH:MM
# Configure SPE2.
[SPE2] mpls ldp remote-peer 1.1.1.9
[SPE2-mpls-ldp-remote-1.1.1.9] remote-ip 1.1.1.9
[SPE2-mpls-ldp-remote-1.1.1.9] quit
After the configuration, run the display mpls ldp session command on SPE1 and SPE2.
You can find that the status of the peer relationship between SPE1 and SPE2 is
Operational. That is, the peer relationship is established.
Take the display on SPE1 as an example.
<SPE1> display mpls ldp session
------------------------------------------------------------------------------
Peer-ID Status LAM SsnRole SsnAge KA-Sent/Rcv
------------------------------------------------------------------------------
2.2.2.9:0 Operational DU Passive 000:00:05 24/24
3.3.3.9:0 Operational DU Passive 000:00:01 5/5
------------------------------------------------------------------------------
TOTAL: 2 session(s) Found.
LAM : Label Advertisement Mode SsnAge Unit : DDD:HH:MM
# Configure UPE2.
[UPE2] mpls lsr-id 5.5.5.9
[UPE2] mpls
[UPE2-mpls] quit
[UPE2] interface vlanif 50
[UPE2-Vlanif50] mpls
[UPE2-Vlanif50] quit
[UPE2] static-lsp ingress UPE2toSPE2 destination 3.3.3.9 32 nexthop 100.1.4.1
out-label 40
[UPE2] static-lsp egress SPE2toUPE2 incoming-interface vlanif 50 in-label 50
# Configure SPE1.
[SPE1] static-lsp ingress SPE1toUPE1 destination 4.4.4.9 32 nexthop 100.1.3.2
out-label 30
[SPE1] static-lsp egress UPE1toSPE1 incoming-interface vlanif 20 in-label 20
# Configure SPE2.
[SPE2] static-lsp ingress SPE2toUPE2 destination 5.5.5.9 32 nexthop 100.1.4.2
out-label 50
[SPE2] static-lsp egress UPE2toSPE2 incoming-interface vlanif 50 in-label 40
6. Enable MPLS L2VPN on UPEs and configure the UPEs to access SPEs through static
VLLs.
# Configure UPE1.
<UPE1> system-view
[UPE1] mpls l2vpn
[UPE1-l2vpn] quit
[UPE1] interface vlanif 10
[UPE1-Vlanif10] mpls static-l2vc destination 1.1.1.9 transmit-vpn-label 100
receive-vpn-label 100
[UPE1-Vlanif10] quit
# Configure UPE2.
<UPE2> system-view
[UPE2] mpls l2vpn
[UPE2-l2vpn] quit
[UPE2] interface vlanif 60
[UPE2-Vlanif60] mpls static-l2vc destination 3.3.3.9 transmit-vpn-label 100
receive-vpn-label 100
[UPE2-Vlanif60] quit
# Configure SPE1.
<SPE1> system-view
[SPE1] mpls l2vpn
[SPE1] vsi V100 static
[SPE1-vsi-v100] pwsignal ldp
[SPE1-vsi-v100-ldp] vsi-id 100
[SPE1-vsi-v100-ldp] mac-withdraw enable
[SPE1-vsi-v100-ldp] peer 3.3.3.9
[SPE1-vsi-v100-ldp] peer 4.4.4.9 static-upe trans 100 recv 100
[SPE1-vsi-v100-ldp] quit
# Configure SPE2.
<SPE2> system-view
[SPE2] mpls l2vpn
[SPE2] vsi V100 static
[SPE2-vsi-v100] pwsignal ldp
[SPE2-vsi-v100-ldp] vsi-id 100
[SPE2-vsi-v100-ldp] mac-withdraw enable
[SPE2-vsi-v100-ldp] peer 1.1.1.9
[SPE2-vsi-v100-ldp] peer 5.5.5.9 static-upe trans 100 recv 100
[SPE2-vsi-v100-ldp] quit
Run the display vsi name v100 command on SPEs, and you can find that the VSI named
v100 is Up and the corresponding PW is also Up. Take the display on SPE1 as an example.
<SPE1> display vsi name v100 verbose
VSI ID : 100
**PW Information:
CE1 and CE2, which reside in the same network segment, can ping each other successfully.
After you run the shutdown command on VLANIF 10 (to which the VSI is bound) of
UPE1, CE1 and CE2 cannot ping each other successfully. This indicates that user data is
transmitted through the PW of this VSI.
Before VLANIF 20 of SPE1 is shut down, check the MAC addresses learnt by the VSI on
SPE2.
<SPE2> display mac-address dynamic
MAC Address VLAN/VSI Port Type Lsp
----------------------------------------------------------------------------
0000-c101-0102 v100 Vlanif20 dynamic 3/3366
After VLANIF 20 of SPE1 is shut down, the VSI bound to the static VLL becomes Down.
Check MAC addresses learnt by the VSI on SPE2, and you can find that one MAC address
learned from VLANIF 20 is deleted.
<SPE2> display mac-address dynamic
MAC Address VLAN/VSI Port Type
Lsp
----------------------------------------------------------------------------
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
return
#
ospf 1
area 0.0.0.0
network 2.2.2.9 0.0.0.0
network 100.1.1.0 0.0.0.255
network 100.1.2.0 0.0.0.255
#
return
l Configuration file of SPE2
#
sysname SPE2
#
vlan batch 40 50
#
mpls lsr-id 3.3.3.9
mpls
#
mpls l2vpn
#
vsi v100 static
pwsignal ldp
vsi-id 100
peer 1.1.1.9
peer 5.5.5.9 static-upe tran 100 recv 100
#
mpls ldp
#
mpls ldp remote-peer 1.1.1.9
remote-ip 1.1.1.9
#
interface Vlanif40
ip address 100.1.2.2 255.255.255.0
mpls
mpls ldp
#
interface Vlanif50
ip address 100.1.4.1 255.255.255.0
mpls
#
interface GigabitEthernet1/0/0
port hybrid pvid vlan 40
port hybrid tagged vlan 40
#
interface GigabitEthernet2/0/0
port hybrid pvid vlan 50
port hybrid tagged vlan 50
#
interface LoopBack1
ip address 3.3.3.9 255.255.255.255
#
ospf 1
area 0.0.0.0
network 3.3.3.9 0.0.0.0
network 100.1.2.0 0.0.0.255
network 100.1.4.0 0.0.0.255
#
static-lsp ingress SPE2toUPE2 destination 5.5.5.9 32 nexthop 100.1.4.2 out-
labe
l 50
static-lsp egress UPE2toSPE2 incoming-interface Vlanif 50 in-label 40
#
return
l Configuration file of UPE2
#
sysname UPE2
#
vlan batch 50 60
#
Networking Requirements
As shown in Figure 5-230, the Option A scheme is adopted to establish the inter-AS Martini
VPLS.
Figure 5-230 Networking diagram for configuring inter-AS Martini VPLS Option A
GE1/0/0 GE1/0/0
PE1 ASBR-PE1 ASBR-PE2 PE2
GE1/0/0 GE2/0/0
GE1/0/0 GE1/0/0
CE1 CE2
Loopback1 - 1.1.1.1/32
Loopback1 - 2.2.2.2/32
Loopback1 - 3.3.3.3/32
Loopback1 - 4.4.4.4/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Run an IGP on the MPLS backbone network so that devices in the same AS can interwork.
2. Configure basic MPLS functions on devices in the backbone network and establish dynamic
LSPs between PEs and ASBR-PEs in the same AS. Establish remote LDP sessions if PEs
and ASBR-PEs are indirectly connected.
3. Establish VPLS connections between PEs and ASBR-PEs in the same AS.
Data Preparation
To complete the configuration, you need the following data:
l IS-IS data
l IP addresses of remote peers
l MPLS LSR IDs on PEs and ASBR-PEs
l VSI IDs
Procedure
Step 1 Configure the VLAN to which each interface belongs according to Figure 5-230.
The configuration details are not mentioned here.
NOTE
Do not add the AC-side port and PW-side port of a PE to the same VLAN; otherwise, a loop may occur.
ASBR-PEs and PEs in the same AS can ping each other successfully.
Take the display on PE1 as an example.
<PE1> ping 2.2.2.2
PING 2.2.2.2: 56 data bytes, press CTRL_C to break
Reply from 2.2.2.2: bytes=56 Sequence=1 ttl=255 time=180 ms
Reply from 2.2.2.2: bytes=56 Sequence=2 ttl=255 time=90 ms
Reply from 2.2.2.2: bytes=56 Sequence=3 ttl=255 time=60 ms
Reply from 2.2.2.2: bytes=56 Sequence=4 ttl=255 time=60 ms
Reply from 2.2.2.2: bytes=56 Sequence=5 ttl=255 time=100 ms
# Configure PE2.
[PE2] mpls l2vpn
# Configure ASBR-PE1.
[ASBR-PE1] mpls l2vpn
# Configure ASBR-PE2.
[ASBR-PE2] mpls l2vpn
# Configure ASBR-PE1.
[ASBR-PE1] vsi a1 static
[ASBR-PE1-vsi-a1] pwsignal ldp
[ASBR-PE1-vsi-a1-ldp] vsi-id 2
[ASBR-PE1-vsi-a1-ldp] peer 1.1.1.1
[ASBR-PE1-vsi-a1-ldp] quit
[ASBR-PE1-vsi-a1] quit
[ASBR-PE1] interface vlanif 30
[ASBR-PE1-Vlanif30] l2 binding vsi a1
[ASBR-PE1-Vlanif30] quit
# Configure ASBR-PE2.
[ASBR-PE2] vsi a1 static
[ASBR-PE2-vsi-a1] pwsignal ldp
[ASBR-PE2-vsi-a1-ldp] vsi-id 3
[ASBR-PE2-vsi-a1-ldp] peer 4.4.4.4
[ASBR-PE2-vsi-a1-ldp] quit
[ASBR-PE2-vsi-a1] quit
[ASBR-PE2] interface vlanif 30
[ASBR-PE2-Vlanif30] l2 binding vsi a1
[ASBR-PE2-Vlanif30] quit
# Configure PE2.
[PE2] vsi a1 static
[PE2-vsi-a1] pwsignal ldp
[PE2-vsi-a1-ldp] vsi-id 3
[PE2-vsi-a1-ldp] peer 3.3.3.3
[PE2-vsi-a1-ldp] quit
[PE2-vsi-a1] quit
[PE2] interface vlanif 50
[PE2-Vlanif50] l2 binding vsi a1
[PE2-Vlanif50] quit
# Configure CE2.
[CE2] interface vlanif 50
[CE2-Vlanif50] ip address 10.1.1.2 24
[CE2-Vlanif50] quit
***VSI Name : a1
Administrator VSI : no
Isolate Spoken : disable
VSI Index : 0
PW Signaling : ldp
Member Discovery Style : static
PW MAC Learn Style : unqualify
Encapsulation Type : vlan
MTU : 1500
Mode : uniform
Service Class : --
Color : --
DomainId : 0
Domain Name :
VSI State : up
VSI ID : 2
*Peer Router ID : 2.2.2.2
VC Label : 23552
Peer Type : dynamic
Session : up
Tunnel ID : 0x20020,
**PW Information:
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10
#
interface Vlanif10
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
return
#
interface Vlanif20
ip address 100.1.1.1 255.255.255.0
isis enable 1
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 20
#
interface LoopBack1
ip address 1.1.1.1 255.255.255.255
isis enable 1
#
return
l Configuration file of ASBR-PE1
#
sysname ASBR-PE1
#
vlan batch 20 30
#
mpls lsr-id 2.2.2.2
mpls
#
mpls l2vpn
#
vsi a1 static
pwsignal ldp
vsi-id 2
peer 1.1.1.1
#
mpls ldp
#
isis 1
network-entity 10.0000.0000.0002.00
#
interface Vlanif20
ip address 100.1.1.2 255.255.255.0
isis enable 1
mpls
mpls ldp
#
interface Vlanif30
l2 binding vsi a1
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 20
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 30
#
interface LoopBack1
ip address 2.2.2.2 255.255.255.255
isis enable 1
#
return
l Configuration file of ASBR-PE2
#
sysname ASBR-PE2
#
vlan batch 30 40
#
mpls lsr-id 3.3.3.3
mpls
#
mpls l2vpn
#
vsi a1 static
pwsignal ldp
vsi-id 3
peer 4.4.4.4
#
mpls ldp
#
isis 1
network-entity 10.0000.0000.0003.00
#
interface Vlanif30
l2 binding vsi a1
#
interface Vlanif40
ip address 200.1.1.1 255.255.255.0
isis enable 1
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 30
#
interface GigabitEthernet2/0/0
port link-type trunk
port trunk allow-pass vlan 40
#
interface LoopBack1
ip address 3.3.3.3 255.255.255.255
isis enable 1
#
return
l Configuration file of PE2
#
sysname PE2
#
vlan batch 40 50
#
mpls lsr-id 4.4.4.4
mpls
#
mpls l2vpn
#
vsi a1 static
pwsignal ldp
vsi-id 3
peer 3.3.3.3
#
mpls ldp
#
isis 1
network-entity 10.0000.0000.0004.00
#
interface Vlanif40
ip address 200.1.1.2 255.255.255.0
isis enable 1
mpls
mpls ldp
#
interface Vlanif50
l2 binding vsi a1
#
interface GigabitEthernet1/0/0
Networking Requirements
As shown in Figure 5-231, CE1 and CE2 belong to the same VPLS, and access the backbone
network through PE1 in AS 100 and PE2 in AS 200 respectively.
It is required to adopt Option A to implement inter-AS Kompella VPLS. The interfaces that
connect ASBR-PEs serve as AC interfaces to which VSIs are bound, that is, the interfaces are
exclusively used by the VPLS.
Figure 5-231 Networking diagram for configuring inter-AS Kompella VPLS Option A
GE1/0/0 GE1/0/0
CE1 CE2
Loopback1 - 1.1.1.1/32
Loopback1 - 2.2.2.2/32
Loopback1 - 3.3.3.3/32
Loopback1 - 4.4.4.4/32
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure an IGP on the backbone network to implement the connectivity between ASBR-
PEs and PEs and set up tunnels between PEs.
2. Establish MP IBGP peer relationships between PEs and ASBR-PEs in the same AS.
3. Configure VSIs on PE1, ASBR-PE1, ASBR-PE2, and PE2 and bind the VSIs to related
AC interfaces.
Data Preparation
To complete the configuration, you need the following data:
l IS-IS data
l MPLS LSR IDs of PEs and ASBR-PEs (IP addresses of the loopback interfaces on peers)
l CE IDs and CE ranges
l IP addresses of interfaces connecting CEs to PEs (No IP address is required for interfaces
connecting PEs to CEs.)
Procedure
Step 1 Configure the VLAN to which each interface belongs according to Figure 5-231.
The configuration details are not mentioned here.
NOTE
Do not add the AC-side port and PW-side port of a PE to the same VLAN; otherwise, a loop may occur.
ASBR-PEs and PEs in the same AS can ping Loopback1 of each other successfully. Take ASBR-
PE1 as an example.
# Configure ASBR-PE1.
<ASBR-PE1> system-view
[ASBR-PE1] bgp 100
[ASBR-PE1-bgp] peer 1.1.1.1 as-number 100
[ASBR-PE1-bgp] peer 1.1.1.1 connect-interface loopback 1
[ASBR-PE1-bgp] vpls-family
[ASBR-PE1-bgp-af-vpls] peer 1.1.1.1 enable
The configurations of AS 200 are similar to those of AS 100, and thus are not mentioned here.
After this step, run the display bgp vpls peer command on PEs or ASBR-PEs, and you can find
that MP-IBGP peer connections are in the Established state.
Take the display on PE1 as an example.
<PE1> display bgp vpls peer
# Configure ASBR-PE1.
[ASBR-PE1] mpls l2vpn
# Configure ASBR-PE2.
[ASBR-PE2] mpls l2vpn
# Configure PE2.
[PE2] mpls l2vpn
Step 6 Configure VSIs on PEs and ASBR-PEs and bind the VSIs to related AC interfaces.
# Configure PE1.
[PE1] vsi v1 auto
[PE1-vsi-v1] pwsignal bgp
[PE1-vsi-v1-bgp] route-distinguisher 100:1
[PE1-vsi-v1-bgp] vpn-target 1:1 import-extcommunity
[PE1-vsi-v1-bgp] vpn-target 1:1 export-extcommunity
[PE1-vsi-v1-bgp] site 1 range 5 default-offset 0
[PE1-vsi-v1-bgp] quit
[PE1-vsi-v1] quit
[PE1] interface vlanif 10
[PE1-Vlanif10] l2 binding vsi v1
[PE1-Vlanif10] quit
# Configure ASBR-PE1.
[ASBR-PE1] vsi v1 auto
[ASBR-PE1-vsi-v1] pwsignal bgp
[ASBR-PE1-vsi-v1-bgp] route-distinguisher 100:2
[ASBR-PE1-vsi-v1-bgp] vpn-target 1:1 import-extcommunity
[ASBR-PE1-vsi-v1-bgp] vpn-target 1:1 export-extcommunity
[ASBR-PE1-vsi-v1-bgp] site 2 range 5 default-offset 0
[ASBR-PE1-vsi-v1-bgp] quit
[ASBR-PE1-vsi-v1] quit
[ASBR-PE1] interface vlanif 30
[ASBR-PE1-Vlanif30] l2 binding vsi v1
[ASBR-PE1-Vlanif30] quit
# Configure ASBR-PE2.
[ASBR-PE2] vsi v1 auto
[ASBR-PE2-vsi-v1] pwsignal bgp
[ASBR-PE2-vsi-v1-bgp] route-distinguisher 200:1
[ASBR-PE2-vsi-v1-bgp] vpn-target 1:1 import-extcommunity
[ASBR-PE2-vsi-v1-bgp] vpn-target 1:1 export-extcommunity
[ASBR-PE2-vsi-v1-bgp] site 1 range 5 default-offset 0
[ASBR-PE2-vsi-v1-bgp] quit
[ASBR-PE2-vsi-v1] quit
[ASBR-PE2] interface vlanif 30
[ASBR-PE2-Vlanif30] l2 binding vsi v1
[ASBR-PE2-Vlanif30] quit
# Configure PE2.
[PE2] vsi v1 auto
[PE2-vsi-v1] pwsignal bgp
# Configure CE2.
[CE2] interface vlanif 50
[CE2-Vlanif50] ip address 10.1.1.2 24
[CE2-Vlanif50] quit
Run the display bgp vpls all command on a PE or an ASBR-PE, and you can view information
about the VPLS label block of BGP.
Take ASBR-PE1 as an example.
<ASBR-PE1> display bgp vpls all
BGP Local Router ID : 2.2.2.2, Local AS Number : 100
--------------------------------------------------------------------------------
Route Distinguisher: 100:1
SiteID Offset NextHop Range LabBase TunnelID FromPeer MHPref
--------------------------------------------------------------------------------
*> 1 0 1.1.1.1 5 25600 0x0 1.1.1.1 0
--------------------------------------------------------------------------------
Route Distinguisher: 100:2
SiteID Offset NextHop Range LabBase TunnelID FromPeer MHPref
--------------------------------------------------------------------------------
> 2 0 0.0.0.0 5 25600 0x0 0.0.0.0 0
----End
Configuration Files
l Configuration file of CE1
#
sysname CE1
#
vlan batch 10
#
interface GigabitEthernet1/0/0
ip address 10.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
port link-type trunk
port trunk allow-pass vlan 10
#
return
A Appendix
This appendix describes the maintenance operations that are usually performed during
commissioning.
A.1 Testing the Optical Power of the Interfaces on the S9300
This section describes how to commission the optical power of the interfaces of the S9300.
A.2 License Description
This section describes the items controlled by the license of the S9300.
Context
The S9300 provides FE, GE, and 10GE optical interfaces. If the power of the SFP optical module
is insufficient, packet loss or communication interruption may occur on the network layer.
Therefore, it is recommended that you measure the power of optical interfaces before using the
S9300.
When measuring the optical power, pay attention to the following points:
l Clean the fiber splice and the optical connector on the panel of the LPU and connect them
properly.
l Do not look strictly into the laser transmitter on the LPU or the fiber splice.
l Measure the attenuation of the fiber jumper in advance to ensure accurate location of the
faulty point.
l Use different fiber jumpers for single mode and multimode optical modules.
l Use a calibrated tester (optical power meter).
You can run the display transceiver command to view the general information, production
information, and alarms about the optical module of the S9300. If you specify the verbose
parameter, the diagnosis information is also displayed.
<Quidway>display transceiver interface GigabitEthernet10/0/0
Procedure
Step 1 Set the working wavelength of the optical power meter to the wavelength of the tested fiber.
Step 2 Pull out the fiber jumper from the sending interface on the S9300.
Step 3 Connect one end of the fiber jumper to the sending interface on the S9300 and the other end to
the optical power meter.
Step 4 When the optical power becomes stable, record the optical power.
Step 5 Look up the List of Interface Attributes to check whether the optical power of the interface is in
the normal range.
NOTE
The List of Interface Attributes is in the Quidway S9300 Terabit Routing Switch Hardware Description.
----End
LLE0IPV601 IPV6
LLE0MPLS01 MPLS
LLE0NQAF01 NQA
NOTE
After the S9300V100R001 is upgraded to the S9300V100R002, the previously purchased license files can
still be used.
MPLS is introduced to solve network problems including the network speed, scalability,
QoS management, and traffic engineering, and bandwidth management and service request
problems on the next generation IP backbone network.
MPLS functions of the S9300 are controlled by the license. By default, MPLS functions
are disabled on a newly purchased device. To implement MPLS functions of the S9300,
apply for and purchase the license from Huawei local office.
NOTE
G24SA, G24CA, and X12SA boards do not support MPLS functions.
l NQA License
As the development of value-added services, users and carriers demand higher Quality of
Service (QoS). After voice over IP and video over IP services are performed, carriers and
users all tend to sign Service Level Agreements (SLAs) to implement QoS guaranteed
services.
To help users know the performance of the network in time, carriers need to collect the
statistics on the delay, jitter, and packet loss ratio of the device. In this case, users can check
whether the committed bandwidth is ensured.
The S9300 provides NQA that can help operators collect these statistics. NQA measures
the performance of different protocols running on the network. In this case, carriers can
collect network indexes in real time, including:
– Total delay of the HTTP
– Delay in a TCP connection
– Delay in DNS resolution
– File transmission speed
– Delay in an FTP connection
– DNS resolution error ratio
By controlling these indexes, carriers can provide network services of different levels and
charge differently. NQA is also an effective tool for diagnosing and locating network faults.
Generally, the commands related to NQA functions can be used on a newly purchased
device, but the NQA functions are not implemented. To implement NQA functions of the
S9300, apply for and purchase the license from Huawei local office.