hostname broadcasting through LAN

Hi all!
Like title: I’d like to know how to make my openSUSE box broadcast its hostname through my LAN.
As you can see in the screenshot I made, my Ubuntu server and the wireless printer broadcast their hostname (and also Windows PCs when they are turned on!).

That’s not really broadcasting. That’s your router identifying the system.

My router does know the hostnames, though I think that varies from router to router. If you are currently using “NetworkManager” then I don’t know of anything you can do.

If you are using “ifup” settings, then:

  1. Make sure that you set the interface to use DHCP, instead of assigning a manual address;
  2. Set the DHCP client to use “dhclient”. You can set that in Yast “/etc/sysconfig” editor with Network → DHCP → DHCP Client → DHCPCLIENT_BIN

Whether that works may depend on your router.

I have that kind of trouble too with openSUSE. I can’t ping the openSUSE box from or to other computers. This is what I do:
There’s a line in the file /etc/nsswitch.conf that looks like this:

hosts:          files mdns_minimal [NOTFOUND=return] dns

I make it look like this:

hosts:          files mdns_minimal [NOTFOUND=return] wins dns

See the add in “wins”.
I also make sure this line is in the [global] stanza of my smb.conf file:

netbios name = boxofbolts

I always tweak my install of openSUSE that way when I have windows boxes nearby to talk to from openSUSE. But that may not relate to your problem at all, just thought I’d throw it out there.

Name Resolution in a network can be executed a number of ways…

  • If you don’t enable any Name Servers, then any time a machine first boots into a network, it should advertise itself, first by ARP, then possibly by NetBIOS broadcasts (if enabled). But NetBIOS Name Resolution in general is considered very old nowadays. With the importance of the Internet, most name resolution do <not> use this type of name resolution any more.

  • Enable a Name Resolution Server by way of an authenticating server like SAMBA or LDAP directory. Name resolution isn’t by “broadcast” because there should be an entry for your machine in the directory services. Instead of other machines “discovering” your new machine by broadcasts, they should be able to simply look up your machine.

  • Name Resolution servers come in two types, NetBIOS Name Servers (like WINS) which is WinNT4/SAMBA3 technology and lmhosts files or Hostname Resolution (DNS) and hosts files. The two types are generally exclusive of each other, if for some reason you want both types of name resolution then you need to set them up separately. But, both should generally work fine.

So, based on that info… You may want to re-formulate your original query for what you really want to setup.