Dear all,
*** BACKGROUND
I have been trying to work out how to configure routing tables on a
server. The problem I came across is that all traffic that comes in on
one interface has to leave on that interface.
*** THE GOAL
Below is the routing table that I would like to create. The O/S is
Suse 11.
# eth0 - 10.254.66.90 netmask 255.255.252.0
# eth0's default gateway is: 10.254.64.73
# eth0's gateway for all traffic to or from 10.0.0.0 is: 10.254.64.50
# --------------------------------------------------
# eth1 - 10.254.42.13 netmask 255.255.252.0
# eth1's default gateway is: 10.254.40.73
# eth1's gateway for all traffic to or from 10.0.0.0 is: 10.254.40.50
# --------------------------------------------------
# All netmasks are /22 255.255.252.0
# All traffic that enters on eth1 should exit on eth1, the same is
true for eth0. Each NIC is isolated on its own VLAN.
Here is the currently working routes file, that is used with only eth0,
and works:
# cat /etc/sysconfig/network/routes
default 10.254.64.73 255.255.252.0 -
10.0.0.0 10.254.64.50 255.0.0.0 -
*** EARLIER ATTEMPTS AND FAILURE
Using the file above above as a template, I tried to do this with the
usual routing style, but this causes the server to have messed up
routing tables successfully disconnecting the server from the network:
# cat /etc/sysconfig/network/routes
default 10.254.64.73 255.255.252.0 eth0
default 10.254.40.73 255.255.252.0 eth1
10.0.0.0 10.254.64.50 255.0.0.0 eth0
10.0.0.0 10.254.40.50 255.0.0.0 eth1
I do not think this is the best way to go.
*** IPROUTES
I decided that this was not the best way and IPROUTE2 would be the
better choice.
I read that iproutes could be able to perform this, but cannot really
get to grips with the syntax. I think something could be achieved with
: ip rule add iff eth0 <insert rest of command>, and then use several of
these to route the traffic, but I am very unsure. I am certain that
there are better ways to do this, but I only typed 'ip rule show' for
the first time last night...
*** CRY FOR HELP
Does anyone know whether what I want is possible, and if so could offer
some advise on how to go about this, because I am pretty lost with this?
Best regards.
Z
--
Please do not reply to my Email address. It is a faux Email address.
Cyberpunk FPS/MMORG
www.neocron.com
Runs on Windows, platinum in latest WINE/Ubuntu. Running since 2002.