Basics of MPLS Core Configuration





In this blog, I'll tell you how to configure the basic MPLS on the Core. Before we begin with the MPLS configuration, we should make sure that all nodes are reachable from each other. In the above topology, i've already configured ip configuration as per the IP addresses shown in the diagram, ibgp & eigrp in the core and ebgp in the external links. Hence, i can reach to anynode from anynode in the above diagram. Why the reachability is needed? thats because MPLS uses labels to switch the packets and those labels are distributed using the tcp 646 for ldp. However, while discovering the label distribution protocol neighbors, hello packets are exchanged using udp.
Now, lets configure the MPLS ldp in the above core:
on R1(PE):
R1#config t
R1(config)#mpls ip
R1(config)#inetrface FastEthernet 0/0
R1(config-if)#mpls ip
R1(config-if)#inetrface FastEthernet 2/0
R1(config-if)#mpls ip
R1(config-if)#end
R1#wr mem

On R6(PE):
R6#config t
R6(config)#mpls ip
R6(config)#inetrface FastEthernet 1/0
R6(config-if)#mpls ip
R6(config-if)#inetrface FastEthernet 1/1
R6(config-if)#mpls ip
R6(config-if)#end
R6#wr mem

On R3(PE):
R3#config t
R3(config)#mpls ip
R3(config)#inetrface FastEthernet 0/0
R3(config-if)#mpls ip
R3(config-if)#inetrface FastEthernet 2/0
R3(config-if)#mpls ip
R3(config-if)#end
R3#wr mem

On R2(P):

R2#config t
R2(config)#mpls ip
R2(config)#inetrface FastEthernet 0/0
R2(config-if)#mpls ip
R2(config-if)#inetrface FastEthernet 1/0
R2(config-if)#mpls ip
R2(config-if)#end
R2#wr mem

Thats all for the basic mpls configuration.Now the packet switching within the core(yellow shaded region) is faster with the labels.
We can verify if the packet switching is really happening with the labels using traceroute. Here is the result of traceroute from R7 to R4:
R7#traceroute 4.4.4.4
Type escape sequence to abort.
Tracing the route to 4.4.4.4

  1 70.70.70.6 32 msec 24 msec 20 msec
  2 40.40.40.1 [AS 100] [MPLS: Label 27 Exp 0] 88 msec 100 msec 84 msec
  3 10.10.10.2 [AS 100] [MPLS: Label 28 Exp 0] 88 msec 84 msec 88 msec
  4 20.20.20.3 [AS 100] [MPLS: Label 36 Exp 0] 84 msec 84 msec 84 msec
  5 30.30.30.4 [AS 100] 88 msec *  88 msec

Yes, it's using label switching in the core because you could see the Labels in the results above.

MPLS forms Label information base & label forwarding table. Label information base has information like what label is assigned to what prefix.  Label forwarding table has the information like for a specific prefix whats the incomming label & whats the outgoing label to use.

For the above configuration lets check the label information base & label forwarding base.
R1#show mpls ip binding
  1.1.1.1/32
in label:     imp-null
out label:    16        lsr: 6.6.6.6:0    
out label:    26        lsr: 2.2.2.2:0    
  2.2.2.2/32
in label:     25      
out label:    17        lsr: 6.6.6.6:0    
out label:    imp-null  lsr: 2.2.2.2:0        inuse
  3.3.3.3/32
in label:     26      
out label:    18        lsr: 6.6.6.6:0    
out label:    27        lsr: 2.2.2.2:0        inuse
  4.4.4.4/32
in label:     27      
out label:    19        lsr: 6.6.6.6:0    
out label:    28        lsr: 2.2.2.2:0        inuse
  5.5.5.5/32
in label:     28      
out label:    20        lsr: 6.6.6.6:0    
out label:    29        lsr: 2.2.2.2:0    

R1#show mpls forwarding-table 
Local  Outgoing      Prefix            Bytes Label   Outgoing   Next Hop    
Label  Label or VC   or Tunnel Id      Switched      interface              
25     Pop Label     2.2.2.2/32        7492          Fa0/0      10.10.10.2  
26     27            3.3.3.3/32        17803         Fa0/0      10.10.10.2  
27     28            4.4.4.4/32        1728          Fa0/0      10.10.10.2  
28     No Label      5.5.5.5/32        0             Fa1/0      50.50.50.5  
29     Pop Label     6.6.6.6/32        23998         Fa2/0      40.40.40.6  
30     21            7.7.7.7/32        8068          Fa2/0      40.40.40.6  
31     Pop Label     20.20.20.0/24     0             Fa0/0      10.10.10.2  
32     32            30.30.30.0/24     0             Fa0/0      10.10.10.2  
33     Pop Label     60.60.60.0/24     0             Fa2/0      40.40.40.6  

R1#show mpls ldp neighbor 
    Peer LDP Ident: 6.6.6.6:0; Local LDP Ident 1.1.1.1:0
TCP connection: 6.6.6.6.43174 - 1.1.1.1.646
State: Oper; Msgs sent/rcvd: 84/84; Downstream
Up time: 00:59:38
LDP discovery sources:
 FastEthernet2/0, Src IP addr: 40.40.40.6
        Addresses bound to peer LDP Ident:
          70.70.70.6      40.40.40.6      60.60.60.6      6.6.6.6         
    Peer LDP Ident: 2.2.2.2:0; Local LDP Ident 1.1.1.1:0
TCP connection: 2.2.2.2.26962 - 1.1.1.1.646
State: Oper; Msgs sent/rcvd: 83/83; Downstream
Up time: 00:59:08
LDP discovery sources:
 FastEthernet0/0, Src IP addr: 10.10.10.2
        Addresses bound to peer LDP Ident:
          10.10.10.2      20.20.20.2      2.2.2.2   

Thats all you are done with mpls basics! have fun!! I'll be right back with my another blog on MPLS with VPNs,stay tunned !!!
I'm really lazy typing ... so please adjust yourself with my sentences/presentation :P 

Comments