LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-24-2007, 06:49 PM   #1
frankcchan
LQ Newbie
 
Registered: Dec 2006
Posts: 3

Rep: Reputation: 0
forward route


i have set net.ipv4.ip_forward to one and have 2 network card on RHEL4 with x.x.20.10 & x.x.30.10 with default gateway x.x.20.1 out to internet.

x.x.30.0 x.x.30.10 255.255.255.0 UG 0 0 0 eth1
x.x.30.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
x.x.20.0 x.x.20.10 255.255.255.0 UG 0 0 0 eth0
x.x.20.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 x.x.20.1 0.0.0.0 UG 0 0 0 eth0


have machine x.x.30.11 with following:

x.x.30.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
x.x.20.0 x.x.30.10 255.255.255.0 UG 0 0 0 eth0

this can ping x.x.30.10 and x.x.20.10
but can not ping anything in 20 subnet and get to internet

another machine x.x.20.11 with following:

x.x.30.0 172.27.20.10 255.255.255.0 UG 0 0 0 eth0
x.x.20.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 x.x.20.1 0.0.0.0 UG 0 0 0 eth0

this can ping both 20 & 30 and also get out to internet.

please help
 
Old 01-24-2007, 07:31 PM   #2
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
Can you please edit your post and replace x.x. with something like 192.168. It's hard to read
 
Old 01-27-2007, 10:36 PM   #3
SnotRocket
LQ Newbie
 
Registered: Jan 2007
Posts: 11

Rep: Reputation: 0
I think your setup should look a a little more like this (Assuming your scheme is 172.27.x.x):

Code:
Router (172.27.20.10, 172.27.30.10)
-------------------------------------
172.27.30.0   0.0.0.0      255.255.255.0  U   0 0 0 eth1
172.27.20.0   0.0.0.0      255.255.255.0  U   0 0 0 eth0
0.0.0.0       172.27.20.1  0.0.0.0        UG  0 0 0 eth0


PC1 (172.27.30.11)
-------------------
172.27.30.0   0.0.0.0       255.255.255.0 U   0 0 0 eth0
0.0.0.0       172.27.30.10  0.0.0.0       UG  0 0 0 eth0


PC2 (172.27.20.11)
-------------------
172.27.20.0   0.0.0.0       255.255.255.0 U   0 0 0 eth0
172.27.30.0   172.27.20.10  255.255.255.0 U   0 0 0 eth0
0.0.0.0       172.27.20.1   0.0.0.0       UG  0 0 0 eth0
1. You were missing a default gateway on 172.27.30.11

2. Is the "router" (172.27.20.10, 172.27.30.10) doing NAT? From the default gateway on the "router" (172.27.20.1) it looks like you pass it off to another device. If the "router" is doing NAT, you may be NATting traffic before you can route it. You may want to post the output of "iptables -vnL -t nat".

3. The "router" won't route the traffic if iptables is blocking it in the FORWARD chain of the FILTER table. You may want to post the output of "iptables -vnL".

Hope this helps.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Default route took 20s to display with 'route' command Akhran Linux - Newbie 3 11-04-2006 04:59 AM
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 04:34 AM
Need Linux machine to route / packet forward rdd Linux - Networking 3 06-24-2004 09:59 AM
ADSL as a Alternate route or backup route bhagat2000 Linux - Networking 0 05-27-2004 03:17 PM
cant see .forward file in home directory >> mail forward/copy steve_babbage Linux - Newbie 0 03-02-2004 06:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration