LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   routing through two ethernet (https://www.linuxquestions.org/questions/linux-networking-3/routing-through-two-ethernet-426925/)

SpY MaN 03-21-2006 09:27 AM

routing through two ethernet
 
HI EVERY ONE...

i have linux server with two ethernet interfaces and use this server as router with two gateways and i have two networks say "net1" and "net2"
i want if "net1" connected to my server through "eth0" to use the gateway associated with "eth0"

and if "net2" connected to my server through "eth1" to use the gateway associated with "eth1"

is this possible:Pengy: :Pengy:
if possible... can any one help me please:Pengy: :Pengy: :Pengy:

NOTE:* i'm using Fedora Core 4 With minimal installation
and i'm new to linux systems

THANX ....

theNbomr 03-21-2006 10:35 AM

Google 'linux router'. You will get a lot of good hits.

--- rod.

SpY MaN 03-21-2006 11:20 AM

theNbomr thanx for fast replay ...
i have searched with many words but nothing...

if you have any idea please tell me what i can do

SpY MaN 03-23-2006 04:46 AM

any body can help me please???

theNbomr 03-23-2006 09:33 AM

Did you actually do what I suggested; Google search for 'linux router'?

There are literally hundreds of great pages with the answer to your question. Here are four:

http://leaf.sourceforge.net/
http://www.freesco.org/
http://pigtail.net/LRP/
http://www.wfu.edu/~mudayja/router.html

--- rod.

SpY MaN 04-18-2006 09:32 AM

i want to do that with fedora setup and squid caching server

not with other OS

any idea??

SpY MaN 04-20-2006 09:24 AM

good thx every body....

elfy 04-20-2006 09:34 AM

Hmm..What exactly did you mean?
did you mean:
Quote:

I got two network ifaces and I want to have net1-gw as gateway when it is avaible and net2-gw as gateway if net1 link is down
If so just write a minor script which checks ifconfig's output with some minute cooldown and sets the gateway according to the info it got

SpY MaN 04-23-2006 10:45 AM

not exactly..!

1- i want to if any Pc from Net1 connected to linux router through iface1 uses Gateway associated with iface1.

2- if any Pc from Net2 connected to linux router through iface2 uses Gateway associated with iface2.

"in the same time"

please have a look on this picture

http://www.arabspc.net/upload/images/Multi%20Route.jpg

SpY MaN 04-27-2006 12:55 PM

there is no answer ....

theNbomr 04-28-2006 12:34 PM

Your picture makes no sense to me. Where are packets routed through your linux router expected to go? All I see is a computer with two NICs, each connected to a port on the same switch. The switch effectively short-circuits traffic through the system of gateways and router. And what are the "GATEWAY"s, anyway? Having said all of this, there is nothing about the linux router that makes it fundamentally different from a standard iptables based router/firewall. Fedora comes with all the necessary components to make it into a router. You need to configure it according to your own requirements. From the look of your drawing, that should be extraordinarily simple. Pass everything from eth0 on to eth1, and vice versa. If you are looking for a detailed description of every step you need to take to get there, then it is too general to answer in that level of detail. As I said before, this stuff is well documented out there already. Give it a try, and come back here when you run into more specific problems.

--- rod.


All times are GMT -5. The time now is 12:12 AM.