Download Expanded Notes: DHCP in the Network

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Point-to-Point Protocol over Ethernet wikipedia , lookup

Wireless security wikipedia , lookup

Computer network wikipedia , lookup

Universal Plug and Play wikipedia , lookup

RapidIO wikipedia , lookup

Airborne Networking wikipedia , lookup

Network tap wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Deep packet inspection wikipedia , lookup

Distributed firewall wikipedia , lookup

AppleTalk wikipedia , lookup

Remote Desktop Services wikipedia , lookup

Wake-on-LAN wikipedia , lookup

Lag wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Dynamic Host Configuration Protocol wikipedia , lookup

Transcript
DHCP in the Network
Lesson overview.
In this lesson, we will cover:
●
●
●
Static vs. dynamic IP addressing.
How DHCP works.
Components and processes of DHCP.
Static vs. dynamic IP addressing.
How does a computer know what its IP configuration is? Most likely, the computer received its
IP configuration from a DHCP (Dynamic Host Configuration Protocol) server. Not only did the
DHCP server give the PC an IP address, but it also told the PC where the default gateway
was—and more than likely—how to find a DNS server.
A computer will receive its IP configuration in one of two ways, statically (manually set) or
dynamically (through a service like DHCP).
Highlights:
●
●
●
A computer will receive its IP configuration either statically, which means manually set,
or dynamically, which means through a service like DHCP.
A computer usually receives its IP configuration from a DHCP server.
The DHCP server usually provides an IP address, default gateway information, and
information on how to find a DNS server.
Static IP addressing.
Static IP address assignment is adequate for very small and stable networks, but quickly
becomes unwieldy and error prone as the network grows and additional nodes are added to the
network. With static IP addressing, the administrator assigns an IP number and subnet mask to
each host in the network—whether it is a PC, router, or another piece of electronic equipment.
Each network interface that connects to the network requires this information.
The administrator also assigns a default gateway location and DNS server location to each host
in the network. These settings are required if access to outside networks is going to be
allowed—that would be through the default gateway—and if human-friendly naming conventions
are going to be allowed. Each time a change is made, for instance a new default gateway is
established, each IP configuration on each host must be updated, which is why static IP
addressing becomes rather cumbersome and complicated as a network grows.
Highlights:
●
●
With static IP addressing, the administrator assigns the complete IP configuration to
each host in the network.
Each time a change is made, the IP configuration on each host must be updated.
Dynamic IP addressing.
With dynamic IP addressing, the administrator configures a DHCP server to handle the
assignment process. This actually automates the process and significantly eases management.
The DHCP server listens on a specific port for IP information requests. Once it receives a
request, the DHCP server responds with the required information.
Highlights:
●
●
The administrator configures a DHCP server to handle the assigning process, which
automates the process.
The DHCP server listens on a specific port for IP information requests and, once it
receives a request, it responds with the required information.
How DHCP works.
DHCP eases the administrative overhead and maintenance required in a network environment.
DHCP plays a vital role in IPv4 networks. The typical DHCP process is outlined below.
Typical DHCP process:
1. Upon boot up, a PC that is configured to request an IP configuration sends a DHCP
discovery packet to the broadcast address: 255.255.255.255:67 (UDP port 67).
2. The DHCP server receives the discovery packet and responds with an offer packet,
which is sent to the MAC address of the computer using UDP port 68.
3. The computer receives the offer packet from the DHCP server and returns a request
packet (requesting the proper IP configuration) to the DHCP server.
4. Once the DHCP server receives the request packet, it sends back an acknowledgement
packet, which contains the required IP configuration information.
5. Upon receipt of the acknowledgement packet, the PC changes its IP configuration to
reflect the information received.
Components and process of DHCP.
A number of components and processes are required in order for DHCP to be effective. Many of
them are outlined below.
Ports used.
There are two ports used in the DHCP process. The PC sends its discovery packet out on the
broadcast address (255.255.255.255) on UDP port 67. When the DHCP server responds, it
responds to the PC’s MAC (media access control) address on UDP port 68. The PC uses UDP
port 67. The DHCP server responds on UDP port 68.
Highlights:
●
●
The PC sends its discovery packet to 255.255.255.255:67.
The DHCP server sends an offer packet to the PC’s MAC address on port 68.
Address scope.
The address scope is the IP address range that the administrator configures on the DHCP
server. This is the range of addresses that the DHCP server can hand out to individual nodes.
Highlights:
●
Administrator configures the IP address range with a selection of addresses that are
available to be handed out.
Address reservations.
Address reservations are administrator configured reserved IP addresses. The administrator
reserves specific IP addresses to be handed out to specific MAC addresses. These addresses
are used for devices that should always have the same IP address, such as servers and
routers. Without address reservation, a default gateway's IP address could change, leading to a
loss of outside connectivity.
An additional benefit to address reservation is that it allows certain addresses to be changed
from a central location, rather than requiring an administrator to log into each device and
change the IP configuration individually.
Highlights:
●
●
Administrator reserves specific IP addresses to be handed out to specific MAC
addresses, so that certain devices always have the same IP address.
Allows for these addresses to be changed from a central location instead of having to log
in to each device separately.
Leases.
The concept of leases is important in the DHCP process. A DHCP server hands out IP
configuration information to nodes; however, those configuration parameters do not last
indefinitely; they will expire at some point. This length of time—the lease—is configured by an
administrator.
Highlights:
●
●
Configuration parameters are only good for a specified amount of time.
The length of the leases is configured by the administrator.
Options.
There are a number of options that an administrator can configure. The one option that must be
configured is the default gateway location. The second most common configured option is the
DNS server address (location), and the administrator can actually configure more than one DNS
server location. Another commonly configured option is whether or not PCs synchronize with a
time server. To facilitate synchronization, the administrator configures a time server address.
There are many additional options that administrators can consider when implementing DHCP.
Common Configurable Options:
●
●
Default gateway location.
DNS server addresses (there can be more than one).
●
Time server addresses.
Preferred IP configuration.
When a PC boots up, it does have a preferred IP address, which is the IP address that it had
the last time that it booted up. It can request that same IP configuration from the DHCP server.
Administrators can configure DHCP servers to either honor that preference or to ignore it.
Highlights:
●
●
A PC can have a preferred IP address.
Administrators can configure the DHCP server to either honor or ignore the preference.
DHCP relay.
Under the right circumstances, a DHCP server isn’t required to reside on the local network
segment. Broadcast transmissions cannot pass through a router. If there is not a DHCP server
on the local network segment, the router can be configured to be a DHCP relay. When a DHCP
relay (which can also be called an IP helper) receives a discovery packet from a node, it will
forward that packet to the network segment on which the DHCP server resides.
This allows for there to be fewer configured DHCP servers in any given network, reducing the
amount of maintenance that an administrator needs to perform.
Highlights:
●
●
●
As a general rule, broadcast transmissions cannot pass through a router; however, if
there's not a DHCP server on the local network segment, the router can be configured to
be a DHCP relay.
When a DHCP relay, also called an IP helper, receives a discovery packet from the
node, it will forward that packet to the network segment on which the DHCP server
resides.
This allows for there to be fewer configured DHCP servers in any given network,
reducing the amount of maintenance that an administrator needs to perform.
What was covered.
Static vs. dynamic IP addressing.
IP configurations can be static or dynamic. In a static configuration, an administrator supplies all
of the required IP information to each device that requires it in a network. In a dynamic
configuration, an administrator configures a DHCP server to automatically distribute the required
IP configuration information upon request.
How DHCP works.
A device sends a discovery packet. A DHCP server responds with an offer packet (letting the
device know that the DHCP server has the required information). Upon receipt of the offer
packet, the device sends a request packet (requesting the proper IP configuration). When the
DHCP server gets the request packet, it responds with all of the information in an
acknowledgement packet.
Components and processes of DHCP.
DHCP uses UDP ports 67 and 68 to provide the IP configuration to a PC. The IP address
comes from a scope (range) of addresses configured by the administrator. The administrator
can reserve a pool of addresses. Options include: default gateway, DNS servers, time servers,
and other options. Addresses are leased and leases expire; however, a device can request the
same IP address again. A DHCP relay can be used when a DHCP server doesn’t reside on the
local network segment.