CecilWard
Posts: 39
Joined: Sat Sep 03, 2016 10:17 pm

Bizarre long name of pi visible on Lan

Tue Sep 12, 2017 1:48 am

The rest of the Lan is seeing a bizarre very long name for the pi, which is
dhcpcd-671linux-4935-v7armv7lbcm2835.site01.cecilward.com

and not based on raspberry-pi-1.* as I set the host name to be using raspi-config. I can't ping "raspberry-pi-1." or "raspberrypi.site01.cecilward.com." (the expected site01.cecilward.com being the domain name part that is successfully suffixed onto every other machine's name) A Lan scanning app says that the 'hostname' itself is something hugely long, and the dhcp name is as expected, whatever that means.

User avatar
DougieLawson
Posts: 39118
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Bizarre long name of pi visible on Lan

Tue Sep 12, 2017 7:09 am

That funky name is the result of a reverse DNS lookup. You give an IP address to your DNS, it returns the domain name.

dig -x 192.168.3.14

Code: Select all

pi@viking ~ $ dig -x 192.168.3.14

; <<>> DiG 9.10.3-P4-Raspbian <<>> -x 192.168.3.14
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10129
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;14.3.168.192.in-addr.arpa.                IN      PTR

;; ANSWER SECTION:
14.3.168.192.in-addr.arpa. 259200  IN      PTR     dhcp-192-168-3-14.example.co.uk.

;; AUTHORITY SECTION:
3.168.192.in-addr.arpa.    259200  IN      NS      example.co.uk.

;; Query time: 4 msec
;; SERVER: 2001:???:????:???::1#53(2001:???:????:???::1)
;; WHEN: Tue Sep 12 07:00:58 UTC 2017
;; MSG SIZE  rcvd: 114
Normal DNS lookup works with a domain name and returns an IP addr

Code: Select all

pi@viking ~ $ dig dhcp-192-168-3-14.example.co.uk.

; <<>> DiG 9.10.3-P4-Raspbian <<>> dhcp-192-168-3-14.example.co.uk.
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63934
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 4

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;dhcp-192-168-3-14.example.co.uk. IN        A

;; ANSWER SECTION:
dhcp-192-168-3-14.example.co.uk. 259200 IN A 192.168.3.14

;; AUTHORITY SECTION:
example.co.uk.   259200  IN      NS      ns.example.co.uk.

;; ADDITIONAL SECTION:
ns.example.co.uk. 259200 IN      A       192.168.3.11
ns.example.co.uk. 259200 IN      AAAA    2001:???:????:???::1
ns.example.co.uk. 259200 IN      AAAA    2001:???:????:???:ba27:ebff:fe85:c936

;; Query time: 3 msec
;; SERVER: 2001:???:????:???::1#53(2001:???:????:???::1)
;; WHEN: Tue Sep 12 07:04:24 UTC 2017
;; MSG SIZE  rcvd: 169
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “Troubleshooting”