On 04/15/2016 11:40 PM, sdm wrote:
I'm still going through this thread and ended up reinstalling TW on a fresh HDD, and now editing the "Name Server 1" column does indeed change the entry in /etc/resolv.conf. Does it maybe not write to that file if NetworkManager had previously edited it?
When you set a 'static' IP, resolv.conf is generated once and checked for existence thereafter and not modified, unless you change something. As Per indicated, your resolv.conf simply provides the name of your nameserver (whatever it may be, a dns server, your router, or forwarders to public dns addresses) The entries in resolv.conf would look the same as those for the dhcp setup shown below (without the dhcp reference). When you set your box to use dhcpcd, resolv.conf is updated each time you acquire an address based on the information provided by the dhcp server. For a local dns server on a class-C network you will have entries like: # Generated by dhcpcd for interface wlp23s0 search mylocaldomain.com nameserver 192.168.6.17 or # Generated by resolvconf domain mylocaldomain.com nameserver 192.168.6.17 Where 'search' or 'domain' are synonymous and simply depend on the version of dhcpcd (or dhclient) in use. I do not use wicked, for no other reason than 13.1 default was NetworkManager (IIRC). Regardless of which system you use, the resulting basic config should be relatively the same. In addition to /etc/resolv.conf, the other files that form the basics of networking are the interface files in /etc/sysconfig/network, /etc/HOSTNAME (lowercase on most other distros) and /etc/hosts. (1) In the case of a static IP, you will have an interface config file in /etc/sysconfig/network. (e.g. something like /etc/sysconfig/network/ifcfg-enp17s0, along with your ifcfg-lo and ifroute-lo configs) The interface file will hold your IP (which it should not lose) as well as basic broadcast, network, netmask information. e.g. BOOTPROTO='static' IPADDR=192.168.0.100 NETMASK=255.255.255.0 NETWORK=192.168.0.0 BROADCAST=192.168.0.255 STARTMODE=auto (the ifcfg.template file contains information describing the possible entries) If you are losing your config when your router loses power, then it seems likely one of the if-down scripts is either losing the link that relates the proper ifcfg-X file with that interface for if-up to restore, or the interface name is changing preventing restoration, etc..) That is just an educated guess. In addition to the interface, you need hostname and basic name resolution which are provided in a couple of additional files. (2) You set your hostname (NOT including the domain name) in /etc/hostname (/etc/HOSTNAME on SuSE); (3) You have your basic IP and loopback addresses stored in /etc/hosts. (you can provide name resolution for your entire network by adding entries to /etc/hosts and nothing more). It is worth looking at the comments to get a feel for what you can do with /etc/hosts. # Syntax: # # IP-Address Full-Qualified-Hostname Short-Hostname # #127.0.0.1 localhost # the default entry 127.0.0.1 yourhost.yourdomain.com localhost yourhost (note: you can have multiple 'Short-Hostmame's (aliases) after the Full-Qualified-Hostname entry -- that is how your machine knows 'localhost' is the same as 'yourhost'.) You have IPv6 entries as well: # special IPv6 addresses ::1 localhost ipv6-localhost ipv6-loopback /etc/hosts is the backbone for both local (to your computer) loopback setup (e.g. 'localhost') and your basic subnet information (anything you connect to on your local LAN -- even if that is just your box and your router). If not configured correctly, basic function calls like 'hostname' and 'dnsdomainname' will not work correctly. If you box is, for example, configured with the static IP 192.168.0.100, and you have your router (gateway) as 192.168.0.12, you add an entry to /etc/hosts that tells your box where you gateway is: 192.168.0.12 gateway.yourdomain.com gateway (this is also reflected in your default-route, and the 'yourdomain.com' portion is where your domain information is stored (there is more to the domain part, but that is the basics)) Wicked, netctl, networkmanager, etc.. are all different ways of managing the basic networking (/etc/resolv.conf, /etc/hosts, as well as the symlinks utilized by systemd, your different interfaces, wired/wireless configs, how you connect to different networks (e.g. home/work), etc.). All of this so your network configuration just "works" each time you boot, or plug/unplug switch on/off a device, or carry your laptop to a new location, etc.. Before and after you make each of your changes, it is worth checking the basic files and their entries. You can save copies of the files to compare after making changes with Yast. That may help isolate where any problem may be in the process as well as helping you become more familiar with the underlying network files so when wicked changes to the next magic network tool, you will have a good idea where to look to see what it messed up as well. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org