1 / 9

Dynamic Host Configuration Protocol (DHCP)

Dynamic Host Configuration Protocol (DHCP). DHCP provides a temporary IP address for a limited period of time

Download Presentation

Dynamic Host Configuration Protocol (DHCP)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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 bindings for physical addresses (MAC) with IP addresses. Second one has a list of available IP addresses that may be assigned for a period of time. Client request to DHCP server causes server to see if MAC is in static database. If so assign the static IP entry to client. If not, choose from available pool. Assigned addresses are temporary (leased). When client’s lease expires, must renew or stop using. Source: TCP/IP Protocol Suite by Forouzan For additional information see: http://www.dhcp.org/

  2. Figure 17-6: Part I Exchanging messages

  3. Figure 17-6: Part II Exchanging messages

  4. DHCP Operation • Client broadcasts on 255.255.255.255 a DHCPDISCOVER message using destination server port 67. • Server(s) respond with DHCPOFFER message. Contains IP address, duration of lease which by default is one hour.If client does not receive a DHCPOFFER, attempts again up to 4 more attempts in two second intervals, then waits 5 minutes to try again. • Client chooses one of the offers and sends DHCPREQUEST to the selected server. • Server responds with DHCPACK and creates a binding between MAC address and the IP address offered. Client has rights to that IP address until lease expires. • At the 50% of lease period expiration time, client sends a DHCPREQUEST to request renewal. • If server responds with DHCPACK, client is good to go and resets client timer. If server denies request with DHCPNACK, client must immediately stop using that IP address and try to find another server. • If no server responds with anything in step 6, client sends another DHCPREQUEST at 87.5% time of the original lease. • If no server response, client uses IP until lease time expires and then starts from scratch. Client sends DHCPRELEASE message to the mean server. • Aside: Server cannot initiate early lease termination unless client sends a DHCPREQUEST.

  5. Figure 17-5 DHCP transition diagram

  6. DHCP Packet Details Operation Code: One byte field defines type of DHCP packet: Request = 1, Reply = 2 Hardware Type: One byte field defining physical network: Ethernet = 1 Hardware Length: One byte field specifying length of physical address: Ethernet = 6 Hop Count: One byte field maximum hops packet can go. Client sets this to 0 Transaction ID: Four Byte field used by client to make sure server is talking to this client and not another simultaneous request’s response Number of seconds: two byte field number of seconds since client became alive Flag: One bit flag allows client to force server to broadcast reply instead of sending reply to a specific IP address. If client does not know its IP address yet, it wants a broadcast reply from server. Client IP address: Four byte field of client’s IP address. If unknown is zero. Your IP address: Four byte field server fills in to tell client the clients IP address Server IP address: four byte field. Server responding fills in it’s own IP Gateway IP Address: Four byte field containing IP address of router (filled in by server) Client Hardware Address: In our case 6 byte Ethernet MAC of client sending. Can get this from Ethernet frame source MAC but this makes life easy for lazy server

  7. DHCP Packet Continued Server Name: Optional 64 byte field filled in by server contains the domain name of the server Boot File Name: Optional 128 byte field filled in by server containing full pathname for boot file when legacy BOOTP protocol is being used instead of DHCP. DHCP is backward compatible with BOOTP (Aside: Bootstrap Protocol provides IP address, subnet mask, IP address of a router, IP address of a name server to a diskless computer). Option: Optional 64 byte field. Options consist of three fields: One byte Tag field, One byte length field for just this particular option, a variable length value field. Length Value Tag • For example: • Tag Length Value • 1 1 DHCPDISCOVER • 53 1 2 DHCPOFFER • 53 1 3 DHCPREQUEST • 53 1 4 DHCPDECLINE • 53 1 5 DHCPACK • 1 6 DHCPNACK • 53 1 7 DHCPRELEASE

  8. A few more important options values: Tag Name Length value Meaning 0 Pad 0 None 1 Subnet Mask 4 Subnet Mask Value 3 Gateways N N/4 Different Gateway addresses 6 Domain Server N N/4 Different DNS Server addresses 255 End 0 None

More Related