The so-called dynamic ip refers to the DHCP service. If you do not need to manually set the IP address, using dynamic ip is also a good choice. Especially in the LAN with more hosts, dynamic ip can effectively solve the problem of automatic allocation of ip. So how should Linux systems configure dynamic ip services?
DHCPd daemon always read the configuration file /etc/dhcpd.conf, it gives a DHCP configuration file on the host following examples:
ddns-update-style Interim;
ignore client-updates;
subnet 192.168.25.0 netmask 255.255.255.0 {
# --- default gateway
option routers 192.168. 25.15;
option subnet-mask 255.255.255.0;
# option nis-domain “uc88.domain”;
option domain-name “uc88.domain” ;
option domain-name-servers 202.96.128.68,192.168.25.15;
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 meaning is:
Use 255.255.255.0 as the subnet mask, use 192.168 .25.255 as the broadcast address, use 192.168.25.15 as the default gateway for
, and use 202.96.128.68 and 192.168.25.15 as the DNS server to allocate the address range: 192.168.25.100-192.168.25.254
Save Exit
In most cases, the DHCP installation does not create a dhcpd.leases file. Before you start the DHCP server, you must create an empty file dhcpd.leases
#touch /var/state/dhcp/dhcpd.leases
To start the DHCP server, simply type /usr/sbin/dhcpd or use #ntsysv to start the DHCP service automatically
>
This starts dhcpd on the eth0 device, you may want to start dhcpd on the eth1 device, then
#/usr/sbin/dhcpd eth1
How to observe the client's ip Is there no acquisition?
Run winipcfg in 98
Run ipconfig /all under 2000
The above is the way to configure dynamic ip for Linux system. Implementation, but this should be a minor problem for Linux veterans.
Many computers now have more than one network card, but one network card fails and the entire networ
Linux system, when using a normal text editor to view, some characters are not displayed, you need t
Although the Debian system is used less in the country, it is a very popular Linux system in foreign
Some people say that the Linux command line is an art, the architecture of the Linux system formed b
How to remove the plus sign after the Linux Kernel version number?
Linux uses the sed command to add a string method
What should I do if the error occurs when CentOS 5.4 adds or removes an application?
Linux How to use userdel to delete users
Linux uses KSysguard to monitor remote hosts
How to share files between Ubuntu and Windows
Linux configuration SSH service method
How to mount an external device in a Linux system
How to clean up swap, buffer and cache in Linux
Linux how to use the umount command to force the file system to be unmounted
Several tips for Windows 7 system security maintenance (1)
96 WeChat editor to select the correct steps of the material
Win10/Win7 version of OneDrive new skills: Synchronize shared folders
How to shut down the win10 system?
Need for Speed 18 18 memory shortage problem solution
Why is this in the lower right corner of my computer?
How to use PR2/PR2E in Windows environment
Physical address to virtual address mapping