Wednesday 12 August 2009

My First MPLS blog

I have a feeling ill be doing a few of these, MPLS is such a huge topic that simply doing a few labs does not seem to do it justice, however its better than doing none at all!

After playing around with my real lab a little I decided to virtualise this one, not to be confused with a router simulator, GNS is a great tool for knocking up a lab and playing around with ideas.

In light of that this is my latest idea:



One of the fun this that this lab was able to do was to separate the OSPF router ID from the MPLS traffic engineering router ID, this was done to hopefully better show which error/events were MPLS related those that were OSPF related and those that were a result of OSPF-TE.


I would kinda of expect you to be able to setup ip connectivity between the routers by now, after all this is basically CCIE stuff :)

Most of the below is fairly standard OSPF, however it is important to note the areas that I place the OSPF-TE router-ID and the OSPF router ID.

Setting up OSPF:
R2:

router ospf 1
router-id 2.2.2.2
log-adjacency-changes
network 2.2.2.2 0.0.0.0 area 2
network 10.0.23.0 0.0.0.255 area 0
network 10.0.24.0 0.0.0.255 area 0
network 192.168.12.0 0.0.0.255 area 12


R3

router ospf 1
router-id 3.3.3.3
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 3
network 10.0.23.0 0.0.0.255 area 0
network 10.0.35.0 0.0.0.255 area 0
!



R4

router ospf 1
router-id 4.4.4.4
log-adjacency-changes
network 4.4.4.4 0.0.0.0 area 4
network 10.0.24.0 0.0.0.255 area 0
network 10.0.45.0 0.0.0.255 area 0
!



R5

router ospf 1
router-id 5.5.5.5
log-adjacency-changes
passive-interface FastEthernet2/0
network 5.5.5.5 0.0.0.0 area 5
network 10.0.35.0 0.0.0.255 area 0
network 10.0.45.0 0.0.0.255 area 0
network 192.168.56.0 0.0.0.255 area 56
!


Ok thats ospf done.

Now MPLS, first step is to setup another loopback for MPLS and bring it into MPLS.

R2

! global
mpls traffic-eng tunnels
!
interface Loopback1
ip address 20.20.20.20 255.255.255.255
!
router ospf 1
mpls traffic-eng router-id Loopback1
mpls traffic-eng area 0

router-id 2.2.2.2
log-adjacency-changes
network 2.2.2.2 0.0.0.0 area 2
network 10.0.23.0 0.0.0.255 area 0
network 10.0.24.0 0.0.0.255 area 0
network 20.20.20.20 0.0.0.0 area 0
network 192.168.12.0 0.0.0.255 area 12
!


Now we could cheat and use "mpls ldp autoconfig area 0" here to enable LDP on all the area 0 interfaces however I like to do it manually.
While we're in the interface mode we might as well configure RSVP too :)


interface FastEthernet1/1
ip address 10.0.23.2 255.255.255.0
duplex auto
speed auto
mpls traffic-eng tunnels
mpls ip

ip rsvp bandwidth 75000 75000
!
interface FastEthernet2/0
ip address 10.0.24.2 255.255.255.0
duplex auto
speed auto
mpls traffic-eng tunnels
mpls ip

ip rsvp bandwidth 75000 75000
!




R3

mpls traffic-eng tunnels
interface Loopback1
ip address 30.30.30.30 255.255.255.255
!
interface FastEthernet1/0
ip address 10.0.23.3 255.255.255.0
duplex auto
speed auto
mpls traffic-eng tunnels
mpls ip
ip rsvp bandwidth 75000 75000
!
interface FastEthernet1/1
ip address 10.0.35.3 255.255.255.0
duplex auto
speed auto
mpls traffic-eng tunnels
mpls ip
ip rsvp bandwidth 75000 75000
!
router ospf 1
mpls traffic-eng router-id Loopback1
mpls traffic-eng area 0
router-id 3.3.3.3
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 3
network 10.0.23.0 0.0.0.255 area 0
network 10.0.35.0 0.0.0.255 area 0
network 30.30.30.30 0.0.0.0 area 0
!


