Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Aug 2020 10:05:22 -0500
From:      Mike Karels <mike@karels.net>
To:        "Alexander V. Chernikov" <melifaro@ipfw.ru>
Cc:        net <net@freebsd.org>, freebsd-hackers <freebsd-hackers@freebsd.org>
Subject:   Re: ip(8) in base
Message-ID:  <202008161505.07GF5MMU054548@mail.karels.net>
In-Reply-To: Your message of Sun, 16 Aug 2020 10:11:11 %2B0100. <1634721597568903@mail.yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
> From: "Alexander V. Chernikov" <melifaro@ipfw.ru>
> To: net <net@freebsd.org>, freebsd-hackers <freebsd-hackers@freebsd.org>
> Subject: ip(8) in base
> Date: Sun, 16 Aug 2020 10:11:11 +0100

> I want to introduce ip(8) or something similar in base.
> Basically, I need some userland tool to explicitly operates on nexthops,=
 nexthop groups and fib lookup algorithms.

> The existing tools are not well suited for the job: route(8) may be a ca=
ndidate, but (a) it would either add another bunch of  options or drastica=
lly change the tool by introducing [route nhop add], [route nhgroup add] a=
nd (b) listing is traditionally done by netstat(8).

I agree with the others who said not to use ip(8) if the tool is not
compatible with the Linux ip.  Also, routing is (at least in theory)
independent of address family, and that makes the name "ip" too specific.
However, I think that route and netstat are sufficiently extensible to
add additional facilities, as they have been so far.  One suggestion,
though, would be to preserve the general strategy of using "route verb ...=
",
e.g. "route add nhop ..." rather than "route nhop add ...".  These seem
sufficiently similar to existing functionality to share a tool.

Similarly, if possible I would prefer to see --libxo json rather than -j.

		Mike

> I feel like there is a need of some cli tool that provides the ability t=
o easily extend it by having separate namespaces for each sub-command (hel=
lo, ifconfig).

> Naming is hard. I can, for example, use "rt" as a name to address my use=
 cases.
> However, given the kernel interfaces for managing nexthops/nexhop groups=
 are the same as with routes/arp/ndp, why not spending some additional tim=
e and support operating on routes and neighbors and name it ip?

> Though, that arises multiple questions.
> Are we comfortable with ip(8) as a name in general?
> If we are, what's our take on having the compatible interface with Linux=
 ip(8)? =


> Any comments/feedback is welcome :-)


> Appendix =

> List of commands I need implemented

> cmd [-46m] nhop create [gw XX] [iface YYY] [mtu YYY] [reject] [proxyfib =
Y] [fib X][ipv4] [ipv6]
> cmd [-46m] nhop delete nhop_id
> cmd -46m nhop list =

> cmd -j nhop list # json =


> cmd -46m nhgroup create nhops 1,2,3,4,5,6 [fib X]
> cmd -46 nhgroup create nhops 1=3D100,2=3D100,3=3D200,4=3D100 [proxyfib Y=
][fib X]
> cmd -46 nhroup list
> cmd -46 nhgroup delete nhgroup_id

> cmd -46 fib algo list
> cmd -46 fib algo set algo dpdk_lpm6 fib 0
> cmd -46 fib algo set algo auto fib 0


> /Alexander
> _______________________________________________
> freebsd-net@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008161505.07GF5MMU054548>