You are not logged in.

#1 2011-01-21 22:10:44

glenn69
Member
Registered: 2007-09-26
Posts: 125

How do I use 2 network cards?

I want to use a wireless connection and a wired connection.  Each connection is on a different subnet, so they connect OK.  Wireless connection uses 192.168.182.XXX and the wired uses 192.168.1.XXX.  Wireless is primarily for internet browsing.  Wired connects to a server with nfs shares.  However, the wired connection seems to take over when they are both connected.

How do I make the system use the wireless connection when browsing?  I have been toying with route.  Is this the right direction?

Thanks

Offline

#2 2011-01-21 22:22:39

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: How do I use 2 network cards?

Route may be the correct solution.  What are you using to manage your connections? Things like wicd or Networkmanager can (might) be configured to shut down wireless when a wired connection is available.  Check that when you connect the wired link, the RF link stays up. 

Other than that, you may want to look into iptables as well as route


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2011-01-21 22:34:46

glenn69
Member
Registered: 2007-09-26
Posts: 125

Re: How do I use 2 network cards?

I'm using networkmanager in kde 4.  I do want both interfaces to be running, so shutting one down won't help me.  A typical use might be listening to music over the ethernet connection to the nfs shared music, while browsing the internet through the wireless interface.  So I need to figure how to make that happen.

As a side note, the reason for this is that my town provides internet access via an open wifi signal.  That is the only way I can connect to the net.  In fact, our entire town is on one LAN.  Small town ( 40 homes ) in the middle of nowhere.  Everything else I want to handle through my router.

Offline

#4 2011-01-21 22:58:20

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: How do I use 2 network cards?

As ewaller suggested, look into using "route" and "iptables". You could use route to direct all traffic to certain addresses or address ranges via one interface, and let everything else pass through the other. iptables can do that too and more.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#5 2011-01-21 23:35:27

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,217
Website

Re: How do I use 2 network cards?

If you are getting a DHCP address on both interfaces, then the Default Route (gateway) of the Wired Connection is probably replacing the one from the Wireless.

You will either need to set the wired connection with a static IP Address and NO gateway address (so that the Wireless one stays in place), or tell your DHCP Client to ignore the gateway address that the server on the Wired subnet gives you.

Offline

Board footer

Powered by FluxBB