Score:0

Netplan with static IP keeps disconnecting

in flag

I have multiple Ubuntu servers in the same network with two network interfaces. One for public Internet access (80.90.100.40/29), one for internal network communication (192.168.1.35/28). All of the servers use static IP's.

Ones with Ubuntu 18.04 LTS uses network/interfaces have no problem with static IPS. They just connect. Interfaces configuration is below:

auto lo
iface lo inet loopback

auto ens160
iface ens160 inet static
    address 80.90.100.45
    netmask 255.255.255.248
    network 80.90.100.40
    broadcast 80.90.100.47
    gateway 80.90.100.41
    dns-nameservers 8.8.8.8 8.8.4.4
    dns-search local

auto ens192
iface ens192 inet static
    address 192.168.01.45
    netmask 255.255.255.248

This configuration works like a charm. I added a new server to my network with Ubuntu 22.04 LTS, which uses Netplan, and set my network configuration like below:

network:
  ethernets:
    ens160:
      dhcp4: no
      addresses:
        - 80.90.100.44/29
      routes:
        - to: default
          via: 80.90.100.41
      nameservers:
        addresses:
          - 8.8.8.8
          - 8.8.4.4
        search: [local]
    ens192:
      dhcp4: no
      addresses:
        - 192.168.1.38/28
      routes:
        - to: 192.168.1.32/28
          via: 192.168.1.33
  version: 2

While the servers with Ubuntu 18.04 LTS with interfaces work without a problem, the server with Ubuntu 22.04 LTS with Netplan always disconnects. Ping packages get lost. Once they got lost, I try to traceroute to 8.8.8.8 DNS, and the output is below;

traceroute output.

But once connection comes back, traceroute works perfect. When send ping from 22.04 LTS, 25-35% of packages are lost.

As you may guess, this is really annoying since I'm trying to setup a web application.

So far I've disabled IPv6 for Ubuntu 22.04 LTS with Netplan, but problem still continues. There are no IP overlaps. And there are no problems with internal network. Only the public access is affected. Any help is appreciated.

Score:0
in flag

I checked netplan debugging, I found out that /run/systemd/network path includes a file for my interfaces. When I checked the interfaces I saw LinkLocalAddressing=ipv6

So I added

link-local: [ ipv4 ]

to my configuration and the connection problems are now gone.

Score:0
us flag

If your network interface is disconnecting, you should check the kernel log output (dmesg or journalctl). This may be a driver issue or a physical wiring issue.

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.