Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— 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 1.Client broadcasts on 255.255.255.255 a DHCPDISCOVER message using destination server port 67. 2.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. 3.Client chooses one of the offers and sends DHCPREQUEST to the selected server. 4.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. 5.At the 50% of lease period expiration time, client sends a DHCPREQUEST to request renewal. 6.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. 7.If no server responds with anything in step 6, client sends another DHCPREQUEST at 87.5% time of the original lease. 8.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

7 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

8 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. Tag LengthValue For example: TagLengthValue 5311DHCPDISCOVER 5312DHCPOFFER 5313DHCPREQUEST 5314DHCPDECLINE 5315DHCPACK 5316DHCPNACK 5317DHCPRELEASE

9 Tag Name Length valueMeaning 0 Pad 0None 1 Subnet Mask 4Subnet Mask Value 3 Gateways NN/4 Different Gateway addresses 6 Domain ServerNN/4 Different DNS Server addresses 255 End0None A few more important options values:


Download ppt "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."

Similar presentations


Ads by Google