LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-27-2005, 06:13 PM   #1
jeffhan
LQ Newbie
 
Registered: Jul 2005
Posts: 6

Rep: Reputation: 0
Linux Server routing failed! please help me?


settings on the linux server
OS: Redhat 9
eth0: 192.168.1.98/24
eth1: 192.168.10.1/24

route-eth0 file:
192.168.1.0/24 via 192.168.1.98

route-eth1 file:
192.168.10.0/24 via 192.168.10.1

my own subnet is 192.168.10.0
internet accessing router internal port: 192.168.1.99/24

problem:

i want to use this linux server as a router between the real router and the subnet. all the internet request from my subnet will be forward to the real router.

my client pc in the subnet has address :192.168.10.253

i can ping the 192.168.1.98 successfully from the client pc, but failed by ping 192.168.1.99.

On the server side, i can ping any internet address successfully.

so guess there are some problem of routing, who can help me? thanks a million!
 
Old 07-27-2005, 08:42 PM   #2
mpeg4codec
Member
 
Registered: Jul 2005
Distribution: Debian, Gentoo, self-built [not LFS]
Posts: 109

Rep: Reputation: 15
I think I see what you're trying to do. You have a router [presumably some Linksys hardware thing or something similar] on 192.168.1.99/24, and you have a Linux box on 192.168.1.98/24. You also have another network connected to your eth1 using subnet 192.168.10.0/24 that you want to be able to access the internet. If I got this wrong, let me know.

I am not familiar with the syntax of Redhat's route files. However, I presume you have them correct. If you can ping the Linux machine from any of the machines on the 192.168.10.0/24 subnet, it's working.

What you need to do is turn IP forwarding on so the Linux machine can act as a router. To do this, run the following command as root:

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

More than likely, you will need to set up a static route on the hardware router that will route 192.168.10.0/24 to 192.168.1.98 . If you're not sure how to do that, look in the manual or give the router's model number here.
 
Old 07-27-2005, 10:06 PM   #3
jeffhan
LQ Newbie
 
Registered: Jul 2005
Posts: 6

Original Poster
Rep: Reputation: 0
thanks man!!! you are on the right point. All your assuming are exactly right.

i didn't turn on the ip forwarding. I am gonna turn it on tomorrow and show your the result.

Many many thanks!
 
Old 07-28-2005, 02:39 PM   #4
jeffhan
LQ Newbie
 
Registered: Jul 2005
Posts: 6

Original Poster
Rep: Reputation: 0
today i turned on the ip_forward, but the routing still didn't work.

shoud i configurate the ipchains as well? is the ipchains necessary for just routing?

but i failed to use the ipchains, when i type:
#ipchains -L
the response is : "ipchains: Incompatible with this kernel"

i guesst i should recompile the kernel, shouldn't I?
 
Old 08-03-2005, 12:25 PM   #5
jeffhan
LQ Newbie
 
Registered: Jul 2005
Posts: 6

Original Poster
Rep: Reputation: 0
here's the routing table on the linux server.

[root@Webnetredhat9 root]# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
192.168.10.0 * 255.255.255.0 U 0 0 0 eth1
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 192.168.1.99 0.0.0.0 UG 0 0 0 eth0
[root@Webnetredhat9 root]#

i turn on the ip_forwarding, and it still doesn't work, please save me, my boss is gonna kill me
 
  


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
NFS failed from linux client to AIX server dennyqian Linux - Networking 1 08-07-2005 04:44 PM
Name Server Routing Problem carloconcillado Linux - Networking 2 06-15-2005 10:26 AM
mount to NFS server 'ip addr' failed: server is down. timvand Linux - Networking 1 04-22-2005 02:03 PM
connection to cups server failed only if from server itself in KDE applications kyuso Fedora 0 01-22-2005 10:34 PM
mount to NFS server '192.168.1.13' failed: server is down rblampain Linux - Networking 2 01-14-2005 01:19 AM

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

All times are GMT -5. The time now is 08:33 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