No Internet connection for connected Networkmanager

Hi
Recently I am unable to connect to the internet with my laptop running an uptodat version of OpenSuse 11.3. As usual the knetworkmanager connects automatically to the known and appropriate network, either ethernet, wlan or GSM stick. When connected, I am not able to access the internet. For example, chromium would keep sending requests, skype does not connect etc.

I can ping a public IP

ping 4.2.2.1 -c5

but not a public site

ping google.com -c5
ping: unknown host google.com
ifconfig

shows eth0, lo and wlan0, where eth0 is connected and has IP assigned.

Now I am stuck and need some assistance in sorting this out. I remember that before I had these connection problems I tried (unsucessfully) to set up an ad-hoc network using knetworkmanager.

Thanks for any help!

Can you post the content of the file “/etc/resolv.conf”. It looks as if you are having DNS problems.

/etc/resolv.conf contains :

search phsabc.ehcnet.ca
nameserver 10.1.42.32
nameserver 192.168.215.60
nameserver 10.1.42.33

What does the content exactly mean? I should not be connected to ehcnet.ca at the moment.

To quote the man page:

search Search list for host-name lookup.
The search list is normally determined from the local domain name; by default, it contains only the local domain name. This may be changed by listing the desired domain search path following the search keyword with spaces or tabs separating the names. Resolver queries having fewer than ndots dots (default is 1) in them will be attempted using each component of the search path in turn until a match is found. For environments with multiple subdomains please read options ndots:n below to avoid man-in-the-middle attacks and unnecessary traffic for the root-dns-servers. Note that this process may be slow and will generate a lot of network traffic if the servers for the listed domains are not local, and that queries will time out if no server is available for one of the domains.

So, there is a clear danger if you get this wrong, and you can probably get away with no search entry.

But, as you seem to have DNS problem, perhaps you should give attention to the nameservers. In particular, does the first listed actually work as a nameserver? If not try 8.8.8.8 and 8.8.4.4 (Google) or openDNS (maybe you are blocking DNS or these IPs in your firewall?).

Thanks markone and nrikert for leading me onto the right path!

the values in /etc/resolv.conf were indeed causing my problems.

I executed the command

netconfig update -f

and it replaced search and nameserver parameters with the ones related to my current domain. Internet worked instantly after this.

I still have to test this when I am at a different location or when using GSM.
I do not understand why the networkmanager did not do this by its own?

The “search” line is not all that important. The “nameserver” lines are very important.

If that’s the entire file, then it has been manually edited. My “resolv.conf” has a bunch of comment lines, with a warning about manually editing the file. If you remove those comment lines, the DHCP will no longer maintain the file, and you will have to keep it correct yourself.

As a quick fix, put in the google public DNS servers in those “nameserver” lines. That will at least get you back to being able to resolve names.