Presentation is loading. Please wait.

Presentation is loading. Please wait.

DHCP Mike O’Connor Eric Tallman Matt Yasiejko. Overview DHCP defined DHCP defined How it works How it works Installation Installation dhcpd.conf dhcpd.conf.

Similar presentations


Presentation on theme: "DHCP Mike O’Connor Eric Tallman Matt Yasiejko. Overview DHCP defined DHCP defined How it works How it works Installation Installation dhcpd.conf dhcpd.conf."— Presentation transcript:

1 DHCP Mike O’Connor Eric Tallman Matt Yasiejko

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

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

4 DHCP defined Simplifies network administration Simplifies network administration Automatically assigns and keeps track of IP Addresses on the network Automatically assigns and keeps track of IP Addresses on the network Eliminates the necessity of assigning static IP Addresses Eliminates the necessity of assigning static IP Addresses Static IP can be assigned using DHCP in configuration Static IP can be assigned using DHCP in configuration Developed from BOOTP Developed from BOOTP Introduced the idea of a lease and IP binding Introduced the idea of a lease and IP binding Purposes: Purposes: Provide persistent storage of network parameters for network clients Provide persistent storage of network parameters for network clients Allocation of temporary or permanent network (IP) addresses to 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 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 Server responds to DHCPDISCOVER with possible configuration parameters for the network The client collects various DHCPOFFER responses The client collects various DHCPOFFER responses

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

9 DHCPACK / DHCPNAK Server responds with an ACK or NAK Server responds with an ACK or NAK ACK – initialization of client complete ACK – initialization of client complete NAK – client has invalid network information 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/protoco ls/dhcp/frame.htm http://www.tarunz.org/~vassilii/TAU/protoco ls/dhcp/frame.htm http://www.tarunz.org/~vassilii/TAU/protoco ls/dhcp/frame.htm http://www.tarunz.org/~vassilii/TAU/protoco ls/dhcp/frame.htm Format used in the handshake between client and server to pass network information Format used in the handshake between client and server to pass network information DHCPINFORM DHCPINFORM

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

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

14 DHCP Lease Database lease 134.198.161.99 { starts 2 2005/03/01 18:45:39; starts 2 2005/03/01 18:45:39; ends 2 2005/03/01 18:55:39; ends 2 2005/03/01 18:55:39; tstp 2 2005/03/01 18:55:39; tstp 2 2005/03/01 18:55:39; binding state free; binding state free; hardware ethernet 00:c0:f0:30:d7:11; hardware ethernet 00:c0:f0:30:d7:11; uid "\001\000\300\3600\327\021"; uid "\001\000\300\3600\327\021";} lease 134.198.161.98 { starts 4 2005/03/03 03:01:59; starts 4 2005/03/03 03:01:59; ends 4 2005/03/03 03:11:59; ends 4 2005/03/03 03:11:59; binding state active; binding state active; next binding state free; next binding state free; hardware ethernet 00:e0:4c:96:f3:95; hardware ethernet 00:e0:4c:96:f3:95; client-hostname "lab112.research.cs.uofs.edu"; client-hostname "lab112.research.cs.uofs.edu";} *courtesy of Robert Huylo and Ana Chanaba http://www.cs.uofs.edu/%7Eplishka/cmps354/DHCP1.ppt

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 Ensure that the bpf device is compiled in the kernel Berkeley Packet Filter Berkeley Packet Filter Provides a raw interface to data link layers in a protocol independent fashion Provides a raw interface to data link layers in a protocol independent fashion Install the net/isc-dhcp3-server port Install the net/isc-dhcp3-server port Make install clean Make install clean

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

18 dhcpd.conf dhcpd.conf file dhcpd.conf file dhcpd.conf file dhcpd.conf file Domain Name System (DNS) Domain Name System (DNS) ddns-update-style none; ddns-update-style none; host mailhost { host mailhost { hardware ethernet 02:03:04:05:06:07; hardware ethernet 02:03:04:05:06:07; fixed-address mailhost.example.com; } fixed-address mailhost.example.com; }  Assign IP Addresses based on MAC Addresses

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

20 rc.conf hostname=“lab6.research.cs.uofs.edu” ifconfig_dc0=“inet 134.198.161.106 netmask 255.255.248.0” defaultrouter=“134.198.161.254”hostname=“lab6.research.cs.uofs.edu”dhcpd_enable=“YES”dhcpd_conf=“/usr/local/etc/dhcpd.conf”sshd_enable=“YES”

21 Resources http://www.freebsd.org/doc/en_US.ISO8859- 1/books/handbook/network-dhcp.html http://www.freebsd.org/doc/en_US.ISO8859- 1/books/handbook/network-dhcp.html http://www.freebsd.org/doc/en_US.ISO8859- 1/books/handbook/network-dhcp.html http://www.freebsd.org/doc/en_US.ISO8859- 1/books/handbook/network-dhcp.html http://www.tarunz.org/~vassilii/TAU/protoco ls/dhcp/toc.htm http://www.tarunz.org/~vassilii/TAU/protoco ls/dhcp/toc.htm http://www.tarunz.org/~vassilii/TAU/protoco ls/dhcp/toc.htm http://www.tarunz.org/~vassilii/TAU/protoco ls/dhcp/toc.htm RFC 2131 RFC 2131


Download ppt "DHCP Mike O’Connor Eric Tallman Matt Yasiejko. Overview DHCP defined DHCP defined How it works How it works Installation Installation dhcpd.conf dhcpd.conf."

Similar presentations


Ads by Google