While looking for answers to my other question: How to configure dhcp to always assign from the lowest unused ip?, I found some answers that refer to isc-dhcp-server, but that is not installed by default. So what is acting as a dhcp server for dhcp to work? When dhclient and network-manager are present

  • DHCP server is usually implemented in a network element, e.g. a router. Unless you have delegated the DHCP server feature to an Ubuntu installation (and it looks like you haven’t), you don’t need to touch Ubuntu, rather configure your router. – Melebius Sep 27 '16 at 7:14
  • @Melebius I am trying to understand how dhcp addresses are assigned on a default installation (to be more specific, it is a virtual machine on a virtual network). Apparently dhcp does work even without having a specific dhcp server installed (or something else must be serving the same function) – prusswan Sep 27 '16 at 7:19
  • dnsmasq provides DHCP – waltinator Sep 27 '16 at 12:54

There is no such thing as default dhcp server. NICs use broadcasts to find DHCP servers. In fact that's the whole point of DHCP, to get an IP at an unknown network.

The way DHCP works is, first your NIC sends a DHCP DISCOVER packet as a broadcast. Broadcast means packets destination IP and destination MAC FF:FF:FF:FF:FF:FF. Which means that every device on your LAN receives the packet, but everyone will ignore it except your DHCP server, which will reply with a DHCP OFFER packet, then you request offered IP with DHCP REQUEST, and finally the DHCP server confirms it with DHCP ACK.

You can see it with sudo dhclien -v eth0 #or whichever your interface is

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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