ghost hostname
Moderator: Moderators
ghost hostname
Weird issue I noticed recently. I connected a Brother printer to my network and it was allocated an IP address via DHCP (in this case it was 172.16.0.21 and the Brother hostname was listed under connected hosts), I later changed the IP address via assign static IP address under DHCP. I rebooted things, and the printer took on the new IP address. A few days later I connected something else via DHCP, and it was allocated 172.16.0.21. Under connected hosts there were 2 Brother hostnames listed, one was the real one, and one was a ghost one listed for the device that had the 172.16.0.21 IP address.
I assume there is some sort of hostname cache on the router that may need clearing in such cases, is that correct?
I assume there is some sort of hostname cache on the router that may need clearing in such cases, is that correct?
Re: ghost hostname
It comes from several places
/tmp/dhcp.leases
/tmp/dhcpv4configleases.gargoyle
Is the ghost entry in one of those?
/tmp/dhcp.leases
/tmp/dhcpv4configleases.gargoyle
Is the ghost entry in one of those?
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
Please be respectful when posting. I do this in my free time on a volunteer basis.
Re: ghost hostname
It may have cleared out by now
It wasn't in
/tmp/dhcp.leases
and I couldn't find
/tmp/dhcpv4configleases.gargoyle
I'll have to try and get 172.16.0.21 allocated again to to see if it come up with the hostname Brother.
Ok I set a VM IP to 172.16.0.21 and sure enough, in the connected hosts screen, hosts with active connections section it shows the host name as Brother.
It wasn't in
/tmp/dhcp.leases
and I couldn't find
/tmp/dhcpv4configleases.gargoyle
I'll have to try and get 172.16.0.21 allocated again to to see if it come up with the hostname Brother.
Ok I set a VM IP to 172.16.0.21 and sure enough, in the connected hosts screen, hosts with active connections section it shows the host name as Brother.
Re: ghost hostname
So was it in either of those files when you got it to appear again?
And, what version are you running.
And, what version are you running.
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
Please be respectful when posting. I do this in my free time on a volunteer basis.
Re: ghost hostname
No, which made sense since I had set the IP as a static IP on the VM, so I wouldn't expect them to appear in DHCP files.
I had a look in other files also, looking for 172.16.0.21 or Brother, but none of the files I tried looking in had the ip or hostname in them.
1.12.0
Re: ghost hostname
I can’t really recall how it works on 1.12, but I suspect a stale ARP cache
cat /proc/net/arp
cat /proc/net/arp
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
Please be respectful when posting. I do this in my free time on a volunteer basis.
Re: ghost hostname
I tried "cat /proc/net/arp", it listed the 172.16.0.21 ip address but the mac address was different to the one for the brother printer. So I am guessing that's not the cause.
I found a hosts.sh file in the WWW folder, thinking that's the script that generates the connected host page, and had look to see if it would give me a clue about what file might contain the ip and hostname. I could see the section that dispays the active connection, but couldn't work out where it got its info from.
I found a hosts.sh file in the WWW folder, thinking that's the script that generates the connected host page, and had look to see if it would give me a clue about what file might contain the ip and hostname. I could see the section that dispays the active connection, but couldn't work out where it got its info from.
Re: ghost hostname
/var/lib/gargoyle/define_host_vars.sh
There's also a section that comes out of the gargoyle_header_footer app.
There's also a section that comes out of the gargoyle_header_footer app.
https://lantisproject.com/downloads/gargoylebuilds for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
Please be respectful when posting. I do this in my free time on a volunteer basis.
Re: ghost hostname
I have had a play with nslookup both on Gargoyle and on a pc, and it seems that Gargoyle is definitely storing the two IP's with brother as the hostname. But no idea where.
I am wondering is there a way to do the equivalent of
ipconfig /flushdns on Gargoyle?
I am wondering is there a way to do the equivalent of
ipconfig /flushdns on Gargoyle?
Re: ghost hostname
Found it.
It was in /etc/hosts, don't know how it got in there.
Anyway I made a copy of original, then deleted the line listing 172.16.0.21 Brother
Now Nslookup only shows the one IP address for Brother.
It was in /etc/hosts, don't know how it got in there.
Anyway I made a copy of original, then deleted the line listing 172.16.0.21 Brother
Now Nslookup only shows the one IP address for Brother.