From owner-freebsd-net@freebsd.org Sun Aug 16 09:21:27 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 3D56C3B664C for ; Sun, 16 Aug 2020 09:21:27 +0000 (UTC) (envelope-from andrnils@gmail.com) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4BTs9z0YFwz46ZF for ; Sun, 16 Aug 2020 09:21:27 +0000 (UTC) (envelope-from andrnils@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id 12BE13B6894; Sun, 16 Aug 2020 09:21:27 +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 127263B67E1; Sun, 16 Aug 2020 09:21:27 +0000 (UTC) (envelope-from andrnils@gmail.com) Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BTs9y1bG6z46lY; Sun, 16 Aug 2020 09:21:26 +0000 (UTC) (envelope-from andrnils@gmail.com) Received: by mail-lj1-x22b.google.com with SMTP id h19so14257571ljg.13; Sun, 16 Aug 2020 02:21:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bMZNoq39ct+BuitStudbsOsM1LKKdAny0o1ObONH2fA=; b=ii35ywf8tjNiJ5v+Aer8yg58H6M4ApkDknejFkIenmty/dTQK16czqIOEgIR4OS2Ta IalEPXHMIa/xDUkPSmEJL6y3D9kMy0HGzYclzN3qgMRtKxBAPTcvbwookBTHJdcBdDgV fTjPPNyZR+3lKZClX9mCeuCFwbfW+VVeAvnODxiPHcjyS0xE+9GKSkKF3q6P5EGUpr5o IdGcnvh2QBQm5dkB9GIa42eVEQFIOllj4FtduGOJY9bevJuXDD5e0ikie1NiH+oPMv6B pzcDA+Z96z7GOiGJeGk8LSW+NGQ78CsM3e/+SdfyBPoJQ1GdE7G9WGL7ibUD8wZUZeN/ ALKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bMZNoq39ct+BuitStudbsOsM1LKKdAny0o1ObONH2fA=; b=qF+BGVwg1LqCAXKxpD3yTw0QRXjp+WFeoq+223mgGifVtYOhLQrczygLnbhzRXQT1T tu/Ruk8gveMWpMZ3CmEiGfdSoW255oRg3rXUz9imS8HEUdN5X04EHYZ0ojDhjs6w3oOm IPXpMcjYykHXXn5xKLrHfD1HQYNnE8OTE+p9tZIskpm5An9keKHvfYS9KXTbZyXzf7cP hU9V+y2HxIh5XyzKlHn0Hp7Unqjq0uuWrXfFI+PJeL0tLyhrifwMGLq3GnKp7yOyfd9F cTL/436l3LbcPyuB+Eyewcn2WeO0gVFjt1lh+dCBhyIgs5DJzwJGxxBghKjuThvO/q90 goIw== X-Gm-Message-State: AOAM533z+zDCrEMV7lU4Y1Vt5/o3/Jr7ojSwL5Ay0PSGkU6R1CIU6w6c FK0zXSPBA/WBLWA8dUg4rLPfvCXO545k9/uh8jc= X-Google-Smtp-Source: ABdhPJy3joFX0k+CTTMOsgLQ2l70e2Z3zp6rjIQwqe58ma4Z72CQXcn8N36LPDo75y7CbEb03lBxqHTn7z1Mv8Y+e8A= X-Received: by 2002:a2e:900d:: with SMTP id h13mr5343911ljg.426.1597569684308; Sun, 16 Aug 2020 02:21:24 -0700 (PDT) MIME-Version: 1.0 References: <1634721597568903@mail.yandex.ru> In-Reply-To: <1634721597568903@mail.yandex.ru> From: Andreas Nilsson Date: Sun, 16 Aug 2020 11:21:14 +0200 Message-ID: Subject: Re: ip(8) in base To: "Alexander V. Chernikov" Cc: net , freebsd-hackers ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1597569686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=bMZNoq39ct+BuitStudbsOsM1LKKdAny0o1ObONH2fA=; b=T7/UK3HqJz1KvyQUdpsMDhYq3HLEnnpPF8F70Hn1+FRVbf+T/z5p1dtRWFNg1J5aD9rgmn GKOn6Si1f2HjSuHi/YniWVbqB7uA2Tsruk6Kr1JjneNppfJIsAdmnRx8NUp5nhTUcl81xm aK6P7j600GiaAqhQAKVtTvV9e15vJThfHzeATodmResknY+a0f0EXTv+1AASa1kjeXGq34 r5SgFrNcVq0Ep+JQSKSAdkcL9bYaLWyYEnFVkJtDjwprgjR2UnLDMNkGo+Y1C9NKwggoiJ IKmC9jVZbefSA/1fG91kb/ZoDHDmi8cw9dYHd0FXfBuhGR6d81IbkqAyqFAEgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1597569686; a=rsa-sha256; cv=none; b=oTIf/k5whbHCtu9nD2cqHTm5+zOqqaOd+KTuVb6rUfUXOFo+wBUK3wF0u1tmQpJfjpiZ2P cRGqbB5Ccl4rwp+hnwhAmwdBPr45Br0HyCMxts+yISjuIhG4O7yYOpu3ioN/JJBbXYKjpP 3S2gX1geanbOgq2wOMJOMQZEpIgZG47BcMoTxSFR9wt9Jn5ys/i6iTBBPiEOz0nORLmGiS 6lBsZ/IMGIQChMt9vbf8TCD0v7hz4JC6eJAeIj/lk+gjHvaJcDW0FGL3H4cIMqZG6n1fVt mJnAHreba8Wsp6YZuzrOGE6+utqT1vmj2eEDhEJ0YxQmyD5hDKXz+txDfPceUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=ii35ywf8; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of andrnils@gmail.com designates 2a00:1450:4864:20::22b as permitted sender) smtp.mailfrom=andrnils@gmail.com X-Rspamd-Queue-Id: 4BTs9y1bG6z46lY X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=ii35ywf8; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of andrnils@gmail.com designates 2a00:1450:4864:20::22b as permitted sender) smtp.mailfrom=andrnils@gmail.com X-Spamd-Result: default: False [-3.55 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.08)[-1.080]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ARC_SIGNED(0.00)[i=1]; NEURAL_HAM_LONG(-1.02)[-1.025]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::22b:from]; NEURAL_HAM_SHORT(-0.44)[-0.444]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 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 09:21:27 -0000 On Sun, Aug 16, 2020 at 11:11 AM Alexander V. Chernikov wrote: > 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 > candidate, but (a) it would either add another bunch of options or > drastically change the tool by introducing [route nhop add], [route nhgro= up > add] and (b) listing is traditionally done by netstat(8). > > I feel like there is a need of some cli tool that provides the ability to > easily extend it by having separate namespaces for each sub-command (hell= o, > 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=E2=80=99s our take on having the compatible interface wit= h 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 > > Seems like a good cli util to have. I personally don't like the name ip, to generic, and conflict with ip in linux. I think a somewhat more appropriate name would be ipctl. One might also look to naming and perhaps functionality like opensolaris had, with dladm, ipadm and so on. Best regards Andreas