Thursday, June 16, 2011

Basic MPLS Cloud config on Cisco 3640

This is the testing configuration that I have tried in GNS3. I have used 6 number of Cisco 3640 routers for simulating the MPLS cloud. The network is as shown in the above diagram.
Router R3,R4,R5,R6 are provider routers (LSRs) , R3 and R7 are the Provider Edge Routers (LERs) meanwhile the routers R1 and R8 are Customer Edge routers.

Label distribution protocol used in this scenario is LDP and the IGP used is OSPF. The customer edge routers are having single static route for the remote Customer end network.

Configurations : (Note: Only added the necessary config for shortness of the article)

------------
R1 :

!
interface Ethernet0/0
 ip address 192.168.1.1 255.255.255.252
 !
ip route 172.16.1.0 255.255.255.252 192.168.1.2
!
!
--------------------
R2:
!
ip cef
no ip domain lookup
!
!
mpls label range 300 400
mpls label protocol ldp
!
interface Loopback1
 ip address 2.2.2.2 255.255.255.255
!
interface Ethernet0/0
 ip address 3.2.1.2 255.255.255.252
 half-duplex
 mpls ip
!
interface Ethernet0/1
 ip address 2.4.1.1 255.255.255.252
 half-duplex
 mpls ip
!
interface Ethernet0/2
 ip address 2.5.1.1 255.255.255.252
 half-duplex
 mpls ip
!
interface Ethernet0/3
 no ip address
 shutdown
 half-duplex
!
router ospf 1
 log-adjacency-changes
 network 2.2.2.2 0.0.0.0 area 0
 network 2.4.1.0 0.0.0.3 area 0
 network 2.5.1.0 0.0.0.3 area 0
 network 3.2.1.0 0.0.0.3 area 0

!
!
!
!
mpls ldp router-id Loopback1
!
 ------------------
R3:

ip cef
!
!
mpls label range 100 200
mpls label protocol ldp
!
!
interface Loopback1
 ip address 3.3.3.3 255.255.255.255
!
interface Ethernet0/0
 ip address 192.168.1.2 255.255.255.252
 half-duplex
!
interface Ethernet0/1
 ip address 3.2.1.1 255.255.255.252
 half-duplex
 mpls ip
!
interface Ethernet0/2
 ip address 3.5.1.1 255.255.255.252
 half-duplex
 mpls ip
!
interface Ethernet0/3
 no ip address
 shutdown
 half-duplex
!
router ospf 1
 log-adjacency-changes
 network 3.2.1.0 0.0.0.3 area 0
 network 3.3.3.3 0.0.0.0 area 0
 network 3.5.1.0 0.0.0.3 area 0
 network 192.168.1.0 0.0.0.3 area 0
!
!
mpls ldp router-id Loopback 1
 ---------------------
R4:

ip cef
no ip domain lookup
!
!
mpls label range 700 800
mpls label protocol ldp
!
!
interface Loopback1
 ip address 4.4.4.4 255.255.255.255
!
interface Ethernet0/0
 ip address 2.4.1.2 255.255.255.252
 half-duplex
 mpls ip
!
interface Ethernet0/1
 ip address 4.6.1.1 255.255.255.252
 half-duplex
 mpls ip
!
interface Ethernet0/2
 ip address 4.7.1.1 255.255.255.252
 half-duplex
 mpls ip
!
interface Ethernet0/3
 no ip address
 shutdown
 half-duplex
!
router ospf 1
 log-adjacency-changes
 network 2.4.1.0 0.0.0.3 area 0
 network 4.4.4.4 0.0.0.0 area 0
 network 4.6.1.0 0.0.0.3 area 0
 network 4.7.1.0 0.0.0.3 area 0
!
mpls ldp router-id Loopback1
----------------------
R5:

ip cef
!
!
mpls label range 500 600
mpls label protocol ldp
!
!
interface Loopback1
 ip address 5.5.5.5 255.255.255.255
!
interface Ethernet0/0
 ip address 2.5.1.2 255.255.255.252
 half-duplex
 mpls ip
!
interface Ethernet0/1
 ip address 5.6.1.1 255.255.255.252
 half-duplex
 mpls ip
!
interface Ethernet0/2
 ip address 3.5.1.2 255.255.255.252
 half-duplex
 mpls ip
!
interface Ethernet0/3
 no ip address
 shutdown
 half-duplex
!
router ospf 1
 log-adjacency-changes
 network 2.5.1.0 0.0.0.3 area 0
 network 3.5.1.0 0.0.0.3 area 0
 network 5.5.5.5 0.0.0.0 area 0
 network 5.6.1.0 0.0.0.3 area 0
!
--------------

R6:
!
ip cef
no ip domain lookup
!
!
mpls label range 900 1000
mpls label protocol ldp
!
!
interface Loopback1
 ip address 6.6.6.6 255.255.255.255
!
interface Ethernet0/0
 ip address 5.6.1.2 255.255.255.252
 half-duplex
 mpls ip
!
interface Ethernet0/1
 ip address 4.6.1.2 255.255.255.252
 half-duplex
 mpls ip
!
interface Ethernet0/2
 ip address 6.7.1.1 255.255.255.252
 half-duplex
 mpls ip
!
interface Ethernet0/3
 no ip address
 shutdown
 half-duplex
!
router ospf 1
 log-adjacency-changes
 network 4.6.1.0 0.0.0.3 area 0
 network 5.6.1.0 0.0.0.3 area 0
 network 6.6.6.6 0.0.0.0 area 0
 network 6.7.1.0 0.0.0.3 area 0
!
-----------------
R7:
!
ip cef

!
mpls label range 1100 1200
mpls label protocol ldp
!
interface Loopback1
 ip address 7.7.7.7 255.255.255.255
!
interface Ethernet0/0
 ip address 4.7.1.2 255.255.255.252
 half-duplex
 mpls ip
!
interface Ethernet0/1
 ip address 6.7.1.2 255.255.255.252
 half-duplex
 mpls ip
!
interface Ethernet0/2
 ip address 172.16.1.2 255.255.255.252
 half-duplex
!
interface Ethernet0/3
 no ip address
 shutdown
 half-duplex
!
router ospf 1
 log-adjacency-changes
 network 4.7.1.0 0.0.0.3 area 0
 network 6.7.1.0 0.0.0.3 area 0
 network 7.7.7.7 0.0.0.0 area 0
 network 172.16.1.0 0.0.0.3 area 0
!
mpls ldp router-id Loopback1
----------
R8:

!
interface Ethernet0/0
 ip address 172.16.1.1 255.255.255.252
 half-duplex
!
ip route 192.168.1.0 255.255.255.252 172.16.1.2


To test the end to end connectivity try pinging from R1 to R8..!! (In this scenario it works.....if you dont like to take my word for it you may check the same with GNS3 at your end too with the same steps).

Outputs of "show mpls forwarding-table" command in Provider routers :
R2 :                                                                          












R5:











R4:











R6:












You can tryout the traceroute command to check the LSP(label switches path) that the packets are taking.


Njoy..!!!

No comments:

Post a Comment