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
1 Answer
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 255.255.255.255 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
dnsmasq
provides DHCP