Re: Need help porting ifcfg-ppp0 config to NetworkManager

2020-03-27 Thread Andrei Borzenkov via networkmanager-list
28.03.2020 00:30, Beniamino Galvani via networkmanager-list пишет:
> On Thu, Mar 26, 2020 at 09:09:36AM +, David Howells via 
> networkmanager-list wrote:
>> Hi,
>>
>> I need some help porting an ifcfg-ppp0 config from my old internet gateway
>> which was running to Fedora 16 to my new internet gateway which is running
>> F31.  Running "ifup ppp0" gives a message saying that this is deprecated and 
>> I
>> should switch to NM.
>>
>> Unfortunately, I can't work out how to configure NM to do this.  I can see
>> options for connections of ppp, (a)dsl and pppoe type, but I seem to need 
>> some
>> combination of these and that does not appear to be possible to configure 
>> with
>> nmcli, plus some pppd options (such as "ipv6" and "holdoff") that aren't
>> listed in the documentation.
>>
>> My (redacted) config is below.
>>
>> Thanks,
>> David
>> ---
>> [root@gatekeeper ~]# cat /etc/sysconfig/network-scripts/ifcfg-ppp0 
>> BOOTPROTO=dialup
>> DEFROUTE=yes
>> DEMAND=no
>> FIREWALL=NONE
>> ONBOOT=yes
>> PEERDNS=yes
>> PERSIST=yes
>> PIDFILE=/var/run/pppoe-adsl.pid
>> PING=.
>> SYNCHRONOUS=no
>> TYPE=xDSL
>> USERCTL=yes
>>
>> CONNECT_POLL=6
>> CONNECT_TIMEOUT=3600
>> DEVICE=ppp0
>> ETH=enp4s0
>> IPV6INIT=yes
>> LCP_FAILURE=120
>> LCP_INTERVAL=1
>> LINUX_PLUGIN=rp-pppoe.so
>> MRU=1492
>> MTU=1492
>> PPPOE_TIMEOUT=80
>>
>> PPPD_EXTRA="ipv6 , holdoff 1"
>> IPADDR=
>> USER=
> 
> Hi,
> 
> this should create a connection mostly equivalent to your
> configuration:
> 
>  nmcli connection add \
>type pppoe ifname ppp0 pppoe.parent enp4s0 \
>pppoe.user $myuser pppoe.password $mypw \
>ppp.mru 1492 ppp.mtu 1492 \
>ppp.lcp-echo-interval 1 ppp.lcp-echo-failure 120 \
>ipv4.address $myip
> 
> 'man nm-settings' shows all the properties supported by NM. I don't
> think "holdoff 1" is needed as NM always waits some seconds before
> reinitiating the connection. Also, I'm not sure IPv6 is supported. You
> could try adding 'ipv6.method manual ipv6.addresses $myip6' but it
> doesn't seem possible to specify a peer address.
> 

The same effect can probably be achieved by setting /128 local address
and adding /128 route to peer address.

> Note that the connection has 'autoconnect yes' by default and so it is
> started automatically at boot. If you want to activate it manually,
> you should also set 'autoconnect no', and then control it with:
> 
>  nmcli connection {up|down} pppoe-ppp0
> 
> Beniamino
> 
> 
> ___
> networkmanager-list mailing list
> networkmanager-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/networkmanager-list
> 




signature.asc
Description: OpenPGP digital signature
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Need help porting ifcfg-ppp0 config to NetworkManager

2020-03-27 Thread Beniamino Galvani via networkmanager-list
On Thu, Mar 26, 2020 at 09:09:36AM +, David Howells via networkmanager-list 
wrote:
> Hi,
> 
> I need some help porting an ifcfg-ppp0 config from my old internet gateway
> which was running to Fedora 16 to my new internet gateway which is running
> F31.  Running "ifup ppp0" gives a message saying that this is deprecated and I
> should switch to NM.
> 
> Unfortunately, I can't work out how to configure NM to do this.  I can see
> options for connections of ppp, (a)dsl and pppoe type, but I seem to need some
> combination of these and that does not appear to be possible to configure with
> nmcli, plus some pppd options (such as "ipv6" and "holdoff") that aren't
> listed in the documentation.
> 
> My (redacted) config is below.
> 
> Thanks,
> David
> ---
> [root@gatekeeper ~]# cat /etc/sysconfig/network-scripts/ifcfg-ppp0 
> BOOTPROTO=dialup
> DEFROUTE=yes
> DEMAND=no
> FIREWALL=NONE
> ONBOOT=yes
> PEERDNS=yes
> PERSIST=yes
> PIDFILE=/var/run/pppoe-adsl.pid
> PING=.
> SYNCHRONOUS=no
> TYPE=xDSL
> USERCTL=yes
> 
> CONNECT_POLL=6
> CONNECT_TIMEOUT=3600
> DEVICE=ppp0
> ETH=enp4s0
> IPV6INIT=yes
> LCP_FAILURE=120
> LCP_INTERVAL=1
> LINUX_PLUGIN=rp-pppoe.so
> MRU=1492
> MTU=1492
> PPPOE_TIMEOUT=80
> 
> PPPD_EXTRA="ipv6 , holdoff 1"
> IPADDR=
> USER=

Hi,

this should create a connection mostly equivalent to your
configuration:

 nmcli connection add \
   type pppoe ifname ppp0 pppoe.parent enp4s0 \
   pppoe.user $myuser pppoe.password $mypw \
   ppp.mru 1492 ppp.mtu 1492 \
   ppp.lcp-echo-interval 1 ppp.lcp-echo-failure 120 \
   ipv4.address $myip

'man nm-settings' shows all the properties supported by NM. I don't
think "holdoff 1" is needed as NM always waits some seconds before
reinitiating the connection. Also, I'm not sure IPv6 is supported. You
could try adding 'ipv6.method manual ipv6.addresses $myip6' but it
doesn't seem possible to specify a peer address.

Note that the connection has 'autoconnect yes' by default and so it is
started automatically at boot. If you want to activate it manually,
you should also set 'autoconnect no', and then control it with:

 nmcli connection {up|down} pppoe-ppp0

Beniamino


signature.asc
Description: PGP signature
___
networkmanager-list mailing list
networkmanager-list@gnome.org
https://mail.gnome.org/mailman/listinfo/networkmanager-list