Hot answers tagged

36

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 this is why your Raspberry Pi gets the same IP. For your router it's not important what you are doing with the device exactly. It just recognizes the MAC and ...


20

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 stability. It does not matter much on small home networks but big networks with switches and routers need some time to get into an optimized state. Switches have ...


13

Try: arp -a You can also try tcpdump, but that isn't as clear. If you know the routers local IP address, type that into your browser and login. From there, depending on your router, you'll have a different set of options with information about your network including all wireless devices connected to the routers. Apple's time machine/airport express ...


12

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 automatize it so that it will always recognize it must get the internet from the Wifi independently of the IP range given by the hotspot DCHP to this interface? ...


9

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 assigns an IP address to a client for a limited period of time (or until the client explicitly relinquishes the address). In "manual allocation", a ...


8

You need to disable the DHCP Server so that it doesn't run on startup. I don't have a box handy at the moment, but this command should do what you need it to do sudo update-rc.d isc-dhcp-server disable This will stop the dhcp server from running on startup. If you have both servers installed, you may need to run that twice, replacing isc-dhcp-server with ...


8

Using arp -a is fast and easy, but I have found that under certain circumstances, it doesn't list all of the devices. (As an aside, I don't know why that happens. Any ideas?) Here's an approach that -- so far -- always appears to work. It just takes longer... In a shell window on your host machine (you said you did want to log in using ssh, right?), ...


8

I had this same issue. I assume you are using 2015-05-05 build of Rasbian. In this build, the static IP is set in /etc/dhcpcd.conf. You should: Revert your changes in /etc/network/interfaces back to default Put the ip information in your /etc/dhcpcd.conf to configure a static IP, replacing whatever your interface is for wlan0 Reboot -- # what I did # ...


8

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 after editing /etc/network/interfaces If so, run sudo systemctl daemon-reload


7

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 explicitly disabled in /etc/default/dnsmasq # Then dnsmasq won't be providing local DNS, so don't add it to # the resolvconf server set. for interface in $...


7

Do sudo apt-get install dhcpcd5


7

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 domain, so a fresh Raspbian will be accessible with raspberrypi.local from other machines using Avahi. If you change the hostname, it will be reflected in Avahi ...


7

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 become ready (as opposed to have been started successfully), the usual start dependency service unit settings don't help either. Often, you'll find ugly ...


7

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 provide a similar behavior. Here is how I disabled dhcpcd and set a static IP on my Raspberry Pi 4 on Raspbian Buster Lite (should be the same on any version of ...


6

This helped for me: update-rc.d dhcpcd disable service dhcpcd stop ip addr del %YOURS-SECOND-IP% dev ethX And when you start raspberry pi again, scope global secondary will disappear.


6

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 client. Setting a static IP is not a matter of just configuring the machine you would like to have that IP. Otherwise, what would happen when multiple people ...


5

cron job is easy, just type crontab -e and you'll get a chance to edit your cron job table, if you want your script to run every 10 minutes, you just add: */10 * * * * /home/pi/whatever.py where /home/pi/whatever.py is your script that executes hostname -I and shows the result on your LCD panel.


5

I found my answer here: https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=31238 Basically, it suggests you try this to "see where the internet connections stops": traceroute www.raspberrypi.org or to check if it is the DNS that fails traceroute 93.93.128.176 For me, the first command failed but the second succeeded, so I added this to my /etc/...


5

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/network/interfaces subnets by a subnet {} clause. For the subnets you do not need to be served by DHCPD you need an empty subnet clause like this : # No ...


5

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 routers=192.168.1.1 static domain_name_servers=192.168.1.1 8.8.8.8 4.2.2.1 static domain_search=yourlan static domain_name=yourlan No other file to be touched, ...


5

I solved this by using the interface-specific unit (/lib/systemd/system/dhcpcd@.service), with an interface-specific dhcpcd.conf. For wlan0, static IP address and no wpa_supplicant: /etc/dhcpcd-wlan0.conf interface wlan0 static ip_address==192.168.100.1/24 denyinterfaces wlan0 # don't send DHCP requests nohook wpa_supplicant # don't call the ...


5

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 will be valid. To do so: First stop dhcpcd (e.g run sudo systemctl stop dhcpcd) Open /etc/dhcpcd.conf Under your interface configuration write ssid <...


5

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 want to connect to the RasPi direct by wifi. You tagged a bridge so it is possible to bridge the wired interface eth0 to wifi interface wlan0. If you setup the ...


5

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 systemd. I think they are only available for backward compatibility of old scripts, or the maintainer of the programs still doesn't have realized that "init world"...


5

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 result in unpredictable results, as there will be a race condition in the enumeration of the interfaces. You should use Predictable Network Interface Names


4

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: interface eth0 static ip_address=192.168.0.10/24 static routers=192.168.0.1 static domain_name_servers=192.168.0.1 8.8.8.8 This will stop it from ...


4

Edit: When configuring your a headless RPi you can connect it directly to your computers ethernet port (must be model B). On a Mac you must turn on "Internet Sharing" within "System Preferences". This will allow your computer to create a connection between your WiFi and the ethernet port, which your pi should be plugged into. In this "Internet Sharing" ...


4

There is no reason why the WiFi access point and the DHCP server have to run on the same host, you can have your router do the former and the RPi to the latter. I seem to be running exactly what you want to set up: One box, the DSL (or cable or fiber or whatever) router takes care of the internet connection and provides a wireless network - an AVM FritzBox ...


4

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 requiring for device resolution. sudo apt-get install samba winbind reboot and check.


4

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 packets to this address and it will route them to destination. Removing this option should prevent the clients from trying to reach the Internet via your RPi ...


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