From Blog To Book
From Blog To Book
From Blog To Book
praviint.blogspot.com
Contents
1 2012 1.1 April . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MPLS (2012-04-07 22:03) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2012-04-07 22:14) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2012-04-07 23:09) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . BENEFITS (2012-04-07 23:47) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Label Switching Functions (2012-04-08 09:00) . . . . . . . . . . . . . . . . . . . . . . . . . . Distribution of LABEL BINDING (2012-04-08 09:24) . . . . . . . . . . . . . . . . . . . . . MPLS & Routing (2012-04-08 10:01) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MPLS Trac Engineering (2012-04-08 11:05) . . . . . . . . . . . . . . . . . . . . . . . . . . MPLS Commands (2012-04-08 13:57) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MPLS LDP (2012-04-08 14:05) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TERMS (2012-04-08 19:30) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MPLS Header & Label (2012-04-08 20:00) . . . . . . . . . . . . . . . . . . . . . . . . . . . . MPLS Architecture (2012-04-09 08:36) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MPLS OPERATION (2012-04-09 18:17) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MPLS Applications (2012-04-09 18:24) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MPLS Forwarding Table (2012-04-09 21:36) . . . . . . . . . . . . . . . . . . . . . . . . . . . (2012-04-10 08:29) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Unsolicited & Lieberal (2012-04-10 08:47) . . . . . . . . . . . . . . . . . . . . . . . . . . . . Loop prevention in MPLS (2012-04-10 09:07) . . . . . . . . . . . . . . . . . . . . . . . . . . Cong MPLS (2012-04-10 09:19) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MPLS Troubleshooting (2012-04-10 10:37) . . . . . . . . . . . . . . . . . . . . . . . . . . . . MPLS Tunnel (2012-04-10 17:32) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MPLS Laeyer 3 VPNs (2012-04-10 18:25) . . . . . . . . . . . . . . . . . . . . . . . . . . . . VRF: Virtual Routing & Forwarding (2012-04-10 19:31) . . . . . . . . . . . . . . . . . . . . MPLS forwarding using FIB & LFIB (2012-04-11 08:07) . . . . . . . . . . . . . . . . . . . . 5 5 5 5 5 6 6 7 7 8 8 9 10 11 12 14 14 15 15 16 16 16 17 17 18 19 20 3
MPLS Label Filtering (2012-04-11 11:13) . . . . . . . . . . . . . . . . . . . . . . . . . . . . MPLS TTL eld & It propagation (2012-04-11 13:08) . . . . . . . . . . . . . . . . . . . . . Feeding the FIB & LFIB (2012-04-11 14:13) . . . . . . . . . . . . . . . . . . . . . . . . . . . PE Role in MPLS (2012-04-11 21:41) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MP-BGP & Routing Distinguishers (2012-04-11 22:48) . . . . . . . . . . . . . . . . . . . . . MPLS Route Targets (2012-04-11 22:58) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Loop Back Address in MPLS (2012-04-12 11:20) . . . . . . . . . . . . . . . . . . . . . . . . MPLS VPN Conguration (2012-04-12 11:34) . . . . . . . . . . . . . . . . . . . . . . . . . . MPLS VPN Data Plane (2012-04-12 18:28) . . . . . . . . . . . . . . . . . . . . . . . . . . . MP-BGP VPNv4 (2012-04-13 21:06) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2012-04-13 21:07) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MPLS conguration (2012-04-14 14:00) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . cong b/n PE to CE (2012-04-14 20:55) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (2012-04-15 11:28) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MPLS VPN services (2012-04-15 11:47) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
21 22 23 24 24 25 26 26 29 30 30 30 32 33 34
Chapter 1
2012
1.1 April
(2012-04-07 22:14)
Generally in ip routing, packets are forward based on the ip address But in MPLS, ip packets are assigned with labels. Gnerally when forwarding ip packet, whole packet will be read. then forward But in MPLS, read only the top label, based on thins info ip packet will be forwarded Today MPLS is, for the most part, a standardized version of Ciscos proprietary tag switching.
(2012-04-07 23:09)
Before using the MPLS you must enable the CEF (Cisco Express Forwarding) on the router. MPLS terminology LSR: Label Switch Routher A router forward IP Packets based on the Labels. Edge-LSR: 5
A router at the end of MPLS network. which forward both labeled & unlabeled packets Ingress E-LSR: A router at an end of MPLS network(Edge-LSR or E-LSR), which add labels to the unlabeled & labeled ip packets. Egress E-LSR: A router removes the labels of received labeled ip packet & forward as unlabeled. CE Router:
The initial choice of label may not depend upon the content of layer 3 packet header Ex: Forwarding decisions at subsequent hops can also be based on routing policies. The packet header need not be reanalysis during packet transit through the network. Because the label is xed length and unstructured. So the MPLS forwarding table lookup process is straight forward & fast
mpls ldp neighbor <ip> password <password> ip-neighbors ldp router-id mpls ldp password required to make use of password mandatory use the above command globally.
it will be possible after enabling the CEF. FIB entry has detailed information needed for forwarding: next-hop router outgoing interface Used for incoming unlabeled packets LFIB:
When exiting from the MPLS network, MPLS label TTL value is copied back to the IP TTL eld If this eld is set to 0, the packet will be discarded this eld length is 8-bits MPLS label stack Placement: It is placed between Layer 2 header & Layer 3 header. For this some times MPLS labels stack referred as shim header Router forward packets based on the MPLS label header because it comes before the Layer 3 header. In MPLS, ip packets are switched instead of routed. Labels are bound to routes in the routing table In label stack, the outer label is used to forward the packet along the LSP, inner label is used to identify the VPN site. This beneath label called as the VPN label
Tag Distribution Protocol(TDP): Cisco proprietary protocol used to bind tags to network routes in the routing table. FORWARDING: The routing table is built in the control plane & cached in forwarding plane. Forward Information Base is built by CEF. FIB is a cached version of the ip routing table that eliminates the need for a lookup of routing table. Router compares the packets destination ip address to the CEF FIB, ignore the ip routing table. CEF optimizes the organization of FIB, so that router easily nd the correct FIB entry, resulting in a smaller forwarding delay & high volume of packets per second through a router. For each packet, the router nds the matching FIB entry, then nds the adjacency table entry referenced by the matching FIB entry, and forward the packet
[1]
1. http://3.bp.blogspot.com/-vNSxALKFm10/T4Tp1bD5VQI/AAAAAAAAAd8/vrvlCWJpGOw/s1600/forward.JPG
13
14
[1]
1. http://2.bp.blogspot.com/-4z70WiMOvPU/T4MIoL8vobI/AAAAAAAAAd0/l8RqRGxQNFY/s1600/Capture_2.JPG
(2012-04-10 08:29)
Order
IP IGP routing protocols build the ip tables. LSR assign a local label for each route learned(but not bgp learned routes) LSRs share their labels with other LSRs using LDP LSRs build their own LIB(Label Information Base), LFIB(Label Forward Information Base) & FIB(Forward Information Base) based on what they have learned from their LDP neighbor. LDP Neighbor: Hellow Messages LDP link hello uses destination UDP port 646 & is sent to 224.0.0.2 every 5 sec. Session is TCP based on destination port 646. Router with highest LDP router ID(Active LSR) will initiate TCP session. Keepalives are sent for every 60 sec.
15
16
BGP next-hop values must be loopback interface of remote PE. BGP next-hop determine what label value should be used. Incorrect next-hop vlalue can result in trac black hole in MPLS network label is PHPed one shop to soon MPLS tunnels are similar to Frame-Relay or ATM PVCs. Frame-Relay packets are switched based on the DLCI value found in the header. This DLCI value is purely local These DLCI value on packet header is rewritten every time the packet switched out. similar principle is employed in MPLS.
MPLS L3 VPNs have 2 basic components Seperation of customer routing information to do this VRF (Virtual Routing & Forwarding) used. VRF used on PE routers to keep track on customer routes on per interface basis. Exchange of customer routing information. to do this MP-BGP is used over the MPLS network. Trace is label switched towards the BGP next-hops. The idea of MPLS VPN is establishing a full-mesh of dynamic MPLS LSRs between PE routers. using these PE routers for tunneling VPN packets across the network core.
i.e. VRF & global routes are separate. VRFs without MPLS is considered as VRF Lite If 2 VRFs have same ip prex but they cannot route to each other. Because they are separately labeled. We cannot manually leak the trac between VRFs by creating static routes. i.e. interfaces are route with other interfaces which are in same VRF. BGP is enhanced to handle VRF specic routes. A new sepcial MP-BGP address family named VPN IPv4 has been added to bgp along with new NLRI format. To support multiple customers in MPLS VPN, VRF tables were used. VRF tables are used to store routes separately for dierent customer VPNs. The use of separate tables solves some problems: Leakage packets from one customer to another due to overlapping prexes VRF has 3 main components: An IP routing table (RIB) A CEF FIB, populated based on that VRFs RIB A separate process of the routing protocol used to exchange routes with the CEs.
CEF FIB: Forward Information Base Used for incoming unlabeled packets. Router matches the packets destination IP address to the best prex in the FIB And forward the packet based on that entry. MPLS LFIB: Labeled Forward Information Base: Used for labeled packets. Router compares the label in the incoming packet to the LFIBs list of label and forward the packet based on that LFIB entry.
[1] Above image taken from Cisco press: ccie R &S certication guide, 4th edition MPLS enable forwarding process based on something other than the destination ip address such as: VPN from which the packet originated forwarding to balance trac with trac engineering & forwarding over dierent links based on QoS goals.
1. http://1.bp.blogspot.com/-Pn_ajljdHEE/T4TuK0d6BlI/AAAAAAAAAeE/ZIsRL6bwJVs/s1600/for.JPG
example: create access list: access-list 10 permit 150.1.0.0 0.0.255.255 Stop automatic assigning of labels to prexes. no mpls ldp advertise-labels use of access list to lter the label generation mpls ldp advertise-labels for 10 Before MPLS label ltering:
[2]
1. http://2.bp.blogspot.com/-Nzy0uJnC3fw/T4UZbMdymnI/AAAAAAAAAeM/nEidLu0siDs/s1600/before.JPG 2. http://1.bp.blogspot.com/-zvMuyZVMvHY/T4UZvdHHFKI/AAAAAAAAAeU/P5ZdKc9vJIE/s1600/after.JPG
MPLS TTL used for same above ip TTL functions. From this we conrmed that, presence or absence of MPLS in a network has no eect on the TTL related processes. When switching LSR will decrement the MPLS TTL but not the IP TTL. TTL in MPLS network: At Ingress E-LSR: It decrements the IP TTL eld in unlabeled packet then push a label in unlabeled packet & copy the decremented IP TTL into the new MPLS TTL. At LSR: When LSR swaps a label, MPLS TTL will be decremented & doesnt eect the IP TTL At Egress E-LSR: After an egress E-LSR decrements the MPLS TTL eld, it pops the MPLS label (header) & then copies the MPLS TTL to the IP TTL. A looping packet would decrements to TTL 0 and discarded.
23
MPLS RFC 4363, BGP/MPLS IP Virtual Private Networks(VPNs), denes a specic new address family to support IPv4 MPLS VPNsnamed as an MP-BGP address family called Route Distinguishers (RDs) RDs allow BGp to advertise & distinguish between duplicate IPv4 prexes. The concept is simple: Advertise each NLRI as the traditional IPv4 prex, but add another number (the RD) RD uniquely identies the route. In the new NLRI format, called VPN-V4, has 2 parts: 64-bit RD 32-bit IPv4 prex example: 1:111:10.2.2.0/24 Every VRF must be congured with an RD.
25
[1] VPNs are congured only on PE routers only. The customer routers no need to know about VPNs P routers no need to know about the MPLS VPN features 26
VRFs allow PEs to store routes learned from various CEs, even if the prexes overlap. RD allows PEs to store routes as unique prexes. RT tells the PEs which routes should be added to each VRF which provides greater control & ability to allow sites to be reachable from multiple VPNs. VRF conguration on PE use the following commands: Congure the VRF using command: ip vrf <vrf-name> Congure the RD under VRF sub-command using rd <rd-value> Congure the RT under VRF sub-command using rt {import|export } <rt-value> Associating an interface with the VRF under interface sub-command using ip vrf forwarding <vrf-name> Each VRF has: One RD At least one import & export routing tag. If we give unique RD to every VRF, overlapping of prexes will be overcomes. Conguring the IGP between PE & CE: Congure a routing protocol between PE & CE. This allows the PE router to learn the customer routes & CE to learn the other customer routes learned by PE from other PE in the MPLS cloud. Any IGP or even BGP can be used as the routing protocol. Show Commands: sh ip route vrf cust-A shows connected route on PE router & router learned from CE. Conguring Redistribution between PE-CE IGP & MP-BGP PE have no ability to advertise these routes across the MPLS VPN cloud. 27
Then redistribute the IGP learned routes from CE into BGP table contain other CE routes learned from remaining PEs & vice-versa. 2 methods to add new routes to BGP table are Using network command Redistribution The BGP network command works well when adding small number of predictable prexes. The Redistribution process works best when the prexes are not predictable there may be many no.of prexes,... etc. So MPLS VPN BGP congurations uses the Redistribution process for adding new routes. MPLS VPN mutual redistribution conguration requires specic VRF told by both IGP & BGP. Redistribution command under the IGP & BGP process is address-family ipv4 vrf <vrf-name> Conguring MP-BGP between PFs To congure each peer, commands used are in normal BGP in non-MPLS congurations & others occur inside a new VPNv4 address family. Compare MPLS VPN BGP & traditional BGP conguration. The PE neighbors are dened under the main BGP process, not for particular address family. In MPLS VPN designs loopback is used as update source on the PE routers. In that case, the neighbor update-source command is also under the mail BGP process. The PE neighbors are then activated, using the neighbor activate command, under the VPNv4 address family process (address-family vpnv4). BGP must be told to send the community PA (neighbor send-community) command, under theaddress-family vpnv4 command. The VPNv4 address family does not refer to any particular VRF. Thre is no need of iBGP neighbor per VRF on each remote VRF.
1. http://2.bp.blogspot.com/-ZLd1oauWW3M/T4Zw1Aa1WHI/AAAAAAAAAec/HJVaMjy1ZUQ/s1600/Capture.JPG
28
29
(2012-04-13 21:07)
lldd
main Enable MPLS forwarding of ipv4 packets along the routed paths( also called Dynamic Label Switching must be enable on interface & device command: mpls ip unique router-id important in MPLS As a router-id loopback address is more advantage than interface address command used to router-id as loopback is mpls ldp router-id loopback0 force In sometimes loopback ip address used as router-id cannot be reachable at that time an interface is used as router-id, to this use the following command under interface mpls ldp discovery transport-address interface enable mpls on routing protocol enabled interfaces mpls ldp autocong under routing process. enable mpls authentication globally. mpls ldp password required in global mode mpls ldp neighbour 150.1.5.55 password CISCO to show mpls neighbours show mpls ldp neighbors to show mpls enabled interfaces show mpls interfaces to show mpls authentication show mpls ldp neighbor password to show LFIB table show mpls forwarding-table 31
to check the packets are forwarding by MPLS traceroute 150.1.5.5 normally LDP will generate & adverties labels for every prex found in the local routing table to avoid this & enable only on some prexes uses the access control list exampls: access-list 10 permit 150.1.0.0 0.0.255.255 no mpls ldp advertise-labels mpls ldp advertise-labels for 10 PE conguration in mpls network full mesh of PEs was created using ibgp peerings for example router bgp 100 neighbor 155.1.5.5 remote-as 1oopback0 neighbor 155.1.5.5 update-source loopback0 address-family vpv4 unicast /** activating vpv4 address family neighbor 150.1.5.5 activate neighbor 150.1.5.5 send-community extended neighbor 150.1.5.5 route-reector-client to dene VRF use command ip vrf vrf-name
goal is to make the prex unique in entire mpls network formate of RD changed based on service provider AS followed by locally signicant number router-id followed by locally signicant number rd cong rd 200:1 /** cong underip vrf A rd 200:2 apply vrfs to interfaces int e0/0 ip vrf forwarding A ip address 1.1.1.1 255.255.255.0 /** reenter ip add because enabling of vrf on interface remove the ip add of the interface sh ip route /*** global routing table shows the separate tables for the each customer sh route | in interface | in ip address under the igp process enable seperate address family router eigrp /**under given igp route process address-family ipv4 vrf A sh ip vrf detail sh ip route vrf * /** sh all vrf routing tables address-family ip v4 vrf / vpv4
(2012-04-15 11:28)
VRF contain :
ip routing table CEF table set of interfaces that use the cef forwarding table set of rules & routing protocol parameters to control the information in the routing tables
33
34