Friday 14 August 2009

Unequal Traffic Sharing with OSPF

Another day another lab :)

Now typically when you say to someone "hi i'm doing unequal traffic sharing with OSPF"
they will often say "no no you fool, thats not possible EIGRP is the only one to do unequal traffic"....but they would be wrong.

Using MPLS OSPF-Traffic Engineering you can indeed do Unequal Traffic Sharing.

And here is how:




As you can see this follows on directly from here


The only changes are to R2 and R5.


So R2:

!
interface Tunnel2
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 2 2
tunnel mpls traffic-eng bandwidth 512
tunnel mpls traffic-eng path-option 1 explicit name R2-R4-R5
no routing dynamic
!


and R5


interface Tunnel2
ip unnumbered Loopback1
mpls traffic-eng tunnels
tunnel destination 20.20.20.20
tunnel mode mpls traffic-eng
tunnel mpls traffic-eng autoroute announce
tunnel mpls traffic-eng priority 2 2
tunnel mpls traffic-eng bandwidth 512
tunnel mpls traffic-eng path-option 1 explicit name R5-R4-R2
no routing dynamic
!


Notice the command:
tunnel mpls traffic-eng bandwidth 512

The ensures that packets are sent in the ratio 2:1 down the two tunnels (Tunnel 1 and Tunnel 2)

Now to prove it:

R2#sh ip route 50.50.50.50
Routing entry for 50.50.50.50/32
Known via "ospf 1", distance 110, metric 3, type intra area
Last update from 50.50.50.50 on Tunnel2, 00:20:05 ago
Routing Descriptor Blocks:
* 50.50.50.50, from 5.5.5.5, 00:20:05 ago, via Tunnel2
Route metric is 3, traffic share count is 2
50.50.50.50, from 5.5.5.5, 00:20:05 ago, via Tunnel1
Route metric is 3, traffic share count is 1


and from R5

R5#sh ip route 20.20.20.20
Routing entry for 20.20.20.20/32
Known via "ospf 1", distance 110, metric 3, type intra area
Last update from 20.20.20.20 on Tunnel2, 00:20:57 ago
Routing Descriptor Blocks:
* 20.20.20.20, from 2.2.2.2, 00:20:57 ago, via Tunnel1
Route metric is 3, traffic share count is 1
20.20.20.20, from 2.2.2.2, 00:20:57 ago, via Tunnel2
Route metric is 3, traffic share count is 2


Looks good but what about debugs?
From R5 to R2:

R5#trace 20.20.20.20

Type escape sequence to abort.
Tracing the route to 20.20.20.20

1 10.0.35.3 [MPLS: Label 25 Exp 0] 48 msec
10.0.45.4 [MPLS: Label 25 Exp 0] 44 msec 8 msec
2 10.0.23.2 32 msec
10.0.24.2 36 msec *


and debugs from R4 and R3:
R4

R4#
*Aug 14 13:50:04.199: MPLS turbo: Fa1/1: rx: Len 60 Stack {25 0 1} - ipv4 data
*Aug 14 13:50:04.219: MPLS turbo: Fa1/0: rx: Len 186 Stack {17 6 253} - ipv4 data
*Aug 14 13:50:04.227: MPLS turbo: Fa1/1: rx: Len 60 Stack {25 0 1} - ipv4 data
*Aug 14 13:50:04.231: MPLS turbo: Fa1/0: rx: Len 186 Stack {17 6 253} - ipv4 data
*Aug 14 13:50:04.271: MPLS turbo: Fa1/1: rx: Len 60 Stack {25 0 2} - ipv4 data
*Aug 14 13:50:04.295: MPLS turbo: Fa1/0: rx: Len 74 Stack {17 6 255} - ipv4 data
*Aug 14 13:50:04.311: MPLS turbo: Fa1/1: rx: Len 60 Stack {25 0 2} - ipv4 data



and R3:

R3#
*Aug 14 13:50:04.035: MPLS turbo: Fa1/1: rx: Len 60 Stack {25 0 1} - ipv4 data
*Aug 14 13:50:04.051: MPLS turbo: Fa1/0: rx: Len 186 Stack {17 6 253} - ipv4 data
*Aug 14 13:50:04.127: MPLS turbo: Fa1/1: rx: Len 60 Stack {25 0 2} - ipv4 data
*Aug 14 13:50:04.159: MPLS turbo: Fa1/0: rx: Len 74 Stack {17 6 255} - ipv4 data




A ratio of 7:4..pretty good! :)

No comments: