LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-18-2004, 02:33 PM   #1
ech310n
Member
 
Registered: Jan 2004
Distribution: RHEL, Fedora
Posts: 46

Rep: Reputation: 16
Configuring Simple Router on Mandrake 9.2...


Hi,

I've got a box running Mandrake 9.2. The machine has three NICs. I have a router/ADSL modem and another machine which I am trying to get onto the Internet via the mandrake box and the router/adsl modem. The setup is like this....

INTERNET
|
|
| ppp interface (public IP)
ROUTER/ADSL
| eth0 intf (192.168.10.2)
|
Linux eth0 (192.168.10.100)
Linux eth1 (192.168.9.100)----------SWITCH---------WinXP(192.168.9.110)
Linux eth2 (192.168.8.100)
|
|
HUB

The linux box can connect to the Internet and to the XP machine.
The XP machine can connect to the Linux box and is able to ping ALL interfaces on all
three subnets.
HOWEVER, the XP machine is unable to ping the eth0 interface of the router 192.168.10.2 (even though the linux machine can).

There is no firewall running on the MDK box, and the routing table looks like this (routed is running)...

Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.9.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.8.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.10.2 0.0.0.0 UG 0 0 0 eth0

All I want to do is configure my Linux box like a simple router, which will forward traffic onto the appropriate network, I don't need to use IP Masquerading or NAT or anything, the ADSL Modem/Router does all of that, I just need to get the XP machine to be able to get traffic onto the 192.168.10.2 interface of the router.

Many Thanks - echelon
 
Old 01-18-2004, 03:50 PM   #2
sal_paradise42
Member
 
Registered: Jul 2003
Location: Utah
Distribution: Gentoo FreeBSD 5.4
Posts: 150

Rep: Reputation: 16
it does need to be set up as a router even though your dsl router is doing all the nat, it does not route by default. I did a similar setup with my machines and had to set up a program called shorewall that makes it really easy to setup a routing system with some configuration scripts. I think that should do it.
 
Old 01-19-2004, 01:56 AM   #3
ech310n
Member
 
Registered: Jan 2004
Distribution: RHEL, Fedora
Posts: 46

Original Poster
Rep: Reputation: 16
Shorewall is already installed, as far as I can see that's just a firewalling package. I would have thought that I would be able to setup Mandrake as a simple router without having to use the firewall, plus I don't need to use NAT because I am routing between two private class C networks.

All I want to do is enable routing between the two private networks, I'll configure packet filtering / firewall later on, just need to try and get this working first.

Cheers!
 
Old 01-19-2004, 02:38 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Dumb question. If the eth0 ip address entered in as a gateway in the XP setup?
 
Old 01-19-2004, 04:03 AM   #5
ech310n
Member
 
Registered: Jan 2004
Distribution: RHEL, Fedora
Posts: 46

Original Poster
Rep: Reputation: 16
I have set the default gateway on the XP box to 192.168.9.100 the IP address of eth1. I did try setting it to the IP of eth0 (192.168.10.100) but then I couldn't get ANY connectivity as the interface is on a different subnet to the XP machine.
 
Old 01-19-2004, 08:53 AM   #6
zedrob
Member
 
Registered: Aug 2003
Location: Italy
Distribution: Gentoo, Fedora, Ubuntu
Posts: 30

Rep: Reputation: 15
mmmhh

I'm not an expert but it seems your routing table is missing the "default" line...
Code:
route add default gw 192.168.10.2 eth0
Bye!
 
Old 01-19-2004, 11:56 AM   #7
ech310n
Member
 
Registered: Jan 2004
Distribution: RHEL, Fedora
Posts: 46

Original Poster
Rep: Reputation: 16
It's not, it's just that I did netstat -rn, 0.0.0.0 is the default entry, if I had done just netstat -r it would have said 'default'. Does anyone else have any ideas? I am using the Download version of MDK 9.2....does it even have this ability???
 
Old 01-26-2004, 12:42 AM   #8
ech310n
Member
 
Registered: Jan 2004
Distribution: RHEL, Fedora
Posts: 46

Original Poster
Rep: Reputation: 16
Cracked it!

Just to let you all know (in case you're interested), I figured out what the problem(s) were...

First off, I had to enable IP forwarding in /proc/sys/net/ipv4 by adding the
line FORWARD_IPV4=true then restarting networking by doing...

service network restart

Then I got RIP running by doing /etc/init.d/routed start

Finally, I had to add a route to my ADSL Modem/Router. This was the problem, the reason I could not ping this device from my XP machine was because the ADSL Modem/Router didn't have a route with which to send packets back to the subnet which my XP box is on.

Regards - echelon
 
Old 01-28-2004, 08:16 PM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I'm glad that you got it working. I'm sorry I either misread your diagram or mistyped my response when I had eth0 instead of eth1.
 
  


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
Simple internal router lookssimple Linux - Networking 4 04-01-2004 12:30 PM
A simple router question. ingy866 Linux - Newbie 2 08-18-2003 01:51 PM
hello again! simple questions about configuring mipia Slackware 2 06-20-2003 11:03 AM
Simple Router hotrodowner Linux - Networking 14 02-10-2003 03:29 PM
Trouble configuring Mandrake 7.2 with linksys router SilentStrike Linux - Networking 4 06-10-2001 02:45 PM

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

All times are GMT -5. The time now is 09:50 AM.

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