Chapter 36 - Implementing DHCP Flashcards
What is DHCP?
- Dynamic Host Configuration Protocol
- A protocol that a host uses to dynamically learn its IP address, subnet mask, DNS server, and default gateway
Benefits of DHCP over static assignment
- Less room for user error
- Mobility
What are the four different types of DHCP messages?
- Discover - Sent by a DHCP Client to find a DHCP Server (Broadcast).
- Offer- Sent by a DHCP Server to offer a specific IP address (along with other information) as a lease to a DHCP Client. If the DHCP Client allows receipt of unicast packets before having IP configuration established it will be sent as Unicast. Otherwise it will be sent as Broadcast.
- Request - Sent by a DHCP Client to ask the DHCP Server to lease the IP address listed in the previous Offer message. Sent as Broadcast.
- Acknowledgement - Sent by a DHCP server to assign the address and list the other necessary network information. Can be sent as Broadcast or Unicast.
What addresses will a DHCP Client use as its src and dst addresses if it does not already have an IP when sending a DHCP Discover?
- If sent via broadcast:
src: 0.0.0.0
dst: 255.255.255.255
What addresses will a DHCP Server use as its src and dst addresses when responding to a DHCP Discover message?
- If sent via broadcast:
src: <DHCP>
dst: 255.255.255.255</DHCP>
How does a host know whether a DHCP Offer is meant for it or not when sent via broadcast?
- As the Offer is sent via broadcast, all hosts on the link will receive it
- In the original Discover message, a client ID (chaddr) is included which includes the sending host’s MAC address
- The responding server includes the client ID in its Offer so that only the host with the same client ID will know that the Offer is meant for it
- The other hosts will ignore the Offer
What does the ‘ip helper-address <server-ip>' command do?</server-ip>
Tells an interface that receives messages from DHCP clients to:
- Watch for incoming DHCP messages with a destination IP of 255.255.255.255
- Change the packet’s source IP to the router’s incoming interface IP address
- Change the packet’s destination IP to that of the DHCP server (listed in the command)
- Route the packet to the DHCP server
What does a DHCP relay do?
- A DHCP relay is used when a subnet does not contain its own DHCP server, but there is a DHCP server somewhere else on the network that DHCP client messages should be forwarded to.
What information does a DHCP server need to know in order to serve a host?
- Subnet ID and mask - The DHCP server will use this information to know all addresses in a subnet and to not hand out the network and broadcast addresses
- Reserved (excluded) addresses - Addresses that cannot be leased, for example, addresses that have been statically assigned
- Default router(s) - The IP address of the routers on the subnet
- DNS server IP addresses - Self explanatory
What are the 3 methods of allocation that a DHCP server can use?
- Dynamic Allocation - The default
- Automatic Allocation - Sets the DHCP lease time to infinite.
- Static Allocation - Preconfigures an address for a specific client at the server based on the client’s MAC address.
True or False. A DHCP server can also be used to provide the IP address of a TFTP server on the network that devices should use.
True.
What are the two rules for configuring a DHCP relay on a network?
- Does the network contain DHCP clients?
- Does the network not contain a DHCP server?
If both are true then a DHCP relay is required on the interface connecting to that subnet from the router.
What command(s) can you use to see if an interface is being used as a DHCP Relay?
- ‘show ip int <int>'
- If it is then it will show "Helper address is <DHCP>"</DHCP></int> - ‘show running-config’
What command can you use to cause a switch or router interface to get its IP via DHCP?
‘ip address dhcp’ in interface config mode
How can you find out if a switch/router interface has had its IP configured via DHCP?
Use the ‘show dhcp lease’ command