0

I have a clean install of the debian-based OSMC os on a raspberry pi. I've manually set a static IP:

$ ifconfig wlan0
wlan0: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC>  mtu 1500
        inet 192.168.1.3  netmask 255.255.255.0  broadcast 192.168.1.255
        ether aa:aa:aa:aa:aa:aa  txqueuelen 1000  (Ethernet)
        RX packets 39310  bytes 7976110 (7.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 11710  bytes 2444978 (2.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

And I've set the hostname as follows:

$ cat /etc/hostname
cerebro

$ cat /etc/hosts
::1             cerebro localhost6.localdomain6 localhost6
127.0.1.1       cerebro

127.0.0.1       localhost
::1             localhost ip6-localhost ip6-loopback
fe00::0         ip6-localnet
ff00::0         ip6-mcastprefix
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

And yet, when I scan the host with nmap, I see the host reported as osmc.connect:

$ nmap -sP 192.168.1.3

Starting Nmap 7.01 ( https://nmap.org ) at 2018-03-24 21:22 GMT
Nmap scan report for osmc.connect (192.168.1.3)
Host is up (0.032s latency).
Nmap done: 1 IP address (1 host up) scanned in 0.04 seconds

What I feel is somehow related is that when I ping either 192.168.1.1, osmc.connect or cerebro.local, I get:

$ ping 192.168.1.3
PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data.
64 bytes from 192.168.1.3: icmp_seq=1 ttl=64 time=4.16 ms
64 bytes from 192.168.1.3: icmp_seq=1 ttl=64 time=4.61 ms (DUP!)
64 bytes from 192.168.1.3: icmp_seq=1 ttl=64 time=4.63 ms (DUP!)
64 bytes from 192.168.1.3: icmp_seq=1 ttl=64 time=4.88 ms (DUP!)
64 bytes from 192.168.1.3: icmp_seq=2 ttl=64 time=4.28 ms
64 bytes from 192.168.1.3: icmp_seq=2 ttl=64 time=4.32 ms (DUP!)
64 bytes from 192.168.1.3: icmp_seq=2 ttl=64 time=4.32 ms (DUP!)
64 bytes from 192.168.1.3: icmp_seq=2 ttl=64 time=4.55 ms (DUP!)

I spent all day trying to figure this out to no avail.

  1. Where is this osmc.connect hostname coming from and how to get rid of it?
  2. Why do I have these duplicate pings and how to get rid of them?

It's worth mentioning I've recently switched to Vodafone (Huawei 963168_HUAWEIVOX25) and I'm highly suspicious that it is causing all this trouble.

I have another raspberry on he network with another hostname, and the router shows it in the connected devices as computer-3.connect ?!?


UPDATE:

I changed the SSID of the wifi network and once reconnected, the router was already seeing the host as cerebro.connect, but the duplicate pings were still there.

SECOND UPDATE:

The following morning the duplicate updates are gone and all looks ok. However, I wanted to understand what happened, so I changed back the hostname in /etc/hostname and /etc/hosts to osmc and rebooted. systemctl status avahi-daemon correctly shows the hostname as osmc. However in the router's list of devices, I still see it as cerebro.connect. Then I renamed the hostname back to cerebro and rebooted again. And now the (DUP!) pings are back!

$ sudo systemctl status avahi-daemon
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
   Loaded: loaded (/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2018-03-25 10:24:15 BST; 11min ago
 Main PID: 244 (avahi-daemon)
   Status: "avahi-daemon 0.6.32 starting up."
   CGroup: /system.slice/avahi-daemon.service
           ├─244 avahi-daemon: running [cerebro.local]
           └─267 avahi-daemon: chroot helper

Mar 25 10:24:15 cerebro avahi-daemon[244]: Loading service file /services/ssh.service.
Mar 25 10:24:15 cerebro avahi-daemon[244]: Loading service file /services/udisks.service.
Mar 25 10:24:15 cerebro avahi-daemon[244]: Network interface enumeration completed.
Mar 25 10:24:15 cerebro avahi-daemon[244]: Server startup complete. Host name is cerebro.local. Local service cookie is
Mar 25 10:24:15 cerebro avahi-daemon[244]: Service "cerebro" (/services/udisks.service) successfully established.
Mar 25 10:24:15 cerebro avahi-daemon[244]: Service "cerebro" (/services/ssh.service) successfully established.
Mar 25 10:24:15 cerebro avahi-daemon[244]: Service "cerebro" (/services/sftp.service) successfully established.
Mar 25 10:24:17 cerebro avahi-daemon[244]: Joining mDNS multicast group on interface wlan0.IPv4 with address 192.168.1.
Mar 25 10:24:17 cerebro avahi-daemon[244]: New relevant interface wlan0.IPv4 for mDNS.
Mar 25 10:24:17 cerebro avahi-daemon[244]: Registering new address record for 192.168.1.3 on wlan0.IPv4.

It's like the router is caching the hostname.

Also the second Rpi I have (which is on a wired connection) is still seen by the router as computer-3.connect and I still have no idea how to change that. systemctl status avahi-daemon shows the correct hostname

  • It is not the fault of Vodafone you not being aware how zeroconf/avahi/mDNS works – Rui F Ribeiro Mar 24 '18 at 21:44
  • 1
    Try avahi-set-host-name cerebro – user1133275 Mar 24 '18 at 21:57
  • On the Rpi, what is the output of sudo systemctl status avahi-daemon – RubberStamp Mar 24 '18 at 22:26
  • avahi-set-host-name is not available. Please see my updates – pmishev Mar 25 '18 at 9:42

Your Answer

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

Browse other questions tagged or ask your own question.