System: RedHat6x86_64 1. Check the installation package [root@www.linuxidc.com ~] # Rpm-qa | grepdhcpdhcp-4.1.1-12.P1.el6.x86_64 2. modify the configuration file/etc/dhcp/dhcpd. conf: // supported dhcp dynamic update modes (non: not supported; interim: Interactive update mode; ad-hoc: special update mode) ddns
System: RedHat 6 x86_64
1. Check the installation package
[Root @ www.linuxidc.com ~] # Rpm-qa | grep dhcp
Dhcp-4.1.1-12.P1.el6.x86_64
2. modify the configuration file/etc/dhcp/dhcpd. conf
As follows:
// Supported dhcp dynamic update modes (non: not supported; interim: Interactive update mode; ad-hoc: special update mode)
Ddns-update-style interim;
# Ignore client-updates;
# Subnet <网络号> Netmask <子网掩码> : Specified scope
Subnet 192.168.1.0 netmask 255.255.255.0 {
# Specify the address pool, which will be in 192.168.1.20 ~ IP addresses within the range of 192.168.1.254 are dynamically allocated to clients.
Range 192.168.1.20 192.168.1.254;
Option routers 192.168.1.1; # The default client gateway is 192.168.1.1.
Option subnet-mask limit 255.0; # specify the client subnet mask
Option domain-name "example.com"; # specify the DNS suffix
Option domain-name-servers *. *; # DNS server address
Option broadcast-address 192.168.1.255; # specify the broadcast address
Default-lease-time 86400; # specify the default lease time, in seconds
Max-lease-time 172800; # specify the maximum lease time, in seconds
# Reserve the specified IP address for the host whose physical address is 00: 0C: 29: 23: F5: A2
Host pc1 {
Hardware ethernet 00: 0C: 29: D4: E7: 58;
Fixed-address 192.168.1.50;
}
}
3. Set the nic ip address to the same network segment
Modify:/etc/sysconfig/network-scripts/ifcfg-eth0 file as follows:
DEVICE = "eth0"
NM_CONTROLLED = "yes"
ONBOOT = yes
TYPE = Ethernet
BOOTPROTO = "static"
IPADDR = 192.168.1.1
PREFIX = 24
GATEWAY = x. x
DNS1 = x. x
DEFROUTE = yes
20174_failure_fatal = yes
IPV6INIT = no
NAME = "System eth0"
Check:
[Root @ www.linuxidc.com ~] # Ifconfig
Eth0 Link encap: Ethernet HWaddr 00: 0C: 29: 23: F5: A2
Inet addr: 192.168.1.1 Bcast: 192.168.1.255 Mask: 255.255.255.0
Inet6 addr: fe80: 20c: 29ff: fe23: f5a2/64 Scope: Link
Up broadcast running multicast mtu: 1500 Metric: 1
RX packets: 189208 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 9344 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 FIG: 1000
RX bytes: 12301428 (11.7 MiB) TX bytes: 1247215 (1.1 MiB)
4. Start dhcp
[Root @ www.linuxidc.com ~] # Service dhcpd start
Starting dhcpd: [OK]