How to migrate ppp0 (pppoe connection) to Network Manager

I’ve recently installed new F37 rather than upgrade from F36, and server hardware is the same for past 5+ years, with one local eth0 running LAN and ppp0 (establishing wan with public IP via pppoe). Since new installations don’t have ifup/ifdown scripts that use /etc/sysconfig/network-scripts/ifcfg-enpXXX
I have done nmcli c migrate and it migrated all devices but ppp0 ( i’ve tried specifically also nmcli c migrate ppp0 or nmcli c migratd --plugin en0 ifcfg-ppp0 but no luck). I’ve somehow managed to establish pppoe connection with adsl-start…
How can I manage ppp0 connection via nmcli?
It also for some reason (I have DNS defined in ifcfg-ppp0, but it seems as if it doesn’t look there any more) didn’t setup DNS servers so I put
resolvectl dns ppp0 127.0.0.1 1.2.3.4 in the startup script so ti that dns resolution works.
I use server environment, so no GUI.

This is not difficult if you follow the NetworkManager documentation and utilize shell autocomplete:

> nmcli connection add type 
...
adsl              gsm               ovs-port          wifi
bluetooth         infiniband        pppoe             wifi-p2p
...

> nmcli connection add type pppoe 
Error: 'username' argument is required.

> nmcli connection add type pppoe username test password test
Connection 'pppoe' (b1268820-c150-46a9-9507-29e2cb6bf6c7) successfully added.

> nmcli connection modify id pppoe connection.interface-name ppp0

See man nm-settings-nmcli or check the online documentation for the list of available properties.

2 Likes

Thanks
That saved me lots of time. I also didn’t realize to call property like pppoe.pasword (as it didn’t say in documentation) but it works and connection file has been created. I’m a bit careful as it is remote server and if I mess up, and lose connection, I have to drive there.
it looks like old scripts are keeping connection active now, as nmcli dev show
da2ee7b96342fdf49032b0a7e049135c3ad169da.png
and nmcli conn shows
e412096e49e410ac8316f16a4d7fca8a1df7aa23.png
as if NetworkManager is not managing this device.
I have to dig in to see where to disable old script and then use nmcli to manage all connections, but thanks again I’m slowly getting comfortable with using nmcli and substituting it in scripts

You can verify the generated PPPoE configuration:

sudo cat /etc/NetworkManager/system-connections/pppoe.nmconnection
nmcli connection show id pppoe

And then establish the connection like this:

nmcli connection up id pppoe
1 Like

I checked /etc/NetworkManager/system-connections/pppoe.nmconnection though haven’t seen any property to know if it will be started on boot, so i put it in script
nmcli connection up id pppoe and if it won’t work adsl-start, but it looks it isn’t coming back online… so the highway

By the way, looking through connection properties, I’ve noticed that ADSL has its own separate connection type described here and the protocol property can be PPPoE:

nmcli connection add type adsl protocol pppoe username test password test

There’s also a separate ADSL plugin package for NetworkManager which may be required to work with this connection type:

sudo dnf install NetworkManager-adsl
2 Likes

I see now it’s relatively easy to use NMnmcli connection edit pppoe and print will list all properties (was using ifcg scripts since RH 4.2 way before FC :slight_smile: ). I had to add connection.interface-name ppp0 and then it established connection.
I didn’t have NetworkManager-adsl package, but installing it, has cause downgrade to some packages, so I reverted back as I didn’t want to mess-up connection again.


Though downgrade didn’t seem like major from 1.40.10 to 1.40.0, but I have to study what exactly adsl does. I’ve seen it in the documentation and it looked to me that properties were working even without module installed.

I have no problem installing the latest version of NetworkManager-adsl.
Make sure the updates repo is enabled and clean the package cache:

sudo dnf config-manager --enable updates
sudo dnf clean all
2 Likes

Installation went through, I was just surprised why downgrade was needed for those packges

Can you maybe add one more command to your original answer, to be all in your answer for working solution
nmcli connection modify id pppoe connection.interface-name ppp0