MaruOpsInfrastructure and AI notes

About (Korean)Contact (Korean)

Configure Ubuntu 26.04 Networking: Static IP, nmtui and Two NICs

Ethernet switch with blue cable connected

Reference photo · Ethernet switch with blue cable connected · Photo: Mvdiogo / Source / CC BY-SA 4.0 · Resized for listings; illustrative photo, not the tested environment

On Ubuntu 26.04, identify whether networkd or NetworkManager manages each interface before choosing an editing tool. Distinguishing the Server and Desktop configurations explains the roles of Netplan and nmtui. Then check how address, routing and DNS settings interact when two NICs are present.

The standard is Ubuntu 26.04 LTS, and the document confirmation date is October 18, 2026. The official LTS change notice introduces Netplan 1.2 and systemd 259. Depending on the update status, the detailed versions of installed packages may vary, so check your own output as well. Ubuntu 26.04 LTS Change Guide Based on , we have distinguished the differences between the parts continuing from 24.04 and the management tools.

Linux operation articles seen together · Rocky 9 Fixed IP · Ubuntu 24.04 Netplan · Ubuntu 26.04·nmtui·systemd service·log·LVM root extension·general partition root Expand

On this page

1. Check the version and NIC management entity first.

cat /etc/os-release
dpkg-query -W netplan.io systemd
ip -br link
ip -4 -br address
ip -4 route
sudo netplan get
sudo netplan status -a
systemctl is-active systemd-networkd NetworkManager
Who currently manages the NIC?config pathMainly used tools
systemd-networkdNetplan YAML → networkd settingssudoedit, netplan generate·try, networkctl
NetworkManagerLinking NetworkManager profile and Netplannmtui, nmcli, desktop network settings
cloud-init·external management toolNetwork source settings for the toolCheck the deployment policy first

Ubuntu’s NetworkManager can be integrated with Netplan. There is no need to misunderstand that different programs are conflicting when you see the configuration where the values ​​changed with nmtui are reflected in Netplan YAML. Check the save location, but do not edit the generated file of /run like the original. Netplan’s NetworkManager linkage description and You can check the connection relationship in the NetworkManager package of Ubuntu 26.04.

2. Server: Separately configure the management network and internal network.

If you have two NICs, it’s tempting to put a gateway on each side, but a network dedicated to internal communications often doesn’t require a default route. This example uses ens33 for external communication and management, and ens34 for a separate internal training network. Both virtual NICs must be physically connected to different VMnets or VLANs.

roleExample addressDefault route/DNS
ens33: management network192.168.50.26/24Gateway 192.168.50.1, DNS 192.168.50.1
ens34: Internal training network192.168.60.26/24No default route, no separate DNS

The address changes to match the actual network. Start by checking that the IPs are from the same subnet, are in use, and do not conflict with DHCP reservations. With the backup procedure of Ubuntu 24.04 Netplan, the existing YAML is saved and duplicate definitions of the same NIC are cleaned up and applied. Preserve other NICs and existing IPv6 policies as needed.

sudoedit /etc/netplan/60-static.yaml
network:
  version: 2
  renderer: networkd
  ethernets:
    ens33:
      dhcp4: false
      addresses:
        - 192.168.50.26/24
      routes:
        - to: default
          via: 192.168.50.1
          metric: 100
      nameservers:
        addresses:
          - 192.168.50.1
    ens34:
      dhcp4: false
      addresses:
        - 192.168.60.26/24
      accept-ra: false
      optional: true

optional: true prevents networkd from waiting for ens34 as an online prerequisite at boot. There is no option to turn off the connection or automatically repair the failure. This internal network was assumed to be an IPv4 training network and did not receive IPv6 router advertisements using accept-ra: false. If it is an internal network using IPv6, this policy is also changed to match the address design of the network. This is not a setting that turns off ens33’s IPv6 operation altogether.

sudo chmod 600 /etc/netplan/60-static.yaml
sudo netplan get
sudo netplan generate
sudo netplan try --timeout 120

Maintain the confirmation window in the VM console and confirm the SSH, DNS, and external communication of the new address. A timeout in the try does not mean that the disk file has been reverted, so in case of failure it will be restored by comparing the backup to the current YAML. For detailed conditions of application and recovery, please check the Netplan try manual.

