Rhce dhcp Configuration Analysis

Source: Internet
Author: User

The content of DHCP configuration varies slightly in different systems. Here we will explain the content of rhce dhcp configuration. It mainly consists of five sections, which will be helpful to you.

Rhce dhcp configuration 1. required configuration file

1. Red Hat Enterprise Linux CD 4)

2./usr/share/doc/dhcp-3.0.1/dhcpd. conf. sample // DHCP configuration file template, the file will automatically appear after installation, the file does not need to be configured.

3. /etc/dhcpd. conf // DHCP configuration file. The default system does not have this file. You must use the cp command to copy the template file and name it "dhcpd. conf command: cp/usr/share/doc/dhcp-3.0.1/dhcpd. conf. sample/etc/dhcpd. conf

Rhce dhcp configuration 2. configuration process

1. Install DHCP

# Rpm-qa | grep dhcp // check whether DHCP is installed. skip this step to perform step 2.

# Mount/media/cdrom // attach a cd

# Cd/media/cdrom/RedHat/RPMS // enter the cd directory

# Rpm-ivh dhcp-3.0.1-58.EL4.i386.rpm // install the desired RPM package

# Cd; eject // The disc is displayed.

2. # cat/usr/share/doc/dhcp-3.0.1/dhcpd. conf. sample // view the template for the DHCP configuration file

3. # cp/usr/share/doc/dhcp-3.0.1/dhcpd. conf. sample/etc/dhcpd. conf // copy the template file through cp and name it "dhcpd. conf"

4. Configure the dhcpd. conf file

Ddns-update-style interim; // configure the use of excessive DHCP-DNS interactive updates

Ignore client-updates; // ignore client updates

Subnet 192.168.3.0 netmask 255.255.255.0 {// set the subnet Declaration

#--Default gateway

Option routers 192.168.3.1 // set the default gateway for the DHCP Client

Option subnet-mask subnet mask 255.255.0; // set the subnet mask for the DHCP Client

Option nis-domain "fengzl.com"; // sets the NIS domain for the DHCP Client

Option domain-name "fengzl.com"; // sets the DNS domain for the DHCP Client

Option domain-name-servers 192.168.3.1; // set the DNS address for the DHCP Client

Option time-offset-18000; # Eastern Standard Time // sets the offset time s from Greenwich Mean Time)

# Option ntp-servers 192.168.1.1; // set the IP address of the server for the DHCP Client's Network Time

# Option netbios-name-servers 192.168.1.1; // set the Netbios address for the DHCP Client

# --- Selects point-to-point node (default is hybrid). Don't change this

# -- You understand Netbios very well

# Option netbios-node-type 2;

Range dynaic-bootp 192.168.3.1 192.168.3.200; // you can specify an address pool.

Default-lease-time 21600; // set the default address lease period (s) for the DHCP Client)

Max-lease-time 43200; // sets the longest address lease period (s) for the DHCP Client)

# We want the nameserver to appear at a fixcd address

# Host ns {// set host Declaration

# Nest-server marvin.redhat.com; // you can specify the host name that is installed on the server from the boot file for diskless workstation.

# Hardware Ethernet 12: 34: 56: 78: AB: CD; // specify the MAC address of the DHCP Client

# Fixed-address 207.175.42.154; // assign a fixed IP address to the specified MAC address

#}

}

Rhce dhcp configuration 3. DHCP lease file (dhcpd. leases)

To run the DHCP server, you also need a client lease database file:

/Var/lib/dhcp/dhcpd. leases this file is initially empty and does not require manual configuration by the Administrator. However, the administrator can view this file to view the running status of the DHCP server. The file contains the lease statement. Each time a lease is obtained, updated, or released, its new value is recorded at the end of the file.

Note: The time record of dhcpd. leases adopts GMT Greenwich mean time, instead of the local time zone. You need to check that the GMT time uses date-u.

Rhce dhcp configuration 4. Start DHCP

1. service dhcpd start // start DHCP

2. service dhcpd stop // stop DHCP

3. service dhcpd restart // restart DHCP

4. Start the DHCP server for the specified network interface:

Echo "DHCPDARGS = eth ?" >/Etc/sysconfig/dhcpd

Eth? Is a network interface, such as eth0, eth1, eth0: 1 ......

Rhce dhcp configuration 5. Summary

The above are common DHCP configurations. In actual DHCP Application, some policy issues related to IP Address Allocation should also be taken into account. At the same time, to ensure the robustness of the network, at least two DHCP servers must work together, if one fails, the other can continue to serve the DHCP client. However, currently, the DHCP protocol does not allow two DHCP servers to work collaboratively, and the uniqueness of the allocated address cannot be guaranteed, therefore, the allocable address space of the two DHCP servers must be adjusted, and there cannot be duplicate IP addresses.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.