- Install dhcp packages
- Config dhcp server
- Restart dhcp service
- Modify and test interface on Client site
Install dhcp packages
At a terminal prompt, enter the following command to install dhcpd:
Config dhcp server
- Config dhcp server as below step
sudo vim /etc/dhcp/dhcpd.conf
# Sample /etc/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name "mydomain.example";
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.100;
}
- Config dhcp server network interface
sudo vim /etc/network/interfaces
#eth1
auto eth1
iface eth1 inet static
address 192.168.1.1
netmask 255.255.255.0
- Select Interface card of dhcp server
sudo vim /etc/default/isc-dhcp-server
INTERFACES="eth1"
Restart dhcp service
or
sudo service isc-dhcp-server start
sudo service isc-dhcp-server stop
Modify and test interface on Client site
- Modify dhcp ethernet interface
vim /etc/network/interface
#eth1
auto eth1
iface eth1 inet dhcp
- Down and up dhcp ethernet interface
ifdown eth1
ifup eth1
- Check dhcp ethernet interface getting IP
ifconfig
Jose’s Google+ profile
沒有留言:
張貼留言