Internet connection in Linux

I am trying to completely ditch Windows and switch to Linux, but I am having problems trying to connect to the internet in Linux. First, here's what I have...

Toshiba Satellite A45-S250 - has a built-in Ethernet connection and Atheros Wireless Lan connection. I have a cable internet connection with a Linksys cable modem that is connected to a Linksys Wireless router - I am currently accessing the internet through the wireless router connection.

I can connect fine on Windows both on the wireless connection and the Ethernet connection, but I can't do either within Linux. I downloaded Fedora Core and tried setting up the Ethernet connection, but it kept telling me it couldn't activate the "eth0" connection, and didn't even acknowledge the existence of the wireless connection. Today I bought SuSe 9.0 and installed it. It does recognize both the Ethernet and wireless connections, but I can't do anything with them - it keeps saying it can't find any network. Is there just some obvious (obvious to an expert at least...) step I'm missing - a way to tell the system which network connection to use?
Who is Participating?
Karl Heinz KremerConnect With a Mentor Commented:
This is your problem: Both interfaces are on the subnet, this means that your system cannot "decide" which interface to use. When you use Windows, do you also have both interfaces connected?
You could reconfigure eth0 to use a hardcoded IP address in a different subnet (e.g., or you could shut it down completely:
ifconfig eth0 down

Does this make a difference? will have to add a new default route:

route add default gw
(this should now show the interface wlan0 in the last line of the route -n output.
Try to ping your AP now.
are your interfaces picking up the right IP addresses (assuming you're using DHCP)


will tell you your ip addresses. If those are right, maybe you have a routing problem. Run /sbin/route to see the static routing tables. you should see a 'default' entry pointing to your gateway (i.e. your router). if not run:

/sbin/route add default gw <ip> <intf>

where <ip> is ip address of gateway (i.e. router). and <intf> is the interface u want to use by default (i.e. eth0).
Karl Heinz KremerCommented:
Start up YaST2 and select the network configuration. For your wireless connection you may have to add WEP information (I hope you did enable WEP encryption on your access point!)
There is no need to manually specify routes or IP addresses (you would have to do this everytime you boot your machine). You can specify all this information in YaST2 and it will get applied at boot time.
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

beaker67Author Commented:
Already tried changing various settings in Yast several times - even disabled WEP encrption to see if that might have been causing problems - nothing. I ran "KWifiManager" which says it can't find any wireless networks nearby.

I just tried "/sbin/route add default..." and it says "network unreachable".
Karl Heinz KremerCommented:
What's the output of /sbin/ifconfig?
beaker67Author Commented:
linux:~ # /sbin/ifconfig
eth0      Link encap:Ethernet  HWaddr 00:08:0D:31:71:F3
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::208:dff:fe31:71f3/64 Scope:Link
          RX packets:56729 errors:0 dropped:0 overruns:0 frame:0
          TX packets:32171 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:81291884 (77.5 Mb)  TX bytes:2643507 (2.5 Mb)
          Interrupt:11 Base address:0xcf40 Memory:cffef000-cffef038
lo        Link encap:Local Loopback
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:4570 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4570 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:294927 (288.0 Kb)  TX bytes:294927 (288.0 Kb)
wlan0     Link encap:Ethernet  HWaddr 00:90:96:85:65:86
          inet6 addr: fe80::290:96ff:fe85:6586/64 Scope:Link
          RX packets:1002 errors:2052503 dropped:0 overruns:0 frame:13133
          TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:199
          RX bytes:78507 (76.6 Kb)  TX bytes:6250 (6.1 Kb)
          Interrupt:11 Memory:e0a48000-e0a58000
Obviously, the Ethernet connection now works. I don't really know why - maybe it's because I connected it to an access point on the wireless router rather than directly to the cable modem. The wireless connection still doesn't do anything though.
Karl Heinz KremerCommented:
As you can see from the ifconfig output, your wireless device wlan0 is not correctly configured. Eth0 does have an IP address ( This shows that your machine did connect to your DHCP server and did receive an address (I assume that you did not manually configure this address).
Was the wireless interface correctly identified in YaST2?
beaker67Author Commented:
Yes, YaST does see "wlan0" and describes it (Network Card ---> wlan0 ---> Hardware Settings) under "module name" as an "ath_pci", which is accurate because it is in fact an Atheros mini-PCI card.
Karl Heinz KremerCommented:
Did you enter the correct information in YaST2's "Wireless Device Settings"?
Are you sure your access point does accept connections from the mac address of your WiFi card?
Did you specify the key in the correct format (hex vs. string)?
beaker67Author Commented:
Yes, I did enter the right information in least I'm pretty sure I I need anything in the "Nick Name" field?

The access point does accept connections perfectly from my wireless card because it works fine in Windows.

Yes, the key is in hex.
beaker67Author Commented:
Also, I don't know if this might have anything to do with the problem or help solve it...

When I boot up Linux, it says it eth0 can't find an IP address (and the network cable is plugged in even before I power on the computer) but it works fine when I am logged on and try to use it.
Karl Heinz KremerCommented:
You don't need anything in the Nick Name field.

Run this command:

This should list all your network devices and indicate which one does have the wireless extensions enabled (should be wlan0).

Then try to set the features manually:

/usr/sbin/iwconfig wlan0 mode Managed
/usr/sbin/iwconfig wlan0 essid your_network_essid
/usr/sbin/iwconfig wlan0 key 00010203040506070...

(Use your own hex key).

Does this change anything? If not, try this:
/usr/sbin/iwconfig wlan0 key restricted 000102030405...

or this:
/usr/sbin/iwconfig wlan0 key open 0001020304050607...

beaker67Author Commented:
No, those didn't change anything. Earlier, I tried disabling WEP, and it worked - sort of. KWifiManager (used that because I didn't know the terminal command) reported that it was connected to the network, and correctly identified the MAC address of my wireless router, but it still said "AccessPoint: UNKNOWN". Then when I try to do anything on the Internet it didn't find anything - kept timing out and saying it couldn't find the web servers. I re-enabled WEP, and it kept (sort of) working. So, now it seems to be connected to my network, but not to the Internet.

I checked to make sure I have the right WEP key - I even experimented by typing in a completely wrong key (123456890) - when I did that wlan0 disappeared entirely (when I ran /sbin/route). It reappeared when I changed it to the correct key.

BTW, I've noticed that whenever I start the computer without the ethernet cable plugged in, /sbin/route reports the wlan0 is the only connection but there is no default gateway. The minute I plug the ethernet cable in, it automatically adds itself as the default - is there any reason why this would not happen with the wireless? I've even tried manually adding wlan0 as a default AND removing the eth0 default - still nothing.

Sorry if I'm causing headaches for you, but I would really like to get this wireless working so I'm not tied down to an Ethernet cord :-)
Karl Heinz KremerCommented:
No headaches yet :-) At least not caused by your problem.

Are your two network interfaces on different subnets? I know that my Mac supports this - it will use the "wired" network if it's available, and otherwise will use the WLAN. I'm not sure if this can work with Linux at all (it needs a lot more logic than what your standard distribution gives you).

Does your AP have an IP address? If not, then your router does have an IP address for sure. Try to ping either the AP or the router (ping Does this work?

What does /sbin/route -n print when the WLAN is active?
beaker67Author Commented:
I don't have any idea what a subnet is.

My AP IS my router, and it does have an IP address. I tried pinging it - nothing.

When wlan is active...

linux:~ # /sbin/route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface   U     0      0        0 eth0   U     0      0        0 wlan0         UG    0      0        0 eth0

Doesn't exactly help to reduce the confusion when eth0 can't find an IP address at startup but wlan0 can, yet eth0 connects to the internet and wlan0 doesn't...
beaker67Author Commented:

When I'm in Windows I only have the wireless connection up - I leave the ethernet connection disabled because I don't need it. But I just tried having both enabled, and it works fine - it can just disconnect one and reconnect the other whenever I want, and Windows automatically detects this and uses one of them.

I disabled eth0, but that isn't helping anything - the wlan is still connecting to the AP but that's it. What's weird is it sees the access point - it gives the right MAC address - but it won't let me ping it or do anything else.
Karl Heinz KremerCommented:
Did you set the default route after disabling eth0? Does route -n now show wlan0 as the interface for the default route? If you don't know what this means, please post the output of route -n again.
beaker67Author Commented:
I disabled eth0, rebooted, and can access the internet with wireless. Thanks for your help!
Karl Heinz KremerCommented:
I'm pretty sure it was the default route that tried to direct any packets to your eth0 interface (which was either not connected, or disabled), therefore the data never made it to the router.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.