MPLS Configuration¶
This section covers Multiprotocol Label Switching (MPLS) configuration in FloofOS.
Overview¶
MPLS provides high-performance packet forwarding using short fixed-length labels instead of IP addresses. Common use cases:
- Traffic Engineering
- VPN services (L3VPN, L2VPN)
- Fast reroute protection
- QoS through EXP bits
Enable MPLS on Interface¶
Syntax¶
Example¶
Disable MPLS¶
View MPLS Configuration¶
Show MPLS FIB¶
Show MPLS Tunnels¶
Show MPLS Interface¶
Local Label Binding¶
Add Local Label¶
Syntax¶
Example: Simple Label Binding¶
Example: Label Swap¶
Example: Label Stack (Push)¶
Delete Local Label¶
MPLS Tunnel¶
Create MPLS Tunnel¶
create mpls tunnel via 10.0.0.2 GE12/0/0 out-labels 16000
set interface state mpls_tunnel0 up
commit
Delete MPLS Tunnel¶
IP to MPLS (Label Imposition)¶
Route IP traffic into MPLS tunnel:
# Create MPLS tunnel
create mpls tunnel via 10.0.0.2 GE12/0/0 out-labels 16000 16001
set interface state mpls_tunnel0 up
# Route traffic through tunnel
ip route add 192.168.100.0/24 via mpls_tunnel0
commit
MPLS Label Ranges¶
| Range | Usage |
|---|---|
| 0-15 | Reserved (special labels) |
| 16-1048575 | Dynamic/Static labels |
Special Labels¶
| Label | Name | Description |
|---|---|---|
| 0 | IPv4 Explicit NULL | Pop and forward as IPv4 |
| 1 | Router Alert | Needs attention |
| 2 | IPv6 Explicit NULL | Pop and forward as IPv6 |
| 3 | Implicit NULL (PHP) | Penultimate Hop Popping |
MPLS Static LSP Example¶
Topology¶
R1 (10.0.0.1) R2 (10.0.0.2)
| |
+---+---+ MPLS Label: 16000 +---+---+
|FloofOS|===========================|FloofOS|
+---+---+ +---+---+
| |
192.168.1.0/24 192.168.2.0/24
R1 Configuration (Ingress)¶
# Enable MPLS on interface
set interface mpls GE12/0/0 enable
# Create tunnel with label
create mpls tunnel via 10.0.0.2 GE12/0/0 out-labels 16000
set interface state mpls_tunnel0 up
# Route to remote network via tunnel
ip route add 192.168.2.0/24 via mpls_tunnel0
commit
R2 Configuration (Egress)¶
# Enable MPLS on interface
set interface mpls GE12/0/0 enable
# Bind local label (pop and forward)
mpls local-label add 16000 via ip4-lookup
commit
Troubleshooting¶
Check MPLS Interface Status¶
Check MPLS FIB¶
Check Packet Counters¶
Trace MPLS Path¶
Command Reference¶
| Command | Description |
|---|---|
set interface mpls <if> enable | Enable MPLS on interface |
set interface mpls <if> disable | Disable MPLS on interface |
show mpls fib | Display MPLS FIB |
show mpls tunnel | Display MPLS tunnels |
show mpls interface | Display MPLS interfaces |
mpls local-label add <label> via <nh> | Add local label binding |
mpls local-label add <label> via <nh> out-labels <label> | Add label swap |
mpls local-label del <label> | Delete local label |
create mpls tunnel via <nh> out-labels <labels> | Create MPLS tunnel |
delete mpls tunnel <if> | Delete MPLS tunnel |