Two elementary questions on LANs

Ed Greshko Ed.Greshko at greshko.com
Thu Jun 16 22:48:02 UTC 2011


Some additional information regarding DHCP.....

As I mentioned, the lease information is retained by both the client and
the server.....

Let's assume that this is not the first time the client has acquired an
IP address from the server.  Let's also assume that the interface is
currently down and a file exists in /var/lib/dhcpclient for the
interface in question.

Now, you enable the interface and the following happens....

1.  The dhcpclient checks the file to see what IP address it was last
assigned.

2.  The client then sends out a UDP broadcast with source address of
0.0.0.0 and destination of 255.255.255.255 (a broadcast request)  It
will be a message type of DHCP Request and the packet will contain the
previous IP address it is requesting.  It will also have a "transaction
ID" in the packet.

3.  The server will respond.  The source address will be its IP address
and the destination will be 255.255.255.255 Another broadcast.  The
response will have the same "transaction ID" as the request and the
client will match these to know the broadcast message is meant for it.

You are done....

If a file in /var/lib/dhcpclient does not exist for the interface the
procedure is a bit different....

1.  The client sends out a DHCP Discover.
2.  The server sends out a DHCP offer.  Offering an IP address to the
client.  If the server had issued a lease in the past to this MAC
address it *may* offer the same IP address.
3.  The client sends out a DHCP Request as in #2 above.
4.  The server sends out a DHCP ACK as in #3 above.

FWIW, a DHCP request can request quite a bit of information that the
server may or may not supply.  Some examples would be....

Subnet Mask
Broadcast Address
Domain Name
Domain Name Server
NIS Domain
NTP Servers




More information about the users mailing list