How to enable the MPLS module#
Modprobe Mpls_router
Modprobe MPLS_GSO
Modprobe Mpls_iptunnel
Sysctl-w net.mpls.conf.lo.input=1
Sysctl-w net.mpls.platform_labels=1048575
How to create the virtual interface and bridge interface#
IP link Add veth0 type Veth peer name Veth1
IP link Add brm type bridge
IP link set eth1 master BRM
IP link set veth0 master BRM
IP addr Add 192.168.23.99/24 dev BRM
IP addr Add 192.168.23.100/24 dev Veth0
IP link Set BRM up
IP link Set veth0 up
Sysctl-w net.mpls.conf.veth0.input=1
Sysctl-w net.mpls.conf.brm.input=1
IP netns Add host1
IP link set veth1 netns host1
IP netns exec host1 ifconfig veth1 192.168.23.200/24 up
How to set the IP route with MPLS encapsulate and decapsulate#
IP route add 192.168.23.1/32 encap MPLS via inet 192.168.23.1
IP route add 10.10.23.11/32 encap MPLS via inet 192.168.23.1
IP netns exec host1 IP route add 10.10.23.11/32 via inet 192.168.23.199
Ip-f MPLS route add 384 via inet 192.168.23.200
Radio Access interface#
The The normal ETH interface, but does not configure any IP to the interface, set the interface IP configuration UAL ".
Then on terminal Run:ifconfig ethx up
TAP interface#
First you need the TUNCTL, if not exist in the system, install it.
Tunctl-t Tap9-u Root
Ifconfig tap9 <radio Access ip> netmask 255.255.255.0
Ifconfig TAP9 MTU 1400
Note:how to setup the Ubuntu MPLS cient