0

My DHCP server was giving out IPs in the range 10.0.0.1/24, but I ran out of usable IPs, so I changed the subnet to 10.0.1/21 to have more available addresses, however I am now having a weird problem:

If I connect using DHCP I can access the router's IP address, but I am unable to access the internet.

If I connect with manual IP addresses, even when using exactly the same address and submask that were given by DHCP, I can connect fine to the internet. How could this be possible?

DHCP

$ echo "dhcp" && ifconfig enp24s0
dhcp
enp24s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.0.10  netmask 255.255.248.0  broadcast 10.0.7.255
        inet6 fe80::a2f8:c497:50ab:51c8  prefixlen 64  scopeid 0x20<link>
        ether 00:d8:61:2e:27:7c  txqueuelen 1000  (Ethernet)
        RX packets 713773  bytes 891254344 (891.2 MB)
        RX errors 0  dropped 458  overruns 0  frame 0
        TX packets 303986  bytes 28920367 (28.9 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
$ ping 172.217.3.78          
ping: connect: Network is unreachable

Manual IPs:

$ echo "manual" && ifconfig enp24s0
manual 
enp24s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.0.10  netmask 255.255.248.0  broadcast 10.0.7.255
        inet6 fe80::7980:a295:f0b2:3c92  prefixlen 64  scopeid 0x20<link>
        ether 00:d8:61:2e:27:7c  txqueuelen 1000  (Ethernet)
        RX packets 713237  bytes 890642451 (890.6 MB)
        RX errors 0  dropped 458  overruns 0  frame 0
        TX packets 303517  bytes 28876751 (28.8 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
$ ping google.com
PING google.com (172.217.3.78) 56(84) bytes of data.
64 bytes from mia07s54-in-f14.1e100.net (172.217.3.78): icmp_seq=1 ttl=110 time=56.8 ms
64 bytes from mia07s54-in-f14.1e100.net (172.217.3.78): icmp_seq=2 ttl=110 time=56.7 ms

In case it is relevant, my router is Unifi Edgerouter.

1 Answer 1

3

Ok, maybe this was a silly mistake, but in the DHCP server settings there was a field called "router" that I didn't know what it was, so I left it blank and forgot about it. This was the "gateway" IP address. I set that and everything works as expected.

3
  • Glad to hear that you could solve your problem - please don't forget to accept your own answer, so the question doesn't keep popping up forever.
    – Zac67
    Jul 25, 2023 at 9:06
  • 1
    Yeah, came here to suggest your DHCP server is not providing a gateway/default router. Thanks for following up with the resolution. Jul 25, 2023 at 14:33
  • @Zac67 Yeah, there's a 2 day waiting period though.
    – Mike
    Jul 26, 2023 at 5:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.