Using WiFi and Ethernet Connections

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! :wink:

Open a terminal and post result of:

/sbin/lspci -nnk

wired should just work, normally just leave the default settings of dhcp, but some folks have had to set up their dns servers manually.

Wired should be disconnected to use wireless

The results from “/sbin/lspci -nnk”

00:00.0 Host bridge [0600]: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub [8086:27a0] (rev 03)                                                                                                                    
        Subsystem: Hewlett-Packard Company Device [103c:30bb]                                                                  
        Kernel driver in use: agpgart-intel                                                                                    
00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller [8086:27a2] (rev 03)                                                                                                          
        Subsystem: Hewlett-Packard Company Device [103c:30bb]                                                                  
00:02.1 Display controller [0380]: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller [8086:27a6] (rev 03)                                                                                                             
        Subsystem: Hewlett-Packard Company Device [103c:30bb]                                                                  
00:1b.0 Audio device [0403]: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller [8086:27d8] (rev 02)      
        Subsystem: Hewlett-Packard Company Device [103c:30bb]                                                                  
        Kernel driver in use: HDA Intel                                                                                        
00:1c.0 PCI bridge [0604]: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 [8086:27d0] (rev 02)                      
        Kernel driver in use: pcieport-driver                                                                                  
00:1c.1 PCI bridge [0604]: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 [8086:27d2] (rev 02)                      
        Kernel driver in use: pcieport-driver                                                                                  
00:1d.0 USB Controller [0c03]: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 [8086:27c8] (rev 02)              
        Subsystem: Hewlett-Packard Company Device [103c:30bb]                                                                  
        Kernel driver in use: uhci_hcd                                                                                         
00:1d.1 USB Controller [0c03]: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 [8086:27c9] (rev 02)              
        Subsystem: Hewlett-Packard Company Device [103c:30bb]                                                                  
        Kernel driver in use: uhci_hcd                                                                                         
00:1d.2 USB Controller [0c03]: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 [8086:27ca] (rev 02)              
        Subsystem: Hewlett-Packard Company Device [103c:30bb]                                                                  
        Kernel driver in use: uhci_hcd                                                                                         
00:1d.3 USB Controller [0c03]: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 [8086:27cb] (rev 02)              
        Subsystem: Hewlett-Packard Company Device [103c:30bb]                                                                  
        Kernel driver in use: uhci_hcd                                                                                         
00:1d.7 USB Controller [0c03]: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller [8086:27cc] (rev 02)                
        Subsystem: Hewlett-Packard Company Device [103c:30bb]
        Kernel driver in use: ehci_hcd
00:1e.0 PCI bridge [0604]: Intel Corporation 82801 Mobile PCI Bridge [8086:2448] (rev e2)
00:1f.0 ISA bridge [0601]: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge [8086:27b9] (rev 02)
        Subsystem: Hewlett-Packard Company Device [103c:30bb]
00:1f.1 IDE interface [0101]: Intel Corporation 82801G (ICH7 Family) IDE Controller [8086:27df] (rev 02)
        Subsystem: Hewlett-Packard Company Device [103c:30bb]
        Kernel driver in use: ata_piix
00:1f.2 SATA controller [0106]: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA AHCI Controller [8086:27c5] (rev 02)
        Subsystem: Hewlett-Packard Company Device [103c:30bb]
        Kernel driver in use: ahci
00:1f.3 SMBus [0c05]: Intel Corporation 82801G (ICH7 Family) SMBus Controller [8086:27da] (rev 02)
        Subsystem: Hewlett-Packard Company Device [103c:30bb]
02:00.0 Network controller [0280]: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection [8086:4222] (rev 02)
        Subsystem: Hewlett-Packard Company Device [103c:135b]
        Kernel driver in use: iwl3945
05:05.0 FireWire (IEEE 1394) [0c00]: Ricoh Co Ltd R5C832 IEEE 1394 Controller [1180:0832]
        Subsystem: Hewlett-Packard Company Device [103c:30bb]
        Kernel driver in use: ohci1394
05:05.1 SD Host controller [0805]: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter [1180:0822] (rev 19)
        Subsystem: Hewlett-Packard Company Device [103c:30bb]
        Kernel driver in use: sdhci-pci
05:05.2 System peripheral [0880]: Ricoh Co Ltd R5C843 MMC Host Controller [1180:0843] (rev 0a)
        Subsystem: Hewlett-Packard Company Device [103c:30bb]
        Kernel driver in use: ricoh-mmc
05:05.3 System peripheral [0880]: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter [1180:0592] (rev 05)
        Subsystem: Hewlett-Packard Company Device [103c:30bb]
05:05.4 System peripheral [0880]: Ricoh Co Ltd xD-Picture Card Controller [1180:0852] (rev ff)
05:08.0 Ethernet controller [0200]: Intel Corporation PRO/100 VE Network Connection [8086:1092] (rev 02)
        Subsystem: Hewlett-Packard Company Device [103c:30bb]
        Kernel driver in use: e100

Both your device are ok and drivers in place
wireless, wired respectively

02:00.0 Network controller [0280]: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection [8086:4222] (rev 02)
        Subsystem: Hewlett-Packard Company Device [103c:135b]
        Kernel driver in use: iwl3945

05:08.0 Ethernet controller [0200]: Intel Corporation PRO/100 VE Network Connection [8086:1092] (rev 02)
        Subsystem: Hewlett-Packard Company Device [103c:30bb]
        Kernel driver in use: e100

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.

Tell me what you are trying to do

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.

It might be possible
But it needs someone with wore network experience than me.

Sorry I can’t be any more help than that.

Thanks for trying though!

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

A guess mind you

I’m not understanding a few things, can you explain a bit more please:

  1. what do you mean by “client’s network” and “client networks”? Can you describe it?
  2. what device is at I.P. address 192.168.0.1
  3. what device is at I.P. address 192.168.1.1
  4. 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:

  1. 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.
  2. Remove one of the gateway routes using route del
  3. 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.
  4. Repeat steps 2 and 4 for the other gateway route accordingly.
  5. 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.

HTH,
Tony

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).

Tony

Note that I haven’t tried this.

I’m using 11.3 with KDE.

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.

Please post the results of

route -n

command here and we will tell You the exact commands to make it work.
Also You can check

netstat -rn

while on windows and edit the routing table on Your openSUSE to look accordingly.

Best regards,
Greg