On Fri, Jun 15, 2018 at 02:27:52PM +0000, Thiruvazhiyan Lakshmanan wrote: > Thanks for your reply. > > When I tried to add " ip route add 192.168.1.0/24 encap mpls 100 via inet > 10.10.101.1" I get "Error: either "to" is duplicate, or "encap" is a garbage." > > root@ubuntu4-4-VM1:/proc/sys/net# ip route add 192.168.1.0/24 encap mpls 100 > via inet 10.10.101.1 > Error: either "to" is duplicate, or "encap" is a garbage. > root@ubuntu4-4-VM1:/proc/sys/net#
In that case you likely have too old iproute2 tools, so you would not see mpls labels in 'ip route show'. You should get: # ip route add 192.168.1.0/24 encap mpls 100 via inet 192.168.81.2 # ip route list default via 192.168.81.1 dev eth0 192.168.1.0/24 encap mpls 100 via 192.168.81.2 dev eth0 -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santi...@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."