From owner-freebsd-net@freebsd.org Sun Aug 16 18:21:21 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F2B633C2F24 for ; Sun, 16 Aug 2020 18:21:21 +0000 (UTC) (envelope-from mike@karels.net) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4BV58x5Rz5z4dbx for ; Sun, 16 Aug 2020 18:21:21 +0000 (UTC) (envelope-from mike@karels.net) Received: by mailman.nyi.freebsd.org (Postfix) id BB0D13C2DD6; Sun, 16 Aug 2020 18:21:21 +0000 (UTC) Delivered-To: net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BAD113C2CD4 for ; Sun, 16 Aug 2020 18:21:21 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail.karels.net (mail.karels.net [216.160.39.52]) by mx1.freebsd.org (Postfix) with ESMTP id 4BV58w5pN7z4dWW for ; Sun, 16 Aug 2020 18:21:20 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail.karels.net (localhost [127.0.0.1]) by mail.karels.net (8.15.2/8.15.2) with ESMTP id 07GILJH3055045; Sun, 16 Aug 2020 13:21:19 -0500 (CDT) (envelope-from mike@karels.net) Message-Id: <202008161821.07GILJH3055045@mail.karels.net> To: "Rodney W. Grimes" cc: "Alexander V. Chernikov" , net From: Mike Karels Reply-to: mike@karels.net Subject: Re: ip(8) in base In-reply-to: Your message of Sun, 16 Aug 2020 09:38:47 -0700. <202008161638.07GGclX4056884@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <55043.1597602079.1@mail.karels.net> Content-Transfer-Encoding: quoted-printable Date: Sun, 16 Aug 2020 13:21:19 -0500 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1597602081; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to; bh=uAMLNjsLvhAHi69ppF4QPAn+z3A/BjKQHMgeEWRGW+U=; b=quezFEGQxnZEXlFwJYkb1lSigFD5rXKIP4nUL4S7qHZ3SGiSD3JTpcYnzTzpwq79lkRYRo IpFYP+/Tb+0jeaJ4J0nMDQbM5g1auIUNZecUkv0E21D+sIbGOHluROg9tH5huRSIKaJ7zu VnMFPce6nef5CtwtnU4Bj/qHnQRyeysnTP5QICR9gBh68ltIyIv8nXnvWnW+SO2OcRs5Qp GXMpMtxCilS5bqyshLpSiGUCfZZtrvC4zKChOHYuHrN6AZF/E48LA8rVpOh/GWgaEhtVgf 5ILYN885F25F6aBIADZOIYlwCTS6Y2lCOFgXCDE5hczn+IGBXZNQhHfKdml2tQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1597602081; a=rsa-sha256; cv=none; b=Hxi2hV5JrhOjzoRdHk7L88ZWzUL2NdKDs5Mq/+7WL4MS3rDbrgrk+Q7qM/dZpfxTd2bPbe 19YEuHEwOmvDFWwILmSlrQJN4xLu/hdtERYk3fkRiyV5y9W6cQPJxPBRVDAxnZDw1RPu1k qcS6L319evzMANtZ9+gRPK/CcbHvXSL6zQN4cX8NM9pcuv7QAy3W+1aXn9C1IMjDRQBJmg KqO4OI+4UfMS58RYTPyotv6iHf6CIFc5DOcYHLv5+h93XwYpBV/OHApdmlluKK13d71QyK 0hHmaqHUlY6HAwaaEgr405dGzt/ppUmdZxy4ASLR9VVPrTyiBd1UMqKtc6IFPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of mike@karels.net designates 216.160.39.52 as permitted sender) smtp.mailfrom=mike@karels.net X-Rspamd-Queue-Id: 4BV58w5pN7z4dWW X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mike@karels.net designates 216.160.39.52 as permitted sender) smtp.mailfrom=mike@karels.net X-Spamd-Result: default: False [-3.02 / 15.00]; HAS_REPLYTO(0.00)[mike@karels.net]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.986]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:216.160.39.52]; NEURAL_HAM_LONG(-0.99)[-0.990]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_ADDR_EQ_FROM(0.00)[]; ARC_SIGNED(0.00)[i=1]; DMARC_NA(0.00)[karels.net]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.85)[-0.847]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:209, ipnet:216.160.36.0/22, country:US]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Aug 2020 18:21:22 -0000 > From: "Rodney W. Grimes" > Subject: Re: ip(8) in base > Date: Sun, 16 Aug 2020 09:38:47 -0700 (PDT) > > > From: "Alexander V. Chernikov" > > > To: net , freebsd-hackers > > > 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 nexth= ops, nexthop groups and fib lookup algorithms. > > = > > > The existing tools are not well suited for the job: route(8) may be = a candidate, but (a) it would either add another bunch of options or dras= tically change the tool by introducing [route nhop add], [route nhgroup ad= d] and (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 specif= ic. > I strongly agree with this. > > 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 see= m > > sufficiently similar to existing functionality to share a tool. > Again, I agree with the above statement by Mike. > The proposed commands are all in support of "route" features, > and in BSD it is the route command that is used to maniplate > these, please do not deviate from that. I have seen no strong > reason given that route(8) and netstat(1) can not be extended > to add the desired functionality. > > Similarly, if possible I would prefer to see --libxo json rather than = -j. > I have no skin in this one, other than to state that iirc the > route(8) command is currently without any long options so > adding this --libxo would require adding long option support, > which is probably not justifiable for 1 option. I think the reporting ("list") should be in netstat rather than route, with the possible exception of enhancements to "route get". Of course, netstat already uses libxo. > > > I feel like there is a need of some cli tool that provides the abili= ty to easily extend it by having separate namespaces for each sub-command = (hello, 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 gr= oups are the same as with routes/arp/ndp, why not spending some additional= time 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 L= inux 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] [proxy= fib Y] [fib X][ipv4] [ipv6] > > > cmd [-46m] nhop delete nhop_id > > > cmd -46m nhop list = > > > cmd -j nhop list # json = > What is special about these nhop routes that this is not just a route ad= d? > Could that not be handled as either a route flag ala -iface/-static/-rej= ect/-blackhole > or via a route modifier ala -osi/-xns/-inet/-inet6? > I am actually a bit confused in that all routes are really just an expre= ssion > of the "next hop" as far as the kernel goes, or are we now doing lsdb ty= pe > routing in the kernel? > > = > > > 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 [proxyf= ib Y][fib X] > > > cmd -46 nhroup list > ^ nhgroup? > > > 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 > -- = > Rod Grimes rgrimes@freeb= sd.org > _______________________________________________ > 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"