load-balancing in MPLS Core

Unanswered Question
Feb 14th, 2008

How is load-balancing achieved in MPLS L3 vpns and equal cost multiple links exist to reach egress PE along with per-destination load-balancing enabled on interfaces.

I have tried to simulate the network below

Ingress PE--->P1--->>P2--->Egress PE

Multiple equal cost links exist between P1 and P2, cisco platform,LDP, IGP-ospf being used.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.5 (4 ratings)
mheusing Fri, 02/15/2008 - 08:14


Destination based load balancing in MPLS L3VPNs can be categorized into two scenarios:

1) multiple pathes between two PE routers

2) multiple access links to a single CE or site

Your question as I understand it was about the first scenario. So let me first quickly review how customer traffic is forwarded between VRFs on two different PE routers.

The VRF routing table will have BGP entries for the routes learned from the remote PE usually with next hop addresses being the remote PE loopback IP used for PE-to-PE BGP peering.

The traffic will be forwarded across P routers using the label for the BGP next hop.

Thus the load balancing accross the MPLS core in a first step is decided by the IGP, which has to insert several equal cost pathes into the global routing table for the BGP next hop networks (PE loopbacks).

Side note: MPLS traffic engineering in the core would allow for unequal cost load balancing.

The decision, which labeled packet to send across which path in the core is done by CEF using a hash algorithm. To achieve the same load balancing as with unlabeled IP traffic, a Cisco MPLS enabled router will look for the bottom label - the one with bottom-of-stack bit set to 1 - and try to determine, if the transported packet behind the bottom label is IP. If so, the hash is calculated for the customer IP header like for normal IP traffic. This ensures all traffic for a certain customer destination will always go through the same path. No unwanted packet reordering will occur.

Be aware, that the customer IP packet header will only be used for CEF hash calculation, no IP lookup will be performed, as core routers in MPLS L3VPNs do not have any knowledge about customer addresses.

As a side note: if the traffic transported is not IP (e.g. Ethernet over MPLS), the bottom label will be used for the CEF load balancing (e.g. the VC label).

For the second scenario - CE load balancing with multihomed CE/sites - it is first required to have two equal cost entries in the VRF routing tables. The difference will be the two different PE BGP next hop addresses. The first load balancing decision is the performed by CEF based on the IP packet received by the CE and the VRF routing table entries. Once CEF decided, which VRF entry to use, the required BGP next hop label (and the VPN label) is applied and the packet is transported across the MPLS core. load balancing there is done as described above.

Hope this helps! Please rate all posts.

Regards, Martin

olorunloba Fri, 02/15/2008 - 16:48

Very nice explanation. I fully agree with you. But do you have documentation or reference to back it up.


manish.gautam Mon, 02/18/2008 - 03:31

Hi Martin,

Thanks for your reply, it did clear some doubts and raised some more. We are focusing on first scenario as per your reply.

As you said "if the transported packet behind the bottom label is IP. If so, the hash is calculated for the customer IP header like for normal IP traffic"

is it true for every VPN packet traversing MPLS core with P router having multiple paths for egress PE, does it create a hash for every VPN source-destination and does it look beyond label into ip header of the VPN packet on the P router where as P router is unaware of VPN source-destination.

mheusing Tue, 02/19/2008 - 08:00

Hi Manish,

The hash is only used to determine one out of several equal cost pathes. Simplified, in case you have two equal cost pathes one could simply send all packets with an even number of one bits (source, dest) through path 1 and those with an odd number of one bits through path two. At this level no knowledge about networks is required in a P router. There is no IP lookup in a FIB, as this would make no sense on a P router for VPN customer packets anyhow.

Regards, Martin

manish.gautam Tue, 02/19/2008 - 23:01

Hi Martin,

Thanks a ton. This is so very informative and interesting, just one more question and that will clear all my doubts. As there is no FIB lookup on the P router for a VPN packet and that is very right also but for hash algorithm does it still look into the VPN IP packet header to figure out Even or odd source/destinations as there is no such info in MPLS label stack or if you can refer me a document which has detailed information on this.


mheusing Wed, 02/20/2008 - 00:35


Please use the link provided in my answer to the post of olorunloba above.

In case this document triggers more questions, do not hesitate to ask.

Hope this helps! Please use the rating system.

Regards, Martin


This Discussion