Re: Need help porting ifcfg-ppp0 config to NetworkManager

Beniamino Galvani <bgalvani redhat com> wrote:

this should create a connection mostly equivalent to your

 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

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

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.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]