DHCP - PowerPoint PPT Presentation

About This Presentation
Title:

DHCP

Description:

http://www.tarunz.org/~vassilii/TAU/protocols/dhcp/timeline.htm. DHCPDISCOVER ... Provides a raw interface to data link layers in a protocol independent fashion ... – PowerPoint PPT presentation

Number of Views:135
Avg rating:3.0/5.0
Slides: 22
Provided by: est97
Category:
Tags: dhcp | fashion | timeline

less

Transcript and Presenter's Notes

Title: DHCP


1
DHCP
  • Mike OConnor
  • Eric Tallman
  • Matt Yasiejko

2
Overview
  • DHCP defined
  • How it works
  • Installation
  • dhcpd.conf
  • rc.conf

3
DHCP defined
  • DHCP Dynamic Host Configuration Protocol
  • Uses UDP (User Datagram Protocol)
  • Broadcasts without error correction
  • Allows systems to connect to a network and be
    assigned necessary network information
  • IP address, subnet, lease period

4
DHCP defined
  • Simplifies network administration
  • Automatically assigns and keeps track of IP
    Addresses on the network
  • Eliminates the necessity of assigning static IP
    Addresses
  • Static IP can be assigned using DHCP in
    configuration
  • Developed from BOOTP
  • Introduced the idea of a lease and IP binding
  • Purposes
  • Provide persistent storage of network parameters
    for network clients
  • Allocation of temporary or permanent network (IP)
    addresses to clients

5
DHCP How it works
http//www.tarunz.org/vassilii/TAU/protocols/dhcp
/timeline.htm
6
DHCPDISCOVER
  • Client finds out which machines out there are
    providing a DHCP server

7
DHCPOFFER
  • Server responds to DHCPDISCOVER with possible
    configuration parameters for the network
  • The client collects various DHCPOFFER responses

8
DHCPREQUEST
  • Chooses possible action
  • Gets parameters from one server and declines all
    others
  • Missing use defaults get all get only requested
  • Verifies correctness of parameters of previous
    allocation
  • Negotiates extended lease of a network address

9
DHCPACK / DHCPNAK
  • Server responds with an ACK or NAK
  • ACK initialization of client complete
  • NAK client has invalid network information

10
Use a previous allocation
  • Old configuration located
  • Server sends DHCPACK to client
  • Other DHCPACKs ignored
  • IP-subnet-number, hardware-address ? key to find
    old configuration parameters

11
DHCP Message Format
  • http//www.tarunz.org/vassilii/TAU/protocols/dhcp
    /frame.htm
  • Format used in the handshake between client and
    server to pass network information
  • DHCPINFORM

12
DHCP IP Allocation
  • Automatic allocation DHCP assigns a permanent
    address, no human interference
  • Dynamic allocation DHCP assigns an IP for a
    lease period
  • Manual allocation Network administrator assigns
    an IP

13
DHCP Lease Database
  • /var/lib/dhcp/dhcpd.leases stores the DHCP client
    lease database
  • Lease length
  • To whom the IP is assigned
  • MAC address

14
DHCP Lease Database
  • lease 134.198.161.99
  • starts 2 2005/03/01 184539
  • ends 2 2005/03/01 185539
  • tstp 2 2005/03/01 185539
  • binding state free
  • hardware ethernet 00c0f030d711
  • uid "\001\000\300\3600\327\021"
  • lease 134.198.161.98
  • starts 4 2005/03/03 030159
  • ends 4 2005/03/03 031159
  • binding state active
  • next binding state free
  • hardware ethernet 00e04c96f395
  • client-hostname "lab112.research.cs.uofs.edu"
  • courtesy of Robert Huylo and Ana Chanaba
    http//www.cs.uofs.edu/7Eplishka/cmps354/DHCP1.pp
    t

15
Defining the subnet
10000110.11000110.10100001.01101100
(134.198.161.106) BITWISE
AND 11111111.11111111.11111000.00000000
(255.255.248.0) ----------------------------------
---------------------------------------- 10000110.
11000110.10100000.00000000 (134.198.160.0)
Subnet
16
Installing DHCP Server
  • Ensure that the bpf device is compiled in the
    kernel
  • Berkeley Packet Filter
  • Provides a raw interface to data link layers in a
    protocol independent fashion
  • Install the net/isc-dhcp3-server port
  • Make install clean

17
Installing DHCP Server
  • cp /usr/local/etc/dhcpd.conf.sample
    /usr/local/etc/dhcpd.conf
  • Modify dhcpd.conf

18
dhcpd.conf
  • dhcpd.conf file
  • Domain Name System (DNS)
  • ddns-update-style none
  • host mailhost
  • hardware ethernet 020304050607
  • fixed-address mailhost.example.com
  • Assign IP Addresses based on MAC Addresses

19
Installing DHCP Server
  • Start the server
  • /usr/local/etc/rc.d/isc-dhcpd.sh start
  • Modify rc.conf to make the daemon run on startup

20
rc.conf
  • hostnamelab6.research.cs.uofs.edu
  • ifconfig_dc0inet 134.198.161.106 netmask
    255.255.248.0
  • defaultrouter134.198.161.254
  • hostnamelab6.research.cs.uofs.edu
  • dhcpd_enableYES
  • dhcpd_conf/usr/local/etc/dhcpd.conf
  • sshd_enableYES

21
Resources
  • http//www.freebsd.org/doc/en_US.ISO8859-1/books/h
    andbook/network-dhcp.html
  • http//www.tarunz.org/vassilii/TAU/protocols/dhcp
    /toc.htm
  • RFC 2131
Write a Comment
User Comments (0)
About PowerShow.com