Score:1

Netplan apply causes interfaces to go down temporarily

qa flag

I have an IP on interface ens160 ( 10.209.70.147 ) which is up and responding to traffic. Then I add another interface eth0 in "connected state" from vmware console and add another IP ( 10.209.226.248) in netplan to eth0. When I do a netplan apply I see that IP in ens160 goes down temporarily. systemd also confirms it:-

Aug 21 17:56:39 10 kernel: [3542843.809266] vmxnet3 0000:03:00.0 ens160: intr type 3, mode 0, 3 vectors allocated
Aug 21 17:56:39 10 kernel: [3542843.809833] vmxnet3 0000:03:00.0 ens160: NIC Link is Up 10000 Mbps
Aug 21 17:56:39 10 systemd-networkd[307]: ens160: Lost carrier
Aug 21 17:56:39 10 systemd-networkd[307]: ens160: Link UP
Aug 21 17:56:40 10 systemd-networkd[307]: ens160: Gained carrier
Aug 21 17:56:41 10 ntpd[607]: Listen normally on 28 ens160 10.209.226.248:123

TCP dump also shows packet loss on 10.209.70.147:-

78194 2023-08-21 17:56:40.457615 0.307371 10.49.24.148 10.209.70.149 TCP 1356 [TCP Retransmission] 59675 → 9090 [PSH, ACK] Seq=197416 Ack=139625 Win=262144 Len=1300
78278 2023-08-21 17:56:41.061066 0.603451 10.49.24.148 10.209.70.149 TCP 1356 [TCP Retransmission] 59675 → 9090 [PSH, ACK] Seq=197416 Ack=139625 Win=262144 Len=1300
78195 2023-08-21 17:56:40.477066 0.000000 10.49.24.148 10.209.70.147 TCP 68 59873 → 443 [SYN] Seq=0 Win=64896 Len=0 MSS=1352 WS=256 SACK_PERM=1
80105 2023-08-21 17:56:41.490827 1.013761 10.49.24.148 10.209.70.147 TCP 68 [TCP Retransmission] 59873 → 443 [SYN] Seq=0 Win=64896 Len=0 MSS=1352 WS=256 SACK_PERM=1

This packet loss causes traffic to go down for couple of seconds. This is happening on Ubuntu 20.04. Haven't checked on higher versions. Is it a known issue on Ubuntu 20.04? Can not netplan apply behaviour be made smooth without making the interface go down temporarily? Any leads will be helpfull.

Score:2
vn flag

I believe this is inherent to the way netplan works (and how networking works in general).

The command netplan apply both generates a config, and applying it to all running interfaces (also see here). Changing configuration for a running network device isn't possible without bringing the interface down and up again.

If you would like to only generate a configuration that is applied on next reboot, instead use the command netplan generate.

Score:1
us flag
`critical` (bool)

Designate the connection as “critical to the system”, meaning
that special care will be taken by to not release the assigned
IP when the daemon is restarted. (not recognized by
NetworkManager)

https://netplan.readthedocs.io/en/stable/netplan-yaml/#properties-for-all-device-types

abhishek shrivastava avatar
qa flag
I came across this flag but it looks like its more suitable for DHCP IPs. IP may not be released but still downtime will be there. Please correct me if I am wrong. Is "not releasing" is equivalent to "no downtime" ?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.