MPLS Part 2 Mpls - VPN: Cis 186 Iscw Rick Graziani Fall 2007
MPLS Part 2 Mpls - VPN: Cis 186 Iscw Rick Graziani Fall 2007
VPN Architecture
VPN Architecture
VPN Taxonomy
Overlay VPNsService providers provide virtual point-to-point links. Peer-to-peer VPNsService providers participate in the customer
routing.
Rick Graziani [email protected] 5
Layer 1 Overlay
Layer 2 Overlay
Router A
Router B
Router C
Router D
Peer-to-Peer VPNs
10
Peer-to-Peer VPNs
11
Peer-to-Peer VPNs
Although the local loop has not changed, the essence of the network
has. The provider is now part of the customer routing infrastructure. The network is more flexible and resilient because it is an extension of the customers routing infrastructure. Each customers routing information is kept securely separate from every other customers routing information.
12
VPN Drawbacks
customer routing process. Customer must place additional trust in the SP to properly configure and maintain their routing infrastructure. True Redundancy: At critical sites with redundant routers care should be taken to ensure that both circuits do not end up on the same PE router. No routing loops: Also, necessary to ensure that routes advertised via one circuit are not redistributed out to the PE and then back in via the redundant circuit to the CE.
13
14
15
CE Router Architecture
CE router is a router.
Runs an IGP (OSPF, EIGRP, IS-IS, etc.) Not MPLS aware Does not participate in MPLS
16
PE Router
PE router
Similar to a typical PoP Relatively high end router (Cisco 7200VXR) Each customer is assigned its own RD and VRF table dedicated to maintaining routing information Routing across backbone is performed by another routing process using a global IP routing table. Single router but runs multiple instances of a routing protocol (IGP) one for each customer. Multiple instances of IGP are redistributed into global routing table.
Rick Graziani [email protected] 17
PE Router
PE Router
PE Router
BGP the only real protocol of choice for the provider - scalability. Very large routing tables
Number of prefixes advertised by each customer P network routes BGP neighbor relationships are configured between PE routers directly so that prefixes can be exchanged for a given customer. The global IP routing table in the P network need not actually carry any of the actual customer routes.
20
P Router
P Router
Do not carry VPN routes Provide transport for traffic between PEs Run IGP Carry only P network routing information in their routing tables Interface with PE routers to facilitate the transport of BGP peering information to remote PE routers. Participate in LDP
Rick Graziani [email protected] 21
MP-iBGP Session
PE Routers Edge routers Use MPLS with P routers Uses IP with CE routers Connects to both CE and P routers Distribute VPN information through MP-BGP to other PE router with VPN-IPv4 addresses, extended community, label
P Routers
P routers are in the core of the MPLS cloud P routers do not need to run BGP and doesnt need to have any VPN knowledge Forward packets by looking at labels P and PE routers share a common IGP
22
CE PE
VRF Routing Table Routing (RIB) and forwarding table (CEF) associated with one or more directly connected sites (CEs) The routes the PE receives from CE routers are installed in the appropriate VRF routing table(s)
The Global Routing Table Populated by the IGP within MPLS backbone
Has its own routing table and forwarding table (CEF) VRF has its own instance for the routing protocol
(static, RIP, BGP, EIGRP, OSPF)
24
VPN 1
25
Question:
26
Question:
Answer #1: Run a dedicated Interior Gateway Protocol (IGP) for each customer across the P-network.
27
Question:
Answer #1: Run a dedicated Interior Gateway Protocol (IGP) for each customer across the P-network.
This is the wrong answer for the following reasons: The solution does not scale. P routers carry all customer routes.
Rick Graziani [email protected] 28
Question:
29
Question:
Answer #2: Run a single routing protocol that will carry all customer routes inside the provider backbone.
30
Question:
Answer #2: Run a single routing protocol that will carry all customer routes inside the provider backbone.
Better answer, but still not good enough: P routers carry all customer routes.
Rick Graziani [email protected] 31
Question:
32
Question: How will PE routers exchange customer routing information? Answer #3: Run a single routing protocol that will carry all customer routes
between PE routers. Use MPLS labels to exchange packets between PE routers.
33
Question: How will PE routers exchange customer routing information? Answer #3: Run a single routing protocol that will carry all customer routes
between PE routers. Use MPLS labels to exchange packets between PE routers. The best answer:
Question: Which protocol can be used to carry customer routes between PE routers?
35
Question: Which protocol can be used to carry customer routes between PE routers? Answer: The number of customer routes can be very large. BGP is the only routing protocol that can scale to a very large number of routes.
36
Question: Which protocol can be used to carry customer routes between PE routers? Answer: The number of customer routes can be very large. BGP is the only routing protocol that can scale to a very large number of routes.
Question: How will information about the overlapping subnets of two customers be propagated via a single routing protocol?
38
Question: How will information about the overlapping subnets of two customers be propagated via a single routing protocol? Answer: Extend the customer addresses to make them unique.
39
Route Distinguishers
Lets Discuss: Route Distinguisher (RD); VPNv4 route Route Target (RT) Label
Rick Graziani [email protected] 41
Route-target (RT): Identifies the VRF for the received VPNv4 prefix. It
is an 8-byte extended community (a BGP attribute) Each VRF is configured with RT(s) at the PE RT helps to color the prefix
43
3
CE1 PE1
Site 2 CE2
10.1.1.0/24 Next-Hop=CE-1
PE2
MPLS Backbone
1. PE1 receives an IPv4 update (eBGP,OSPF,EIGRP) 2. PE1 translates it into VPNv4 address
Assigns an RT per VRF configuration Rewrites next-hop attribute to itself Assigns a label based on VRF and/or interface
3
CE1 PE1
Site 2
CE2 P P PE2
10.1.1.0/24 Next-Hop=CE-1
MPLS Backbone
MPLS-VPN Technology:
Forwarding Plane
Site 1
10.1.1.0/24
Site 2 CE1 P
10.1.1.1
CE2
P PE2
10.1.1.1 10.1.1.1
PE1
100
P
10.1.1.1 25
50
100
100
10.1.1.1
46
Outline
Overview VPN Packet Forwarding Across an MPLS VPN Backbone VPN Penultimate Hop Popping VPN Label Propagation MPLS VPN and Label Propagation MPLS VPN and Packet Forwarding
Question:
How will the PE routers forward the VPN packets across the MPLS VPN backbone? Answer #1: They will label the VPN packets with an LDP label for the egress PE router and forward the labeled packets across the MPLS backbone.
48
Question:
How will the PE routers forward the VPN packets across the MPLS VPN backbone? Answer #1: They will label the VPN packets with an LDP label for the egress PE router and forward the labeled packets across the MPLS backbone. Results: The P routers perform the label switching, and the packet reaches the egress PE router. However, the egress PE router does not know which VRF to use for packet switching, so the packet is dropped. (Remember, customers may be using RFC 1918 addresses.) How about using a label stack?
Rick Graziani [email protected] 49
Question:
How will the PE routers forward the VPN packets across the MPLS VPN backbone? Answer #2: They will label the VPN packets with a label stack, using: 1. the LDP label for the egress PE router as the top label, and 2. the VPN label assigned by the egress PE router as the second label in the stack.
50
Question:
How will the PE routers forward the VPN packets across the MPLS VPN backbone? Answer #2: They will label the VPN packets with a label stack, using: 1. the LDP label for the egress PE router as the top label, and 2. the VPN label assigned by the egress PE router as the second label in the stack. Result: The P routers perform label switching, and the packet reaches the egress PE router. The egress PE router performs a lookup on the VPN label and forwards the packet toward the CE router.
Rick Graziani [email protected] 51
Penultimate hop popping on the LDP label can be performed on the last P router. The egress PE router performs label lookup only on the VPN label, resulting in faster and simpler label lookup. IP lookup is performed only oncein the ingress PE router.
Rick Graziani [email protected] 52
8 Bytes
4 Bytes
3 Bytes
100:1 RD VPNv4
10.1.1.0 IPv4
286
Label
53
Example
1. CE red1 advertises the 192.168.4.0/24 prefix to PE A. A CE can use static or dynamic routing (RIP, eBGP, or OSPF) to exchange routes with a PE. CE red1 runs eBGP. CE green2 uses RIPv2. 2. PE A imports the prefixes announced by the CE into the route table for this VPN. If other interfaces on the same PE belong to the same VPN, routes are announced to the local peers. Each VPN has its own routing table.
Rick Graziani [email protected] 54
Example
3. PE A uses iBGP to announce reachability for each of its attached customer sites. PE A has one iBGP session with PE C for the red VPN and another with PE D for the green VPN. PE C imports the routes into the routing table used for the red VPN, PE D imports the routes for the green VPN. The PEs are in a full iBGP mesh and each can run many different VPNs.
Rick Graziani [email protected] 55
Example
4. PE C announces the 192.168.4.0 route to CE red2 using RIPv2. A show ip route command on CE red2 will show 192.168.4.0/24 with a next hop of 192.168.2.1, which is the address of PE C. Similarly, CE red1 has an entry for 192.168.3.0 with a next hop of 192.168.1.2. PE As routing table for the red VPN has an entry for 192.168.4.0 through 192.168.1.1 and another entry for 191.168.3.0 with a next hop that points to PE C. This is where the MPLS-VPN magic occurs. PE C announces itself as the next hop for the 192.168.3.0 route. Because this is a BGP route, PE A will use another lookup to find the route and, this time, the next hop will be 10.0.0.2, which is the LSR.
Rick Graziani [email protected] 56
Example
5. When traffic must go between sites, the CE forwards IP packets to the PE as it would to any other router. Packet going from CE green1 to CE green2, following this sequence: a. PE A identifies the next hop (PE D) for this packet as a BGP neighbor. b. PE A first imposes a label 22, that will identify the VPN routing table to PE D. This label was advertised by the neighbor, PE D, during the exchange of BGP prefixes. which happened some time before the preceding step.
Rick Graziani [email protected] 57
Example
c. The packet must now travel across the MPLS network, so PE A imposes another label 96, that identifies the next-hop LSR on the IGP path to PE D. This label was advertised by the downstream LSR (LSR B) from 10.0.0.2. d. Each LSR in the core swaps labels and forwards the packet as normal toward PE D. The penultimate hop pops the outer label. There is only one hop to the egress LSR, so LSR B removes the outer label.
Rick Graziani [email protected] 58
Example
e. PE D uses the remaining label 22, to: Identify which VPN routing table to use for the packet, and Pops the label from the packet f. PE D does an IP lookup in the VPN routing table to: Find the outgoing interface and Forwards the IP packet to CE green2, which will route it to its destination.
Rick Graziani [email protected] 59
60
61
ip cef [distributed]
Starts CEF switching and creates the FIB table The distributed keyword configures distributed CEF (running on VIP or line cards) All CEF-capable interfaces run CEF switching
Router(config-if)#
ip route-cache cef
The optional [distributed] parameter enables dCEF. This distributes the CEF information to the line cards and the line cards perform express forwarding. Consider the following: CEF is enabled by default only on these platforms: Cisco 7100 series router Cisco 7200 series router Cisco 7500 series Internet router Distributed CEF is enabled on the Cisco 6500 series router. Distributed CEF is enabled on the Cisco 12000 series Internet router.
63
Monitoring IP CEF
Router#
64
Mask
Longer-prefixes
Configure CEF. Configure MPLS on a frame mode interface: Enable label switching on a frame mode interface. Start LDP or TDP label distribution protocol. (Optional) Configure the MTU size in label switching.
66
mpls ip
Enables label switching on a frame mode interface Starts LDP on the interface
Router(config-if)#
67
68
69
Configure CEF. Configure MPLS on a frame mode interface. Configure the MTU size in label switching:
Increase MTU on LAN interfaces.
70
Router(config-if)#
Label switching increases the MTU requirements on an interface because of additional label header. Interface MTU is automatically increased on WAN interfaces; IP MTU is automatically decreased on LAN interfaces. Label-switching MTU can be increased on LAN interfaces (resulting in jumbo frames) to prevent IP fragmentation.
71
72