[opensuse] Wicked Static IP & Router Power Loss
If I unplug my router from the AC, once it's plugged back in, the static IP I have set it up wicked doesn't get reinitiated. What would be the fasted way to get the interface back up? Switching from to DHCP and then re-entering the static IP info in YaST works, but I haven't yet tried: # ip link set dev <interface> up # ip link set dev <interface> down Is there a reason why the static IP that I set up in Wicked won't "stick" once the power to the router gets turned on again? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, 2016-04-13 at 12:27 -0700, sdm wrote:
If I unplug my router from the AC, once it's plugged back in, the static IP I have set it up wicked doesn't get reinitiated. What would be the fasted way to get the interface back up? Switching from to DHCP and then re-entering the static IP info in YaST works, but I haven't yet tried:
I'm confused. Firstly, is the static IP you're talking about for your computer or for the router? Secondly, are the static addresses set on the computer? If so, why would they disappear and/or why would the interface change state just because the remote device and/or network disappears for a while? If not, I'm totally lost!
# ip link set dev <interface> up # ip link set dev <interface> down
Is there a reason why the static IP that I set up in Wicked won't "stick" once the power to the router gets turned on again?
Clearly it helps if both your computer and the router think that it has the same address. Is that the case? Cheers, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/13/2016 01:18 PM, Dave Howorth wrote:
I'm confused. Firstly, is the static IP you're talking about for your computer or for the router? Secondly, are the static addresses set on the computer? If so, why would they disappear and/or why would the interface change state just because the remote device and/or network disappears for a while? If not, I'm totally lost!
The static IP is for my computer. I setup the static IP, subnet mask, and gateway address in YaST Network Settings, left DNS blank, and those settings work. I'm not saying the remote interface changed state, but for some reason switching to DHCP and then back to a static IP makes it work again. After the router loses power and comes back up. It's going ethernet > client bridge router > main router, and the client bridge router is a wireless link to the main router, so DHCP is obviously turned off on the client bridge router and is handled by the main router. I wonder if it's something to do with the client bridge in this case (DD-WRT). -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Op woensdag 13 april 2016 13:34:25 schreef sdm:
On 04/13/2016 01:18 PM, Dave Howorth wrote:
I'm confused. Firstly, is the static IP you're talking about for your computer or for the router? Secondly, are the static addresses set on the computer? If so, why would they disappear and/or why would the interface change state just because the remote device and/or network disappears for a while? If not, I'm totally lost!
The static IP is for my computer. I setup the static IP, subnet mask, and gateway address in YaST Network Settings, left DNS blank, and those
This is the culprit. You have to provide an IP address for the DNS also. With DHCP, you get also the value for the DNS. With a static address you do not get this address, so you have to provide that address with the other static values.
settings work. I'm not saying the remote interface changed state, but for some reason switching to DHCP and then back to a static IP makes it work again. After the router loses power and comes back up. It's going ethernet > client bridge router > main router, and the client bridge router is a wireless link to the main router, so DHCP is obviously turned off on the client bridge router and is handled by the main router. I wonder if it's something to do with the client bridge in this case (DD-WRT).
-- fr.gr. member openSUSE Freek de Kruijf -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/13/2016 06:31 PM, Freek de Kruijf wrote:
This is the culprit. You have to provide an IP address for the DNS also. With DHCP, you get also the value for the DNS. With a static address you do not get this address, so you have to provide that address with the other static values.
DNS only maps a name to an IP address. You don't even need it, if you just use IP addresses. So, it shouldn't cause an interface to lose a configured static address. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/13/2016 03:57 PM, James Knott wrote:
On 04/13/2016 06:31 PM, Freek de Kruijf wrote:
This is the culprit. You have to provide an IP address for the DNS also. With DHCP, you get also the value for the DNS. With a static address you do not get this address, so you have to provide that address with the other static values. DNS only maps a name to an IP address. You don't even need it, if you just use IP addresses. So, it shouldn't cause an interface to lose a configured static address.
What I found is that if I switch Wicked to DHCP, I can unplug the router all day long, plugging it back in and it's fine. If I setup a static route, no dice. I also noticed that YaST2 networking settings didn't write a nameserver to /etc/resolv.conf, that I either have to enter manually or NetworkManager will auto generate one. Is the user supposed to know to add their nameserver to /etc/resolv.conf or is there something in the YaST2 Network Settings Wicked setup that writes the name server to that file? When I entered the Name Server on the Hostname/DNS tab, nothing ever gets written to /etc/resolv.conf, so I did some tests and tried to get YaST2 to write to /etc/resolv.conf after clearing out the entire file (cleared all characters) and it doesn't. So if I specify the Name Server on the Hostname/DNS tab, I can't properly access web pages. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/13/2016 04:13 PM, sdm wrote:
So if I specify the Name Server on the Hostname/DNS tab, I can't properly access web pages. Meaning specifying it there, but leaving /etc/resolv.conf blank -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
sdm wrote:
On 04/13/2016 04:13 PM, sdm wrote:
So if I specify the Name Server on the Hostname/DNS tab, I can't properly access web pages. Meaning specifying it there, but leaving /etc/resolv.conf blank
*** I admit this is a long reply that exceeds the attention span of most *** internet users, but please take the time to read it as it may not only *** solve your question, but several other questions that will probably *** come-up if you try to go further in getting a static IP. Some questions: 1) What is resolving external network names to IP addresses? I.e. in a web browser, I assume you are not typing in IP addresses, not to mention inter-site links wouldn't work. 2) Hazarding a guess, but your router may have been configured by your ISP to access their own DNS servers or some other public-access servers (like google's, for example). 3) You say you are assigning a static IP. Where are you getting the IP address you are using? If it is out of the "local address only" range, the first time you try to contact DNS, if it comes out of your router, it may assign you a new address out of its dynamic pool -- as it would have no current reservation for your "static IP" in its tables -- i.e. it would consider that your reservation had expired or timed out. If you are using an IP outside the local-only-range, it may do a reverse lookup on the IP to see if the returned host name corresponds to your computer. Basically -- alot depends on where you are getting your Domain Names resolved (and how). It sounds most probable that your router has been setup to "transparently" do this for you -- but in doing so, it gives your router the "power" to change other settings as well. You could setup your own DNS service on your own system and only use the router in some pass-thru mode. But your ISP may ONLY assign dynamic IP addresses to your router for your home IP usage. Many, probably most ISP's charge extra for you to be given a 'static IP' as they are rare, while they can assign the 'local IP's (10.x.x.x/8, 192.168.x.x/16 and 172.16.0.0/12 -> 172.31.255.255/12) or allow your computer to selfconfig with a link-local addr in the range 169.254.1.0 -> 169.254.254.255. You don't have to operate an authoritative name server on your system, but one that simply queries 'google' (who has setup these addresses for public use). 8.8.8.8 google-public-dns-a.google.com 8.8.4.4 google-public-dns-b.google.com But if you want a "static" address that will be reachable outside of your local network, you'll need, at least, to get one from your ISP -- who will likely require a domain name (which means purchasing a domain name as well). Hope this helps. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/15/2016 12:57 AM, Linda Walsh wrote:
But if you want a "static" address that will be reachable outside of your local network, you'll need, at least, to get one from your ISP -- who will likely require a domain name (which means purchasing a domain name as well).
That depends. My Internet connection has a dhcp address, but it changes so seldom (years) it might as well be static. Also, my host name is based on cable modem and router mac addresses. So, unless I change hardware, my host name never changes. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/15/2016 04:15 AM, James Knott wrote:
On 04/15/2016 12:57 AM, Linda Walsh wrote:
But if you want a "static" address that will be reachable outside of your local network, you'll need, at least, to get one from your ISP -- who will likely require a domain name (which means purchasing a domain name as well).
That depends. My Internet connection has a dhcp address, but it changes so seldom (years) it might as well be static. Also, my host name is based on cable modem and router mac addresses. So, unless I change hardware, my host name never changes.
And then there is Dyndns and 27 others that will handle a routeable name for you to your router's public IP address. The client is even included in opensuse packages. -- After all is said and done, more is said than done. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/15/2016 09:43 PM, John Andersen wrote:
On 04/15/2016 04:15 AM, James Knott wrote:
But if you want a "static" address that will be reachable outside of your local network, you'll need, at least, to get one from your ISP -- who will likely require a domain name (which means purchasing a domain name as well). That depends. My Internet connection has a dhcp address, but it changes so seldom (years) it might as well be static. Also, my host name is
On 04/15/2016 12:57 AM, Linda Walsh wrote: based on cable modem and router mac addresses. So, unless I change hardware, my host name never changes.
And then there is Dyndns and 27 others that will handle a routeable name for you to your router's public IP address. The client is even included in opensuse packages.
Why would I need that? As I said, I have a static host name and virtually static address. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
James Knott wrote:
On 04/15/2016 09:43 PM, John Andersen wrote:
On 04/15/2016 04:15 AM, James Knott wrote:
But if you want a "static" address that will be reachable outside of your local network, you'll need, at least, to get one from your ISP -- who will likely require a domain name (which means purchasing a domain name as well). That depends. My Internet connection has a dhcp address, but it changes so seldom (years) it might as well be static. Also, my host name is
On 04/15/2016 12:57 AM, Linda Walsh wrote: based on cable modem and router mac addresses. So, unless I change hardware, my host name never changes.
And then there is Dyndns and 27 others that will handle a routeable name for you to your router's public IP address. The client is even included in opensuse packages.
Why would I need that? As I said, I have a static host name and virtually static address.
Ok, lets say your hostname is static. What's it's static domain name? As for the "virtual" static address. Virtual != assigned and reserved. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/16/2016 12:28 AM, Linda Walsh wrote:
Ok, lets say your hostname is static. What's it's static domain name?
The domain name is the one assigned by my isp. It's CPE<firewall MAC address>-CM<cable modem MAC address>cpe.net.cable.rogers.com. That host name will not change unless I change hardware. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/16/2016 12:28 AM, Linda Walsh wrote:
As for the "virtual" static address. Virtual != assigned and reserved.
As I mentioned, it lasts for years. As long as my MAC address is in the DHCP server's cache, it is "reserved". The DHCP lease time is one week. Unless I change hardware, my IP address only changes when my ISP makes network changes. It's been a few years since that last happened. Also, I do use a regular DNS server, with my own domain name. I have configured AAAA records for my IPv6 addresses, which are static, and an alias to map a host name in my domain to that long MAC address based one. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
James Knott wrote:
On 04/15/2016 09:43 PM, John Andersen wrote:
On 04/15/2016 04:15 AM, James Knott wrote:
But if you want a "static" address that will be reachable outside of your local network, you'll need, at least, to get one from your ISP -- who will likely require a domain name (which means purchasing a domain name as well). That depends. My Internet connection has a dhcp address, but it changes so seldom (years) it might as well be static. Also, my host name is
On 04/15/2016 12:57 AM, Linda Walsh wrote: based on cable modem and router mac addresses. So, unless I change hardware, my host name never changes.
And then there is Dyndns and 27 others that will handle a routeable name for you to your router's public IP address. The client is even included in opensuse packages.
Why would I need that? As I said, I have a static host name and virtually static address.
Because "virtually static" != "static" ? If you depend on your IP address remaining mapped to your hostname, I would certainly use a dyndns setup. /Per -- Per Jessen, Zürich (3.8°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/16/2016 02:59 AM, Per Jessen wrote:
Because "virtually static" != "static" ? If you depend on your IP address remaining mapped to your hostname, I would certainly use a dyndns setup.
1) My IP address hasn't changed for years. It requires a hardware change or an ISP network change, which happens even less often than a hardware change. 2) My host name is dependent on my hardware MAC addresses. They won't change without my knowing. I do use a DNS server, with AAAA records for my (static) IPv6 addresses and an alias to change that MAC based address into something more convenient on IPv4. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 14/04/16 01:13, sdm wrote:
What I found is that if I switch Wicked to DHCP, I can unplug the router all day long, plugging it back in and it's fine. If I setup a static route, no dice. I also noticed that YaST2 networking settings didn't write a nameserver to /etc/resolv.conf, that I either have to enter manually or NetworkManager will auto generate one. Is the user supposed to know to add their nameserver to /etc/resolv.conf or is there something in the YaST2 Network Settings Wicked setup that writes the name server to that file? When I entered the Name Server on the Hostname/DNS tab, nothing ever gets written to /etc/resolv.conf, so I did some tests and tried to get YaST2 to write to /etc/resolv.conf after clearing out the entire file (cleared all characters) and it doesn't. So if I specify the Name Server on the Hostname/DNS tab, I can't properly access web pages.
This all touches on what I mentioned in my own recent post to which you contributed. I did a fresh install of Leap 42.1 on a brand new machine, simply choosing the KDE desktop and accepting all defaults other than my own preferred partioning and formatting. Being a wired connection it was detected during installation and I went with the default Wicked setup. I forget whether I changed to a static IP during or after installation, I assume after. The setup I was left with seemed somewhat broken, but it took me so much fiddling over so many days to get a grasp on where the problem might lie, and not being over familiar until then with network configuration files I didn't have the knowledge or info to file a bug report. Now your report seems to confirm something is amiss, although I wonder if, with all the updates to Leap, a new install + updates now would generate the same issue. The resolv.conf file didn't contain the right details and entering them in YaST fails to insert them, even though I'd added name servers and the default IPv4 gateway within the Network Settings dialogs. No routes file is generated in /etc/sysconfig/network. I supposed at the time that Wicked used some other configuration and these details weren't necessary. Following the install and basic setup, I found accessing websites was unusually slow with a delay of sometimes many seconds loading each page. For a brand new quad core machine with 8GB or RAM, no other apps running, root on an NVMe drive, etc. this was clearly not right, and the old decommissioned P4 machine along with my ageing laptop going via the same router's wifi were experiencing no such delays. The problem persisted until my most recent visit. It remains to be seen after the recent fiasco and replacement of the router, and reconfiguration of the network settings, whether the delay issue is resolved. I'm not there to test in person. gumb -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/13/2016 04:29 PM, gumb wrote:
I wonder if, with all the updates to Leap, a new install + updates now would generate the same issue.
The resolv.conf file didn't contain the right details and entering them in YaST fails to insert them, even though I'd added name servers and the default IPv4 gateway within the Network Settings dialogs. No routes file is generated in /etc/sysconfig/network. I supposed at the time that Wicked used some other configuration and these details weren't necessary. This is Tumbleweed, latest snapshot, just for the record. If I entered a name server in YaST2 Network Settings on the Hostname/DNS tab and it wrote that somewhere else, DNS won't work properly until I add the name server to /etc/resolv.conf. So either I'm doing something wrong and missing something or its an issue with Yast2 and/or Wicked. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Op woensdag 13 april 2016 16:35:39 CEST schreef sdm:
On 04/13/2016 04:29 PM, gumb wrote:
I wonder if, with all the updates to Leap, a new install + updates now would generate the same issue.
The resolv.conf file didn't contain the right details and entering them in YaST fails to insert them, even though I'd added name servers and the default IPv4 gateway within the Network Settings dialogs. No routes file is generated in /etc/sysconfig/network. I supposed at the time that Wicked used some other configuration and these details weren't necessary.
This is Tumbleweed, latest snapshot, just for the record. If I entered a name server in YaST2 Network Settings on the Hostname/DNS tab and it wrote that somewhere else, DNS won't work properly until I add the name server to /etc/resolv.conf. So either I'm doing something wrong and missing something or its an issue with Yast2 and/or Wicked.
Did you read the lines about editing /etc/resolv.conf, they're in the file. Years ago I missed reading those lines which threw me in a situation like you describe. If I suspect /etc/resolv.conf not to be correct, I remove it, restart the networkservice so that it will be regenerated. -- Gertjan Lettink, a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Knurpht - Gertjan Lettink wrote:
Op woensdag 13 april 2016 16:35:39 CEST schreef sdm:
On 04/13/2016 04:29 PM, gumb wrote:
I wonder if, with all the updates to Leap, a new install + updates now would generate the same issue.
The resolv.conf file didn't contain the right details and entering them in YaST fails to insert them, even though I'd added name servers and the default IPv4 gateway within the Network Settings dialogs. No routes file is generated in /etc/sysconfig/network. I supposed at the time that Wicked used some other configuration and these details weren't necessary.
This is Tumbleweed, latest snapshot, just for the record. If I entered a name server in YaST2 Network Settings on the Hostname/DNS tab and it wrote that somewhere else, DNS won't work properly until I add the name server to /etc/resolv.conf. So either I'm doing something wrong and missing something or its an issue with Yast2 and/or Wicked.
Did you read the lines about editing /etc/resolv.conf, they're in the file. Years ago I missed reading those lines which threw me in a situation like you describe. If I suspect /etc/resolv.conf not to be correct, I remove it, restart the networkservice so that it will be regenerated.
Slight overkill, vi will suffice :-) nameserver x.x.x.x search <localdom> -- Per Jessen, Zürich (8.4°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Did you read the lines about editing /etc/resolv.conf, they're in the file. Years ago I missed reading those lines which threw me in a situation like you describe. If I suspect /etc/resolv.conf not to be correct, I remove it, restart the networkservice so that it will be regenerated. 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
On 04/14/2016 12:27 AM, Knurpht - Gertjan Lettink wrote: the entry in /etc/resolv.conf. Does it maybe not write to that file if NetworkManager had previously edited it? As I wrote earlier, I have a wired connection to a Client Bridge router. The Client Bridge router does tx/rx via a wireless link to my main router which WAN port is connected to the cable modem. If I lose power on the Client Bridge router and have a static IP set up with SuSE Tumbleweed or Windows 7, when plugging the power back in the machines do not have DNS. I can still type the IP in of the routers and access the GUI page, but no DNS. I originally started this thread thinking it may be a wicked issue, but after confirming the same behaviour happens on a Windows laptop, there's no way it's wicked. If either the Windows 7 machine or my SuSE TW install is set to DHCP, I can unplug the client bridge router over and over again and the machines get DNS no problem, and last I checked I think they are even getting the same IP address. I made sure to set everything correctly as far as name server, gateway, and an IP that didn't conflict with the DHCP range. So right now, I'm stumped. I'll just use DHCP, but it would be nice to know a technical reason as to why this is happening (both routers run the latest beta version of DD-WRT). -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Op vrijdag 15 april 2016 21:40:27 CEST schreef sdm:
On 04/14/2016 12:27 AM, Knurpht - Gertjan Lettink wrote:
Did you read the lines about editing /etc/resolv.conf, they're in the file. Years ago I missed reading those lines which threw me in a situation like you describe. If I suspect /etc/resolv.conf not to be correct, I remove it, restart the networkservice so that it will be regenerated.
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?
As I wrote earlier, I have a wired connection to a Client Bridge router. The Client Bridge router does tx/rx via a wireless link to my main router which WAN port is connected to the cable modem. If I lose power on the Client Bridge router and have a static IP set up with SuSE Tumbleweed or Windows 7, when plugging the power back in the machines do not have DNS. I can still type the IP in of the routers and access the GUI page, but no DNS. I originally started this thread thinking it may be a wicked issue, but after confirming the same behaviour happens on a Windows laptop, there's no way it's wicked. If either the Windows 7 machine or my SuSE TW install is set to DHCP, I can unplug the client bridge router over and over again and the machines get DNS no problem, and last I checked I think they are even getting the same IP address. I made sure to set everything correctly as far as name server, gateway, and an IP that didn't conflict with the DHCP range. So right now, I'm stumped. I'll just use DHCP, but it would be nice to know a technical reason as to why this is happening (both routers run the latest beta version of DD-WRT).
Using the IP address of the main router as the gateway, or the IP address of the client bridge router? Check the values you're getting from DHCP, using ip addr and su -c 'route -n' and cat /etc/resolv.conf Use exactly these values for the static config. That should work, since it works with DHCP. Reinstalling should not make any difference. A reliable OS should ( and does ) create an identical situation. -- Gertjan Lettink, a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
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
On 04/14/2016 12:27 AM, Knurpht - Gertjan Lettink wrote:
Op woensdag 13 april 2016 16:35:39 CEST schreef sdm:
On 04/13/2016 04:29 PM, gumb wrote:
I wonder if, with all the updates to Leap, a new install + updates now would generate the same issue.
The resolv.conf file didn't contain the right details and entering them in YaST fails to insert them, even though I'd added name servers and the default IPv4 gateway within the Network Settings dialogs. No routes file is generated in /etc/sysconfig/network. I supposed at the time that Wicked used some other configuration and these details weren't necessary. This is Tumbleweed, latest snapshot, just for the record. If I entered a name server in YaST2 Network Settings on the Hostname/DNS tab and it wrote that somewhere else, DNS won't work properly until I add the name server to /etc/resolv.conf. So either I'm doing something wrong and missing something or its an issue with Yast2 and/or Wicked. Did you read the lines about editing /etc/resolv.conf, they're in the file. Years ago I missed reading those lines which threw me in a situation like you describe. If I suspect /etc/resolv.conf not to be correct, I remove it, restart the networkservice so that it will be regenerated.
I ended up changing the configuration of the client bridge router into a WDS Station, and the main router to a WDS AP. Now, with a static IP setup through YaST the WDS Station can lose power and as soon as it's back up I can access all webpages and DNS works perfectly. If I were using those same YaST Network settings with the same router in client bridge mode and with the wireless mode on the main router as "AP", once the router lost power I would have no DNS once the client bridge router came back up. All the static settings in YaST must be right if I am having no issues now with WDS. For whatever reason, client bridge mode with DD-WRT didn't like my static IP setup once the power came back up as I would have no DNS until switching to DHCP and then back to static. It may have also worked if I changed the IP to something else and then back to the original private address, but I don't think I had tried that. I have a spare identical unit, so I can put that in client bridge mode and the router back in AP mode to try to nail this one down, but as it stands now I am stumped. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Op woensdag 13 april 2016 16:13:37 CEST schreef sdm:
On 04/13/2016 03:57 PM, James Knott wrote:
On 04/13/2016 06:31 PM, Freek de Kruijf wrote:
This is the culprit. You have to provide an IP address for the DNS also. With DHCP, you get also the value for the DNS. With a static address you do not get this address, so you have to provide that address with the other static values.
DNS only maps a name to an IP address. You don't even need it, if you just use IP addresses. So, it shouldn't cause an interface to lose a configured static address.
What I found is that if I switch Wicked to DHCP, I can unplug the router all day long, plugging it back in and it's fine. If I setup a static route, no dice. I also noticed that YaST2 networking settings didn't write a nameserver to /etc/resolv.conf, that I either have to enter manually or NetworkManager will auto generate one. Is the user supposed to know to add their nameserver to /etc/resolv.conf or is there something in the YaST2 Network Settings Wicked setup that writes the name server to that file? When I entered the Name Server on the Hostname/DNS tab, nothing ever gets written to /etc/resolv.conf, so I did some tests and tried to get YaST2 to write to /etc/resolv.conf after clearing out the entire file (cleared all characters) and it doesn't. So if I specify the Name Server on the Hostname/DNS tab, I can't properly access web pages.
For a static IP address, proper networking + internet connection NEED DNS('s) and a gateway ( to the external network behind the router ). When using Networkmanager one has some intermediate options ( static IP, DNS's obtained from the router ), but not so using wicked. A thing I've seen a couple of times now, is routers that are able to hand out fixed IP's for certain MAC addresses, in some occasions advertised in the interface as "static configuration", which IMHO is at least confusing if not completely wrong. On two occasions the owner had the impression the configuration needed to be done on both local machine and the router, doing so wanted to make sure he did not miss any configuration, so applied a static IP on the local machine. Somehow the router would not accept the connection as if it was failing to hand out an IP that was already in use, yet to the same machine. Removing the fixed IP entry from the router solved it. Another thing I've seen is machines with static IP that borked an entire network because they used an IP in de DHCP range. My personal policy here is to reserve the first 50 IP addresses for static usage, and DHCP starting from at x.x.x.51, use Google's DNS's 8.8.8.8 and 8.8.4.4 ( or an "own" DNS ). Just tested: Setting wicked to use a static IP address, whilst at the same time entering Google's DNS's, the router's IP address as the gateway, does write these to /etc/resolv.conf. Both on Leap and TW. -- Gertjan Lettink, a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Knurpht - Gertjan Lettink wrote:
A thing I've seen a couple of times now, is routers that are able to hand out fixed IP's for certain MAC addresses, in some occasions advertised in the interface as "static configuration", which IMHO is at least confusing if not completely wrong.
No, that is a perfectly reasonable thing to do. With that, you can leave your devices in the default state (dhcp) and still have fixed addresses assigned. We discussed that only a few weeks back. I've been using such a setup for 10+ years.
Another thing I've seen is machines with static IP that borked an entire network because they used an IP in de DHCP range.
Typically a DHCP server will check the arp table to see if a supposedly unassigned address is already used by someone (statically), but I doubt if all DHCP servers do this. -- Per Jessen, Zürich (14.3°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/14/2016 08:18 AM, Per Jessen wrote:
Typically a DHCP server will check the arp table to see if a supposedly unassigned address is already used by someone (statically), but I doubt if all DHCP servers do this.
Data in an arp cache doesn't last very long. Some servers will ping an address before assigning it. Some clients will also do that before using a DHCP assigned address. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
James Knott wrote:
On 04/14/2016 08:18 AM, Per Jessen wrote:
Typically a DHCP server will check the arp table to see if a supposedly unassigned address is already used by someone (statically), but I doubt if all DHCP servers do this.
Data in an arp cache doesn't last very long. Some servers will ping an address before assigning it.
Yes, any server that checks it will no doubt ping first.
Some clients will also do that before using a DHCP assigned address.
Hmm, yes, I think I've seen that mentioned too. -- Per Jessen, Zürich (14.7°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/14/2016 08:42 AM, Per Jessen wrote:
Data in an arp cache doesn't last very long. Some servers will ping
an address before assigning it. Yes, any server that checks it will no doubt ping first.
If it successfully pings, there's no need to check the arp cache. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Op woensdag 13 april 2016 16:13:37 schreef sdm:
On 04/13/2016 03:57 PM, James Knott wrote:
On 04/13/2016 06:31 PM, Freek de Kruijf wrote:
This is the culprit. You have to provide an IP address for the DNS also. With DHCP, you get also the value for the DNS. With a static address you do not get this address, so you have to provide that address with the other static values.
DNS only maps a name to an IP address. You don't even need it, if you just use IP addresses. So, it shouldn't cause an interface to lose a configured static address.
What I found is that if I switch Wicked to DHCP, I can unplug the router all day long, plugging it back in and it's fine. If I setup a static route, no dice. I also noticed that YaST2 networking settings didn't write a nameserver to /etc/resolv.conf, that I either have to enter manually or NetworkManager will auto generate one. Is the user supposed to know to add their nameserver to /etc/resolv.conf or is there something in the YaST2 Network Settings Wicked setup that writes the name server to that file? When I entered the Name Server on the Hostname/DNS tab, nothing ever gets written to /etc/resolv.conf, so I did some tests and tried to get YaST2 to write to /etc/resolv.conf after clearing out the entire file (cleared all characters) and it doesn't. So if I specify the Name Server on the Hostname/DNS tab, I can't properly access web pages.
In YaST when configuring a static address for an interface you have to provide the static address, the netmask, the IP address of the default route and the IP address of the DNS. The first two end up in the file ifcfg..., the default route in the file route and the IP address of the DNS in the file config. When starting the network the system enters the DNS value in resolv.conf. -- fr.gr. member openSUSE Freek de Kruijf -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/14/2016 01:28 AM, Freek de Kruijf wrote:
When starting the network the system enters the DNS value in resolv.conf. Can you tell me the exact field in Yast2 Networking where the IP you enter gets written to resolv.conf? I thought it would be "Name Server 1", but when entering it there nothing ever gets written. I have tried entering the static IP info in every correct field possible for the Wicked setup and nothing ever gets written to resolv.conf. Also, NetworkManager wiped out resolv.conf and generates its own entry, so since I used to use that all the instructions in resolv.conf are now gone. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
sdm wrote:
On 04/14/2016 01:28 AM, Freek de Kruijf wrote:
When starting the network the system enters the DNS value in resolv.conf. Can you tell me the exact field in Yast2 Networking where the IP you enter gets written to resolv.conf? I thought it would be "Name Server 1", but when entering it there nothing ever gets written.
That is the one.
I have tried entering the static IP info in every correct field possible for the Wicked setup and nothing ever gets written to resolv.conf.
The static address will be written to /etc/sysconfig/network/ifcfg-xxxx::IPADDR
Also, NetworkManager wiped out resolv.conf and generates its own entry, so since I used to use that all the instructions in resolv.conf are now gone.
see "man resolv.conf". You don't need much - nameserver 1.2.3.4 search <defdomain> -- Per Jessen, Zürich (12.1°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Op donderdag 14 april 2016 04:09:09 schreef sdm:
On 04/14/2016 01:28 AM, Freek de Kruijf wrote:
When starting the network the system enters the DNS value in resolv.conf.
Can you tell me the exact field in Yast2 Networking where the IP you enter gets written to resolv.conf? I thought it would be "Name Server 1", but when entering it there nothing ever gets written. I have tried entering the static IP info in every correct field possible for the Wicked setup and nothing ever gets written to resolv.conf. Also, NetworkManager wiped out resolv.conf and generates its own entry, so since I used to use that all the instructions in resolv.conf are now gone.
This is the value of the parameter NETCONFIG_DNS_STATIC_SERVERS= in /etc/sysconfig/network/config Before setting these values in /etc/resolv.conf, the content of that file is checked to see if you have changed that file by hand. If so the file /etc/resolv.conf is left alone. Inspect the output of "journalctl -b -u wickedd" and "journalctl -b -u wicked"; there might be a message about /etc/resolv.conf not being changed. Also "wicked --log-level debug --log-target stderr ifup <ifname>" may give a clue. -- fr.gr. member openSUSE Freek de Kruijf -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/13/2016 03:57 PM, James Knott wrote:
On 04/13/2016 06:31 PM, Freek de Kruijf wrote:
This is the culprit. You have to provide an IP address for the DNS also. With DHCP, you get also the value for the DNS. With a static address you do not get this address, so you have to provide that address with the other static values. DNS only maps a name to an IP address. You don't even need it, if you just use IP addresses. So, it shouldn't cause an interface to lose a configured static address.
It's looking like a DNS issue, because I can't access i.e. www.google.com, but if I type in: 192.168.1.1 the router GUI comes up, after a router power loss using a static IP. So the static route doesn't work after a router power loss, DHCP does, so I'm stumped. I can only get the static route going again if I switch to DHCP and then back to static. ifdown and ifup don't work. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2016-04-14 02:07, sdm wrote:
On 04/13/2016 03:57 PM, James Knott wrote:
On 04/13/2016 06:31 PM, Freek de Kruijf wrote:
This is the culprit. You have to provide an IP address for the DNS also. With DHCP, you get also the value for the DNS. With a static address you do not get this address, so you have to provide that address with the other static values. DNS only maps a name to an IP address. You don't even need it, if you just use IP addresses. So, it shouldn't cause an interface to lose a configured static address.
It's looking like a DNS issue, because I can't access i.e. www.google.com, but if I type in: 192.168.1.1 the router GUI comes up, after a router power loss using a static IP. So the static route doesn't work after a router power loss, DHCP does, so I'm stumped. I can only get the static route going again if I switch to DHCP and then back to static. ifdown and ifup don't work.
What Freek de Kruijf said is correct. That is the cause. And, if what sdm said, that the DNS config written in YaST doesn't catch is true (a bug that should be reported in bugzilla), then you need to apply his workaround (write the appropriate line in resolv.conf file yourself). - -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAlcO4QUACgkQja8UbcUWM1xckQD/fzO6oWOcPibkzGEKjGpbogW0 bRofF+idGGhABYcqZKABAJUsoUdAQBxreKH6DHU2mVzGO+Hig8ZNdnab6+O3n6IC =MKUE -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 2016-04-14 02:07, sdm wrote:
On 04/13/2016 03:57 PM, James Knott wrote:
On 04/13/2016 06:31 PM, Freek de Kruijf wrote:
This is the culprit. You have to provide an IP address for the DNS also. With DHCP, you get also the value for the DNS. With a static address you do not get this address, so you have to provide that address with the other static values. DNS only maps a name to an IP address. You don't even need it, if you just use IP addresses. So, it shouldn't cause an interface to lose a configured static address.
It's looking like a DNS issue, because I can't access i.e. www.google.com, but if I type in: 192.168.1.1 the router GUI comes up, after a router power loss using a static IP. So the static route doesn't work after a router power loss, DHCP does, so I'm stumped. I can only get the static route going again if I switch to DHCP and then back to static. ifdown and ifup don't work. What Freek de Kruijf said is correct. That is the cause.
And, if what sdm said, that the DNS config written in YaST doesn't catch is true (a bug that should be reported in bugzilla), then you need to apply his workaround (write the appropriate line in resolv.conf file yourself).
- -- Cheers / Saludos,
Carlos E. R.
(from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux)
iF4EAREIAAYFAlcO4QUACgkQja8UbcUWM1xckQD/fzO6oWOcPibkzGEKjGpbogW0 bRofF+idGGhABYcqZKABAJUsoUdAQBxreKH6DHU2mVzGO+Hig8ZNdnab6+O3n6IC =MKUE -----END PGP SIGNATURE----- Static IP is set to 192.168.1.5. Subnetmask is set, 255.255.255.0. On Hostname/DNS, under Name Server 1, I set it to 192.168.1.1. And tried "Use Default Policy", "Only Manually", and "Use Custom Policy" with Custom Policy Rule set to auto or static. I've also the entire time had
On 04/13/2016 05:15 PM, Carlos E. R. wrote: the name sever of 192.168.1.1 in the /etc/resolv.conf file. The Gateway I set to 192.168.1.1. Once again, if I unplug the router and plug it back in, with the above settings DNS does not work until switching to DHCP, then back to static. If I leave it on static with the above settings, unplug the router, and then plug it back in, DNS does not work. I can access the router at 192.168.1.1, but can't go to any web address. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2016-04-14 02:24, sdm wrote:
Static IP is set to 192.168.1.5. Subnetmask is set, 255.255.255.0. On Hostname/DNS, under Name Server 1, I set it to 192.168.1.1. And tried "Use Default Policy", "Only Manually", and "Use Custom Policy" with Custom Policy Rule set to auto or static. I've also the entire time had the name sever of 192.168.1.1 in the /etc/resolv.conf file. The Gateway I set to 192.168.1.1.
Once again, if I unplug the router and plug it back in, with the above settings DNS does not work until switching to DHCP, then back to static. If I leave it on static with the above settings, unplug the router, and then plug it back in, DNS does not work. I can access the router at 192.168.1.1, but can't go to any web address.
With static settings, unplug the router, reconnect, then do: ip addr ip route cat /etc/resolv.conf | egrep -v "^[[:space:]]*$|^#" Then, ping 192.168.1.1 ping 8.8.8.8 ping google.com then, change to dhcp and back, and repeat all the above, and post all that back here. - -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAlcO5+YACgkQja8UbcUWM1xjRQEAlTolF8qqpI55v402dXo1WdCN TLkTFOyAcXpn1c1KPqYA/RDxjEj4/M2KH8MgaSmspp7GTvZltoOitUCVQ26hiYHn =lWxd -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/13/2016 05:44 PM, Carlos E. R. wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 2016-04-14 02:24, sdm wrote:
Static IP is set to 192.168.1.5. Subnetmask is set, 255.255.255.0. On Hostname/DNS, under Name Server 1, I set it to 192.168.1.1. And tried "Use Default Policy", "Only Manually", and "Use Custom Policy" with Custom Policy Rule set to auto or static. I've also the entire time had the name sever of 192.168.1.1 in the /etc/resolv.conf file. The Gateway I set to 192.168.1.1.
Once again, if I unplug the router and plug it back in, with the above settings DNS does not work until switching to DHCP, then back to static. If I leave it on static with the above settings, unplug the router, and then plug it back in, DNS does not work. I can access the router at 192.168.1.1, but can't go to any web address. With static settings, unplug the router, reconnect, then do:
ip addr ip route cat /etc/resolv.conf | egrep -v "^[[:space:]]*$|^#"
Then,
ping 192.168.1.1 ping 8.8.8.8 ping google.com
then, change to dhcp and back, and repeat all the above, and post all that back here.
- -- Cheers / Saludos,
Carlos E. R.
(from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux)
iF4EAREIAAYFAlcO5+YACgkQja8UbcUWM1xjRQEAlTolF8qqpI55v402dXo1WdCN TLkTFOyAcXpn1c1KPqYA/RDxjEj4/M2KH8MgaSmspp7GTvZltoOitUCVQ26hiYHn =lWxd -----END PGP SIGNATURE----- After replugging router with static IP:
# ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 8c:89:a5:6f:52:b3 brd ff:ff:ff:ff:ff:ff inet 192.168.1.4/24 brd 192.168.1.255 scope global enp7s0 valid_lft forever preferred_lft forever inet6 fe80::8e89:a5ff:fe6f:52b3/64 scope link valid_lft forever preferred_lft forever # ip route default via 192.168.1.1 dev enp7s0 192.168.1.0/24 dev enp7s0 proto kernel scope link src 192.168.1.4 # cat /etc/resolv.conf | egrep -v "^[[:space:]]*$|^#" nameserver 192.168.1.1 # ping 192.168.1.1 PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data. 64 bytes from 192.168.1.1: icmp_seq=1 ttl=63 time=1.26 ms 64 bytes from 192.168.1.1: icmp_seq=2 ttl=63 time=1.25 ms 64 bytes from 192.168.1.1: icmp_seq=3 ttl=63 time=1.78 ms ^C --- 192.168.1.1 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2002ms rtt min/avg/max/mdev = 1.256/1.433/1.780/0.245 ms # ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. From 192.168.1.3 icmp_seq=13 Destination Host Unreachable From 192.168.1.3 icmp_seq=19 Destination Host Unreachable # ping google.com PING google.com (216.58.218.110) 56(84) bytes of data. ^C --- google.com ping statistics --- 26 packets transmitted, 0 received, 100% packet loss, time 25158ms ----------Now, I have switched to DHCP and back to static:---------- # ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 8c:89:a5:6f:52:b3 brd ff:ff:ff:ff:ff:ff inet 192.168.1.4/24 brd 192.168.1.255 scope global enp7s0 valid_lft forever preferred_lft forever inet6 fe80::8e89:a5ff:fe6f:52b3/64 scope link valid_lft forever preferred_lft forever # ip route default via 192.168.1.1 dev enp7s0 192.168.1.0/24 dev enp7s0 proto kernel scope link src 192.168.1.4 # cat /etc/resolv.conf | egrep -v "^[[:space:]]*$|^#" nameserver 192.168.1.1 # ping 192.168.1.1 PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data. 64 bytes from 192.168.1.1: icmp_seq=1 ttl=63 time=1.34 ms 64 bytes from 192.168.1.1: icmp_seq=2 ttl=63 time=1.19 ms 64 bytes from 192.168.1.1: icmp_seq=3 ttl=63 time=1.19 ms ^C --- 192.168.1.1 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2002ms rtt min/avg/max/mdev = 1.197/1.245/1.342/0.079 ms # ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=55 time=22.9 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=55 time=15.2 ms 64 bytes from 8.8.8.8: icmp_seq=3 ttl=55 time=14.6 ms ^C --- 8.8.8.8 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2003ms rtt min/avg/max/mdev = 14.672/17.605/22.900/3.752 ms # ping google.com PING google.com (216.58.194.142) 56(84) bytes of data. 64 bytes from dfw06s49-in-f14.1e100.net (216.58.194.142): icmp_seq=1 ttl=51 time=72.1 ms 64 bytes from dfw06s49-in-f14.1e100.net (216.58.194.142): icmp_seq=2 ttl=51 time=70.7 ms 64 bytes from dfw06s49-in-f14.1e100.net (216.58.194.142): icmp_seq=3 ttl=51 time=71.1 ms ^C --- google.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2003ms rtt min/avg/max/mdev = 70.715/71.334/72.102/0.653 ms I will plug a Windows laptop with a static IP assigned into the client bridge router later to see what happens. Once again, I have a DD-WRT client bridge router with DHCP shut off that I plug the ethernet cable into. That router talks wirelessly to my main router which is thr DHCP server and which is connected to the cable modem. But if that were part of this whole problem, I don't see why Wicked and DHCP work fine and static addressing doesn't, unless this is some odd bug. Maybe someone can set a static IP and test, unplug the router and plug it back in and see if they still have DNS? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-04-14 03:26, sdm wrote:
On 04/13/2016 05:44 PM, Carlos E. R. wrote:
With static settings, unplug the router, reconnect, then do: ... After replugging router with static IP:
# ip addr 2: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 8c:89:a5:6f:52:b3 brd ff:ff:ff:ff:ff:ff inet 192.168.1.4/24 brd 192.168.1.255 scope global enp7s0 valid_lft forever preferred_lft forever inet6 fe80::8e89:a5ff:fe6f:52b3/64 scope link valid_lft forever preferred_lft forever
# ip route default via 192.168.1.1 dev enp7s0 192.168.1.0/24 dev enp7s0 proto kernel scope link src 192.168.1.4
# cat /etc/resolv.conf | egrep -v "^[[:space:]]*$|^#" nameserver 192.168.1.1
# ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. From 192.168.1.3 icmp_seq=13 Destination Host Unreachable From 192.168.1.3 icmp_seq=19 Destination Host Unreachable
# ping google.com PING google.com (216.58.218.110) 56(84) bytes of data. ^C --- google.com ping statistics --- 26 packets transmitted, 0 received, 100% packet loss, time 25158ms
So that's the problem, DNS fails. Connectivity is working.
----------Now, I have switched to DHCP and back to static:----------
# ip addr
2: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 8c:89:a5:6f:52:b3 brd ff:ff:ff:ff:ff:ff inet 192.168.1.4/24 brd 192.168.1.255 scope global enp7s0 valid_lft forever preferred_lft forever inet6 fe80::8e89:a5ff:fe6f:52b3/64 scope link valid_lft forever preferred_lft forever
# ip route default via 192.168.1.1 dev enp7s0 192.168.1.0/24 dev enp7s0 proto kernel scope link src 192.168.1.4
# cat /etc/resolv.conf | egrep -v "^[[:space:]]*$|^#" nameserver 192.168.1.1
# ping google.com PING google.com (216.58.194.142) 56(84) bytes of data. 64 bytes from dfw06s49-in-f14.1e100.net (216.58.194.142): icmp_seq=1 ttl=51 time=72.1 ms 64 bytes from dfw06s49-in-f14.1e100.net (216.58.194.142): icmp_seq=2 ttl=51 time=70.7 ms 64 bytes from dfw06s49-in-f14.1e100.net (216.58.194.142): icmp_seq=3 ttl=51 time=71.1 ms ^C --- google.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2003ms rtt min/avg/max/mdev = 70.715/71.334/72.102/0.653 ms
And now DNS works. I don't understand it, unless you are running dnsmasq, and it captured another DNS server in the interval that dhcp was active. you could try: host google.com 192.168.1.1 host google.com 8.8.8.8
I will plug a Windows laptop with a static IP assigned into the client bridge router later to see what happens. Once again, I have a DD-WRT client bridge router with DHCP shut off that I plug the ethernet cable into. That router talks wirelessly to my main router which is thr DHCP server and which is connected to the cable modem. But if that were part of this whole problem, I don't see why Wicked and DHCP work fine and static addressing doesn't, unless this is some odd bug. Maybe someone can set a static IP and test, unplug the router and plug it back in and see if they still have DNS?
I doubt that it is related. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
Op woensdag 13 april 2016 17:24:55 CEST schreef sdm:
On 04/13/2016 05:15 PM, Carlos E. R. wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 2016-04-14 02:07, sdm wrote:
On 04/13/2016 03:57 PM, James Knott wrote:
On 04/13/2016 06:31 PM, Freek de Kruijf wrote:
This is the culprit. You have to provide an IP address for the DNS also. With DHCP, you get also the value for the DNS. With a static address you do not get this address, so you have to provide that address with the other static values.
DNS only maps a name to an IP address. You don't even need it, if you just use IP addresses. So, it shouldn't cause an interface to lose a configured static address.
It's looking like a DNS issue, because I can't access i.e. www.google.com, but if I type in: 192.168.1.1 the router GUI comes up, after a router power loss using a static IP. So the static route doesn't work after a router power loss, DHCP does, so I'm stumped. I can only get the static route going again if I switch to DHCP and then back to static. ifdown and ifup don't work.
What Freek de Kruijf said is correct. That is the cause.
And, if what sdm said, that the DNS config written in YaST doesn't catch is true (a bug that should be reported in bugzilla), then you need to apply his workaround (write the appropriate line in resolv.conf file yourself).
- -- Cheers / Saludos,
Carlos E. R.
(from 13.1 x86_64 "Bottle" (Minas Tirith))
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux)
iF4EAREIAAYFAlcO4QUACgkQja8UbcUWM1xckQD/fzO6oWOcPibkzGEKjGpbogW0 bRofF+idGGhABYcqZKABAJUsoUdAQBxreKH6DHU2mVzGO+Hig8ZNdnab6+O3n6IC =MKUE -----END PGP SIGNATURE-----
Static IP is set to 192.168.1.5. Subnetmask is set, 255.255.255.0. On Hostname/DNS, under Name Server 1, I set it to 192.168.1.1. And tried "Use Default Policy", "Only Manually", and "Use Custom Policy" with Custom Policy Rule set to auto or static. I've also the entire time had the name sever of 192.168.1.1 in the /etc/resolv.conf file. The Gateway I set to 192.168.1.1.
Once again, if I unplug the router and plug it back in, with the above settings DNS does not work until switching to DHCP, then back to static. If I leave it on static with the above settings, unplug the router, and then plug it back in, DNS does not work. I can access the router at 192.168.1.1, but can't go to any web address.
Use Google's DNS's instead: 8.8.8.8 and 8.8.4.4 But there's more: IIRC there was talk about a client-bridge-router. Is this a router or an access point? . A router would have an IP address in one range on the outside ( in your case 192.168.1.? ) and one on the "inside" ( 192.168.?.?). To be honest, I've been struggling with > 1 router networks in the past, and have found it's worth the time to read until you understand how networking ( not just on linux ) is structured on this level. I'm not talking about all the network layers etc, simply about IP addresses, net masks, DNS, gateways and their logic in networks. I've done so, and, like in many other "small private studies", it has brought me more than I was looking for: a network with a lot of staticly configured devices ( server, TV, STB, 2 x RPi, AP's ), own DNS- server ( which caches Google's and does local DNS, bleeding fast on my Gbit wired network ), own DHCP server, where any client can access any machine by hostname. In my case DNS and DHCP server are on an RPi. -- Gertjan Lettink, a.k.a. Knurpht openSUSE Board Member openSUSE Forums Team -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-04-14 09:47, Knurpht - Gertjan Lettink wrote:
Op woensdag 13 april 2016 17:24:55 CEST schreef sdm:
But there's more: IIRC there was talk about a client-bridge-router. Is this a router or an access point? . A router would have an IP address in one range on the outside ( in your case 192.168.1.? ) and one on the "inside" ( 192.168.?.?).
This is an interesting point, yes. What are the IP ranges of both, if the second acts as router (and on both networks), and then, which are the dhcp ranges. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
So, I did some testing on my Windows laptop with a static IP set, connected via Cat 5 to my client bridge router. And guess what? Low and behold, when the client bridge router is power cycled it completely loses DNS also and the static route doesn't ever get reinstated. I can see the network interface come back up in Windows (animation in the tray) once the router is plugged back in, but whatever routing table that was between the 2 dd-wrt routers gets hosed when the client bridge router gets cycled. If set to DHCP, there's no problem. I'm not sure if this is just the limits of having a client bridge setup and having a main router serve DHCP to the wired clients on the client bridge router, or if it's some DD-WRT bug. Btw, in Client Bridge (Routed Mode) the Network Address Server Settings (DHCP) in dd-wrt option goes away, so it looks as if the main router will always be the one to serve DHCP. I thought about trying to see if there was an option to have the client bridge router be a DHCP server but that's not possible. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Wed, 2016-04-13 at 20:14 -0700, sdm wrote: I'm not surprised I was confused! Quick notes because I'm rushed. Like others, I'd assumed Leap, so please be explicit about config in future :) I saw mention of network manager. wicked and network manager are alternatives. They shouldn't both be running, AIUI. As somebody said, DNS not working doesn't mean the interface isn't working. Please be clear about what the problem is. Most routers don't provide DNS, are you sure yours does? It's normal to set DNS to use either your ISP's DNS service or that provided by google at 8.8.8.8 and 8.8.4.4 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/13/2016 08:14 PM, sdm wrote:
Btw, in Client Bridge (Routed Mode) the Network Address Server Settings (DHCP) in dd-wrt option goes away, so it looks as if the main router will always be the one to serve DHCP. I thought about trying to see if there was an option to have the client bridge router be a DHCP server but that's not possible.
So all this time you had a functional DHCP server on the network? Why in gods name are you dicking around with static IPs and wasting everyone's time with this? If you want fixed-ish IPs, make your reservations in the dhcp server and join the 21st century. This is where some will jump to the defense of static IPs. Its also where I point out how useless and wrong all their arguments are. -- After all is said and done, more is said than done. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/14/2016 11:49 AM, John Andersen wrote:
On 04/13/2016 08:14 PM, sdm wrote:
Btw, in Client Bridge (Routed Mode) the Network Address Server Settings (DHCP) in dd-wrt option goes away, so it looks as if the main router will always be the one to serve DHCP. I thought about trying to see if there was an option to have the client bridge router be a DHCP server but that's not possible. So all this time you had a functional DHCP server on the network?
Why in gods name are you dicking around with static IPs and wasting everyone's time with this?
If you want fixed-ish IPs, make your reservations in the dhcp server and join the 21st century.
This is where some will jump to the defense of static IPs. Its also where I point out how useless and wrong all their arguments are.
People use static IP's for a reason, I think it's time for you to get reading. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Like I said in the email from yesterday:
So, I did some testing on my Windows laptop with a static IP set, connected via Cat 5 to my client bridge router. And guess what? Low and behold, when the client bridge router is power cycled it completely loses DNS also and the static route doesn't ever get reinstated. I can see the network interface come back up in Windows (animation in the tray) once the router is plugged back in, but whatever routing table that was between the 2 DD-WRT routers gets hosed when the client bridge router gets cycled. If set to DHCP, there's no problem. I'm not sure if this is just the limits of having a client bridge setup and having a main router serve DHCP to the wired clients on the client bridge router, or if it's some DD-WRT bug.
Btw, in Client Bridge (Routed Mode) the Network Address Server Settings (DHCP) in DD-WRT option goes away, so it looks as if the main router will always be the one to serve DHCP. I thought about trying to see if there was an option to have the client bridge router be a DHCP server but that's not possible.
On the main router, "Use DNSMasq for DHCP" and "Use DNSMasq for DNS" are both ticked; those are the DD-WRT defaults so I left them alone. So since this appears to not only be happening with Wicked but also with Windows, it's looking like this has something to do with the client bridge setup I have. Later I am going to try plugging the Windows laptop directly into the main router with a static IP, and unplug that router and see what happens when it comes back up. So for the record, it looks like it's not Wicked, it's something finicky with DD-WRT client bridge mode setup. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 04/13/2016 03:57 PM, James Knott wrote:
On 04/13/2016 06:31 PM, Freek de Kruijf wrote:
This is the culprit. You have to provide an IP address for the DNS also. With DHCP, you get also the value for the DNS. With a static address you do not get this address, so you have to provide that address with the other static values. DNS only maps a name to an IP address. You don't even need it, if you just use IP addresses. So, it shouldn't cause an interface to lose a configured static address.
I could always access webpages after the client router bridge power was lost with a static IP setup in YaST2 Networking if I were to type in any IP address. What didn't work was DNS, even though the name server in YaST2 networking was populated with the address of the primary router. If I set up a WDS AP on the primary router and WDS Station on the secondary instead of client bridge mode, then the router power can be lost and even with a static IP, DNS comes back and everything works fine. If the secondary router is in client bridge mode, DHCP is the only option that brings back DNS after a power loss. If in client bridge mode, after losing router power, I can get DNS back by switching from static to DHCP and back in YaST2 Networking. So thus far, this question is going unanswered. Client bridge mode works on a different network layer than WDS (WDS is layer 2), and client bridge mode works on layer 3,all clients will appear to the host under the same MAC address. So that may have something to do with it? I need somebody here with extensive knowledge about networking that may know the answer to this, as none of what has been presented thus far in the thread poses as a technical answer to the problem. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
13.04.2016 22:27, sdm пишет:
If I unplug my router from the AC, once it's plugged back in, the static IP I have set it up wicked doesn't get reinitiated.
Please show ip link list ip addr list ifplugstatus Before, during and after router AC is off.
What would be the fasted way to get the interface back up? Switching from to DHCP and then re-entering the static IP info in YaST works, but I haven't yet tried:
# ip link set dev <interface> up # ip link set dev <interface> down
Is there a reason why the static IP that I set up in Wicked won't "stick" once the power to the router gets turned on again?
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-04-14 05:56, Andrei Borzenkov wrote:
13.04.2016 22:27, sdm пишет:
If I unplug my router from the AC, once it's plugged back in, the static IP I have set it up wicked doesn't get reinitiated.
Please show
ip link list ip addr list ifplugstatus
Before, during and after router AC is off.
You can see before and after, not during, in a reply to a post of mine. Not exactly after, though. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
On 04/13/2016 08:56 PM, Andrei Borzenkov wrote:
Please show
ip link list ip addr list ifplugstatus Before power loss:
# ip link list 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 link/ether 8c:89:a5:6f:52:b3 brd ff:ff:ff:ff:ff:ff # ip addr list 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 8c:89:a5:6f:52:b3 brd ff:ff:ff:ff:ff:ff inet 192.168.1.4/24 brd 192.168.1.255 scope global enp7s0 valid_lft forever preferred_lft forever inet6 fe80::8e89:a5ff:fe6f:52b3/64 scope link valid_lft forever preferred_lft forever # ifplugstatus enp7s0: link beat detected lo: link beat detected After power loss: # ip link list 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 link/ether 8c:89:a5:6f:52:b3 brd ff:ff:ff:ff:ff:ff # ip addr list 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 8c:89:a5:6f:52:b3 brd ff:ff:ff:ff:ff:ff inet 192.168.1.4/24 brd 192.168.1.255 scope global enp7s0 valid_lft forever preferred_lft forever inet6 fe80::8e89:a5ff:fe6f:52b3/64 scope link valid_lft forever preferred_lft forever # ifplugstatus enp7s0: link beat detected lo: link beat detected -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (12)
-
Andrei Borzenkov
-
Carlos E. R.
-
Dave Howorth
-
David C. Rankin
-
Freek de Kruijf
-
gumb
-
James Knott
-
John Andersen
-
Knurpht - Gertjan Lettink
-
Linda Walsh
-
Per Jessen
-
sdm