[3991] in linux-net channel archive

home help back first fref pref prev next nref lref last post

Re: Subnetting, Arghh

daemon@ATHENA.MIT.EDU (Martin Mares)
Sat Aug 10 19:29:17 1996

From: Martin Mares <mj@k332.feld.cvut.cz>
To: linux-net@vger.rutgers.edu
Date: 	Fri, 9 Aug 1996 14:08:33 +0200 (MET DST)

Hi,

> I'm having this idea, that i just can't figure out. There must
> be some wizards out there who know all about this, i hope.
> 
> I have a class C network, and i want to keep 30 adresses to
> my own net and route the rest to different size subnets.
> 
> My vision looks something like this
> 
>           +--------------------+---------------+-----------+   +--->
> internet
>           |                    |               |           |   |
>    +------+------+       +-----+----+    +-----+-----+   +-+---+-+
>    |linux        |       |nameserver|    |www server |   |router |
>    |pppd / diald |       |mailserver|    |ftp server |   +-------+
>    +-+--------+--+       +----------+    +-----------+
>      |        |
>      |        |
>     ttyS0     +---- Net A ( 6 hosts)
>     ttyS1     |
>     ttySn     +---- Net B (14 hosts)
>               |
>               +---- Net C (14 hosts)
>               |
>               +---- Net C (14 hosts)
> 
> Given this layout, what would my addresses/netmasks look like ?

   One of possible solutions would be (assuming 192.168.42.0 is your C-network):

	Net		Address		Netmask
	-------------------------------------------------------------
	backbone	192.168.42.0	255.255.255.224
	B		192.168.42.32	255.255.255.240
	C		192.168.42.48	255.255.255.240
	D		192.168.42.64	255.255.255.240
	A		192.168.42.80	255.255.255.248
	-free-		192.168.42.88	255.255.255.248
	-free-		192.168.42.96	255.255.255.224
	-free-		192.168.42.128	255.255.255.128

   This has two disadvantages: (1) It uses a zero-address subnet, which might be
confusing for older TCP/IP implementations which don't know about CIDR, (2) the
routing table is more complicated than it must be -- it probably doesn't hurt if
you exchange the routing information between the backbone router and the Linux
box by some routing protocol (e.g., OSPF or RIPv2), but it's harder to maintain
if you don't -- the backbone router must have complete knowledge of all the nets
routed by Linux.

   You can avoid the second problem by grouping all the Linux-routed networks in
one subnet:

	backbone	192.168.42.0	255.255.255.224
	-free-		192.168.42.32	255.255.255.224
	other-nets	192.168.42.64	255.255.255.192
	-free-		192.168.42.128	255.255.255.128

   The other-nets subnet would be sub-subnetted in the following way:

	A		192.168.42.64	255.255.255.248
	-free-		192.168.42.72	255.255.255.248
	B		192.168.42.80	255.255.255.240
	C		192.168.42.96	255.255.255.240
	D		192.168.42.112	255.255.255.240

   The routing table on the backbone router would be configured to send
192.168.42.0/255.255.255.224 to the backbone and to gateway 192.168.42.64/
255.255.255.192 via the Linux router. Only the Linux router would have
additional knowledge of the sub-subnets. This is IMHO the best thing to do
when you don't want to run a routing protocol.

							Martin



home help back first fref pref prev next nref lref last post