LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   static routing between two networks (https://www.linuxquestions.org/questions/linux-networking-3/static-routing-between-two-networks-653619/)

verb 07-04-2008 02:29 PM

static routing between two networks
 
hello i am trying to route between two netwrokz
the first machine has eth0 with ip 192.168.1.123/24 and subinterface eth0:0 with ip 172.16.1.1/24

so i am trying to ping 172.16.1.1 from other computer in the network (192.168.1.124/24) but the ping fail
this is the routing table for 192.168.1.124 =>

localnet * 255.255.255.0 U 0 0 0 eth2
172.16.1.0 192.168.1.123 255.255.255.0 UG 0 0 0 eth2
default DD-WRT 0.0.0.0 UG 0 0 0 eth2




this is the routing table from 192.168.1.123

192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
172.16.1.0 * 255.255.255.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default DD-WRT 0.0.0.0 UG 0 0 0 eth0

please any suggestions what`s wrong here ?

harry edwards 07-04-2008 03:31 PM

Do you have IP forwarding turned on in the kernel? Refer to http://www.redhat.com/docs/manuals/e...orwarding.html for information on how to achieve this.

Also, do you have VLAN module enabled as you have two IPs with different networks on one card? This means your switch/hub and kernel must support VLANs.

verb 07-04-2008 04:37 PM

yes i have ip forwarding enabled and vlan module enabled in my kernel

the problem now comes when i try to route with my slackware computer the routing fails
but when i try to route with debian computer(the same scheme) the routing is successful
on the debian computer i didn`t have ip_forwarding enabled but even so the routing was successful

harry edwards 07-04-2008 05:43 PM

Could it be a simple as a iptables (firewall) problem?


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