Linux DHCP service practice-Linux Enterprise Application-Linux server application information. The following is a detailed description. We know dhcp is a dynamic IP Address Allocation service pull! In a network, if there are not many computers, we usually manually assign IP addresses and other network settings to each computer. If there are hundreds of computers in a network, we also need to set their ip addresses, So that I think people will be able to set their heads up and go everywhere. My company is a small company with only a dozen computers. I am very lazy, so I used linux to configure the dhcp service to dynamically allocate IP addresses!
In general, if we select everything when installing linux, then your dhcp will also be available. Great ~! But if you want it to work properly, you have to do it yourself.
The DHCPd background program always reads the configuration file/etc/dhcpd. conf. The following is an example of the DHCP configuration file on my HOST:
Ddns-update-style interim;
Ignore client-updates;
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.25.100 192.168.25.254;
Default-lease-time 259200;
Max-lease-time 518400;
# 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;
#}
}
The above means:
Use 255.255.255.0 as the subnet mask, 192.168.25.255 as the broadcast address, and 192.168.25.15 as
The default gateway uses 202.96.128.68 and 192.168.25.15 as the DNS server. The allocated address range is 192.168.25.100-192.168.25.254.
Save and exit
4. In most cases, no dhcpd. leases file is created for DHCP installation. You must create an empty dhcpd. leases file before starting the DHCP server.
# Touch/var/state/dhcp/dhcpd. leases
To start the DHCP server, simply enter/usr/sbin/dhcpd or use # ntsysv to automatically start the DHCP service.
This will start dhcpd on the eth0 device. If you want to start dhcpd on the eth1 device
#/Usr/sbin/dhcpd eth1
************
My lessons ~! After I have finished the job, dhcp will start the service normally ~! However, no IP address can be automatically obtained after the other 98 clients are started ~! After a busy day, I finally found the cause. It turns out that a win2000 on the network is also running the dhcp service at the same time. Damn it ~! Just stop win2000 dhcp ~!
How can we check whether the customer's ip address is obtained?
Run winipcfg on 98
Run ipconfig/all in 2000
It's just plain!
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.