Interview questions on DHCP

Q: – What is DHCP?


DHCP stands for “Dynamic Host Configuration Protocol”.


Q: – How can I prevent unauthorized laptops from using a network that uses DHCP for dynamic addressing?
This would have to be done using a mechanism other than DHCP. DHCP does not prevent other clients from using the addresses it is set to hand out nor can it distinguish between a computer’s permanent MAC address and one set by the computer’s user. DHCP can impose no restrictions on what IP address can use a particular port nor control the IP address used by any client.



Q: – Can a BOOTP client boot from a DHCP server?
Only if the DHCP server is specifically written to also handle BOOTP queries.
Q: – What is DHCP’s purpose?
DHCP’s purpose is to enable individual computers on an IP network to extract their configurations from a server (the ‘DHCP server’) or servers, in particular, servers that have no exact information about the individual computers until they request the information. The overall purpose of this is to reduce the work necessary to administer a large IP network. The most significant piece of information distributed in this manner is the IP address.


Q: – How can I prevent unauthorized laptops from using a network that uses DHCP for dynamic addressing?
This would have to be done using a mechanism other than DHCP. DHCP does not prevent other clients from using the addresses it is set to hand out nor can it distinguish between a computer’s permanent MAC address and one set by the computer’s user. DHCP can impose no restrictions on what IP address can use a particular port nor control the IP address used by any client.



Q: – Can a BOOTP client boot from a DHCP server?
Only if the DHCP server is specifically written to also handle BOOTP queries.



Q: – Can DHCP work with Apple Talk or IPX?


No, it is too tied to IP. Furthermore, they don’t need it since they have always had automated mechanisms for assigning their own network addresses.



Q: – What is a DHCP lease?
A DHCP lease is the amount of time that the DHCP server grants to the DHCP client permission to use a particular IP address. A typical server allows its administrator to set the lease time.



Q: – What is DHCP Spoofing?
Ascend Pipeline ISDN routers (which attach Ethernets to ISDN lines) incorporate a feature that Ascend calls “DHCP spoofing” which is essentially a tiny server implementation that hands an IP address to a connecting Windows 95 computer, with the intention of giving it an IP number during its connection process.



Q: – How long should a lease be?
A very relevant factor is that the client starts trying to renew the lease when it is halfway through: thus, for example, with a 4 day lease, the client which has lost access to its DHCP server has 2 days from when it first tries to renew the lease until the lease expires and the client must stop using the network. During a 2- day outage, new users cannot get new leases, but no lease will expire for any computer turned on at the time that the outage commences. Another factor is that the longer the lease the longer time it takes for client configuration changes controlled by DHCP to propogate.


Q: – Is a DHCP client “supposed to” be able to use a BOOTP server? 

The RFC on such interoperability (1534) is clear: “A DHCP client MAY use a reply from a BOOTP server if the configuration returned from the BOOTP server is acceptable to the DHCP client.” (section 3). The word “MAY” indicates such support, however useful, is left as an option.



Q: – What is a Client ID?
What is termed the Client ID for the purposes of the DHCP protocol is whatever is used by the protocol to identify the client computer. By default, DHCP implementations typically employ the client’s MAC address for this purpose, but the DHCP protocol allows other options. Some DHCP implementations have a setup option to specify the client ID you want. One alternative to the MAC address is simply a character string of your choice. In any case, in order for DHCP to function, you must be certain that no other client is using the client ID you choose, and you must be sure the DHCP server will accept it.



Q: – How can I relay DHCP if my router does not support it?
A server on a net(subnet) can relay DHCP or BOOTP for that net. Microsoft has software to make Windows NT do this.



Q: – Is a DHCP server “supposed to” be able to support a BOOTP client?
The RFC on such interoperability (1534) is clear: “In summary, a DHCP server:
… MAY support BOOTP clients,” (section 2). The word “MAY” indicates such support, however useful, is left as an option.
A source of confusion on this point is the following statement in section 1.5 of RFC 1541: “DHCP must provide service to existing BOOTP clients.” However, this statement is one in a list of “general design goals for DHCP”, i.e. what the
designers of the DHCP protocol set as their own goals. It is not in a list of requirements for DHCP servers.



Q: – Can DHCP support statically defined addresses??


Yes. At least there is nothing in the protocol to preclude this and one expects it to be a feature of any DHCP server. This is really a server matter and the client should work either way. The RFC refers to this as manual allocation.


