slide1 n.
Skip this Video
Download Presentation

Loading in 2 Seconds...

play fullscreen
1 / 14

DHCP - PowerPoint PPT Presentation

  • Uploaded on

DHCP. -Ameeta and Haripriya -cmsc 691x. DHCP. Dynamic Host Configuration Protocol It controls vital networking parameters of hosts with the help of the server Its an extension of BOOTP Its backward compatible with BOOTP

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'DHCP' - dean

Download Now An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript


-Ameeta and Haripriya

-cmsc 691x

  • Dynamic Host Configuration Protocol
  • It controls vital networking parameters of hosts with the help of the server
  • Its an extension of BOOTP
  • Its backward compatible with BOOTP
    • existing BOOTP devices can communicate with DHCP servers and allow the DHCP requests to cross routers running BOOTP forwarders
    • Upgrading is easy
dhcp client setup
  • Download dhcpcd from one of the following sites
  • Unpack it
    • Tar –zvxf dhcpd-1.3.18pl1.tar.gz
  • Cd into the directory and make dhcpcd
    • Cd dhcpcd-1.3.18pl1
    • Make
  • Install it
    • Make install
dhcp client setup1
  • /etc/dhcpc will be created .
  • DHCPcd will store the DHCP information.
  • dhcpcd will be copied into /usr/sbin
  • To make system initialize during DHCP during boot type

cd /etc/rc.d

  • Then do “mv rc.inet1 rc.inet1.OLD”
  • This moves old network initialization script into “rc.inet1.OLD”
  • Create the new rc.inet1 script.
  • Save it and reboot the computer.
sample code in rc net
Sample code in
  • #!/bin/sh
  • #
  • # rc.inet1 This shell script boots up the base INET system.
  • HOSTNAME=`cat /etc/HOSTNAME`
  • #This is probably not necessary but I will leave it in anyways
  • # Attach the loopback device.
  • /sbin/ifconfig lo /sbin/route add -net netmask lo # IF YOU HAVE AN ETHERNET CONNECTION, use these lines below to configure the # eth0 interface. If you're only using loopback or SLIP, don't include the # rest of the lines in this file
  • . /usr/sbin/dhcpcd
dhcp client setup2
  • After machine reboots the network interface should be configured.
  • Type ifconfig
  • If we have some normal no under inet addr that means we are set.
  • One final thing is we need to specify our nameservers.
  • Two ways to do it:
  • Ask the provider for the address of the nameserver and then put those in “/etc/resolv. conf”
  • Or DHCPcd will obtain the list from DHCP server and will build resolv.conf in “/etc/dhcpc”.
dhcp client setup3
  • Make a link from “/etc/dhcpc/resolv.conf” to “/etc/resolv.conf by using:

ln –s /etc/dhcpc/resolv.conf /etc/resolv.con

  • This was all about setting up the client for DHCP.
dhcp server setup
DHCP Server Setup
  • Download the DHCP server from
  • Unpack it .
  • cd into the distribution directory and type “./configure”.
  • Type “make”
  • Type “make install”.
  • After installing type “ifconfig –a”.
  • If the resulting output does not say MULTICAST then we must reconfigure the kernel and add multicast support.
dhcp server setup1
DHCP Server Setup
  • Add route for
  • Type “route add –host dev eth0”
  • If we get a message “ : Unknown host”
  • In /etc/hosts files add “ all-ones”.
  • Then do,” route add –host all-ones dev eth0”
  • Eth0 is the name of the network device you use.
  • If it differs change appropriately.
dhcp server setup2
DHCP Server Setup
  • To configure DHCPd create or edit “/etc/dhcpd.conf”.
  • There is a graphical interface for dhcpd configuration under KDE called “kcmdhcpd” .
  • It is very similar to DHCP configurator on Windows NT.
  • To configure by hand instructions are discussed below.
  • To assign IP addresses randomly the settings in /etc/dhcpd.conf will be as shown.
  • A sample /etc/dhcpd.conf will contain:
dhcp server setup3
DHCP Server Setup.
  • #sample /etc/dhcpd.conf
  • default-lease-time 600;
  • max-lease-time 7200;
  • option subnet-mask;
  • option broadcast-address;
  • option routers;
  • option domain-name-servers,;
  • option domain name “”;
  • subnet netmask {
  • range;
  • range;
  • }
dhcp server setup4
DHCP Server Setup
  • We can also assign specific IP addresses based on the client’s ethernet address.
  • Eg. host haagen {
  • hardware ethernet 08:00:2b:4c:59:23;
  • fixed-address;
  • }
  • This will assign IP address to a client with the ethernet address mentioned above.
  • Create the dhcpd.leases file which has information about current leases.
dhcp server setup5
DHCP Server Setup
  • Do “touch /var/state/dhcp/dhcpd.leases” to create empty dhcpd.leases file.
  • Invoke the DHCP server by typing “/usr/sbin/dhcpd”
  • This will invoke dhcpd on etho device.
  • To verify everything is working fine :
  • Turn on the debugging mode
  • Put the server in foreground.
  • “/usr/sbin/dhcpd –d –f “
  • Then boot one of the clients and check out console of server.
dhcp server setup6
DHCP Server Setup
  • We would see no of debugging messages coming up.
  • If everything is fine then the setup is done.
  • You can quit dhcpd.
  • If we want dhcpd to start at boot-up include dhcpd in “/etc/rc.d/rc.local”.
  • Now we are done with DHCP Server Setup.