; 1 DHCP configuration
Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out
Your Federal Quarterly Tax Payments are due April 15th Get Help Now >>

1 DHCP configuration

VIEWS: 27 PAGES: 3

Dynamic Host Configuration Protocol (DHCP), its predecessor is BOOTP. BOOTP was originally used for the host to connect diskless network above: Network host instead of using the BOOT ROM disk, and starting the network connection, BOOTP, you can automatically set up for those who host TCP / IP environment. However BOOTP has one drawback: you must first obtain pre-set the hardware address of the client, and, with the corresponding IP is static. In other words,, BOOTP is the lack of "dynamic" IP if limited resources environment, BOOTP in-one correspondence will cause a very considerable waste. DHCP can be said to be an enhanced version of BOOTP, which are divided into two parts: a server-side, while the other is the client. All of the IP network settings by DHCP servers centrally manage data and handle the client's DHCP request; the client will be allocated from the server down using the IP environment data. Compared to BOOTP, DHCP, through "lease" concept, effective and dynamic allocation of the client TCP / IP settings, and, as a compatible consideration, DHCP also fully take care of the needs of the BOOTP Client. First, the distribution of the form of DHCP, DHCP must be at least one working in the network above, it will monitor the network's DHCP request, and consultation with the client TCP / IP settings for the environment.

More Info
  • pg 1
									1      DHCP configuration
This section describes configuration of DHCP server. DHCP stands for Dynamic
Host Configuration Protocol. It allows central storage and retrieval of client con-
figuration information including IP address, net mask, default gateway, DNS server
address and others.

1.1      Benefits of DHCP
     • centralized management of client specific configuration
     • temporary leasing of the client IP address
     • widely supported by most operating systems including most Unix systems and
       even MS Windows

1.2      Installing DHCP server
The Linux kernel must be compiled with CONFIG_PACKET and CONFIG_FILTER option
to successfully run DHCP server. This requirement is met by default RedHat’s
kernels.
   Most Linux distributions includes free DHCP server made by Internet Software
Consortium1 . Installation looks as follows in RedHat 6.1:

# rpm -Uvh dhcp-2.0-3.i386.rpm
# # Create empty database of leased IP address
# touch /var/state/dhcp/dhcpd.leases

  Also check that DHCP server is ran on bootup using /usr/sbin/ntsysv com-
mand.

1.3      Configuring DHCP server
The DHCP server does not run “out of the box”. There is need to setup /etc/dhcpd.conf
configuration file. You should know at least this information to configure DHCP
server:
      Property                          Example
      subnet IP address                 192.168.1.0
      subnet mask                       255.255.255.0
      default gateway(s)                192.168.1.1
      DNS server                        192.168.1.2
      your DNS domain                   domain.com
      range for dynamic IP addresses 192.168.1.128–192.168.1.254
    Optionally you would make list of local computers, that will have assigned static
IP address (useful for some servers etc.). You may obtain their HW addresses later
(if you lookup their IP address and HW address in /var/log/messages).
    There already exists simple template in /usr/doc/dhcp-2.0/dhcpd.conf.sample.
Copy that file into /etc/dhcpd.conf and make required changes. Here is brief ex-
ample for our sample data:


# simple configuration
subnet 192.168.1.0 netmask 255.255.255.0 {
# --- default gateway
    1 http://www.isc.org




                                          1
        option routers                      192.168.1.1;
        option subnet-mask                  255.255.255.0;

#       NIS domain is for Sun’s Network Infomation Services (NIS), optional

        option nis-domain                   "domain.com";
        option domain-name                  "domain.com";
        option domain-name-servers          192.168.1.2;

        range dynamic-bootp 192.168.1.128 192.168.1.254;
        default-lease-time 21600;
        max-lease-time 43200;

# here is list of static IP address hosts

# static host: server1.domain.com
        host server1 {
# next-server - "upload" file server
                next-server 192.168.1.1
# hw address (MAC address)
                hardware ethernet 12:34:56:78:9A:BC;
# static IP address
                fixed-address 192.168.1.11;
        }
}

1.4   Running DHCP server on single interface
If you want to provide DHCP server for specific subnet on specific netcard (for
example eth1) change the “daemon” line in /etc/rc.d/init.d/dhcpd to:

        daemon /usr/sbin/dhcpd eth1

1.5   Configuring DHCP clients (RedHat 6.x)
Use either linuxconf or make /etc/sysconfig/network-scripts/ifcfg-eth0 file
like this:
DEVICE="eth0"
BOOTPROTO="dhcp"
IPADDR=""
NETMASK=""
ONBOOT="yes"
IPXNETNUM_802_2=""
IPXPRIMARY_802_2="no"
IPXACTIVE_802_2="no"
IPXNETNUM_802_3=""
IPXPRIMARY_802_3="no"
IPXACTIVE_802_3="no"
IPXNETNUM_ETHERII=""
IPXPRIMARY_ETHERII="no"
IPXACTIVE_ETHERII="no"
IPXNETNUM_SNAP=""
IPXPRIMARY_SNAP="no"
IPXACTIVE_SNAP="no"

                                     2
Mandatory are the 5 top lines.




                                 3

								
To top