5.7 Summary of Session 5
In this session you looked at the Dynamic Host Configuration Protocol (DHCP) and network address translation (NAT).
You have seen that DHCP allows a device to join a network and have important information assigned automatically so that no manual configuration is necessary. A host will automatically receive an IPv4 address, subnet mask, and the address of the default gateway to the internet. This information will be provided by a DHCP server; on a home network the gateway will act as a DHCP server. The DHCP server itself is configured to set aside a certain range of addresses to issue to other devices on the LAN for a given period. This configuration might be different for a home network compared with a network in a café with public Wi-Fi, for example.
Home networks, like many LAN networks, are set up with IP addresses from an IPv4 private address range. These addresses can’t be used on the internet, but network address translation allows devices with private addresses to access the internet. When the gateway routes traffic from the LAN to the internet, it systematically replaces the device source address (which is private) in IP packet headers with its own address (which is public). Traffic that returns to the gateway router will have the destination IP address switched back to the appropriate device’s local private address. By also replacing the port number, the gateway router can handle traffic for more than one device on the LAN at a time.
The combination of DHCP, NAT and private address ranges makes it easy to set up local networks with minimal configuration. Devices on the LAN share the router’s public IP address, helping to avoid the problem of a shortage of IPv4 addresses. This has made it possible to create networks at home very easily.
New terms
In this session you have met the following terms.
Dynamic Host Configuration Protocol (DHCP) |
A protocol used to dynamically assign TCP/IP configuration information to hosts on a network. DHCP can assign an IP address, subnet mask, default gateway and other details to a host when it joins the network. |
lease |
The period for which an IP address assigned by DHCP remains valid (unless it is renewed). |
network address translation (NAT) |
A system used to systematically change IP address information in network packets as they leave or enter a network. It is often used to give hosts in a private network access to the internet. |