You are on page 1of 5

What is DHCP?

It gives IP Addresses Automatically to the Clients who is requesting for an IP Address Centralized IP Address Management DHCP prevents IP address Conflicts and helps conserve the use of client IP Address on the Network DHCP reduces the complexity and amount of

administrative work by assigning TCP/IP configuration Client IP configuration is updated automatically

Why DHCP ?

How DHCP Server works ?

Static IP Assigning
IP addresses are entered manually IP address could be entered incorrectly Communication and network issues can result Frequent computer moves increase administrative effort

Dynamic IP Assigning
IP addresses are supplied automatically Correct configuration information is ensure Client configuration is updated automatically A common source of network problems is eliminated
5e7c-3a2c-1d9b 5e7c-3a2c-1d9b

DHCP DHCP Server1 Server1 192.168.0.253 192.168.0.253


5e7c-3a2c-1d9a 5e7c-3a2c-1d9a

DHCP DHCP Server2 Server2 192.168.0.254 192.168.0.254


5e7c-3a2c-1d9d 5e7c-3a2c-1d9d

Linux Linux Client Client

Windows Windows Client Client 192.168.0.2 192.168.0.2


5e7c-3a2c-1d9c 5e7c-3a2c-1d9c

How DHCP Server works ?


DHCP DHCPClient Clientbroadcasts broadcasts a aDHCPDISCOVER DHCPDISCOVERpacket packet DHCP DHCP Server1 Server1 192.168.0.253 192.168.0.253
5e7c-3a2c-1d9a 5e7c-3a2c-1d9a

How DHCP Server works ?


DHCP DHCPServer Serverbroadcast broadcast IP address Pool packet a aDHCPOFFER DHCPOFFER packet DHCP DHCP Server1 Server1 192.168.0.253 192.168.0.253 DHCP DHCP Server2 Server2 192.168.0.254 192.168.0.254
192.168.0.1 192.168.0.2 192.168.0.3

5e7c-3a2c-1d9a 5e7c-3a2c-1d9a192.168.0.100
Fr Fr oom DDH T o To :m : : 5 HCCP OO 5e 5e e7cP OO f : ffefer 5e 7c 7c -3 f ffe r I IP 7c -3 a2 fer r P : -3-3a2 : 1 19 a2 ca2c-c-1 92 2.1 c-1-1d 1dd9 .16 68 d9 9b 9a a 8.0.0. b .1 1

DHCP DHCP Server2 Server2 192.168.0.254 192.168.0.254


5e7c-3a2c-1d9d 5e7c-3a2c-1d9d

Linux Linux Client Client

rr b ee vv d99b coo is -1 cc sca DD i -1d 2 PP -3 a2 f f C HHC e7cc-3fff-f-fffff DD 5 e7 -f ff m : : 5: ffffffff-ff ro oo : FF romTT

5e7c-3a2c-1d9d 5e7c-3a2c-1d9d

Windows Windows Client Client 192.168.0.2 192.168.0.2

Linux Linux Client Client

Windows Windows Client Client 192.168.0.2 192.168.0.2

5e7c-3a2c-1d9b 5e7c-3a2c-1d9b

5e7c-3a2c-1d9c 5e7c-3a2c-1d9c

5e7c-3a2c-1d9b 5e7c-3a2c-1d9b

5e7c-3a2c-1d9c 5e7c-3a2c-1d9c

How DHCP Server works ?

How DHCP Server works ?


DHCP DHCPClient Clientbroadcasts broadcasts a DHCPREQUEST a DHCPREQUESTpacket packet

DHCP DHCP Server1 Server1 192.168.0.253 192.168.0.253


5e7c-3a2c-1d9a 5e7c-3a2c-1d9a

DHCP DHCPServer Serverbroadcast broadcast a aDHCPOFFER DHCPOFFERpacket packet


IP address Pool 192.168.0.101 192.168.0.102

DHCP DHCP Server1 Server1 192.168.0.253 192.168.0.253


5e7c-3a2c-1d9a 5e7c-3a2c-1d9a

DHCP DHCP Server2 Server2

DHCP DHCP Server2 Server2 192.168.0.254 192.168.0.254


5e7c-3a2c-1d9d 5e7c-3a2c-1d9d

192.168.0.254 192.168.0.254 192.168.0.103


