How to configure dynamic IP service for Linux system

  

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.

Copyright © Windows knowledge All Rights Reserved