Environment: server acts as Nat, gateway, dhcp1, install dhcp3-server:
Apt-Get install dhcp3-server2. modify the configuration file: note the semicolon at the end of the line;
A, gedit/etc/default/dhcp3-serverWhich network card to listen to when the server has multiple network cards?
Interfaces = "eth1"# Eth1 Intranet Nic
B. gedit/etc/dhcp3/DHCPD. confParameter description: The subnet mask of the IP address obtained by the subnet client. Options domain-name specifies the DNS server name for the client.
Client/Etc/resolv. conf options domain-name-servers for the client to specify the DNS server IP address options routers for the client to specify the default gateway IP address, will modify
ClientRoute table route-n view options subnet-mask the subnet mask range of the default gateway IP address is used to indicate that the range of the IP address obtained by the client is default-lease-time specify the default address lease (in seconds) max-lease-time specifies the maximum address lease (in seconds) host provides the IP address parameter fixed-address for the MAC address of a specific client in hardware for a specific DHCP Client. This parameter indicates that a client named host and a MAC address named hardware will always use fixed-address this IP address subnet sets subnet XXX netmask XXX {range IP-start IP-end allocable address pool host hostname {hard Ethernet MAC address; fixed-address IP address;} 3. Start DHCP
/Etc/init. d/dhcp3-server start
Note: 1. If DHCP fails to be started, the possible cause is that the IP address of the Intranet Nic is not set to 192.168.0.1.
This article is from the blog "die if you don't learn". I don't want to repost it!