[mythtv-users] Multiple boxes on different networks

Lucas James Lucas.James at ldjcs.com.au
Tue Nov 7 12:00:11 UTC 2006


On Tuesday 07 November 2006 12:53, Jawaad Ahmad wrote:
[...]
> Lucas,
>
> I should have clarified that both hosts can see each other without any
> difficulty. I'm able to ssh/telnet/etc. from one to the other. Well, at
> least one way. Going the other way, I'm able to as long as I have the
> router forwarding the appropriate port.
>
> In case you're wondering why I have the NAT, I plan to use the 192.168.1.2
> host to capture packets using NCID
> (http://www.davidlaporte.org/tutorials/ncidsip.php). As long as it's
> sitting out there, I thought I might as well use it to as a backend and
> frontend _if posssible_.
>
> > It would be much easier if you set the different subnets (192.168.1.0/24
>
> and
>
> > 192.168.0.0/24), and just route all traffic between them.
>
> I think I have the different subnets set up. How do I route all traffic
> between them. (You mean without forwarding ports, correct?) Does this
> involve modifying the routing table on the host(s)? the router?

If you are runing routed(8) (or some other routing daemon) on all hosts, then 
you probably won't need to modify anything, as long as the subnets are set up 
correctly. A quick check with netstat -r will tell you if something is amiss.

on the internal gateway (192.168.0.1/192.168.1.3) make sure there is no NAT (I 
can understand your need for NAT on the border gateway 192.168.1.1).

you also must make sure that that host (internal gateway) is configured to 
forward packed (my linux is a little rusty, but it may have something to do 
with sysctl net.ipv4.ip_forward=1



> > Also, make sure your subnet masks are correct. the 192.168.0.0 is usually
>
> a
>
> > /16, and if you don't set it to /24, your packets won't get routed
>
> properly.
>
> If I can ping/ssh, then packets are being routed properly, correct?

possibly.  sometimes you can get communications in one direction if it is 
mis-configured (esp if you have NAT on the gateway).

if you post the copy of the netstat -r for the following hosts, we can get a 
good look at what is actually happening:

192.168.1.3
192.168.1.2
192.168.0.2

and the output of

sysctl net.ipv4.ip_forward

on the internal gateway.

> > Make sure that each host knows where the router for the other network is
> > (192.168.0.1/192.168.1.3)
>
> This is the gateway, correct?

the internal gateway, yes

> > If you are using NAT, then it will go out over the wire to 192.168.0.1,
>
> and
>
> > then be mangled back to 192.168.0.2.  Yes, it'll work, but horribly
> > inefficient.
> >
> > If you switch off NAT, then you don't need to "lie" about the addresses.
>
> So what you're suggesting here will allow me to have the separate networks
> without NAT?

yes. both 192.168.0.0/24 and 192.168.1.0/24 will look as though it is one 
network.

if the internal gateway is not a computer, you could just set it up in bridged 
mode, and have everything on the same subnet (much easier)

> Thanks for the help!

No worries,


Lucas
-- 
AUCTION:
	A gyp off the old block.


More information about the mythtv-users mailing list