Re: Need help porting ifcfg-ppp0 config to NetworkManager
Bjørn Mork wrote: > > Further, NM doesn't allow me to specify a peer address ("ipv6 ," is the > > only parameter that it will specify, with both addresses omitted), and I > > don't know how to automatically retrieve the peer address from within the > > NM framework. > > Note that you don't specify the peer address in your ifcfg file either. > pppd(8) documents it as > > ipv6 , > > and that's what it is. These are input values for IPV6CP, which doesn't > negotiate addresses or routing. That's supposed to be configured the > same way as for any other IPv6 link: Using SLAAC and DHCPv6. Which > makes IPv6 over PPP pretty different from IPv4 over PPP, but exactly the > same as IPv6 over anything else. > > The negotiated interface identifiers will be combined with fe80::/64 to > create link local addresses and with any on-link prefixes advertised in > RAs. > > There is no IPv6 default route option either AFAIK. But I believe it > would make sense to offer this as an alternatve in NM for cases where > the peer doesn't send any RA. It is a pretty common use case. Does that mean that I can't do what I need as things stand? Or do I need to set up DHCPv6? If that's the case, there's no MAC address to key the address on. Is it not possible to manually set a route? Sorry about this, David ___ 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
David Howells via networkmanager-list writes: > Andrei Borzenkov wrote: > >> The same effect can probably be achieved by setting /128 local address >> and adding /128 route to peer address. > > Any suggestion as to what address I should set? My address block is > 2001:8b0:194::/48 if that helps. I've tried setting a random one from that, > but it causes an error ("cif6addr: ioctl(SIOCDIFADDR): No such address" I > think - I can't try it just now). > I've also tried setting a route, but that didn't seem to work either > ("sif6addr: ioctl(SIOCADDRT): Permission denied (line 2646)" I think was the > error). > > Further, NM doesn't allow me to specify a peer address ("ipv6 ," is the only > parameter that it will specify, with both addresses omitted), and I don't know > how to automatically retrieve the peer address from within the NM framework. Note that you don't specify the peer address in your ifcfg file either. pppd(8) documents it as ipv6 , and that's what it is. These are input values for IPV6CP, which doesn't negotiate addresses or routing. That's supposed to be configured the same way as for any other IPv6 link: Using SLAAC and DHCPv6. Which makes IPv6 over PPP pretty different from IPv4 over PPP, but exactly the same as IPv6 over anything else. The negotiated interface identifiers will be combined with fe80::/64 to create link local addresses and with any on-link prefixes advertised in RAs. There is no IPv6 default route option either AFAIK. But I believe it would make sense to offer this as an alternatve in NM for cases where the peer doesn't send any RA. It is a pretty common use case. Bjørn ___ 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
Andrei Borzenkov wrote: > The same effect can probably be achieved by setting /128 local address > and adding /128 route to peer address. Any suggestion as to what address I should set? My address block is 2001:8b0:194::/48 if that helps. I've tried setting a random one from that, but it causes an error ("cif6addr: ioctl(SIOCDIFADDR): No such address" I think - I can't try it just now). I've also tried setting a route, but that didn't seem to work either ("sif6addr: ioctl(SIOCADDRT): Permission denied (line 2646)" I think was the error). Further, NM doesn't allow me to specify a peer address ("ipv6 ," is the only parameter that it will specify, with both addresses omitted), and I don't know how to automatically retrieve the peer address from within the NM framework. Thanks, David ___ 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
Beniamino Galvani wrote: > 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. Okay, that gets me a step closer, thanks. I can actually bring up the connection now. > 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. It seems I don't need to specify explicit addresses for the link. Passing "ipv6 ," to pppd works sufficiently well from ifcfg-ppp0. Looking at src/ppp/nm-ppp-manager.c in NetworkManager, I can see that NM can pass this to pppd: if (ip6_enabled) { /* Allow IPv6 to be configured by IPV6CP */ nm_strv_ptrarray_add_string_dup (cmd, "ipv6"); nm_strv_ptrarray_add_string_dup (cmd, ","); } else nm_strv_ptrarray_add_string_dup (cmd, "noipv6"); if ip6_enabled is true, which is a condition checked by the caller: ip6_method = nm_utils_get_ip_config_method (connection, AF_INET6); ip6_enabled = nm_streq (ip6_method, NM_SETTING_IP6_CONFIG_METHOD_AUTO); and setting ipv6.method to "auto" does indeed do this, but no routing is set when the route comes up. Doing "ifup ppp0" has pppd set the route, but this is disabled by nm-ppp-manager, so I'm not sure how to configure an outside route. I've tried setting a route of "::/0" for the ppp connection, but that doesn't seem to work and I suspect I'm not doing it right. For that matter, if I disable ipv6 over ppp and just bring up the connection with ipv4, I'm not sure how/why a global route is set. > 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: I definitely need it to come up automatically. David ___ 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
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
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
Need help porting ifcfg-ppp0 config to NetworkManager
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= ___ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list