08 MPLS Operation
08 MPLS Operation
Table of Contents
i
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Table of Contents
ii
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Table of Contents
iii
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 1 MPLS Architecture
Note:
The Quidway S8500 Series Routing Switches (hereinafter referred to as S8500 series)
running MPLS can serve as routers. Routers mentioned in this manual can be either a
router in common sense, or a layer 3 Ethernet switch running MPLS.
For S8500 switches, only the interface boards with the suffixes C, CA and CB and
VPLS service processor cards support the MPLS function. To enable MPLS function on
the S8500 switches, you must select the interface cards that support MPLS or VPLS
service processor cards. The suffix of a board can be identified through the silkscreen
on the upper right corner of the front panel of the card. For example, the silkscreen on
LSB1GP12B0 card is GP12B, so the suffix of the card is B.
1-1
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 1 MPLS Architecture
based on network layer address. Packets of the same FEC are processed in the same
way in MPLS network.
1.2.2 Label
I. Label definition
A label is a locally significant short identifier with fixed length, which is used to identify a
FEC. When reaching at MPLS network ingress, packets are divided into different FECs,
based on their FECs, different labels are encapsulated into the packets. Later
forwarding is based on these labels.
Label is located between the link layer header and the network layer packet, with the
length of four bytes. A label contains four fields:
Label: label value, 20 bits.
Exp: three bits, reserved, used for COS.
S: one bit, MPLS supports hierarchical label structure, namely multi-layer label. Value 1
refers to the label of bottom layer.
TTL: eight bits, with the same meaning as TTL in IP packet.
1) Label mapping
There are two types of label mapping: label mapping at ingress routers, and label
mapping in MPLS domain.
The first type of mapping is implemented at Ingress label switching routers (LSR). The
Ingress LSRs group the incoming packets into multiple FECs based on certain
principles, and then map corresponding labels to these FECs and record the mapping
results into the label information base (LIB). In simple words, label mapping is to assign
a label to a FEC.
The second type is also called incoming label mapping (ILM), that is, to map each input
label to a series of next hop label forwarding entries (NHLFE). The packets are
forwarded along the paths based on the mapping results.
2) Label encapsulation
Figure 1-2 illustrates label encapsulation in different media:
1-2
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 1 MPLS Architecture
Ethernet
/SONET
以太网报头/
packet
Ethernet /PPP
PPP
header/ 报头
PPP header flag Layer 3 data
/ SDH 以太网报头 报头 标签 三层数据
Frame mode
ATM packet ATM报头
ATM header
报头 标签
flag 三层数据
Layer 3 data
Cell mode
ATM packet VPE/VCI
VPI/VCI
标签
flag 三层数据
Layer 3 data
In Ethernet packets and PPP packets, label stack lies between layer 2 header and layer
3 data, acting like a shim. In ATM cell mode packets, VPI/VCI is used as the label.
3) Label assignment and distribution
Label distribution refers to the process of creating a corresponding label switching path
(LSP) for a FEC.
In the MPLS architecture, the decision to bind a particular label to a particular FEC is
made by downstream LSR; after making the decision, the downstream LSR notifies the
upstream LSR. That is to say, the label is assigned by the downstream LSR, and the
assigned label is distributed from downstream to upstream.
Two label distribution modes are available in MPLS: downstream unsolicited (DU)
mode and downstream on demand (DoD) mode.
z For a specific FEC, if LSR originates label assignment and distribution even
without receiving label request message from upstream, it is in DU mode.
z For a specific FEC, if LSR begins label assignment and distribution only after
receiving label request message from upstream, it is in DoD mode.
The upstream and downstream which have adjacency relation in-label distribution
should reach agreement on label distribution mode.
To distribute labels to its peer, the LSR can use Label Distribution Protocol (LDP)
messages or make the labels carried on other routing protocol messages.
Note:
Upstream and downstream are just on a relative basis: For a packet forwarding process,
the transmit router serves as upstream LSR and receive router serves as downstream
LSR. Currently, the S8500 series adopt the DU label distribution mode.
1-3
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 1 MPLS Architecture
In independent control mode, each LSR can send label mapping messages to the
LSRs it connects to at anytime.
In ordered control mode, a LSR can send label mapping messages to upstream only
when it receives a specific label mapping messages of the next hop of a FEC or the
LSR serves as LSP (Label Switching Path) egress node.
Note:
Currently, the S8500 series adopt the ordered label control mode.
Note:
Currently, the S8500 series adopt the liberal label retention mode.
1.2.3 LDP
Label distribution protocol (LDP) is the signaling control protocol in MPLS, which
controls binding labels and FECs between LSRs and coordinates a series of
procedures between LSRs.
The basic composing unit of MPLS network is LSR (Label Switching Router). It runs
MPLS control protocol and L3 routing protocol, exchanges routing messages with other
LSRs and create the routing table, maps FECs with IP packet headers, binds FECs
1-4
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 1 MPLS Architecture
with labels, distributes label binding messages, establishes and maintains label
forwarding table.
The network consisting of LSRs is called MPLS domain. The LSR that is located at the
edge of the domain is called edge LSR (LER, Labeled Edge Router). It connects an
MPLS domain with a non-MPLS domain or with another MPLS domain, classifies
packets, distributes labels (as ingress LER) and distracts labels (as egress LER). The
ingress LER is termed as ingress and egress LER as egress.
The LSR that is located inside the domain is called core LSR, which provides functions
such as label swapping and label distribution. The labeled packets are transmitted
along the LSP (Label Switched Path) composed of a series of LSRs.
LSP
Ingress
Egress
At the ingress, the packets entering the network are classified into FECs according to
their characteristics. Usually, packets are classified into FECs according to the IP
address prefix or host address. Packets in the same FEC pass through the same path
(that is, LSP) in MPLS area. LSR assigns a short label of fixed length for the incoming
FEC packet, and then forwards it through the corresponding interface.
On the LSR along the LSP, the mapping table of the import/export labels has been
established (the element of this table is referred to as Next Hop Label Forwarding Entry
(NHLFE)). When the labeled packet arrives, LSR only needs to find the corresponding
NHLFE from the table according to the label and replace the original label with a new
one, and then forwards the labeled packet. This process is called Incoming Label Map
(ILM).
At the ingress, MPLS specifies a FEC for a specific packet, and the following routers
only need to forward the packet by label switching, therefore this method is much
simpler than general network layer forwarding and increases the forwarding speed.
1-5
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 1 MPLS Architecture
Actually, the establishment of LSP refers to the process of binding FEC with the label,
and then advertising this binding to the adjacent LSR on LSP. This process is
implemented through LDP, which regulates the message in interactive processing and
message structure between LSRs as well as routing mode.
Through sending Hello message periodically, an LSR finds its neighbor and then
establish LDP session with the newly discovered adjacent LSR. By LDP session, the
adjacent LSRs advertise such information as label switching mode, label space,
session Keepalive timer value to each other. LDP session is a TCP connection, which
needs to be maintained through LDP message. In case there is not any other LDP
message during the time period specified by the session Keepalive timer value, and
then it is necessary to send session Keepalive message to maintain the existence of
LDP session. Figure 1-4 illustrates the diagram of LDP label distribution.
LSP1
Ingress
A B
C
LSP2
Egress
Label request message D
E
For the label distribution mentioned previously, there are two modes: DoD and DU. The
main difference between these two modes is that the label mapping messages are
distributed actively or passively.
In DoD mode, the label is distributed in this way: the upstream LSR sends label request
message (containing FEC descriptive information) to the downstream LSR, and the
downstream LSR distributes label for this FEC, and then it sends the bound label back
to the upstream LSR through label map message. The time when the downstream LSR
feeds back the label map message depends on whether this LSR uses independent
label control mode or sequential label control mode. When the sequential label control
mode is used by the downstream LSR, the label map message is sent back to its
upstream LSR if only it has received the label map message from its downstream LSR.
And when the independent label control mode is used by the downstream LSR, then it
will send label map message to its upstream LSR immediately, no matter whether it has
1-6
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 1 MPLS Architecture
received the returned label map message from its downstream LSR. Usually, the
upstream LSR selects the downstream LSR according to the information in its routing
table. In Figure 1-4, LSRs on the way along LSP1 use the sequential label control mode,
and the LSR F on LSP2 uses independent label control mode.
In DU mode, the label is distributed in the following way: when LDP session is
established successfully, the downstream LSR will actively distribute label map
message to its upstream LSR. And the upstream LSR saves the label map information
and processes the received label map information according to the routing table.
While establishing LSP in MPLS domain, it is also necessary to prevent the presence of
path loop. Then, such two methods as maximum hop count and path vector can be
used.
The maximum hop count method refers to that the hop-count information is contained
in the message bound with the forwarding label, and the value pluses one for each hop.
When the value exceeds the threshold value, it is considered that a loop presents, and
the process for establishing LSP is terminated.
The path vector method refers to that the path information is recorded in the message
bound with the forwarding label, and, for every hop, the corresponding router checks if
its ID is contained in this record. If not, the router adds its ID into the record; and if yes,
it indicates that a loop presents and the process for establishing LSP is terminated.
I. LSP tunnel
MPLS supports LSP tunnel technology. On an LSP path, LSR Ru and LSR Rd are both
the upstream and the downstream for each other. However, the path between LSR Ru
and LSR Rd may not be part of the path provided by routing protocol. MPLS allows
establishing a new LSP path <Ru R1...Rn Rd> between LSR Ru and LSR Rd, and LSR
Ru and LSR Rd are respectively the starting point and ending point of this LSP. The
LSP between LSR Ru and LSR Rd is referred to as the LSP tunnel, which avoids the
traditional encapsulated tunnel on the network layer. If the route along which the tunnel
passes and the route obtained hop by hop from routing protocol is consistent, this
tunnel is called hop-by-hop routing tunnel. And if the two routes are not consistent, then
the tunnel of this type is called explicit routing tunnel.
R1 R2 R3 R4 Layer 1
1-7
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 1 MPLS Architecture
As shown in Figure 1-5, LSP <R2 R21 R22 R3> is a tunnel between R2 and R3.
In MPLS, a packet may carry multiple labels which are in the form of stack. Operations
to the stack follow the “last in first out” principle and it is always the labels at the top of
the stack that decide how to forward packets. Pushing label indicates to add a label into
a outgoing packet, then the depth of the label stack is the former one plus 1, and the
current label of the packet changes to the newly added one; popping a label indicates to
remove a label form a packet, then the depth of the packet is the former one minus 1,
and the current label of the packet changes to the label of its underlayer.
Multiple-layer label stack is used in LSP tunnel. When a packet travels in LSP tunnel,
there will be multiple layers for the label of the packet. Then, at the ingress and egress
of each tunnel, it is necessary to implement pushing and popping operation for the label
stack. For each pushing operation, the label will be added with one layer. And there is
no depth limitation for the label stack from MPLS.
The labels are organized according to the principle of “last in first out” in the label stack,
and MPLS processes the labels beginning from the top of the stack.
If the depth of the label stack for a packet is m, it indicates that the label at the bottom of
that stack is level 1 label, and the label at the top of the stack is level m label. A packet
with no label can be regarded as a packet with empty label stack, that is, the depth of its
label stack is 0.
When LDP establishes LSP in hop-by-hop mode, the next hop is determined by using
the information, which is usually collected by such routing protocols as IGP, BGP in
each LSR route forwarding table, on the way. However, LDP just uses the routing
information indirectly, rather than associates with various routing protocols directly.
On the other hand, although LDP is the special protocol for implementing label
distribution, it is not the sole protocol for label distribution. The existing protocols such
as BGP, RSVP, after being extended, can also support MPLS label distribution. For
some MPLS applications, it is also necessary to extend some routing protocols. For
example, the application of MPLS VPN requires extending the BGP protocol, thus the
BGP protocol can propagate VPN routing information.
To transmit data stream of private network on public network, traditional VPN uses
tunnel protocols like GRE, L2TP, and PPTP. LSP itself is a tunnel on public network, so
there are obvious advantages to implement VPN by MPLS. MPLS VPN connects the
geographically different branches of private network by using LSP, forming a united
network. MPLS VPN also supports the interconnection between different VPNs.
1-8
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 1 MPLS Architecture
CE3
Private
network branch 3
PE3
CE2
CE1 PE1
Private Private
Backbone network
network branch 1 network branch 2
PE2
The basic structure of MPLS-based VPN is shown in Figure 1-6. CE is the customer
edge device, and it may either be a router or a switch, or perhaps a host. PE is a service
provider edge router, which is located on the backbone network. PE is responsible for
the management of VPN customers, establishing LSP connection between various
PEs, route allocation among different branches of the same VPN customer.
Usually the route allocation between PEs is implemented by using extended BGP.
MPLS VPN supports the IP address multiplexing between different branches and the
interconnection between different VPNs. Compared with traditional route, it is
necessary to add branch and VPN identifier information in VPN route. So, it is
necessary to extend BGP so as to carry VPN routing information.
1-9
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 2 MPLS Basic Capability Configuration
Before configuring any other MPLS command, it is necessary to configure LSR ID firstly.
This ID is usually in IP address format and must be unique in the domain.
Perform the following configuration in the system view.
2-1
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 2 MPLS Basic Capability Configuration
Operation Command
Define LSR ID mpls lsr-id ip-address
Delete LSR ID undo mpls lsr-id
In system view, you can first enable MPLS globally and enter MPLS view using the
mpls command. Then you can directly enter MPLS view after using the mpls
command in system view.
Use the mpls command in VLAN interface view to enable MPLS on the VLAN
interface.
Operation Command
Enable MPLS globally and enter MPLS view (system view)
mpls
Enable MPLS on a VLAN interface (VLAN interface view)
Disable MPLS globally or on a VLAN interface (system or VLAN
undo mpls
interface view)
Operation Command
Configure the topology-Driven LSP
lsp-trigger { all | ip-prefix ip-prefix }
setup policy
Use the default value, which only allows undo lsp-trigger { all | ip-prefix
32-bit IP to trigger LSP. ip-prefix }
2-2
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 2 MPLS Basic Capability Configuration
You can manually set an LSR to be a node along an LSP, and place a limit on the traffic
over the LSP. Depending on the position in an MPLS domain, an LSR along an LSP can
be the ingress node, an intermediate node (also called transit node), or the egress
node. Note that an LSP operates normally only after all the LSRs along the LSP have
been properly configured.
Perform the following configuration in MPLS view.
Operation Command
static-lsp ingress lsp-name { destination
Set the current LSR to the
dest-addr { addr-mask | mask-length } | l2vpn }
ingress node of the specified
nexthop next-hop-addr } } out-label
LSP
out-label-value
Cancel the ingress node
undo static-lsp ingress lsp-name
setting of the specified LSP
static-lsp transit lsp-name [ l2vpn ]
Set the current LSR to an
incoming-interface interface-type
intermediate node along the
interface-number in-label in-label-value nexthop
specified LSP
next-hop-addr out-label out-label-value
Cancel the intermediate node
undo static-lsp transit lsp-name
setting of the specified LSP
Set the current LSR to the static-lsp egress lsp-name [ l2vpn ]
egress node of the specified incoming-interface interface-type
LSP interface-number in-label in-label-value
Cancel the egress node
undo static-lsp egress lsp-name
setting of the specified LSP
2-3
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 2 MPLS Basic Capability Configuration
Operation Command
Enable LDP protocol mpls ldp
Disable LDP undo mpls ldp
To make the VLAN interface support LDP, you must enable LDP function on the
interface in VLAN interface mode. After enabling the LDP function, the interface then
sets up session. It begins to set up LSP if in topology-driven mode,.
Disabling LDP function on interface causes the break of all LDP session in VLAN
interface, and all the LSP based on those sessions are deleted. So you must use this
command with cautiously.
Perform the following configuration in the interface view.
Operation Command
Enable LDP function on interface mpls ldp enable
Disable LDP function on interface mpls ldp disable
The Remote-peer configuration is mainly used for extended discovery mode so that
this LSR can establish sessions with LSRs that are not directly connected with it at the
link layer.
2-4
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 2 MPLS Basic Capability Configuration
Operation Command
Enter Remote-peer view mpls ldp remote-peer index
Delete the corresponding Remote-peer undo mpls ldp remote-peer index
You can specify the address of any LDP-enabled interface on the Remote-peer or the
address of the Loopback interface on the LSR that has advertised the route as the
address of the Remote-peer.
Perform the following configuration in the Remote-peer view.
Operation Command
Configure a remote-peer address remote-ip remoteip
remoteip: the IP address of the Remote-peer. It should be the ID of the peer LSR.
The LDP entity on the interface sends Hello packets periodically to find out LDP peer,
and the established sessions must also maintain their existence by periodic message
(if there is no LDP message, then Keepalive message must be sent).
Note:
There are two types of LDP sessions: Basic and Remote. Basic session can be
established only on two direct-connect switches, while Remote session can be on two
switches which are not directly connected. You can only configure Basic sessions in
VLAN interface view and Remote sessions in remote-peer view.
2-5
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 2 MPLS Basic Capability Configuration
Caution:
Modifying the holdtime parameter results in re-establish the original session, as well as
the LSP over this session. Here the session refers to Basic session, but not Remote
session.
Operation Command
mpls ldp timer { session-hold
Configure session hold-time
session-holdtime | hello hello-holdtime }
Return to the default value undo mpls ldp timer { session-hold | hello }
Operation Command
mpls ldp timer { targeted-session-hold |
Configure session hold-time
targeted-hello } {holdtime | interval } }
The transport-address discussed here refers to the address carried in the transport
address TLV in Hello messages. Generally, you can configure the transport-address to
the MPLS LSR ID of the current LSR, but you can also configure the transport-address
to other address flexibly as required by some applications.
Perform the following configuration in VLAN interface view.
2-6
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 2 MPLS Basic Capability Configuration
Operation Command
mpls ldp transport-ip { interface |
Configure Hello transport-address
ip-address }
Return to the default Hello
undo mpls ldp transport-ip
transport-address
You can enable or disable the loop detection function during LDP signaling process.
The loop detection includes maximum hop count mode and path vector mode.
The maximum hop count method refers to that the hop-count information is contained
in the message bound with the forwarding label, and the value pluses one for each hop.
When the value exceeds the threshold value, it is considered that a loop presents, and
the process for establishing LSP is terminated.
The path vector method refers to that the path information is recorded in the message
bound with the forwarding label, and, for every hop, the corresponding router checks if
its ID is contained in this record. If not, the router adds its ID into the record; and if yes,
it indicates that a loop presents and the process for establishing LSP is terminated.
When this method is used, if the defined maximum value is exceeded, it is considered
that a loop happens and the LSP establishment fails.
Perform the following configuration in the system view.
Operation Command
Enable loop detection mpls ldp loop-detect
Disable loop detection undo mpls ldp loop-detect
2-7
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 2 MPLS Basic Capability Configuration
When maximum hop count mode is adopted for loop detection, the maximum
hop-count value can be defined. And if the maximum value is exceeded, it is
considered that a loop happens and the LSP establishment fails.
Perform the following configuration in the system view.
Table 2-13 Set the maximum hop count for loop detection
Operation Command
Set maximum hop count for loop detection mpls ldp hops-count hop-number
Return to the default maximum hop count undo mpls ldp hops-count
When path vector mode is adopted for loop detection, it is also necessary to specify the
maximum value of LSP path. In this way, when one of the following conditions is met, it
is considered that a loop happens and the LSP establishment fails.
z The record of this LSR already exists in the path vector recording table.
z The path hop count exceeds this maximum value.
Perform the following configuration in the system view.
Table 2-14 Set the maximum hop count in path vector mode
Operation Command
Set the maximum hop count in path vector
mpls ldp path-vectors pv-number
mode
Return to the default maximum hop count in
undo mpls ldp path-vectors
path vector mode
Table 2-15 Configure LDP authentication mode (between every two routers)
Operation Command
mpls ldp password [ cipher | simple ]
Configure LDP authentication Mode
password
Remove LDP authentication undo mpls ldp password
2-8
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 2 MPLS Basic Capability Configuration
After accomplishing the configuration tasks mentioned previously, you can execute the
display command in any view to view the running state of a single or all the static LSPs
and thus to evaluate the effect of the configurations.
Operation Command
display mpls static-lsp [ include text |
Display the static LSP information
verbose ]
II. Displaying the MPLS statistics information or LSP information of all ports or
a single VLAN interface
After finishing the configurations above, execute the display command in any view to
view the MPLS statistics information or LSP information of all ports or a single VLAN
interface. You can verify the effect of the configuration by checking the information on
display.
Operation Command
Displaying the MPLS statistics display mpls statistics { interface
information or LSP information of all { Vlan-interface | all } | lsp { lsp-Index | all |
ports or a single VLAN interface lsp-name }
After accomplishing the configuration tasks mentioned previously, you can execute the
display command in any view to view the information related to the MPLS-enabled
interfaces and thus to evaluate the effect of the configurations.
Operation Command
Display information of the
display mpls interface
MPLS-enabled interfaces
2-9
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 2 MPLS Basic Capability Configuration
Execute the following commands in any view to display the information related to MPLS
LSP.
Operation Command
Display the information about MPLS
display mpls lsp [ include text | verbose ]
LSP
V. Debugging MPLS
You may execute the debugging command in user view to debug the information
concerning all interfaces with MPLS function enabled.
As enabling debugging may affect the router performance, you are recommended to
use this command when necessary. Execute the undo form of this command to disable
the corresponding debugging.
Operation Command
Enable debugging for debugging mpls lspm { agent | all | event | ftn |
MPLS LSP interface | packet | policy process | vpn }
Disable debugging for undo debugging mpls lspm { agent | all | event | ftn |
MPLS LSP interface | packet | policy process | vpn }
This command is used to enable the trap function of MPLS during an LSP/LDP setup
process.
Perform the following configuration in system view.
Operation Command
Enable the LDP Trap function of MPLS snmp-agent trap enable ldp
Disable the LDP Trap function of MPLS undo snmp-agent trap enable ldp
Enable the LSP Trap function of MPLS snmp-agent trap enable lsp
Disable the LSP Trap function of MPLS undo snmp-agent trap enable lsp
2-10
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 2 MPLS Basic Capability Configuration
VRP provides abundant MPLS monitoring commands for monitoring states of LSRs,
LDP sessions, interfaces and peers. These commands are the powerful debugging and
diagnosing tools.
After accomplishing the configuration tasks described earlier, you can execute the
display command in any view to view the running state of LDP and thus to evaluate the
effect of the configurations.
Operation Command
Display LDP information display mpls ldp
Display buffer information for LDP display mpls ldp buffer-info
Display LDP-enabled interface
display mpls ldp interface
information
Display LDP saved label information display mpls ldp lsp
Display information on all peers of LDP
display mpls ldp peer
session
Display information of the remote-peers
display mpls ldp remote
in the LDP sessions
Display states and parameters of LDP
display mpls ldp session
sessions
Execute debugging command in user view for the debugging of various messages
related to LDP
Operation Command
debugging mpls ldp { all | main | advertisement |
Enable debugging for
session | pdu | notification | remote }[ interface
MPLS LDP
interface-type interface-number ]
undo mpls debugging ldp { all | main | advertisement |
Disable debugging for
session | pdu | notification | remote } [ interface
MPLS LDP
interface-type interface-number]
Use the mpls ldp reset-session command in VLAN interface to reset a specific LDP
session on the VLAN interface.
2-11
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 2 MPLS Basic Capability Configuration
Operation Command
Reset a specific LDP session on the
mpls ldp reset-session peer-address
VLAN interface (VLAN interface view)
Figure 2-1 illustrates a network with four switches, which connects to each other
through Ethernet.
The four switches all support MPLS, and LSP can be established between any two
switches with the routing protocol OSPF.LDP establishes LSP by using routing
information of OSPF.
SwitchB
VLAN201 VLAN203
Switch A 168.1.1.2 172.17.1.1 SwitchD
VLAN202
VLAN201 100.10.1.2
VLAN203
168.1.1.1 172.17.1.2
VLAN202
100.10.1.1
SwitchC
1) Configure Switch A
# Configure LSR ID and enable MPLS and LDP.
[Quidway] mpls lsr-id 168.1.1.1
[Quidway] mpls
[Quidway-mpls] quit
[Quidway] mpls ldp
# Configure IP address and enable MPLS and LDP for VLAN interface 201.
[Quidway] vlan 201
2-12
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 2 MPLS Basic Capability Configuration
# Configure IP address and enable MPLS and LDP for VLAN interface 201.
[Quidway] vlan 201
[Quidway-vlan201] port gigabitethernet 2/1/1
[Quidway-vlan201] quit
[Quidway] interface vlan-interface 201
[Quidway-Vlan-interface201] ip address 168.1.1.2 255.255.0.0
[Quidway-Vlan-interface201] mpls
[Quidway-Vlan-interface201] mpls ldp enable
[Quidway-Vlan-interface201] mpls ldp transport-ip interface
# Configure IP address and enable MPLS and LDP for VLAN interface 203.
[Quidway] vlan 203
[Quidway-vlan203] port gigabitethernet 2/1/3
[Quidway-vlan203] quit
[Quidway] interface vlan-interface 203
[Quidway-Vlan-interface203] ip address 172.17.1.1 255.255.0.0
[Quidway-Vlan-interface203] mpls
[Quidway-Vlan-interface203] mpls ldp enable
[Quidway-Vlan-interface203] mpls ldp transport-ip interface
# Configure IP address and enable MPLS and LDP for VLAN interface 202.
[Quidway] vlan 202
[Quidway-vlan202] port gigabitethernet 2/1/2
[Quidway-vlan202] quit
2-13
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 2 MPLS Basic Capability Configuration
# Configure IP address and enable LDP and MPLS for VLAN interface 202.
[Quidway] vlan 202
[Quidway-vlan202] port gigabitethernet 2/1/1
[Quidway-vlan202] quit
[Quidway] interface Vlan-interface 202
[Quidway-Vlan-interface202] ip address 100.10.1.1 255.255.255.0
[Quidway-Vlan-interface202] mpls
[Quidway-Vlan-interface202] mpls ldp enable
[Quidway-Vlan-interface202] quit
2-14
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 2 MPLS Basic Capability Configuration
# Configure IP address and enable MPLS and LDP for VLAN interface 203.
[Quidway] vlan 203
[Quidway-vlan203] port gigabitethernet 2/1/3
[Quidway-vlan203] quit
[Quidway] interface vlan-interface 203
[Quidway-Vlan-interface203] ip address 172.17.1.2 255.255.0.0
[Quidway-Vlan-interface203] mpls
[Quidway-Vlan-interface203] mpls ldp enable
2-15
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
3-1
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
VPN1 site 1
site 1 Backbone network of
PE the service provider CE
P P
CE
PE VPN 2
CE
site 2
VPN2
P
site 3 PE VPN1
PE
site 2
CE
CE
As shown in Figure 3-1, MPLS VPN model contains three parts: CE, PE and P.
z CE (Customer Edge) device: It is a composing part of the customer network, which
is usually connected with the service provider directly through an interface. It may
be a router or a switch which cannot sense the existence of VPN.
z PE (Provider Edge) router: It is the Provider Edge router, namely the edge device
of the provider network, which connects with your CE directly. In MPLS network,
PE router processes all the operations for VPN.PE needs to possess MPLS basic
forwarding capability.
z P (Provider) router: It is the backbone router in the provider network, which is not
connected with CE directly. P router needs to possess MPLS basic forwarding
capability.
The classification of CE and PE mainly depends on the range for the management of
the provider and the customer, and CE and PE are the edges of the management
ranges.
In a basic BGP/MPLS VPN model, the PEs are in the network of the service provider
and are managed by the service provider.
When a VPN user wants to subdivide the VPN into multiple VPNs, the traditional
solution is to configure these VPNs directly on the PEs of the service provider. This
solution is easy to implement, but has the following disadvantages: the number of the
VPNs carried on PEs may increase rapidly; the operator may have to perform more
operations when required by a user to adjust the relation between the user's internal
3-2
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
VPNs. These disadvantages not only increase the network operating cost, but also
bring relevant management and security issues.
The nested VPN is a better solution. Its main idea is to transfer VPNv4 route between
PE and CE of common BGP MPLS/VPN such that user themselves can manage their
internal VPN division, and the service provider can be saved from participating into
users' internal VPN management.
The following figure shows the network model for nested VPN:
CE5
VPN1
provider PE provider PE
CE6
P
VPN2
CE7
VPN3
customer PE customer PE
1) VPN-instance
VPN-instance is an important concept in VPN routing in MPLS. In an MPLS VPN
implementation, each site corresponds to a specific VPN-instance on PE (their
association is implemented by binding VPN-instance to the VALN interface). If
subscribers on one site belong to multiple VPNs, then the corresponding VPN-instance
includes information about all these VPNs.
Specifically, such information should be included in VPN-instance: label forwarding
table, IP routing table, the interfaces bound with VPN-instance, and the management
information (RD, route filtering policy, member interface list, and so on). It includes the
VPN membership and routing rules of this site.
PE is responsible for updating and maintaining the relationship between VPN-instance
and VPN. To avoid data leakage from the VPN and illegal data entering into the VPN,
each VPN-instance on the PE has an independent set of routing table and label
forwarding table, in which the forwarding information of the message is saved
2) MBGP
MBGP (multiprotocol extensions for BGP-4, see RFC2283) propagates VPN
membership information and routes between PE routers. It features backward
3-3
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
compatibility: It not only supports traditional IPv4 address family, but also supports
other address families, for example, VPN-IPv4 address family. MP-BGP ensures that
VPN private routes are only advertised within VPNs, as well as implementing
communication between MPLS VPN members.
3) VPN-IPv4 address
VPN is just a private network, so it can use the same IP address to indicate different
sites. But the IP address is supposed as unique when MP-BGP advertises CE routes
between PE routers, so routing errors may occur for the different meaning in two
systems. The solution is to switch IPv4 addresses to VPN-IPv4 address to generate
globally unique addresses before advertising them, so PE routers is required to support
MP-BGP.
A VPN-IPv4 address consists of 12 bytes, and the first eight bytes represent the RD
(Route Distinguisher), which are followed by a 4-byte IPv4 address. The service
providers can distribute RD independently. However, their special AS (Autonomous
System) number must be taken as a part of the RD. After being processed in this way,
even if the 4-byte IPv4 address contained in VPN-IPv4 address has been overlapped,
the VPN-IPv4 address can still maintain globally unique. RD is only used within the
carrier network to differentiate routes. When the RD is 0, a VPN-IPv4 address is just a
IPv4 address in general sense.
The route received by PE from CE is the IPv4 route that needs to be redistributed into
VPN-instance routing table, and in this case a RD needs to be added. It is
recommended that the same RD be configured for all routes from the same user site.
VPN Target attribute is one of the MBGP extension community attributes and is used to
limit VPN routing information advertisement. It identifies the set of sites that can use
some route, namely by which Sites this route can be received, and the PE router can
receive the route transmitted by which Sites. The PE routers connected with the site
specified in VPN Target can all receive the routes with this attribute.
For PE routers, there are two sets of VPN Target attributes: one of them, referred to as
Export Targets, is added to the route received from a direct-connect site in advertising
local routes to remote PE routers. And the other one, known as Import Targets, is used
to decide which routes can be imported into the routing table of this site in receiving
routes from remote PE routers.
When matching the VPN Target attribute carried by the route to filter the routing
information received by the PE router, if the export VPN target set of the received route
contains identical items with the import VPN target set of the local end, the route is
imported into the VPN routing table and then advertised to the connected CE .
Otherwise, the route will be rejected.
3-4
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
Note:
The routes for other VPNs will not appear in the VPN's routing table by using VPN
Target attribute to filter routing information received at PE router, so the CE-transmitted
data will only be forwarded within the VPN.
BGP/MPLS VPN works on this principle: It uses BGP to propagate VPN private routing
information on carrier backbone network, and uses MPLS to forward VPN service
traffic.
The following are introductions to BGP/MPLS implementation from two aspects:
advertising VPN routing information and forwarding VPN packets.
3-5
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
LSPs must be set up between PEs for VPN data traffic forwarding with MPLS LSP. The
PE router which receives packets from CE and create label protocol stack is called
Ingress LSR, while the BGP next hop (Egress PE router) is Egress LSR. Using LDP to
create fully connected LSPs among PEs.
4) Between PE and CE
A CE can learn remote VPN routes from the PE connected through static routes, RIP,
OSPF or EBGP.
With above-mentioned steps, reachable routes can be established between CEs, for
transmission of VPN private routing information over public network.
On the ingress PE, two-layer label stack is formed for each VPN packet:
Interior-layer label, also called MPLS label, is at the bottom of the label stack and
distributed by M-BGP when the egress PE advertises routing information (in VPN
forwarding table) to ingress GE. When VPN packets from public network reach the CE,
they can be forwarded from the designated interface to the designated CE or site by
searching for the target MPLS forwarding table according to the labels contained.
Exterior-layer label, known as LSP initialization label, distributed by MPLS LDP, is at
the top of the label stack and indicates an LSP from the ingress PE to egress PE. By the
switching of exterior-layer label, VPN packets can be forwarded along the LSP to the
peer PE.
Figure 3-4 illustrates the details:
Layer1
P P
site1 site2
1.1.1.1/24 1.1.1.2/24
1) Site 1 sends an IPv4 packet with the destination address 1.1.1.2 of to CE1. CE1
looks up the IP routing table for a matched entry and sends the packet to PE1
according to the matched entry.
2) Depending on the interface the packet reaches and the destination of it, PE1 looks
up the VPN-instance entry to obtain interior-layer label, exterior-layer label, BGP
next hop (PE2), and output interfaces. After the establishment of labels, PE1
forwards MPLS packets to the first P of LSP through output interface.
3-6
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
3) Each P router on LSP forwards MPLS packets using exterior-layer label to the
penultimate-hop router, namely the P router before PE2. The penultimate-hop
router extracts the exterior-layer and sends MPLS packet to PE2.
4) PE2 looks up in the MPLS forwarding table according to the interior-layer label and
destination address to determine the egress interface for labeling operation and
the packet. It then extracts the interior-layer label and forwards through the egress
interface the IPv4 packet to CE2.
5) CE2 looks up in the routing table and sends the packet in normal IPv4 packet
forwarding mode to the site2.
When implementing a nested BGP/MPLS VPN, pay attention to the following items:
z No address overlap is allowed between user's internal sub-VPNs.
z To ensure the VPN routing information is correctly advertised over the backbone
network, the VPN-Targets of the user VPN and the internal sub-VPNs cannot be
overlapped and must be specified by the service provider.
z The provider PE and the customer PE must be directly connected and cannot
exchange VPNv4 route in Multihop-EBGP mode.
Before configuring a nested BGP/MPLS VPN, you must complete the following tasks:
z Configuring IGP on the MPLS backbone network (including provider PE and P
routers) to implement the IP connectivity on the backbone network.
z Configuring basic MPLS capability on the MPLS backbone network.
z Configuring MPLS LDP and setting up LDP LSP on the MPLS backbone network.
z Configuring BGP on the MPLS backbone network (create IBGP peers between
provider PEs).
z Configuring basic MPLS capability on user-end network (including customer PEs).
3-7
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
allows lower-layer MPLS VPNs comprising low-end equipment to provide MPLS VPN
accessing and interconnect through the high-end MPLS VPN backbone.
As shown in Figure 3-5, the PEs directly connected with user devices are called UPE
(underlayer PE or user-end PE); the devices in the core network connected with the
UPEs are called SPE (superstratum PE or service-provider-end PE).
Hierarchical PEs have the same appearance as that of the traditional PEs and can
coexist with other PEs in the same MPLS network.
UPEs are responsible for user access; they only maintain the routes of directly
connected VPN sites, but not that of the remote sites. SPEs, however, are responsible
for the maintenance and advertisement of VPN routes; they maintain all the routes of
the VPNs connected by their UPEs, including the routes in both local and remote sites.
UPE and SPE are relative concepts. In a multi-layer PE architecture, an upper layer PE
is an SPE for its lower layer PE, and a lower layer PE is an UPE for its upper layer PE.
The MBGP runs between SPE and UPE can be either MP-IBGP or MP-EBGP,
depending on whether the SPE and the UPE are in the same AS.
PE MPLS backbone
MPLS 骨干网 PE
Upper VPN network
SPE
Lower VPN
UPE
UPE
CE CE CE CE
As one of the most popular IGP routing protocols, OSPF is used as an internal routing
protocol in many VPNs. Using OSPF on PE-CE links brings convenience to you
because in this case CE routers only need to support OSPF protocol, without the need
of supporting other protocols, and network administrator only have to know the OSPF
protocol. If you want to transform conventional OSPF backbone into BGP/MPLS VPN,
using OSPF between PE and CE can simplify this transform process.
Therefore IETF raised two new OSPF VPN extension drafts, to provide a complete
solution to SPPF problems in BGP/MPLS VPN application when OSPF is used as
3-8
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
PE-CE routing protocol. In this case, PE router must be able to run multiple OSPF
instances, each of which corresponds to one VPN instance, owns an individual
interface, routing table, and sends VPN routing information over MPLS network using
BGP/OSPF interaction.
If supporting OSPF multi-instance, one router can run multiple OSPF processes, which
can be bound to different VPN instances. In practice, you can create one OSPF
instance for each service type. OSPF multi-instance can fully isolate different services
in transmission, which can solve security problems with low cost to meet the needs of
customers. Generally, OSPF multi-instance is run on PEs; The CE running OSPF
multi-instance in the LAN is called multi-VPN-instance CE. At present, isolation of LAN
services implements by VLAN function of the switch. OSPF Multi-VPN-Instance CE
provides schemes of services isolation implemented on routers.
VPN-GREEN
VPN -GREEN
Site2
Site2
OSPFArea2
OSPF Area2 CE31
VPN --RED
VPN RED
Area 2
Site1
Site1 PE3
OSPF Area0
OSPF Area0 OSPF 100 VPN -GREEN
CE21
CE11 VPN-RED
VPN -RED
Area 0 Site2
Site2
OSPF 100 VPN - RED OSPF Area1
OSPF Area1
MPLSVPN
MPLS VPNBac
Backbone
kbone Area 0
OSPF 200 VPN -GREEN OSPF 100 VPN -RED
Area 1
PE1
OSPF 200 VPN -GREEN
Area 1
VPN-GREEN
VPN-GREEN CE12 PE2
Site1
Site1 CE22
OSPF Area1
OSPF Area1
Engineering
ospf 100
vpn-engineering
ospf 100
vpn-engineering
MPLS Network opsf 200 opsf 200
vpn-rd vpn-rd R&D
ospf 300
PE vpn-finances
Multi-VPN-Instance CE
ospf 300
vpn-finances Finances
The VPN attribute of the packets from a CE to its PE lies on the VPN bound with the
ingress interface. This, in fact determines that all the CEs forwarded by the PE through
the same ingress interface belong to the same VPN; but in actual network
environments, a CE may need to access multiple VPNs through one physical interface.
3-9
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
Though you can configure different logical interfaces to meet this need, this
compromised method brings additional configuration burden and has limitation in
actual use.
To resolve this problem, the idea of multi-role host is generated. Specifically to say, this
idea is to differentiate the accesses to different VPNs through configuring policy routing
based on IP addresses, and transmit downstream data flow from PE to CE by
configuring static routing. The static routing under multi-role host circumstance is
different from common hosts; it is implemented by specifying an interface of another
VPN as the egress interface through a static route in a VPN; and thus allowing one
logical interface to access multiple VPNs.
I. CE router
The configuration on CE is relative simple. Only static route, RIP, OSPF or EBGP
configuration is needed for VPN routing information exchange with the PE connected,
MPLS configuration is not needed.
II. PE router
III. P router
The configuration on P device is relative simple. The main task is to configure MPLS
basic capacity on the P device to support LDP and MPLS forwarding.
The following are detailed configurations.
3-10
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
If you select static route mode for CE-PE route switching, you should then configure a
private static route pointing to PE on CE.
Perform the following configuration in the system view.
Operation Command
Create a specified ip route-static ip-address { mask | mask-length }
VPN-instance static { interface-name | gateway-address } [ preference
route preference-value ] [ reject | blackhole ]
Delete a specified undo ip route-static ip-address { mask | mask-length }
VPN-instance static [ interface-name | gateway-address ] [ preference
route preference-value ]
By default, the preference value for a static route is 60. You can also specify preference
for a static route.
If you select RIP mode for CE-PE route switching, you should then configure RIP on CE.
For detailed RIP configuration steps, see the RIP configuration part in routing protocol
in Quidway S8500 Series Routing Switches Operation Manual Volume I.
If you select OSPF mode for CE-PE route switching, you should then configure OSPF
on CE. For configuring OSPF, see the routing protocol part in Quidway S8500 Series
Routing Switches Operation Manual Volume II.
You must configure OSPF multi-instance to isolate services of different VPNs on CE
router, which is now called Multi-VPN-Instance CE.
You can bind OSPF processes with VPN with the following command in OSPF view.
Operation Command
Configure the router as multi-VPN-instance CE vpn-instance-capability simple
Remove the configuration undo vpn-instance-capability
3-11
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
If you select BGP mode for CE-PE route switching, you should then configure EBGP
peer, import direct-connect route, static route and other IGP routes, for BGP to
advertise VPN routes to PE.
It includes configuring MPLS LSR ID, enable MPLS globally and enable MPLS in the
corresponding VLAN interface view.
Refer to Chapter 2 MPLS Basic Capacity Configuration for details.
Operation Command
Create a VPN-instance and enter
ip vpn-instance vpn-instance-name
VPN-instance view
Delete a VPN-instance undo ip vpn-instance vpn-instance-name
Operation Command
Configure RD for the VPN-instance route-distinguisher route-distinguisher
3-12
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
The parameter in the above command has no default value. A VPN-instance works only
when a RD is configured for it. Other parameters for a VPN-instance cannot be
configured before configuring a RD for it.
To modify the RD, you must first delete the VPN-instance and reconfigure it.
3) Configure VPN-instance description
Perform the following configuration in VPN-instance view
Operation Command
Configure VPN-instance description description vpn-instance-description
Delete VPN-instance description undo description
Operation Command
vpn-target vpn-target-extcommunity
Configure VPN-target extended
[ import-extcommunity |
community for the VPN-instance
export-extcommunity | both ]
3-13
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
Operation Command
undo vpn-target
Delete the specified VPN-target
vpn-target-extcommunity
attribute from the VPN-target attribute
[ import-extcommunity |
list associated with the VPN-instance
export-extcommunity | both ]
By default, the value is both. In general all Sites in a VPN can be interconnected, and
the import-extcommunity and export-extcommunity attributes are the same, so you
can execute the command only with the both option.
Up to 16 VPN-targets can be configured with a command, and up to 20 vpn-targets can
be configured for a VPN-instance.
5) Limit the maximum number of routes in a VPN-instance
This command is used to limit the maximum number of routes for a VPN-instance so as
to avoid too many routes imported from a Site.
Perform the following configuration in the VPN-instance view.
Operation Command
Limit the maximum number of routes in routing-table limit integer
the VPN-instance { alarm-integer | syslog-alert }
Remove the maximum number limitation undo routing-table limit
Note:
Changing the maximum route limit for VPN-instance will not affect the existing routing
table. To make the new configuration take effect immediately, you should rebuild the
corresponding routing protocol or perform shutdown/undo shutdown operation on
the corresponding interface.
6) Configure vlan-id larger than 1024 on the fast Ethernet port of Trunk type
(Optional)
Configure vlan-id larger than 1024, with the range of MPLS/VPN VLANs allowed to
pass the port from vlan-id to vlan-id + 1023
Perform the following configuration in Ethernet port view.
3-14
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
Table 3-8 Configure the vlan id range of MPLS/VPN VLANs allowed to pass the
Ethernet port of C card
Operation Command
Configure the vlan id range of MPLS/VPN
port trunk mpls vlan from vlan-id [ to ]
VLANs allowed to pass the Trunk fast
vlanid
Ethernet port
Remove the configured vlan id range of
MPLS/VPN VLANs allowed to pass the undo port trunk mpls
Trunk fast Ethernet port
By default, the vlan-id range of MPLS/VPN VLANs is from 0 to 1023, and the default
value of vlan-id is 0. The value range of vlan-id is from 1 to 3071.
Caution:
Operation Command
ip binding vpn-instance vpn-instance-
Associate interface with VPN-instance
name
Remove the association of the interface undo ip binding vpn-instance vpn-inst
with VPN-instance ance-name
3-15
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
Caution:
These route exchanging modes are available between PE and CE: static route, RIP,
OSPF, EBGP.
1) Configure static route on PE
You can configure a static route pointing to CE on PE for it to learn VPN routing
information from CE.
Perform the following configuration in the system view.
Operation Command
By default, the preference value for a static route is 60. You can also specify another
preference for the static route you are configuring.
2) Configure RIP multi-instance
If you select RIP mode for CE-PE route switching, you should then specify running
environment for RIP instance on PE. With this command, you can enter RIP view and
import and advertise RIP instance in the view.
Perform the following configuration in the RIP view.
3-16
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
Operation Command
ipv4-family [ unicast ] vpn-instance
Create PE-CE RIP instance
vpn-instance-name
undo ipv4-family [ unicast ] vpn-instance
Delete PE-CE RIP instance
vpn-instance-name
Operation Command
ospf process-id [ router-id router-id-number ]
Configure an OSPF process
[ vpn-instance vpn-instance-name ]
Delete an OSPF process undo ospf process-id
Caution:
An OSPF process can only belong to one VPN instance, while one VPN instance may
contain multiple OSPF processes. By default, an OSPF process belongs to public
network.
3-17
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
only one Domain ID; different processes can be configured with the same Domain ID or
different Domain IDs.
Perform the following configuration in the OSPF view.
Operation Command
Configure Domain ID domain-id { id-number | id-addr }
Return to the default value undo domain-id
Caution:
The configured value will not take effect unit the command reset ospf is executed.
Caution:
The configured Route-tag will not take effect unit the command reset ospf is executed.
Operation Command
Configure tag for imported VPN route route-tag tag-number
3-18
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
tag-number is used to identify Tag value; by default, the first two bytes are fixed, that is,
0xD000, and the last two bytes is AS number of local BGP. For example, the AS
number of local BGP is 100, and then its default tag value is 3489661028 in decimal
notation. This value is an integer ranging from 0 to 4294967295.
Step 4: Configure Sham-link (optional)
Sham-links are required between two PEs when Backdoor links (that is, the OSPF links
that do not pass through the MPLS backbone network) exist between the two PEs and
data is expected to be transported over the MPLS backbone. A Sham-link between two
PEs is considered as a link in OSPF domain. Its source and destination addresses are
both the Loopback interface address with 32-bit mask, but this Loopback interface
should be bound to a VPN instance and direct routes must be imported into BGP by
BGP. OSPF processes of the VPN cannot directly import the routes of the Loopback
interface (so the import direct command cannot be executed in an OSPF processes of
VPN); instead, an OSPF process can only advertise the route indirectly by importing a
BGP route.
Perform the following configuration in the OSPF area view.
Operation Command
sham-link source-addr destination-addr [ cost cost-value ]
[ simple password | md5 keyid key ] [ dead seconds ]
Configure Sham-link
[ hello seconds ] [ retransimit seconds ] [ trans-delay
seconds ]
Delete a Sham-link undo sham-link source-addr destination-addr
By default, the cost value is 1, dead value is 40 seconds, hello value is 10 seconds,
retransmit value is 5 seconds and trans-delay value is 1 second.
4) Configure EBGP on PE
If you select EBGP between PE and CE, you should configure a neighbor for each VPN
in VPN instance address family sub-view, and import IGP route of CE.
Step 1: Configure peer group
Configuring peer group in VPN instance address family view.
Operation Command
Configure a peer group group group-name [ internal | external ]
Delete the specified peer group undo group group-name
3-19
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
By default, the peer group is configured as internal. When BGP mode is used for
PE-CE route switching, they often belong to different ASs, so you should configure
EBGP peer as external.
Step 2: Configure AS number for a specific neighbor and add group member to a peer
group
When EBGP mode is used for PE-CE route switching, you should configure AS number
for a specific neighbor for every CE VPN-instance.
Perform the following configuration in VPN instance address family view.
Operation Command
Configure AS number for peer { group-name | [ peer-address group
a specific neighbor group-name ] } as-number as-number
Delete the AS number of a undo peer { group-name | [peer-address group
specific neighbor group-name ] } as-number as-number]
Operation Command
Activate the peer (group) peer group-name enable
Deactivate the peer (group) undo peer group-name enable
3-20
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
Operation Command
Import IGP route import-route protocol [ process-id ] [ med med ]
Remove IGP route import undo import-route protocol
Operation Command
Configure BGP asynchronous with IGP undo synchronization
Operation Command
peer { group-name | peer-address }
Configure to allow routing loop
allow-as-loop asn-limit
undo peer { group-name | peer-address }
Configure to disable routing loop
allow-as-loop asn-limit
By default, the received route update information is not allowed to generate loop
information.
Step 7: Configure BGP features.
3-21
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
Table 3-22 Permit BGP session over any operable TCP interface
Operation Command
peer { peer-address | group-name }
Permit BGP session over any operable
connect-interface { interface-type
TCP interface
interface-number }
Use the best local address for TCP undo peer { peer-address |
connection group-name } connect-interface
BGP creates BGP adjacency to the peer end using specific interfaces, which is usually
the loopback interface. Because this interface is always in the up state, thus it reduces
the strike brought by network shock.
2) Configure MP-IBGP
Step 1: Enter protocol address family view.
Perform the following configuration in BGP view.
3-22
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
Operation Command
Enter VPNv4 sub-address family view ipv4-family vpnv4 [ unicast ]
Delete VPNv4 sub-address family view
undo ipv4-family vpnv4 [ unicast ]
configuration
Operation Command
Create a peer group group group-name [ internal | external ]
Delete a specific peer group undo group group-name
Choose the internal keyword when using the command to create an IBGP peer group.
Step 3: Activate peer (group)
By default, BGP neighbor is active while MBGP neighbor is inactive. You must enable
MBGP neighbor in VPNv4 sub-address family view.
Operation Command
Enable a peer group peer group-name enable
Disable a specific peer group undo peer group-name enable
Step 4: Configure the local address as the next hop in route advertisement (optional)
Since the default value is no configuration, you must show clearly to add in this
configuration command when configuring MBGP of PE-PE.
Perform the following configuration in VPNv4 sub-address family view.
Table 3-26 Configure the local address as the next hop in route advertisement
Operation Command
peer { peer-address | group-name }
Configure the local address as the
next-hop-localpeer { peer-address |
next hop in route advertisement
group-name } next-hop-local
undo peer { peer-address | group-name }
Remove the configuration
next-hop-local
3-23
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
Operation Command
Transfer BGP update packet peer { peer-address | group-name }
without AS number public-as-only
Transfer BGP update packet with undo peer { peer-address | group-name }
AS number public-as-only
Operation Command
Advertise default route to the peer peer ip-address default-route-advertise
(group) vpn-instance vpn-instance name
undo peer ip-address
Remove to advertise default route
default-route-advertise vpn-instance
to the peer (group)
vpn-instance name
Operation Command
Configure BGP neighbor as the
peer peer-address upe
UPE of BGP/MPLS VPN
Disable the configuration undo peer peer-address upe
P router does not maintain VPN routes, but do keep connection with public network and
coordinate with PE in creating LSPs. These configurations are required on P router:
3-24
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
Step 1: Configure MPLS basic capacity and enable LDP on the interfaces connecting P
router to PE router, for forwarding MPLS packets. See Chapter 2 MPLS Basic
Capability Configuration.
Step 2: Enable OSPF protocol at the interfaces connecting P router to PE router and
import direct-connect routes. See “OSPF” part in “Routing Protocol” for details.
After the above configuration, execute display command in any view to display the
running of the VPNv4 information in BGP database configuration, and to verify the
effect of the configuration.
Operation Command
display bgp vpnv4 { all | route-distinguisher
Display VPN address information
rd-value | vpn-instance vpn-instance-name }
from BGP table
{ group | network | peer | routing-table }
After the above configuration, you can execute display command in any view to
display the corresponding information in the IP routing tables related to VPN-instance,
and to verify the effect of the configuration.
Operation Command
display ip routing-table vpn-instance
Display IP routing table
vpn-instance-name [ [ip-address ] [ verbose ] |
associated with VPN-instance
statistics ]
After the above configuration, executing the display command in any view can display
the VPN-instance related information, including its RD, description, the interfaces
associated with it, and so on. You can view the information to verify the configuration
effect.
3-25
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
Operation Command
Display the VPN-instance related
display ip vpn-instance
information, including its RD, description,
[ vpn-instance-name | verbose ]
the interfaces associated with it, and so on.
Execute debugging command in user view for the debugging of the related
vpn-instance information.
Operation Command
debugging bgp { all | event | normal | { keepalive |
Enable the debugging for
mp-update | open | packet | update | route-refresh |
processing BGP
update } [ receive | send |] [ verbose ] }
undo debugging bgp { {all | event | normal |
keepalive | mp-update | open | packet | update |
Disable the debugging
route-refresh } [ receive | send | verbose ] } { all |
event | normal | update }
Operation Command
Display MPLS L3VPN
display mpls l3vpn-lsp [ verbose] include text
LSP information
Display MPLS L3VPN display mpls l3vpn-lsp [ vpn-instance
LSP VPN-instance vpn-instance-name ] [ transit | egress | ingress ]
information [include text | verbose ]
Operation Command
Display Sham-link display ospf [ process-id ] sham-link
3-26
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
I. Network requirements
z VPNA includes CE1 and CE3; VPNB includes CE2 and CE4.
z Subscribers in different VPNs cannot access each other. The VPN-target attribute
for VPNA is 111:1 and that for VPNB is 222:2.
z The PEs and P are Quidway switches supporting MPLS, and CEs are common
layer 3 switches.
Note:
The configuration in this case is focused on:
z Configure EBGP to exchange VPN routing information between CEs and PEs.
z Configure OSPF for inter-PE communication between PEs.
z Configure MP-IBGP to exchange VPN routing information between PEs.
AS 65410 AS 65430
CE1 CE3
VLAN201 VLAN201
168.1.1.1/16 168.3.1.1/16
AS 100
VPN-A VPN-A
PE1 PE3
RD(100:1) RD(100:3)
VLAN202 VLAN201 VLAN201 VLAN202
168.1.1.2/16 172.1.1.1/16 172.3.1.1/16 168.3.1.2/16
Loopback0 P Loopback0
202.100.1.1./32 VLAN301 VLAN303 202.100.1.3./32
VLAN302 VLAN304
PE2 PE4
RD(100:2) RD(100:4)
AS 65440
AS 65420 VLAN202 VLAN201 VLAN201 VLAN202
168.2.1.2/16 168.4.1.2/16
172.2.1.1./16 172.4.1.1./16
CE2 CE4
Loopback0 Loopback0
VLAN201 202.100.1.2./32 202.100.1.4./32 VLAN201
168.2.1.1/16 168.4.1.1/16
VPN-B VPN-B
3-27
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
1) Configure CE1.
# Configure CE1 and PE1 as EBGP neighbors, import direct-connect routes and static
routes to import intra-CE1 VPN routes into BGP and advertise to PE1.CE1connects to
PE1 through interface Gigabitethernet 2/1/1.
[CE1] vlan 201
[CE1-vlan201] port gigabitethernet 2/1/1
[CE1-vlan201] quit
[CE1] interface Vlan-interface 201
[CE1-Vlan-interface201] ip address 168.1.1.1 255.255.0.0
[CE1-Vlan-interface201] quit
[CE1] bgp 65410
[CE1-bgp] group 168 external
[CE1-bgp] peer 168.1.1.2 group 168 as-number 100
[CE1-bgp] import-route direct
[CE1-bgp] import-route static
Note:
The configuration on the other three CE switches (CE2 to CE4) is similar to that on CE1,
the details are omitted here.
2) Configure PE1
# Configure vpn-instance for VPNA on PE1, as well as other associated attributes to
control advertisement of VPN routing information.
[PE1] ip vpn-instance vpna
[PE1-vpn-vpna] route-distinguisher 100:1
[PE1-vpn-vpna] vpn-target 111:1 both
[PE1-vpn-vpna] quit
# Configure PE1 and CE1 as MP-EBGP neighbors, import CE1 VPN routes learned
into MBGP VPN-instance address family.
[PE1] bgp 100
[PE1-bgp] ipv4-family vpn-instance vpna
[PE1-bgp-af-vpn-instance] import-route direct
[PE1-bgp-af-vpn-instance] group 168 external
[PE1-bgp-af-vpn-instance] peer 168.1.1.1 group 168 as-number 65410
[PE1-bgp-af- vpn-instance] quit
[PE1-bgp] quit
3-28
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
# Bind the VLAN interface connecting PE1 and CE1 to the VPNA. Note that you should
first configure association between the VLAN interface and VPN-instance, and then
configure the IP address of the VLAN interface.
[PE1] vlan 202
[PE1-vlan202] port gigabitethernet 2/1/2
[PE1-vlan202] quit
[PE1] interface Vlan-interface 202
[PE1-Vlan-interface202] ip binding vpn-instance vpna
[PE1-Vlan-interface202] ip address 168.1.1.2 255.255.0.0
[PE1-Vlan-interface202] quit
# Configure Loopback interface. (For PE, the IP address for Loopback interface must
be a host address with 32-bit mask, to prevent the route is aggregated and then LSP
cannot process correctly interior-layer labels.)
[PE1] interface loopback0
[PE1-LoopBack 0] ip address 202.100.1.1 255.255.255.255
[PE1-LoopBack 0] quit
# Configure MPLS basic capacity and enable MPLS and LDP on VLAN interface
connecting PE1 and P. Create LSP and achieve MPLS packet forwarding.
[PE1] mpls lsr-id 202.100.1.1
[PE1] mpls
[PE1-mpls] quit
[PE1] mpls ldp
[PE1] vlan 201
[PE1-vlan201] port gigabitethernet 2/1/1
[PE1-vlan201] quit
[PE1] interface Vlan-interface 201
[PE1-Vlan-interface201] ip address 172.1.1.1 255.255.0.0
[PE1-Vlan-interface201] mpls
[PE1-Vlan-interface201] mpls ldp enable
[PE1-Vlan-interface201] quit
# Enable OSPF on the interface connecting PE1 and P and on the Loopback interface,
import direct-connect routes. Achieve inter-PE communication.
[PE1] ospf
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] network 172.1.0.0 0.0.255.255
[PE1-ospf-1-area-0.0.0.0] network 202.100.1.1 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] import-route direct
[PE1-ospf-1] quit
3-29
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
3-30
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
[P-Vlan-interface303] mpls
[P-Vlan-interface303] mpls ldp enable
[P-Vlan-interface303] quit
[P] vlan 304
[P-vlan304] port gigabitethernet 3/1/4
[P-vlan304] quit
[P] interface Vlan-interface 304
[P-Vlan-interface304] ip address 172.4.1.2 255.255.0.0
[P-Vlan-interface304] mpls
[P-Vlan-interface304] mpls ldp enable
[P-Vlan-interface304] quit
# Enable OSPF protocol on the interfaces connecting P and PE, import direct-connect
route to achieve inter-PE communication.
[P] ospf
[P-ospf-1] area 0
[P-ospf-1-area-0.0.0.0] network 172.1.1.0 0.0.255.255
[P-ospf-1-area-0.0.0.0] network 172.2.1.0 0.0.255.255
[P-ospf-1-area-0.0.0.0] network 172.3.1.0 0.0.255.255
[P-ospf-1-area-0.0.0.0] network 172.4.1.0 0.0.255.255
[P-ospf-1-area-0.0.0.0] quit
[P-ospf-1] import-route direct
4) Configure PE3
Note:
The configuration on PE3 is similar to that on PE1, you should pay more attention to
VPN routing attribute setting on PE3 to get information about how to control
advertisement of a same VPN routing information (with same VPN-target) over MPLS
network.
# Set up MP-EBGP adjacency between PE3 and CE3, import intra-CE3 VPN routes
learned into MBGP VPN-instance address family.
[PE3] bgp 100
[PE3-bgp] ipv4-family vpn-instance vpna
3-31
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
# Configure MPLS basic capacity and enable MPLS and LDP on VLAN interface
connecting PE3 and P. Creates LSP and achieve MPLS packet forwarding.
[PE3] mpls lsr-id 202.100.1.3
[PE3] mpls
[PE3-mpls] quit
[PE3] mpls ldp
[PE3] vlan 201
[PE3-vlan201] interface gigabitethernet 2/1/1
[PE3-vlan201] quit
[PE3] interface Vlan-interface 201
[PE3-Vlan-interface201] ip address 172.3.1.1 255.255.0.0
[PE3-Vlan-interface201] mpls
[PE3-Vlan-interface201] mpls ldp enable
[PE3-Vlan-interface201] quit
# Enable OSPF on the interface connecting PE3 and P and the Loopback interface,
import direct-connect routes.
[PE3] ospf
[PE3-ospf-1] area 0
[PE3-ospf-1-area-0.0.0.0] network 172.3.0.0 0.0.255.255
[PE3-ospf-1-area-0.0.0.0] network 202.100.1.3 0.0.0.0
PE3-ospf-1-area-0.0.0.0] quit
[PE3-ospf-1] import-route direct
[PE3-ospf-1-area-0.0.0.0] import-route direct
3-32
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
I. Network requirements
Company A and Company B are located at City A and City B respectively. Their
headquarters is located at City C. They respectively own VPN1 and VPN2.
In this case, VPN function is provided by MPLS. There are some shared resources at
the City C for the two VPNs. All subscribers in both VPNs can access the shared
resources, but VPN subscribers in City A and City B cannot access each other.
The two companies cannot use identical IP addresses, for they share the same
VPN-instance at PE-C.
Note:
In the case the configuration is focused on controlling access authority of VPN
subscribers at different cities by configuring different VPN-target attributes at different
PEs.
3-33
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
SP network
AS100
PE-A PE-C PE-B
10.1.1.1 20.1.1.1 30.1.1.1
VLAN301 VLAN301
VLAN301
172.15.0.1/16 172.16.0.1/16
172.17.0.1/16
VLAN201 VLAN201 VLAN201
172.15.1.1/16 172.16.1.1/16 172.17.1.1/16
City A
CE-A City C City B CE-B
CE-C
AS65011 AS65012 AS65013
10.11.1.0/24 10.12.1.0/24
PC PC PC PC PC PC PC
VPN 1
VPN 2
Note:
This configuration procedure has omitted configurations between PE and P, and
configurations on CEs. For these details refer to the former example.
1) Configure PE-A:
# Configure VPN-instance 1 for VPN1 on PE-A, so that it can send and receive VPN
routing information of VPN-target 111:1.
[PE-A] ip vpn-instance vpn-instance 1
[PE-A-vpn-1] route-distinguisher 100:1
[PE-A-vpn-1] vpn-target 111:1 both
[PE-A-vpn-1] quit
# Set up MP-EBGP adjacency between PE-A and CE-A, import intra-CE-A VPN routes
learned into MBGP VPN-instance address family.
[PE-A] bgp 100
[PE-A-bgp] ipv4-family vpn-instance vpn-instance1
3-34
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
3-35
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
[PE-C-vpn-2] quit
# Set up MP-EBGP adjacency between PE-C and CE-C, import intra-CE-C VPN routes
learned into MBGP VPN-instance address family.
[PE-C] bgp 100
[PE-C-bgp] ipv4-family vpn-instance vpn-instance2
[PE-C-bgp-af-vpn-instance] import-route direct
[PE-C-bgp-af-vpn-instance] import-route static
[PE-C-bgp-af-vpn-instance] group 172 external
[PE-C-bgp-af-vpn-instance] peer 172.16.1.1 group 172 as-number 65012
[PE-C-bgp-af-vpn-instance] quit
[PE-C-bgp] quit
3-36
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
# Set up MP-EBGP adjacency between PE-B and CE-B, import intra-CE-B VPN routes
learned into MBGP VPN-instance address family.
[PE-B] bgp 100
[PE-B-bgp] ipv4-family vpn-instance vpn-instance3
[PE-B-bgp-af-vpn-instance] import-route direct
[PE-B-bgp-af-vpn-instance] import-route static
[PE-B-bgp-af-vpn-instance] group 172 external
[PE-B-bgp-af-vpn-instance] peer 172.17.1.1 group 172 as-number 65013
[PE-B-bgp-af-vpn-instance] quit
[PE-B-bgp] quit
3-37
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
I. Network requirements
Hub&Spoke networking is also called central server networking. The Site in the center
is called Hub-Site, while the one not in the center is called Spoke-Site. The Hub-Site
knows the routes to all other Sites in the same VPN, and the Spoke-Site must send its
traffic first to the Hub-Site and then to the destination. Hub-Site is the central node of
Spoke-Sites.
A bank has a headquarters network and subsidiary networks, and it requires that the
subsidiaries cannot directly exchange data with each other, but they can exchange data
through the headquarters network which provides uniform control. In this case,
Hub&Spoke networking topology is used: CE2 and CE3 are spoke-sites, while CE1 is a
hub-site in the bank data center. CE1 controls communication between CE2 and CE3.
z Set up IBGP adjacency between PE1 and PE2 or PE1 and PE3, but not between
PE2 and PE3, that is, VPN routing information cannot be exchanged between PE2
and PE3.
z Create two VPN-instances on PE1, import VPN routes of VPN-target 100:11 and
100:12, set VPN-target for VPN routes advertised as 100:2.
z Create a VPN-instance on PE2, import VPN routes of VPN-target 100:2, set
VPN-target for VPN routes advertised as 100:11.
z Create a VPN-instance on PE3, import VPN routes of VPN-target 100:2, set
VPN-target for VPN routes advertised as 100:12.
Then PE2 and PE3 can only learn their neighbor’s routes through PE1.
3-38
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
Note:
In this case the configuration is focused on four points:
z Route advertisement can be controlled by VPN-target settings on different PEs.
z Routing loop is permitted only once, so that PE can receive route update messages
with AS number included from CE.
z In Hub&Spoke networking, VPN-target of VPN-instance (VPN-instance3) which is
used to release route on the PE1 cannot be the same with any VPN-target of
VPN-instance (VPN-instance2) which is used to import route on PE1.
z In Hub&Spoke networking, route-distinguisher rd2 (100:3) of VPN-instance which is
used to release route on the PE1 cannot be the same with the route-distinguisher
rd1 (100:1) or rd4 (100:4) of corresponding VPN-instances on each PE2 and PE3;
rd 1 and rd4 can be the same or not.
CE1
Hub Site
VLAN202 VLAN201
172.17.0.1/16 172.16.0.1/16
PE1
Loopback0
11.1.1.1/32
Internet
Spoke Site Spoke Site
PE3
CE2 PE2 20.1.1.2 CE3
VLAN201 VLAN201
172.15.0.1/16 Loopback0 Loopback0 172.18.0.1/16
22.1.1.1/32 33.1.1.1/32
3-39
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
Note:
The following contents are omitted in this case: MPLS basic capacity configuration
between PEs, configuration between PE and P, configuration between CEs. For the
details refer to 3.4.1 .
1) Configure PE1
# Configure two VPN-instances on PE1, set specified VPN-target for the routes
received from PE2 and PE3.
[PE1] ip vpn-instance vpn-instance2
[PE1-vpn-vpn-instance2] route-distinguisher 100:2
[PE1-vpn-vpn-instance2] vpn-target 100:11 import-extcommunity
[PE1-vpn-vpn-instance2] vpn-target 100:12 import-extcommunity
[PE1-vpn-instance2] quit
[PE1] ip vpn-instance vpn-instance3
[PE1-vpn-vpn-instance3] route-distinguisher 100:3
[PE1-vpn-vpn-instance3] vpn-target 100:2 export-extcommunity
[PE1-vpn-vpn-instance3] quit
# Set up EBGP adjacency between PE1 and CE1, import intra-CE1 VPN routes
learned into MBGP VPN-instance address family, with one routing loop permitted.
[PE1] bgp 100
[PE1-bgp] ipv4-family vpn-instance vpn-instance2
[PE1-bgp-af-vpn-instance] import-route static
[PE1-bgp-af-vpn-instance] import-route direct
[PE1-bgp-af-vpn-instance] group 17216 external
[PE1-bgp-af-vpn-instance] peer 172.16.1.1 group 17216 as-number 65002
[PE1-bgp-af-vpn-instance] quit
[PE1-bgp] ipv4-family vpn-instance vpn-instance3
[PE1-bgp-af-vpn-instance] import-route static
[PE1-bgp-af-vpn-instance] import-route direct
[PE1-bgp-af-vpn-instance] group 17217 external
[PE1-bgp-af-vpn-instance] peer 172.17.1.1 group 17217 as-number 65002
[PE1-bgp-af-vpn-instance] peer 172.17.1.1 allow-as-loop 1
[PE1-bgp-af-vpn] quit
[PE1-bgp] quit
# Bind the VLAN interface connecting PE1 and CE1 to different VPN-instances. Bind
the interface of the VLAN to which the Ethernet port Gigabitethernet 2/1/1 belongs to
VPN-instance2, bind the interface of the VLAN to which the Ethernet port
Gigabitethernet 2/1/2 belongs to VPN-instance3.
[PE1] vlan 201
3-40
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
3-41
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
# Set up EBGP adjacency between PE2 and CE2, import intra-CE2 VPN routes
learned into MBGP VPN-instance address family.
[PE2] bgp 100
[PE2-bgp] ipv4-family vpn-instance vpn-instance1
[PE2-bgp-af-vpn-instance] import-route static
[PE2-bgp-af-vpn-instance] import-route direct
[PE2-bgp-af-vpn-instance] group 172 external
[PE2-bgp-af-vpn-instance] peer 172.15.1.1 group 172 as-number 65003
[PE2-bgp-af-vpn-instance] quit
[PE2-bgp] quit
# Bind the interface of the VLAN to which the port connecting PE2 and CE2 belongs to
VPN-instance.
[PE2] vlan 201
[PE2-vlan201] port gigabitethernet 2/1/1
[PE2-vlan201] quit
[PE2] interface Vlan-interface 201
[PE2-Vlan-interface201] ip binding vpn-instance vpn-instance1
[PE2-Vlan-interface201] ip address 172.15.0.1 255.255.0.0
[PE2-Vlan-interface201] quit
# Set up MP-IBGP adjacency between PE2 and PE1 to exchange inter-PE VPN routing
information and activate MP-IBGP peer in VPNv4 sub-address family view.
[PE2] bgp 100
[PE2] group 11
[PE2-bgp] peer 11.1.1.1 group 11 as-number 100
[PE2-bgp] peer 11.1.1.1 connect-interface loopback 0
[PE2-bgp] ipv4-family vpnv4
[PE2-bgp-af-vpn] peer 11 enable
[PE2-bgp-af-vpn] peer 11.1.1.1 allow-as-loop 1
[PE2-bgp-af-vpn] quit
[PE2-bgp] quit
3) Configure PE3
# Create a VPN-instance on PE3, import VPN routing information of VPN-target 100:2
and advertise VPN routing information of VPN-target 100:12.
[PE3] ip vpn-instance vpn-instance2
[PE3-vpn-vpn-instance2] route-distinguisher 100:4
[PE3-vpn-vpn-instance2] vpn-target 100:12 export-extcommunity
3-42
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
# Set up EBGP adjacency between PE3 and CE3 import intra-CE3 VPN routes learned
into MBGP VPN-instance address family.
[PE3] bgp 100
[PE3-bgp] ipv4-family vpn-instance vpn-instance2
[PE3-bgp-af-vpn-instance] import-route static
[PE3-bgp-af-vpn-instance] import-route direct
[PE3-bgp-af-vpn-instance] group 172 external
[PE3-bgp-af-vpn-instance] peer 172.18.1.1 group 172 as-number 65001
[PE3-bgp-af-vpn-instance] quit
[PE3-bgp] quit
# Bind the interface of the VLAN to which the port connecting PE3 and CE3 belongs to
VPN-instance.
[PE3] vlan 201
[PE3-vlan201] port gigabitethernet 2/1/1
[PE3-vlan201] quit
[PE3] interface Vlan-interface 201
[PE3-Vlan-interface201] ip binding vpn-instance vpn-instance2
[PE3-Vlan-interface201] ip address 172.18.0.1 255.255.0.0
[PE3-Vlan-interface201] quit
# Set up MP-IBGP adjacency between PE3 and PE1 to exchange inter-PE VPN routing
information and activate MP-IBGP peer in VPNv4 sub-address family view.
[PE3] bgp 100
[PE3-bgp] group 11
[PE3-bgp] peer 11.1.1.1 group 11
[PE3-bgp] peer 11.1.1.1 connect-interface loopback 0
[PE3-bgp] ipv4-family vpnv4
[PE3-bgp-af-vpn] peer 11 enable
[PE2-bgp-af-vpn] peer 11.1.1.1 group 11
[PE2-bgp-af-vpn] peer 11.1.1.1 allow-as-loop 1
[PE3-bgp-af-vpn] quit
[PE3-bgp] quit
3-43
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
I. Network requirements
For the applications which require high robustness of network, you may use CE
dual-home networking mode.
CE1 and CE2 are dual-homed; they are connected to both PE1 and PE2. Three PEs
are connected to each other so the links between them are backed up. CE3 and CE4
are single-homed; each of them is only connected to one PE.
CE1 and CE3 are in one VPN, and CE2 and CE4 are in another VPN. The two VPNs
cannot intercommunicate with each other.
AS:65003 AS:65004
CE3 CE4
VLAN211 VLAN211
192.168.13.2/24 192.168.23.2/24
Loopback0
3.3.3.3/32 VLAN314
VLAN311
192.168.13.1/24 192.168.23.1/24
VLAN312 VLAN313
30.1.1.1/24 20.1.1.2/24
PE3
VLAN214 VLAN214
30.1.1.2/24 AS:100 20.1.1.1/24
Loopback0 Loopback0
1.1.1.1/32 VLAN213 VLAN213
10.1.1.1/24 10.1.1.2/24 2.2.2.2/32
VLAN211 PE1 VLAN212 VLAN212 PE2 VLAN211
172.11.11.1/24 172.21.21.1/24 172.12.12.1/24 172.22.22.1/24
VLAN211 VLAN211
172.11.11.2/24 172.22.22.2/24
VLAN212 VLAN212
172.12.12.2/24 172.21.21.2/24
CE1 CE2
AS:65001 AS:65002
3-44
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
Note:
The configuration of CE router is omitted in this case and you can refer to Section 3.4.1
Integrated BGP/MPLS VPN Configuration .
1) Configure PE1
# Configure two VPN-instances 1.1 and 1.2 respectively for CE1 and CE2 on PE1, set
different VPN-targets for them.
[PE1] ip vpn-instance vpn-instance1.1
[PE1-vpn-vpn-instance1.1] route-distinguisher 1.1.1.1:1
[PE1-vpn-vpn-instance1.1] vpn-target 1.1.1.1:1
[PE1-vpn-vpn-instance1.1] quit
[PE1] ip vpn-instance vpn-instance1.2
[PE1-vpn-vpn-instance1.2] route-distinguisher 2.2.2.2:2
[PE1-vpn-vpn-instance1.2] vpn-target 2.2.2.2:2
[PE1-vpn-vpn-instance1.2] quit
# Set up EBGP adjacency between PE1 and CE1 in VPN-instance 1, import intra-CE1
VPN routes learned into VPN-instance 1.1.
[PE1] bgp 100
[PE1-bgp] ipv4-family vpn-instance vpn-instance1.1
[PE1-bgp-af-vpn-instance] import-route direct
[PE1-bgp-af-vpn-instance] import-route static
[PE1-bgp-af-vpn-instance] group 17211 external
[PE1-bgp-af-vpn-instance] peer 172.11.11.2 group 17211 as-number 65001
[PE1-bgp-af-vpn-instance] quit
[PE1-bgp] quit
# Set up EBGP adjacency between PE1 and CE2 in VPN-instance 1.2, import
intra-CE2 VPN routes learned into VPN-instance 1.2.
[PE1-bgp] ipv4-family vpn-instance vpn-instance1.2
[PE1-bgp-af-vpn-instance] import-route direct
[PE1-bgp-af-vpn-instance] import-route static
[PE1-bgp-af-vpn-instance] group 17221 external
[PE1-bgp-af-vpn-instance] peer 172.21.21.2 group 17221 as-number 65002
[PE1-bgp-af-vpn] quit
[PE1-bgp] quit
# Bind the interface connecting PE1 and CE1 to VPN-instance 1.1 and interface
connecting PE1 and CE2 to VPN-instance 1.2.
3-45
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
# Configure MPLS basic capacity, enable LDP on the interface connecting PE1 and
PE2 and the interface connecting PE1 and PE3.
[PE1] mpls lsr-id 1.1.1.1
[PE1] mpls
[PE1-mpls] quit
[PE1] mpls ldp
[PE1] vlan 213
[PE1-vlan213] port gigabitethernet 2/1/3
[PE1-vlan213] quit
[PE1] interface Vlan-interface213
[PE1-Vlan-interface213] mpls
[PE1-Vlan-interface213] mpls ldp enable
[PE1-Vlan-interface213] mpls ldp transport-ip interface
[PE1-Vlan-interface213] ip address 10.1.1.1 255.255.255.0
[PE1-Vlan-interface213] quit
[PE1] vlan 214
[PE1-vlan214] port gigabitethernet 2/1/4
[PE1-vlan214] quit
[PE1] interface Vlan-interface 214
[PE1-Vlan-interface214] mpls
[PE1-Vlan-interface214] mpls ldp enable
[PE1-Vlan-interface214] mpls ldp transport-ip interface
[PE1-Vlan-interface214] ip address 30.1.1.2 255.255.255.0
3-46
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
[PE1-Vlan-interface214] quit
# Enable OSPF on the interface connecting PE1 and PE2 and the interface connecting
PE1 and PE3 and the Loopback interface, to achieve inter-PE communication.
[PE1] Router-id 1.1.1.1
[PE1] ospf
[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 30.1.1.2 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] network 10.1.1.1 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
Note:
The configuration of PE2 is similar to that of PE1, so only VPN-instance configuration is
detailed here.
# Create two VPN-instances 2.1 and 2.2 respectively for CE1 and CE2 on PE2,
configure different VPN-targets for them.
[PE2] ip vpn-instance vpn-instance2.1
[PE2-vpn-vpn-instance2.1] route-distinguisher 1.1.1.1:1
[PE2-vpn-vpn-instance2.1] vpn-target 1.1.1.1:1
[PE2-vpn-vpn-instance2.1] quit
[PE2] ip vpn-instance vpn-instance2.2
3-47
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
# Set up EBGP adjacency between PE2 and CE1 in VPN-instance 2.1, import
intra-CE1 VPN routes learned into VPN-instance2.1.
[PE2] bgp 100
[PE2-bgp] ipv4-family vpn-instance vpn-instance2.1
[PE2-bgp-af-vpn-instance] import-route direct
[PE2-bgp-af-vpn-instance] import-route static
[PE2-bgp-af-vpn-instance] group 17212 external
[PE2-bgp-af-vpn-instance] peer 172.12.12.2 group 17212 as-number 65001
[PE2-bgp-af-vpn] quit
# Set up EBGP adjacency between PE2 and CE2 in VPN-instance2.2, import intra-CE2
VPN routes learned into VPN-instance2.2.
[PE2-bgp] ipv4-family vpn-instance vpn-instance2.2
[PE2-bgp-af-vpn-instance] import-route direct
[PE2-bgp-af-vpn-instance] import-route static
[PE2-bgp-af-vpn-instance] group 17222 external
[PE2-bgp-af-vpn-instance] peer 172.22.22.2 group 17222 as-number 65002
[PE2-bgp-af-vpn] quit
[PE2-bgp] quit
# Bind the interface connecting PE2 and CE1 to VPN-instance 2.1 and the interface
connecting PE2 and CE2 to VPN-instance 2.2.
[PE2] vlan 212
[PE2-vlan212] port gigabitethernet 2/1/2
[PE2-vlan212] quit
[PE2] interface Vlan-interface 212
[PE2-Vlan-interface212] ip binding vpn-instance vpn-instance2.1
[PE2-Vlan-interface212] ip address 172.12.12.1 255.255.255.0
[PE2-Vlan-interface212] quit
[PE2] vlan 211
[PE2-vlan211] port gigabitethernet 2/1/1
[PE2-vlan211] quit
[PE2] interface Vlan-interface 211
[PE2-Vlan-interface211] ip binding vpn-instance vpn-instance2.2
[PE2-Vlan-interface211] ip address 172.22.22.1 255.255.255.0
[PE2-Vlan-interface211] quit
3) Configure PE3
3-48
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
Note:
Only the VPN-instance configuration of PE3 is detailed here, other configurations are
similar to that of the PE1 and PE2, and are omitted here.
# Create two VPN-instances 3.1 and 3.2 respectively for CE3 and CE4 on PE3,
configure different VPN-targets for them.
[PE3] ip vpn-instance vpn-instance3.1
[PE3-vpn-vpn-instance3.1] route-distinguisher 1.1.1.1:1
[PE3-vpn-vpn-instance3.1] vpn-target 1.1.1.1:1
[PE3-vpn-vpn-instance3.1] quit
[PE3] ip vpn-instance vpn-instance3.2
[PE3-vpn-instance] route-distinguisher 2.2.2.2:2
[PE3-vpn-instance] vpn-target 2.2.2.2:2
[PE3-vpn-instance] quit
# Set up EBGP adjacency between PE3 and CE3 in VPN-instance3.1, import intra-CE3
VPN routes learned into VPN-instance3.1.
[PE3] bgp 100
[PE3-bgp] ipv4-family vpn-instance vpn-instance3.1
[PE3-bgp-af-vpn-instance] import-route direct
[PE3-bgp-af-vpn-instance] import-route static
[PE3-bgp-af-vpn-instance] group 192 external
[PE3-bgp-af-vpn-instance] peer 192.168.13.2 group 192 as-number 65003
[PE3-bgp-af-vpn-instance] quit
[PE3-bgp] quit
# Set up EBGP adjacency between PE3 and CE4 in VPN-instance3.2, import intra-CE4
VPN routes learned into VPN-instance3.2.
[PE3-bgp] ipv4-family vpn-instance vpn-instance3.2
[PE3-bgp-af-vpn-instance] import-route direct
[PE3-bgp-af-vpn-instance] import-route static
[PE3-bgp-af-vpn-instance] group 232 external
[PE3-bgp-af-vpn-instance] peer 192.168.23.2 group 232 as-number 65004
[PE3-bgp-af-vpn-instance] quit
[PE3-bgp] quit
# Bind the interface connecting PE3 and CE3 to VPN-instance3.1 and the interface
connecting PE3 and CE4 to VPN-instance 3.2.
[PE3] vlan 311
[PE3-vlan311] port gigabitethernet 3/1/1
[PE3-vlan311] quit
[PE3] interface Vlan-interface 311
3-49
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
I. Network requirements
A VPN subscriber has sites in both city A and B. Because of the geographical reason,
site in City A accesses to the MPLS/VPN network of service provider in City A, and gets
AS100 as the AS number; site in City B accesses to the MPLS/VPN network of service
provider in City B, and gets AS200 as the AS number. The VPN goes through two ASs.
CE1 and CE2 belong to VPN-A, while CE3 and CE4 belong to VPN-B.
AS 100 AS 200
1) Configure PE1
# Enable MPLS and LDP.
[PE1] mpls lsr-id 1.1.1.1
[PE1] mpls
[PE1-mpls] quit
[PE1] mpls ldp
3-50
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
# Configure VPN-instance.
[PE1] ip vpn-instance vpna
[PE1-vpn-vpna] route-distinguisher 100:1
[PE1-vpn-vpna] vpn-target 100:1 both
[PE1] ip vpn-instance vpnb
[PE1-vpn-vpnb] route-distinguisher 100:2
[PE1-vpn-vpnb] vpn-target 100:2 both
3-51
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
# Configure VPN-instance.
[PE2] ip vpn-instance vpna
[PE2-vpn-vpna] route-distinguisher 200:1
[PE2-vpn-vpna] vpn-target 100:1 both
[PE2] ip vpn-instance vpnb
[PE2-vpn-vpnb] route-distinguisher 200:2
[PE2-vpn-vpnb] vpn-target 100:2 both
3-52
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
3-53
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
3-54
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
I. Network requirements
CE1 and CE2 belong to the same VPN. CE1 accesses the MPLS network through PE1
in AS100; and CE2 accesses the MPLS network through PE2 in AS200.
The example adopts Option C to implement a cross-domain BGP/MPLS VPN, that is,
the VPN routing is managed by the Multi-hop MP-EBGP which advertise label
VPN-IPv4 routes between PEs.
CE1 CE2
AS 650 01 AS 650 02
3-55
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] network 172.1.0.0 0.0.255.255
[PE1-ospf-1-area-0.0.0.0] network 202.100.1.2 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit
# Configure ASBR-PE1.
[ASBR-PE1] interface loopback0
[ASBR-PE1-LoopBack 0] ip address 202.100.1.1 255.255.255.255
[ASBR-PE1-LoopBack 0] quit
[ASBR-PE1] vlan 110
[ASBR-PE1-vlan110] interface vlan 110
[ASBR-PE1-Vlan-interface110] ip address 172.1.1.1 255.255.0.0
[ASBR-PE1-Vlan-interface110] quit
[ASBR-PE2] vlan 210
[ASBR-PE1-vlan210] interface vlan 210
[ASBR-PE1-Vlan-interface210] ip address 192.1.1.1 255.255.255.0
[ASBR-PE1-Vlan-interface210] quit
[ASBR-PE1] ospf
[ASBR-PE1-ospf-1] area 0
[ASBR-PE1-ospf-1-area-0.0.0.0] network 172.1.0.0 0.0.255.255
[ASBR-PE1-ospf-1-area-0.0.0.0] network 202.100.1.1 0.0.0.0
[ASBR-PE1-ospf-1-area-0.0.0.0] quit
[ASBR-PE1-ospf-1] quit
# Configure PE2.
[PE2] interface loopback0
[PE2-LoopBack0] ip address 202.200.1.2 255.255.255.255
[PE2-LoopBack0] quit
[PE2]vlan 310
[PE2-vlan310] interface vlan 310
[PE2-Vlan-interface310] ip address 162.1.1.2 255.255.0.0
[PE2- Vlan-interface310] quit
[PE2] ospf
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 162.1.0.0 0.0.255.255
[PE2-ospf-1-area-0.0.0.0] network 202.200.1.2 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
# Configure ASBR-PE2.
[ASBR-PE2] interface loopback0
[ASBR-PE2-LoopBack0] ip address 202.200.1.1 255.255.255.255
[ASBR-PE2-LoopBack0] quit
3-56
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
Note:
MPLS must be enabled between the ASBR-PEs.
# Configure basic MPLS capability on PE1 and enable LDP on the interface connected
to ASBR-PE1.
[PE1] mpls lsr-id 172.1.1.2
[PE1-mpls] lsp-trigger all
[PE1-mpls] quit
[PE1] mpls ldp
[PE1-mpls-ldp] quit
[PE1] interface vlan 110
[PE1-Vlan-interface110] mpls
[PE1-Vlan-interface110] mpls ldp
[PE1-Vlan-interface110] quit
3-57
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
# Configure basic MPLS capability on PE2 and enable LDP on the interface connected
to ASBR-PE2.
[PE2] mpls lsr-id 162.1.1.2
[PE2-mpls] lsp-trigger all
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface vlan 310
[PE2-Vlan-interface310] mpls
[PE2-Vlan-interface310] mpls ldp
[PE2-Vlan-interface310] quit
3) Create a VPN instance on each PE, and bind the instance to the interface
connected to the corresponding CE.
# Configure CE1
[CE1] vlan 410
[CE1-vlan410] interface vlan 410
[CE1-Vlan-interface410] ip address 168.1.1.2 255.255.0.0
[CE1-Vlan-interface410] quit
# Create a VPN instance on PE1 and bind it to the interface connected to CE1
[PE1] ip vpn-instance vpna
[PE1-vpn-vpna] route-distinguisher 100:2
3-58
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
# Configure CE2
[CE2] vlan 510
[CE2-vlan510] interface vlan 510
[CE2-Vlan-interface510] ip address 168.2.2.2 255.255.0.0
[CE2-Vlan-interface510] quit
# Create a VPN instance on PE2 and bind it to the interface connected to CE2
[PE2] ip vpn-instance vpna
[PE2-vpn-instance] route-distinguisher 200:2
[PE2-vpn-instance] vpn-target 100:1 both
[PE2-vpn-instance] quit
[PE2] vlan 510
[PE2] interface vlan 510
[PE2-Vlan-interface510] ip binding vpn-instance vpna
[PE2-Vlan-interface510] ip address 168.2.2.1 255.255.0.0
[PE2-Vlan-interface510] quit
4) Configure MP-BGP, set up IBGP peer relation between PEs, and set up EBGP
peer relation between PEs and their CEs.
Note:
z Enable the exchanging of label-carried IPv4 route between the following routers:
PE1 and ASBR-PE1, PE2 and ASBR-PE2, ASBR-PE1 and ASBR-PE2.
z Make each ASBR-PE change the next hop to its own when it advertises routes to
the PE in the same AS.
z Configure routing policy on each ASBR-PE as follows: make the ASBR-PE assign
MPLS label when it advertises a route received from the PE in this AS to the
ASBR-PE in the peer AS, and let the ASBR-PE assign a new MPLS label when it
advertises a label-carried IPv4 route to the PE in this AS.
# Configure CE1
[CE1] bgp 65001
[CE1-bgp] group 20 external
[CE1-bgp] peer 168.1.1.1 group 20 as-number 100
3-59
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
[CE1-bgp] quit
# Configure PE1: set up EBGP peer relation with CE1, IBGP peer relation with
ASBR-PE1, and Multihop MP-EBGP peer relation with PE2.
[PE1] bgp 100
[PE1-bgp] ipv4-family vpn-instance vpna
[PE1-bgp-af-vpn-instance] group 10 external
[PE1-bgp-af-vpn-instance] peer 168.1.1.2 group 10 as-number 65001
[PE1-bgp-af-vpn-instance] import-route direct
[PE1-bgp-af-vpn-instance] quit
[PE1-bgp] group 20
[PE1-bgp] peer 20 label-route-capability
[PE1-bgp] peer 202.100.1.1 group 20
[PE1-bgp] peer 202.100.1.1 connect-interface loopback0
[PE1-bgp] group 30 external
[PE1-bgp] peer 30 ebgp-max-hop
[PE1-bgp] peer 200.200.1.2 group 30 as-number 200
[PE1-bgp] peer 200.200.1.2 connect-interface loopback0
[PE1-bgp] ipv4-family vpnv4
[PE1-bgp-af-vpn] peer 30 enable
[PE1-bgp-af-vpn] peer 200.200.1.2 group 30
[PE1-bgp-af-vpn] quit
[PE1-bgp] quit
# Configure ASBR-PE1: set up EBGP peer relation with ASBR-PE2, and IBGP peer
relation with PE1.
[ASBR-PE1] bgp 100
[ASBR-PE1-bgp] import-route ospf
[ASBR-PE1-bgp] group 10 external
[ASBR-PE1-bgp] peer 10 label-route-capability
3-60
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
# Configure CE2.
[CE2] bgp 65002
[CE2-bgp] group 10 external
[CE2-bgp] peer 168.2.2.1 group 10 as-number 200
[CE2-bgp] quit
# Configure PE2: set up EBGP peer relation with CE2, IBGP peer relation with
ASBR-PE2, and Multihop MP-EBGP peer relation with PE1.
[PE2] bgp 200
[PE2-bgp] ipv4-family vpn-instance vpna
[PE2-bgp-af-vpn-instance] group 10 external
[PE2-bgp-af-vpn-instance] peer 168.2.2.2 group 10 as-number 65002
[PE2-bgp-af-vpn-instance] import-route direct
[PE2-bgp-af-vpn-instance] quit
[PE2-bgp] group 20
[PE2-bgp] peer 20 label-route-capability
[PE2-bgp] peer 202.200.1.1 group 20
[PE2-bgp] peer 202.200.1.1 connect-interface loopback0
[PE2-bgp] group 30 external
[PE2-bgp] peer 30 ebgp-max-hop
[PE2-bgp] peer 202.100.1.2 group 30 as-number 100
[PE2-bgp] peer 202.100.1.2 connect-interface loopback0
[PE2-bgp] ipv4-family vpnv4
[PE2-bgp-af-vpn] peer 30 enable
[PE2-bgp-af-vpn] peer 202.100.1.2 group 30
[PE2-bgp-af-vpn] quit
[PE2-bgp] quit
3-61
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
# Configure ASBR-PE2: set up EBGP peer relation with ASBR-PE1, and IBGP peer
relation with PE2.
[ASBR-PE2] bgp 200
[ASBR-PE2-bgp] import-route ospf
[ASBR-PE2-bgp] group 10 external
[ASBR-PE2-bgp] peer 10 label-route-capability
[ASBR-PE2-bgp] peer 10 route-policy rtp-ebgp export
[ASBR-PE2-bgp] peer 192.1.1.1 group 10 as-number 100
[ASBR-PE2-bgp] group 20
[ASBR-PE2-bgp] peer 20 label-route-capability
[ASBR-PE2-bgp] peer 20 next-hop-local
[ASBR-PE2-bgp] peer 20 route-policy rtp-ibgp export
[ASBR-PE2-bgp] peer 202.200.1.2 group 20
[ASBR-PE2-bgp] peer 202.200.1.2 connect-interface loopback0
I. Network requirements
For those VPNs that have distinct hierarchy, an MPLS VPN covering a province and its
cities, for example, incorporating the backbone network at the province level and the
networks at the city level into a single MPLS VPN will impose a high requirement in
performance on the equipment on the entire network, in the event that the network
topology size is large. However, the requirement in equipment performance can
become lower if this MPLS VPN is separated into two VPNs, the network at the
province level and the network at the city level, for example.
SPE acts as a PE on the network at the province level, and is connected with a
downstream MPLS VPN at the city level. UPE acts as a PE on the network at the city
level and provide access service for the VPN clients which are normally low-end
routers.
3-62
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
PE MPLS backbone
MPLS 骨干网 PE
Upper VPN
VLAN201
10. 0.0.1/8 Loopbac k0:10.0.0.2
SPE
VLAN301
10.0.0. 2/8
Loopbac k0:1.0.0.1
UPE
Lower VPN UPE
CE CE CE CE
Note:
This case only illustrates the configurations concerned with PEs in a hierarchical
BGP/MPLS VPN.
1) Configure SPE
# Configure the basic MPLS capability.
[SPE] mpls lsr-id 1.0.0.2
[SPE] mpls
[SPE-mpls] quit
[SPE] mpls ldp
# Configure VPN-instance
[SPE] ip vpn-instance vpn1
[SPE-vpn-vpn1] route-distinguisher 100:1
[SPE-vpn-vpn1] vpn-target 100:1 both
# Configure interfaces (So far as a PE router concerned, its Loopback 0 interface must
be assigned with a host address of 32-bit mask.
[SPE] vlan 201
[SPE-vlan201] port gigabitethernet 2/1/1
3-63
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
[SPE-vlan201] quit
[SPE] interface Vlan-interface 201
[SPE-Vlan-interface201] ip address 10.0.0.1 255.0.0.0
[SPE-Vlan-interface201] mpls
[SPE-Vlan-interface201] mpls ldp enable
[SPE-Vlan-interface201] quit
[SPE] interface loopback0
[SPE-LoopBack 0] ip address 1.0.0.2 255.255.255.255
[SPE-LoopBack 0] quit
# Configure BGP
[SPE] bgp 100
[SPE] import direct
[SPE-bgp] group 1 internal
[SPE-bgp] peer 1.0.0.1 group 1
[SPE-bgp] peer 1 connect-interface LoopBack0
[SPE-bgp] ipv4-family vpn-instance vpn1
[SPE--bgp-af-vpn-instance] import direct
[SPE--bgp-af-vpn-instance] quit
[SPE-bgp] ipv4-family vpnv4
[SPE-bgp-af-vpn] peer 1 enable
[SPE-bgp-af-vpn] peer 1.0.0.1 group 1
[SPE-bgp-af-vpn] peer 1.0.0.1 upe
[SPE-bgp-af-vpn] peer 1.0.0.1 default-route-advertise vpn-instance vpn1
[SPE-bgp-af-vpn] quit
[SPE-bgp] quit
# Configure OSPF
[SPE] ospf
[SPE] import-route direct
[SPE-ospf-1] area 0
[SPE-ospf-1-area-0.0.0.0] network 1.0.0.2 0.0.0.0
[SPE-ospf-1-area-0.0.0.0] network 10.0.0.0 0.255.255.255
2) Configure UPE
# Configure the basic MPLS capability.
[UPE] mpls lsr-id 1.0.0.1
[UPE] mpls
[UPE-mpls] quit
[UPE] mpls ldp
# Configure VPN-instance
[UPE] ip vpn-instance vpn1
[UPE-vpn-vpn1] route-distinguisher 100:1
3-64
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
# Configure interfaces
[UPE] vlan 301
[UPE-vlan301] port gigabitethernet 2/2/1
[UPE-vlan301] quit
[UPE] interface Vlan-interface 301
[UPE-Vlan-interface301] mpls
[UPE-Vlan-interface301] mpls ldp enable
[UE1-Vlan-interface301] mpls ldp transport-ip interface
[UPE-Vlan-interface301] ip address 10.0.0.2 255.0.0.0
[UPE-Vlan-interface301] quit
[UPE] interface loopback0
[UPE-LoopBack 0] ip address 1.0.0.1 255.255.255.255
# Configure BGP
[UPE] bgp 100
[UPE-bgp] group 1 internal
[UPE-bgp] peer 1.0.0.2 group 1
[UPE-bgp] ipv4-family vpn-instance vpn1
[UPE--bgp-af-vpn-instance] import direct
[UPE-bgp] ipv4-family vpnv4
[UPE-bgp-af-vpn] peer 1 enable
[UPE-bgp-af-vpn] peer 1.0.0.2 group 1
# Configure OSPF
[UPE] ospf
[UPE-ospf-1] import-route direct
[UPE-ospf-1] area 0
[UPE-ospf-1-area-0.0.0.0] network 1.0.0.1 0.0.0.0
[UPE-ospf-1-area-0.0.0.0] network 10.0.0.2 0.255.255.255
[UPE-ospf-1-area-0.0.0.0] quit
I. Network requirements
3-65
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
VLAN202
VLAN203 VLAN202
12.1.1.2/24
168.1.12.2/24 168.1.23.2/24
20.2.1.0/24
VLAN201 VLAN201 LoopBack1:50.1.1.2
20.1.1.1/24 20.1.1.2/24 PE2
CE2
2.2.2.2
20.20.20.20
LoopBack0: 2.2.2.2
1) Configure PE1
# Enable MPLS and LDP.
[PE1] mpls lsr-id 50.1.1.1
[PE1] mpls
[PE1-mpls] quit
[PE1] mpls ldp
# Configure VPN-instance.
[PE1] ip vpn-instance vpn1
[PE1-vpn-vpn1] route-distinguisher 2:1
[PE1-vpn-vpn1] vpn-target 100:1 export-extcommunity
[PE1-vpn-vpn1] vpn-target 100:1 import-extcommunity
3-66
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
3-67
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
# Configuring Sham-link
[PE1-ospf-100-area-0.0.0.1] sham-link 1.1.1.1 2.2.2.2
3-68
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
# Configure BGP.
[PE2] bgp 100
[PE2-bgp] undo synchronization
[PE2-bgp] group fc internal
[PE2-bgp] peer 50.1.1.1 group fc
[PE2-bgp] peer 50.1.1.1 connect-interface LoopBack1
[PE2-bgp] peer 50.1.1.3 group fc
3-69
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
# Configuring Sham-link
[PE2-ospf-100-area-0.0.0.0] sham-link 2.2.2.2 1.1.1.1
# Configure OSPF.
[CE1] ospf 100 router-id 10.10.10.129
[CE1-ospf-100] import-route direct
[CE1-ospf-100] area 0.0.0.0
[CE1-ospf-100-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[CE1-ospf-100-area-0.0.0.0] network 12.1.1.0 0.0.0.255
4) Configure CE2
# Configure interface.
[CE2] vlan 202
[CE2-vlan202] port gigabitethernet 2/1/2
[CE2-vlan202] quit
[CE2] interface Vlan-interface 202
3-70
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
# Configure OSPF.
[CE2] ospf 100 router-id 20.20.20.20
[CE2-ospf-100] area 0.0.0.0
[CE2-ospf-100-area-0.0.0.0] network 12.1.1.0 0.0.0.255
[CE2-ospf-100-area-0.0.0.0] network 20.1.1.0 0.0.0.255
I. Network requirements
A VPN user has multiple nodes to access the service provider's BGP/MPLS backbone
network. And this VPN is divided into three sub-VPNs: VPN1, VPN2 and VPN3.
Some of the nodes of these sub-VPNs directly access a PE in the network, and some
access a PE through the father VPN. That is, the adopted network structure is
unsymmetrical.
This example mainly describes the configuration of VPN1; the configuration of other
sub-VPNs is similar.
3-71
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
CE5
VLAN 210
18.1.1.2/8 AS100
VPN1 prov_pe1 prov_pe2
AS50003 5.5.5.5 4.4.4.4 CE6
VLAN 210
18.1.1.1/8
VLAN 110 VLAN 110 VPN2
10.1.1.1/8 10.1.1.2/8
CE7
VLAN 310 VLAN 410
1.1.1.2/8 2.1.1.2/8
VPN3
VLAN 310 VLAN 410
cust_pe1 cust_pe2
1.1.1.1/8 2.1.1.1/8
6.6.6.6 7.7.7.7
AS600 AS500
VLAN 510 VLAN 610
15.1.1.2/8 16.1.1.2/8
Note:
This procedure omits part of the configuration for CE router.
3-72
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
# Configure prov_pe2.
<Quidway> system-view
[Quidway] sysname prov_pe2
[prov_pe2] interface LoopBack0
[prov_pe2-LoopBack0] ip address 4.4.4.4 255.255.255.255
[prov_pe2-LoopBack0] quit
[prov_pe1] vlan 110
[prov_pe1-vlan110] interface vlan-interface 110
[prov_pe1-Vlan-interface110] ip address 10.1.1.2 255.0.0.0
[prov_pe1-Vlan-interface110] quit
[prov_pe2] ospf
[prov_pe2-ospf] area 0
[prov_pe2-ospf-area-0.0.0.0] network 4.4.4.4 0.0.0.0
[prov_pe2-ospf-area-0.0.0.0] network 10.0.0.0 0.255.255.255
Configure basic MPLS capability and MPLS LDP on the backbone network.
# Configure prov_pe1.
[prov_pe1] mpls lsr-id 5.5.5.5
[prov_pe1] mpls ldp
[prov_pe1] interface vlan 110
[prov_pe1- Vlan-interface110] mpls
[prov_pe1- Vlan-interface110] mpls ldp
[prov_pe1- Vlan-interface110] quit
# Configure prov_pe2.
[prov_pe2] mpls lsr-id 4.4.4.4
[prov_pe2] mpls ldp
[prov_pe2] interface vlan 110
[prov_pe2- Vlan-interface110] mpls
[prov_pe2- Vlan-interface110] mpls ldp
[prov_pe2- Vlan-interface110] quit
3-73
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
[prov_pe1-bgp] quit
# Configure prov_pe2.
[prov_pe2] bgp 100
[prov_pe2-bgp] group ibgp internal
[prov_pe2-bgp] peer 5.5.5.5 group ibgp
[prov_pe2-bgp] peer 5.5.5.5 connect-interface LoopBack0
[prov_pe2-bgp] ipv4-family vpnv4
[prov_pe2-bgp-af-vpn] peer ibgp enable
[prov_pe2-bgp-af-vpn] peer ibgp next-hop-local
[prov_pe2-bgp-af-vpn] peer 5.5.5.5 group ibgp
[prov_pe2-bgp-af-vpn] quit
[prov_pe2-bgp] quit
2) Create a VPN instance on provider PEs to access customer PEs and directly
connected user CEs.
# Configure prov_pe1.
[prov_pe1] ip vpn-instance customer_vpn
[prov_pe1-vpn-instance] route-distinguisher 3:3
[prov_pe1-vpn-instance] vpn-target 3:3 export-community
[prov_pe1-vpn-instance] quit
[prov_pe1] ip vpn-instance vpn1
[prov_pe1-vpn-instance] route-distinguisher 1:1
[prov_pe1-vpn-instance] vpn-target 1:1
[prov_pe1-vpn-instance] vpn-target 3:3
[prov_pe1-vpn-instance] quit
[prov_pe1] vlan 310
[prov_pe1] interface vlan 310
[prov_pe1-Vlan-interface310] ip binding vpn-instance customer_vpn
[prov_pe1-Vlan-interface310] ip address 1.1.1.2 255.0.0.0
[prov_pe1- Vlan-interface310] mpls
[prov_pe1- Vlan-interface310] quit
[prov_pe1] interface vlan 210
[prov_pe1-Vlan-interface210] ip binding vpn-instance vpn1
[prov_pe1- Vlan-interface210] ip address 18.1.1.1 255.0.0.0
[prov_pe1- Vlan-interface210] quit
# Configure prov_pe2.
[prov_pe2] ip vpn-instance customer_vpn
[prov_pe2-vpn-instance] route-distinguisher 3:3
[prov_pe2-vpn-instance] vpn-target 3:3
[prov_pe2-vpn-instance] quit
[prov_pe2] interface vlan 410
[prov_pe2-Vlan-interface410] ip binding vpn-instance customer_vpn
3-74
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
# Configure cust_pe1.
<Quidway> system-view
[Quidway] sysname cust_pe1
[cust_pe1] interface LoopBack0
[cust_pe1-LoopBack0] ip address 6.6.6.6 255.255.255.255
[cust_pe1-LoopBack0] quit
[cust_pe1] mpls lsr-id 6.6.6.6
[cust_pe1] interface vlan 310
[cust_pe1-Vlan-interface310] ip address 1.1.1.1 255.0.0.0
[cust_pe1- Vlan-interface310] mpls
[cust_pe1- Vlan-interface310] quit
# Configure cust_pe2.
<Quidway> system-view
[Quidway] sysname cust_pe2
[cust_pe2] interface LoopBack0
[cust_pe2-LoopBack0] ip address 7.7.7.7 255.255.255.255
[cust_pe2-LoopBack0] quit
[cust_pe2] mpls lsr-id 7.7.7.7
[cust_pe2] interface vlan 410
[cust_pe2-Vlan-interface410] ip address 2.1.1.1 255.0.0.0
[cust_pe2-Vlan-interface410] mpls
[cust_pe2-Vlan-interface410] quit
3) Configure EBGP between provider PE and customer PE.
# Configure prov_pe1 to access the corresponding Customer PE.
[prov_pe1] route-policy comm permit node 10
[prov_pe1-route-policy-comm-10] if-match vpn-target 1:1
[prov_pe1-route-policy-comm-10] quit
[prov_pe1] bgp 100
[prov_pe1-bgp] ipv4-family vpn-instance customer_vpn
[prov_pe1-bgp-af-vpn-instance] group ebgp external
[prov_pe1-bgp-af-vpn-instance] undo peer ebgp enable
[prov_pe1-bgp-af-vpn-instance] peer 1.1.1.1 group ebgp as-number 600
[prov_pe1-bgp] ipv4-family vpnv4
[prov_pe1-bgp-af-vpn] nesting-vpn
[prov_pe1-bgp-af-vpn] peer ebgp vpn-instance customer_vpn enable
[prov_pe1-bgp-af-vpn] peer 1.1.1.1 vpn-instance customer_vpn group ebgp
[prov_pe1-bgp-af-vpn] peer 1.1.1.1 vpn-instance customer_vpn route-policy
comm import
3-75
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
[prov_pe1-bgp-af-vpn] quit
# Configure cust_pe1
[cust_pe1] bgp 600
[cust_pe1-bgp] group ebgp external
[cust_pe1-bgp] undo peer ebgp enable
[cust_pe1-bgp] peer 1.1.1.2 group ebgp as-number 100
[cust_pe1-bgp] ipv4-family vpnv4
[cust_pe1-bgp-af-vpn] peer ebgp enable
[cust_pe1-bgp-af-vpn] peer 1.1.1.2 group ebgp
# Configure cust_pe2
[cust_pe2] bgp 500
[cust_pe2-bgp] group ebgp external
[cust_pe2-bgp] undo peer ebgp enable
[cust_pe2-bgp] peer 2.1.1.2 group ebgp as-number 100
[cust_pe2-bgp] ipv4-family vpnv4
[cust_pe2-bgp-af-vpn] peer ebgp enable
[cust_pe2-bgp-af-vpn] peer 2.1.1.2 group ebgp
4) On each Customer PE, configure the sub-VPN that accesses the network through
the Customer PE.
# Configure cust_pe1.
[cust_pe1] ip vpn-instance vpn1
3-76
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
# Configure cust_pe2
[cust_pe2] ip vpn-instance vpn1
[cust_pe2-vpn-instance] route-distinguisher 1:1
[cust_pe2-vpn-instance] vpn-target 1:1
[cust_pe2] interface vlan 610
[cust_pe2-Vlan-interface610] ip binding vpn-instance vpn1
[cust_pe2-Vlan-interface610] ip address 16.1.1.2 255.0.0.0
[cust_pe2-Vlan-interface510] quit
[cust_pe2] bgp 500
[cust_pe2-bgp] undo peer ebgp enable
[cust_pe2-bgp] ipv4-family vpn-instance vpn1
[cust_pe2-bgp-af-vpn-instance] group cegroup external
[cust_pe2-bgp-af-vpn-instance] peer 16.1.1.1 group cegroup as-number 50002
[cust_pe2-bgp-af-vpn-instance] quit
[cust_pe2-bgp] quit
I. Network requirements
3-77
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
vpn1
VLAN202
ospf 100 VLAN201
10.2.1.2/24
vpn1 10.1.1.2/24
MPLS Network
PE
vpn2
VLAN203 VLAN204
ospf 300
20.1.1.2/24 20.2.1.2/24
vpn2
Multi-VPN-Instance CE
1) Configuring CE router
# Configure instance VPN1
[CE] ip vpn-instance vpn1
[CE-vpn-vpn1] route-distinguisher 100:1
[CE-vpn-vpn1] vpn-target 100:1 export-extcommunity
[CE-vpn-vpn1] vpn-target 100:1 import-extcommunity
# Configure VLAN201.
[CE] vlan 201
[CE-vlan201] port gigabitethernet 2/1/1
[CE-vlan201] quit
[CE] interface Vlan-interface 201
[CE-Vlan-interface201] ip binding vpn-instance vpn1
[CE-Vlan-interface201] ip address 10.1.1.2 255.255.255.0
# Configure VLAN202.
[CE] vlan 202
[CE-vlan202] port gigabitethernet 2/1/2
[CE-vlan202] quit
[CE] interface Vlan-interface 202
[CE-Vlan-interface202] ip binding vpn-instance vpn1
[CE-Vlan-interface202] ip address 10.2.1.2 255.255.255.0
[CE-Vlan-interface202] ospf cost 100
# Configure VLAN203.
3-78
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
# Configure VLAN204.
[CE] vlan 204
[CE-vlan204] port gigabitethernet 2/1/4
[CE-vlan204] quit
[CE] interface Vlan-interface 204
[CE-Vlan-interface204] ip binding vpn-instance vpn2
[CE-Vlan-interface204] ip address 20.2.1.2 255.255.255.0
I. Network requirements
3-79
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
PC1
172.18.0.1/16
AS65410 Ethernet2/1/0
172.18.0.2/16
CE1
Ethernet1/1/0
20.2.1.1/24 AS100
Loopback0: Loopback0:
1.1.1.9/32 2.2.2.9/32
Ethernet3/1/0 Ethernet1/1/0
20.2.1.2/24 Ethernet1/1/0
192.168.1.2/24
192.168.1.1/24 PE2
PE1
Ethernet2/1/0
Ethernet1/1/0 Ethernet2/1/0 20.3.1.2/24 Ethernet1/1/0
20.1.1.1/24 20.1.1.2/24 20.3.1.1/24
CE2
CE3
Ethernet2/1/0 Ethernet2/1/0
AS65420 AS65430
172.16.0.2/16 172.19.0.2/
172.19.0.2/16
PC2 PC3
172.16.0.1/16 172.19.0.1/16
3-80
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
[PE2-LoopBack0] quit
[PE2] vlan 110
[PE2-vlan110] interface vlan-interface 110
[PE1-Vlan-interface110] ip address 192.168.1.2 24
[PE2-Vlan-interface110] quit
[PE2] ospf
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
[PE2-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit
2) Configure basic MPLS capability and create VPN instances.
# Configure basic MPLS capability on PE1:
[PE1] mpls lsr-id 1.1.1.9
[PE1-mpls] lsp-trigger all
[PE1-mpls] quit
[PE1] mpls ldp
[PE1-mpls-ldp] quit
[PE1] vlan 110
[PE1-vlan110] interface vlan-interface 110
[PE1-Vlan-interface110] mpls
[PE1-Vlan-interface110] mpls ldp
[PE1-Vlan-interface110] quit
# Create VPN instances for VPN1 and VPN2 on PE1, bind the address of the interface
of VLAN310 to VPN1 and VPN2.
[PE1] ip vpn-instance vpn1
[PE1-vpn-vpn1] route-distinguisher 100:1
[PE1-vpn-vpn1] vpn-target 100:1 both
[PE1-vpn-vpn1] quit
[PE1] ip vpn-instance vpn2
[PE1-vpn-vpn2] route-distinguisher 100:2
[PE1-vpn-vpn2] vpn-target 100:2 both
[PE1-vpn-vpn2] quit
[PE1] vlan 310
[PE1-vlan310] interface vlan-interface 310
[PE1-Vlan-interface310] ip binding vpn-instance vpn1
[PE1-Vlan-interface310] ip address 20.2.1.2 24
[PE1-Vlan-interface310] quit
[PE1] vlan 210
[PE1-vlan210] interface vlan-interface 210
[PE1-Vlan-interface210] ip binding vpn-instance vpn2
3-81
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
# Create a VPN instance for VPN1 on PE2, and bind the address of the interface of
VLAN210 to VPN1.
[PE2] ip vpn-instance vpn1
[PE2-vpn-vpn1] route-distinguisher 300:1
[PE2-vpn-vpn1] vpn-target 100:1 both
[PE2-vpn-vpn1] quit
[PE2] vlan 210
[PE2-vlan210] interface vlan-interface 210
[PE2-Vlan-interface210] ip binding vpn-instance vpn1
[PE2-Vlan-interface210] ip address 20.3.1.2 24
[PE2-Vlan-interface210] quit
Configure BGP.
# Configure CE1:
[CE1] vlan 310
[CE1-vlan310] interface vlan-interface 310
[CE1-Vlan-interface310] ip address 20.2.1.1 24
[CE1-Vlan-interface310] quit
[CE1] bgp 65410
[CE1-bgp] import-route direct
[CE1-bgp] group 10 external
[CE1-bgp] peer 20.2.1.2 group 10 as-number 100
[CE1-bgp] quit
# Configure CE2:
[CE2] vlan 210
[CE2-vlan210] interface vlan-interface 210
[CE2-Vlan-interface210] ip address 20.1.1.1 24
[CE2-Vlan-interface210] quit
3-82
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
# Configure CE3:
[CE3] vlan 210
[CE3-vlan210] interface vlan-interface 210
[CE3-Vlan-interface210] ip address 20.3.1.1 24
[CE3-Vlan-interface210] quit
[CE3] bgp 65430
[CE3-bgp] import-route direct
[CE3-bgp] group 10 external
[CE3-bgp] peer 20.3.1.2 group 10 as-number 100
[CE3-bgp] quit
# Configure PE2: set up IBGP peer relation with PE1 in BGP-VPNv4 sub-address
family view; set up EBGP peer relation with CE3 in BGP-VPN instance view.
[PE2] bgp 100
[PE2-bgp] group 10
[PE2-bgp] peer 1.1.1.9 group 10
[PE2-bgp] peer 1.1.1.9 connect-interface loopback 0
[PE2-bgp] ipv4-family vpnv4
[PE2-bgp-af-vpn] peer 10 enable
[PE2-bgp-af-vpn] peer 1.1.1.9 group 10
[PE2-bgp-af-vpn] quit
3-83
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
Configure multi-role host feature: If a routing protocol is employed between CE2 and
PE1, configure PE1 not to advertise any route information to CE2 to avoid route loops.
Following depicts a way to achieve this. You can also avoid route loops in other ways.
Directly configure a static route to PC2 on PE1 if no routing protocol is employed
between PE1 and CE2.
# Configure a default route pointing to PE1 on CE2.
[CE2] ip route-static 0.0.0.0 0.0.0.0 20.1.1.2
3.5 Troubleshooting
I. Symptom 1
In central server topology networking mode, the local end switch (spoke PE) cannot
learn the routing information of the peer end switch (spoke PE).
Solution:
z Check whether the BGP adjacent of spoke PE and hub PE is created correctly.
z Check whether the routing attributes import/export relation of each VPN-instance
is correct.
z Check from the hub PE that whether the routing information between two VPN
instances can be learnt by each other. if not, perform the following operation:
check if the EBGP protocol runs between hub PE and hub CE, check whether the
peer peer-address allow-as-loop command is configured between PE and CE.
II. Symptom 2
PE at the local end can learn private network route of the PE at peer end, but two PEs
cannot intercommunicate with each other.
Solution:
z Check whether the loopback interface configured on the PE has the address with
32-bit mask.
3-84
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 3 BGP/MPLS VPN Configuration
III. Symptom 3
In Hub&Spoke networking mode, spoke PE cannot learn the private networking route of
Hub PE.
Solution:
z Check whether the LSP tunnel is established using the display mpls lsp
command.
z Check whether the BGP adjacent is established correctly.
z Check whether the routing import/export relation of the VPN-instance is correct.
z Check whether allow-as-loop is configured between spoke PE and hub PE.
IV. Symptom 4
Fall to specify the Loopback interface at the peer end as the BGP neighbor.
Solution:
z Check whether the local routing table has learnt the Loopback interface routing
information of the peer end using the display ip routing-table command.
z Check whether the address of the Loopback interface at the peer end can be
pinged using the ping command.
z Check whether the configuration information is correct using the display
current-configuration bgp command; confirm that you have specified the local
loopback interface as the interface to create adjacent interface with the peer end
by using the peer peer-address connect-interface command; confirm that you
have activate the neighbor in VPNv4 sub-address family view.
z Check whether the BGP information is correct on the PE at the peer end; check
whether specified the local Loopback interface as the interface to create adjacent
with the peer end; and check whether you have configured VPN capacity.
V. Symptom 5
During ASBR configuration, VPN route interior label does not switch on the ASBR.
Solution:
z Check whether the VPN neighbor is created correctly using the display bgp
vpnv4 all peer command.
z Check whether ASBR is configured with the undo policy vpn-target command. If
not, configure this command.
3-85
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 4 MPLS L2VPN
Note:
L2VPN mentioned in the following section refers to the L2VPN implemented through
virtual leased line (VLL).
MPLS L2VPN provides MPLS network-based Layer 2 VPN services. For users, an
MPLS L2VPN is a Layer 2 switched network, through which Layer 2 connections can
be established between network nodes.
CE
VPN A
VPN A PE VC
CE
PE
VC LSP
P
P
PE
VPN B
CE
CE
VPN B
4-1
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 4 MPLS L2VPN
Tunnel label
label VC label
label
Label Stack
Stack L2 PDU
PDU
In an MPLS L2VPN, CE, PE, and P operate in the same way as those in a BGP/MPLS
VPN. That is, they also forward packets in an MPLS network transparently by using
label stacks. To forward packets in an MPLS L2VPN, tunnels must be established first
between PEs (this can be achieved by either manual configuration or signaling
protocols). When the interfaces connecting PEs and CEs are up, PEs insert VC labels
for packets sent by CE, and then mark them with tunnel labels. On receiving these
packets, the remote PEs strip off the tunnel labels and send the packets to the
corresponding CEs according to their VC labels.
Table 4-3 illustrates changes of the label stack of a packet during the forwarding.
4-2
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 4 MPLS L2VPN
4.1.3 Implementation
At present, the official standard for MPLS L2VPN has not been established yet.
However, the PPVPN (Provider-provisioned Virtual Private Network) group of IETF
(Internet Engineering Task Force) defines multiple framework drafts, two of which are
commonly used. They are known as Martini draft and Kompella draft. Till May, 2005,
they are depicted in the following documents respectively:
draft-martini-l2circuit-trans-mpls-09.txt
draft-kompella-ppvpn-l2vpn-02.txt
Martini draft defines the way to implement MPLS L2VPN by establishing point-to-point
links. Here, LDP (Label Distribution Protocol) is used as the signaling protocol to
exchange VC labels. This kind of MPLS L2VPNs is known as Martini MPLS L2VPNs.
Kompella draft defines how to establish MPLS L2VPNs in MPLS networks through
end-to-end (CE-to-CE) connections. At present, BGP (border gateway protocol) is used
as the signaling protocol to propagate the information about Layer 2 reachability and
VC labels. This kind of MPLS L2VPNs is known as Kompella MPLS L2VPN.
Also, you can establish MPLS L2VPNs without signaling protocols. In this case, MPLS
L2VPN services are provided through statically configured VC labels. An example of
this is CCC, which implement MPLS L2VPNs through static configuration.
Table 4-1 describes the features and implementation ways of the above three types of
MPLS L2VPNs.
4-3
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 4 MPLS L2VPN
Table 4-1 Features and implementation ways of the three types of MPLS L2VPNs
4-4
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 4 MPLS L2VPN
Note:
You also can configure LSPs without P devices.
Configuration
Command Description
step
Enter system view system-view —
Configure LASR ID mpls lsr-id X.X.X.X Required
Enable MPLS mpls Required
static-lsp egress
lsp-name l2vpn
Create the egress
incoming-interface
for the static LSP
vlan-interface vlan-id
in-label in-label Required. Before configuring a
CCC connection, you need to
static-lsp ingress
configure two static LSPs
Create the ingress lsp-name l2vpn nexthop
between the two PEs and all P
for the static LSP next-hop-addr out-label
routers in between for
out-label
bidirectional packets. Refer to
static-lsp transit corresponding sections in the
lsp-name l2vpn command manual for more
incoming-interface information about these
vlan-interface vlan-id commands and corresponding
Create the transit undo commands.
in-label in-label
for the static LSP
{ nexthop next-hop-addr
| outgoing-interface
vlan-interface vlan-id }
out-label out-label
Quit MPLS view
and enter system quit —
view
Enable MPLS
mpls l2vpn Required
L2VPN
4-5
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 4 MPLS L2VPN
Configuration
Command Description
step
Caution:
z In L2VPN, you can configure only one virtual circuit for each VLAN interface.
z L2VPN supports VLAN interfaces only. When you configure an L2VPN on a VLAN
interface, data is encapsulated as Ethernet packets by default.
z You must use cards with the suffix CA (such as LSB2FT48CA) for the access sides
of CCC public/private network.
z You can configure only one VLAN on the access side of each VPN private network.
Each VLAN can have only one interface, and all the VLANs connecting to the
interface must have IGMP disabled.
z You must configure two static LSPs for each remote CCC connection. Two CCC
connections cannot share one static LSP.
z A static LSP used by a remote CCC connection cannot be used for other purposes
(such as carrying IP packets and BGP/MPLS VPN packets). When you configure a
static LSP for a CCC connection, the next hop must be the IP address from which
the ARP packets are learnt.
I. Network requirements
CEs and the corresponding PEs shown in Figure 4-4 are interconnected through their
GigabitEthernet ports. Data is encapsulated as Ethernet packets at the data link layer. A
local connection is required between CE-A and CE-B, and a remote connection
between CE-A and CE-C.
4-6
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 4 MPLS L2VPN
CE B
Local connection
VLAN213
VLAN211 VLAN211
VLAN211 VLAN212
VLAN212 VLAN214
CE A P A
PE VLAN212
P PE B CE C
Remote connection
1) Configure PE-A.
# Enable MPLS globally.
[Quidway] mpls lsr-id 1.1.1.1
[Quidway] mpls
4-7
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 4 MPLS L2VPN
# Configure a static LSP, with the out-label of 100 and the egress interface being the
interface of VLAN 214.
[Quidway] mpls
[Quidway-mpls] static-lsp ingress PEA-PEB l2vpn nexthop 5.5.5.2 out-label 100
# Configure a static LSP, with the in-label of 211 and the ingress interface being the
interface of VLAN 214.
[Quidway-mpls] static-lsp egress PEB-PEA l2vpn incoming-interface
vlan-interface 214 in-label 211
# Configure a static LSP, with the out-label of 200 and the egress interface being the
interface of VLAN 212.
[Quidway-mpls] static-lsp ingress nexthop 6.6.6.2 out-label 200
4-8
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 4 MPLS L2VPN
# Configure a static LSP, with the in-label of 101 and the ingress interface being the
interface of VLAN 212.
[Quidway-mpls] static-lsp egress PEA-PEB l2vpn incoming-interface
vlan-interface 212 in-label 101
# Configure a static LSP, with the in-label of 100, the ingress interface being the
interface of VLAN 211, the out-label of 101, and the egress interface being the interface
of VLAN 212.
[Quidway-mpls] static-lsp transit PEA-PEB l2vpn incoming-interface
vlan-interface 211 in-label 100 nexthop 6.6.6.1 vlan-interface 212 out-label
101
# Configure a static LSP, with the in-label of 200, the ingress interface being the
interface of VLAN 212, the out-label of 211, and the egress interface being the interface
of VLAN 211.
[Quidway-mpls] static-lsp transit PEB-PEA l2vpn incoming-interface
vlan-interface 212 in-label 200 nexthop 5.5.5.1 out-label 211
4-9
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 4 MPLS L2VPN
Caution:
Configuration
Command Description
step
Enter system view system-view —
Configure the LSR
mpls lsr-id X.X.X.X Required
ID
Enable MPLS mpls Required
4-10
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 4 MPLS L2VPN
Configuration
Command Description
step
Required. To configure a
Martini MPLS L2VPN on a
Create a Martini PE, you need to provide the
MPLS L2VPN IP address (Lsr-id) of the
virtual connection mpls l2vc ip-address vc-id peer PE and specify the VC
in VLAN interface ID. The combination of the
view VC ID and the encapsulation
type must be unique on the
PE.
Quit to system view quit —
Caution:
z You must use cards with the suffix CA (such as LSB2FT48CA) on the public/private
network access sides when configuring Martini MPLS L2VPN.
z You can configure only one VLAN on the access side of each VPN private network.
Each VLAN can have only one interface. And all the VLANs connecting to the
interface must have IGMP disabled.
z L2VPN supports VLAN interfaces only. When you configure an L2VPN on a VLAN
interface, data is encapsulated as Ethernet packets by default.
I. Network requirements
CEs shown in Figure 4-5 are in the same VLAN as the corresponding PEs resides in. A
remote connection is required between CE-A and CE-B.
VLAN211
VLAN211 VLAN212
1) Configure PE-A.
# Configure the LSR ID. Enable MPLS, LDP, and MPLS L2VPN.
[Quidway-A] mpls lsr-id 192.1.1.1
[Quidway-A] mpls
4-11
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 4 MPLS L2VPN
[Quidway-A-mpls] quit
[Quidway-A] mpls ldp
[Quidway-A] mpls l2vpn
# Configure an IP address for the Loopback interface, which is used as the Router ID.
[Quidway-A] interface loopback 0
[Quidway-A-LoopBack0] ip address 192.1.1.1 255.255.255.255
# Enable OSPF.
[Quidway-A] ospf 1
[Quidway-A-ospf-1] area 0.0.0.0
[Quidway-A-ospf-1-area-0.0.0.0] network 192.1.1.1 0.0.0.0
[Quidway-A-ospf-1-area-0.0.0.0] network 168.1.1.1 0.0.255.255
4-12
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 4 MPLS L2VPN
# Configure an IP address for the Loopback interface, which is used as the LSR ID.
[Quidway-B] interface loopback 0
[Quidway-B-LoopBack0] ip address 192.1.1.2 255.255.255.255
# Enable OSPF.
[Quidway-B] ospf 1
[Quidway-B-ospf-1] area 0.0.0.0
[Quidway-B-ospf-1-area-0.0.0.0] network 192.1.1.2 0.0.0.0
[Quidway-B-ospf-1-area-0.0.0.0] network 169.1.0.0 0.0.255.255
[Quidway-B-ospf-1-area-0.0.0.0] network 192.2.0.0 0.0.0.255
4-13
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 4 MPLS L2VPN
# Configure an IP address for the Loopback interface, which is used as the LSR ID.
[Quidway-P] interface loopback 0
[Quidway-P-LoopBack0] ip address 192.1.1.3 255.255.255.255
[Quidway-P-LoopBack0] quit
# Enable OSPF.
[Quidway-P] ospf 1
[Quidway-P-ospf-1] area 0.0.0.0
[Quidway-P-ospf-1-area-0.0.0.0] network 168.1.0.0 0.0.255.255
[Quidway-P-ospf-1-area-0.0.0.0] network 169.1.0.0 0.0.255.255
[Quidway-P-ospf-1-area-0.0.0.0] network 192.1.1.3 0.0.0.0
Caution:
4-14
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 4 MPLS L2VPN
4-15
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 4 MPLS L2VPN
vpn-target
vpn-target-ext-communit
Configure the
y
VPN-target of the Required
[ import-extcommunity
MPLS L2VPN
| export-extcommunity
| both ]
Configure the Layer
Optional. The same MTU value
2 MTU (maximum
mtu mtu must be configured for all PEs in
transmission unit) of
the same VPN.
the VPN
Create a CE or Required. Each CE created on a
ce name id id [ range
modify the CE PE needs to uniquely
range ] [ default-offset
Range of an existing correspond to one actual CE
offset ]
CE device connected to the PE. You
need to specify a unique ID for
these CEs. You can also specify
Enter an existing CE ce name the CE Range. It is desired that
the CE ID begins with 1 and
increases in step of 1.
4-16
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 4 MPLS L2VPN
Caution:
z You can only change the CE range to a number larger than the existing one. For
example, you can change a CE range from 10 to 20, rather than from 10 to 5. The
only way to change a CE range to a smaller number is to remove the CE and create
a new one.
z You must use cards with suffix CA (such as LSB2FT48CA) on the public/private
network access side when configuring Kompella MPLS L2VPN.
z You can configure only one VLAN on the access side of each VPN private network.
Each VLAN can have only one interface. And all the VLANs connecting to the
interface must have IGMP disabled.
z In Kompella MPLS L2VPN, the encapsulation type on the access side of each
private network can be Ethernet access and VLAN access. Ethernet access is the
default type. If you configure the encapsulation type as Ethernet access, the port
link type in a private network VLAN is Access type; if you configure the
encapsulation type as VLAN access, the port link type in a private network VLAN is
Trunk type. It is not recommended to use Hybrid type as the port link type in a
private network VLAN. The user access modes of the instance in all the peer PEs
must be consistent.
I. Network requirements
CEs shown in Figure 4-6 are in the same VLAN as the corresponding PEs resides in. A
remote connection is required between CE-A and CE-B.
4-17
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 4 MPLS L2VPN
VLAN211
VLAN211 VLAN212
1) Configure PE-A.
# Enable MPLS globally.
[Quidway] mpls lsr-id 1.1.1.1
[Quidway] mpls
4-18
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 4 MPLS L2VPN
# Configure BGP.
[Quidway] bgp 100
[Quidway-bgp] group 100 internal
[Quidway-bgp] peer 100 connect-interface loopback0
[Quidway-bgp] peer 3.3.3.3 group 100
[Quidway-bgp] l2vpn-family
[Quidway-bgp-af-l2vpn] peer 100 enable
# Enable OSPF.
[Quidway] ospf 1 router-id 1.1.1.1
[Quidway-ospf-1] area 0.0.0.0
[Quidway-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[Quidway-ospf-1-area-0.0.0.0] network 5.5.5.0 0.0.0.255
2) Configure PE-B.
# Enable MPLS globally.
[Quidway] mpls lsr-id 3.3.3.3
[Quidway] mpls
4-19
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 4 MPLS L2VPN
[Quidway-vlan211] quit
# Configure BGP.
[Quidway] bgp 100
[Quidway-bgp] group 100 internal
[Quidway-bgp] peer 100 connect-interface loopback0
[Quidway-bgp] peer 1.1.1.1 group 100
[Quidway-bgp] l2vpn-family
[Quidway-bgp-af-l2vpn] peer 100 enable
4-20
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 4 MPLS L2VPN
# Enable OSPF.
[Quidway] ospf 1 router-id 3.3.3.3
[Quidway -ospf-1] area 0.0.0.0
[Quidway -ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[Quidway -ospf-1-area-0.0.0.0] network 6.6.6.0 0.0.0.255
3) Configure the P device.
The configuration of P device is the same as that of standard MPLS configuration.
Refer to the P router Configuration of BGP/MPLS VPN in Basic MPLS Operation
Manual.
Configuration
Command Description
step
Display information
display ccc [ ccc-name |
about a CCC MPLS
type [ local | remote ] ]
L2VPN connection
Display information
display mpls l2vc
about a Martini
[ interface vlan-interface
MPLS L2VPN
vlan-id | verbose ]
connection
4-21
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 4 MPLS L2VPN
Configuration
Command Description
step
debugging mpls l2vpn { all
| advertisement | error |
Enable debugging Execute this command in
event | connections
for MPLS L2VPN user view.
[ interface vlan-interface
vlan-id ] }
4-22
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 4 MPLS L2VPN
z Make sure the in-label and out-label configured on the both ends correspond to
each other. If a P device exists, make sure its forwarding connection configuration
is correct, and the next hop configured statically is configured.
4-23
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 5 Card Intermixing for MPLS Support
5.1 Overview
5.1.1 Introduction to Card Intermixing
For S8500 series routing switches, only the interface cards with suffixes C, CA and CB
and VPLS service processor cards support MPLS function. If you want to enable MPLS
VPN function of S8500 switches, you need MPLS-supporting interface cards or VPLS
service processor cards. The intermixing feature is used to enable deployment of
MPLS VPN services on cards that do not support MPLS. S8500 routing switches
support various modes of MPLS VPN function and provide abundant and differentiated
MPLS VPN service to meet the differentiated needs of different users in the
performance, reliability, port utilization of MPLS VPN functions.
Note:
z Unless otherwise specified, MPLS VPN services are processed by the
MPLS-supporting interface cards. In this manual, an interface card that supports
MPLS function is called MPLS card for short, and an interface card that does not
support MPLS function is called non-MPLS card for short.
z The purpose of card intermixing is to enable the non-MPLS cards to support MPLS
function through the MPLS cards. Refer to the “NAT&URPF&VPLS” section in this
manual for the information on the processing of MPLS VPN through VPLS service
processor cards.
5-1
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 5 Card Intermixing for MPLS Support
The port on the MPLS card can also be used for the access to the service private
network side of the MPLS VPN. In this case, you do not need to configure card
intermixing, and you must use the port of the MPLS card for the connection with the
MPLS public network side.
Note:
Because the destination port in intermixing configuration is to be looped back and
therefore is locked automatically, you cannot enter the port view. Therefore, you cannot
perform other configurations on the destination port.
z A non-MPLS card can be used for access to the private network side, and an
MPLS card must be used for access to the public network side;
z You cannot perform other configurations on the destination port in intermixed
networking, that is to say, the port view is unavailable. In addition, the destination
port in intermixing networking cannot be deleted from the VLAN in the normal way,
and the destination port is an inloop port;
z The configured connection status of the source port in intermixing networking is
protected. For example, the port type cannot be changed form Trunk to Access or
from Access to Trunk, and the source port cannot be deleted from VLAN in the
normal way;
z The configuration of the service ports in intermixing networking cannot be
changed, and the service ports can be reconfigured only after the intermixing
configuration is removed;
z In a VLAN, multiple ports of the non-MPLS card can be redirected to one port of
the MPLS card. The destination port of the MPLS card is Looped back
automatically (becomes a Loopback port) after it is configured for redirection, and
you cannot perform other configurations on the port. Therefore, make sure that the
destination port is not in manual Shutdown state before configuring redirection.
Only one Loopback port is allowed in the redirected VLAN that the destination port
belongs to, but other MPLS card ports are allowed to join in;
z On the Trunk port of a non-MPLS card, you can redirect the MPLS VPNs of
multiple VLANs to one destination port to meet the need when the access CE is a
Layer 2 switch;
z In non-intermixing networking, VLL application requires that VLANs with only one
port be used at the private network side; In intermixing networking, VLL supports
5-2
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 5 Card Intermixing for MPLS Support
only VLANs with two ports: one is the source port (port of the non-MPLS card) and
the other is the destination port (port of the MPLS card);
z When the source port (Trunk port) in intermixing networking belongs to multiple
VLANs, VPN binding must be implemented on the VLAN interfaces after the
redirection configuration;
z If VRRP is configured on the VLAN interface to which the redirected source port of
the MPLS VPN belongs, the plugging/unplugging of the MPLS card will cause
VRRP group state switching on the VLAN interface.
z Source port aggregation and destination port aggregation are not supported;
z Nested VPN is not supported;
z Super VLAN is not supported;
z It is not allowed to change the attributes of the redirected source port;
z It is not allowed to make the redirected source port or destination port to leave
redirected VLAN in the normal way;
z It is not allowed to configure protocol VLANs on the redirected source port or
destination port;
z It is not allowed to delete the redirected VLAN or VLAN interface;
z It is not allowed to configure/add Loopback ports in the redirected VLAN;
z It is not allowed to use STP edge port as the redirected destination port;
z It is not allowed to change the VLANs and the default VLAN ID which the
redirected destination port is permitted to pass;
z If normal ports are used, 4,094 VLL VPNs are supported; if the Trunk port of the
card of a fast Ethernet card is used, a maximum of 1024 VLL VPNs are supported;
z Only cards with suffix CA can be used at the public network side for VLL
configuration;
z Redirection configuration for MPLS VPN intermixing is not supported on the POS
and RPR ports, and the POS port cannot be used as the destination port for MPLS
VPN redirection;
A Trunk-type 100M Ethernet port can use only 1024 VLANs for VPN access or MPLS
forwarding, but you can specify the start VLAN ID of the 100M Ethernet Trunk port.
Assume the start VLAN ID is VLAN ID, the range of VLAN IDs of the VLANs that pass a
certain 100M Ethernet port is from VLAN ID to VLAN ID + 1023.
5-3
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 5 Card Intermixing for MPLS Support
The Switch should be configured with some basic routing configurations so that it can
exchange public network routing information with other P devices and PE devices. The
routing protocols available currently include: static routing, RIP, OSPF, BGP and so on.
Refer to the “Routing Protocols” part of the Quidway S8500 Routing Switches
Operation Manual Volume I for detailed configuration information.
Configure MPLS basic capability to enable MPLS and LDP globally and on the public
network interface, to establish an LSP tunnel for the public network. Refer to Chapter 2
MPLS Basic Capability Configuration for detailed configuration information.
The packets to be redirected are identified through the flow template and ACL
configurations.
5-4
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 5 Card Intermixing for MPLS Support
I. For L2VPN
5-5
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 5 Card Intermixing for MPLS Support
You can define the flow template by means of the IP + VLAN + DMAC method to make
sure that different kinds of packets are processed in different ways:
z If ARP packets do not match IP rules in redirection, they will be processed on the
non-MPLS card;
z If Layer 2 traffic does not match DMAC in redirection, it will be L2-forwarded on the
non-MPLS card;
z If Layer 3 packets (including unicast protocol packets) match the rule, they will be
redirected to the MPLS card.
Refer to section “QACL” and the following networking example in the manual for
detailed information on configuring flow template and ACL rules.
The traffic-redirect command is used to enable ACL flow classification and redirect
the packets (only applicable to the rules whose action is permit in the ACL). There are
two kinds of redirection commands:
5-6
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 5 Card Intermixing for MPLS Support
z Redirect packets to a port: You can redirect packets received by the source port of
the non-MPLS card to the specified destination port of the MPLS card.
z Redirect packets to a service processor card: You can redirect packets received by
the source port of the non-MPLS card or MPLS card to the VPLS card.
There are two kinds of redirection services:
z VPLS-related redirection services: The key word join-vlan must be specified, and
the system will add the current port into destination-vlan after the redirection
enabled; when redirection is disabled, the system will log the current port out of the
VLAN if what is deleted is a join-vlan enabled redirection in the VLAN.
z MPLS-independent redirection services: Such redirection services include NAT,
URPT, reflexive ACL, BT traffic control and so on. join-vlan cannot be enabled in
such a service. The port will not be added into VLAN when redirection is
configured, and the port will not be removed from the VLAN when redirection is
deleted.
Note:
z The source port joins in the corresponding VLAN automatically after the
configuration of intermixing redirection, and the source port leaves the
corresponding VLAN automatically after the intermixing redirection is deleted.
z When using the VPLS intermixing redirection command, you have to enable
join-vlan explicitly.
z When using the VLL VPN intermixing redirection command, you must not enable
the QinQ function on the source port and destination port.
I. Network requirements
z CE1 and CE3 constitute VPN A, and CE2 and CE4 constitute VPN B. In PE1, a
port of an interface card with suffix C is shared, and in PE2, a Layer 2 switch is
shared to connect with the host directly.
z The PE devices (PE1 and PE2) are S8500 series switches, and the PE devices
need to support the MPLS function. CE1 and CE2 are common mid-range and
low-end routers. CE3 and CE4 are Layer 2 switches connected with users directly.
z The configurations of the interface cards of the two PE devices are the same. On
slot3 is a non-MPLS card with 100M Ethernet ports, and on Slot 2 is an MPLS card
with Gigabit Ethernet ports.
5-7
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 5 Card Intermixing for MPLS Support
MPLSNetwork
MPLS Netw ork vlan 10
loopback0 1.1.1.1/32
VLAN 211 Loopback0 1.1.1.1/32 loopback02.2.2.2/32
Loopback0 2.2.2.2/32 CE3
CE3
vlan 10
VLAN 10 VLAN 10
CE1
CE1 P VLAN
vlan 200300
1) Configure CE1
# Configure CE1 and CE2 as EBGP neighbors and import direct routes and static
routes So that the VPN user routes of CE1 are imported into BGP routes and then
advertised to PE1.
<CE1>system-view
[CE1] vlan 211
[CE1] interface vlan-interface 211
[CE1-vlan-interface211] ip address 10.10.10.10 255.255.255.0
[CE1-vlan-interface211] quit
[CE1] bgp 65410
[CE1-bgp] group vpna external
[CE1-bgp] peer 10.10.10.1 group vpna as-number 100
[CE1-bgp] import-route direct
[CE1-bgp] import-route static
Note:
The configuration on CE2 is similar to that on CE1, so the configuration procedure is
omitted.
2) Configure PE1
# Configure global MPLS.
[PE1] mpls lsr-id 1.1.1.1
[PE1] mpls
[PE1] mpls ldp
5-8
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 5 Card Intermixing for MPLS Support
# Enable OSPF on the interface connecting PE1 and P router and the Loopback
interface.
[PE1] ospf 1 route-id 1.1.1.1
[PE1-ospf-1] area 0
[PE1-ospf-1-area-0.0.0.0] network 196.168.1.0 0.0.0.255
[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
# Configure ACL and redirection, and configure a basic IP ACL to permit all the IP
packets in CE devices to be redirected.
[PE1] flow-template user-defined slot 3 dmac 0000-0000-0000 sip 0.0.0.0
vlan-id
[PE1] acl number 2000
[PE1-acl-basic-2000] rule 0 permit source any
[PE1-acl-basic-2000] quit
[PE1] acl number 4000
[PE1-acl-link-4000]rule 0 permit ingress 10 egress 00e0-fc99-6738
0000-0000-0000
[PE1-acl-link-4000] quit
5-9
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 5 Card Intermixing for MPLS Support
Caution:
If the VRRP protocol is enabled on the VLAN port to which the source port of MPLS
VPN redirection belongs, you must configure another ACL rule to redirect the packets
whose destination address is the virtual MAC address of VRRP, so that ICMP packets
whose destination address is the virtual MAC address of VRRP can be processed
normally.
# Establish EBGP neighbor relationship between PE1 and CE1 and import the interface
routes of VPN-instance.
[PE1] bgp 100
[PE1-bgp] ipv4-family vpn-instance vpna
[PE1-bgp-af-vpn-instance] group vpna external
[PE1-bgp-af-vpn-instance] peer 10.10.10.10 group vpna as-number 65410
[PE1-bgp-af-vpn-instance] import-route direct
[PE1-bgp-af-vpn-instance] quit
[PE1-bgp] quit
5-10
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 5 Card Intermixing for MPLS Support
# Configure OSPF.
[P] ospf 1 route-id 3.3.3.3
[P-ospf-1] area 0
[P-ospf-1-area-0.0.0.0] network 196.168.1.0 0.0.0.255
[P-ospf-1-area-0.0.0.0] network 196.168.2.0 0.0.0.255
[P-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
4) Configure PE2
# Configure global MPLS.
[PE2] mpls lsr-id 2.2.2.2
[PE2] mpls
[PE2] mpls ldp
5-11
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 5 Card Intermixing for MPLS Support
# Enable OSPF on the interface connecting PE2 with P router and the Loopback
interface.
[PE2] ospf 1 route-id 2.2.2.2
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 196.168.1.0 0.0.0.255
[PE2-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[PE1-ospf-1-area-0.0.0.0] quit
# Configure ACL, redirection and Layer 2 ACL (Custom flow template should be
configured before this step).
[PE2] acl number 2000
[PE2-acl-basic-2000] rule 0 permit source any
[PE2-acl-basic-2000] quit
[PE2] flow-template user-defined slot 3 dmac 0000-0000-0000 sip 0.0.0.0
vlan-id
[PE2] acl number 4000
[PE2-acl-link-4000] rule 0 permit ingress 10 egress 00e0-fc99-6738
0000-0000-0000
[PE2-acl-link-4000] quit
5-12
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 5 Card Intermixing for MPLS Support
# Import the interface routes of private network between PE2 and CE 3 for VPNA.
[PE2] bgp 100
[PE2-bgp] ipv4-family vpn-instance vpna
[PE2-bgp-af-vpn-instance] import-route direct
[PE2-bgp-af-vpn-instance] quit
[PE2-bgp] quit
Note:
The configuration of L2 VPN VLL intermixing is similar to that of L3VPN intermixing, so
the description of configuration process is omitted. The configuration of L2 VPN VLL
intermixing is also implemented through the traffic-redirect command. You do not
need to customize the flow template needed for VLL redirection and you can use the
default flow template. In addition, the flow template only needs to match Layer 2 ACL of
4000 series and only the VLAN ID needs to be specified in ACL rules.
5-13
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 5 Card Intermixing for MPLS Support
Note:
MPLS cards with suffix CA support VLL and BGP/MPLS VPN, and common MPLS
cards (with suffix C0) do not support VLL.
I. Introduction to networking
I. Introduction to networking
MPLS cards support MPLS VPN (VLL and BGP/MPLS VPN), and VLL and BGP/MPLS
VPN can be configured on MPLS cards at the same time.
I. Introduction to networking
This networking mode does not exist. Other service cards are needed to forward data.
None.
I. Introduction to networking
The deployment of MPLS VPN (VLL and BGP/MPLS VPN) services can be
implemented on non-MPLS cards through card intermixing configuration.
z VLL and BGP/MPLS VPN are mutually exclusive, so it is not allowed to configure
the two types of services on the same VLAN interface;
5-14
Operation Manual Volume II – MPLS
Quidway S8500 Series Routing Switches Chapter 5 Card Intermixing for MPLS Support
z In card intermixing networking, non-MPLS cards can only be used for access at
the private network side, and MPLS card must be used for access at the public
network side.
z MPLS card has influence on the forwarding performance of a switch.
I. Introduction to networking
The combination of multiple MPLS cards and multiple non-MPLS cards is similar to
“Combination of one MPLS card and multiple non-MPLS cards” in Section 5.4.4;
however, MPLS VPN services can be processed on the MPLS cards directly, without
the need of card intermixing configuration.
It is not allowed to bind VLL and BGP/MPLS VPN to the same VLAN.
I. Introduction to networking
A VPLS card supports VPLS. However, a VPLS card does not have egress interfaces,
so another interface card must be used data forwarding.
I. Introduction to networking
VPLS cards can work with any type of interface cards to support VPLS.
5.4.8 Combination of One VPLS card, One MPLS Card and Multiple
non-MPLS Cards
I. Introduction to networking
Assume only non-MPLS cards were used at the beginning, and then one MPLS card
was added to support MPLS VPN services (VLL and BGP/MPLS VPN) through card
intermixing configuration. Then one VPLS card was added to process VPLS services.
The MPLS card is used to process MPLS VPN services. It is recommended to use
non-MPLS cards for the access of MPLS services at the private network side.
5-15