Reputation: 21
I am trying to use MPLS on mininet I was able to install iproute2 and when I try something like this
ip route add 192.168.10.187/32 encap mpls 101 via 10.10.0.187
I get the error:
Error: either "to" is duplicate, or "encap" is a garbage.
Also when I try something like this
ip -f mpls route add 101 dev lo
I get the error:
RTNETLINK answers: Operation not supported
I checked my config file and set all of this, with no success:
CONFIG_NETFILTER_NETLINK=y
CONFIG_NETFILTER_NETLINK_QUEUE=y
CONFIG_NETFILTER_NETLINK_LOG=y
CONFIG_NF_CT_NETLINK=y
CONFIG_SCSI_NETLINK=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_NET_SCH_INGRESS=y
CONFIG_NET_SCHED=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_NETFILTER_XT_TARGET_MARK=y
I have the linux image 4.4.0-97-generic, any help will be greatly appreciated.
UPDATE
After doing some reading I found out that I am missing the directory /proc/sys/net/mpls
UPDATE 2
After doing more digging somehow, don't ask me how, I finally installed the missing module and now I have this error:
RTNETLINK answers: Invalid argument
UPDATE 3
I still have the previous problem stated in UPDATE 2, but I noticed when I try to add a new route, I get no complains and it actually shows on the routing table. However when I do:
ip -f mpls route show
I get no results
Upvotes: 0
Views: 1759
Reputation: 11
I think you have to load the kernel mpls modules first,
modprobe mpls_router
modprobe mpls_iptunnel
Then, allow the network interfaces to process mpls labeled packets (disabled by default)
echo 1 > /proc/sys/net/mpls/conf/IFNAME/input
(where IFNAME is the name of the network interface that will send/receive mpls packets)
And finally, specify number of entries that the kernel should allocate for labels (0 by default)
echo 2048 > /proc/sys/net/mpls/platform_labels
or else the iproute2 will gladly process your routes but the kernel won't know any of them (I've been bit by that, too).
References:
Upvotes: 1