iproute2 commands for MPLS configuration

血红的双手。 提交于 2019-12-02 18:51:08
bingen

A little bit too late, but hope it helps somebody. You can find them here:

Routing 10.10.10.10/32 to 192.168.1.2 with label 100:

ip route add 10.10.10.10/32 encap mpls 100 via inet 192.168.1.2

Label swapping 100 for 200 and sent to 192.168.2.2:

ip -f mpls route add 100 as 200 via inet 192.168.2.2

Decapsulating label 300 and delivering locally:

ip -f mpls route add 300 dev lo

To show MPLS routes you can do:

ip -f mpls route show

If your iproute2 version doesn't support those commands, you can get it from here:

https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-4.6.0.tar.gz

And then

./configure && make && make install
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!