multi-controller network install question

Chris Torek torek at elf.ee.lbl.gov
Fri Jun 28 06:22:00 AEST 1991


(Warning: oversimplified explanations of routing appear below.)

In article <m21827.675646891 at mwunix.mitre.org> m21827 at mwunix.mitre.org
(Ken Stillson) writes:
># ie0 to local net as -gw:
>ifconfig ie0 128.29.22.7 netmask 128.29.22.255 broadcast 128.29.255.255

If nothing else, this is a completely bogus netmask.

In general, the internet `address match' function looks like this:

	if ((addr1 & netmask) == (addr2 & netmask))
		/* addr1 and addr2 are on the same network */

># ie1 to mitre net as srv:
>ifconfig ie1 128.29.22.1 netmask 255.255.0.0 broadcast 128.29.255.255

This is a much more reasonable network mask (a conventional Class B mask).
Unless you use subnetting, both interfaces should have the same (Class B)
network mask (128.29 is a Class B internet address).  If you do use
subnetting (and you certainly do), you should set ie0's netmask to, e.g.,
255.255.255.0.  This would mean that ie0 can take only things that match
128.29.22.*.  (More on this in a moment.)

Note that if ie0 and ie1 both have netmask 255.255.0.0, the search for
an interface on which to send a packet will go more or less like this:

	I want to send to 128.29.22.33, so first I will see if I have
	a route directly to 128.29.22.33 (probably not).  If not, I
	will find some arbitrary interface such that

	    (interface dst addr & interface netmask) ==
		(128.29.22.33 & interface netmask)

Unfortunately, there is no way to say *which* arbitrary interface will
be chosen (well, you can poke around in the routing code and see what
order it uses to search; SunOS probably has the old BSD hash table method).
In this case, both ie0 and ie1 can match that address, and there is no
way to know which will get it.

Now, if you had 8-bit subnets on both interfaces you would have the
following:

	ie0, netmask 255.255.255.0, dst addr 128.29.22.7
	ie1, netmask 255.255.255.0, dst addr 128.29.22.1

This does not help at all: again, 128.29.22.33, when masked against
either interface's netmask, matches that interface's dst-addr.

The normal setup, then, is for a subnetted network gateway/router% to have
two *different* subnets, not the *same* subnet, as its two different
interfaces.  For instance, you might make your server be 128.29.22.1
on the `local' Ethernet cable interface, and 128.29.250.70 on the
`wire that connects disjoint subnets' interface.  The (internal)
network number of the `connects disjoint subnets' network would then
be 128.29.250.*, and the internal network number of your own Ethernet
would be 128.29.22.*.  The `conencts disjoint subnets' network would
have a broadcast Internet address of 128.29.250.255.  The overall
topology of your network-of-networks would look something like this:

	128.29.250.* ===+=======================+============== . . .
			| 128.29.17.1		| 128.29.22.1
			|			|
		   128.29.17.*		   128.29.22.*

where the `===' line represents the `backbone network' (which carries
inter-net traffic only) and the | lines represent the subnets (which
carry only intra-net traffic).  The gateways between the backbone and
each subnet would be the only machines with more than one network
interface, and thus the only machines that need to understand
connecting between disjoint networks, i.e., `routing'.
-----
% `Gateway' and `router' are sometimes used interchangeably.  Different
  people put different `fine points' on them, but this is beyond the
  scope of this posting.
-----

In general, machines that make good hosts make lousy routers, and
vice versa.  The modern trend is to use one machine specifically as
a router (often from a company that makes `routers', such as Proteon
or Cisco) and others specifically as a host.  Part of the reason for
this is that routers need to be more sophisticated (need to understand
routing protocols); part is just silliness.

I have arbitrarily numbered all the routers `.1'---this is a handy
convention when trying to think about your network: pick some magic
number, like 1 or 128 or 250 or something, that represents each router,
and then when someone says `x.y.z.1' you instantly know that this is
one of those special machines, one that has the .1 interface on its
subnet and some other interface on the backbone net.

It is possible to decompose a network further (so that you have a
`backbone of backbones' each with their own networks).  A tree topology
is generally easiest to work with; arbitray meshes require considerably
higher power routing.

For *many* more details, see any of the various Network Architecture
and/or Internet textbooks (e.g., Doug Comer's).
-- 
In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 415 486 5427)
Berkeley, CA		Domain:	torek at ee.lbl.gov




More information about the Comp.sys.sun mailing list