iproute2/ip
David Ahern 63df8e8543 Add support for nexthop objects
Add nexthop subcommand to ip. Implement basic commands for creating,
deleting and dumping nexthop objects. Syntax follows 'nexthop' syntax
from existing 'ip route' command.

Examples:
1. Single path
    $ ip nexthop add id 1 via 10.99.1.2 dev veth1
    $ ip nexthop ls
    id 1 via 10.99.1.2 src 10.99.1.1 dev veth1 scope link

2. ECMP
    $ ip nexthop add id 2 via 10.99.3.2 dev veth3
    $ ip nexthop add id 1001 group 1/2
      --> creates a nexthop group with 2 component nexthops:
          id 1 and id 2 both the same weight

    $ ip nexthop ls
    id 1 via 10.99.1.2 src 10.99.1.1 dev veth1 scope link
    id 2 via 10.99.3.2 src 10.99.3.1 dev veth3 scope link
    id 1001 group 1/2

3. Weighted multipath
    $ ip nexthop add id 1002 group 1,10/2,20
      --> creates a nexthop group with 2 component nexthops:
          id 1 with a weight of 10 and id 2 with a weight of 20

    $ ip nexthop ls
    id 1 via 10.99.1.2 src 10.99.1.1 dev veth1 scope link
    id 2 via 10.99.3.2 src 10.99.3.1 dev veth3 scope link
    id 1001 group 1/2
    id 1002 group 1,10/2,20

Signed-off-by: David Ahern <dsahern@gmail.com>
2019-06-11 10:30:58 -07:00
..
.gitignore Another .gitignore file. 2006-08-08 12:11:23 -07:00
Makefile Add support for nexthop objects 2019-06-11 10:30:58 -07:00
ifcfg ifcfg/rtpr: convert to POSIX shell 2018-01-10 08:26:09 -08:00
ila_common.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
ip.c Add support for nexthop objects 2019-06-11 10:30:58 -07:00
ip6tunnel.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
ip_common.h Add support for nexthop objects 2019-06-11 10:30:58 -07:00
ipaddress.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
ipaddrlabel.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
ipfou.c ip fou: Support binding FOU ports 2019-04-22 11:42:54 -07:00
ipila.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
ipl2tp.c use print_{,h}hu instead of print_uint when format specifier is %{,h}hu 2019-02-10 19:00:59 -08:00
iplink.c Merge branch 'master' into next 2019-06-10 10:32:07 -07:00
iplink_bond.c ip: bond: add xstats support 2019-03-15 13:58:16 -07:00
iplink_bond_slave.c ip: bond: add xstats support 2019-03-15 13:58:16 -07:00
iplink_bridge.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
iplink_bridge_slave.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
iplink_can.c ip: iplink_can.c: fix json formatting 2018-12-07 09:22:29 -08:00
iplink_dummy.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
iplink_geneve.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
iplink_hsr.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
iplink_ifb.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
iplink_ipoib.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
iplink_ipvlan.c iplink: add ipvtap support 2018-09-20 17:53:56 -07:00
iplink_macvlan.c ip: link_macvlan.c: add json output support 2017-08-17 18:02:41 -07:00
iplink_netdevsim.c ip: link: add support for netdevsim device type 2018-01-02 20:46:19 -08:00
iplink_nlmon.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
iplink_rmnet.c ip: add rmnet initial support 2018-06-15 11:15:14 -07:00
iplink_team.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
iplink_vcan.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
iplink_vlan.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
iplink_vrf.c iplink_vrf: Save device index from response for return code 2018-06-01 15:45:09 -04:00
iplink_vxcan.c iplink: Perform most of request buffer setups and checks in iplink_parse() 2018-03-11 17:59:03 -07:00
iplink_vxlan.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
iplink_xdp.c iplink: add support for reporting multiple XDP programs 2018-07-15 13:10:03 -07:00
iplink_xstats.c ip: xstats: add json output support 2019-03-15 13:55:57 -07:00
ipmacsec.c ipmacsec: fix warning on 32bit platform 2018-12-10 13:47:58 -08:00
ipmaddr.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
ipmonitor.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
ipmroute.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
ipneigh.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
ipnetconf.c Tree wide: Drop sockaddr_nl arg 2018-10-22 09:43:48 -07:00
ipnetns.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
ipnexthop.c Add support for nexthop objects 2019-06-11 10:30:58 -07:00
ipntable.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
ipprefix.c Tree wide: Drop sockaddr_nl arg 2018-10-22 09:43:48 -07:00
iproute.c ip route: Export print_rt_flags, print_rta_if and print_rta_gateway 2019-06-11 10:30:55 -07:00
iproute_lwtunnel.c lwtunnel: Pass encap and encap_type attributes to lwt_parse_encap 2019-06-11 10:30:46 -07:00
iprule.c iprule: always print realms keyword for rule 2019-04-24 15:06:15 -07:00
ipseg6.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
iptoken.c Tree wide: Drop sockaddr_nl arg 2018-10-22 09:43:48 -07:00
iptunnel.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
iptuntap.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
ipvrf.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
ipxfrm.c ip xfrm: support setting/printing XFRMA_IF_ID attribute in states/policies 2019-04-11 15:26:43 -07:00
link_gre.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
link_gre6.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
link_ip6tnl.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
link_iptnl.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
link_veth.c iplink: Perform most of request buffer setups and checks in iplink_parse() 2018-03-11 17:59:03 -07:00
link_vti.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
link_vti6.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
link_xfrm.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
routef mark shell scripts +x 2018-01-10 08:23:49 -08:00
routel mark shell scripts +x 2018-01-10 08:23:49 -08:00
rtm_map.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
rtmon.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
rtpr ifcfg/rtpr: convert to POSIX shell 2018-01-10 08:26:09 -08:00
static-syms.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
tcp_metrics.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
tunnel.c Include bsd/string.h only in include/utils.h 2018-11-05 08:38:32 -08:00
tunnel.h iptunnel/ip6tunnel: Use netlink to walk through tunnels list 2018-02-07 16:15:42 -08:00
xfrm.h xfrm: add option to hide keys in state output 2019-01-21 08:31:20 -08:00
xfrm_monitor.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
xfrm_policy.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00
xfrm_state.c treewide: refactor help messages 2019-05-20 14:35:07 -07:00