0
-Running Raspian stretch

-Corporate WIFI with Windows-based network run by IT

Problem:

Can't resolve the pi hostname from corporate DNS servers

IT department baffled

Situation:

Pi boots and gets DHCP on the WIFI network

Pi can resolve other hosts properly

Can SSH to Pi using IP address

I'd rather not demand a static address, but that's my fallback, of course.

  • 1
    Did the IT Department put your Pi's hostname on the DNS servers? Did they do it correctly to match the DHCP configuration? – Brick Apr 23 at 18:01
  • 1
    @Brick its dynamic - when the Pi requests, it should supply its hostname and MAC. This may be the problem? – John Fisher Apr 23 at 22:00
  • I suspect that IT messed something up separate from the Pi. I'd check to see that the Pi's name is really on the DNS by connecting it and then doing nslookup (or one of the other similar commands) to see if it's got a name on the DNS. Almost surely no, I'd say. – Brick Apr 24 at 15:06
1

We don't know what DHCP client do you use but it must have enabled to send its hostname to the DHCP server and that must have dynamic DNS enabled to update the DNS server. So check your DHCP client if it has enabled sending its hostname.

Then check if the DNS server resolves the name after rebooting the RasPi with:

rpi ~$ host raspberrypi.my.company.com
# or reverse resolution
rpi ~$ host 192.168.0.37   # assuming that's the ip of the RasPi

You should also look at /etc/resolv.conf if you have got the right DNS server addresses from your DHCP server.

If you want to get more detailed information about the query to the local DNS server you can sudo apt install dnsutils and use dig:

rpi ~$ dig raspberrypi.my.company.com @192.168.0.1  # assuming 192.168.0.1 is the local DNS server
# or reverse resolution
rpi ~$ dig -x 192.168.0.37 @192.168.0.1

This may help your IT department to look what's going wrong.

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.