Re: 2 WAN port,, 1 LAN port on one machine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yes, 

you can use multiple routing tables, enable it in the kernel and make two routing tables, both with a default route, one using eth0, the other eth1, and some "ip rule.. " things to make it do the right thing.

To me it's not clear if you have only one, or two routers to the internet, if there is only one, which will route every incoming packet to eth1, you will need the CONNMARK ipt module to mark incoming packets which are related to outgoing-eth0 traffic, and use that mark in your multiple routing tables.

Good luck.


On Thu, 26 Feb 2004 19:33:19 +0700 (WIT)
"-iYung-" <iyung@xxxxxxxxxx> wrote:

> Currently i have one linux bos as internet gateway, and i have three
> different LAN segemnts connected to the machine.
> 
> a. 172.16.30.0/24
> b. 172.16.40.0/24
> c. 159.163.123.0/24
> 
> What i wanted to do is, I would like to have 2 WAN port and 1 LAN port.
> 
>                LINUX
>              -----------
>             |           |
>             |           |---eth0 (a.a.a.a)
>             |           |
>     eth1 ---|           |
>             |           |
>             |           |---eth1 (b.b.b.b)
>             |           |
>              -----------
> 
> all segments connected to one router, and the router will route everthing
> to 0.0.0.0/0.0.0.0 to eth1 (c.c.c.c)
> 
> My question is, was it possible if:
> 
> a. all internet traffic request coming from segment 172.16.30.0/24 and
> 159.163.123.0/24 will go out from eth0
> 
> and...
> 
> b. all internet traffic request coming from segment 172.16.40.0/24 will go
> out from eth1
> 
> thank you.
> julius.
> 


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux