REDHAT dismounting DHCP

Source: Internet
Author: User
REDHAT dismounting DHCP-Linux Enterprise Application-Linux server application information. The following is a detailed description. Software Introduction: redhat 9.0 is used to configure a DHCP server
The configuration method is actually very simple !! But you need to pay attention to the following issues:
1. The dhcp Service cannot be used across network segments only for intranet use, but not for Internet use.
2. If a virtual machine is used for simulation, You need to disable the virtual dhcp.
3. Two dhcp servers are not allowed in one CIDR block. Otherwise, conflicts may fail to work properly.
In RH9, The dhcpd configuration file is:/etc/dhcpd. conf by default, this file does not exist, need to be created manually, The dhcp-3.0pl1-23.i386.rpm in the redhat installation disc
Run rpm-qa | grep dhcp to check whether dhcp is installed.
The output is as follows:
Dhcp-devel-3.0pl1-23
Dhcp-3.0pl1-23
Then input the rpm-ql dhcp-3.0pl1-23
Output:
/Etc/rc. d/init. d/dhcpd
/Etc/rc. d/init. d/dhcrelay
/Etc/sysconfig/dhcpd
/Etc/sysconfig/dhcrelay
/Usr/bin/omshell
/Usr/sbin/dhcpd
/Usr/sbin/dhcrelay
/Usr/share/doc/dhcp-3.0pl1
/Usr/share/doc/dhcp-3.0pl1/CHANGES
/Usr/share/doc/dhcp-3.0pl1/README
/Usr/share/doc/dhcp-3.0pl1/RELNOTES
/Usr/share/doc/dhcp-3.0pl1/dhcpd. conf. sample (this is the template file of dhcpd. conf)
/Usr/share/man/man1/omshell.1.gz
/Usr/share/man/man5/dhcp-eval.5.gz
/Usr/share/man/man5/dhcpd.conf.5.gz
/Usr/share/man/man5/dhcpd.leases.5.gz
/Usr/share/man/man8/dhcpd.8.gz
/Usr/share/man/man8/dhcrelay.8.gz
/Var/lib/dhcp
/Var/lib/dhcp/dhcpd. leases: some records of the ip dns allocated by the customer's MAC address can help find some problems in the Network)

If you use the source code package for installation, the addresses of some configuration files here will be different.
You can use the less command to view the template content.
# Less/usr/share/doc/dhcp-3.0pl1/dhcpd. conf. sample
For DHCP server configuration, We have to copy the configuration file template for modification.
The following is an example of an operation:
# Cd/etc
# Cp/usr/share/doc/dhcp-3.0pl1/dhcpd. conf. sample dhcp. conf // copy the profile template
# Vi/etc/dhcpd. conf // use vi to modify/etc/dhcpd. conf
# Cat/etc/dhcpd. conf // display the configuration file content
# The end of each line is;
Ddns-update-style interim;
Ignore client-updates;
Subnet 192.168.117.0 netmask 255.255.255.0 {// set the subnet Declaration
Option routers 192.168.117.2; // set the default gateway for the DHCP user
Option broadcast-address 192.168.117.255; // set the broadcast address for the customer
Option subnet-mask authorization limit 255.0; // sets a subnet flooding code for the customer
Option domain-name "77168.com"; // sets the DNS domain for the customer
Option domain-name-servers 192.168.117.154, 218.85.157.99; // set the DNS server address for the customer. If multiple DNS servers are used, separate them.
Option time-offset-18000;
Range dynamic-bootp 192.168.117.10 192.168.117.200; // you can specify an address pool.
Default-lease-time 21600; // set the default address lease period for the customer
Max-lease-time 43200; // sets the maximum address lease period for the customer
Group {
Host greenpig {// set host Declaration
Hardware ethernet 100: 0C: 29: 4F: 20: DC; // specify the customer's MAC address
Fixed-address 192.168.117.210; // assign a fixed IP address to the specified MAC address
}
}
Start the DHCP server:
# Service dhcpd start
DHCP customer preparation:
In LINUX, select the automatically obtained IP address settings in the graphic interface to use DHCP,
If the Windows client selects the single-host property of the INTERNET Protocol (TCP/IP), the client automatically obtains the IP address...
In linux, use netconfig to select dhcp.

Then run the Command service network restart to restart the network or use ifdown eth0 and then ifup eth0.
Run ipconfig/renew in win to refresh the IP address.
Related Article

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.