Saturday, June 9, 2012

Building MPLS Layer 3 VPN Series Part 2 - Building SP Core

So let's continue with Second Post of the series. In today's post we will be building SP Core. Which will include following:


1. Establishing the basic IP Connectivity in the SP Core.
2. Enabling CEF
3. Enabling Label Distribution Protocol
4. Enabling MPLS in the SP Core


So let's bring the topology quickly:






So let's first quickly setup the IP Connectivity between R1-R2-R3 (SP Core Devices)


%%%%%%%%%%%%%%%%%%%%%%%%%%



R1
###

!
en
!
conf t
!
ho R1
!
no ip domain-lookup
!
int f0/0
 ip add 12.12.12.1 255.255.255.0
 no sh
 exit
!
int lo0
 ip add 1.1.1.1 255.255.255.255
 exit
!
router ospf 500
 network 12.12.12.1 0.0.0.0 area 500
 network 1.1.1.1 0.0.0.0 area 500
 exit
!
end
!
wr
!

*********************************

R2
###

!
en
!
conf t
!
ho R2
!
no ip domain-lookup
!
int lo0
 ip add 2.2.2.2 255.255.255.255
 exit
!
int f0/0
 ip add 12.12.12.2 255.255.255.0
 no sh
 exit
!
int f1/0
 ip add 23.23.23.2 255.255.255.0
 no sh
 exit
!
router ospf 500
 net 12.12.12.2 0.0.0.0 area 500
 net 23.23.23.2 0.0.0.0 area 500
 net 2.2.2.2 0.0.0.0 area 500
 exit
!
end
!
wr
!

*********************************

R3
###

!
en
!
conf t
!
ho R3
!
no ip do lo
!
int lo0
 ip add 3.3.3.3 255.255.255.255
 exit
!
int f0/0
 ip add 23.23.23.3 255.255.255.0
 no sh
 exit
!
router ospf 500
 net 3.3.3.3 0.0.0.0 area 500
 net 23.23.23.3 0.0.0.0 area 500 
 exit
!
end
!
wr
!

%%%%%%%%%%%%%%%%%%%%%%%%%%



Next let's quickly verify the connectivity:


R1#ping 3.3.3.3 source loopback0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/62/116 ms


R3#ping 1.1.1.1 so lo0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 3.3.3.3
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/52/80 ms


So far so good ? ...... ;-)

Let's proceed with enabling the MPLS in SP Core Network:

Step 1 > Will be to enable CEF globally on the router. Though CEF is by default  enabled on Cisco Routers these days. But it never hurts to type one small command which can save your whole day. Specially it will be something stupid when you find that everything in MPLS VPN was setup correctly and in last you find that it was only CEF which was disabled. Which caused MPLS VPN to fail.


R1(config)#ip cef


Step 2 > Is to Enable Label distribution protocol. There are technically 4 protocols which can help with this named as  - TDP (Tag Distribution Protocol - Cisco Proprietary), LDP (Label Distribution Protocol), BGP & RSVP. TDP is Cisco baby so most likely not going to appear in R&S Lab. LDP on the other hand is industry standard which most likely you gonna find on exam. Using BGP/RSVP for label distribution is out of scope from R&S Lab prospective.

R1(config)#mpls label protocol ?
  ldp  Use LDP (default)
  tdp  Use TDP

R1(config)#mpls label protocol ldp

Next we fix Router ID that LDP will be using:

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


Step 3 > Enable MPLS on SP Core Interfaces:

R1(config)#int f0/0
R1(config-if)#mpls ip
R1(config-if)#exit


Lets follow the same steps on R2/R3 :

R2(config)#ip cef
R2(config)#mpls label protocol ldp
R2(config)#mpls ldp router-id loopback0
R2(config)#int f0/0
R2(config-if)#mpls ip
R2(config-if)#exit
R2(config)#int f1/0
R2(config-if)#mpls ip
R2(config-if)#exit

R3(config)#ip cef
R3(config)#mpls label protocol ldp
R3(config)#mpls ldp router-id loopback0
R3(config)#int f0/0
R3(config-if)#mpls ip
R3(config-if)#exit

Let's quickly verify the LDP sessions and other basic MPLS configuration:

R1#sh mpls interfaces
Interface                   IP            Tunnel   Operational
FastEthernet0/0        Yes (ldp)     No       Yes


R1#sh mpls ldp neighbor
    Peer LDP Ident: 2.2.2.2:0; Local LDP Ident 1.1.1.1:0
        TCP connection: 2.2.2.2.46225 - 1.1.1.1.646
        State: Oper; Msgs sent/rcvd: 15/15; Downstream
        Up time: 00:06:23
        LDP discovery sources:
          FastEthernet0/0, Src IP addr: 12.12.12.2
        Addresses bound to peer LDP Ident:
          12.12.12.2      23.23.23.2      2.2.2.2


R2#sh mpls interfaces
Interface              IP            Tunnel   Operational
FastEthernet0/0        Yes (ldp)     No       Yes
FastEthernet1/0        Yes (ldp)     No       Yes


R2#sh mpls ldp neighbor
    Peer LDP Ident: 1.1.1.1:0; Local LDP Ident 2.2.2.2:0
        TCP connection: 1.1.1.1.646 - 2.2.2.2.46225
        State: Oper; Msgs sent/rcvd: 16/16; Downstream
        Up time: 00:07:01
        LDP discovery sources:
          FastEthernet0/0, Src IP addr: 12.12.12.1
        Addresses bound to peer LDP Ident:
          12.12.12.1      1.1.1.1
    Peer LDP Ident: 3.3.3.3:0; Local LDP Ident 2.2.2.2:0
        TCP connection: 3.3.3.3.64294 - 2.2.2.2.646
        State: Oper; Msgs sent/rcvd: 14/14; Downstream
        Up time: 00:05:19
        LDP discovery sources:
          FastEthernet1/0, Src IP addr: 23.23.23.3
        Addresses bound to peer LDP Ident:
          23.23.23.3      3.3.3.3

R3#sh mpls interfaces
Interface              IP            Tunnel   Operational
FastEthernet0/0        Yes (ldp)     No       Yes

R3#sh mpls ldp neighbor
    Peer LDP Ident: 2.2.2.2:0; Local LDP Ident 3.3.3.3:0
        TCP connection: 2.2.2.2.646 - 3.3.3.3.64294
        State: Oper; Msgs sent/rcvd: 15/15; Downstream
        Up time: 00:06:04
        LDP discovery sources:
          FastEthernet0/0, Src IP addr: 23.23.23.2
        Addresses bound to peer LDP Ident:
          12.12.12.2      23.23.23.2      2.2.2.2


So last step for today - Let's quickly verify MPLS Label operation using traceroute command:


R1#traceroute 3.3.3.3 source loopback 0

Type escape sequence to abort.
Tracing the route to 3.3.3.3

  1 12.12.12.2 [MPLS: Label 17 Exp 0] 140 msec 132 msec 128 msec
  2 23.23.23.3 152 msec *  144 msec


R3#traceroute 1.1.1.1 source loopback 0

Type escape sequence to abort.
Tracing the route to 1.1.1.1

  1 23.23.23.2 [MPLS: Label 16 Exp 0] 212 msec 228 msec 144 msec
  2 12.12.12.1 64 msec *  132 msec


So far so cool.

In Next Post we will be setting up Normal BGP Session and VRF Sessions.

Stay Tuned.........

HTH...
Deepak Arora
Evil CCIE

No comments: