Dynamic Host Configuration Protocol DHCP Principle DHCP stands

  • Slides: 16
Download presentation
Dynamic Host Configuration Protocol

Dynamic Host Configuration Protocol

DHCP Principle DHCP stands for Dynamic Host Configuration Protocol. It handles the automatic assignment

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.

DHCP Basics DHCP is designed to make the assignment of IP addresses and other

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.

Benefits of running DHCP Flexible configuration. DHCP makes it easy to implement changes in

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.

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

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

DHCP Leases DHCP leases define the lease duration, or the amount of time that

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.

DHCP Scope A DHCP Scope is a range of IP addresses and related configuration

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

DHCP Reservations When would you reserve an IP address? Well, in some cases, a

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.

DHCP Options DHCP options are basic settings that a client needs for proper network

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

DHCP Relay Agent DHCP requests are broadcast messages that cannot be routed, so they

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.

Dhcp request LINUX Dhcp reply DHCP SERVER DHCP CLIENT

Dhcp request LINUX Dhcp reply DHCP SERVER DHCP CLIENT

How DHCP assigns IP addresses A user turns on a computer with a DHCP

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,

DHCP Server Configuration • • • cp /usr/share/doc/dhpcd. conf. sample /etc/dhcpd. conf vi /etc/dhcpd.

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

root@dlp [~]# yum -y install dhcp [root@dlp ~]# vi /etc/dhcpd. conf # create new

root@dlp [~]# yum -y install dhcp [root@dlp ~]# vi /etc/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 10. 0 netmask 255. 0 { # specify the range of lease IP address range dynamic-bootp 10. 0. 0. 200 10. 0. 0. 254; # specify broadcast address option broadcast-address 10. 0. 0. 255; # specify default gateway option routers 10. 0. 0. 1; }

4. 5. 6. /etc/init. d /dhcpd start service /etc/init. d /dhcpd stop service /etc/init.

4. 5. 6. /etc/init. d /dhcpd start service /etc/init. d /dhcpd stop service /etc/init. d /dhcpd restart service

Troubleshooting DHCP Clients DHCP clients are unable to get IP addresses from the server.

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.