Thursday, December 4, 2014

Enable MPLS and configure LDP on Cisco Router.

Aim : Enable MPLS and configure LDP on Cisco Router.

In this tutorial:
  • Enable MPLS on Cisco 7200
  • Configure LDP
  • Verify the label generation and mapping using show cmd.

Network diagram:



Prerequisites / Considerations
 
  • Loopback 0 interfaces are configured with x.x.x.x/32 IP address on all routers.
  • FastEthernet interfaces are configured with correct IP address on all routers.
  • OSPF is up and running and able to reach all the subnets in network diagram.
  • IOS : 12.4

Configuration on router R1

 
! ######## R1 ########
config t

! Step 1 : Enable CEF (from IOS 12.2 onwards this will enabled by default)
ip cef

! Step 2 : Enable MPLS on global configuration level
mpls ip

! Step 3 : Enable LDP for MPLS protocol
mpls label pro ldp

! Step 4 : Limit label range form 100 to 199
mpls label range 100 199

! Step 5 : Set RID = loopback 0
mpls ldp router loop 0

! Step 5 : Enable MPLS on interface level
int fa 0/0
mpls ip

! Exit out configuration menu and save changes.
end
wr

! ######## END R1 ########

Configuration on router R2

! ######## R2 ########
config t

! Step 1 : Enable CEF (from IOS 12.2 onwards this will enabled by default)
ip cef

! Step 2 : Enable MPLS on global configuration level
mpls ip

! Step 3 : Enable LDP for MPLS protocol
mpls label pro ldp

! Step 4 : Limit label range form 200 to 299
mpls label range 200 299

! Step 5 : Set RID = loopback 0
mpls ldp router loop 0

! Step 5 : Enable MPLS on interface level
int fa 0/0
mpls ip

int fa 0/1
mpls ip

! Exit out configuration menu and save changes.
end
wr

! ######## END R2 ########

Configuration on router R3

! ######## R3 ########
config t

! Step 1 : Enable CEF (from IOS 12.2 onwards this will enabled by default)
ip cef

! Step 2 : Enable MPLS on global configuration level
mpls ip

! Step 3 : Enable LDP for MPLS protocol
mpls label pro ldp

! Step 4 : Limit label range form 300 to 399
mpls label range 300 399

! Step 5 : Set RID = loopback 0
mpls ldp router loop 0

! Step 5 : Enable MPLS on interface level
int fa 0/0
mpls ip

int fa 0/1
mpls ip

! Exit out configuration menu and save changes.
end
wr

! ######## END R3 ########

Configuration on router R4

! ######## R4 ########
config t

! Step 1 : Enable CEF (from IOS 12.2 onwards this will enabled by default)
ip cef

! Step 2 : Enable MPLS on global configuration level
mpls ip

! Step 3 : Enable LDP for MPLS protocol
mpls label pro ldp

! Step 4 : Limit label range form 400 to 499
mpls label range 400 499

! Step 5 : Set RID = loopback 0
mpls ldp router loop 0

! Step 5 : Enable MPLS on interface level
int fa 0/1
mpls ip

! Exit out configuration menu and save changes.
end
wr

! ######## END R4 ########

Show cmds to verify MPLS - LDP

Note : Various show cmds are demonstrated in this section contains cmd output for router R2 only.
R2#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/2] via 10.1.2.1, 00:28:57, FastEthernet0/1
     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/2] via 10.2.3.3, 00:25:20, FastEthernet0/0
     4.0.0.0/32 is subnetted, 1 subnets
O       4.4.4.4 [110/3] via 10.2.3.3, 00:24:04, FastEthernet0/0
     10.0.0.0/24 is subnetted, 3 subnets
