Showing posts with label MPLS. Show all posts
Showing posts with label MPLS. Show all posts

Thursday, June 21, 2012

Multiprotocol Label Switching (MPLS) VPN

Yes Guys & Girls! Waiting for detail step wise configuration of Multiprotocol Label Switching Virtual Private Network (MPLS-VPN).

R1(config) # ip cef
R1(config) # mpls ldp router-id loopback 0
R1(config) # mpls label protocol ldp
R1(config) # mpls ip

Repeat same commands on router R2 & R3



We can divide the configuration phase into four steps:

1 - VRP related Configuration
2 - MP-BGP Related Configuration
3 - PE-CE Routing Protocol Configuration
4 - Redistribution

Step # 1 VRF Configuration

R1(config)# ip vrf test
R1(config-vrf)# rd 1:1
R1(config-vrf)# route-target 1:1

By using above command for RT it is defined automatically for both
importa and export, if you want to use seperate you can do so. Use
R1 # show running-config command to see that both import and export
RT is defined using above command.

R1(config)# interface serial 1/1
R1(config-if)# ip vrf forwarding test

./. You will get Warning that IP Address 5.1.1.2 is removed due to
vrf configuration. Assign IP Address again.

R1(config)# interface serial 1/1
R1(config-if)# ip address 5.1.1.1 255.0.0.0

Note: Now when you check your routing table you will not see 5.0.0.0 network as it is removed and move to vrf table. you can confirm it using below command:

R1 # show ip route vrf test

R1 # ping vrf test 5.1.1.1

The result should be sucessfull :)


R3(config)# ip vrf test //The vrf name here can be differnt.
R3(config-vrf)# rd 1:1
R3(config-vrf)# route-target 1:1

R3(config)# interface serial 1/0
R3(config-if)# ip vrf forwarding test

./. You will get Warning that IP Address 5.1.1.2 is removed due to
vrf configuration. Assign IP Address again.

R3(config)# interface serial 1/0
R3(config-if)# ip address 3.1.1.1 255.0.0.0


Step # 2 MP-BGP Configuration

R1(config)# router bgp 1
R1(config-router)# bgp router-id 11.1.1.1
R1(config-router)# bgp auto-summary
R1(config-router)# no synchronization
R1(config-router)# neighbor 33.3.3.3 remote-as 1
R1(config-router)# neighbor 33.3.3.3 update-source loopback 0

R3(config-router)# router bgp 1
R3(config-router)# bgp router-id 33.3.3.3
R3(config-router)# bgp auto-summary
R3(config-router)# no synchronization
R3(config-router)# neighbor 11.1.1.1 remote-as 1
R3(config-router)# neighbor 11.1.1.1 update-source loopback 0

The above is basic BGP configuration. Now MP-BGP configuraiton (We used Multi-Protocol BGP (MP-BGP) because we need this to carry VPNv4, VPNv6, IPv6 & IPv4 Packets while BGP only carry IPv4 traffic.

R1(config) # router bgp 1
R1(config-router) # address-family vpnv4
R1(config-router-af) # neighbor 33.3.3.3 activate
R1(config-router-af) # neighbor 33.3.3.3 send-community both

R3(config) # router bgp 1
R3(config-router) # address-family vpnv4
R3(config-router-af) # neighbor 11.1.1.1 activate
R3(config-router-af) # neighbor 11.1.1.1 send-community both



Step # 3 PE-CE Configuration

Run OSPF between PE & CE but make sure to use different process-id from one which is already running on PE as you all routes will be in service provider area.

R1(config)# router ospf 10 vrf test
R1(config-vrf)# router-id 5.1.1.2
R1(config-vrf)# network 5.0.0.0 0.255.255.255 area 0

Note: We used different id other than loopback as that is already use by OSPF-1.

R5(config)# router ospf 1
R5(config-router)# router-id 55.5.5.5
R5(config-router)# network 55.5.5.5 0.0.0.0 area 0
R5(config-router)# network 50.1.1.1 0.0.0.0 area 0
R5(config-router)# network 5.1.1.1 0.0.0.0 area 0

R1# show ip route vrf test


R3(config)# router ospf 10 vrf test
R3(config-vrf)# router-id 3.1.1.1
R3(config-vrf)# network 3.0.0.0 0.255.255.255 area 0

R7(config)# router ospf 1
R7(config-router)# router-id 77.7.7.7
R7(config-router)# network 77.7.7.7 0.0.0.0 area 0
R7(config-router)# network 70.1.1.1 0.0.0.0 area 0

R3# show ip route vrf test

R3# ping 11.1.1.1


Step # 4 Redistribution

On R1, Routes which are learned via OSPF are now redistributed into BGP which is run in the MPLS domain.

R1(config)# router bgp 1
R1(config-router)# address-family ipv4 vrf test
R1(config-router)# redistribute ospf 10 match internal external

R3# show ip route vrf test

Now redistribute BGP into OSPF as routes reached to R3 but not R7 as on R7 we have OSPF, so redistribute BGP into OSPF.

R3(config)# router ospf 10
R3(config-router)# redistribute bgp 1 subnets

Now do the redistribution in reverse direction. Redistribute OSPF into BGP.

R3(config)# router bgp 1
R3(config-router)# address-family ipv4 vrf test
R3(config)# redistribute ospf 10 match internal external

R1(config)# router ospf 10
R1(config-router)#redistribute bgp 1 subnets


Verifications:

R5# ping 77.7.7.7
R5# traceroute 77.7.7.7

I hope this will be informative for you :)

Saturday, June 16, 2012

MPLS Traffic Engineering:: Part – 1 :: Theory

Whenever data is moved and we want the data not to follow the routing protocol dedicated path but to redirect to the path which we select for the traffic to follow. When we determined the path for traffic or data to follow so there are some concept on which Multiprotocol Label Switching - Traffic Engineering (MPLS-TE) is based:

When Routing Protocol is configured on a node it results about the interface parameters like Bandwidth information:

1. MPLS-TE also gives us some information like Bandwidth of the link, how much bandwidth is left (remaining) or Bandwidth is available. Basically it gives the link properties (all these are link constraints).

2. Protocol is needed which carry information and these information are carried by Link State Protocol either OSPF or IS-IS.

3. Constraint based SPF or Path Calculation algorithm is needed for the determination of best path to various routes. This CBSPF use many constraints for path selection other than bandwidth.

4. We have to make sure that the connectivity is available on that path which is selected for traffic. Resource Reservation Protocol (RSVP) is used to reserve bandwidth on the path. For example, we need 10 Mbps on a link, so RSVP ensures this much of bandwidth & RSVP also do the label, changing end-to-end changing (information).

Path Message: Which ensure Bandwidth?
Reserve Message: Confirmation of Bandwidth



In TE, the tunnel headed router decided which path the traffic should follow

a: The LSP Path/Tunnel is one way

b: TE Tunnel configuration is done on Head router, that’s why one way

c: We can use RSVP and LDP parallel like some traffic will pass through tunnel which will use Tunnel Label while some traffic will pass out of Tunnel which will use LDP Label.

d: We can have multiple Tunnels so we can have more than one label.



e: In MPLS TE we basically decided: How to allow the traffic in tunnel means How to route the traffic to the tunnel? & How to feed the traffic in Tunnel?

f: In TE we basically engineer, Like we select another path other than the path which is selected by routing protocols. Routing protocols select best path using only metric which TE use many other parameters for it.

I hope this will be informative for you !

Cheers :)

Sunday, April 15, 2012

Bidirectional Forwarding Detection (BFD)

Bidirectional Forwarding Detection (BFD) is a network protocol used to detect link failure between two nodes. This is great features used for link detection as it even detect failure for you on Layer-1 where mostly detection is not possible like on VC, tunnels, MPLS-LSP, Ethernet etc.

When BFD session is establishes between two nodes, & if there are more than twlo links exists b/w that two nodes so BFD can be used to monitor the session for these two nodes. BFD does not have a discovery mechanism, sessions must be explicitly configured between endpoints. For example, on Huawei NE40E, we can do like:

bfd to-NameOfNode-001 bind peer-ip default-ip interface GigabitEthernet1/1/1
discriminator local 809
discriminator remote 908
min-tx-interval 60
min-rx-interval 60
process-interface-status
commit


