Presentation is loading. Please wait.

Presentation is loading. Please wait.

Guide to TCP/IP, Second Edition1 Guide To TCP/IP, Second Edition Chapter 8 The Dynamic Host Configuration Protocol (DHCP)

Similar presentations


Presentation on theme: "Guide to TCP/IP, Second Edition1 Guide To TCP/IP, Second Edition Chapter 8 The Dynamic Host Configuration Protocol (DHCP)"— Presentation transcript:

1 Guide to TCP/IP, Second Edition1 Guide To TCP/IP, Second Edition Chapter 8 The Dynamic Host Configuration Protocol (DHCP)

2 Guide to TCP/IP, Second Edition2 Objectives Understand the basic services DHCP offers to its clients; explain DHCP’s background, history, and origins; discuss DHCP leases; and describe the basic software components that permit DHCP to function Understand the specifics of IP address management using DHCP Explain the DHCP Discovery, renewal, and release processes

3 Guide to TCP/IP, Second Edition3 Objectives (cont.) Understand the basic DHCP packet structure and types of DHCP messages in use Describe broadcast and unicast addressing, and understand why a DHCP server uses one over the other Describe relay agent communications Discuss Microsoft DHCP scopes and classes

4 Guide to TCP/IP, Second Edition4 Introducing DHCP Provides a way for client computer to request an IP address DHCP delivers the necessary configuration information –IP address –Subnet mask –IP Gateways –Address for DNS servers –Address for WINS servers

5 Guide to TCP/IP, Second Edition5 Introducing DHCP (cont.) Administer client IP address assignments and configuration data from a single, centralized server Address pool or address scope One or more range of IP address Exclude an address or range of address Address lease

6 Guide to TCP/IP, Second Edition6 How DHCP Works Client perspective on DHCP –Client is configured to “Obtain an IP address automatically” –At boot-up the client broadcasts DHCP address request –DHCP servers reply offers an address lease –Client accepts address lease offer –Server offers an IP address with a lease time limit –Half the lease time the client attempts to renew lease

7 Guide to TCP/IP, Second Edition7 How DHCP Works (cont.)

8 Guide to TCP/IP, Second Edition8 The Role Of Leases Length of leases vary One to three weeks in length are typical One to three days for networks with temps or roving workers Four to eight hours are common on ISP networks

9 Guide to TCP/IP, Second Edition9 DHCP Software Elements Three elements to DHCP software –DHCP client Built-in DHCP client software in Windows and UNIX operating systems –DHCP Server Manages address pools and related configuration of Windows and UNIX servers –DHCP relay agent Intercepts address requests Repackages requests and unicasts to a DHCP server

10 Guide to TCP/IP, Second Edition10 DHCP Lease Types Two types of address leases –Manual address lease –Dynamic address lease Typical IP addressing schemes –Servers have fixed IP addresses –Routers have fixed IP addresses –Clients use dynamic IP Addresses

11 Guide to TCP/IP, Second Edition11 More About DHCP Leases IPCONFIG command supports the /release and /renew switches How DHCP integrates with DSN –Server address are advertised using DNS –DNS is not a dynamic environment –Client address are resolved when using email addresses User@domain.name

12 Guide to TCP/IP, Second Edition12 Understanding IP Address Management With DHCP Booting for the first time or after a lease expires –DHCP Discovery Discovery broadcast –Renewal process Rebinding process Client must completely release its address if rebinding fails Servers and clients use PING and ARP as error prevention methods

13 Guide to TCP/IP, Second Edition13 The Standard Address Discovery Process DHCP Discovery process uses four packets –DHCP Discover packet –DHCP Offer packet –DHCP Request packet –DHCP Acknowledgment packet

14 Guide to TCP/IP, Second Edition14 The Standard Address Discovery Process (cont.)

15 Guide to TCP/IP, Second Edition15 The Discover Packet Client broadcasts a Discover Packet –Client hardware address –Source IP address 0.0.0.0 –Destination address 255.255.255.255 –Preferred address –Message Type value 1 –Client Identifier –DHCP options

16 Guide to TCP/IP, Second Edition16 The Discover Packet (cont.) DHCP options –Option 1: Client’s subnet mask – Option 3: Routers on the client’s subnet – Option 6: Domain name servers – Option 15: Domain name – Option 44: NetBIOS over TCP/IP name servers – Option 46: NetBIOS over TCP/IP node type – Option 47: NetBIOS over TCP/IP scope – Option 57: Maximum DHCP message size – Option 255: End of options

17 Guide to TCP/IP, Second Edition17 The Discover Packet (cont.)

18 Guide to TCP/IP, Second Edition18 The Offer Packet DHCP server sends the Offer packet –An IP address is offered –Packet is sent by unicast

19 Guide to TCP/IP, Second Edition19 The Offer Packet (cont.)

20 Guide to TCP/IP, Second Edition20 The Request Packet DHCP Request packet DHCP Decline packet

21 Guide to TCP/IP, Second Edition21 The Request Packet (cont.)

22 Guide to TCP/IP, Second Edition22 The Acknowledgment Packet Sent from Server Contains configuration options requested by client Duplicate IP address test

