]> git.proxmox.com Git - mirror_iproute2.git/commit - ip/iproute_lwtunnel.c
lwtunnel: Add encapsulation support to ip route
authorRoopa Prabhu <roopa@cumulusnetworks.com>
Thu, 15 Oct 2015 11:13:39 +0000 (13:13 +0200)
committerStephen Hemminger <shemming@brocade.com>
Fri, 16 Oct 2015 23:13:22 +0000 (16:13 -0700)
commit1e5293056a02cb9f0dfb2c87e503e9f5acef16e2
tree140a7d39d4f16cb777c3a8b430ae14faa819757d
parente569c5c0fd1ecb6547613e5b1e889842b226b4e9
lwtunnel: Add encapsulation support to ip route

This patch adds support to parse and print lwtunnel
encapsulation attributes attached to routes for MPLS
and IP tunnels.

example:
Add ipv4 route with mpls encap attributes:

Examples:

  MPLS:
  $ ip route add 40.1.2.0/30 encap mpls 200 via inet 40.1.1.1 dev eth3
  $ ip route show
  40.1.2.0/30  encap mpls 200 via 40.1.1.1 dev eth3

  Add ipv4 multipath route with mpls encap attributes:
  $ ip route add 10.1.1.0/30 nexthop encap mpls 200 via 10.1.1.1 dev eth0 \
    nexthop encap mpls 700 via  40.1.1.2 dev eth3
  $ ip route show
  10.1.1.0/30
    nexthop encap mpls 200  via 10.1.1.1  dev eth0 weight 1
    nexthop encap mpls 700  via 40.1.1.2  dev eth3 weight 1

  IP:
  $ ip route add 10.1.1.1/24 encap ip id 200 dst 20.1.1.1 dev vxlan0

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Acked-by: Jiri Benc <jbenc@redhat.com>
include/utils.h
ip/Makefile
ip/iproute.c
ip/iproute_lwtunnel.c [new file with mode: 0644]
ip/iproute_lwtunnel.h [new file with mode: 0644]