Preparing a network node for internet access.

* Practice of hard-coding a client's IP.

Bootp and DHCP  # DHCP and bootp are used interchangably.

Check out http://www.thegeekstuff.com/2013/03/dhcp-basics/

When a system 1st comes up, it must discover its own IP and the IP of 
  the DHCP and DNS servers.

  While this information can be stored locally, it is  more commonly
    requested from a server.

  Getting an IP.
    Static IP - this is an IP assigned to a system's network card.
      Any time the system on-line, the network card should always be 
      assigned the same. It is critical that the system does not move
      between networks, so we're talking work stations. 
   
      Primariily used for systems that need to be contacted by other systems.

    Dynamic IP - this is a random IP assigned to a system's network card
      when requested.  * must be valid for the Domain and sub-net.
 
      Like a library book, it is essentially checked out.  When the system 
      is shut down, the IP can be used by a different system on the same
      local network.

      Often a system is given a lease on a particular IP for a period of 
      time, e.g 72 hr., to reclaim IP. 

      Systems usually will renew their current lease at mid-point of current
      lease period. 

  Using DHCP services to retrieve an IP>
    Like the TCP/IP protocol, Ethernet has a "broadcast" frame that
      can be viewed by all nodes on the local network. 

    The client node generates a broadcast UDP/IP packet. 
      The packet contains:
        the source-IP of 0.0.0.0 or a previously known IP,
        the target-IP of 255.255.255.255 and port 67(DHCP),
        and a random number that can be used to help identify 
          a response.

      Server : UDP port 67 (listens) 
      Client : UDP port 68 (listens) 
       (well known ports)
 
    This packet is put in an Ethernet frame with the client node's MAC@ 
      and the broadcast MAC@ which gives all nodes permission to listen.

    If appropriate server exists on the local network, it will recognize 
      (hear) the request on the port 67 and return a response targeting 
      port 68.

      If a non-zero client IP given, it will attempt direct contact.
      Otherwise it will use the broadcast IP.

      The packet sent also contains the MAC@ of the client and the random
        number it generated as confirmation of correct target system.

    If a local DHCP service is not available, another node on the local 
      sub-net (usually the gateway node) will be running a relay service 
      listening on port 67 and will pass the request along to another 
      relay or the DHCP server. 

    The bootp relay makes minor adjustments to the request packet so the
      response can be properly routed back to the client.

    * under the old(est) ARP/RARP the IP configuration service had to exist 
      on the same sub-net as the querying system.
   
    The bootp/DHCP server can also provide the sub-net's default gateway IP, 
      the IP[s] of available DNS servers, the sub-net mask, and other info.

    The bootp server returns a reply with the assigned IP and additional
      information.

    If the client accepts the assigned IP, it must reply to the server.

    It may reject or ignore the reply if has gotten an answer from another
      boot/DHCP server.

    If it has accepted the assigned IP, the server will send a final 
      acknowledgement and only then can the client use the IP.

    This is generally a single occurrence for a particular system when it 
      is first powered up. Once it has a valid DHCP host id, it
      can target the correct node for any additional requests.

      On our systems, look at /etc/dhcp/dhclient.conf

      request subnet-mask, broadcast-address, time-offset, routers,
          domain-name, domain-name-servers, domain-search, host-name,
          dhcp6.name-servers, dhcp6.domain-search,
          netbios-name-servers, netbios-scope, interface-mtu,
          rfc3442-classless-static-routes, ntp-servers;

     man page : dhclient.conf

Request/Reply Packet structure