6

I'm running Jessie on a Raspberry 2, and have setup on the network so it can reach the web and ssh is enabled, but cannot see it on the network. The router shows nothing. I've followed various other questions, updated /etc/hostname and /etc/hosts (this guide). I've tried installing libdns but apt-get was unable to locate package. Tried updating /etc/nsswitch.conf, as well as rebooting the router.

Nothing seems to work. Any idea what I'm missing?

geotheory
  • 575
  • 3
  • 10
  • 20

3 Answers3

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.

raspi-ninja
  • 889
  • 2
  • 8
  • 15
1

I would recommend installing samba as well as it might help your Windows network to pick up the new device.

But nevertheless your router should show the rasperry pi already. My rasperry pi doesn't even have a static ip configured in its network settings. When I installed it, it showed up in the same moment when it got a dynamic IP using DHCP from my router.

Afterwards I created a static entry in the DHCP list of my router. Most of the routers allow you to do that and it maps a given MAC-address to an IP so that you could just leave your device on the dynamic IP setting while always getting the same ip.

You just need the MAC address and/or the current IP of your raspberry pi. All the routers I used (D-Link, LinkSys and Asus) allow you to configure a port forwarding etc. for such a static DHCP IP.

0

"It's a wifi connection on a brand new Jessie. Can ping by ip not hostname"

Well, there you go. Your Pi isn't in the router's DNS.

Your router probably doesn't provide hostnames to the DNS. My ISP-supplied router has the balls to run dnsmasq but explicitly disable DHCP in it, running a separate DHCP server—which of course doesn't communicate to dnsmasq.

Alternatively, your PI isn't providing a hostname. I forgot to set up my tunnel into my Pi from here, so don't recall which DHCP client it's using. If dhclient, which I think it is, /etc/dhclient.conf should contain:

send host-name = gethostname();

alternatively the following in /etc/network/interfaces

iface wlan0 inet dhcp
    hostname Something

As for libdns and nsswitch, you're not (likely) doing DNS on the Pi so it won't help you (however, if you are running a router like mine that can't be modified, I do have some good hacks to move your local network's DHCP and DNS off the router and onto the Pi).

Auspex
  • 101
  • 1