2

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.

0

2 Answers 2

2

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.

1
`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

1
  • 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" ? Commented Aug 29, 2023 at 3:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .