36
votes
Accepted
Why does my Pi always have the same IP address?
Your Raspberry Pi has a unique ID, called a MAC address, actually two to be precise. Each network adapter has one of those. So the Wi-Fi adapter has one unique ID and the Ethernet adapter does.
And ...
20
votes
Why does my Pi always have the same IP address?
In addition to the already given answers I will give some additional background information.
In general the DHCP protocol is made to reduce dynamic changes as much as possible. It is an aspect of ...
14
votes
Accepted
Make permanent change in the routing table
Is there a way to automatize this process so I won't have to manually do it every time I turn on the Raspberry?
That's not needed if question #2 can be solved - and it can...
Is there a way to ...
10
votes
isc-dhcp-server needs to be restarted after reboot
The reason why the ISC DHCPv4 server service fails is that at the time it is started the network interface configuration might not have been finished. As systemd cannot know when a service really has ...
10
votes
disable dhcpcd.service for static ip?
Although this question is a year old, it popped up in my Google search results, after I acquired a Raspberry Pi 4. I don't believe the other answers addressed the question, even though their results ...
9
votes
Proper way to prevent dnsmasq from overwriting DNS server list supplied by DHCP?
It appears that the /etc/init.d/dnsmasq script will automatically add the local machine as a resolver unless the lo adapter is explicitly disabled...
start_resolvconf()
{
# If interface "lo" is ...
9
votes
Accepted
9
votes
Accepted
Does dhcpcd prevent a remote DHCP server serving an IP address that is declared static?
From RFC2131:
DHCP supports three mechanisms for IP address allocation. In
"automatic allocation", DHCP assigns a permanent IP address to a
client. In "dynamic allocation", DHCP ...
8
votes
Accepted
Static IP adddress on Raspbian not using dhcp service at all
I'm still not fully up with systemd, however if you run
sudo service networking status
Do you get a message like
Warning: Unit file changed on disk, 'systemctl daemon-reload' recommended.
I did ...
8
votes
Accepted
Can I identify my PI by domain name in a LAN?
Unless you disable it (i.e. by default), Raspbian is running a service called Avahi which responds to mDNS requests in your local network.
By default machines are configured to appear in .local ...
8
votes
Accepted
How can I make dhcpcd ignore an interface?
See Prevent dhcpcd from configuring an interface in How to set up networking/WiFi
Add denyinterfaces eth1 to the end of /etc/dhcpcd.conf (but above any other added interface lines).
NOTE eth1 may ...
6
votes
Does dhcpcd prevent a remote DHCP server serving an IP address that is declared static?
For my understanding "will not attempt to obtain a lease" means the DHCP server will never get a request for an ip address from this client so it means 192.168.0.10 is free and will give it to another ...
5
votes
isc-dhcp-server install and run problem
You need to have INTERFACES="" in defaults as it shipped! Even more - automatic update can overwrite it btw. This issue is DHCPD-dependent, not an OS-dependent. All you need is to define ALL the /etc/...
5
votes
Set static IP and stop DHCP on Jessie Lite
Setting a fixed IP address on a recent Jessie is easy:
nano /etc/dhcpcd.conf
and add at the bottom (i.e. below nohook lookup-hostname):
interface eth0
static ip_address=192.168.1.10/24
static ...
5
votes
Accepted
Configure DHCP server on RPi with no Internet connection
Your dhcpd.conf has this option routers 192.168.42.1 line. In human language that line tells to the clients:
If you need to reach computers outside of the 192.168.42.X network, simply send your IP ...
5
votes
How do I configure dhcpcd to call wpa_supplicant for a specific interface?
I solved this by using the interface-specific unit (/lib/systemd/system/[email protected]), with an interface-specific dhcpcd.conf.
For wlan0, static IP address and no wpa_supplicant:
/etc/dhcpcd-...
5
votes
How to configure pi for wifi at home using static IP and wifi at other location using dhcp?
I'm answering a bit late I think but a solution exists, and I think it's worth mentioning it.
For each interface, it's possible in dhcpcd.conf to specify an SSID for which the configuration below ...
5
votes
Accepted
How to connect a ethernet device(having its own static I.p and netmask) wirelessly by my laptop?
It is a bit unclear how do you want to connect the Laptop to the Raspberry Pi. I will assume that there is no other wifi router as access point running for example to connect to the internet so you ...
5
votes
Accepted
Two dhcpcd services: systemd and init.d
Most popular distribution have changed its init system from old SysV to systemd including Debian and its flavor Raspbian. Scripts in /etc/init.d/ are leftover from SysV and they are all emulated by ...
4
votes
Cannot make Pi visible on network
Depending on how your router resolves names It might be helpful to install samba and winbind (even if you're not going to use it). It provides a couple more services that your router might be ...
4
votes
Where does my secondary IP come from?
Edit /etc/dhcpcd.conf
This happened to me too (albiet on Raspbian).
If you'd rather not totally disable the dhcpcd service, you can add this to /etc/dhcpcd.conf to inform it of your static interface: ...
4
votes
Accepted
Setting Subnet Mask with DHCPD Conf
I had a similar problem to set a Subnet Mask 255.255.254.0 for static IP 192.168.161.154 in /etc/dhcpcd.conf. How I address this is by adding /23 at the end of the static IP address,
interface wlan0
...
4
votes
Does dhcpcd prevent a remote DHCP server serving an IP address that is declared static?
The static IP configuration for dhcpcd is often used as a fallback setting so that a system is always guaranteed of having an IP address to connect to. As you correctly guessed, static settings do not ...
4
votes
Unable to Reconnect WiFi on Pi 3 after Connection Drop
Very good explained question. I cannot see direct what may be wrong. But here are some quirks I have seen in your description.
You use deprecated commands ifconfig and iwconfig. I prefer to use up to ...
4
votes
Accepted
isc-dhcp-server can't bind to dhcp address
If you have dnsmasq installed you can verify with:
sudo netstat -laputeno|grep 67
If it is the case:
sudo systemctl disable dnsmasq
sudo systemctl stop dnsmasq
sudo systemctl start isc-dhcp-server
...
4
votes
How to set up a static ip in a Raspberry pi which is connected via mobile data?
I don't see a usable possibility to have a static ip address with a mobile internet connection. The mobile device must give the RasPi a default route with its gateway. The gateway isn't static so you ...
4
votes
Wired network eth0 IP address is lost and not renewed
Wow, what a mixup of network managers! It is unsurprising that it doesn't work. You are using Debian ifupdown with /etc/network/interaces and dhcpcd and wicd and using two DHCP clients dhclient and ...
4
votes
huge syslog filled with dhcpcd lines
This logging mis-behavior was indeed due to a bug in the dhcpcd code.
I initially dismissed this question as irrelevant, and wrote it off as an issue unrelated to use of the inform option in dhcpcd....
4
votes
Roboust Network connectivity
With the built-in wifi-device of a Raspberry Pi it is possible to create an access point together with an uplink client connection. This can be done with creating a virtual interface ap0 (or what name ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
dhcp × 332networking × 174
wifi × 73
raspbian × 68
static-ip × 58
ethernet × 43
pi-3 × 26
dns × 23
wireless × 17
pi-4 × 13
pi-3b+ × 13
raspbian-buster × 13
raspbian-jessie × 12
ssh × 10
raspbian-stretch × 10
internet × 10
pi-2 × 9
boot × 9
access-point × 9
usb × 8
hostapd × 8
linux × 7
connection × 7
bridge × 7
ethernet-port × 6