Re: DHCP serving more than one subnet (longish)

From: Mark Berryman (Mark.Berryman_at_Mvb.Saic.Com)
Date: 10/24/03


Date: Fri, 24 Oct 2003 12:31:14 -0700

JF Mezei wrote:
> "Michael T. Davis" wrote:
>
>>The 0.0.0.0 is our "default" route to the Internet. Recall that WE0 is
>>our server's physical intrface, bound to 192.168.0.5, and WEA1 is a
>>pseudo-interface, bound to 192.168.4.5.
>
>
> 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.

DHCP packets are formatted the same as any other IP packet. The only
real difference is that the source address is all zeros and the
destination address is all ones (which means it is a broadcast packet).

> When a client sends an initial DHCP request, it doesn't know its own IP
> address nor that of a DHCP server. The request is sent as an ethernet
> broadcast.

IP Broadcast. When encapsulated into an ethernet packet, the ethernet
destination is also set to the broadcast address.

> The response from the server is sent as an ethernet packet adressed
> only to the client.

Optional. The response can be either broadcast or addressed directly.

> The ethernet packet contents may be formatted as a TCPIP
> packet, but IP routing information is bogus since the destination doesn't yet
> have an IP address.

I think you have a semantic issue here. The response packet is a
properly formatted IP packet. If it weren't, no router would pass it
and DHCP requests can certainly be relayed via a router. Nor would the
host IP stack be willing to accept it.

> If both subnets are on the same physical ethernet segment, then the DHCP
> server will see requests coming from machines on both subnets. The solution
> would then consist of putting the list of ethernet hardware adresses in the
> "nodes" section (one item per machine).
>
> You can then just associate each hardware address with a group that contains
> ip ranges and all the other parameters, or specify all of the DHCP parameters
> for each specific ethernet address.
>
> However, if there is a router between the old subnet and the DHCP server, then
> it gets dicey. Initial packets have the IP adresses set to 0.0.0.0 so a router
> won't know where/how to route those packets. And even if it routes, them, the
> problem starts when a server responds. If the server sends the ethernet packet
> to the client's ethernet address, the router won't receive the packet and thus
> won't transfer it to the other side. And if the packet is adressed to the
> router, then what will the router do with it since the destination IP is
> unknown ?
>
> You need a Relay Agent in your router. This relay agent intercepts a DHCP
> request and adds relay agent information in the options field. The server is
> expected to send responses that contain the information that the relay agent
> had inserted in the options. The relay agent, upon reception of a response
> from a server, will examine the relai-agent option which will tell it to which
> ethernet address to send the packet on the other side.

Not quite. The relay agent simply enters info into the gateway field.
This tells the DHCP server what subnet the requesting host is part of
and also how to return the packet. It has nothing to do with DHCP
options which are left untouched.

Note that the relay agent is only going to use the address of the
primary network on which the host resides, it will not reference any
secondary network. Thus, the DHCP server has no way of knowing that
there are multiple subnets on that LAN.

> DHCP protocol : ftp://ftp.rfc-editor.org/in-notes/rfc2131.txt
> Relay Agent information is at: ftp://ftp.rfc-editor.org/in-notes/rfc3046.txt
>
> I am not sure if the VMS DHCP server (from the now defunct Join company)
> supports the mirroring of the relay agent information obtained from a request
> and copied to the response.

All supported IP stacks for VMS come with a DHCP server. All of these
DHCP servers can handle relayed requests.

The bottom line: dynamic addressing and multiple subnets on the same LAN
do not mix. Only one of the subnets can be dynamic, the other(s) must
be static. There are some configurations where the static part can be
in a DHCP server rather than on the host itself but, one way or the
other, you must manually associate an address with each specific host on
all the other subnets.

Mark Berryman



Relevant Pages

  • 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)
    ... > server knows nothing about any ethernet packet, all it ever sees is the ... And the DHCP RFC clearly states that they've had to imginatively interpret the ... The deal is that an ethernet broadcast is made whose contents have the IP/UDP ... TCPIP stack which would pass it to the DHCP server if such is defined in that node. ...
    (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: DHCP
    ... Does the router change the contents of the DHCPDiscover packet, ... dhcpdiscover packets don't know what subnet they are on.... ... the dhcp server know with which scope the server should lease the new IP ...
    (microsoft.public.win2000.networking)
  • RE: DHCP Question
    ... Yes you are right- DHCP is a broadcast based protocol at layer 2 and layer 3 ... In the first DHCP packet the layer 4 ... My question to you is this: Are both DHCP servers located in the same VLAN? ... DHCP server is selected) If one of the DHCP server is performing gratitious ...
    (microsoft.public.windows.server.networking)

Loading