Difference between revisions of "VPP/MPLS FIB"
(Created page with "MPLS FIB --------- There is a tight coupling between IP and MPLS forwarding. MPLS forwarding equivalence classes (FECs) are often an IP prefix – that is to say that traffic...") |
|||
Line 3: | Line 3: | ||
There is a tight coupling between IP and MPLS forwarding. MPLS forwarding equivalence classes (FECs) are often an IP prefix – that is to say that traffic matching a given IP prefix is routed into a MPLS label switch path (LSP). It is thus necessary to be able to associated a given prefix/route with an [out-going] MPLS label that will be imposed when the packet is forwarded. This is configured as: | There is a tight coupling between IP and MPLS forwarding. MPLS forwarding equivalence classes (FECs) are often an IP prefix – that is to say that traffic matching a given IP prefix is routed into a MPLS label switch path (LSP). It is thus necessary to be able to associated a given prefix/route with an [out-going] MPLS label that will be imposed when the packet is forwarded. This is configured as: | ||
− | ip route add 1.1.1.1/32 via 10.10.10.10 GigE0/0/0 out- | + | ip route add 1.1.1.1/32 via 10.10.10.10 GigE0/0/0 out-labels 33 |
packets matching 1.1.1.1/32 will be forwarded out GigE0/0/0 and have MPLS label 33 imposed. More than one out-going label can be specified. Out-going MPLS labels can be applied to recursive and non-recursive routes, e.g; | packets matching 1.1.1.1/32 will be forwarded out GigE0/0/0 and have MPLS label 33 imposed. More than one out-going label can be specified. Out-going MPLS labels can be applied to recursive and non-recursive routes, e.g; | ||
− | ip route add 2.2.2.0/24 via 1.1.1.1 out- | + | ip route add 2.2.2.0/24 via 1.1.1.1 out-labels 34 |
packets matching 2.2.2.0/24 will thus have two MPLS labels imposed; 34 and 33. This is the realisation of, e,g, an MPLS BGP VPNv4. | packets matching 2.2.2.0/24 will thus have two MPLS labels imposed; 34 and 33. This is the realisation of, e,g, an MPLS BGP VPNv4. | ||
To associate/allocate a local-label for a prefix, and thus have packets to that local-label forwarded equivalently to the prefix do; | To associate/allocate a local-label for a prefix, and thus have packets to that local-label forwarded equivalently to the prefix do; | ||
Line 17: | Line 17: | ||
1) mpls local-label 33 ip4-lookup-in-table X | 1) mpls local-label 33 ip4-lookup-in-table X | ||
2) mpls local-label 33 via 10.10.10.10 GigE0/0/0 | 2) mpls local-label 33 via 10.10.10.10 GigE0/0/0 | ||
− | 3) mpls local-label 33 via 10.10.10.10 GigE0/0/0 out- | + | 3) mpls local-label 33 via 10.10.10.10 GigE0/0/0 out-labels 66 |
the latter is an example of an MPLS cross connect. Any description of a next-hop, recursive, non-recursive, labelled, non-labelled, etc, that is valid for an IP prefix, is also valid for an MPLS local-label. | the latter is an example of an MPLS cross connect. Any description of a next-hop, recursive, non-recursive, labelled, non-labelled, etc, that is valid for an IP prefix, is also valid for an MPLS local-label. |
Revision as of 15:30, 6 December 2017
MPLS FIB
There is a tight coupling between IP and MPLS forwarding. MPLS forwarding equivalence classes (FECs) are often an IP prefix – that is to say that traffic matching a given IP prefix is routed into a MPLS label switch path (LSP). It is thus necessary to be able to associated a given prefix/route with an [out-going] MPLS label that will be imposed when the packet is forwarded. This is configured as:
ip route add 1.1.1.1/32 via 10.10.10.10 GigE0/0/0 out-labels 33
packets matching 1.1.1.1/32 will be forwarded out GigE0/0/0 and have MPLS label 33 imposed. More than one out-going label can be specified. Out-going MPLS labels can be applied to recursive and non-recursive routes, e.g;
ip route add 2.2.2.0/24 via 1.1.1.1 out-labels 34
packets matching 2.2.2.0/24 will thus have two MPLS labels imposed; 34 and 33. This is the realisation of, e,g, an MPLS BGP VPNv4. To associate/allocate a local-label for a prefix, and thus have packets to that local-label forwarded equivalently to the prefix do;
mpls local-label 99 2.2.2.0/24
In the API this action is called a ‘bind’. The router receiving the MPLS encapsulated packets needs to be programmed with actions associated which each label value – this is the role of the MPLS FIB. The MPLS FIB Is a table, whose key is the MPLS label value and end-of-stack (EOS) bit, which stores the action to perform on packets with matching encapsulation. Currently supported actions are:
1) Pop the label and perform an IPv[46] lookup in a specified table 2) Pop the label and forward via a specified next-hop (this is penultimate-hop-pop, PHP) 3) Swap the label and forward via a specified next-hop.
These can be programmed respectively by:
1) mpls local-label 33 ip4-lookup-in-table X 2) mpls local-label 33 via 10.10.10.10 GigE0/0/0 3) mpls local-label 33 via 10.10.10.10 GigE0/0/0 out-labels 66
the latter is an example of an MPLS cross connect. Any description of a next-hop, recursive, non-recursive, labelled, non-labelled, etc, that is valid for an IP prefix, is also valid for an MPLS local-label.