DNS DHCP ARP and ICMP
Hosts use DHCP to learn:
- The host’s IP address.
- The associated subnet mask.
- The IP address of the default gateway.
- The IP address of the DNS server.
ICMP includes many different functions, all focused on the control and management of IP. ICMP defines a varied set of messages for different purposes, including the ICMP Echo Request and ICMP Echo Reply messages. Ping uses Echo Request and Echo Reply messages.
Steps used by a host as needed for the protocols:
1. If not known yet, the host uses DHCP to learn its IP address, subnet mask, DNS IP addresses, and default gateway IP address. Skipped if already known.
2. If the user references a host name not currently held in the host’s name cache, the host makes a DNS request to resolve the name into its corresponding IP address. Otherwise, skips.
3. If the user issued the ping command, the IP packet contains an ICMP Echo Request; if the user instead used a TCP/IP application, it uses protocols appropriate to that application.
4. To build the Ethernet frame, the host uses the ARP cache’s entry for the next-hop device – either the default gateway or the true destination host. If the ARP cache does not hold that entry, the host uses ARP to learn the information.