label allocation modes

Label allocation is one of the main topics of MPLS VPN. There are 3 major label allocation mode.

  • per-vrf : All local, redistributed, aggregated e.t.c prefixes into bgp will have the same label which cause PE to make a second lookup to find the next hop. If you need a feature based on IP header on the egress interface to the CE you should use this mode although you may loose a lot of feature like per prefix counters, CSC.
  • per-prefix : Each remote learned routes will have a different label and all local prefixes will have the same local aggregate label which causes PE to have second lookup to find next hop of the packet. This will effect the resources of the PE as the number of prefixes per vrf increases.
  • per-ce/per-nexthop : This is like per-vrf but a little bit different. If you have configured a single vrf for a multi access network inteface like ethernet and have EBGP sessions for different CPE’s under this interface, you can not use a single label for that vrf. A second lookup required on the PE to find the CPE. You may use per-prefix which will cause a lot of labels to be used. per-ce / per-nexthop helps to solve these problems. PE should assign the same label for the prefixes coming from the same layer 2 next-hop, same EBGP session. This will dramatically effect the PE performance with avoiding a second lookup.

Cisco and Juniper approach is a little bit different for per-vrf. Default value for Cisco is per-prefix and Juniper is per-next hop. Vendors may have different implementations for each mode like using different label or mode for different address families.

Some external links :