Q: – What is a MAC address?
A MAC address (also called an Ethernet address or an IEEE MAC address) is a number (typically written as twelve hexadecimal digits, 0 through 9 and A through F, or as six hexadecimal numbers separated by periods or colons, i.e. 0080002012ef, 0:80:0:2:20:ef) which uniquely identifes a computer that has an Ethernet interface. Unlike the IP number, it includes no indication of where your computer is located. In DHCP’s typical use, the server uses a requesting computer’s MAC address to uniquely identify it.



Q: – Can a DHCP server back up another DHCP server?
You can have two or more servers handing out leases for different addresses. If each has a dynamic pool accessible to the same clients, then even if one server is down, one of those clients can lease an address from the other server. However, without communication between the two servers to share their information on current leases, when one server is down, any client with a lease from it will not be able to renew their lease with the other server. Such communication is the purpose of the “server to server protocol” (see next question). It is possible that some server vendors have addressed this issue with their own proprietary server-to-server communication.



Q: – When will the server to server protocol be defined?
The DHC WG of the IETF is actively investigating the issues in inter-server communication. The protocol should be defined “soon”.



Q: – How does DHCP and BOOTP handle multiple subnets?
For the situations where there is more than one LAN, each with its own subnet number, there are two ways. First of all, you can set up a seperate server on each subnet. Secondly, a feature of some routers known as “BOOTP forwarding”
to forward DHCP or BOOTP requests to a server on another subnet and to forward the replies back to the client. The part of such a router (or server acting as a router) that does this is called a “BOOTP forwarding agent”. Typically you
have to enable it on the interface to the subnet to be served and have to configure it with the IP address of the DHCP or BOOTP server. On a Cisco router, the address is known as the “UDP Helper Address”.



Q: – Can a DHCP client boot from a BOOTP server?
Only if the DHCP client were specifically written to make use of the answer from a BOOTP server. It would presumably treat a BOOTP reply as an unending lease on the IP address.
In particular, the TCP/IP stack included with Windows 95 does not have this capability.



Q: – What protocol and port does DHCP use?
DHCP, like BOOTP runs over UDP, utilizing ports 67 and 68.



Q: – What is DHCP’s purpose?
DHCP’s purpose is to enable individual computers on an IP network to extract their configurations from a server (the ‘DHCP server’) or servers, in particular, servers that have no exact information about the individual computers until they request the information. The overall purpose of this is to reduce the work necessary to administer a large IP network. The most significant piece of information distributed in this manner is the IP address.



Q: – What is an IP address?


An IP address (also called an IP number) is a number (typically written as four numbers separated by periods, i.e. 107.4.1.3 or 84.2.1.111) which uniquely identifies a computer that is making use of the Internet. It is analogous to your
telephone number in that the telephone number is used by the telephone network to direct calls to you. The IP address is used by the Internet to direct data to your computer, e.g. the data your web browser retrieves and displays
when you surf the net. One task of DHCP is to assist in the problem of getting a functional and unique IP number into the hands of the computers that make use of the Internet.

Q: – How can I relay DHCP if my router does not support it?
A server on a net(subnet) can relay DHCP or BOOTP for that net. Microsoft has software to make Windows NT do this.



Q: – Can DHCP work with AppleTalk or IPX?
No, it is too tied to IP. Furthermore, they don’t need it since they have always had automated mechanisms for assigning their own network addresses.



Q: – Who Created DHCP?
DHCP was created by the Dynamic Host Configuration Working Group of the Internet Engineering Task Force (IETF; a volunteer organization which defines protocols for use on the Internet). As such, it’s definition is recorded in an Internet RFC and the Internet Activities Board (IAB) is asserting its status as to Internet Standardization. As of this writing (June 1998), DHCP is an Internet Draft Standard Protocol and is Elective. BOOTP is an Internet Draft Standard Protocol and is recommended. For more information on Internet standardization, see RFC2300 (May 1998)



Q: – What is a Client ID?
What is termed the Client ID for the purposes of the DHCP protocol is whatever is used by the protocol to identify the client computer. By default, DHCP implementations typically employ the client’s MAC address for this purpose, but the DHCP protocol allows other options. Some DHCP implementations have a setup option to specify the client ID you want. One alternative to the MAC address is simply a character string of your choice. In any case, in order for DHCP to function, you must be certain that no other client is using the client ID you choose, and you must be sure the DHCP server will accept it.



Q: – Can DHCP support statically defined addresses?
Yes. At least there is nothing in the protocol to preclude this and one expects it to be a feature of any DHCP server. This is really a server matter and the client should work either way. The RFC refers to this as manual allocation.



