0

On my local network, I've got Ubuntu Server running isc-dhcp-server and named. I have a lot of devices that I've assigned static addresses to, and up until now have assigned a small range of IP addresses for unknown devices. This was on a single subnet: 192.168.0.0. I wanted to create a second subnet that would do the handing out of IP addresses for all unknown devices instead. Since the server only has one interface, I added the subnet using the shared-network option. Doing so, I can connect an unknown device and receive an IP address on that second subnet, but the device cannot ping anything, either within the local network or on the internet, and either by FQDN or IP address. I can't even ping 8.8.8.8 or the server itself at 192.168.0.10. I'm sure that there's either something missing in my configuration, or possibly that I'm actually trying to do something that can't be done. Here's the contents of my dhcpd.conf:

ddns-update-style standard;
authoritative;

shared-network "LBCN-Network" {
    interface enp2s0;
    option domain-name "lbcn.lan";
    option domain-name-servers 192.168.0.10, 8.8.8.8, 8.8.4.4;
    option routers 192.168.0.1;

    #SUBNET DECLARATIONS
    subnet 192.168.0.0 netmask 255.255.255.0 {

            default-lease-time 86400;
            max-lease-time 172800;
            boot-unknown-clients false;
            option broadcast-address 192.168.0.255;
    }

    subnet 192.168.1.0 netmask 255.255.255.0 {
            range 192.168.1.2 192.168.1.254;
            default-lease-time 43200;
            max-lease-time 86400;
            boot-unknown-clients true;
            option broadcast-address 192.168.1.255;
    }

    # RESERVED IP ADDRESSES

    # Computers (2-19)
    host BOGUS-COMPUTER {
            hardware ethernet 12:34:56:78:9a:bc;
            fixed-address 192.168.0.3;
    }
    ...and a bunch more
}

192.168.0.1 is the address of my gateway (modem) and 192.168.0.10 is the address of the server itself (which is running named). There are no problems with the devices that have host declarations on the 192.168.0.0 subnet; they can access the internet, the FQDNs of the Apache websites, ping other devices, etc.

I've already added net.ipv4.ip_forward=1 to sysctl.conf, and I've also done ufw disable and allowed everything in iptables to see if that would get things moving, but no dice. Perhaps my modem can't 'see' the 192.168.1.0 subnet? Any ideas?

I haven't included anything from named since the problem isn't limited to FQDNs, but IP addresses as well, but I can post those if needed.

Edit: On berndbausch's recommendation, here's the result from route:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         _gateway        0.0.0.0         UG    0      0        0 enp2s0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 enp2s0
  • 1
    Does the device have connectivity to 192.168.0.1 (after re-reading, it looks like this is a NO)? Can you add the routing tables on the Ubuntu server and the device to the question? – berndbausch May 15 '21 at 02:27
  • I think you've drilled down to the problem. Neither subnet is routed to the modem. I'll try adding them in, but do you think I need to set up the server as router for this to work? – Jeremy Wilson May 15 '21 at 14:03
  • 1
    I think it should be sufficient to create routes and enable forwarding. Also ensure there are no netfilter rules that block forwarding (`iptables` command). – berndbausch May 15 '21 at 14:07
  • That did the trick, thanks! In fact, I just added the routes in the modem's router setup rather than on the server and it worked like a charm. Appreciate your help! – Jeremy Wilson May 15 '21 at 15:38

1 Answers1

0

Sure enough, I simply hadn't added the routes to the subnets in my router. Thanks to berndbausch for pointing me in the right direction!