Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
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???
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.