rosede wrote:The IP address gets setup as assigned, but I'm not able to resolve anything. I see the name server in /etc/resolv.conf file, but still can't resolve anything. As a matter of fact, when I log in, I get the following error, "unable to resolve host "blah blah blah".
For networking and DNS to work, you need to have, assigned to the appropriate interface, a workable
IP address, and
netmask, you need to have routing set up with a workable
default route (gateway) to reach anything beyond your local subnet (as determined from the IP address and netmask), and you need to have whatever is resolving hostnames configured with the IP addresses of workable
DNS servers; this last part is traditionally handled by putting their addresses in
/etc/resolv.conf. From your description, it sounds like perhaps your default gateway isn't configured properly, but a mistake in any of these could throw things off.
rosede wrote:I disabled dhcpcd, and set the static IP in the interfaces file, like previously, but now I'm not able to get networking at all. In the upper right corner I see the networking icon with an "x" indicating networking is not working. I hover my mouse over it, and I see "dhcpcd not running". This tells me that dhcpcd is required for networking, why?
The answer to "why" is... because that is how they've set up the system to work. Your question,
after disabling dhcpcd, is a bit like pulling out random hoses from under under your car's hood and asking "why did the car maker put this here?" Answer: because it is designed to work in concert with all the other parts to perform the task at hand.
They switched to using dhcpcd (no, I don't know the exact reasoning), and set up the default desktop environment to have a nice widget that could interact with dhcpcd to show available networks and get you attached to one of them. This was a big win in terms of ease-of-use for most Pi users, particularly for their primary focus of education.
The first hit on google,
Setting a static IP on Raspberry Pi on Raspbian 20150505, appears to offer a workable solution for a static IP using dhcpcd. It would be helpful if you showed what you added or changed in
dhcpcd.conf, as well as the output of
ifconfig and
netstat -r.
The
proper solution, of course, is to configure your DHCP server to assign whatever fixed address you want for the host in question. Configuring individual hosts to force their use of a fixed address is almost always a bad idea (I used to help run a network with around 50,000 hosts on it, we took a rather dim view of such shenanigans). Using DHCP is certainly more resilient - setting a static IP and the associated networking parameters directly on a host makes it brittle: it will stop working if moved to a new environment, and any change to the overall configuration of the network requires changing each and every host so configured. DHCP got us away from that mess, back in the mid-90's. If you're using host-configured static IPs today, you're about 20 years behind the times.
The bigger question would be, why do you feel you need a static IP? Modern versions of Raspbian run Avahi by default, so they're continually broadcasting their current IP addresses via Zeroconf (mDNS). This allows other Raspberry Pi's, Macs, and other machines running modern operating systems (presumably Windows has caught up) to simply connect to "hostname.local", so, assuming your Raspberry Pi still has its default hostname, then "
ssh raspberrypi.local" and "
scp foo raspberrypi.local:" will work with zero configuration needed (hence the name). I have four Raspberry Pi's on my local network, most of them are headless, and this is how I conduct all interactions with them, addressing them as
hostname.local, and they interact with each other the same way.