23 Guide to TCP/IP, Second Edition23 The Acknowledgment Packet (cont.)

24 Guide to TCP/IP, Second Edition24 The Renewal Process The Renewal Time (T1) –Renewal packet is unicast directly to the DHCP server 0.5 * duration_or_lease (i.e., lease time) The rebinding Time (T2) –Broadcast a renewal request to any listening DHCP servers 0.875 * duration_of_lease Continues rebinding process until one minute from the lease expiration time Client releases it address if unsuccessful and reinitializes to start DHCP Discovery process

25 Guide to TCP/IP, Second Edition25 The Renewal Process (cont.)

26 Guide to TCP/IP, Second Edition26 The Renewal Process (cont.)

27 Guide to TCP/IP, Second Edition27 The DHCP Address Release Process DHCP Release packet Sent over UDP DHCP server does not send acknowledgements

28 Guide to TCP/IP, Second Edition28 DHCP Packet Structures DHCP packet fields –Operation Code (OPCODE) Field DHCP Request (0x01) DHCP Reply (0x02) –Hardware Type Field –Hardware Length Field –Hops Field –Transaction ID Number Field

29 Guide to TCP/IP, Second Edition29 DHCP Packet Structures (cont.) DHCP packet fields (cont.) –Seconds Since Boot Field –Flags Field –Client IP Address Field –Your IP Address Field –Server IP Address Field –Gateway IP Address Field

30 Guide to TCP/IP, Second Edition30 DHCP Packet Structures (cont.) DHCP packet fields (cont.) –Client Hardware Address Field –Server Host Name Field –Boot File Field DHCP Options –Expand the data that is included in the packet –DHCP Option 53: Message Type Required in all DHCP packets

31 Guide to TCP/IP, Second Edition31 DHCP Packet Structures (cont.)

32 Guide to TCP/IP, Second Edition32 DHCP Packet Structures (cont.)

33 Guide to TCP/IP, Second Edition33 Broadcast And Unicast in DHCP

34 Guide to TCP/IP, Second Edition34 Communications With A DHCP Relay Agent Routers do not forward broadcasts Relay agents accepts discovery broadcasts and unicasts them to the DHCP server Relay agent function is usually enabled on a router

35 Guide to TCP/IP, Second Edition35 Communications With A DHCP Relay Agent (cont.)

36 Guide to TCP/IP, Second Edition36 Communications With A DHCP Relay Agent (cont.)

37 Guide to TCP/IP, Second Edition37 Microsoft DHCP Scopes And Classes Scope is a range of consecutive IP addresses Superscope is a group of non-consecutive IP address –A collection of scopes

38 Guide to TCP/IP, Second Edition38 Troubleshooting DHCP Troubleshoot DHCP with an analyzer IPCONFIG utility –ipconfig /release –ipconfig /renew

39 Guide to TCP/IP, Second Edition39 Troubleshooting DHCP (cont.)

40 Guide to TCP/IP, Second Edition40 Chapter Summary DHCP provides a way for computers to obtain usable, unique IP addresses and necessary TCP/IP configurations even when no IP addresses were assigned to those machines As long as a DHCP server or relay is available on the cable segment where an initial DHCP Request message is broadcast, the DHCP service makes it easy and automatic to include computers on a TCP/IP network

41 Guide to TCP/IP, Second Edition41 Chapter Summary (cont.) From the administrative side, DHCP makes is easy to define and manage pools of IP addresses, which Microsoft calls a scope when referring to a set of IP addresses under DHCP’s management, and a superscope when referring to a collection of IP address scopes

42 Guide to TCP/IP, Second Edition42 Chapter Summary (cont.) DHCP’s origins lie in an earlier TCP/IP Application layer protocol, called BOOTP, used to enable diskless workstations to boot remotely across a network Basic BOOTP and DHCP formats are entirely compatible, so that by configuring a router to forward BOOTP, it also forwards DHCP packets

43 Guide to TCP/IP, Second Edition43 Chapter Summary (cont.) DHCP supports two types of address allocation: manual, in which administrators directly manage all addresses; and dynamic, in which addresses are allocated with explicit expiration intervals called leases Many of DHCP’s functions and messages relate to obtaining, renewing, and releasing dynamic address leases, primarily for client machines

44 Guide to TCP/IP, Second Edition44 Chapter Summary (cont.) When a DHCP client starts, it begins the DHCP Discovery process, during which the client receives an IP address and lease In the middle of the lease time, the client starts a renewal process to determine if it can keep the address past the lease time If not, the client releases its IP address and starts the Discovery process over

45 Guide to TCP/IP, Second Edition45 Chapter Summary (cont.) DHCP supports a wide variety of message types and options, but only Message Type 53 (DHCP Message) is mandatory for any given DHCP message Because DHCP can ferry a surprisingly large range of configuration information (including all kinds of network services, such as e-mail and NetBIOS over TCP/IP), the protocol makes use of several message options A protocol analyzer is especially effective when diagnosing DHCP difficulties, particularly those related to the DHCP boot sequence


Download ppt "Guide to TCP/IP, Second Edition1 Guide To TCP/IP, Second Edition Chapter 8 The Dynamic Host Configuration Protocol (DHCP)"

Similar presentations


Ads by Google