I have some devices on a network and an administration tool that relies on bonjour for device discovery. The devices are set to use DHCP. Example scenario as follows (let's assume really short DHCP leases, and ICMP echo response available)
Initially, one device (DeviceA.local) gets 192.168.1.1 and another (DeviceB.local) gets 192.168.1.2.
I then ping both devices by name and it resolves correctly.
Then I unplug DeviceA.local from network and plug it back in. DeviceA.local now gets assigned 192.168.1.3. I'm fairly certain DeviceA.local gets that IP by checking arp cache (arp -a
) and comparing MAC address.
However, when I ping DeviceA.local
, it resolves to 192.168.1.1 instead of 192.168.1.3.
This is bonjour service running on Windows 7. I've tried stopping and then starting bonjour service but it doesn't clear the situation. So my questions are:
- Does bonjour cache resolved hostname-IP mapping somewhere? If so, where?
- How do I clear the cache and force rediscovery?
dns-sd
tool as well? (It talks to Bonjour directly, whileping
goes through Winsock instead.)