LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   route between to ethernet (https://www.linuxquestions.org/questions/linux-networking-3/route-between-to-ethernet-683663/)

nima0102 11-15-2008 06:12 PM

route between to ethernet
 
Hi every body
I have linux machine with 2 ethernet with network addresses 192.168.1.0and 192.168.2.0, I want to my stations on 192.168.2.0 access to station on 192.168.1.0 and vice versa. my routing table is :
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.1.0 192.168.1.2 255.255.255.0 UG 0 0 0 eth1

I have enabled forwarding in kernel but stations on tow network does not see another.
please guide me
thanks for any guidance and instruction

Tuttle 11-15-2008 09:54 PM

try making the netmask 255.255.0.0

nima0102 11-16-2008 01:37 PM

Quote:

Originally Posted by Tuttle (Post 3343337)
try making the netmask 255.255.0.0

thanks for your attention
But every ethernet is related to one network, I can not combine these networks, is disturbed my network design
thanks for any help or guidance

estabroo 11-16-2008 06:28 PM

If you already have forwarding on then what you need to do is set the route for the other network to point to that box in the other machines or set the route for the other in the gateway for that network. (wow that sounds confusing when I read it back)


for example:
In machine 192.168.2.24 you'd need to add a route for 192.168.1.0/24 that points to the box bridging the networks

or you'd need to have the default gateway router/box for 192.168.2.0 have a route for 192.168.1.0/24 that points to the box bridging the networks

and you need to do the same thing on the other network

nima0102 11-17-2008 06:03 AM

Quote:

Originally Posted by estabroo (Post 3344207)
If you already have forwarding on then what you need to do is set the route for the other network to point to that box in the other machines or set the route for the other in the gateway for that network. (wow that sounds confusing when I read it back)


for example:
In machine 192.168.2.24 you'd need to add a route for 192.168.1.0/24 that points to the box bridging the networks

or you'd need to have the default gateway router/box for 192.168.2.0 have a route for 192.168.1.0/24 that points to the box bridging the networks

and you need to do the same thing on the other network

thanks for your guidance, will try it


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