Fundamentals of communication and networkingː Dynamic Host Configuration Protocol (DHCP)

From Wikibooks, open books for an open world
Jump to navigation Jump to search

PAPER 2 - ⇑ Fundamentals of communication and networking ⇑

← Public and private IP addresses Dynamic Host Configuration Protocol (DHCP) Network Address Translation (NAT) →

DHCP (Dynamic Host Configuration Protocol) is a method of automatically allocating IP addresses to machines on a 'need to use' basis. Rather than have every machine in the network given a fixed IP address we allocate IP addresses to those machines as and when they connect. The key word in DHCP is "dynamic." - instead of having just one fixed, specific IP address, most computers will be assigned one that is available from a subnet or "pool" that is assigned to the network.

Stages of DHCP[edit | edit source]

Stage 1[edit | edit source]

When a host wants to join a DHCP network it will broadcast a DHCP discovery message over the network. At this point the host doesn't know the IP address or subnet of the DHCP host, so it will broadcast to all the nodes on the network

Stage 2[edit | edit source]

The DHCP server will respond to the message that the new node is broadcasting and send a reply containing a proposed IP address, network mask, lease time and a transaction ID. It would then record this information in its own datastore.

Stage 3[edit | edit source]

The new node must accept this offer

Stage 4[edit | edit source]

The new node and DHCP server then confirms the requested parameters

Advantages of DHCP[edit | edit source]

  • It is possible to have more machines than available IP addresses on the assumption that everyone wont be using the network at once.
  • We don't have to manually assign IP addresses and so saves time and avoids the possibility of accidentally assigning the same IP address twice.

Disadvantages of DHCP[edit | edit source]

  • Tracing internet activity may be difficult as the same machine may have two or more different IP addresses over a period of time.
  • Not having a static IP means computers with DHCP cannot be used as servers as their IP will change