written 6.8 years ago by |
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.
In this case, the operation can be described as follows:
The DHCP server issues a passive open command on UDP port number 67 and waits for a client.
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.
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.
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.