Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dynamic Host Configuration Protocol

Similar presentations


Presentation on theme: "Dynamic Host Configuration Protocol"— Presentation transcript:

1 Dynamic Host Configuration Protocol

2 DHCP Principle DHCP stands for Dynamic Host Configuration Protocol. It handles the automatic assignment of IP addresses and other configuration settings for devices on your network. Isn’t there a way to configure IP addresses manually? Yes, there is; if you’ve explored the Network and Sharing Center in your control panel, you’ve probably seen this. But DHCP automates it. This is especially good for people who have laptops, aren’t hooked up to the Internet all the time and often move from place to place with their portable devices. They can simply get a new IP address as needed without having to do it manually.

3 DHCP Basics DHCP is designed to make the assignment of IP addresses and other network configuration information faster and easier. Rather than going around to every device on your network and setting up its network configuration manually, you can use your DHCP server to set up pools of addresses, called scopes, from which clients can request a temporary IP address. DHCP is a protocol that uses Level 4 on the OSI model. It communicates using User Datagram Protocol (UDP) datagrams through UDP Port 68. (I know, this brings up images of exchanging Candy Grams with all your friends. Remember that?) DHCP works with most current and past Windows clients, and also Linux, Macintosh, and many network-capable printers.

4 Benefits of running DHCP
Flexible configuration. DHCP makes it easy to implement changes in IP address configuration. Rather than manually configure each device’s network connection every time a new DNS server is added, you can go into the DHCP server and make the necessary changes. Scalable design. Can you imagine having to manually configure IP and routing information for 150 new devices on your network? DHCP makes it easier to add to your network as your organization grows. Centralized administration. You can make needed configuration changes in a single place. This saves time and effort over going around to every device on your network. Automatic host configuration. DHCP automates the assignment of IP addresses.

5 DHCP components DHCP leases DHCP scopes DHCP reservations DHCP options
DHCP relay agents

6 DHCP Leases DHCP leases define the lease duration, or the amount of time that a client can keep an IP address before releasing it. In Windows Server 2008, the default lease duration is 8 days for wired clients and 6 days for wireless clients. On the DHCP server, leases act as placeholders in its DHCP database. When the lease is issued, the IP address is removed from the list of available addresses to prevent the issuing of the same address to more than one computer.

7 DHCP Scope A DHCP Scope is a range of IP addresses and related configuration information available by request from a DHCP client. These scopes usually represent a single subnet, or segment of a network. Each scope is a continuous range of IP addresses defined by a beginning IP address and an ending IP address. If you need to exclude IP addresses, you must create exclusions for those addresses. One reason for creating these addresses might be hardware with static IP addresses, like printers or routers

8 DHCP Reservations When would you reserve an IP address? Well, in some cases, a network device needs to have a static IP address. An example would be a server, a router, or a network printer. In the DHCP role console, you reserve these addresses using the list below.

9 DHCP Options DHCP options are basic settings that a client needs for proper network communication. These options include an IP address, a subnet mask, a default gatewar, primary and secondary DNS servers, primary and secondary Windows Internet Name Service (WINS) if applicable, and DHCP lease expiration. You can define these options when creating the scope or change them later. Server options are settings defined on each server that apply to all scopes on a specific DHCP server. Scope options are settings defined on each scope that apply only to the scope to which they are added. Router options are typically defined using scope options, which override server options. Server options are usually used for network resources whose IP addresses are the same for all scopes, such as DNS and WINS.

10 DHCP Relay Agent DHCP requests are broadcast messages that cannot be routed, so they are limited to the subnet of the client requesting an IP address. You can choose one of two options to get around this. You can have a DHCP server on each subnet, which can be expensive and, therefore, difficult to justify to senior management. Or, you can use a DHCP relay agent to forward DHCP requests. This agent accepts the broadcast packets and converts them to unicast packets that can traverse a routed network and vice versa when the DHCP server replies to the client requesting an IP address. Most modern routers support the passing of DHCP requests.

11 LINUX DHCP SERVER DHCP CLIENT Dhcp request Dhcp reply

12 How DHCP assigns IP addresses
A user turns on a computer with a DHCP client. The client computer sends a broadcast request (called a DISCOVER or DHCPDISCOVER), looking for a DHCP server to answer. The router directs the DISCOVER packet to the correct DHCP server. The server receives the DISCOVER packet. Based on availability and usage policies set on the server, the server determines an appropriate address (if any) to give to the client. The server then temporarily reserves that address for the client and sends back to the client an OFFER (or DHCPOFFER) packet, with that address information. The server also configures the client's DNS servers, WINS servers, NTP servers, and sometimes other services as well. The client sends a REQUEST (or DHCPREQUEST) packet, letting the server know that it intends to use the address. The server sends an ACK (or DHCPACK) packet, confirming that the client has a been given a lease on the address for a server-specified period of time.

13 DHCP Server Configuration
cp /usr/share/doc/dhpcd.conf.sample /etc/dhcpd.conf vi /etc/dhcpd.conf  configure dhcp server /etc/sysconfig/dhcpd # Command line options here DHCPDARGS=eth0

14 root@dlp [~]# yum -y install dhcp
~]# vi /etc/dhcp/dhcpd.conf # create new # specify domain name option domain-name "srv.world"; # specify name server's hostname or IP address option domain-name-servers dlp.srv.world; # default lease time default-lease-time 600; # max lease time max-lease-time 7200; # this DHCP server to be declared valid authoritative; # specify network address and subnet mask subnet netmask {     # specify the range of lease IP address     range dynamic-bootp ;     # specify broadcast address     option broadcast-address ;     # specify default gateway     option routers ; }

15  /etc/init.d /dhcpd start  start service
 /etc/init.d /dhcpd stop  stop service  /etc/init.d /dhcpd restart  restart service

16 Troubleshooting DHCP Clients
DHCP clients are unable to get IP addresses from the server. Multiple DHCP servers exist on the same local area network (LAN).  DHCP client has an auto-configured IP address that is incorrect for its current network. The client was not able to contact a DHCP server and obtain an IP address lease, either because of a network hardware failure or because the DHCP server is unavailable.


Download ppt "Dynamic Host Configuration Protocol"

Similar presentations


Ads by Google