Sunday, 6 September 2009

MPLS Lab Part 1

I'm currently studying MPLS for the CCIP qualification so will be putting up a series of articles on building a basic service-provider network to test various MPLS configurations.

The first article puts together a simple WAN running OSPF.


The network will look as below:



(These diagrams are all created using the excellent open source software dia)


The idea here is simply to get the provider part of the network up and running. The links are all using /30 masks and the core links are all using serial lines in this case (because I have plenty of WIC cards and no ethernet cards). It's actually a very simple OSPF network with everything in area 0 and MPLS enabled on all of the interfaces.

Because there are diverse routes across the network from PE-PE, there are two entries in the routing table, e.g. 10.255.255.52 (PE2) from PE1:

PE1#sh ip route 10.255.255.52
Routing entry for 10.255.255.52/32
Known via "ospf 1", distance 110, metric 129, type intra area
Last update from 10.0.0.6 on Serial0/1, 00:00:54 ago
Routing Descriptor Blocks:
10.0.0.6, from 10.255.255.52, 00:00:54 ago, via Serial0/1
Route metric is 129, traffic share count is 1
* 10.0.0.2, from 10.255.255.52, 00:00:54 ago, via Serial0/0
Route metric is 129, traffic share count is 1


The LFIB is populated on each router:

PE1#sh mpls forwarding-table
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
16 Pop tag 10.0.0.8/30 0 Se0/0 point2point
17 Pop tag 10.0.0.12/30 0 Se0/1 point2point
18 17 10.0.255.4/30 0 Se0/1 point2point
19 10.0.255.4/30 0 Se0/0 point2point
19 21 10.255.255.52/32 0 Se0/1 point2point
21 10.255.255.52/32 0 Se0/0 point2point
20 Pop tag 10.255.255.101/32 0 Se0/0 point2point
21 Pop tag 10.255.255.102/32 0 Se0/1 point2point

And the basic connectivity is working, PE1 can ping the loopback on PE2:

PE1#ping 10.255.255.52

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.255.255.52, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/8 ms



This is almost CCNA level simplicity, which is good, KISS is a great principle to follow.


Question


So on this network, will the pings from PE1 to PE2 be load balanced across the two P routers?

Answer (highlight text to read):
No!
If you look at the PE1 route table, there are two routes to 10.255.255.52 and there are two MPLS labels which will allow load balancing of traffic, however the question was specifically about pings from PE1 to PE2.

So to find the answer you need to look at how the router decides which path to send traffic, which is done by CEF. The default CEF load balancing algorithm is per-destination (which is actually source & dest). As the source/dest are identical on all of the ICMP packets then they are not load balanced.

They would be load balanced if you turned on per-packet load balancing.






The relevant configuration bits are as follows (left out loopbacks for brevity):

PE1

interface Serial0/0
description To P1
ip address 10.0.0.1 255.255.255.252
mpls ip
!
interface Serial0/1
description To P2
ip address 10.0.0.5 255.255.255.252
mpls ip
!
router ospf 1
router-id 10.255.255.51
network 10.0.0.0 0.255.255.255 area 0



P1

interface Serial0/0
description To PE1
ip address 10.0.0.2 255.255.255.252
mpls ip
!
interface Serial0/1
description To PE2
ip address 10.0.0.9 255.255.255.252
mpls ip
!
router ospf 1
router-id 10.255.255.101
network 10.0.0.0 0.255.255.255 area 0



P2

interface Serial0/0
description To PE1
ip address 10.0.0.6 255.255.255.252
mpls ip
!
interface Serial0/1
description To PE2
ip address 10.0.0.13 255.255.255.252
mpls ip
!
router ospf 1
router-id 10.255.255.102
network 10.0.0.0 0.255.255.255 area 0



PE2

interface Serial0/0
description To P1
ip address 10.0.0.10 255.255.255.252
mpls ip
!
interface Serial0/1
description To P2
ip address 10.0.0.14 255.255.255.252
mpls ip
!
router ospf 1
router-id 10.255.255.52
network 10.0.0.0 0.255.255.255 area 0


No comments:

Post a Comment