DHCP Dynamic Host Configuration Protocol Introduction n Client

  • Slides: 16
Download presentation
DHCP Dynamic Host Configuration Protocol

DHCP Dynamic Host Configuration Protocol

Introduction n Client administration: q IP address management: n n They need to ease

Introduction n Client administration: q IP address management: n n 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 q n q Solution: Deploy a DHCP server Machine names management: n n n i. e. Diskless workstations or remote OS installation (acquiring the network setting during boot process) 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

DHCP n n Provides configuration parameters specific to the DHCP client host requesting, information

DHCP n n 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 q Manual n q Automatic n q Only requesting clients with a MAC address listed in the table (MACIP pairs) get the IP address according to the table DHCP server permanently assigns to a requesting client a free IPaddress from a range given by the administrator Dynamic n n 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.

DHCP cont. n n n DHCP server can provide optional configuration q e. g.

DHCP cont. n n n DHCP server can provide optional configuration q e. g. Subnet Mask, Router, Name Server, … q RFC 2132 defines DHCP options Usage DHCP relay agent (mostly in network routers/high-end switches) q Relays DHCP Discover broadcasts from a LAN without DHCP to a network which has one Usage q US n n q UK n n q q Cable Internet providers use DHCP DSL providers prefer PPPo. E 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

DHCP Implementations n n n Microsoft introduced DHCP on their NT server with Windows

DHCP Implementations n n n Microsoft introduced DHCP on their NT server with Windows NT 3. 5 in late 1994 q DHCP did not originate from Microsoft Internet Software Consortium published DHCP for Unix variants q Version 1. 0. 0 released on December 6, 1997 q Version 2. 0 on June, 1999 – A more RFC-compliant one Novell included a DHCP server in Net. Ware OS since v. 5, 1999 q It integrates with Novell e. Directory 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

DHCP Packet

DHCP Packet

DHCP Description Message Field Specifies the type of the Dynamic Host Configuration Protocol (DHCP)

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

DHCP Message Field yiaddr siaddr Description Client’s IP address; set by the server to

DHCP Message Field yiaddr siaddr Description Client’s IP address; set by the server to inform the client of the client’s 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. chaddr Client’s hardware address. (Layer 2 address) sname Name of the next server for client to use in the configuration process. 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). file

Pros and Cons n Pros q n Simplifies the task of assigning IP numbers

Pros and Cons n Pros q n 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 q q if DHCP server is down, all hosts are down hard to keep information on free and used IP #. DHCP is an unauthenticated protocol.

DHCP Message Exchange Discover: client tries to find out what servers are out there.

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.

DHCP Anatomy n n Uses the same IANA assigned ports as BOOTP q 67/udp

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

DHCP Anatomy cont. q Inform n q Client requests more information than the server

DHCP Anatomy cont. q Inform n q 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 n n Client requests the server to release the DHCP and the client unconfigures its IP address Sending this message is not mandatory (unplug or …)

BOOTP n n n BOOTstrap Protocol (RFC 951) UDP Used to obtain IP address

BOOTP n n n BOOTstrap Protocol (RFC 951) UDP Used to obtain IP address automatically q Usually in booting process of computers or OSs n n Historically used for UNIX-like diskless workstations q n n 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 q Allowing direct network booting without need for a floppy

BOOTP cont. n n Recently used for booting a Windows OS in diskless standalone

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

BOOTP cont. n n n BOOTP places its packet inside a UDP packet (note

BOOTP cont. n n n 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 0 s and the destination address is all 1 s.

BOOTP n When client and server are on different networks, we need a relay

BOOTP n 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