BFD may &/or can be used on many different transport mechanisms and layers. For this it needs to be encapsulated by whatever transport it uses. For example, MPLS-LSP, OSPF, IS-IS Protocols that support some form of adjacency setup.

BFD can be used in either asynchronous mode and demand mode.

I hope this will be informative for you.

Cheers :)

Wednesday, February 8, 2012

BFD Session status Changes to Down & Up

While working on DataCom Network (composed of hundreds of NE routers, configured with MPLS, IS-IS, QoS, MPLS-VPN, MPLS-TE, BGP and list goes on and on……..!, I saw this alarm “BFD Session status Changes to down” and “BFD Session status changes to up”. After doing some research, studying and help, I came to know about the root cause and main reason for this alarm.

There can be different reason for alarm to appear:

1. The status of the interface goes down on which the BFD session is established between the two peers.

2. The BFD peer session is deleted or shutdown explicitly.

3. The link is not able to forward packets because of congestion or may be the link status is down.

In my case it was NSA (Non-Service Affecting) and I just need to confirm the status so for that we need to remember few commands which are:


display interface [interface name]


display bfd session all

There are bundle of more commands, if you need any help regarding that please feel free to reach me.

Note: If you are not familiar about BFD? Wait for my next blog on BFD

I Hope this will be informative for you :)

Multiprotocol Label Switching Fast Reroute (MPLS FRR)

In actual MPLS FRR is a feature of RSVP-TE, it is also called MPLS local restoration or MPLS local protection. MPLS FRR gives protection to the LSP path in a network where each LSP is protected by backup path. The node which redirects traffic after path failure to the backup path is known as Point of Local Failure (PLR) and the node where backup LSP merger with primary LSP is called Merge Point (MP). This protection is purely local as compare to protection which is enable at IP Layer (Layer-3) which take a bit more time then this which is not acceptable in real time application (VoIP, Video Conferencing etc). This local protection takes even less than 50 ms.

There are two types of protection approaches:

1. One-to-One Local Protection

In one-to-one approach, PLR maintain a separate path for each LSP across the path or network. This method creates a detour LSP for each protected path at the point of each local failure. For more detail, study RFC 4090

2. Many-to-One Local Protection

In this method, PLR create a single path that can be used to protect multiple LSP. In this method a same tunnel can be used for multiple LSP which acts as a protected path for all links which face failure. See RFC 4090 for more details.




Refer to the figure above, we have Node-A and Node-E as the start and end point for which the primary path (LSP) is from Node-A to Node-E through Node-B and Node-D. While the secondary path for Node-A to reach Node-E is through Node-C. We assume that for primary path FRR is enabled & once it is enable all the remaining nodes on a network came to know about this feature. Assume the link between Node-D and Node-E is down by any means, so the first node who realize this breakdown is Node-D which immediately inform Node-B and Node-A. For Node-A to get the failure message it will take some time and Node-D already know about the link failure & FRR is enable for the LSP so Node-D will use the detour path for the communication (Node-D-C-E) to avoid any loss and get rid of the link failure which will carry the traffic to final destination. This whole process will take less than 50 ms. On the other hand when the backup path (secondary LSP) comes up, traffic will be switched to the secondary LSP and detour path will turn down.

I Hope this will be informative for you :)

Ref: RFC4090

Sunday, April 3, 2011

MPLS Configuration

Make sure “ip cef” is running by using “show running” command

R2(config) # ip cef
R2(config) # mpls label protocol ldp

To make LDP router-id (using loopback address)

R2(config) # mpls ldp router-id loopback 0

Perform these steps on R3 and R4 ?

We will enable MPLS on those interface on which neighbor exists.

R2(config) # interface serial 1/1
R2(config-if) # mpls ip

R3(config) # interface serial 1/0
R3(config-if) # mpls ip

R4(config) # interface serial 1/0
R4(config-if) # mpls ip


Operations and Verify

R2 # show mpls ldp discovery
R2 # show mpls interfaces

R2 # show mpls ldp neighbors
Min label: 16
As 0-15 are reserved

R2# show mpls ldp discovery detail

R2# show ip route-------------------------Control Plane

R2# show ip cef----------------------------Data Plane

R2# show mpls ldp bindings-----------LIB

1. Here we will see one local binding and one remote binding as we have one neighbor so onw remote binding