er ffff 5e7c-3a2c-1d9d 5e7c-3a2c-1d9d PP O C er H D O C H D 9d 192.168.0.254 1d ca2 -3 1d9d 7c ca2 : :5e -3 m 7c ro FF 5e 9b rom 7c-3a2c-1d 9b c-1d 1 oo: :5e TT 5e7c-3a2 10 0. 8. 16 101 2. 0. 8. : :19 16 IP 2. er 19 ff O IP er ff O Windows Windows

Linux Linux Client Client

Client Client 192.168.0.2 192.168.0.2

Linux Linux Client Client

tt b ss ee uu d99b qq ee -1 c RR -1d9aa 22c PP -3aa d9 f CC 1 c 3 H 7 c- a2cc-1d DDH 5ee eeoof ss : : 5 7c-3 a2 eaa 3 m 7 L c e e m .1 ro r 7 5 L o FF e o . .1 r o : : 5 t f for 68 0 TTo uesst 2.1168.0 qque : 1992. e RRe IP : 1 IP

Windows Windows Client Client 192.168.0.2 192.168.0.2

5e7c-3a2c-1d9b 5e7c-3a2c-1d9b

5e7c-3a2c-1d9c 5e7c-3a2c-1d9c

5e7c-3a2c-1d9b 5e7c-3a2c-1d9b

5e7c-3a2c-1d9c 5e7c-3a2c-1d9c

How DHCP Server works ?


DHCP DHCPServer Serverbroadcasts broadcasts IP address Poolpacket a aDHCPACK DHCPACK packet DHCP DHCP Server1 Server1 192.168.0.253 192.168.0.253
192.168.0.1 6 Hrs 192.168.0.1 192.168.0.2 192.168.0.3

How DHCP Lease Renewal works ?


DHCP DHCPClient Clientsends sends a aDHCPREQUEST DHCPREQUESTpacket packet DHCP DHCP Server1 Server1 192.168.0.253 192.168.0.253 DHCP DHCP Server2 Server2 192.168.0.254 192.168.0.254
5e7c-3a2c-1d9d 5e7c-3a2c-1d9d 5e7c-3a2c-1d9a 5e7c-3a2c-1d9a

5e7c-3a2c-1d9a 5e7c-3a2c-1d9a192.168.0.100
ro m D H To m : HCC RR ep To ep 5e PP :5:5 lyly w : 5 7 OOf e7 e7 wi ith e7 c c-3a ff fe c t I c IPP : h 6 6 H -3-3a -3a2 2 er r : 1 19 Ho ou a2 2c- c-c-1 92 2.1 u rs c-1 1d 1dd9 .16 68 rs L d9 9b 9a a ea b 8.0.0. Lea se .1 1 se fofor r

DHCP DHCP Server2 Server2 192.168.0.254 192.168.0.254


5e7c-3a2c-1d9d 5e7c-3a2c-1d9d

FFro

Linux Linux Client Client 192.168.0.1 192.168.0.1


5e7c-3a2c-1d9b 5e7c-3a2c-1d9b

Windows Windows Client Client 192.168.0.2 192.168.0.2


5e7c-3a2c-1d9c 5e7c-3a2c-1d9c

Linux Linux Client Client 192.168.0.1 192.168.0.1


5e7c-3a2c-1d9b 5e7c-3a2c-1d9b

Request Requestto toExtend ExtendLease Lease of of IP IP: :192.168.0.1 192.168.0.1

DHCP DHCP Request Request From From: :5e7c-3a2c-1d9b 5e7c-3a2c-1d9b To To: :5e7c-3a2c-1d9a 5e7c-3a2c-1d9a

Windows Windows Client Client


50%

192.168.0.2 192.168.0.2
5e7c-3a2c-1d9c 5e7c-3a2c-1d9c

How DHCP Lease Renewal works ?


DHCP DHCPServer Serversends sends IP address Poolpacket a DHCPACK a DHCPACK packet DHCP DHCP Server1 Server1 192.168.0.253 192.168.0.253
3 Hrs 192.168.0.1 9 192.168.0.2 192.168.0.3

Why DHCP Reservation?

Assigning IP address dynamically has some problems that every time a client system boots it is not sure that it will get the same IP so it will
DHCP DHCP Server2 Server2

5e7c-3a2c-1d9a 5e7c-3a2c-1d9a192.168.0.100 DHCP DHCP Offer Offer From From: :5e7c-3a2c-1d9a 5e7c-3a2c-1d9a To To: :5e7c-3a2c-1d9b 5e7c-3a2c-1d9b

be uneasy task for other systems to find the particular system. To solve the above problem we can do mac-address binding of the IPs. Just give its entry in the fixed-

