LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: Chris Fowler <cfowler@outpostsentinel.com>
Cc: Guillaume Nault <gnault@redhat.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Paul Mackerras <paulus@samba.org>,
	"David S. Miller" <davem@davemloft.net>,
	"linux-ppp@vger.kernel.org" <linux-ppp@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ppp: Add rtnl attribute IFLA_PPP_UNIT_ID for specifying ppp unit id
Date: Tue, 10 Aug 2021 19:16:26 +0200	[thread overview]
Message-ID: <20210810171626.z6bgvizx4eaafrbb@pali> (raw)
In-Reply-To: <BN0P223MB0327A247724B7AE211D2E84EA7F79@BN0P223MB0327.NAMP223.PROD.OUTLOOK.COM>

On Tuesday 10 August 2021 16:38:32 Chris Fowler wrote:
> Isn't the UNIT ID the interface number?  As in 'unit 100' will give me ppp100?

If you do not specify pppd 'ifname' argument then pppd argument 'unit 100'
will cause that interface name would be ppp100.

But you are free to rename interface to any string which you like, even
to "ppp99".

But this ppp unit id is not interface number. Interface number is
another number which has nothing with ppp unit id and is assigned to
every network interface (even loopback). You can see them as the first
number in 'ip -o l' output. Or you can retrieve it via if_nametoindex()
function in C.


... So if people are really using pppd's 'unit' argument then I think it
really make sense to support it also in new rtnl interface.

> I have it running on over 1000 interfaces.  I use PPP in a P-t-P VPN scenario between a central server and remote network devices.  Iuse the unit id to identify a primary key in a database for that connection.  This is calculated as 1000+N = UNIT ID.
> 
> I use 1000 because I've also used PPP on the same system with modem boards for demand dial PPP connections.  The up and down scripts executed by PPP are written in C and allow a system where if the VPN link is down, the remote can dial and obtain the same IP addressing via modem.  We don't use modems that often now due to reliability issues.  It has been harder obtaining clean lines in the US.
> 
> The C program also applies routes that are defined in the database.  That search is based on the IP assigned, not the unit id.
> 
> Chris
> 
> ________________________________
> From: Guillaume Nault <gnault@redhat.com>
> Sent: Tuesday, August 10, 2021 11:39 AM
> To: Pali Rohár <pali@kernel.org>
> Cc: Jakub Kicinski <kuba@kernel.org>; Paul Mackerras <paulus@samba.org>; David S. Miller <davem@davemloft.net>; linux-ppp@vger.kernel.org <linux-ppp@vger.kernel.org>; netdev@vger.kernel.org <netdev@vger.kernel.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>
> Subject: Re: [PATCH] ppp: Add rtnl attribute IFLA_PPP_UNIT_ID for specifying ppp unit id
> 
> On Mon, Aug 09, 2021 at 09:31:09PM +0200, Pali Rohár wrote:
> > Better to wait. I would like hear some comments / review on this patch
> > if this is the correct approach as it adds a new API/ABI for userspace.
> 
> Personally I don't understand the use case for setting the ppp unit at
> creation time. I didn't implement it on purpose when creating the
> netlink interface, as I didn't have any use case.
> 
> On the other hand, adding the ppp unit in the netlink dump is probably
> useful.
> 

  parent reply	other threads:[~2021-08-10 17:16 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-07 16:37 Pali Rohár
2021-08-09 19:25 ` Jakub Kicinski
2021-08-09 19:31   ` Pali Rohár
2021-08-10 15:39     ` Guillaume Nault
2021-08-10 16:04       ` Pali Rohár
2021-08-11 17:19         ` Guillaume Nault
2021-08-11 17:54           ` Pali Rohár
2021-08-12  9:19             ` Guillaume Nault
2021-08-12 14:09               ` Pali Rohár
2021-08-12 19:12                 ` Guillaume Nault
     [not found]       ` <BN0P223MB0327A247724B7AE211D2E84EA7F79@BN0P223MB0327.NAMP223.PROD.OUTLOOK.COM>
2021-08-10 17:16         ` Pali Rohár [this message]
2021-08-10 18:11           ` James Carlson
2021-08-11 17:38             ` Guillaume Nault
2021-08-11 18:04               ` Pali Rohár
2021-08-12  9:28                 ` Guillaume Nault
2021-08-12 13:48                   ` Pali Rohár
2021-08-12 18:26                     ` Guillaume Nault
2021-08-12 19:04                       ` Pali Rohár
2021-08-16 16:11                         ` Guillaume Nault
2021-08-16 16:23                           ` Pali Rohár
2021-08-17 16:05                             ` Guillaume Nault
2021-08-17 16:21                               ` Pali Rohár
2022-07-09 12:09                                 ` Pali Rohár
2022-07-12 17:34                                   ` Guillaume Nault

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210810171626.z6bgvizx4eaafrbb@pali \
    --to=pali@kernel.org \
    --cc=cfowler@outpostsentinel.com \
    --cc=davem@davemloft.net \
    --cc=gnault@redhat.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ppp@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=paulus@samba.org \
    --subject='Re: [PATCH] ppp: Add rtnl attribute IFLA_PPP_UNIT_ID for specifying ppp unit id' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).