1

I can find my Raspberry Pi over dns when it is connected via eth, but not when it is connected over wifi. It has a static Ip adress in eth0, and a dhcp address in wifi.

I am trying to ssh into my pi, when it is connected to wifi, but it is not discoverable.

What can I do to get the Raspberry Pi make an entry in the DNS server and tell it about its hostname? So that other clients can connect to the raspberry pi via its hostname?

1

From your description, I'm understanding that you have created a DNS entry for the RPi's Ethernet (static IP) interface, but want the same convenience for your wifi (dhcp) interface. There are two ways to accomplish this:

  1. As noted in the comments, if you are using raspbian or can add the avahi-daemon package, you can reference your RPi as raspberrypi.local (substituting the actual hostname of your RPi). This functionality is handled by avahi-daemon handling multicast DNS (MDNS) on the RPi itself.
  2. If your DHCP server (i.e. your router) supports the feature, the DHCP server (not the RPi) can create dynamic DNS entries for addresses it hands out via DHCP. I use dnsmasq as my DHCP server on my router, and it supports this functionality out of the box. If my RPi named raspberrypi gets an address from dnsmasq, I can simply refer to it as raspberrypi (e.g. ping raspberrypi - no .local necessary).

The key point is that your hostnames are resolved by whatever is doing DNS resolution on your network. That DNS server must either create the appropriate entries separate from your RPi, or you use some other method you can control from the RPi (e.g. MDNS).

  • The solution is to manually add the Raspberry Pi to the DNS server (corporate windows domain). The problem is, that the Raspberry Pi is not added to the AD structure nor has it a valid account in the windows domain. Therefore, the RPI is not allowed to use DNS entries even though it can read them using ‘host -l [domain.local]’. But ‘ping [hostname]’ does not work because the RPI is not allowed to use the DNS entries in the windows domain server. Thanks for your hint, – WalterBeiter Dec 16 '17 at 9:23
  • Ah, makes sense. Yes, Windows domains typically require that the machine be added to the domain, which adds another significant layer of complexity. I hand't realized you are working in a corporate environment. – bobstro Dec 16 '17 at 21:43
0

You could buy one of these OLED Displays which can be programmed to show the IP on boot. If you only needed to find it once you could log onto your router and find the ip through the connected devices panel. Hope this helps :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.