From owner-freebsd-net@freebsd.org Sun Aug 16 15:05:31 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 AB8BA3BECB5 for ; Sun, 16 Aug 2020 15:05:31 +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 4BV0pz3SFwz4SpT for ; Sun, 16 Aug 2020 15:05:31 +0000 (UTC) (envelope-from mike@karels.net) Received: by mailman.nyi.freebsd.org (Postfix) id 7687C3BEB5E; Sun, 16 Aug 2020 15:05:31 +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 763DF3BEAFB; Sun, 16 Aug 2020 15:05:31 +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 4BV0py1k20z4T6h; Sun, 16 Aug 2020 15:05:29 +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 07GF5MMU054548; Sun, 16 Aug 2020 10:05:22 -0500 (CDT) (envelope-from mike@karels.net) Message-Id: <202008161505.07GF5MMU054548@mail.karels.net> To: "Alexander V. Chernikov" cc: net , freebsd-hackers From: Mike Karels Reply-to: mike@karels.net Subject: Re: ip(8) in base In-reply-to: Your message of Sun, 16 Aug 2020 10:11:11 +0100. <1634721597568903@mail.yandex.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <54546.1597590322.1@mail.karels.net> Content-Transfer-Encoding: quoted-printable Date: Sun, 16 Aug 2020 10:05:22 -0500 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1597590330; 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=oH51bWk4UNbMzjcCOgeiWfNZY3Eo5xjLmibWMm0oCBM=; b=ut4DOSZqlvO/8MC2WGIJ2ZoRDiG5FVNtEl+v8xbqRkGNLXCS0ogtIAUxwlxSfQaA78YVUv drK7OovcYSo4si+KzwpWxFCQcxPp2b7mVDgpt4NJSCOF9n5pBezlT62YgE5hI3m0gi5Bob e0gYt2DTLAWeP5u93FOgFuy0fWGYcRHJaE1HJ+YkTBRNeyUVox1Jxm8HUYjg92mHeEuMSM IRedC07gmKlz/L7WLnJdbe9uQ6l3eU9KLO1ddsLxsZle4cczYgf3KxYflRZdPGbXHUpCGb agj2leqhTrOEjAOMci9cA5n2HjJHMrPDsNfiN9F9DtvWusl147IopqjJggx0Tw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1597590330; a=rsa-sha256; cv=none; b=btp7uz6uLR7G00yvQCQ9QV3z53vhF/PGhxWL4qXYeHXshkOIskPt6eRWu3rmyzYUwBC+MQ rqeSqA+u3tFCFMXxsPNMFXGxEo0TSYOvYXTmxCbDYoxmvl1VpZMT44Niul/6KtDU6kE4/9 HovLQyd5Vhw0H0HU4sSfhVen/D5eneJe9VPO+T9v7Crjog6wqQJOBIHEO5jQr++4LQi4tZ Kps5GgvQR/bKmDgTxe3Ac58OnGunTpVKOHVeSrK35IP2wHGYy0zWRlW0A8/cNDAJXpbCEa /lcA69gM1cU4u/ABUbO2xuHql1ceo/RlKxX+pA9GAwjhxWDAkrv7aHQjeWjrBg== 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: 4BV0py1k20z4T6h 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 [-2.38 / 15.00]; HAS_REPLYTO(0.00)[mike@karels.net]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.988]; 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.985]; 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.21)[-0.209]; 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 15:05:31 -0000 > 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 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"