I have a cisco router by which I connect my 2 pcs running ubuntu to the internet. I get the ip address by DHCP. When I check the list of pcs connected to the router, the router admin page shows ip addresses alongside hostnames. It seems that by using DHCP the router has somehow been able to catch the hostnames from "/etc/hostname" or /etc/hosts", am I right? The thing is that if I change the name of my pc by editing the file "/etc/hostname" and even "/etc/hosts", the router still stores the previous hostname, even when reset, how can I make the router store the updated hostname?
On the other hand, how can I find out the hostnames of the computers connected to my network? nmap doesn't seem to do the job. Do I have to set up a domain for all the computers in the network? How could I do this?