R4
!
mpls traffic-eng tunnels
!
!
interface Loopback1
ip address 40.40.40.40 255.255.255.255
!
interface FastEthernet1/0
ip address 10.0.24.4 255.255.255.0
duplex auto
speed auto
mpls traffic-eng tunnels
mpls ip
ip rsvp bandwidth 75000 75000
!
interface FastEthernet1/1
ip address 10.0.45.4 255.255.255.0
duplex auto
speed auto
mpls traffic-eng tunnels
mpls ip
ip rsvp bandwidth 75000 75000
!
router ospf 1
mpls traffic-eng router-id Loopback1
mpls traffic-eng area 0
router-id 4.4.4.4
log-adjacency-changes
network 4.4.4.4 0.0.0.0 area 4
network 10.0.24.0 0.0.0.255 area 0
network 10.0.45.0 0.0.0.255 area 0
network 40.40.40.40 0.0.0.0 area 0
!



R5
mpls traffic-eng tunnels
!
interface Loopback1
ip address 50.50.50.50 255.255.255.255
!
!
interface FastEthernet1/0
ip address 10.0.35.5 255.255.255.0
duplex auto
speed auto
mpls traffic-eng tunnels
mpls ip
ip rsvp bandwidth 75000 75000
!
interface FastEthernet1/1
ip address 10.0.45.5 255.255.255.0
duplex auto
speed auto
mpls traffic-eng tunnels
mpls ip
ip rsvp bandwidth 75000 75000
!
!
router ospf 1
mpls traffic-eng router-id Loopback1
mpls traffic-eng area 0
router-id 5.5.5.5
log-adjacency-changes
passive-interface FastEthernet2/0
network 5.5.5.5 0.0.0.0 area 5
network 10.0.35.0 0.0.0.255 area 0
network 10.0.45.0 0.0.0.255 area 0
network 50.50.50.50 0.0.0.0 area 0
network 192.168.56.0 0.0.0.255 area 56
!


Now the actual Tunnels!
As they are uni-directional we need one from R2-R5 and another from R5-R2

R2-R5
interface Tunnel1
ip unnumbered Loopback1
mpls traffic-eng tunnels
tunnel destination 50.50.50.50
tunnel mode mpls traffic-eng
tunnel mpls traffic-eng autoroute announce
tunnel mpls traffic-eng priority 1 1
tunnel mpls traffic-eng bandwidth 256
tunnel mpls traffic-eng path-option 1 explicit name R2-R3-R5
!
ip explicit-path name R2-R3-R5 enable
next-address 10.0.23.3
next-address 10.0.35.5
!

and R5-R2:
!
ip explicit-path name R5-R3-R2 enable
next-address 10.0.35.3
next-address 10.0.23.2
!

Proving it works!......


R6#ping 192.168.12.1 repeat 2

Type escape sequence to abort.
Sending 2, 100-byte ICMP Echos to 192.168.12.1, timeout is 2 seconds:
!!
Success rate is 100 percent (2/2), round-trip min/avg/max = 44/48/52 ms


Results of an "debug mpls packet" from R3:

R3#
*Aug 12 20:23:59.407: MPLS turbo: Fa1/1: rx: Len 118 Stack {23 0 254} - ipv4 data
*Aug 12 20:23:59.427: MPLS turbo: Fa1/0: rx: Len 118 Stack {22 0 254} - ipv4 data
*Aug 12 20:23:59.459: MPLS turbo: Fa1/1: rx: Len 118 Stack {23 0 254} - ipv4 data
*Aug 12 20:23:59.491: MPLS turbo: Fa1/0: rx: Len 118 Stack {22 0 254} - ipv4 data


Note all 4 packets using the same route and all MPLS switched.
..and one final test:


R6#trace 192.168.12.1

Type escape sequence to abort.
Tracing the route to 192.168.12.1

1 192.168.56.5 28 msec 16 msec 4 msec
2 10.0.35.3 [MPLS: Label 23 Exp 0] 28 msec 12 msec 12 msec
3 10.0.23.2 28 msec 32 msec 12 msec
4 192.168.12.1 32 msec



Done!

1 comment:

Unknown said...

Nice Info, keep it up.