Raspberry Pi DHCP Server

Raspberry Pi DHCP Server

Tall Paul Tech

7 лет назад

53,925 Просмотров

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

Тэги:

#Raspberry_Pi #DHCP_Server #DHCP_Options #ArubaAP #Vendor_Class_Identifier #Vendor_Encapsulated_Options
Ссылки и html тэги не поддерживаются


Комментарии:

Bert Blankenstein
Bert Blankenstein - 10.03.2022 13:23

How did one get dhcpd to start at boot? It starts fine with service start but fails to start at bootup. The /etc/default/ file has been updated. I can't remember how I did this the last time. Thank you.

Ответить
International Criminal Court
International Criminal Court - 03.12.2020 16:16

Thanks for that tutorial. A question: I'd like to ask why you need to define your AP Wifi device within dhcpd.conf file? Wouldn't it (The AP) simply get its IP through DHCP and give Wireless internet connection to any users, afterwards? What's the purpose of defining AP's IP and Vendor name? Thank you.

Ответить
Abraham samuel
Abraham samuel - 23.11.2020 20:30

Do you connected these monitors in a single cabinet? and did you do different work in these?, if you connected and do different work in them ,then please make a video for 'How to connect multiple monitors in a single cabinet for multi purpose '

Ответить
Never Too Late 1664
Never Too Late 1664 - 04.10.2020 01:53

None of them seem to work for me haha

Ответить
NoSignal
NoSignal - 27.05.2020 05:58

Terrific video! I’ve been meaning to get around to something like this so not to be bound to DHCP on BB provider’s router (also the primary wifi router), which when it drops (esp. lately with the pandemic), I lose internal access across all local devices - however is this separation of the DHCP server generally recommended though (I’m a programmer not a network tech)? And is a Raspberry Pi reliable enough for this? I’ve an extensive wired & wireless home office setup with a few switches plus a 2nd wifi router, and have an unused Raspberry Pi which I could dedicate to this. Thanks!

Ответить
Kitten Goes Wild
Kitten Goes Wild - 18.05.2020 15:16

Yet another tutorial not explaining anything about what the setting are that you are doing, just go here and do this, no explanation of the settings or why

Ответить
Pirate58
Pirate58 - 12.05.2020 19:58

Unfortunately the procedure did not work on my Pi 3B+ I keep getting the following error when starting 'dhcpd': unable to create icmp socket: Operation not permitted. Any ideas. I have tried this four times and 'no bueno' ...

Ответить
Leonardo Pineda
Leonardo Pineda - 08.03.2020 23:37

Thanks.

Ответить
Default Profile
Default Profile - 04.12.2019 23:03

What is the benefit of having a DHCP on a raspberry pi ?

Ответить
neha hule
neha hule - 28.10.2019 18:10

Do we have to give static Ip before setting the DHCP server?

Ответить
Mr.R͟͞X͟͞1͟͞0͟͞0 ☑️
Mr.R͟͞X͟͞1͟͞0͟͞0 ☑️ - 21.06.2019 13:14

300th like :)

Ответить
Lycoris
Lycoris - 05.04.2019 08:53

Too fast for a newbie like me I was lost after I entered my static value i don’t what you did after that

Ответить
hammershigh
hammershigh - 30.11.2018 21:59

So your education is... typewriter? You really don't how a clue about what you are doing.... right?

Ответить
Gary
Gary - 03.06.2018 03:07

can i run a dhcp server on a usb ethernet gadget??

Ответить
DJ Bald Paul
DJ Bald Paul - 02.05.2018 19:54

Hi, can I ask what software you use to capture your video and move movements? I've been hunting for something that will do that but coming up short. Cheers.

Ответить
echelecopao
echelecopao - 06.04.2018 07:06

With so many raspberry pis running on your network, are you not having issues with corrupt SD cards too frequently ?

Ответить
Spoon Man
Spoon Man - 26.02.2018 18:41

Can you still login in the ArubaAP from your laptop? They are on different subnets..... 192.168.1.x and 192.168.20.x.Great videos, I learn a LOT from you !
I think there is a typo in the DHCP range.... in the video it is correct, in the text comment it is wrong.

Ответить
Kirra Sports Club Team
Kirra Sports Club Team - 29.11.2017 16:48

Hope you have more upcoming video's. I've been watching them all and now have run out :D

Ответить
Andrew
Andrew - 05.11.2017 05:22

Why do you need so many displays?

Ответить