2
11kviews
Discuss DHCP operation when the client and server are on the same network or on different networks.
1 Answer
3
1.2kviews

The DHCP client and server can either be on the same network or on different networks.

Same Network:

The figure shows Client and server on the same network.

enter image description here

In this case, the operation can be described as follows:

  1. The DHCP server issues a passive open command on UDP port number 67 and waits for a client.

  2. A booted client issues an active open command on port number 68. The message is encapsulated in a UDP user datagram,using the destination port number 67 and the source port number 68.

  3. The server responds with either a broadcast or a unicast message using UDP source port number 67 and destination port number 68.

Different Networks:

A client can be in one network and the server inanother, separated by several other networks.

The figure shows Client and server on twodifferent networks.

enter image description here

The DHCP request is broadcastbecause the client does not know the IP address of the server.

A broadcast IP datagram cannot pass through any router. A router receiving such a packet discards it.

To solve the problem,One of the hosts can be used as a relay. The host in this case is called a relay agent.The relay agent knows the unicast address of a DHCP server and listens for broadcast messages on port 67.

When it receives this type of packet, it encapsulates the message in a unicast datagram and sends the request to the DHCP server.

The packet, carrying a unicast destination address, is routed by any router and reaches the DHCP server.

Please log in to add an answer.