Networking Forums

Networking Forums > Computer Networking > Linux Networking > Selecting network for Internet access

Reply
Thread Tools Display Modes

Selecting network for Internet access

 
 
Clark Smith
Guest
Posts: n/a

 
      02-05-2011, 03:16 PM
I know very little about networking so please bear with me.

I have a Linux box M with two NICs. The first NIC is connected to
network A, whereas the second NIC is connected to network B. Both
networks have an Internet gateway. These gateways are totally independent
from each other.

Currently all Internet traffic on M is sent/received through
network A. Can I dynamically select in M which of the A and B networks to
use for Internet traffic?
 
Reply With Quote
 
 
 
 
Jan Wide³
Guest
Posts: n/a

 
      02-05-2011, 04:20 PM
Dnia 2011-02-05, o godz. 16:16:54
Clark Smith <(E-Mail Removed)> napisa³(a):


> I know very little about networking so please bear with me.
>
> I have a Linux box M with two NICs. The first NIC is
> connected to network A, whereas the second NIC is connected to
> network B. Both networks have an Internet gateway. These gateways are
> totally independent from each other.
>
> Currently all Internet traffic on M is sent/received through
> network A. Can I dynamically select in M which of the A and B
> networks to use for Internet traffic?


Yes.
1) any dynamic routing protocol, like RIP, OSPF ( the uplinks A and B
need support this)

or

2) http://lartc.org/lartc.html#LARTC.RPDB.MULTIPLE-LINKS

--
Jasiek
 
Reply With Quote
 
Pascal Hambourg
Guest
Posts: n/a

 
      02-05-2011, 04:35 PM
Hello,

Clark Smith a écrit :
> I know very little about networking so please bear with me.


Why crosspost into comp.os.linux.misc ?

> I have a Linux box M with two NICs. The first NIC is connected to
> network A, whereas the second NIC is connected to network B. Both
> networks have an Internet gateway. These gateways are totally independent
> from each other.
>
> Currently all Internet traffic on M is sent/received through
> network A. Can I dynamically select in M which of the A and B networks to
> use for Internet traffic?


It depends what you mean exactly by "dynamically".
 
Reply With Quote
 
unruh
Guest
Posts: n/a

 
      02-05-2011, 04:39 PM
On 2011-02-05, Pascal Hambourg <boite-a-(E-Mail Removed)> wrote:
> Hello,
>
> Clark Smith a ?crit :
>> I know very little about networking so please bear with me.

>
> Why crosspost into comp.os.linux.misc ?
>
>> I have a Linux box M with two NICs. The first NIC is connected to
>> network A, whereas the second NIC is connected to network B. Both
>> networks have an Internet gateway. These gateways are totally independent
>> from each other.
>>
>> Currently all Internet traffic on M is sent/received through
>> network A. Can I dynamically select in M which of the A and B networks to
>> use for Internet traffic?

>
> It depends what you mean exactly by "dynamically".


There is one default gateway. Only one. You can certainly decide which
one you want to use (route del default, route add default gw a.b.c.d eth1)
However AFAIK you cannot say that "all traffic generated by netscape
goes through A and all traffic generated by skype goes through B" for
example.

 
Reply With Quote
 
Douglas Mayne
Guest
Posts: n/a

 
      02-05-2011, 05:09 PM
On Sat, 05 Feb 2011 16:16:54 +0000, Clark Smith wrote:

> I know very little about networking so please bear with me.
>
> I have a Linux box M with two NICs. The first NIC is connected to
> network A, whereas the second NIC is connected to network B. Both
> networks have an Internet gateway. These gateways are totally
> independent from each other.
>
> Currently all Internet traffic on M is sent/received through
> network A. Can I dynamically select in M which of the A and B networks
> to use for Internet traffic?
>

You might configure that setup for some form of "high availability"
gateway to the internet using network B as a redundant link for network A
(or visa versa). The idea is to monitor the link using network A and be
prepared to switch to network B if network A fails. The elements which
may need to be fixed up upon switching are the default route and name
resolution. A simple script could perform the monitoring.

BTW, at first glance, using both networks seems like an attractive way to
potentially double your bandwidth. Unfortunately, AFAIK, it is not
possible to do that, especially without cooperation from network A and
network B. Theoretically, it could be done, if they both agreed to watch
for your packets and give them special marks of some sort to properly
redirect them back to you. I imagine this is the technique that is used
to bond some link-layer traffic together. For example, there are
protocols for bonded ISDN, bonded T1, bonded DSL, etc. These are
sometimes a viable option to incrementally add bandwidth. The downside is
it can get pricey in a hurry.

--
Douglas Mayne
 
Reply With Quote
 
Pascal Hambourg
Guest
Posts: n/a

 
      02-05-2011, 06:40 PM
unruh a écrit :
>
> However AFAIK you cannot say that "all traffic generated by netscape
> goes through A and all traffic generated by skype goes through B" for
> example.


Actually you can do that, under some conditions. You just need to be
able to identify the different flows, then you can route them through
different routes.
 
Reply With Quote
 
The Natural Philosopher
Guest
Posts: n/a

 
      02-05-2011, 06:42 PM
Clark Smith wrote:
> I know very little about networking so please bear with me.
>
> I have a Linux box M with two NICs. The first NIC is connected to
> network A, whereas the second NIC is connected to network B. Both
> networks have an Internet gateway. These gateways are totally independent
> from each other.
>
> Currently all Internet traffic on M is sent/received through
> network A. Can I dynamically select in M which of the A and B networks to
> use for Internet traffic?


set default route

man route
 
Reply With Quote
 
Max
Guest
Posts: n/a

 
      02-07-2011, 08:38 PM
Op 5-2-2011 17:16, Clark Smith schreef:
> I know very little about networking so please bear with me.
>
> I have a Linux box M with two NICs. The first NIC is connected to
> network A, whereas the second NIC is connected to network B. Both
> networks have an Internet gateway. These gateways are totally independent
> from each other.
>
> Currently all Internet traffic on M is sent/received through
> network A. Can I dynamically select in M which of the A and B networks to
> use for Internet traffic?


Look for policy routing, Clark

--
Max

Open Source is an ode to common sense
 
Reply With Quote
 
Thomas Schmidt
Guest
Posts: n/a

 
      02-08-2011, 03:32 PM
Am 05.02.2011 20:42, schrieb The Natural Philosopher:
> Clark Smith wrote:
>> I know very little about networking so please bear with me.
>>
>> I have a Linux box M with two NICs. The first NIC is connected to
>> network A, whereas the second NIC is connected to network B. Both
>> networks have an Internet gateway. These gateways are totally
>> independent from each other.
>>
>> Currently all Internet traffic on M is sent/received through
>> network A. Can I dynamically select in M which of the A and B networks
>> to use for Internet traffic?

>
> set default route
>
> man route


You would probably also need to get a new ip address and dns server via
dhcp from the internet provider in the other network:

dhcpcd -n
(The command may vary according to your linux version)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I allow internet access but not network access over a route Andrew_White Wireless Networks 2 12-10-2009 07:50 PM
PC has internet access, MAC does not, both network access Ronald Beilsma Network Routers 0 05-24-2005 03:14 PM
Internet Access without Network Resource Access Jason Scoggins Windows Networking 4 11-05-2004 04:28 PM
How do I let people access the internet via an access point but not allow them access to my network yar Wireless Networks 3 09-21-2004 03:48 AM
getting IE to access internet via network Erasmus Dim Quebec Home Networking 15 08-24-2003 11:36 AM



1 2 3 4 5 6 7 8 9 10 11