2. For directly connected it will assign implicit Null label
e.g. 2.0.0.0-------imp-null

For 10.0.0.0------------Local Binding 22
and Remote binding 23

R3# show mpls ldp binding
10.0.0.0--------Local Binding 23
Remote Binding 22

R4# show mpls ldp binding

1. Local and Remote can be same on R4.
2. On R4 for network 2.0.0.0------Local Binding 18
--------Remote binding “imp null”
This imp null means that R3 state that 2.0.0.0 is my directly connected so if you want to send some traffic for this network so remove the label as to get rid of the double lookup.

This was just a window to the MPLS configuration. I Hope this will be informative for you.

Cheers :)

What is MPLS ?

Here we go……! The very first blog from me on MPLS, I have a lot stuff to publish and write on many things but because of the hectic schedule I am unable to write things, anyway I will try to be regular now onwards. First let’s talk about what is this lovely term MPLS?? ? Anyone?? ? No Idea :( hmmm! Let me explain what this, “Multiprotocol Label Switching (MPLS) is a new forwarding mechanism in which packets are forwarded based on labels”. MPLS comes in to our life because of some problems in the traditional IP routing like:

1. Routing Lookup is performed on every hop (router)

2. When IP is carrying over ATM or Frame Relay so Layer-2 and Layer-3 topology many be different which results in the least best path or suboptimal path and link utilization.

3. At times data only goes through the primary link and not use the other link means we can’t do Traffic Engineering. In traditional IP routing we can do so by using PBR (Policy Based Routing) but that is strongly recommended not to use.
MPLS comes into our life and solve the Problems of traditional IP routing. MPLS is a layer 2.5 technology and it is called “Multiprotocol” because it supports forwarding of other protocol as well. If we can say that end of the day what MPLS will give us so we can say that “Optimization” and “Scalability”. Speed can never be in the definition of MPLS because now a day’s IP is also too fast because of the hardware enhancement.


Modes of Operation


1. MPLS use a 32-bit label field that is inserted between Layer-2 and Layer-3 header (Frame Mode).
2. MPLS over ATM use the ATM header as the label (Cell Mode).

MPLS Architecture

MPLS has two major components i.e. Control Plane and Data Plane

1. Control Plane: Exchange Layer-3 information and label
2. Data Plane: Forward packets based on Label

Let me briefly explain how the two planes behave when a packet comes to it:
a) When the incoming packet is IP based so request comes to RIB (control plane) which then consult FIB (data plane).
b) When the incoming packet is label so request comes to LIB (control plane) which then consult LFIB (data plane).
c) Outgoing packet doesn’t matter whether it is packet (IP) or label.

We can have total of four tables in MPLS, i.e. LIB, RIB, FIB and LFIB.

1. RIB (Routing Information Base)
2. LIB (Label Information Base)
3. FIB (Forwarding Information Base)
4. LFIB (Label Forwarding Information Base)

Label Format

MPLS uses 32-bit label field that contains the following information.
1. 20-bit Label
2. 3-bit experimental field and this is used for Quality of Service (QoS)
3. 1-bit bottom of stack indicator, this play role when we are using multiple label
4. 8-bit Time-to-live (TTL) field, when a packet is in a loop so it brings that out of that state.

Router Terminologies in MPLS Domain

1. Edge LSR (Label Switch Router), It can be either Egress LSR or Ingress LSR. The nature of the router depends on the flow of the data; a router can be Egress LSR or Ingress LSR at one time. For example data comes as IP based so the router which receive the IP packet is Ingress LSR at this point and forward the packet to the MPLS domain and on a router where this packet leaves the MPLS domain so that is Egress LSR. The duty of Edge LSR to received IP based packet and assign label and send to MPLS domain and vice versa.
2. LSR (Label Switch Router) which is in the MPLS domain and whose duty is to forward labeled packets means duty just include Label swapping and forwarding.

Label Switch Path (LSP)

LSP is the path which the packet follows forms the point where it enters the domain till it leaves the domain. LSP is unidirectional means from Router-A to Router-B we can have two LSP in opposite direction.
A very little and brief introduction to MPLS, I hope this will be informative for you. Soon you will get more blogs on it.

I Hope this will be informative for you !

Cheers :)