C       10.1.2.0 is directly connected, FastEthernet0/1
C       10.2.3.0 is directly connected, FastEthernet0/0
O       10.3.4.0 [110/2] via 10.2.3.3, 00:25:20, FastEthernet0/0
R2#
R2#show mpls ldp bindings
  tib entry: 1.1.1.1/32, rev 8
        local binding:  tag: 200
        remote binding: tsr: 1.1.1.1:0, tag: imp-null
        remote binding: tsr: 3.3.3.3:0, tag: 301
  tib entry: 2.2.2.2/32, rev 2
        local binding:  tag: imp-null
        remote binding: tsr: 1.1.1.1:0, tag: 100
        remote binding: tsr: 3.3.3.3:0, tag: 300
  tib entry: 3.3.3.3/32, rev 10
        local binding:  tag: 201
        remote binding: tsr: 3.3.3.3:0, tag: imp-null
        remote binding: tsr: 1.1.1.1:0, tag: 102
  tib entry: 4.4.4.4/32, rev 14
        local binding:  tag: 203
        remote binding: tsr: 1.1.1.1:0, tag: 104
        remote binding: tsr: 3.3.3.3:0, tag: 303
  tib entry: 10.1.2.0/24, rev 4
        local binding:  tag: imp-null
        remote binding: tsr: 1.1.1.1:0, tag: imp-null
        remote binding: tsr: 3.3.3.3:0, tag: 302
  tib entry: 10.2.3.0/24, rev 6
        local binding:  tag: imp-null
        remote binding: tsr: 1.1.1.1:0, tag: 101
        remote binding: tsr: 3.3.3.3:0, tag: imp-null
  tib entry: 10.3.4.0/24, rev 12
        local binding:  tag: 202
        remote binding: tsr: 3.3.3.3:0, tag: imp-null
        remote binding: tsr: 1.1.1.1:0, tag: 103
R2#
R2#sh mpls ip binding
  1.1.1.1/32
        in label:     200
        out label:    imp-null  lsr: 1.1.1.1:0        inuse
        out label:    301       lsr: 3.3.3.3:0
  2.2.2.2/32
        in label:     imp-null
        out label:    100       lsr: 1.1.1.1:0
        out label:    300       lsr: 3.3.3.3:0
  3.3.3.3/32
        in label:     201
        out label:    imp-null  lsr: 3.3.3.3:0        inuse
        out label:    102       lsr: 1.1.1.1:0
  4.4.4.4/32
        in label:     203
        out label:    104       lsr: 1.1.1.1:0
        out label:    303       lsr: 3.3.3.3:0        inuse
  10.1.2.0/24
        in label:     imp-null
        out label:    imp-null  lsr: 1.1.1.1:0
        out label:    302       lsr: 3.3.3.3:0
  10.2.3.0/24
        in label:     imp-null
        out label:    101       lsr: 1.1.1.1:0
        out label:    imp-null  lsr: 3.3.3.3:0
  10.3.4.0/24
        in label:     202
        out label:    imp-null  lsr: 3.3.3.3:0        inuse
        out label:    103       lsr: 1.1.1.1:0
R2#
R2#sh mpls forwarding-table
Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop
tag    tag or VC   or Tunnel Id      switched   interface
200    Pop tag     1.1.1.1/32        0          Fa0/1      10.1.2.1
201    Pop tag     3.3.3.3/32        0          Fa0/0      10.2.3.3
202    Pop tag     10.3.4.0/24       0          Fa0/0      10.2.3.3
203    303         4.4.4.4/32        0          Fa0/0      10.2.3.3
R2#

R2#
R2#sh mpls forwarding-table detail
Local  Outgoing    Prefix            Bytes tag  Outgoing   Next Hop
tag    tag or VC   or Tunnel Id      switched   interface
200    Pop tag     1.1.1.1/32        0          Fa0/1      10.1.2.1
        MAC/Encaps=14/14, MRU=1504, Tag Stack{}
        CA0002C40008CA0102C400068847
        No output feature configured
    Per-packet load-sharing
201    Pop tag     3.3.3.3/32        0          Fa0/0      10.2.3.3
        MAC/Encaps=14/14, MRU=1504, Tag Stack{}
        CA020AE80006CA0102C400088847
        No output feature configured
    Per-packet load-sharing
202    Pop tag     10.3.4.0/24       0          Fa0/0      10.2.3.3
        MAC/Encaps=14/14, MRU=1504, Tag Stack{}
        CA020AE80006CA0102C400088847
        No output feature configured
    Per-packet load-sharing
203    303         4.4.4.4/32        0          Fa0/0      10.2.3.3
        MAC/Encaps=14/18, MRU=1500, Tag Stack{303}
        CA020AE80006CA0102C400088847 0012F000
        No output feature configured
    Per-packet load-sharing
R2#

Full configuration for above network diagram:

 
Disclaimer
Information above is either from RFCs or it's Googled. This blog is result of my enthusiasm, desire and hard work to lean networking and share my leanings. Most of the times I’ll be using GNS3 network simulator. All I've here is collection of my findings, thanks to Google. Please do not ask for any of the software from CISCO/Juniper, it's better to Google it and try your luck.

No comments:

Post a Comment