Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The story: During installation of SuSE 8.2, it detected and correctly set up my internal 10/100 NIC (eth0). I accepted all default settings (host = linux, domain = local, etc.), all nameserver information was handled through DHCP. Using this device, I can surf to my heart's content.
Then I decided to make my life difficult and try and set up the wireless card (eth1). Last night I finally managed to get SuSE to recognize the card by binding the card to the orinoco_cs driver instead of the wlan-ng software (a suggestion made on the SuSE KB). And, in fact, I can get to my router's setup webpage without any problems.
The problem lies when I try to get to an outside web address -- if I try going to Google (I've tried many different addresses just to be fair), I get a "Name cannot be resolved" error. I also tried pinging google.com, same result, "Name cannot be resolved". However, if I ping the IP address directly, I get the expected output.
So, I tried altering the default nameserver settings for eth1, to no avail. But upon messing with the nameserver settings for eth1 I realized that it also changed these values for eth0. Of course, now eth0 would not work. I managed to return the nameserver settings back to pre-wireless tinkerings and now eth0 can get to the Internet. But that still leaves me in the dark about why my wireless NIC can get to the router, but not beyond (for DNS resolution).
I finally did figure it out and I wanted to post a reply so that if anyone else was having the same problem, this might be of some use.
I first managed to get DNS resolution when I hard coded the DNS servers into my /etc/resolv.conf file. However, everytime I booted up, I still had to start a shell, log in as root and run the following command:
route add default gw 192.168.1.1 (where 192.168.1.1 was the gateway of my router at home)
After that, everything worked like a champ. Unfortunately, when I would go to a local coffee shop to hook up to their wireless hotspot, I would have the same problem I had before, I could ping or go to a website if I knew the IP address, but I couldn't get name resolution.
Through a bit of research, I discovered that the problem I was having was that my eth0 device was still active (even though there was no LAN cable actually plugged into it). So, instead of the above command, I used the following instead and configured my network cards to get DNS information from DHCP. Again, start a shell and log in as root, then issue the following commands:
ifdown eth0
ifdown eth1
ifup eth1
If all goes well, you will be assigned an IP address and the correct gateway entry will automatically be added to the IP routing table.
I imagine this could be automated in a script if you knew you were always going to be connecting via eth1, but since I connect to both eth0 and eth1, I can simply type it in when I need it. Also note that these settings will survive a log out and log in. However, if you reboot the laptop, you will need to reapply the settings.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.