3. Desktop: Use nmtui on NetworkManager device

This section verifies that the NIC is managed by NetworkManager in netplan status and nmcli device status. Do not blindly install and restart two administrators to make the server’s networkd NIC appear as nmtui. Changing the management entity is a separate conversion task.

systemctl is-active NetworkManager
nmcli device status
nmcli -f NAME,UUID,TYPE,DEVICE connection show
command -v nmtui

If you are installing using NetworkManager and there is no nmtui executable file, check the package status with sudo apt update and then sudo apt install network-manager. Servers already managed by networkd do not use this command as a configuration switchover procedure.

sudo nmtui
  1. In Edit a connection, select your wired connection.
  2. Change IPv4 CONFIGURATION to Manual.
  3. Enter address 192.168.50.26/24, gateway 192.168.50.1, and actual DNS address.
  4. Check Use default path on the management NIC and Automatically connect. If it is an internal network NIC, set it to not create a default route.
  5. Preserve and save the existing IPv6 policy and re-enable the connection from the console.

If you want to log with a command, you can modify the profile like this: Choose either nmtui or nmcli. PROFILE is not the device name, but the connection name or UUID we checked earlier. Below is an example of a single management NIC, with existing static routes checked separately.

NIC='ens33'
PROFILE='Wired connection 1'
BACKUP_PROFILE='before-static-ubuntu26'

sudo nmcli connection clone "$PROFILE" "$BACKUP_PROFILE"
sudo nmcli connection modify "$BACKUP_PROFILE" connection.autoconnect no
sudo nmcli connection modify "$PROFILE" \
  ipv4.method manual \
  ipv4.addresses '192.168.50.26/24' \
  ipv4.gateway '192.168.50.1' \
  ipv4.dns '192.168.50.1' \
  ipv4.ignore-auto-dns yes \
  ipv4.never-default no \
  connection.autoconnect yes
sudo nmcli connection up "$PROFILE" ifname "$NIC"

Since this is an address change, SSH may be disconnected. Proceed from the console, or review the checkpoint path shown in Rocky 9 Fixed IP before making any changes. When recovering, it re-enables the backup profile in the console and also cleans up auto-associations to prevent the wrong profile from being selected on reboot.

4. Check the route for each destination on both NICs.

ip -4 route show default
ip route get 1.1.1.1
ip route get 192.168.60.10
resolvectl status
resolvectl query example.com
networkctl status ens33

In the above Server example, the external destination must be selected as the gateway of ens33, and the internal subnet destination on the same subnet must be selected as ens34. This does not mean that 192.168.60.10 actually exists, it is just an example to look at path selection. If your design requires multiple default routes, you should also plan metric or policy routing.

The Desktop’s NetworkManager NIC sees the status as nmcli -f GENERAL,IP4 device show ens33 instead of networkctl. If the DNS query fails, check the device’s DNS and path first. If SSH does not work immediately after changing the IP, address duplication, firewall, and actual virtual NIC connection are also checked.

When booting is delayed while waiting for the network

systemd-analyze blame
sudo journalctl -b -u systemd-networkd-wait-online.service --no-pager
sudo journalctl -b -u NetworkManager-wait-online.service --no-pager

Before turning off all wait-online services, check which NICs are required to wait. The management network needs to be prepared, but if you are waiting for only ens34 without the training cable, there is a reason to review the optional policy. Creation/change of the service itself and log inquiry are continued at systemd service·log.

Verification Scope · 2026-10-18: Confirmed the creation of settings for a static IP, two NICs, and DHCP examples in Netplan 1.2 in an Ubuntu 26.04.1 container, and the offline creation and change of profiles in NetworkManager 1.54.3. The principle of address activation and recovery was confirmed on the secondary NIC of Ubuntu 24.04 VM, and verification of switching NICs by actually booting Ubuntu 26.04 was not performed.

Download the network·systemd example file·Netplan YAML, bundled scripts that read service·environment files and storage structures. Change the address and device name to match the actual environment. It does not include scripts to auto-expand disks.