Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question
    
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

1 Answer 1

up vote 3 down vote accepted

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.

Edit:
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.

share|improve this answer
    
Oh well. Thanks for the clarification. –  Michael Aug 17 '12 at 22:36
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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