Presentation is loading. Please wait.

Presentation is loading. Please wait.

DHCP Dynamic Host Configuration Protocol. Introduction Client administration:  IP address management: They need to ease the process of joining the network.

Similar presentations


Presentation on theme: "DHCP Dynamic Host Configuration Protocol. Introduction Client administration:  IP address management: They need to ease the process of joining the network."— Presentation transcript:

1 DHCP Dynamic Host Configuration Protocol

2 Introduction Client administration:  IP address management: They need to ease the process of joining the network and they do not want users to do any special configuration (DHCP) They want to network boot their workstations  i.e. Diskless workstations or remote OS installation (acquiring the network setting during boot process) Solution: Deploy a DHCP server  Machine names management: They need to be able to name machines and access them by names instead of IP addresses Solution: Deploy A DNS server So we discuss on DHCP and DNS in this session

3 DHCP Provides configuration parameters specific to the DHCP client host requesting, information required by the client host to participate on an IP network Method of IP allocation  Manual Only requesting clients with a MAC address listed in the table (MAC- IP pairs) get the IP address according to the table  Automatic DHCP server permanently assigns to a requesting client a free IP- address from a range given by the administrator  Dynamic The only method which provides dynamic re-use of IP addresses The request-and-grant process uses a lease concept with a controllable time period.

4 DHCP cont. DHCP server can provide optional configuration  e.g. Subnet Mask, Router, Name Server, …  RFC 2132 defines DHCP options Usage RFC 2132 DHCP relay agent (mostly in network routers/high-end switches)  Relays DHCP Discover broadcasts from a LAN without DHCP to a network which has one Usage  US Cable Internet providers use DHCP DSL providers prefer PPPoE  UK Many broadband ISP networks use DHCP XDSL providers use infinite lease  Semi-static IPs  Office networks, public internet access  Places where there are mobile nodes that want to access the net

5 DHCP Implementations Microsoft introduced DHCP on their NT server with Windows NT 3.5 in late 1994  DHCP did not originate from Microsoft Internet Software Consortium published DHCP for Unix variants  Version 1.0.0 released on December 6, 1997  Version 2.0 on June, 1999 – A more RFC-compliant one Novell included a DHCP server in NetWare OS since v. 5, 1999  It integrates with Novell eDirectory Weird solutions introducing a variety of multiplatform DHCP implementations since 1997 Cisco since Cisco IOS 12.0 in February 1999 Sun added DHCP support in Solaris 8, July 2001

6 DHCP Packet

7 DHCP Message Field Description Operation Code Specifies the type of the Dynamic Host Configuration Protocol (DHCP) message. Set to 1 in messages sent by a client (requests) and 2 in messages sent by a server (response). Hardware Type Specifies the network LAN architecture. For example, the ethernet type is specified when htype is set to 1. Hardware Address Length Link-layer address length (in bytes); defines the length of hardware address in the chaddr field. For Ethernet, this value is 6.hardware address HopsNumber of relay agents that have forwarded this message. Transaction identifier Used by clients to match responses from servers with previously transmitted requests. seconds Elapsed time (in seconds) since the client began theDynamic Host Configuration Protocol (DHCP) process. Flags Flags field is called the broadcast bit, can be set to 1 to indicate that messages to the client must be broadcast ciaddr Client’s IP address; set by the client when the client has confirmed that its IP address is valid.IP address

8 DHCP Message Field Description yiaddr Client’s IP address; set by the server to inform the client of the client’s IP address. siaddr IP address of the next server for the client to use in the configuration process (for example, the server to contact for TFTP download of an operating system kernel). giaddr Relay agent (gateway) IP address; filled in by the relay agent with the address of the interface through which Dynamic Host Configuration Protocol (DHCP) message was received. chaddrClient’s hardware address. (Layer 2 address) snameName of the next server for client to use in the configuration process. file Name of the file for the client to request from the next server (for example the name of the file that contains the operating system for this client).

9 Pros and Cons Pros  Simplifies the task of assigning IP numbers to each machine in the network makes easy to add, remove or move a host can assign defaults: default gateway, domain name, DNS server, WINS server (if any). ability to have fewer IP# than hosts Cons  if DHCP server is down, all hosts are down hard to keep information on free and used IP #.  DHCP is an unauthenticated protocol.

10 DHCP Message Exchange Discover: client tries to find out what servers are out there. Offer: those servers that can provide this service respond Request: client selects one offer and makes a request ACK: server acks the request When 50% of the lease period is expired, client asks for a renewal. If ACK received, reset timer. If NAK, go back to initializing state.

11 DHCP Anatomy Uses the same IANA assigned ports as BOOTP  67/udp for the server, 68/udp for the client DHCP Messages  Discover Client broadcasts on the local physical subnet to find servers UDP packet (broadcast dest. 255.255.255.255)  Also request last-known IP address (optional parameter)  Offer Server determines the configuration based on the client’s MAC addr. Server specifies the IP address and put optional parameters  Request Client selects a configuration out the DHCP Offer packet and broadcasts it again  Acknowledge Server acknowledges the request and sends the ack to the client

12 DHCP Anatomy cont.  Inform Client requests more information than the server sent with the DHCPACK, or to repeat data for a particular application (e.g. to obtain web proxy settings by a browser)  Release Client requests the server to release the DHCP and the client unconfigures its IP address Sending this message is not mandatory (unplug or …)

13 BOOTP BOOTstrap Protocol (RFC 951) UDP Used to obtain IP address automatically  Usually in booting process of computers or OSs Diskless workstations Historically used for UNIX-like diskless workstations  Also obtains the locations of the boot image Also can be used for installing a pre-configured OS Protocol became embedded in the BIOS of some NICs  Allowing direct network booting without need for a floppy

14 BOOTP cont. Recently used for booting a Windows OS in diskless standalone media center PCs DHCP is a more advanced protocol base on BOOTP  Far more complex to implement than BOOTP  Most DHCP servers also offer BOOTP support  Duration based leases is the fundamental addition in DHCP Dynamic in DHCP is for this

15 BOOTP cont. BOOTP places its packet inside a UDP packet (note that BOOTP is an application layer program). The BOOTP server issues a passive open command on UDP port number 67 and waits for a client. A booted client issues an active open command on port number 68. The message is encapsulated in a UDP user datagram and then in an IP packet. In the IP packet the source address is all 0s and the destination address is all 1s.

16 BOOTP When client and server are on different networks, we need a relay agent, because client does not know IP address of server, and a limited broadcast address gets dumped by the local router. Relay agent knows the IP address of the server


Download ppt "DHCP Dynamic Host Configuration Protocol. Introduction Client administration:  IP address management: They need to ease the process of joining the network."

Similar presentations


Ads by Google