LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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
 
LinkBack Search this Thread
Old 12-18-2003, 01:55 PM   #1
phildawson
LQ Newbie
 
Registered: Dec 2003
Posts: 4

Rep: Reputation: 0
Unhappy Routing problem, Please help!


Please be kind I'm a newbie ...

I am having problems connecting to my router. I'm using Redhat v9, have ip forwarding on. No
firewall rules are in place. From the server I can ping both cards eth0 and eth1.
From my internal machine I can ping eth0 but not eth1.
From the server I can ping the my machine on the internal LAN.
I can connect to the router from the server OK.

Another thing is I'm not sure whether adding routing table entries will fix the problem or if I should use bridging.



Please help!



Routing Table


Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
192.168.44.0 * 255.255.255.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo



Network

-----------
- Router -
-----------
192.168.0.1
|
|
192.168.0.254 <-- eth1
-----------
- Server -
-----------
192.168.44.2 <-- eth0
|
|
192.168.44.100
-----------
Internal LAN
 
Old 12-18-2003, 05:12 PM   #2
beyer42
Member
 
Registered: Dec 2003
Location: San Jose
Distribution: Redhat WS 3
Posts: 410

Rep: Reputation: 30
I would try adding gateway=192.168.0.1 on ifcfg-eth1 should allow packets to talk to router.
 
Old 12-18-2003, 05:41 PM   #3
g-rod
Member
 
Registered: Dec 2003
Location: Long Island, NY USA
Distribution: RedHat, SUSE
Posts: 336

Rep: Reputation: 30
I agree with beyer42 for getting to the router.
Also on the windows machine you need to add a default route.
route -p add 0.0.0.0 mask 0.0.0.0 192.168.44.2
So that machine can get to eth1 and the router.
 
Old 12-20-2003, 11:37 AM   #4
phildawson
LQ Newbie
 
Registered: Dec 2003
Posts: 4

Original Poster
Rep: Reputation: 0
I am still unable to get to the router :-(

My workstation gateway is 192.168.44.2
From the server I can ping 192.168.0.254 and 192.168.44.2
From my workstation I can ping I can ping 192.168.0.254 and 192.168.44.2

I still cannot ping 192.168.0.1.

The router is an ADSL netgear modem/router and is accessible from my server. I can get to the admin page ok via a browser.

I have tried a browser on my workstation but that doesnt work either :-(

This is my routing table at the moment.


Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
192.168.44.0 * 255.255.255.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 192.168.0.254 0.0.0.0 UG 0 0 0 eth1


Is this wrong?

Please, any more ideas???
 
Old 12-20-2003, 02:04 PM   #5
g-rod
Member
 
Registered: Dec 2003
Location: Long Island, NY USA
Distribution: RedHat, SUSE
Posts: 336

Rep: Reputation: 30
I assume that the routing table is from the machine you call server. If it is that looks correct.
Just to review.
You have two networks
192.168.0.x
192.168.44.x
and the server is the gateway between the two networks. The machine you call workstation is on the 192.168.44.x network and the router is on the 192.168.0.x network. The route is the connection to the internet.
Problem
You are unable to ping the router from the server, but you able to get to the admin web page of the router. If this is true it sounds like a firewall issue.
What is the output of the following.
iptables -L -n;
arp;
sysctl net.ipv4.ip_forward;
if this returns 0 you are not forwarding run
sysctl -w net.ipv4.ip_forward=1;

Check the route and make sure that it is configured to respond to pings (ICMP protocal).

Last edited by g-rod; 12-20-2003 at 02:06 PM.
 
Old 12-20-2003, 06:03 PM   #6
robik
LQ Newbie
 
Registered: Dec 2003
Location: israel,Beer-sheva
Distribution: slackware 9.0/asplinux 9.2
Posts: 13

Rep: Reputation: 0
man, i spend 3 days to fix this thing out. So here is complete guide t all
Do exactly as here.

route del default
route add 0.0.0.0 gw 192.168.0.1 ( at your server)
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -t nat - A POSTROUTING -0 eth1 -j MASQUERADE
echo "1" > /proc/sys/net/ipv4/ip_forward


You are done, but remember that this is unsecure and you need to write you rules for iptables
 
Old 12-20-2003, 07:05 PM   #7
phildawson
LQ Newbie
 
Registered: Dec 2003
Posts: 4

Original Poster
Rep: Reputation: 0
Many thanks to you all! Finally have it working. Here's what I did:

Took g-rods advice (sorry robik, was writing this while you was posting) and checked the firewall rules, and forwarding. I had cleared all the rules from the firewall so I knew that was not causing problems. Again I checked to make sure. Then I checked forwarding and discovered it was disabled. The problem was that at one point I checked to make sure it was enabled and assumed it would stay enabled. How wrong could I be? Very!

OK, so now I had everything in place so I tried to ping the router on 192.168.0.1 and guess what ... nothing! The last piece of the puzzle was in the router. I needed to set a static route to 192.168.0.254 so packets could make their way back. As I'm new to all this I'm not sure that was the right thing to do but it seemed logical and worked for me.

I did notice that I could use either 192.168.0.1 or 192.168.0.254 as the default gateway and it would still work.

For your information the router is a Netgear DG834UK ADSL Firewall Router.

Just like to finish this of with thanks to everyone who helped.

Phil.
 
Old 12-20-2003, 07:11 PM   #8
phildawson
LQ Newbie
 
Registered: Dec 2003
Posts: 4

Original Poster
Rep: Reputation: 0
Just read my last post and would like to clarify. When I said:

"I did notice that I could use either 192.168.0.1 or 192.168.0.254 as the default gateway and it would still work"

This was on eth1 on the server not on the router and instead of adding the default route for eth1 I just added as the gateway in ifcfg-eth1.

Thanks again!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
routing problem DRagonRage Debian 8 09-21-2005 03:29 PM
routing problem DRagonRage Linux - Networking 1 09-21-2005 01:02 PM
Routing problem Infernal211283 Linux - Networking 3 02-28-2005 02:59 AM
Another Routing problem Bambi Linux - Networking 2 06-03-2004 03:13 PM
routing problem nowonmai Linux - Networking 2 10-09-2003 07:59 AM


All times are GMT -5. The time now is 06:37 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration