• 0 Posts
  • 2 Comments
Joined 2 years ago
cake
Cake day: January 19th, 2024

help-circle
  • DHCP usually provides three things:

    • IP Address (+ subnet mask)
    • Defaulft gateway IP
    • DNS servers

    In the DHCP lease you for example get the IP 192.168.10.42/24. That IP is assigned to your interface which creates a implizit route like 192.168.10.0/24 dev netinterface. Now you know how to reach other hosts in your local network.

    In the same DHCP lease, you should also receive a default gateway - likely 192.168.10.1. this would add a route like default via 192.168.10.1.

    Without the default route, packets for IPs other than your local network never leave your host because it doesn’t know where to send them to.

    DNS servers are also provided, though before troubleshooting that, I would just ping addresses like 8.8.8.8 (google dns) for testing connectivity.

    (Btw, what I’m trying to say is: DHCP is working, but your server configuration may not be correct for what you’re trying to do)

    You could also skip troubleshooting DHCP by running ip route add default via 192.168.10.1 to test if your firewall is configured correctly. That should enable you to ping other networks.