-
Notifications
You must be signed in to change notification settings - Fork 710
VPP MPLS_FIB
MPLS is not enabled by default. There are two steps to get started. First, create the default MPLS FIB:
mpls table add 0
With '0' being the magic number for the 'default' table (just like it is for IPv[46]). One can create other MPLS tables, but, unlike IP tables, one cannot 'bind' non-default MPLS tables to interfaces, in other words all MPLS packets received on an interface will always result in a lookup in the default table. One has to be more inventive to use the non-default tables...
Secondly, for *each* interface on which you wish to *receive* MPLS packets, that interface must be MPLS 'enabled'
set interface mpls GigEthernet0/0/0 enable
there is no equivalent enable for transmit, all that is required is to use an interface as an egress path.
Entries in the MPLS FIB can be display with:
sh mpls fib [table X] [label]
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 eos ip4-lookup-in-table X
2) mpls local-label 33 [eos] via 10.10.10.10 GigE0/0/0
3) mpls local-label 33 [eos] 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. Note the use of the 'eos' keyword which indicates the programming is for the case when the label is end-of-stack. The last two operations can apply to both eos and non-eos packets, but the pop and IP lookup only to an eos packet.
To configure an MPLS VPN for a PE the follow example can be used.
Step 1; Configure routes to the iBGP peers - note these route MUST have out-going labels;
ip route add 10.0.0.1/32 via 192.168.1.2 Eth0 out-labels 33
ip route add 10.0.0.2/32 via 192.168.2.2 Eth0 out-labels 34
Step 2; Configure the customer 'VRF'
ip table add 2
Step 3; add a route via the iBGP peer[s] with the MPLS label advertised by that peer
ip route add table 2 10.10.10.0/24 via 10.0.0.2 next-hop-table 0 out-label 122
ip route add table 2 10.10.10.0/24 via 10.0.0.1 next-hop-table 0 out-label 121
Step 4; add a route via the eBGP peer
ip route add table 2 10.10.20.0/24 via 172.16.0.1 next-hop-table 2
Step 5; depending on the label allocation scheme used, add routes to the MPLS FIB to accept incoming labelled packets
1 per-prefix label scheme - this command 'binds' the label to the same forwarding as the IP route
mpls local-label 99 10.10.20.0/24
2 per-CE label scheme - this pops the incoming label. Append config for 'out-labels' if so desired.
mpls local-label 99 via 172.16.0.1 next-hop-table 2
3 per-VRF label scheme
mpls local-label 99 via ip4-lookup-in-table 2
MPLS tunnels are unidirectional and can impose a stack of labels. They are 'normal' interfaces and thus can be used, for example, as the target for IP routes and L2 cross-connects. To construct a tunnel
mpls tunnel via 10.10.10.10 GigEthernet0/0/0 out-labels 33 44 55
and to then have that created tunnel to perform ECMP:
mpls tunnel mpls-tunnel0 via 10.10.10.11 GigEthernet0/0/0 out-labels 66 77 88
use
sh mpls tunnel [X]
to see the monster you have created. An MPLS tunnel interface is an interface like any other and now ready for use with the usual set of interface commands, e.g.:
set interface state mpls-tunnel0 up
set interface ip address mpls-tunnel0 192.168.1.1/30
- VPP 2022 Make Test Use Case Poll
- VPP-AArch64
- VPP-ABF
- VPP Alternative Builds
- VPP API Concepts
- VPP API Versioning
- VPP-ApiChangeProcess
- VPP-ArtifactVersioning
- VPP-BIER
- VPP-Bihash
- VPP-BugReports
- VPP Build System Deep Dive
- VPP Build, Install, And Test Images
- VPP-BuildArtifactRetentionPolicy
- VPP-c2cpel
- VPP Code Walkthrough VoD
- VPP Code Walkthrough VoD Topic Index
- VPP Code Walkthrough VoDs
- VPP-CodeStyleConventions
- VPP-CodingTips
- VPP Command Line Arguments
- VPP Command Line Interface CLI Guide
- VPP-CommitMessages
- VPP-Committers-SMEs
- VPP-CommitterTasks-ApiFreeze
- VPP CommitterTasks Compare API Changes
- VPP-CommitterTasks-CutPointRelease
- VPP-CommitterTasks-CutRelease
- VPP-CommitterTasks-FinalReleaseCandidate
- VPP-CommitterTasks-PullThrottleBranch
- VPP-CommitterTasks-ReleasePlan
- VPP Configuration Tool
- VPP Configure An LW46 MAP E Terminator
- VPP Configure VPP As A Router Between Namespaces
- VPP Configure VPP TAP Interfaces For Container Routing
- VPP-CoreFileMismatch
- VPP-cpel
- VPP-cpeldump
- VPP-CurrentData
- VPP-DHCPKit
- VPP-DHCPv6
- VPP-DistributedOwnership
- VPP-Documentation
- VPP DPOs And Feature Arcs
- VPP EC2 Instance With SRIOV
- VPP-elog
- VPP-FAQ
- VPP Feature Arcs
- VPP-Features
- VPP-Features-IPv6
- VPP-FIB
- VPP-g2
- VPP Getting VPP 16.06
- VPP Getting VPP Release Binaries
- VPP-HA
- VPP-HostStack
- VPP-HostStack-BuiltinEchoClientServer
- VPP-HostStack-EchoClientServer
- VPP-HostStack-ExternalEchoClientServer
- VPP HostStack Hs Test
- VPP-HostStack-LDP-iperf
- VPP-HostStack-LDP-nginx
- VPP-HostStack-LDP-sshd
- VPP-HostStack-nginx
- VPP-HostStack-SessionLayerArchitecture
- VPP-HostStack-TestHttpServer
- VPP-HostStack-TestProxy
- VPP-HostStack-TLS
- VPP-HostStack-VCL
- VPP-HostStack-VclEchoClientServer
- VPP-Hotplug
- VPP How To Add A Tunnel Encapsulation
- VPP How To Build The Sample Plugin
- VPP How To Connect A PCI Interface To VPP
- VPP How To Create A VPP Binary Control Plane API
- VPP How To Deploy VPP In EC2 Instance And Use It To Connect Two Different VPCs
- VPP How To Optimize Performance %28System Tuning%29
- VPP How To Use The API Trace Tools
- VPP How To Use The C API
- VPP How To Use The Packet Generator And Packet Tracer
- VPP-Howtos
- VPP-index
- VPP Installing VPP Binaries From Packages
- VPP Interconnecting vRouters With VPP
- VPP Introduction To IP Adjacency
- VPP Introduction To N Tuple Classifiers
- VPP IP Adjacency Introduction
- VPP-IPFIX
- VPP-IPSec
- VPP IPSec And IKEv2
- VPP IPv6 SR VIRL Topology File
- VPP Java API
- VPP Java API Plugin Support
- VPP Jira Workflow
- VPP-Macswapplugin
- VPP-MakeTestFramework
- VPP-Meeting
- VPP-MFIB
- VPP Missing Prefetches
- VPP Modifying The Packet Processing Directed Graph
- VPP MPLS FIB
- VPP-NAT
- VPP Nataas Test
- VPP-OVN
- VPP Per Feature Notes
- VPP Performance Analysis Tools
- VPP-perftop
- VPP Progressive VPP Tutorial
- VPP Project Meeting Minutes
- VPP Pulling, Building, Running, Hacking And Pushing VPP Code
- VPP Pure L3 Between Namespaces With 32s
- VPP Pure L3 Container Networking
- VPP Pushing And Testing A Tag
- VPP Python API
- VPP-PythonVersionPolicy
- VPP-QuickTrexSetup
- VPP Random Hints And Kinks For KVM Usage
- VPP Release Plans Release Plan 16.09
- VPP Release Plans Release Plan 17.01
- VPP Release Plans Release Plan 17.04
- VPP Release Plans Release Plan 17.07
- VPP Release Plans Release Plan 17.10
- VPP Release Plans Release Plan 18.01
- VPP Release Plans Release Plan 18.04
- VPP Release Plans Release Plan 18.07
- VPP Release Plans Release Plan 18.10
- VPP Release Plans Release Plan 19.01
- VPP Release Plans Release Plan 19.04
- VPP Release Plans Release Plan 19.08
- VPP Release Plans Release Plan 20.01
- VPP Release Plans Release Plan 20.05
- VPP Release Plans Release Plan 20.09
- VPP Release Plans Release Plan 21.01
- VPP Release Plans Release Plan 21.06
- VPP Release Plans Release Plan 21.10
- VPP Release Plans Release Plan 22.02
- VPP Release Plans Release Plan 22.06
- VPP Release Plans Release Plan 22.10
- VPP Release Plans Release Plan 23.02
- VPP Release Plans Release Plan 23.06
- VPP Release Plans Release Plan 23.10
- VPP Release Plans Release Plan 24.02
- VPP Release Plans Release Plan 24.06
- VPP Release Plans Release Plan 24.10
- VPP Release Plans Release Plan 25.02
- VPP Release Plans Release Plan 25.06
- VPP Release Plans Release Plan 25.10
- VPP Release Plans Release Plan 26.02
- VPP Release Plans Release Plan 26.06
- VPP-RM
- VPP-SecurityGroups
- VPP Segment Routing For IPv6
- VPP Segment Routing For MPLS
- VPP Setting Up Your Dev Environment
- VPP-SNAT
- VPP Software Architecture
- VPP STN Testing
- VPP The VPP API
- VPP Training Events
- VPP-Troubleshooting
- VPP-Troubleshooting-BuildIssues
- VPP-Troubleshooting-Vagrant
- VPP Tutorial DPDK And MacSwap
- VPP Tutorial Routing And Switching
- VPP-Tutorials
- VPP Use VPP To Chain VMs Using Vhost User Interface
- VPP Use VPP To Connect VMs Using Vhost User Interface
- VPP Using mTCP User Mode TCP Stack With VPP
- VPP Using VPP As A VXLAN Tunnel Terminator
- VPP Using VPP In A Multi Thread Model
- VPP-VOM
- VPP VPP BFD Nexus
- VPP VPP Home Gateway
- VPP VPP WIKI DEPRECATED CONTENT
- VPP-VPPCommunicationsLibrary
- VPP-VPPConfig
- VPP What Is ODP4VPP
- VPP What Is VPP
- VPP Working Environments
- VPP Working With The 16.06 Throttle Branch