Networking Forums

Networking Forums > Computer Networking > Linux Networking > independant default routes for separate nics

Reply
Thread Tools Display Modes

independant default routes for separate nics

 
 
Johnny Musacha
Guest
Posts: n/a

 
      08-16-2004, 11:49 PM

Hi,
Under kernel 2.6.7, I'm trying to setup a scenario where my box
has two nics. The nics will have ip addresses in separate netblocks. I
want to setup separate default routes for eth0 and eth1 where traffic
destined for eth0 only enters and exits eth0; and vice-versa for eth1.
Can someone recommend the ip route statement?

eth0 - 10.1.1.2/24
default route 10.1.1.1

eth1 - 10.1.2.2/24
default route 10.1.2.1

I've tried:

ip route add 0.0.0.0/0 scope global nexthop via 10.1.1.1 dev eth0 nexthop via 10.1.2.1 dev eth1

but this doesn't work correctly.

Thanks

Johnny
 
Reply With Quote
 
 
 
 
P Gentry
Guest
Posts: n/a

 
      08-17-2004, 04:09 PM
Johnny Musacha <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> Hi,
> Under kernel 2.6.7, I'm trying to setup a scenario where my box
> has two nics. The nics will have ip addresses in separate netblocks. I
> want to setup separate default routes for eth0 and eth1 where traffic
> destined for eth0 only enters and exits eth0; and vice-versa for eth1.


Incoming traffic? Outging traffic? Not clear, but sounds like you
need split access.
See:
http://www.lartc.org/howto/lartc.rpd...ple-links.html
http://linux-ip.net/html/adv-multi-internet.html

> Can someone recommend the ip route statement?
>
> eth0 - 10.1.1.2/24
> default route 10.1.1.1
>
> eth1 - 10.1.2.2/24
> default route 10.1.2.1
>
> I've tried:
>
> ip route add 0.0.0.0/0 scope global nexthop via 10.1.1.1 dev eth0 nexthop via 10.1.2.1 dev eth1
>
> but this doesn't work correctly.
>
> Thanks
>
> Johnny

 
Reply With Quote
 
Johnny Musacha
Guest
Posts: n/a

 
      08-17-2004, 09:25 PM
In article <(E-Mail Removed) >, P Gentry wrote:
> Johnny Musacha <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
>> Hi,
>> Under kernel 2.6.7, I'm trying to setup a scenario where my box
>> has two nics. The nics will have ip addresses in separate netblocks. I
>> want to setup separate default routes for eth0 and eth1 where traffic
>> destined for eth0 only enters and exits eth0; and vice-versa for eth1.

>
> Incoming traffic? Outging traffic? Not clear, but sounds like you
> need split access.
> See:
> http://www.lartc.org/howto/lartc.rpd...ple-links.html
> http://linux-ip.net/html/adv-multi-internet.html


I'm looking to do it for both incoming and outgoing traffic. Any
traffic that comes into eth0 should go back out eth0 and vice versa.

Thanks
 
Reply With Quote
 
P Gentry
Guest
Posts: n/a

 
      08-18-2004, 03:15 AM
Johnny Musacha <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> In article <(E-Mail Removed) >, P Gentry wrote:
> > Johnny Musacha <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> >> Hi,
> >> Under kernel 2.6.7, I'm trying to setup a scenario where my box
> >> has two nics. The nics will have ip addresses in separate netblocks. I
> >> want to setup separate default routes for eth0 and eth1 where traffic
> >> destined for eth0 only enters and exits eth0; and vice-versa for eth1.

> >
> > Incoming traffic? Outging traffic? Not clear, but sounds like you
> > need split access.
> > See:
> > http://www.lartc.org/howto/lartc.rpd...ple-links.html
> > http://linux-ip.net/html/adv-multi-internet.html

>
> I'm looking to do it for both incoming and outgoing traffic. Any
> traffic that comes into eth0 should go back out eth0 and vice versa.
>
> Thanks


You'll need to implement the examples from both links -- I think the
second is geared to complement the lartc split access setup, IIRC.
 
Reply With Quote
 
P Gentry
Guest
Posts: n/a

 
      08-18-2004, 03:16 AM
Johnny Musacha <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> In article <(E-Mail Removed) >, P Gentry wrote:
> > Johnny Musacha <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> >> Hi,
> >> Under kernel 2.6.7, I'm trying to setup a scenario where my box
> >> has two nics. The nics will have ip addresses in separate netblocks. I
> >> want to setup separate default routes for eth0 and eth1 where traffic
> >> destined for eth0 only enters and exits eth0; and vice-versa for eth1.

> >
> > Incoming traffic? Outging traffic? Not clear, but sounds like you
> > need split access.
> > See:
> > http://www.lartc.org/howto/lartc.rpd...ple-links.html
> > http://linux-ip.net/html/adv-multi-internet.html

>
> I'm looking to do it for both incoming and outgoing traffic. Any
> traffic that comes into eth0 should go back out eth0 and vice versa.
>
> Thanks


You'll need to implement the examples from both links -- I think the
second is geared to complement the lartc split access setup, IIRC.
 
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
Multiple default routes j-k-l@mail.ru Linux Networking 0 04-09-2008 11:20 AM
obating internet acess and network on separate routes Rick Windows Networking 0 03-23-2006 04:50 PM
Two NIC cards => Possible to Configure Two Default Routes? beagle197@hotmail.com Linux Networking 8 09-27-2005 11:55 AM
redundant default routes? Jay McCanta Linux Networking 1 10-11-2004 01:15 PM
Multiple default routes Kool Breeze Linux Networking 5 12-04-2003 01:41 AM



1 2 3 4 5 6 7 8 9 10 11