Announcement

Collapse
No announcement yet.

Netplan vs Network Manager for static IP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [Network] Netplan vs Network Manager for static IP

    In 24.04 when I entered the command `nmcli connection show` I was shown a list of UUIDs drawn from the files stored at `/etc/NetworkManager/system-connections/​someUUID.nmconnection`

    Now in 26.04 those files are gone, but the command still shows me the same old list.

    Some digging found .yaml files with the info I needed at `/etc/netplan/​90-NM-someUUID.yaml`

    If I want to set IP addresses and such do I still use `nmcli connection modify [args]`?

    Or has that been replaced, and if so what is/are the command(s) I need to learn to use?

    #2
    Originally posted by TwoFistedJustice View Post
    In 24.04 when I entered the command `nmcli connection show` I was shown a list of UUIDs drawn from the files stored at `/etc/NetworkManager/system-connections/​someUUID.nmconnection`

    Now in 26.04 those files are gone, but the command still shows me the same old list.

    Some digging found .yaml files with the info I needed at `/etc/netplan/​90-NM-someUUID.yaml`

    If I want to set IP addresses and such do I still use `nmcli connection modify [args]`?

    Or has that been replaced, and if so what is/are the command(s) I need to learn to use?
    you can still use the usual commands
    What's changed in Ubuntu 26.04 is not so much how you manage connections, but where the persistent configuration is stored.

    " Starting around Ubuntu 23.10/24.04, NetworkManager on Ubuntu gained a "YAML backend" built on libnetplan. Instead of storing profiles as native keyfiles in /etc/NetworkManager/system-connections/*.nmconnection, it stores them as Netplan YAML in /etc/netplan/90-NM-<uuid>.yaml. On boot, netplan.io's generator processes those YAML files and renders them into a NetworkManager configuration in /run/NetworkManager/system-connections. So the "real" files live in /etc/netplan now, but NetworkManager still assembles its runtime connection profiles from them (in /run, not /etc), which is why nmcli connection show still shows the same UUID list — it's reading its own generated/runtime state, which is derived from those YAML files​. "
    https://documentation.ubuntu.com/cor...r-and-netplan/
    ʟɨռʊӼ ʄօʀ ʟɨʄɛ

    Comment


      #3
      You can also manually edit the yaml file and use "netplan try" in Konsole to check for errors. My server (24.04) fixed IP looks like this:

      Code:
      # This file describes the network interfaces available on your system
      # For more information, see netplan(5).
      network:
        version: 2
        renderer: NetworkManager
        ethernets:
          eno1:
            dhcp4: false
            dhcp6: false
            addresses: [192.168.1.250/23]
            gateway4: 192.168.1.3
            nameservers:
              addresses: [8.8.8.8,8.8.4.4]
          enp2s0:
            dhcp4: false
            dhcp4-overrides:
              use-dns: false
            dhcp6: false
            dhcp6-overrides:
              use-dns: false
      This equates to eno1 on a fixed IP and enp2s0 as disabled. My desktop (Kubuntu 26.04) is:
      Code:
      # Let NetworkManager manage all devices on this system
        network:
        version: 2
        renderer: NetworkManager
        ethernets:
          enp39s0:
            addresses: [192.168.1.199/23]
            gateway4: 192.168.1.3
            nameservers:
              addresses: [8.8.8.8,8.8.4.4]
          dhcp4: no
          dhcp6: no

      Seems odd, but probably inconsequential, that your yaml file starts with 90- when all mine are 01-network-manager-all.yaml

      Previously in 18.04
      Last edited by oshunluvr; Jul 07, 2026, 03:58 PM.

      Please Read Me

      Comment


        #4
        Use networkmanager as you already are:
        https://ubuntu.com/tutorials/access-...fore-you-start
        https://oneuptime.com/blog/post/2026...-renderer/view

        And for more tmi:
        https://netplan.readthedocs.io/en/st...an-everywhere/
        https://netplan.readthedocs.io/en/stable/nm-all/

        But you can still manage things via the yaml files if needed or desired, iirc.

        I just use the networkmanager GUI tools, and occasionally the cli ones over ssh as needed.

        Originally posted by TwoFistedJustice View Post
        In 24.04 when I entered the command `nmcli connection show` I was shown a list of UUIDs drawn from the files stored at `/etc/NetworkManager/system-connections/​someUUID.nmconnection`
        fwiw, my 24.04 does not have any files in this dir, nor does my 26.04 setup. Probablky from previous releases, I imagine?

        NetworkManager seems to send things to netplan, in terms of config files, as I do have interface-specific ones in /etc/netplan for both my wired and wireless connections.

        Originally posted by oshunluvr View Post
        Seems odd, but probably inconsequential, that your yaml file starts with 90- when all mine are 01-network-manager-all.yaml
        Mine are, other than 01-network-manager-all.yaml
        I have one for my Ethernet and one for my WiFi on my PC, set by the GUI tools.

        My "sever" on an upgraded Kubuntu 26.04 has similar, but set using nmcli, or rather nmtui.


        ...aaaand this reminds me to back up a couple more files for convenience sake.



        Self-built: Asus PRIME B550M-K/Ryzen 5600GT/32Gb/Intel ARC B580 12Gb/KDE neon
        HP Elitedesk 800 G3 Mini: i5-7500T(35w)/32Gb/Kubuntu LTS
        HP Chromebook 14: i5-1135G7/8Gb/512Gb SSD/KDE Linux

        Comment


          #5
          I also used NetworkManager for a long time on my servers. I mostly used “nmtui.” That was pretty convenient.

          But I’ve since gotten used to “networkctl” (netplan). I’ve noticed that it offers more features that work to my advantage. For example, it automatically uses the central local NTP server that’s deployed via DHCP. That doesn’t happen with NetworkManager. And it’s compatible with Cloudinit, which I’ve also come to appreciate when working with servers.

          Comment

          Users Viewing This Topic

          Collapse

          There are 0 users viewing this topic.

          Working...
          X