Routing question

Ben Boulanger ben at blackavar.com
Fri May 9 15:32:25 EDT 2003


On Fri, 9 May 2003 pll at lanminds.com wrote:
> >Yup, so pull that GATEWAY out and put it in /etc/sysconfig/network 
> >instead... I imagine that's been touched on already.
> 
> Which one, both?

Yep, pull em both.  It'll work either way, but keeping it seperate from 
each interface is a good idea.

> There is no closed network.  Both networks have active gateways and 
> can route to the entire world (unless it's this box :)

Ah hah!  in that case...

> >If you turn on IP forwarding, does it act as you would like?  
> 
> All I have to do for this is 'echo 1 > /proc/sys/net/ipv4/ip_forward', right?

Yup, but since both networks have full access, it sounds like you'll need 
to do a little more.  Here's how I see it:

	Box Paul = 10.241.35.2
	Box Ben = 10.241.37.2
	Linux35 = 10.241.35.18
	Linux37 = 10.241.37.70

Paul has 1 NIC
Paul's routing table:
	10.241.35.0	0.0.0.0		255.255.255.0	eth0
	0.0.0.0		10.241.35.1	0.0.0.0		eth0

Ben has 1 NIc
Ben's routing table:
	10.241.37.0	0.0.0.0		255.255.255.0	eth0
	0.0.0.0		10.241.37.1	0.0.0.0		eth0

Linux box has 2 interfaces (linux35 and linux37)
Linux's routing table:
	10.241.35.0	0.0.0.0		255.255.255.0	eth0
	10.241.37.0	0.0.0.0		255.255.255.0	eth3
	0.0.0.0		10.241.35.1	0.0.0.0		eth0

If Paul pings 10.241.35.18, he should get a reply
If Ben pings 10.241.37.70 he should get a reply

If Paul pings 10.241.37.1 does he get a reply?
If Ben pings 10.241.35.1 does he get a reply?
	These are really questions about "does 35.0/24 know how to get to 
	37.0/24?" and visa versa.  If the answer is yes... and you still
	can't ping 10.241.37.70 from Paul, you may want to be sure that 
	the linux box isn't arping across itself... there's something in 
	/proc to turn that off.

	If the answer is "no" then you'll want static routes between 
	10.241.37.1 and 10.241.35.1.  Either that, or you can turn on
	ip forwarding and have the linux box bridge the networks
	(generally a bad thing if you're not the network admin)

Ben

-- 

  "Lottery: (noun)  Middle French loterie: 
                    A tax on people who are bad at math."  





More information about the gnhlug-discuss mailing list