Note: How to setup the Ubuntu MPLS Cient
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 48 via inet 192.168.23.1
ip route add 10.10.23.11/32 encap mpls 48 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#
This is the normal ETH interface, but do not configure any IP to the interface, set the interface ip configuration to "Manual".
Then in 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