Basic routing help


Forum: Networking
Topic: Basic routing help
started by: mR_Slug

Posted by mR_Slug on Jan. 05 2006,08:53
Hi, before I start, id just like to say that this is a fantastic distro. I’ve learnt more about Linux, using this than any other distro.

Basically I want to setup a dedicated Linux box to handle routing between my Ethernet (with gateway to internet) and token ring networks. The system is an IBM PC-300 Pentium 120. I've done a HD install and everything seems to be setup correctly. I can ping both the networks from the DSL box and everything seems to be working perfectly. But I just cannot get it to route traffic from one network to the other. For simplicity and testing i've setup the network like this:

Computer A (win NT) (Ethernet):
IP: 192.168.1.9
Subnet: 255.255.255.0
G/W: 192.168.1.10

Computer B (Win 2K) (Token Ring):
IP: 192.168.2.9
Subnet: 255.255.255.0
G/W: 192.168.2.10

Computer C (DSL):
eth0:
IP: 192.168.1.10
Subnet: 255.255.255.0
tr0:
IP: 192.168.2.10
Subnet: 255.255.255.0

G/W: 192.168.1.1

OK So Computer A can ping 192.168.1.10 and 192.168.2.10 (DSL box) but cannot ping 192.168.2.9 (Computer B). The reverse is also true.

Routing table on the DSL box looks like this:

Destination    Gateway      Genmask          Flags Metric Ref  Use Iface
192.168.1.0  *                255.255.255.0   U      0       0    0    eth0
192.168.2.0  *                255.255.255.0   U      0       0    0    tr0
default         192.168.1.1  0.0.0.0            UG     0      0     0   eth0

So can someone please tell me what I am doing wrong? I’ve been scratching my head for weeks about this. I’ve googled and read guides on this over and over but I seem to be missing something?

Posted by mR_Slug on Jan. 06 2006,12:49
Anyone, know whats wrong with this setup. Any input appreciated.
Posted by cbagger01 on Jan. 07 2006,04:18
Sorry.  Unforunately it seems like the forum user's network routing skills are not up to the task here.

DSL uses standard linux network stack and networking tools, so I would guess that any generic networking help resources would be a better place to look for support.

Posted by waspbloke on Jan. 07 2006,11:44
Have you switched ip_forwarding on?
You probably want to install the ip_tables extension aswell with some basic rules.

For ip_forwarding with iptables, edit your /opt/bootlocal.sh
Code Sample

iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain

# Set up IP FORWARDing and Masquerading
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth2 -j ACCEPT

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


*you might want to change the iptables rules slightly to suit your ethX interfaces, there are two basic rules you can hack away with - try duplicating the FORWARD/ACCEPT rule for the other ethX interface.
Hope this helps. I was having similar problems myself but that fixws it, then you can add more paranoid rule sets to iptables as you figure it out.

Posted by mR_Slug on Jan. 08 2006,13:58
Thanks waspbloke. i'll give that a try
Posted by waspbloke on Jan. 08 2006,22:55
been investigating this and another option i've discovered:

enable apt, install synaptics and browse for and install the bridge-utils package. use brctl to create a bridge between the two interfaces - this can either be so your bridge machine is invisible to the network or it can be assigned an ip addy if you need to run services from it.

*i have not tested this yet and am still working my way through the wiki pages (< linux wiki: bridge >) but it looks as if this is what you really want - i shall report back here with any progress on getting it running in dsl

Posted by mR_Slug on Jan. 09 2006,19:58
hi cheers for info, i'm setting up a wirless bridge on another dsl box, and was stumped on this, but i think youve solved this too. ill let you know how i get on
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.