Configuration of DHCP service in Fedora8-Linux general technology-Linux technology and application information. For details, see the following. DHCP is based on the customer/Server mode. When the DHCP Client is started, it automatically communicates with the DHCP server. The DHCP server provides the DHCP client with a service that automatically allocates IP addresses. A server installed with the DHCP service software is called a DHCP server and enabled
DHCP clients are called DHCP clients. The DHCP server uses the IP address lease as the DHCP client.
To provide services, you can use either of the following methods.
1. Limited lease period
2. permanent lease
I. Installation
[Root @ localhost etc] # cd/media/Fedora \ 8 \ i386 \ DVD/Packages/
[Root @ localhost Packages] # find.-name "* dhcp *"
/Dhcpv6-client-0.10-51.fc8.i386.rpm
/Libdhcp-1.27-3.fc8.i386.rpm
/Libdhcp4client-3.0.6-10.fc8.i386.rpm
/Libdhcp6client-0.10-51.fc8.i386.rpm
[Root @ localhost Packages] # rpm-ivh libdhcp-1.27-3.fc8.i386.rpm
Warning: libdhcp-1.27-3.fc8.i386.rpm: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
Preparing... ######################################## ### [100%]
Package libdhcp-1.27-3.fc8 is already installed
[Root @ localhost Packages] # rpm-ivh libdhcp4client-3.0.6-10.fc8.i386.rpm
Warning: libdhcp4client-3.0.6-10.fc8.i386.rpm: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
Preparing... ######################################## ### [100%]
Package libdhcp4client-3.0.6-10.fc8 is already installed
[Root @ localhost DHCP] # rpm-ivh dhcp-3.0.6-10.fc8.i386.rpm
Warning: dhcp-3.0.6-10.fc8.i386.rpm: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2
Preparing... ######################################## ### [100%]
1: dhcp ####################################### #### [100%]
**************************************** * *************************** DHCP configuration file dhcpd. the conf format is as follows:
*******************************
Options/parameters # these options/parameters are globally valid
Statement {
Option/parameter # these options/parameters are partially valid
}
**************************************** *****************************
Common declarations and functions in the dhcpd. conf file
********************************
Declaration Function
Shared-network name {...} Define super Scope
Subnet network No. netmask subnet mask {...} Define the scope (or IP subnet)
Range start IP address termination IP address definition scope (or IP subnet) range
Host name {...} Define reserved address
Group {...} Define a set of parameters
**************************************** *****************************
Common Parameters and functions in the dhcpd. conf file:
*******************************
Parameter Functions
Ddns-update-style defines the supported DNS dynamic update types (required)
Allow/ignore client-updates allows/ignores clients to update DNS records
Default-lease-time number specifies the default lease Term
Max-lease-time number specifies the maximum lease Term
Hardware MAC address specifies the NIC interface type and MAC address
Server-name host name notifies DHCP Client server Host name
Fixed-address: assign a fixed IP address to the client.
**************************************** * ***************************** Dhcpd. common options and functions in the conf file:
******************************
Option
Subnet-mask subnet mask specifies the subnet mask for the client
Domain-name "domain name" specifies the DNS domain name for the client
The domain-name-servers IP address is the IP address of the DNS server specified by the client.
Host-name "host name" specifies the host name for the client
Routers IP address specifies the default gateway for the client
Broadcast-address: the broadcast address specified by the client.
The netbios-name-servers IP address is the IP address of the WINS server specified by the client.
Netbios-node-type: Specifies the node type for the client.
The ntp-server IP address is the IP address of the server at the specified network time on the client.
The nis-servers IP address specifies the IP address of the NIS domain server on the client.
Nis-domain "name" is the name of the NIS domain to which the client is specified
The time-offset difference is the offset difference between the time specified by the client and the Greenwich Mean time.
**************************************** *****************************
2. The dhcp configuration file/etc/dhcpd. conf is empty by default.
# DHCP Server Configuration file.
# See/usr/share/doc/dhcp */dhcpd. conf. sample
Example/usr/share/doc/dhcp-3.0.6/dhcpd. conf. sample copy from example to/etc/dhcpd. conf
**************************************** *****************************
Content of the dhcpd. conf. sample source file:
*****************************
[Root @ localhost dhcp-3.0.6] # more dhcpd. conf. sample
Ddns-update-style interim;
Ignore client-updates;
Subnet 192.168.0.0 netmask 255.255.255.0 {
# --- Default gateway
Option routers 192.168.0.1;
Option subnet-mask limit 255.0;
Option nis-domain "domain.org ";
Option domain-name "domain.org ";
Option domain-name-servers 192.168.1.1;
Option time-offset-18000; # Eastern Standard Time
# Option ntp-servers 192.168.1.1;
# Option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- You understand Netbios very well
# Option netbios-node-type 2;
Range dynamic-bootp 192.168.0.128 192.168.0.254;
Default-lease-time 21600;
Max-lease-time 43200;
# We want the nameserver to appear at a fixed address
Host ns {
Next-server marvin.redhat.com;
Hardware ethernet 12: 34: 56: 78: AB: CD;
Fixed-address 207.175.42.254;
}
}
3. Modified/etc/dhcpd. conf:
Ddns-update-style interim;
Ignore client-updates;
Subnet 192.168.1.0 netmask 255.255.255.0 {Note: Modify
# --- Default gateway
Option routers 192.168.1.1; Note: Modify
Option subnet-mask limit 255.0; Note: Modify
Option nis-domain "jw.com"; Note: Modify
Option domain-name "jw.com"; Note: Modify
Option domain-name-servers 192.168.1.6; Note: Modify
Option time-offset-18000; # Eastern Standard Time
# Option ntp-servers 192.168.1.1;
# Option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- You understand Netbios very well
# Option netbios-node-type 2;
Range dynamic-bootp 192.168.1.100 192.168.1.110;
Default-lease-time 21600;
Max-lease-time 43200;
# We want the nameserver to appear at a fixed address
Host ns {
Next-server marvin.redhat.com;
Hardware ethernet 12: 34: 56: 78: AB: CD;
Fixed-address 207.175.42.254;
}
}
[Root @ localhost etc] #/etc/rc. d/init. d/dhcpd start
Start dhcpd: [OK]
Pass the test under XP
4. Disable
[Root @ localhost etc] #/etc/rc. d/init. d/dhcpd stop
Disable dhcpd: [OK]
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.