Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Revision: [01]
Presenter
• Nurul Islam Roman
– Training Manager, APNIC
• Jessica Wei
– Training Officer, APNIC
1
1/23/17
Acknowledgement
• Cisco Systems
Course Outline
• MPLS L3 VPN Models
• L3 VPN Terminologies
• MPLS VPN Operation
– Control Panel
– Data Plane
– Forwarding function
• Function of RD and RT
• Configuration Examples
• MPLS L3 VPN Service Deployment
– Multi-homed VPN Sites
– Hub and Spoke
– Extranet VPN
– Internet Access Services
2
1/23/17
MPLS L3VPN
Principle
3
1/23/17
P P
CE CE
VPNA PE PE VPNB
MPLS Network
VPNB
P P
CE VPNA
CE
4
1/23/17
• A VRF defines the VPN membership of a customer site attached to a PE
device.
• VRF associated with one or more customer interfaces
CE
VPNA VRF A
PE
CE MPLS Backbone
VPNB
VRF B
10
5
1/23/17
11
VPNA
VRF A 100:1:10.1.1.0
VRF B 200:1:10.1.1.0
10.1.1.0/24 CE
VRF A
RD: 100:1
PE
MPLS Backbone
VPNB VRF B
CE
10.1.1.0/24 RD: 200:1
12
6
1/23/17
Type 0 100:1
Example:
Type 1 192.168.1.1:1
13
MP-iBGP update:
200:1:10.1.1.0/24
VRF B:
Ex RT: 200:1, 300:1
CE CE
VPNA VPNB
MPLS Network
VPNB
10.1.1.0/24 CE PE1 PE2 VPNA
CE
14
7
1/23/17
Im RT: 100:10
Site Hub Site Im RT: 100:11
Ex RT: 100:10 Ex RT: 100:12
15
VPN Label
VRF B:
200:1:10.1.1.0/24
200:1:10.1.1.0/24 RT: 200:1, 300:1
RT: 200:1, 300:1 Out Label: 100
Local Label: 100
CE MP-iBGP CE
VPNA VPNB
VPNB
CE PE1 PE2 VPNA
MPLS Network
10.1.1.0/24 CE
16
8
1/23/17
10.1.1.0/24 CE1
2 P P
CE2
10.1.1.0/24
Next-Hop=CE-1
P P
1 PE1 PE2
MPLS Backbone
17
10.1.1.0/24 CE1 5
2 P P 4
CE2
10.1.1.0/24
Next-Hop=CE-1
P P
1 PE1 PE2
MPLS Backbone
4. PE2 receives and checks whether the RT=200:1 is locally configured as import RT
within any VRF, if yes, then
– PE2 translates VPNv4 prefix back to IPv4 prefix
– Updates the VRF CEF table for 10.1.1.0/24 with label=100
18
9
1/23/17
Local Out Out Local Out Out Local Out Out Local Out Out
Prefix Prefix Prefix Prefix
Label Interface Label Label Interface Label Label Interface Label Label Interface Label
Pop- Pop-
1.1.1.1/32 - - 50 1.1.1.1/32 Eth0/1 25 1.1.1.1/32 Eth0/0 50 - 1.1.1.1/32 Eth0/1 25
Label Label
L0:1.1.1.1/32 LDP
PE2
P1 P2
MPLS Backbone
• LDP runs on the MPLS backbone network to build the public LSP. The
tunnel label is also called transport label or public label.
• Local label mapping are sent to connected nodes. Receiving nodes
update forwarding table.
19
Data Plane
Site 1 Site 2
CE1
10.1.1.0/24 CE2
P3 P4
PE1 PE2
10.1.1.1 10.1.1.1 IP Packet
100 10.1.1.1 P1 P2
IP Packet
• PE2 imposes two labels for each IP packet going to site2
– Tunnel label is learned via LDP;; corresponds to PE1 address
– VPN label is learned via BGP;; corresponds to the VPN address
20
10
1/23/17
Configuration Example
• Task: Configure MPLS L3VPN on Cisco IOS (Version 15.2) to
make the following CEs communication with each other.
• Prerequisite configuration:
– 1. IP address configuration on PE & P routers
– 2. IGP configuration on PE & P routers
• Make sure all the routers in public network can reach each other.
21
ip cef
mpls ldp router-id loopback 0
interface ethernet1/0
mpls ip
mpls label protocol ldp
interface ethernet1/1
mpls ip
mpls label protocol ldp
22
11
1/23/17
Configure VRF
• Configuration steps:
– 2. Configure VRF instance on PE routers
vrf definition VPNA
rd 100:10
route-target export 100:10
route-target import 100:10
!
address-family ipv4
exit-address-family
!
23
Configure MP-iBGP
• Configuration steps:
– 3. Enable MP-iBGP neighbors in vpnv4 address-family on PE routers
router bgp 100
neighbor 4.4.4.4 remote-as 100
neighbor 4.4.4.4 update-source loopback 0
!
address-family vpnv4
neighbor 4.4.4.4 activate
neighbor 4.4.4.4 send-community both
exit-address-family
!
24
12
1/23/17
26
13
1/23/17
27
Configuration Example
• Task: Configure MPLS L3VPN on Juniper Junos (Version 12.1)
to make the following CEs communication with each other.
• Prerequisite configuration:
– 1. IP address configuration on PE & P routers
– 2. IGP configuration on PE & P routers
• Make sure all the routers in public network can reach each other.
VPNA VPNA
MPLS Network
28
14
1/23/17
protocols {
mpls {
interface em0.0;
}
ldp {
interface em0.0;
}}
29
Configure VRF
• Configuration steps:
– 2. Configure VRF instance on PE routers.
routing-instances {
VPNA {
VPN instance and
instance-type vrf;
parameters,
interface em1.0; Interface em1.0 has
route-distinguisher 100:10; been added in the VPNA
vrf-target target:100:10;
}
}
em1 {
unit 0 { This is the interface
family inet { configuration from PE to
address 10.0.1.2/30; CE, as a normal
} interface
}
}
30
15
1/23/17
Configure MP-iBGP
• Configuration steps:
– 3. Enable MP-iBGP neighbors in vpnv4 address-family on PE routers
routing-options {
router-id 1.1.1.1;
autonomous-system 100;
}
protocols {
bgp {
local-address 1.1.1.1;
family inet-vpn {
unicast;
}
group PE1-PE2 {
type internal;
neighbor 4.4.4.4;
} }
31
routing-instances {
VPNA {
instance-type vrf;
interface em1.0;
route-distinguisher 100:10;
vrf-target target:100:10;
protocols {
bgp {
group PE1-CE1 {
type external;
peer-as 65001;
neighbor 10.0.1.1;
}}}}}
32
16
1/23/17
33
policy-options {
policy-statement ADVERTISE-PREFIX {
from {
route-filter 100.1.1.0/24 exact;
}
Define the route policy
then accept;
}}
protocols {
bgp { Apply the policy in eBGP
group CE1-PE1 { neighbor, only advertise
export ADVERTISE-PREFIX; 100.1.1.0/24
}}}
34
17
1/23/17
35
......(Omitted)
36
18
1/23/17
37
Configuration Example
• Task: Configure MPLS L3VPN on Huawei VRP (Version 5.1) to
make the following CEs communication with each other.
• Prerequisite configuration:
– 1. IP address configuration on PE & P routers
– 2. IGP configuration on PE & P routers
• Make sure all the routers in public network can reach each other.
VPNA VPNA
MPLS Network
38
19
1/23/17
39
Configure VRF
• Configuration steps:
– 2. Configure VRF instance on PE routers
[PE1] ip vpn-instance VPNA
[PE1-vpn-instance-VPNA] ipv4-family
[PE1-vpn-instance-VPNA-af-ipv4] route-distinguisher 100:10
[PE1-vpn-instance-VPNA-af-ipv4] vpn-target 100:10 both
IVT Assignment result:
Info: VPN-Target assignment is successful.
EVT Assignment result:
Info: VPN-Target assignment is successful.
[PE1-vpn-instance-VPNA-af-ipv4] quit
40
20
1/23/17
Configure MP-iBGP
• Configuration steps:
– 3. Enable MP-iBGP neighbors in vpnv4 address-family on PE routers
[PE1] bgp 100
[PE1-bgp] peer 4.4.4.4 as-number 100
[PE1-bgp] peer 4.4.4.4 connect-interface loopback 0
[PE1-bgp] ipv4-family vpnv4
[PE1-bgp-af-vpnv4] peer 4.4.4.4 enable
[PE1-bgp-af-vpnv4] quit
[PE1-bgp] quit
41
42
21
1/23/17
43
44
22
1/23/17
45
Questions?
Issue Date:
Revision:
23
1/23/17
MPLS L3VPN
Services
Extranet Service
48
24
1/23/17
PE11 PE12
CE1
VPN Site CE2 VPN Site CE3
49
PE2
RD+10.1.2.0/24
NextHop=PE12
10.1.2.0/24
CE2
CE1
MPLS Network
PE12
50
25
1/23/17
PE2
300:12+10.1.2.0/24
NextHop=PE12
10.1.2.0/24
CE2
CE1
MPLS Network
PE12
ip vrf green
rd 300:12
route-target both 1:1
51
PE2
10.1.2.0/24
CE2
52
26
1/23/17
PE2
PE11
10.1.2.0/24
CE2
CE1 MPLS Network
PE12
53
PE2
Traffic
redirect
10.1.2.0/24 to PE12
CE2
CE1 MPLS Network
PE12
54
27
1/23/17
PE Node Failure
• When PE11 router fails, traffic will be lost before PE2
completes BGP route convergence.
PE2
10.1.2.0/24
CE2
CE1 MPLS Network
PE12
55
VRF green:
10.1.2.0/24
Primary next-hop: PE11
PE11 Backup next-hop: PE12
RR
PE2
10.1.2.0/24
CE2
CE1
MPLS Network
PE12
56
28
1/23/17
Extranet Service
57
MPLS
Backbone
Traffic between hub
and spoke sites
Traffic between
Spoke Site B spoke sites
58
29
1/23/17
10.1.2.0/24
CE-SA 10.1.1.0/24
59
10.1.2.0/24
CE-SA 10.1.1.0/24
10.1.2.0/24
NH:CE-SA
MPLS Network
10.1.2.0/24 CE-Hub
PE-Hub NH: PE-Hub
10.1.3.0/24
CE-SB
PE-SB
Spoke Site B VRF SPOKE 2
RD 300:112
Import RT 2:2
Export RT 1:1
60
30
1/23/17
10.1.2.0/24
CE-SA 0.0.0.0/0 10.1.1.0/24
NH:PE-SA
61
10.1.2.1
10.1.2.1
Spoke Site A PE-SA L2 100 10.1.2.1
10.1.2.0/24
CE-SA 10.1.1.0/24
MPLS Network
CE-Hub
PE-Hub
10.1.3.0/24
L1 35 10.1.2.1
CE-SB
PE-SB 10.1.2.1
Spoke Site B
10.1.2.1
62
31
1/23/17
Eth0/0.2 Eth0/0.2
MPLS Network CE-Hub
63
64
32
1/23/17
PE-SB AS65000
VRF SPOKE 2 VRF HUB-OUT
router bgp 65000 RD 300:12
RD 300:112 address-family ipv4 vrf HUB-OUT
neighbor <CE> allowas-in 2 Export RT 2:2
Import RT 2:2
Export RT 1:1
65
10.1.2.0/24
PE-Hub 10.1.1.0/24
CE-SA
VRF HUB IN
10.1.3.0/24
CE-SB
PE-SB
L1 35 10.1.2.1 10.1.2.1
10.1.2.1
66
33
1/23/17
10.1.2.0/24
CE-SA 10.1.1.0/24
VPN
Traffic
MPLS Network CE-Hub
PE-Spoke PE-Hub
10.1.3.0/24
CE-SB
67
Half-Duplex VRF
Two VRFs for Spoke PE
Green- RD 300:111
Up
Import RT 2:2
Green- RD 300:112 Two VRFs for Hub Site
Down
Export RT 1:1 VRF HUB-IN
Spoke Site A RD 300:11
Import RT 1:1
10.1.2.0/24
PE-Spoke PE-Hub 10.1.1.0/24
CE-SA
Eth0/0.1 Eth0/0.1
Eth0/0.2 Eth0/0.2
MPLS Network CE-Hub
68
34
1/23/17
Extranet Service
69
Extranet Service
• Communication between VPNs may be required
i.e., External intercompany communication (dealers with
manufacturer, retailer with wholesale provider, etc.)
MPLS
Backbone
VPN_A Site 1 VPN_B Site 1
VPNA Traffic
Traffic between
VPNA and VPNB
VPN_A Site 2
70
35
1/23/17
VPN_A Site2
CE2
PE1 PE2
CE1 PE3
VPN_A Site1
71
MPLS
Backbone
VPN_A Site 1 VPN_B Site 1
Not
Allowed
VPNA Traffic
Traffic between
VPNA and VPNB
VPN_A Site 2
72
36
1/23/17
CE2
PE1 PE2
Not
Allowed
73
Extranet Service
74
37
1/23/17
75
76
38
1/23/17
71.8.0.0/16 S0 192.168.1.1
CE-A
PE1
PE2
1 Default route
MPLS Network Internet
For traffic (VPN internet)
ip route vrf VPN-A 0.0.0.0 0.0.0.0 192.168.1.1 global
77
MPLS Packet
IP Packet 30 5.1.1.1
5.1.1.1 192.168.1.2
IP Packet
71.8.0.0/16 S0 192.168.1.1 5.1.1.1
CE-A
71.8.1.1 PE1
IP Packet PE2 S0 5.0.0.0/8
35 71.8.1.1
71.8.1.1
MPLS Packet
MPLS Network IP Packet
Internet
78
39
1/23/17
192.168.1.2
Eth0/0.1
71.8.0.0/16 192.168.1.1
Eth0/0.2
CE-A
PE1
PE2
MPLS Network
Internet
Interface Ethernet0/0.2
encapsulation dot1q 200
ip address 71.8.10.1 255.255.0.0
79
192.168.1.2
MPLS Packet
30 5.1.1.1
Eth0/0.1
71.8.0.0/16 192.168.1.1 IP Packet
Eth0/0.2
CE-A 5.1.1.1
5.1.1.1 PE1
IP Packet
PE2 5.0.0.0/8
CE Routing Table
VPN Routes Ethernet0/0.1
MPLS Network
Internet Routes Ethernet0/0.2 Internet
80
40
1/23/17
VRF VPN_A
VRF Internet
VPN_B
CE1 MPLS Network
VPN_A Site1 PE1
PE3
PE2 Internet
CE2
VPN_A Site2
Design RT to
implement the VRF
communication
81
Conclusion
• MPLS based IP/VPN is the most optimal L3VPN
technology
– Any-to-any IPv4 or IPv6 VPN topology
– Partial-mesh, Hub and Spoke topologies also possible
82
41
1/23/17
Questions?
Issue Date:
Revision:
42