I’ve been searching for a couple of hours and have not found any threads that solve my situation… hope I’m not repeating something here.
Setup:
Notebook with openSUSE 11.2 using KDE 4.
Using Network Manager to manage network connection (although I’ve tried configuring this using ifup as well with no luck).
I need to be able to connect to client networks via a network cable (Ethernet) and connect to the internet via my MiFi 2200 Mobile WiFi. Both cards/connections are active with the following:
ethernet (must be set to DHCP)
IP: 192.168.0.189
Name Server / Default Gateway: 192.168.0.1
Domains: russNET.local
Wireless (also set to DHCP)
IP: 192.168.1.3
Name Server / Default Gateway: 192.168.1.1
I have no problem mounting drives from the client’s network. But, can not reach the internet. If I disconnect the ethernet cable, the browser will immediately connect to the internet and load web pages.
I’m assuming the ethernet connection is taking precedence over the wireless connection???
I can’t imagine that there is not a way to set this up. If Windows can do it, I’m sure openSUSE can!
I’ve read posts about connecting pc to pc with ethernet and using wireless at the same time. I can’t imagine that you could do that but can’t use ethernet to DHCP network and wireless at the same time.
The client’s network does not have Wi-Fi or Internet access. I must connect to it using my ethernet card (eth0). I must connect to the internet to transfer files and access web pages (wlan0). On a Windows notebook, this is very easy.
Both devices are active. But, as long as the cable is plugged into the ethernet card, I can not access the internet. As soon as I unplug the cable, I can access the internet.
As you can see above, each device is using IP/Gateways that correspond correctly to the networks they are to use.
I just had a fiddle with one of my laptops has both wireless and wired.
I can go to networkmanager and toggle to wireless and it says connecting to > then connected to
But it’s actually still only using the wired.
My guess is, you will need to configure connections via ifup
and force wired eth0 to some kind of LAN setup to the remote device
I’m not understanding a few things, can you explain a bit more please:
what do you mean by “client’s network” and “client networks”? Can you describe it?
what device is at I.P. address 192.168.0.1
what device is at I.P. address 192.168.1.1
are you trying to set up Internet Connection Sharing with the machine we’re talking about here being the ICS server which will feed the Internet to the “client networks”?
Well, this is a routing problem. First you need to ensure that both interfaces get IP addresses, then you need to decide where you want you default gateway to be and which hosts you want to route to which interface and finally, you need to decide which DNS you are going to use.
So, yes, it can be made to work, but you probably need to clue up on advanced routing at tldp.org.
I mean I’m sitting in a building owned by a client of mine. And connecting to a wired network (ethernet) owned by that client in that client’s building. This network is just a bunch of file servers sitting in a closet with a hub and ethernet cable running to cubicles. I’m plugging one of those cables into the ethernet port on my notebook (OS openSUSE 11.2).
The wired connection (eth0) is using the IP 192.168.0.189 issued by DHCP server (and default gateway) 192.168.0.1.
The wireless (wi-fi) connection (wlan0) is using the IP 192.168.1.3 issued via DHCP by the MiFi 2200 Mobile Wi-Fi device and default gateway 192.168.1.1.
I am not trying to do Internet Sharing or anything particularly “fancy.” It’s basically just being connected to two networks, through two different interfaces at the same time. Linux is an OS designed to network. This has to be possible.
This works so easily with a Windows machine. To put it simply, in Windows it just routes the request packet to one connection, if there’s no response it sends it through the next connection. Can’t Linux be set up to look at both networks?
Yes, this is a routing problem but it should be easy to resolve.
I haven’t done this personally when using Network Manager, but try this…
The idea is to assign a higher priority metric to your wireless gateway metric than your wired gateway metric. AFAIK the only way to do this is delete an existing route, then add it back in with the modified metric.
I didn’t notice whether you said this is a portable laptop which will travel from network to network or a fixed machine where these two network connections are permanent.
The following isn’t detailed but should hopefully be sufficient, the exact and complete command syntax or your specific situation should be available in the man route and if necessary Internet.
First step is to configure the temporary (session only) solution:
Run route -n (maybe even write to file for a permanent record) to display your current routing table. You likely will notice that your wired gateway has an equal or higher priority now.
Remove one of the gateway routes using route del
Add the gateway route back in using route add but with a modified metric, assign 1 to your wireless gateway and 16 to your wired gateway.
Repeat steps 2 and 4 for the other gateway route accordingly.
Run route -n again and compare to your original routing table to check your handiwork.
The result should be that unless there is very congestion over your wireless connection, you should use that as your primary connection to the Internet. If that connection is unavailable, then your wired connection would be tried.
If this works, it will be session-specific and work only until your next reboot which would be appropriate if you machine is a laptop which will connect to varying networks. In any case, if this is a standard configuration, you will likely want to preserve these commands in a script for one-click invocation.
If you want to make this a permanent solution, then you’ll have to write your routes permanently to the appropriate files or configure this script to run automatically. Since Network Manager runs so late in the booting process, properly configuring this might be a trick, but some recent things I’ve seen in init.d/rcX.d scripting leads me to believe that approach can specify networkmanager as a dependency.
This works so easily with a Windows machine. To put it simply, in Windows it just routes the request packet to one connection, if there’s no response it sends it through the next connection. Can’t Linux be set up to look at both networks?
Actually, it shouldn’t work any differently for a Windows machine. Since your machine is assigned two default gateways by two different DHCP, short of disabling or physically disconnecting one of the two network links, it should be a toss-up which link a windows box would use also (Many moons ago I had to troubleshoot this scenario on Windows boxes setup by a compatriot). Unless an unstated parameter in the setup exists (eg different routing algorithms for each network), given enough time or varying traffic/load conditions you would start seeing problems unless you modified the routing metrics the same way I posted (but using Windows route commands).
Open “Personal Settings” and then “Network Settings”. Click on “Wired”.
If there are no connections defined for wired, then click the “Add” button and create one. (I called it “home LAN”). Then, when editing that info, click the “IP Address” tab. At the bottom of the screen, I see “Basic Settings”. I can change that to “Routes”. The resulting page has a place to select “Use only for resources on this connection”.
I’m not sure if all of those settings are there for 11.2. If they are, it should prevent you getting a default route on your wired connection, allowing the wired connection to be only usable locally.