Skip to content
Linux networking · Chapter 3 of 20 Day 1: ip and netplan

Day 1: ip and netplan

Goal: Read and change interfaces, addresses, routes and neighbors with ip, on a playground that never endangers the SSH connection. Then make the same configuration persistent with netplan, safeguarded by netplan try · Duration: approx. 75 min · Prerequisite: Day 0

Briefing

  • ip from iproute2 is the one tool for everything the kernel knows about networks: links, addresses, routes, neighbors. ifconfig, route and arp have been deprecated for years and show only part of it.
  • Everything you change with ip is volatile: it lives in the kernel and is gone after a reboot. It only becomes persistent once it’s in a configuration. On Ubuntu, that’s netplan.
  • netplan itself configures nothing. It translates YAML into files for systemd-networkd, and that sets up the interfaces.
  • One rule applies all day: eth0 carries your SSH connection, so you don’t touch eth0. You practice on dummy interfaces. They behave like a network card without a cable: addresses and routes work, packets disappear.
   /etc/netplan/*.yaml ──netplan generate──▶ /run/systemd/network/*.network|.netdev
                                                       │
                                             systemd-networkd
                                                       │
           ip link / ip addr / ip route ─────────▶  Kernel  ◀── volatile

Drill 1: Reading, short and long

Reading before changing. The shorthand -br (brief) shows one line per interface:

# on netz
ip -br link
ip -br -4 a

Expected:

lo               UNKNOWN        00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP>
eth0             UP             bc:24:11:4d:d9:08 <BROADCAST,MULTICAST,UP,LOWER_UP>
lo               UNKNOWN        127.0.0.1/8
eth0             UP             172.16.0.123/24 metric 100

-4 hides IPv6, -6 hides IPv4. The long form reveals more, for example how much longer the address from the DHCP server is valid:

# on netz
ip -4 a show eth0

Expected:

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    altname enp0s18
    inet 172.16.0.123/24 metric 100 brd 172.16.0.255 scope global dynamic eth0
       valid_lft 77288sec preferred_lft 77288sec
Part Meaning
UP,LOWER_UP You switched the interface on (UP), and it has a connection (LOWER_UP)
altname enp0s18 The name based on the PCI slot. netplan renames the card to eth0 via set-name
dynamic, valid_lft From the DHCP server, valid for this many more seconds. Static addresses show forever

For scripts there’s -j (JSON). With jq you extract exactly one field instead of counting columns:

# on netz
ip -j -4 a show eth0 | jq -r '.[0].addr_info[] | "\(.local)/\(.prefixlen) gültig noch \(.valid_life_time)s"'
ip -j route show default | jq -r '.[0] | "\(.gateway) über \(.dev), Metrik \(.metric)"'

Expected:

172.16.0.123/24 gültig noch 77281s
172.16.0.1 über eth0, Metrik 100

And -s counts what went over the link. With -h in readable units:

# on netz
ip -s -h link show eth0

Expected (counter lines, your numbers will differ):

    RX:  bytes packets errors dropped  missed   mcast
          395k   2.32k      0       0       0       0
    TX:  bytes packets errors dropped carrier collsns
         20.8k     132      0       0       0       0

If errors or dropped rise, that’s the first hint of trouble with the cable, driver or buffers. You’ll remember this on Day 9.

Save your progress? Sign up for free

Drill 2: The neighbors

Before a packet arrives in the local network, the kernel needs the destination’s MAC address. It remembers the answers to ARP (IPv6: Neighbor Discovery) in the neighbor table:

# on netz
ping -c1 -W1 172.16.0.1 >/dev/null
ip neigh show 172.16.0.1
ping -c1 -W1 172.16.0.15 >/dev/null
ip neigh show 172.16.0.15

Expected (in the lab):

172.16.0.1 dev eth0 lladdr d0:21:f9:8a:cf:c6 REACHABLE
172.16.0.15 dev eth0 FAILED
State Meaning
REACHABLE Just confirmed, the MAC address is fresh
STALE Known, but not confirmed for a while. The kernel asks again with the next packet
DELAY, PROBE Query in progress
INCOMPLETE ARP request sent, no answer yet
FAILED Nobody answered. The device is off, misaddressed or in a different network

Tried it: In the lab, 172.16.0.15 is FAILED, even though the DHCP server hands out exactly this address as the first DNS server (Day 0, Drill 1). resolvectl status eth0 shows the consequence: Current DNS Server: 8.8.8.8. The resolver has silently fallen back to the second server. Why that works and when it doesn’t is covered on Day 6. For today, what matters: FAILED in the neighbor table means “not even reachable in the local network,” one layer below DNS.

Save your progress? Sign up for free

Drill 3: The playground

Create a dummy interface, set an address, switch it on:

# on netz
sudo ip link add spiel0 type dummy
ip -br link show spiel0
sudo ip addr add 10.10.10.1/24 dev spiel0
ip -br a show spiel0
ip r show dev spiel0

Expected:

spiel0           DOWN           16:c7:59:5a:53:66 <BROADCAST,NOARP>
spiel0           DOWN           10.10.10.1/24

The address is set, but the route for 10.10.10.0/24 is still missing: the kernel adds the local network only once the interface is running.

# on netz
sudo ip link set spiel0 up
ip -br a show spiel0
ip r show dev spiel0
ping -c1 -W1 10.10.10.1 | sed -n 2p
ping -c1 -W1 10.10.10.2 | tail -2

Expected:

spiel0           UNKNOWN        10.10.10.1/24 fe80::2cda:f0ff:fe18:49ba/64
10.10.10.0/24 proto kernel scope link src 10.10.10.1
64 bytes from 10.10.10.1: icmp_seq=1 ttl=64 time=0.038 ms
1 packets transmitted, 0 received, 100% packet loss, time 0ms

The own address answers (the kernel handles that without using the interface). Everything else the kernel sends into spiel0, and a dummy interface drops packets. Switching it on also added an IPv6 address fe80::: every interface gets a link-local address automatically.

Tried it: The MAC address in the first line (16:c7:…) doesn’t match the IPv6 address, which is derived from 2e:da:f0:18:49:ba. The reason: for new interfaces, udev sets a persistent MAC address according to /usr/lib/systemd/network/99-default.link, derived from the name. An ip -br link right after creation still sees the random one. If you delete spiel0 and create it again, you get the same MAC address again.

A second address in the same network:

# on netz
sudo ip addr add 10.10.10.2/24 dev spiel0
ip -4 a show spiel0

Expected:

3: spiel0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    inet 10.10.10.1/24 scope global spiel0
       valid_lft forever preferred_lft forever
    inet 10.10.10.2/24 scope global secondary spiel0
       valid_lft forever preferred_lft forever

Remember secondary for Drill 5.

Save your progress? Sign up for free

Drill 4: Setting, checking, replacing routes

192.0.2.0/24 and 198.51.100.0/24 are documentation networks that never appear on the internet. Ideal for practice:

# on netz
sudo ip route add 192.0.2.0/24 via 10.10.10.254 dev spiel0
sudo ip route add 198.51.100.0/24 dev spiel0 metric 50
ip r

Expected:

default via 172.16.0.1 dev eth0 proto dhcp src 172.16.0.123 metric 100
1.1.1.1 via 172.16.0.1 dev eth0 proto dhcp src 172.16.0.123 metric 100
8.8.8.8 via 172.16.0.1 dev eth0 proto dhcp src 172.16.0.123 metric 100
10.10.10.0/24 dev spiel0 proto kernel scope link src 10.10.10.1
172.16.0.0/24 dev eth0 proto kernel scope link src 172.16.0.123 metric 100
172.16.0.1 dev eth0 proto dhcp scope link src 172.16.0.123 metric 100
172.16.0.15 dev eth0 proto dhcp scope link src 172.16.0.123 metric 100
192.0.2.0/24 via 10.10.10.254 dev spiel0
198.51.100.0/24 dev spiel0 scope link metric 50

Two kinds of routes: via sends through a router (the gateway must be in the local network); without via, the destination sits directly on the interface (scope link).

Which route the kernel actually takes for a destination is answered by ip route get. That’s the most important command when troubleshooting:

# on netz
ip route get 192.0.2.7
ip route get 198.51.100.9
ip route get 9.9.9.9

Expected:

192.0.2.7 via 10.10.10.254 dev spiel0 src 10.10.10.1 uid 1000
    cache
198.51.100.9 dev spiel0 src 10.10.10.1 uid 1000
    cache
9.9.9.9 via 172.16.0.1 dev eth0 src 172.16.0.123 uid 1000
    cache

The longest matching route wins; default (0.0.0.0/0) always matches and comes last. src additionally shows the source address the packet leaves with.

Adding the same route again doesn’t work, replacing it does:

# on netz
sudo ip route add 192.0.2.0/24 via 10.10.10.254
sudo ip route replace 192.0.2.0/24 via 10.10.10.253
ip r show 192.0.2.0/24

Expected:

RTNETLINK answers: File exists
192.0.2.0/24 via 10.10.10.253 dev spiel0

replace creates or overwrites without an error. In scripts and automation, that’s almost always the better choice.

Save your progress? Sign up for free

Drill 5: Watching what happens

ip monitor shows every change to the network as it happens. Open a second terminal on netz:

# on netz (Terminal 2)
ip monitor link address route

In the first terminal, change the MAC address and MTU. Both only work while the interface is down:

# on netz
sudo ip link set spiel0 down
sudo ip link set spiel0 address 02:00:00:00:00:01
sudo ip link set spiel0 mtu 9000
sudo ip link set spiel0 up
sudo ip addr del 10.10.10.1/24 dev spiel0

Expected in terminal 2 (shortened: without IPv6 lines and without the entries of the local table):

3: spiel0: <BROADCAST,NOARP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 2e:da:f0:18:49:ba brd ff:ff:ff:ff:ff:ff
3: spiel0: <BROADCAST,NOARP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:00:00:00:00:01 brd ff:ff:ff:ff:ff:ff
3: spiel0: <BROADCAST,NOARP> mtu 9000 qdisc noqueue state DOWN group default
    link/ether 02:00:00:00:00:01 brd ff:ff:ff:ff:ff:ff
3: spiel0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 9000 qdisc noqueue state UNKNOWN group default
    link/ether 02:00:00:00:00:01 brd ff:ff:ff:ff:ff:ff
10.10.10.0/24 dev spiel0 proto kernel scope link src 10.10.10.1
Deleted 3: spiel0    inet 10.10.10.2/24 scope global secondary spiel0
Deleted 3: spiel0    inet 10.10.10.1/24 scope global spiel0
Deleted 10.10.10.0/24 dev spiel0 proto kernel scope link src 10.10.10.1

Stop the monitor with Ctrl+C. Two things stand out.

First: You only deleted 10.10.10.1, but 10.10.10.2 is gone too. The second address was secondary; it depends on the first:

# on netz
sysctl net.ipv4.conf.spiel0.promote_secondaries

Expected:

net.ipv4.conf.spiel0.promote_secondaries = 0

With 1, the kernel would promote the second address to primary. On routers with several addresses per network, this is a common reason for “suddenly the address is gone.”

Second: Where are the routes to 192.0.2.0/24 and 198.51.100.0/24?

# on netz
ip r show dev spiel0

Expected: no output

Tried it: On ip link set spiel0 down, the kernel deleted all routes via spiel0, and ip monitor didn’t show a single line for it. After up, only the route of the local network comes back (proto kernel); your own routes stay gone. So a brief wobble on the cable is enough, and manually set routes are gone, even without a reboot.

That’s exactly why every route that should stay belongs in the configuration. Away with the playground:

# on netz
sudo ip link del spiel0

Save your progress? Sign up for free

Drill 6: Reading netplan

The configuration of eth0 dates from the VM’s first boot:

# on netz
ls -l /etc/netplan/
sudo cat /etc/netplan/50-cloud-init.yaml

Expected:

-rw------- 1 root root 139 Nov 13 12:36 50-cloud-init.yaml
network:
  version: 2
  ethernets:
    eth0:
      match:
        macaddress: "bc:24:11:4d:d9:08"
      dhcp4: true
      set-name: "eth0"

The card is identified by its MAC address, renamed to eth0 and gets its address via DHCP. Before anything else: back it up.

# on netz
sudo cp -a /etc/netplan /root/netplan.bak-tag01

What netplan makes of it is in /run/systemd/network/. And what systemd-networkd made of that is shown by networkctl and netplan status:

# on netz
sudo ls /run/systemd/network/
networkctl list
sudo netplan status eth0 | sed -n 5,9p

Expected:

10-netplan-eth0.link
10-netplan-eth0.network
IDX LINK TYPE     OPERATIONAL SETUP
  1 lo   loopback carrier     unmanaged
  2 eth0 ether    routable    configured

2 links listed.
●  2: eth0 ethernet UP (networkd: eth0)
      MAC Address: bc:24:11:4d:d9:08 (Red Hat, Inc.)
        Addresses: 172.16.0.123/24 (dynamic, dhcp)
                   fd0e:fdec:438a:328:be24:11ff:fe4d:d908/64 (dynamic, ra)
                   fe80::be24:11ff:fe4d:d908/64 (link)

configured means: networkd manages the interface according to a configuration. unmanaged for lo means: networkd doesn’t take care of it. netplan here is version 1.1.2:

# on netz
dpkg-query -W -f='${Version}\n' netplan.io

Expected:

1.1.2-8ubuntu1~24.04.3

Save your progress? Sign up for free

Drill 7: Your own file, safely tried out

The same playground as in Drill 3, this time persistent. The new file does not go straight into /etc/netplan, but into the home directory:

# on netz
cat > ~/60-spiel.yaml <<'EOF'
network:
  version: 2
  dummy-devices:
    spiel0:
      addresses:
        - 10.20.0.1/24
      routes:
        - to: 192.0.2.0/24
          via: 10.20.0.254
          on-link: true
EOF
sudo chown root:root ~/60-spiel.yaml
sudo chmod 600 ~/60-spiel.yaml

on-link: true says: the gateway 10.20.0.254 is directly reachable, even if the kernel doesn’t know it yet. netplan wants the permissions 600. With 644 it warns on every run: Permissions for /etc/netplan/60-spiel.yaml are too open.

netplan try applies a configuration and rolls it back after a timeout if you don’t confirm. That’s the insurance against locking yourself out of SSH. First without confirmation, timeout 10 seconds:

# on netz
sudo netplan try --config-file ~/60-spiel.yaml --timeout 10

Don’t press anything. Expected (end):

Do you want to keep these settings?

Press ENTER before the timeout to accept the new configuration

Changes will revert in  1 seconds
Reverting.
# on netz
ls /etc/netplan
ip -br a show spiel0

Expected:

50-cloud-init.yaml
Device "spiel0" does not exist.

Everything rolled back. Now once more, this time pressing Enter before the timeout:

# on netz
sudo netplan try --config-file ~/60-spiel.yaml --timeout 20
ls /etc/netplan
ip -br a show spiel0
ip r show dev spiel0

Expected:

Configuration accepted.
50-cloud-init.yaml  60-spie.1795461134.134172.yaml
spiel0           UNKNOWN        10.20.0.1/24 fe80::34bf:43ff:fe7e:99b4/64
10.20.0.0/24 proto kernel scope link src 10.20.0.1
192.0.2.0/24 via 10.20.0.254 proto static onlink

Tried it: 60-spiel.yaml became 60-spie.1795461134.134172.yaml. netplan appends the timestamp on purpose. The missing l is a bug in netplan 1.1.2: it strips the extension as a set of characters, not as a word, and l is one of the characters in .yaml. A file 61-spiel1.yaml, on the other hand, stayed intact (61-spiel1.1795461257.4005685.yaml). Fix the name by hand afterwards:

# on netz
sudo mv /etc/netplan/60-spie.*.yaml /etc/netplan/60-spiel.yaml
ls /etc/netplan

Expected:

50-cloud-init.yaml  60-spiel.yaml

Tried it: The first attempt went the other way around: file put straight into /etc/netplan, then sudo netplan try. After Reverting., spiel0 was still there, with address and route. At startup, netplan try backs up the contents of /etc/netplan and restores exactly that. If the new file was already there, it’s part of the backup. Hence always --config-file.

What netplan built from the file:

# on netz
sudo cat /run/systemd/network/10-netplan-spiel0.netdev /run/systemd/network/10-netplan-spiel0.network

Expected:

[NetDev]
Name=spiel0
Kind=dummy
[Match]
Name=spiel0

[Network]
LinkLocalAddressing=ipv6
Address=10.20.0.1/24
ConfigureWithoutCarrier=yes

[Route]
Destination=192.0.2.0/24
Gateway=10.20.0.254
GatewayOnLink=true

You’ll find every YAML line here again. If netplan doesn’t do something the way you expected, this is the place to look.

Save your progress? Sign up for free

Drill 8: Changing without an editor, and what networkd does with strangers

netplan get and netplan set read and write individual values:

# on netz
sudo netplan get dummy-devices
sudo netplan set dummy-devices.spiel0.mtu=9000
sudo netplan apply
ip link show spiel0 | head -1

Expected:

spiel0:
  addresses:
  - "10.20.0.1/24"
  routes:
  - on-link: true
    to: "192.0.2.0/24"
    via: "10.20.0.254"
8: spiel0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 9000 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000

netplan set rewrites the whole file, with quotation marks and its own indentation. Comments are lost in the process.

Now add an address by hand and apply netplan again:

# on netz
sudo ip addr add 10.99.0.1/24 dev spiel0
ip -br a show spiel0
sudo netplan apply
ip -br a show spiel0

Expected:

spiel0           UNKNOWN        10.20.0.1/24 10.99.0.1/24 fe80::34bf:43ff:fe7e:99b4/64
spiel0           UNKNOWN        10.20.0.1/24 fe80::34bf:43ff:fe7e:99b4/64

On managed interfaces, networkd clears away everything that isn’t in its configuration. Good against sprawl, bad for anyone who added something by hand “just for a moment.”

And the cable wobble from Drill 5?

# on netz
sudo ip link set spiel0 down
sudo ip link set spiel0 up
ip r show dev spiel0

Expected:

10.20.0.0/24 proto kernel scope link src 10.20.0.1
192.0.2.0/24 via 10.20.0.254 proto static onlink

This time the route is back: networkd sees the interface return and applies its configuration again. Finally, the reboot, with a manual address and a manual interface as a cross-check:

# on netz
sudo ip addr add 10.99.0.1/24 dev spiel0
sudo ip link add wegwerf0 type dummy
sudo reboot

After the reboot:

# on netz
ip -br a
networkctl list --no-legend

Expected:

lo               UNKNOWN        127.0.0.1/8 ::1/128
eth0             UP             172.16.0.123/24 metric 100 fd0e:fdec:438a:328:be24:11ff:fe4d:d908/64 fe80::be24:11ff:fe4d:d908/64
spiel0           UNKNOWN        10.20.0.1/24 fe80::34bf:43ff:fe7e:99b4/64
  1 lo     loopback carrier  unmanaged
  2 eth0   ether    routable configured
  3 spiel0 ether    routable configured

spiel0 with its netplan address is back. 10.99.0.1 and wegwerf0 are gone.

Save your progress? Sign up for free

Where is DNS?

Only briefly, because DNS has Day 6 to itself. The DNS servers come via DHCP, systemd-resolved manages them, and programs query the local stub 127.0.0.53:

# on netz
resolvectl status eth0 | head -6

Expected:

Link 2 (eth0)
    Current Scopes: DNS
         Protocols: +DefaultRoute -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 8.8.8.8
       DNS Servers: 172.16.0.15 8.8.8.8 1.1.1.1
        DNS Domain: localdomain

Exercise: Speed drills

  1. Output only the IPv4 address of eth0, without prefix, via JSON. Target time: 45 s
  2. Create a dummy interface s1 with 10.1.1.1/24, switch it on, show it and delete it again. Target time: 1 min
  3. Via which gateway and with which source address does a packet to 192.0.2.1 go if spiel0 doesn’t exist? Target time: 20 s

Solution

# on netz
ip -j -4 addr show dev eth0 | jq -r '.[0].addr_info[0].local'
sudo ip link add s1 type dummy
sudo ip addr add 10.1.1.1/24 dev s1
sudo ip link set s1 up
ip -br a show s1
sudo ip link del s1
ip route get 192.0.2.1

Expected (with spiel0 from Drill 7, number 3 naturally takes spiel0):

172.16.0.123
s1               UNKNOWN        10.1.1.1/24 fe80::e4f3:60ff:fee8:75c4/64
192.0.2.1 via 172.16.0.1 dev eth0 src 172.16.0.123 uid 1000
    cache

Save your progress? Sign up for free

Challenge

A colleague sent you a file for a second playground:

# on netz
cat > ~/61-spiel1.yaml <<'EOF'
network:
  version: 2
  dummy-devices:
    spiel1:
      addresses: 10.30.0.1/24
      routes:
        - to: 203.0.113.0/24
          via: 10.30.0.254
EOF
sudo chown root:root ~/61-spiel1.yaml
sudo chmod 600 ~/61-spiel1.yaml

Get spiel1 running persistently, so that ip route get 203.0.113.5 goes via spiel1. Condition: you use netplan try, and the SSH connection doesn’t drop.

Hint: Have netplan check the file before you try it. Where is the error?

Solution

To check it, briefly copy it to /etc/netplan and run generate:

# on netz
sudo install -m 600 ~/61-spiel1.yaml /etc/netplan/61-spiel1.yaml
sudo netplan generate
sudo rm /etc/netplan/61-spiel1.yaml

Expected:

/etc/netplan/61-spiel1.yaml:5:18: Error in network definition: expected sequence
      addresses: 10.30.0.1/24
                 ^

addresses is a list, even with only one address. Fix it in the file (in nano or vim, with sudo), so the lines look like this:

      addresses:
        - 10.30.0.1/24

Then try it, confirm with Enter, fix the name:

# on netz
sudo netplan try --config-file ~/61-spiel1.yaml --timeout 20
sudo mv /etc/netplan/61-spiel1.*.yaml /etc/netplan/61-spiel1.yaml
ip route get 203.0.113.5

Expected:

Configuration accepted.
203.0.113.5 via 10.30.0.254 dev spiel1 src 10.30.0.1 uid 1000
    cache

This time the route doesn’t need on-link: 10.30.0.254 is in the network of spiel1, so the gateway is already directly reachable.

Save your progress? Sign up for free

Checkpoint

Before cleaning up, with both playgrounds:

# on netz
ls /etc/netplan

Expected: 50-cloud-init.yaml 60-spiel.yaml 61-spiel1.yaml

# on netz
networkctl list --no-legend | wc -l

Expected: 4

# on netz
ip route get 192.0.2.1 | head -1

Expected: 192.0.2.1 via 10.20.0.254 dev spiel0 src 10.20.0.1 uid 1000

Clean-up

From Day 2 on, you build in namespaces, and the playgrounds on the VM just get in the way. Remove the files, apply netplan, delete the interfaces:

# on netz
sudo rm /etc/netplan/60-spiel.yaml /etc/netplan/61-spiel1.yaml ~/60-spiel.yaml ~/61-spiel1.yaml
sudo netplan apply
ip -br link show type dummy

Expected:

spiel0           UNKNOWN        36:bf:43:7e:99:b4 <BROADCAST,NOARP,UP,LOWER_UP>
spiel1           UNKNOWN        aa:ca:32:e0:a0:d4 <BROADCAST,NOARP,UP,LOWER_UP>

Tried it: netplan apply creates interfaces but doesn’t delete any. The dummies are still there, without an address and now unmanaged. After removing virtual interfaces (dummy, bridge, VLAN, bond) from the configuration, you clean them up by hand.

# on netz
sudo ip link del spiel0
sudo ip link del spiel1
sudo diff -r /root/netplan.bak-tag01 /etc/netplan && echo "netplan wie vorher"
sudo rm -r /root/netplan.bak-tag01
networkctl list --no-legend

Expected:

netplan wie vorher
  1 lo   loopback carrier  unmanaged
  2 eth0 ether    routable configured

Practice note

  • First ip route get, then guess. Most “the network doesn’t work” cases are a wrong or missing route. One command shows which route, which device and which source address the kernel actually uses.
  • Never on a server without a way back. netplan try with --config-file (or a timed rollback on other systems) is mandatory as soon as the interface you’re connected through is affected. Otherwise, if you set a wrong default route over SSH, you’re driving to the data center.
  • By hand is diagnosis, not operations. With ip, you test an idea in seconds. Whatever should stay belongs in netplan; otherwise it disappears at the next reboot, the next netplan apply or even the next link wobble.

Contents

More