Q: – How is it different than BOOTP or RARP?
DHCP is based on BOOTP and maintains some backward compatibility. The main difference is that BOOTP was designed for manual pre-configuration of the host information in a server database, while DHCP allows for dynamic allocation of
network addresses and configurations to newly attached hosts. Additionally, DHCP allows for recovery and reallocation of network addresses through a leasing mechanism.
RARP is a protocol used by Sun and other vendors that allows a computer to find out its own IP number, which is one of the protocol parameters typically passed to the client system by DHCP or BOOTP. RARP doesn’t support other parameters and using it, a server can only serve a single LAN. DHCP and BOOTP are designed so they can be routed.


Q: – How is it different than BOOTP or RARP? 

DHCP is based on BOOTP and maintains some backward compatibility. The main difference is that BOOTP was designed for manual pre-configuration of the host information in a server database, while DHCP allows for dynamic allocation of network addresses and configurations to newly attached hosts. Additionally, DHCP allows for recovery and reallocation of network addresses through a leasing mechanism.
RARP is a protocol used by Sun and other vendors that allows a computer to find out its own IP number, which is one of the protocol parameters typically passed to the client system by DHCP or BOOTP. RARP doesn’t support other parameters and using it, a server can only serve a single LAN. DHCP and BOOTP are designed so they can be routed.



Q: – How does DHCP and BOOTP handle multiple subnets?


For the situations where there is more than one LAN, each with its own subnet number, there are two ways. First of all, you can set up a seperate server on each subnet. Secondly, a feature of some routers known as “BOOTP forwarding” to forward DHCP or BOOTP requests to a server on another subnet and to forward the replies back to the client. The part of such a router (or server acting as a router) that does this is called a “BOOTP forwarding agent”. Typically you have to enable it on the interface to the subnet to be served and have to configure it with the IP address of the DHCP or BOOTP server. On a Cisco router, the address is known as the “UDP Helper Address”.

Q: – In a DHCP environment, which of the components (Client or Server) initiates the request
 The client would always initiate the DHCP request. The request is triggerred from the client , when the TCP/IP adapter is configured for the option “Obtain IP address automatically”. When this is selected, the operating system would automatically generate the DHCP Discover to identify valid DHCP Servers on the network. 
 Q: – How many DHCP packets are exchanged between a client and a server before the client receives an IP address
 4 DHCP packets are exchanged between the client and the server. They are DHCP Discover, DHCP Offer, DHCP Request, DHCP Ack. 
 Q: – What type of packet is a DHCP Discover packet
 DHCP Discover is a layer 3 broadcast packet with destination IP address as 255.255.255.255
 Q: – What is an IP Helper address feature and why is it required in a DHCP environment
 DHCP Discover packets are broadcast packets. This means that a DHCP Discover packet which is sent from the client would not reach the DHCP Server , if the server resides on a different network. This is because , routers are required for communication between different networks and routers do not forward broadcast packets. The IP Helper address feature is configured on the router. The feature informs the router the DHCP Servers IP address for the network. So, When the router receives the DHCP Discover packet, it would convert it from broadcast to unicast packet and then send it to the DHCP Server. 

Q: – What is a DHCP Scope and why is it required
 A scope includes information like IP address ranges, Subnet Masks, gateway address, DNS Server etc. This required so that clients would require the necessary information from the server.
 Q: – What would happen if there are multiple DHCP servers on a network
 The clients would trigger DHCP Discover packets and the server which responds first would provide the IP address to the client
 Q: – How does a client know that a lease has expired and how is it renewed
 When a client receives an IP address from the DHCP Server, the lease expiry date and time is provided as part of DHCP options. This is maintained and recorded by the client. Just before the lease expiry time, the client would initiate a renew request to the server for a new lease
 Q: – How many DHCP Servers can reside on one subnet
 It’s unlimited. But if there is a DHCP client, which server would lease out the IP address ? It’s a simple logic. The first server which responds to the DHCP clients IP address request would lease out the IP address.
 Q: – Explain the communication flow between a DHCP client and server on a network with two DHCP Servers
 The first packet the DHCP Client initiates would be the DHCP Discover packet. The DHCP Discover packet is broadcast in nature and would be received by both the DHCP servers. The DHCP servers would respond with DHCP offer packet containing the IP addresses which they offer. Based on the first DHCP offer the client receives, the client would respond with DHCP request packet which contains the IP address which it would be using along with the DHCP servers IP address which had provide the respective. This packet is send as broadcast. The packet, when received by the other DHCP server would understand that the IP address which it had leased to the client (In the DHCP offer packet) is not taken. So the DHCP server would put the IP address back to it’s pool.

Leave a Reply

Your email address will not be published. Required fields are marked *