Raspberry Pi DHCP Server
53.9 هزار بار بازدید -
8 سال پیش
-
Setting up a Raspberry Pi
Setting up a Raspberry Pi as a DHCP server
sudo bash
Set static IP in file
/etc/dhcpcd.conf
static value
interface eth0
static ip_address=192.168.20.1/24
static routers=192.168.20.254
static domain_name_servers=8.8.8.8
Reboot the Raspberry Pi
reboot
Update and install server
apt-get update
apt-get install isc-dhcp-server -y
Edit DHCP server config file
/etc/dhcp/dhcpd.conf
subnet 192.168.20.0 netmask 255.255.255.0 {
range 192.168.20.60 192.168.1.70;
option routers 192.168.20.254;
option domain-name-servers 8.8.8.8;
}
If you want the options for an Aruba AP, also add
option vendor-class-identifier "ArubaAP";
option vendor-encapsulated-options "192.168.1.200";
Start the server
dhcpd -cf /etc/dhcp/dhcpd.conf
sudo bash
Set static IP in file
/etc/dhcpcd.conf
static value
interface eth0
static ip_address=192.168.20.1/24
static routers=192.168.20.254
static domain_name_servers=8.8.8.8
Reboot the Raspberry Pi
reboot
Update and install server
apt-get update
apt-get install isc-dhcp-server -y
Edit DHCP server config file
/etc/dhcp/dhcpd.conf
subnet 192.168.20.0 netmask 255.255.255.0 {
range 192.168.20.60 192.168.1.70;
option routers 192.168.20.254;
option domain-name-servers 8.8.8.8;
}
If you want the options for an Aruba AP, also add
option vendor-class-identifier "ArubaAP";
option vendor-encapsulated-options "192.168.1.200";
Start the server
dhcpd -cf /etc/dhcp/dhcpd.conf
8 سال پیش
در تاریخ 1395/07/10 منتشر شده
است.
53,950
بـار بازدید شده