3

Situation

I have VMWare ESXI running with an Ubuntu Server 22.04 instance. This instance runs PowerDNS for my local network and needs a static IP. My local network uses class A-type IP addresses, in the range of 10.0.1.xxx and wifi runs on a separate router in the 10.0.2.xxx range.

Router IP (gateway) = 10.0.1.1
Ubuntu server IP    = 10.0.1.3

I can SSH to this machine perfectly fine from anywhere inside my local network, both from physically attached machines in the 10.0.1.xxx range, as well as WiFi-connected devices in the 10.0.2.xxx range.

The Ubuntu Server instance can ping devices on the local network just fine, except for the gateway and external internet IP addresses. Therefore, the machine has no internet connection at all. Everything worked fine last night, but after a reboot I think something messed up, but I can't seem to figure out what it is...

UFW is inactive, iptables allows everything (default configuration)

Configuration

My netplan configuration looks like this (although I've tried many different things here):

network:
  version: 2
  renderer: networkd
  ethernets:
    ens160:
      dhcp4: false
      dhcp6: false
      addresses: 
        - 10.0.1.3/24
      nameservers:
        addresses:
          - 8.8.8.8
          - 8.8.4.4
          - 1.1.1.1
          - 1.0.0.1
      routes:
        - to: default
          via: 10.0.1.1

netplan --debug generate as well as netplan --debug apply don't show any errors. I've rebooted the instance every time I applied a new configuration, but to no avail...

My router is configured its LAN on IP 10.0.1.1 with subnet 255.255.252.0.

Things I've tried so far

  • Removing the entire static configuration and replacing it with dhcp4: true doesn't work. The router fails to provide an IP address, resulting in a long boot time as well.

  • Removing the routing entries and letting the system decide for itself doesn't work either. The problem becomes worse when trying this, since every IP-address becomes unreachable, including local network devices.

  • Changing the subnet of the router from 255.255.255.0 to 255.255.252.0 to allow more space in the 10.0.x. range. This didn't change anything. It's currently setting on 255.255.252.0 and everything on my local network still works fine.

  • I've enabled DHCP again, rebooted the machine and suddently got an IP address. After assigning a static IP from my router in its DHCP configuration based on the MAC-address of the instance, it fails to provide an IP address again (Waiting for Network to be configured...) takes a long time during boot. So this isn't working either - this machine needs a static IP.

I know this isn't a DNS configuration issue, since I can't even ping 1.1.1.1 or 8.8.8.8 directly (100% packet loss), same as pinging the router directly.

Outputs:

IP route:

harold@ingress:~$ ip route
default via 10.0.1.1 dev ens160 proto static 
10.0.1.0/24 dev ens160 proto kernel scope link src 10.0.1.3

IP addr:

harold@ingress:~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:0c:29:b7:49:41 brd ff:ff:ff:ff:ff:ff
    altname enp3s0
    inet 10.0.1.3/24 brd 10.0.1.255 scope global ens160
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:feb7:4941/64 scope link 
       valid_lft forever preferred_lft forever

Ping the gateway:

harold@ingress:~$ ping 10.0.1.1
PING 10.0.1.1 (10.0.1.1) 56(84) bytes of data.
^C
--- 10.0.1.1 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3060ms

Ping another device on the local network:

harold@ingress:~$ ping 10.0.1.2
PING 10.0.1.2 (10.0.1.2) 56(84) bytes of data.
64 bytes from 10.0.1.2: icmp_seq=1 ttl=64 time=0.060 ms
64 bytes from 10.0.1.2: icmp_seq=2 ttl=64 time=0.225 ms
64 bytes from 10.0.1.2: icmp_seq=3 ttl=64 time=0.125 ms
^C
--- 10.0.1.2 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2028ms
rtt min/avg/max/mdev = 0.060/0.136/0.225/0.067 ms
Harold
  • 159

1 Answers1

2

I figured it out.

I have two routers, a Genixis HRG1000 (provided by my ISP) to which the ESXi host is connected, and one from TP-Link that is currently used for internal WiFi only.

Since I want to run my own DNS server, I had my nameserver configuration in my router set to:

nameserver 1: "10.0.1.3"
nameserver 2: "1.1.1.1"

For some reason, having an internal IP in the nameserver configuration results in DHCP no longer working, nor having the ability to assign a static IP and ping the router, or the outside internet for that matter.

Since I already have two routers in my network, I'm going to plug the ESXi host in this router, and have everything else on my network connect to the second one, since that one does allow me to configure the nameserver to be my own.

Harold
  • 159