1 DHCP DHCP Dynamic Host Configuration Protocol Polytechnic University Debie Beemsigne Dominic Joy Max Pereira Ravidev Mohan Edited by Malathi Veeraraghavan.

Slides:



Advertisements
Similar presentations
IP/MAC Address Translation
Advertisements

DHCPv6.
Internet Control Protocols Savera Tanwir. Internet Control Protocols ICMP ARP RARP DHCP.
DHCP Dynamic Host Configuration Part 7 NVCC Professional Development TCP/IP.
1 Internet Networking Spring 2006 Tutorial 8 DNS and DHCP as UDP applications.
System Configuration: DHCP and Autoconfiguration Chapter 6.
CSEE W4140 Networking Laboratory Lecture 9: NAT and DHCP Jong Yul Kim
Dynamic Host Configuration Protocol (DHCP)
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 BOOTP and DHCP Shivkumar Kalyanaraman Rensselaer Polytechnic Institute
BOOTP and DHCP Shivkumar Kalyanaraman Rensselaer Polytechnic Institute
RFC 2131 DHCP. Dynamic Host Configuration Protocol.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 BOOTP, DHCP and NAT Shivkumar Kalyanaraman Rensselaer Polytechnic Institute
Lesson 11: Deploying and Configuring the DHCP Service
Hands-On Microsoft Windows Server 2003 Networking Chapter 5 Dynamic Host Configuration Protocol.
Network Layer (Part IV). Overview A router is a type of internetworking device that passes data packets between networks based on Layer 3 addresses. A.
1 DHCP : DHCP : Dynamic Host Configuration Protocol :, Original by: Debie Beemsigne, Dominic Joy, Max Pereira, Ravidev Mohan, EL604, Fall 2001; Modified.
1 Dynamic Host Configuration Protocol (DHCP). 2 Dynamic Assignment of IP addresses Dynamic assignment of IP addresses is desirable for several reasons:
Managing DHCP. 2 DHCP Overview Is a protocol that allows client computers to automatically receive an IP address and TCP/IP settings from a Server Reduces.
DHCP for Multi-hop Wireless Ad-Hoc Networks Presented by William List.
DHCP Dynamic Host Configuration Protocol CIS 856: TCP/IP and Upper Layer Protocols Presented by Kyle Getz October 20, 2005.
1 Spring Semester 2009, Dept. of Computer Science, Technion Internet Networking recitation #2 DNS and DHCP.
Microsoft Windows Server 2003 TCP/IP Protocols and Services Technical Reference Slide: 1 Lesson 16 Dynamic Host Configuration Protocol (DHCP)
Dynamic Host Configuration Protocol (DHCP)
Bootstrap and Autoconfiguration (DHCP)
DHCP Dynamic Host Configuration Protocol. Introduction Client administration:  IP address management: They need to ease the process of joining the network.
COMS W COMS W Lecture 8. NAT, DHCP & Firewalls.
Guide to TCP/IP, Second Edition1 Guide To TCP/IP, Second Edition Chapter 8 The Dynamic Host Configuration Protocol (DHCP)
1 Dynamic Host Configuration Protocol (DHCP) Relates to Lab 7. Module about dynamic assignment of IP addresses with DHCP.
CMPT 471 Networking II DHCP © Janice Regan,
Multicasting  A message can be unicast, multicast, or broadcast.
資 管 Lee Application Layer and Client-Server Model A3.
DHCP Dynamic Host Configuration Protocol Information management 2 Groep T Leuven – Information department 2/18 Agenda Introduction BOOTP.
DHCP Dynamic Host Configuration Protocol Zhiqi Chen April 12, 2006.
Guide to TCP/IP, Third Edition Chapter 8: The Dynamic Host Configuration Protocol.
Dynamic Host Configuration Protocol (DHCP). History Diskless workstations –needed to know configuration parameters like IP address, netmask, gateway address.
DHCP Dynamic Host Configuration Protocol (RFC 2131) Michael Sadowsky CISC University of Delaware October 12, 2004 BOOTP Bootstrap Protocol (RFC.
DHCP ITL. ITL: © Hans Kruse, Shawn Ostermann, Carl Bruggeman2 Dynamic Host Configuration RFC 2131 – DHCP RFC 2132 – DHCP Options RFC BOOTP.
Sublayers Under the Network Layer: BOOTP & DHCP
Wednesday, December 04, Dynamic Host Configuration Protocol CSI 5321 Presented by Junaid Taqui.
1 CS 4396 Computer Networks Lab Dynamic Host Configuration Protocol (DHCP)
1 of 18 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 4 v3.0: Module 1; 1.2.
Bootstrap and Autoconfiguration Chapter 23. Introduction Each computer attached to a TCP/IP internet needs to know: –its IP address –the address of a.
BAI513 - PROTOCOLS DHCP BAIST – Network Management.
Guide to TCP/IP, Third Edition Chapter 8: The Dynamic Host Configuration Protocol.
BZUPAGES.COM BOOTP and DHCP The Bootstrap Protocol (BOOTP) is a client/server protocol that configures a diskless computer or a computer that is booted.
Module 2: Allocating IP Addressing by Using Dynamic Host Configuration Protocol (DHCP)
Dynamic Host Configuration Protocol Avanthi Koneru Uttara Sawant Srikanth Palla.
Chapter 17 BOOTP and DHCP.
1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Dynamic Host Configuration Protocol (DHCP)
Chapter 18 Host Configuration : DHCP
Chapter 22 Bootstrap and Auto configuration (DHCP) History of Bootstrap -Bootstrap is used to assign IP address to the computer. -Constant changes in the.
1 Network Address Translation (NAT) and Dynamic Host Configuration Protocol (DHCP) Relates to Lab 7. Module about private networks and NAT.
CIS 856: TCP/IP and Upper Layer Protocols Karthik Ravindra Nov 11, 2008 Dynamic Host Configuration Protocol [DHCP] - RFC 2131.
Allocating IP Addressing by Using Dynamic Host Configuration Protocol.
Multicasting  A message can be unicast, multicast, or broadcast. Let us clarify these terms as they relate to the Internet.
Address Translation Outline Datalink layer intro ARP RARP DHCP.
Dynamic Host Configuration Protocol (DHCP) DHCP provides a temporary IP address for a limited period of time DHCP has two databases. First one has static.
BAI513 - PROTOCOLS DHCP BAIST – Network Management.
1 Kyung Hee University Chapter 16 Host Configuration : BOOTP and DHCP.
Dynamic Host Configuration Protocol
Dynamic Host Configuration Protocol (DHCP)
Dynamic Host Configuration Protocol (DHCP)
Net 431 D: ADVANCED COMPUTER NETWORKS
Chapter 18 Host Configuration : DHCP
Chapter 16 Host Configuration : BOOTP and DHCP
DHCP Dynamic Host Configuration Protocol
Allocating IP Addressing by Using Dynamic Host Configuration Protocol
Chapter 18 Host Configuration : DHCP
Dynamic Host Configuration Protocol (DHCP)
Presentation transcript:

1 DHCP DHCP Dynamic Host Configuration Protocol Polytechnic University Debie Beemsigne Dominic Joy Max Pereira Ravidev Mohan Edited by Malathi Veeraraghavan

2 Outline  What is DHCP, and when & where is it used?  Components of DHCP  BOOTP and DHCP relation  DHCP message format  DHCP procedures  allocating new address  lease renewal  State machine  Questions & answers re. DHCP  Benefits of DHCP

3 What is DHCP ?  Dynamic Host Configuration Protocol  Used for dynamic allocation of IP addresses  only possible for hosts that exclusively run client applications  Allows for host-specific configuration parameters to be delivered from a DHCP server to a host  DHCP can also be used to convey permanent IP address assignments to hosts  Server interfaces need permanent addresses because clients need to be able to reach them  Also, router interfaces should be permanent addresses for stability of routing data

4 Where is DHCP used?  Since class B and class C address spaces have been exhausted, service providers and enterprises use dynamically allocated IP addresses  e.g., a cable modem service provider who has many customers  since not all customers are simultaneously on the Internet, a client host dynamically obtains an address for a short period of time and releases it for use by some other client  e.g., used on the Poly campus on our wireless network, where many students, faculty and staff members use their wireless cards for access to the Poly campus network

5 Relevance of DHCP to wireless and mobile networking  If an end host only runs the “client” ends of applications  e.g. a web browser, but not a web server  e.g. Outlook to download messages delivered to a PC user’s incoming mail server, but not the mail server itself  e.g. Windows PCs have ftp clients but not ftp servers  you ftp into utopia, but do you typically ftp into your PC?  Then, the end host can simply connect to the network at any “point of attachment,” obtain a network address and start receiving information

6 Why is a dynamically obtained address sufficient for such hosts?  Because, such end hosts only make “outgoing calls”  When such an end host initiates a call (TCP connection), the called server receives an IP packet from the calling host with the host’s new temporary address and hence can, in turn, send the caller back requested data  These hosts do not receive “incoming calls,” i.e., no one calls them  Therefore, such end hosts do not need a permanent address that potentially “callees” will need to know  Question: can we categorize a cellular telephone as such an “end point”

7 Answer to question in previous slide  No, because a cell phone can be called  Therefore callees (calling parties) will need to know the network address of the cellular phone

8 Is DHCP needed only for wireless users or also wired?  DHCP can be used whether link to endpoint is “wired” or “wireless”  Even with an Ethernet NIC, a host can use DHCP to dynamically obtain an IP address  e.g. cable modem user; Ethernet from host to cable modem; cable from modem to Internet

9 DHCP for mobile users?  DHCP not designed to handle mobility by itself  location management problem is to enable the delivery of calls to mobiles; end hosts that can dynamically obtain addresses are never “called;” so location management problem does not arise for DHCP hosts  handoff management requires a rerouting of packets when end host is in a connection; “costly” to update far end of connection with a new temporary address if DHCP is used to change addresses when a user moves

10 Components  DHCP client: a host using DHCP to obtain an IP address and other configuration information  DHCP server: a host that returns IP addresses and other configuration information  BOOTP relay agents: host or router that passes DHCP messages between DHCP clients and DHCP servers

11 DHCP uses BOOTP  Based on BOOTP  Uses BOOTP format for messages  Uses BOOTP relay agents to avoid having one DHCP server per network segment  BOOTP used to bootstrap hosts  First operation, get address and bootfile selection (diskless client)  Second operation, uses TFTP to download file  BOOTP uses UDP  67 for the server port  68 for the client port

12 Differences between BOOTP and DHCP  Two differences  DHCP specifies a “lease time” for IP address usage allowing for allocation of the same address to another client upon lease expiry  DHCP can acquire all IP-related configuration information, not just an address  BOOTP clients can talk to DHCP servers (backward compatibility) (backward compatibility)  DHCP is an extension of BOOTP  Message format similar

13 Format of a DHCP message op (1)htype (1)hlen (1)hops(1) xid (4) secs (2)flags (2) ciaddr (4) yiaddr (4) siaddr (4) giaddr (4) chaddr (16) sname (64) file (128) options ( variable)

14 Format of a DHCP message cont.  Op - message op code / message type  1=BootRequest,2= BootReply  htype - hardware address type  hlen - hardware address length (i.e. ‘6’ for 10mbps Ethernet)  hops - client sets to 0, optionally used by relay agents when booting via a relay agent  xid - transaction ID, a random number chosen by the client, used by the client and server to associate messages and responses between a client and a server  secs – filled in by the client, seconds elapsed since client began address acquisition or renewal process  flags – “broadcast flag” used if client cannot accept unicast IP packets before IP layer is configured (“chicken-and-egg” problem)  destination IP address in IP header is a broadcast IP address instead of yiaddress and destination MAC address is all ones; then set this flag to “broadcast” mode. Server receiving this flag in Bootrequest will know to send the Bootreply in broadcast mode BACK

15 Format of a DHCP message cont.  ciaddr – client IP address; only filled in if client is in BOUND, RENEW or REBINDING state and can respond to ‘ARP’ requests  yiaddr – ‘your’ (client) IP address  siaddr – IP address of next server to use in bootstrap; returned in DHCPOFFER, DHCPACK by server  giaddr – relay agent IP address, used in booting via a relay agent  chaddr – client hardware addresses  sname – optional server host name, null terminated string  file – Boot file name, null terminated string; “generic” name or null in DHCPDISCOVER, fully qualified directory-path name in DHCPOFFER  options – optional parameters field (see RFC 1533) BACK

16 DHCP options  Client IP Address  Subnet Mask  Client Hostname  DHCP Lease Time  DHCP Message Type  Renewal Time Value  Rebinding Time Value  Max Datagram Reassembly  Interface MTU  Broadcast Address  MobileIP Home Agent  DNS (Domain Name Server)  For all other options refer to RFC 2132

17 Types of DHCP messages  DHCPDISCOVER  DHCPOFFER  DHCPREQUEST  DHCPACK  DHCPNAK  DHCPDECLINE  DHCPRELEASE  DHCPINFORM

18 How does DHCP work?  When a client needs to start up TCP/IP operations, it broadcasts a request for address information. The DHCP server receives the request, assigns a new address for a specific time period (called a lease period) and sends it to the client together with the other required configuration information. This information is acknowledged by the client, and used to set up its configuration. The DHCP server will not reallocate the address during the lease period and will attempt to return the same address every time the client requests an address. The client may extend its lease with subsequent requests, and may send a message to the server before the lease expires telling it that it no longer needs the address so it can be released and assigned to another client on the network.

19 DHCP procedures  Allocating/obtaining new addresses  Lease renewal/reuse of address

20 Allocating new address Client Server (selected) Server (not selected) Collects replies DHCP REQ. DHCPACK Initialization Complete Graceful Shutdown DHCPRELEASE Discard lease DHCPOFFER DHCP DISC. Client selects configuration; in DCHP REQ it accepts one server’s offer and implicitly reject rest

21 How the server selects ‘ a new address  The client's current address as recorded in the client's current binding, ELSE  The client's previous address as recorded in the client's (now expired or released) binding, if that address is in the server's pool of available addresses and not already allocated, ELSE  The address requested in the 'Requested IP Address' option, if that address is valid and not already allocated, ELSE  A new address allocated from the server's pool of available addresses; the address is selected based on the subnet from which the message was received (if 'giaddr' is 0) or on the address of the relay agent that forwarded the message ('giaddr' when not 0).

22 Obtaining an IP address  DHCPDISCOVER is broadcast because client does not know IP address of DHCP server; BOOTP relay agents may relay it to other DHCP servers  One or more DHCP servers respond with DHCPOFFER, which carry yiaddr (Your IP address, i.e., client address) after checking that the address is free using ICMP echo request (ping)  ping needed because often a user will leave without graceful release of address

23 Obtaining an IP address contd.  If the client receives no DHCP offer before it times out, it retransmits DHCPDISCOVER  Client may wait for multiple replies and then choose one offer. It broadcasts DHCPREQUEST with ‘server identifier’ option included identifying the server whose offer it has accepted and ‘requested IP address’ option  Client should probe address with an ARP; if client detects that the address is already in use, it issues DHCPDECLINE

24 Obtaining an IP address contd.  Servers other than the one selected in the DHCPREQUEST will release their offered addresses, while the selected server will note the binding  If selected server cannot meet the needs of the DHCPREQ. it sends a DHCPNAK  If the client does not receive a DHCPACK or DHCPNAK before timeout it resends DHCPREQ.  Retransmission attempts use exponential backoff times;

25 Lease renewal DHCP REQUEST Locates Configuration Client Server Begin Initialization Initialization complete DHCPACK (Subsequent DHCPACKS ignored) Time

26 Reuse of address Client Server (selected) DHCP REQ. Locates Config. DHCPACK Initialization Complete (Subsequent DHCP Packets Ignored)

27 Reuse of IP address  DHCP REQUEST - client message to servers  requesting offered parameters from one server and implicitly declining offers from all others  confirming correctness of previously allocated address after, e.g., system reboot,  extending the lease on a particular network address.

28 Reuse of IP address cont.  DHCPACK - Server to client with configuration parameters, including committed network address.

29 State machine INIT/ REBOOT INIT REBOOTING SELECTING REQUESTINGREBINDING BOUNDRENEWING Send DHCPREQUEST DHCPNAK Restart Send DHCPDISCOVER DHCPNAK, Lease expired/Halt Network DHCPNAK/Halt Network T2 expires/ Broadcast DHCPREQUEST DHCPOFFER/ Send DHCPREQUEST DHCPOFFER/ Discard DHCPACK/ Record lease, set timersT1, T2 DHCPACK/Record lease set timersT1,T2 T1 expires/ Send DHCPREQUEST To leasing server DHCPOFFER, DHCPACK DHCPNAK/Discard DHCPACK/ Record lease, set Timers T1,T2 DHCPNAK/ Discard DHCPACK + not accept Send DHCPDECLINE DHCPACK/Record lease, set timers init with known network addressInit with acquiring new network address T1 is earlier than T2, which should expire before lease expires

30 Questions on DHCP  What happens if there is no DHCP server on a network and an IP host connects to it with the “Obtain IP address automatically” option selected?  Who makes and sells DHCP servers? Are these standalone entities or are they add-ons to IP routers?  Perform a tcpdump and explain DHCP message parameters.  Can DHCP support mobility across LANs (on different subnets)?  Comment on the speed of DHCP.

31 What happens if there is no DHCP server on a network and an IP host connects to it with the “Obtain IP address automatically” option selected?

32 What happens if there is no DHCP server on a network and an IP host connects to it with the “Obtain IP address automatically” option selected? In static addressing, the following fields: Gateway, WINS Configuration, DNS Configuration and IP Address would have to be manually set for a host to have connectivity into the network. If there is no DHCP server, and no BOOTP relay agent, then no IP address will be assigned and hence host cannot communicate; In this case “Static Addressing” needs to be used

33 Who makes and sells DHCP servers? Are these standalone entities or are they add-ons to IP routers?  Commercial DHCP servers  Microsoft: DHCP server included in Windows NT Server 3.51, 4.0, Windows 2000  SunSoft: Solstice SolarNet PC-Admin 1.5 includes a DHCP/BOOTP server  Cisco IOS DHCP Server (IOS is used in routers)

34 Use tcpdump and obtain a trace of a DHCP session Current IP configuration (before release)

35 Use tcpdump and obtain a trace of a DHCP session  Tcpdump Output (Release) C:\WINDOWS\DESKTOP\WINDUMP.EXE: listening on EL3C574 17:18: :50:4:fd:10:85 0:b0:c2:f3:15: : > : xid:0xc29c14f flags:0x8000 C: [|bootp] e 80ee e 80ee ee 1d f6e ee 1d f6e c29 c14f ee c29 c14f ee fd fd IP header Source Port Number #68 Op field htype field hlen hops xid field flags ciaddr field adapter address Destination Port Number#67

36 IP configuration after release

37 Tcpdump output for a renew  17:26: :b0:c2:f3:15:80 0:50:4:fd:10: : > : xid:0x596f374e Y: S: G: [|bootp]  d4 b ff11 247a 80ee 7001  80ee c0 3bb  596f 374e ee 7090  80ee 1d19 80ee fd   0000  17:26: :50:4:fd:10:85 ff:ff:ff:ff:ff:ff : > : xid:0x596f374e [|bootp]  f5a  ffff ffff a8ac  596f 374e  fd   0000  17:26: :b0:c2:f3:15:80 0:50:4:fd:10: : > : xid:0x596f374e Y: G: [|bootp]  d9 b ff ee 7001  80ee c5 cb6b  596f 374e ee 7090  ee fd   0000  17:26: :50:4:fd:10:85 ff:ff:ff:ff:ff:ff : > : xid:0x596f374e [|bootp]  c f4a  ffff ffff ddee  596f 374e  fd   0000

38 IP configuration after the renew

39 TCP DHCP Release and Renew  C:\WINDOWS\COMMAND\WINDUMP.EXE: listening on EL3C574  14:33: > : xid:0x2c12fc0c flags:0x80  00 C: [|bootp]  14:33: > : xid:0x77514b14 Y:  S: G: [|bootp]  14:33: > : xid:0x77514b14 Y:  G: [|bootp]  14:33: arp who-has tell  14:34: > : icmp: router solicitation  14:34: > :  >>> NBT UDP PACKET(137): REGISTRATION; POSITIVE; RESPONSE; UNICAST  14:34: > :  >>> NBT UDP PACKET(137): REGISTRATION; REQUEST; UNICAST  14:34: > :  >>> NBT UDP PACKET(137): REGISTRATION; REQUEST; UNICAST  14:34: > :  >>> NBT UDP PACKET(137): REGISTRATION; REQUEST; UNICAST  14:34: > :  >>> NBT UDP PACKET(137): REGISTRATION; POSITIVE; RESPONSE; UNICAST  14:34: > :  >>> NBT UDP PACKET(137): REGISTRATION; POSITIVE; RESPONSE; UNICAST  14:34: > : icmp: router solicitation  14:34: > : icmp: router solicitation Release Renew

40 Comment on the speed of DHCP  If DHCP servers have to ping all hosts to check if an address is truly free, this will take time  Depends on location of BOOTP relay agents and DHCP servers  Why is this ping necessary?  Because a host does not issue a renewal but is still online past its lease time; if client coded to issue a renewal, why would this happen?  Will a server ping for an address whose lease is still not up if all addresses are taken with the “hope” that a host left without gracefully releasing address?  Is a conflict of address space possible between different DHCP servers if multiple are present on one subnet? There is no server-to-server protocol yet

41 Benefits of using DHCP for dynamic address allocation  Address reuse  A service provider/enterprise with 1000 addresses can support a much larger number of subscribers/hosts with time multiplexing of addresses (one host uses an address, and releases it when done; another host is allocated the same address)  Removes error-prone manual host configuration process to set IP addresses, DNS server addresses, gateways, etc.  Configuration information can be administered from a single point.  Major network resource changes (e.g. a router changing an interface address) requires an update of only the DHCP server, rather than every system.  Caveat: cannot allocate temporary addresses to servers/routers

42 References   RFC 2131: DHCP   RFC 2132: DHCP options   RFC 951: Bootstrap protocol (BOOTP)   Steven M. Glass, “Use of DHCP in Mobile IP,” 2000, dhcpinmip/index.htm   Charles Perkins, “Mobile IP”, Addison Wesley, 1998   Other RFCs: 1533, 1541, 1542, 2132