Router

Darryl Ross dross at syc.net.au
Fri Jul 26 23:14:32 CST 2002


> Dear Friends,
> Even though this problem is not exactly related with
> Linux, I hope somebody will reply.

Networking issues are faily common with Linux (well, any *nix), just
because you have much more flexibility in configuring it.

> Can a LAN say 192.168.30.***   have a gate way 10.15.20.***

Technically yes, if your subnet mask was something like 0.0.0.0, as they
would then be in the same network. However, the trouble with that is there
would be no point in having a gateway as you're saying that every IP
address is on your local network.

The 192.168.30.xx block is part of the Class C address space so the
default subnet mask is 255.255.255.0 (or /24). The 10.15.20.xx block is
part of the Class A address space so the default subnet mask is 255.0.0.0
(or /8). Note that even though we have CDIR routing now, there are still
Class A, B and C address spaces, it's just that you would find it
extrememly difficult to get allocated an entire class these days.

> Will it work. I am confused because LAN and gate way or on different IP

You can't just look at 2 IP addresses and say whether or not it will work.
You need to take into account the subnet mask. Take for example the
172.16.0.0/12 network (the third, mostly unused, 'private' address space).
172.16.0.1/12 and 172.31.254.254/12 are in the same network although it
could be hard to guess that just looking at them. (Those two I just used
as the example happen to be the lowest possible address in the block and
the highest possible address in the block)

In the normal situation, where your network address is 192.168.30.0 and
the subnet mask is 255.255.255.0 (/24), no, it will not work. The
router/gateway would need to have an address somewhere betweek
192.168.30.1 and 192.168.30.254. Most people I know make the gateway the
highest address in the subnet (I guess so that it's standard and easy to
find), but it doesn't matter what it is, as long as it is in the same
subnet.

Hope that helps,
Darryl



-- 
LinuxSA WWW: http://www.linuxsa.org.au/  IRC: #linuxsa on irc.linux.org.au
To unsubscribe from the LinuxSA list:
  mail linuxsa-request at linuxsa.org.au with "unsubscribe" as the subject



More information about the linuxsa mailing list