微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

How to setup the Ubuntu MPLS Cient

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

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