Open Source Institute | CyberArmy Intelligence & Security | CyberArmy Services & Projects

[TCP/IP] DHCP


[Reply] [View by Thread] [Help]
[Back To Article Discussion Forum]

Posted by Author MaDvLaD On 2007-09-30 21:30:36




View and vote on the article here: DHCP


DHCP

Category
TCP/IP
Summary
DHCP
Body
Introduction

TCP/IP is actually the most widely used networking protocol, but it has no inbuilt method to automatically tell a new network computer which IP address and network mask to use and where to find services like DNS, routing, and so forth. On small networks, the administrator may be able to manually assign this information to each computer but what happens on a large network? That size of the task could make it impossible, and at the very least too time-consuming a task. Moreover, assigning values manually has the following disadvantages:
  • One single change in the network structure means changes to the settings of every computer
  • New machines can't connect immediately (i.e. LAN parties or laptops)
  • Accidentally assign the same IP address to more than one machineDHCP (Dynamic Host Configuration Protocol) is the solution to all of the above problems. It runs on one server that should always be reachable, and it can distribute all the network settings to the clients. The requirements for this service are:[list]
  • One server that is either always on or is started before the clients
  • A TCP/IP based network
  • Client(s) that support DHCP
Assuming the requirements are met, we will skip over installation -- if you are sufficiently skilled such that you are in a position to be installing DHCP in the first place, it is safe to assume you know how to go about getting the package and installing it properly. Let's move directly to configuration.

Configuration of the DHCP-Server

The configuration file dhcpd.conf is located in /etc. Here are the contents:
  ( 1) default-lease-time 86400;
  ( 2) max-lease-time 86400;
  ( 3) }
  ( 4) shared-network host.domain.com {
  ( 5) subnet 192.168.0.0 netmask 255.255.255.0 {
  ( 6) option domain-name "host.domain.com";
  ( 7) option time-servers 192.168.0.1;
  ( 8) option netbios-name-servers 192.168.0.1;
  ( 9) option domain-name-servers 192.168.0.1,212.185.252.136,62.225.251.16;
  (10) option subnet-mask 255.255.255.0;
  (11) range 192.168.0.2 192.168.0.30;
  (12) option broadcast-address 192.168.0.255;
  (13) option routers 192.168.0.1;
  (14) host r2d2 {
  (15) hardware ethernet 00:02:b3:8D:E9:A9;
  (16) fixed-address 192.168.0.2;
  (17) }
  (18) }
  (19) }
Description:

(01) and (02): Validity time of the leased IP addresses in seconds
(04): Name of the configuration (use of the DNS-name recommended)
(05): Subnet and netmask in which IP leasing should take place
(06): name of the DNS domain that is sent to the client
(07): Network Timeserver address (if available)
(08): WINS server addresses (if available)
(09): DNS server addresses (if available)
(10): Netmask
(11): Range of leasable IP addresses (The DHCP server itself should have a static address)
(12): The broadcast address (last IP of the network, usually ends in .255)
(13): Standard gateway for Internet access through a router
(14)-(17): extra configuration for hosts with static IPs (normally for servers)
(15): MAC address of the host
(16): the host's IP address
(18) and (19): don't forget the closing brackets

Client Configuration

TCP/IP is OS-independent, and almost every modern OS supports DHCP, but the way to activate DHCP varies from OS to OS. However you do it, you then need to make the network interfaces request the info from the DHCP server.


This article was imported from the CyberArmy University site. (original author: MaDvLaD)


There are no replies to this post yet.



Guest:
Subject:
Message:
Signature:
Optional Image Link:
http://

CyberArmy::Forum v0.6
Generated In 0.00533 seconds


About Us | Privacy Policy | Mission Statement | Help