192.168.0.254 192.168.0.254
5e7c-3a2c-1d9d 5e7c-3a2c-1d9d

Extend ExtendLease Leaseby by 66Hours Hoursfor for IP IP: :192.168.0.1 192.168.0.1

Linux Linux Client Client 192.168.0.1 192.168.0.1


5e7c-3a2c-1d9b 5e7c-3a2c-1d9b 150% 50%

Windows Windows Client Client 192.168.0.2 192.168.0.2


5e7c-3a2c-1d9c 5e7c-3a2c-1d9c

address portion.

Requirements

DHCP Server Configuration

Packages dhcp* Port Numbers 67 68 Bootp DHCP


DHCP DHCP Server Server 192.168.0.253 192.168.0.253
5e7c-3a2c-1d9a 5e7c-3a2c-1d9a

Web Web Server Server 192.168.0.254 192.168.0.254


5e7c-3a2c-1d9d 5e7c-3a2c-1d9d

Configuration File /etc/dhcpd.conf Service dhcpd Daemon dhcpd


Linux Linux Client Client
5e7c-3a2c-1d9b 5e7c-3a2c-1d9b

Windows Windows Client Client


5e7c-3a2c-1d9c 5e7c-3a2c-1d9c

Configuring DHCP Server

/etc/dhcpd.conf

Install Installthe thepackage packageby byusing usingone oneof ofthe theinstallation installationmethods methods [root@comp1]# [root@comp1]#rpm rpm-ivh -ivh--force --force--aid --aid ftp://192.168.0.250/pub/Server/dhcp* ftp://192.168.0.250/pub/Server/dhcp*

To Tochange changethe therange rangeand andother otheroptions options default-lease-time 21600; default-lease-time 21600; subnet subnet192.168.0.0 192.168.0.0netmask netmask255.255.255.0 255.255.255.0 { { option optionrouters routers192.168.0.254; 192.168.0.254; option subnet-mask option subnet-mask255.255.255.0; 255.255.255.0; option domain-name option domain-namezoom.com"; zoom.com"; option optiondomain-name-servers domain-name-servers192.168.0.253; 192.168.0.253; range range192.168.0.1 192.168.0.1192.168.0.100; 192.168.0.100;} } To Tobind bindmac-address mac-addressto toIP IPaddress address host server2 { host server2 { option optionhost-name host-nameserver2.zoom.com"; server2.zoom.com"; hardware hardwareethernet ethernet5E:7C:3A:2C:1D:9D; 5E:7C:3A:2C:1D:9D; fixed-address fixed-address192.168.0.254; 192.168.0.254;} }

Sample Sampleconfiguration configurationfile filelocation location /usr/share/doc/dhcp3.0.1/dhcpd.conf.sample /usr/share/doc/dhcp3.0.1/dhcpd.conf.sample Copying CopyingSample Samplefile filefor forConfiguration Configuration [root@comp1 ~]# cp /usr/share/doc/dhcp3.0.1/dhcpd.conf.sample [root@comp1 ~]# cp /usr/share/doc/dhcp3.0.1/dhcpd.conf.sample /etc/dhcpd.conf /etc/dhcpd.conf

DHCP Server

DHCP Client Linux

To Torestart restartthe theDHCP DHCPservices services [root@comp1 ~]# service dhcpd restart [root@comp1 ~]# service dhcpd restart

Install Installthe thepackage packageby byusing usingone oneof ofthe theinstallation installationmethods methods

[root@comp1]# [root@comp1]#rpm rpm-ivh -ivh--force --force--aid --aid ftp://192.168.0.250/pub/Server/dhclient* ftp://192.168.0.250/pub/Server/dhclient*

To Toget getIP IPaddress addressfrom fromDHCP DHCPserver server [root@comp1~]# dhclient [root@comp1~]# dhclient or or [root@comp1 ~]# netconfig [root@comp1 ~]# netconfig Check Checkthe thebox boxuse usedynamic dynamicIP IPconfiguration configuration

DHCP Client Windows

Configuring ConfiguringDHCP DHCPClient Client Select SelectMy MyNetwork NetworkPlaces. Places. Right Rightclick clickProperties. Properties. Select Local Select LocalArea AreaConnection Connection Right Rightclick clickProperties. Properties. Double Click Double ClickInternet InternetProtocol Protocol(TCP/IP) (TCP/IP) Select SelectOption OptionObtain Obtainan anIP IPAddress Addressautomatically automatically

You might also like