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 ...


19

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 ...


12

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 ...


11

if you are sure that subnet set in dhpcd config belongs to already configured interface (I'm guessing, wlan0). Compare IP subnets in /etc/network/interfaces and /etc/dhcp/dhcpd.conf . Also, on Debian (and thus Raspbian), check /etc/default/isc-dhcp-server, as it should contain name of your interface, like this: # Defaults for dhcp initscript # sourced by /...


11

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

The only thing that worked for me was: Edit /etc/dhcp/dhclient.conf and un-comment the line: prepend domain-name-servers 208.67.222.222; Anyway thanks for your for your help!


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 client's ...


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

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

You can fetch the original file yourself. The Raspbian package repository can be found here. The package you are looking for can be found like this: dpkg -S /etc/dhcp/dhclient.conf Which yields the package isc-dhcp-client. It can be found under the letter i in the package repository: http://archive.raspbian.org/raspbian/pool/main/i/isc-dhcp/. You can ...


7

Remove the -1 from your command line arguments, then edit the timeout and retry values in /etc/dhclient.conf to your liking. You can look at the man page (man dhclient.conf) for more details.


7

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?), ...


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

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 ...


6

Your eth1 interface does not seem to have an IP Address. You can assign an IP using the ifconfig command: ifconfig eth1 10.0.0.1 netmask 255.255.255.0 The above command will assign an IP of 10.0.0.1 to the eth1 interface. Regards


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

I know this question asks for instructions on Arch Linux, but since I have been struggling for several days with the exact same issue on Raspbian Wheezy I thought it might be helpful if I shared my solution anyway. Basically, I ended up creating a solution where my Raspberry Pi (RPi) tries to connect to one of its known wireless networks, and if that do not ...


5

dns-nameservers (and all others dns-xxx directives in /etc/network/interfaces) does not work in raspbian out of the box, since resolvconf is not installed by default. sudo apt-get install resolvconf solves the issue.


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

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

I did a bit more research and it appears that the problem was in dhclient itself. There are numerous instances of it being mentioned if one googles "dhclient syslog DHCPDISCOVER". I was able to fix the problem by removing all *.leases files from /var/lib/dhcp, purging (not just removing, but purging) isc-dhcp-server (which was not running anyway but this ...


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

Do sudo apt-get install dhcpcd5


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

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"...


4

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.


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 ...


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