Skip to main content
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 ...
ItsKiddow's user avatar
  • 464
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 ...
Ingo's user avatar
  • 42.3k
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 ...
Thomas Weller's user avatar
11 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 ...
TheDiveO's user avatar
  • 1,591
10 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 ...
techraf's user avatar
  • 4,339
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 ...
Prevok's user avatar
  • 201
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 ...
Seamus's user avatar
  • 22.4k
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 ...
Milliways's user avatar
  • 60.7k
7 votes

dhcpcd.conf inform vs static ip vs request. How should you REALLY setup a static IP?

Excellent question! Here's my answer; a quick summary & details for those interested: Quick Summary First/Best Choice: Don't use a static IP address Your RPi system comes with a network manager (...
Seamus's user avatar
  • 22.4k
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 ...
goldilocks's user avatar
  • 59.4k
6 votes

How to set up a Static IP on Raspberry Pi 5 with Raspbian - dhcpcd.conf missing

I see you've found an answer, so this is just FYI: The people who run the RPi manufacturing operation decided to replace dhcpcd with nmcli as the default DHCP client program for the bookworm release. ...
Seamus's user avatar
  • 22.4k
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 ...
kay_D's user avatar
  • 151
5 votes

What is the correct way to specify a DNS server IP address when receiving an IP address via DHCP?

The correct way to set DNS servers is in /etc/dhcpcd.conf. This will override the value supplied by the DHCP server, without interfering with other DHCP functions. Look for a line that looks like this ...
starbeamrainbowlabs's user avatar
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 ...
Dmitry Grigoryev's user avatar
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-...
Bridgey's user avatar
  • 223
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 ...
Resethel's user avatar
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 ...
Ingo's user avatar
  • 42.3k
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 ...
Ingo's user avatar
  • 42.3k
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: ...
Hydraxan14's user avatar
  • 1,846
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 ...
Pratheeesh TK's user avatar
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 ...
ErikF's user avatar
  • 166
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 ...
Ingo's user avatar
  • 42.3k
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 ...
Ephemeral's user avatar
  • 2,157
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 ...
Ingo's user avatar
  • 42.3k
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 ...
Ingo's user avatar
  • 42.3k
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....
Seamus's user avatar
  • 22.4k
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 ...
Ingo's user avatar
  • 42.3k
4 votes
Accepted

Override dhcpcd.conf from SD card

Take the SD card out of the pi and put it in whatever other device you have Edit the cmdline.txt file in the boot partition, it'll look something like console=serial0,115200 console=tty1 root=PARTUUID=...
Bravo's user avatar
  • 242
4 votes
Accepted

How to set up a Static IP on Raspberry Pi 5 with Raspbian - dhcpcd.conf missing

This is a useful guide, Raspberry Pi OS is basically Debian, with Bookwork being largely the same as the Debian Bookworm release. This guide was helpful for me. - https://itslinuxfoss.com/set-up-...
Ben Bird's user avatar
  • 152

Only top scored, non community-wiki answers of a minimum length are eligible