problems with domainname using NetworkManager vs ifup

All 3 systems: OpenSuse 13.1

I have 2 issues with NetworkManager:

  1. I have 2 machines using the ifup method and and on both of those “hostname” returns the short name “dnsdomainname” returns (on all 3 machines) the dns name as epxected, on a third machine using NetworkManager “hostname” always returns the fqd.
  2. On the 3rd machine if i use yast and tell it to switch from NetworkManager to ifup method then i have no network at all. I checked the yast network settings and all looks ok there as near as I can tell.

What file in NetworkManager holds the dns name or how do i set it so its permanent over reboot?

How can i get the 3rd machine switched over to ifup and get it working?

Just switching to “ifup” might no be enough, there are parameters to fill in there in YaST. First decision is of course if you use DHCP or not and when not you should provide IP address, netmask, hostname, domain name and check all other things there.

  1. If I were to guess, you’ve fallen for a very common mis-perception if you are testing the hostname from a remote machine. YAST (and other common networking tools) have a “Hostname” configuration when it’s really the Machine Name. The diff between them…
  • The Machine Name is the name the machine advertises how it prefers to be identified. And, typically if you resolve the hostname on the machine itself, this name will be returned.
  • But, the hostname by which remote machines might identify, find and connect to this machine can be a different name altogether, or the FQDN name instead of the shortened hostname only. There can be various reasons and sources for issuing a different hostname… DHCP might assign a different name, an entry in a machine’s local Hosts file… and less often nowadays but possible is the use of NetBIOS names (a NetBIOS nameserver or LMhosts file).

These differences in file entries on every machine can be hard to catch so probably the practical solution is to stick with one configuration method only. This is why for instance in a larger network with network security implemented (like LDAP or AD) you’d probably want to check that box that allows the machine’s hostname to be managed by DHCP and DNS.

  1. I switch machines from NM to/from ifup/ifdown and don’t see problems. The main configuration I always need to doublecheck though, is whether to configure as a DHCP client or with a static address. Be aware when you do this this, if your network information is different than before the change, this can break networking because your machine’s new information won’t be consistent with what is in others’ ARP caches. Since Linux isn’t continuously chatty like Windows machines <maybe> this won’t resolve itself or won’t resolve consistently, you may need to either reboot to re-announce your machine on the network or force an ARP broadcast.

TSU

I have all those parameters filled in, using static IP. I compared them to the other machine loking for differences, the only thing i noticed was that the “Modify DNS Policy” was set to “only Manually” and so i set it to “Use Default Policy” but it didnt help. I see that ifconfig shows the ip is assigned ok but the network just doesnt connet at all when using ifup method. Ping shows its “destination unreachable”

tsu2:
I’m getting the hostname locally not remotely, the same program runs on all 3 machines and its getting different results on #3 (fqd instead of the short name)
I can also just run hostname from a console window (locally on each pc) and see the same result, short name on pc’s 1 & 2 but long name on pc 3.
Also, no changes are being made when switching, the same ip, hostname and HW is being used, if i switch right back to NM it resumes networking. I also rebooted after switching to ifup - no joy

I think i see why ifup is failing, i found this in /var/log/messages:
ifup-wireless[1274]: command ‘iwconfig wlan0 power off’ returned
ifup-wireless[1274]: Error for wireless request “Set Power Management” (8B2C)
ifup-wireless[1274]: SET failed on device wlan0 ; Operation not supported.

Not sure what to do about it though

Seems to be hardware. Can you check if the wifi device is powered on, connected correctly, etc.?

You didn’t describe how you’re resolving the hostname.

Are you consistently using the same tool (or command)?

Probably the simplest would be to run the following on each machine exactly which returns the MACHINE NAME (does not do a hosts file lookup)

echo $HOST

TSU