On Wed May 10 2000 at 11:06, "Greg" wrote:

> using IP aliasing I can setup a machine with one nic but two IP
> addresses My machine is now 192.168.1.101 and 192.168.2.1

[ I was about to answer this in your previous query, but spotted
  this next message just in time :-]

> I can see the machine from both subnets and it can see both
> subnets.  Now how do I get it to route traffic between the two
> subnets ?

You *do* have the kernel configured for routing, no?

echo 1 > /proc/sys/net/ipv4/ip_forward

(An often overlooked - but essential - thing to do).

> Specifically, I need to be able to see 192.168.1.1 from
> 192.168.2.1 using my machine with two IPs (192.168.1.101 /
> 192.168.2.1) as a gateway b/w the two subnets.

Easy, no problem.  If everything else is configured correctly
(default routes, network masks, etc), it should work just fine.

Mind you, since all the boxes are on one physical network, I'm not
sure why you just don't add a static route like this on all the
192.168.1.0/24 boxes:

        route add -net 192.168.2.0 netmask 255.255.255.0 eth0

and on the 192.168.1.0/24 boxes:

        route add -net 192.168.1.0 netmask 255.255.255.0 eth0

then there would be no need for the gateway at all, they'll all
connect directly.  (It is possible to add static routes like this
even to a windows box).

  On redhat boxes, you can add static routes to the system
  networking configuration by putting something like this into a
  file called /etc/sysconfig/static-routes:

        eth0 net 192.168.1.0 netmask 255.255.255.0

  (ie, same as the "route add -"[...] command, but with the interface
  device name at the start of the line rather than at the end).

Cheers
Tony
 -=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-
  Tony Nugent <[EMAIL PROTECTED]>    Systems Administrator, RHCE
  GrowZone OnLine       (a project of) GrowZone Development Network
  POBox 475 Toowoomba Oueensland Australia 4350    Ph: 07 4637 8322
 -=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to