views:

545

answers:

1

If suppose client does not listen on 68 port,when DHCP server receives the request, it can send it to the address from where it received request (with ephemeral port chosen by client at time of sending), then why does protocol specifies client to be listening on port 68?

+1  A: 

Because it's in the RFC (Request for Comments) that specifies how DHCP behaves. RFC 2131 is the document that specifies how a DHCP client and server must behave.

See here for more info on DHCP (section 4.1 in particular). See here for info on what the RFCs are.

TLiebe
The question reads "why does protocol specifies client to be listening on port 68?", so what they are asking seems to be more "why does the RFC say that?"
MikeBaz
DHCP is based on the earlier BOOTP protocol which used ports 67 (server) and 68 (client). Why BOOTP used those ports was probably because they were unused by any of the other protocols at the time (SMTP uses 25, FTP uses 21, etc.). While a host usually has a single IP address, it can have thousands of ports. By assigning particular port numbers to specific protocols it was possible for multiple parties to develop standard services and clients. As long as you listened on the right port, you could write your own DHCP client or server.
TLiebe
Ok means there is no technical reason?
avd
The technical reason is that if you want your client to be able to hear the response from any normal DHCP server you need to listen on the right port. I guess if you were writing your own DHCP server/client software (or you could configure your server to use a different port) then you could use whatever port you wanted as long as you were not trying to use a port already being used by some other protocol.
TLiebe