Re: DHCP serving more than one subnet (longish)

From: JF Mezei (jfmezei.spamnot_at_istop.com)
Date: 10/25/03


Date: Fri, 24 Oct 2003 21:53:14 -0400

Mark Berryman wrote:
> The DHCP
> server knows nothing about any ethernet packet, all it ever sees is the
> UDP packet.

But the UDP packet is "faked" since the client doesn't yet have an IP address.
And the DHCP RFC clearly states that they've had to imginatively interpret the
IP protocol definitions to make it work.

The deal is that an ethernet broadcast is made whose contents have the IP/UDP
protocol bytes set as well as port 67 (server) or 68 (client) set. This way,
all ethernet interfaces on the lan receiving that packet would pass it to the
TCPIP stack which would pass it to the DHCP server if such is defined in that node.

> "ethernet address" entirely. The DHCP packet itself is a fully built,
> fully functional UDP packet. It most definitely is NOT an ethernet-only
> packet.

It isn't fully functional because the source IP address is set to 0.0.0.0.
This means that A router cannot route a response with normal IP handling.

> If 'giaddr' is zero and 'ciaddr' is zero, and the broadcast bit is
> set, then the server broadcasts DHCPOFFER and DHCPACK messages to
> 0xffffffff. If the broadcast bit is not set and 'giaddr' is zero and
> 'ciaddr' is zero, then the server unicasts DHCPOFFER and DHCPACK
> messages to the client's hardware address and 'yiaddr' address.

The keyword here is "if the broadcast bit is set". If not, responses go back
to a specific ethernet address if there are no IP adresses (client or router)

> Sorry, you are 0 for 3 here. A DHCP request is a standard UDP datagram
> and can be passed by any router.

Request yes because it is , by definition, a broadcast. (actually,
DHCPDISCOVER and REQUEST).
But responses by DHCP server are not necessarily a broadcast and a UDP packet
with IP destination of 0.0.0.0 is not routable.

Now, if the router has DHCP relaying, then it is different, But the router is
no longer a "router", it becomes specialized machine that examines the
contents of a packet to find out where the packet should be sent, at which
point, it will generate an ethernet packet (with UDP formatted contents)
destined to the actual client.

> Sorry, I wasn't clear here. Having to manually maintain a list of MAC
> addresses is the same thing as having to maintain a bunch of static
> configurations in my book.

Nop. If you point each individual MAC address to a group in the DHCP server,
then if you change your DNS server for instance, you only need to change the
group definition once and this will be used by all subsequent DHCP
requests/renews from those known MAC addresses. It makes for easier network management.



Relevant Pages

  • Packet cap diff... for classic dhcp over winxp s/w bridge prob.
    ... the server simultaneously. ... DHCP Discover - Transaction ID 0xe5448fbb ... Time delta from previous packet: ... Time since reference or first frame: ...
    (comp.os.linux.networking)
  • Re: Regarding dhcp client problem
    ... I have captured the packet information from the device. ... win2k dhcp server sends ... But the dhcp client in the device is not receiving the offer at ... User Datagram Protocol, Src Port: bootpc, Dst Port: bootps ...
    (comp.arch.embedded)
  • Re: DHCP serving more than one subnet (longish)
    ... DHCP packets are really ethernet packets whose contents are formatted as TCPIP ... packets to allow a host's ethernet layer to pass the packet onto the TCPIP stack. ... The response from the server is sent as an ethernet packet adressed ...
    (comp.os.vms)
  • Re: DHCP serving more than one subnet (longish)
    ... >>destination address is all ones (which means it is a broadcast packet). ... > Responses from the server however rely on the ethernet address only since ... DHCP works over media other than ethernet. ... the case if the request is relayed through a router]. ...
    (comp.os.vms)
  • Re: Bridging wifi to ethernet
    ... Subject: Bridging wifi to ethernet ... to run your own caching dns server and point the dhcp clients ... Browsing appears normal (laptop or downstream), ...
    (Fedora)