码迷,mamicode.com
首页 > 系统相关 > 详细

Note: How to setup the Ubuntu MPLS Cient

时间:2016-04-27 22:04:42      阅读:323      评论:0      收藏:0      [点我收藏+]

标签:

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

 

Note: How to setup the Ubuntu MPLS Cient

标签:

原文地址:http://www.cnblogs.com/dxh1231/p/5440360.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!