I have a Linksys router and I've noticed that when I look for connected PC's on the router, the name of my computer and MAC address of the wireless device appears.

However, I've noticed that for some devices it appears only the device MAC address, without a name.

For example, Apple computers connected to the router appear without a name. The PlayStation 3 and the printer appears without a name too.

So my question is, how can I stop my PC with Linux from broadcasting its name so the router can only present its MAC address and not the name?

I really don't have any share utility so I don't see any use for broadcasting my PC name.

  • What dhcp client are you running? Run ps ax | grep dhcp. If it is dhclient, it has a config file where you can turn off sending the hostname option (12). – camh Aug 17 '12 at 23:00

It's not broadcasting anything. When your PC requests an IP address via DHCP, it sends it's own name in the request. This is done because DHCP servers can use this name to pick an IP address to hand out (also some DHCP servers use this to update DNS). The client cannot know whether the DHCP server cares about the name or not, and it doesn't hurt to send it, so it gets sent. So the router is simply taking this name and storing it for informational purposes.

You can forge the hostname with some dhcp clients though. For example, with dhcpcd there is the --hostname option. You can pass something else in here if you want. But you cannot leave it blank as dhcpcd sends the real hostname if its blank.

  • I see. Now I wonder why those devices of mine show no name if it cannot be left in blank. I suppose it's something more complex. Anyway, if it can't be left blank then I prefer to leave it as it is since I have no use in changing it to another. – Michael Aug 17 '12 at 22:54
  • dhcpcd doesn't let you leave it blank. It's possible some other utility may. – Patrick Aug 17 '12 at 22:59

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.