From: mea@sparta.com (Mike Anderson)
Newsgroups: comp.os.vxworks
Subject: re: Ethernets and backplane networks
Date: Mon, 16 Nov 92 11:32:27 EST
Organization: Lawrence Berkeley Laboratory, Berkeley CA
NNTP-Posting-Host: 128.3.112.16
Originator: daemon@vxw.ee.lbl.gov

Greetings!

Bill Frewing writes:
> 
... deleted for brevity ...
> 
> My questions are:
> Can we physically split a single internet network, ie. have a network number
> dedicated to the 'private' mv147 networks for all systems configured like
> this, and use different node numbers on each system, all connected to the
> same ethernet at the same time ?  (To make this clearer an example:
> On the factory ethernet connect two Suns: 192.23.1.100 and 192.23.1.101.
> Each Sun has two ethernet ports, the thinwire ports are 192.23.9.1 and
> 192.23.9.11. The associated mv147s are 192.23.9.2 and 192.23.9.12.)
> 
> The other option seems to be subnetting. Does anyone have experience with
> this on VxWorks ?
> 
> Is there any other way of getting over the problem of using up internet
> network numbers ?
> 

  Your best bet to conserve internet numbers (prior to the release of version
5.1 with proxyarp support) is to use subnets.  With subnets you can set
the netmasks on a class C network (for instance) to use the two high-order
bits of the 4th octet like so:

using an example Class C address of 192.9.200.X with a netmask of ffffffc0

7 6 5 4 3 2 1 0
0 0 X X X X X X     host addresses 192.9.200.1   - 192.9.200.63
0 1 X X X X X X     host addresses 192.9.200.64  - 192.9.200.127
1 0 X X X X X X     host addresses 192.9.200.128 - 192.9.200.191
1 1 X X X X X X     host addresses 192.9.200.192 - 192.9.200.254

As usual, the addresses 192.9.200.0 and 192.9.200.255 are reserved as 
broadcast addresses for BSD and Internet standards respectively.

  Therefore, your class C net is dealt with internally as 4 class C nets
such that the dual Ethernet sun can be the 00 net on one interface and 
the 01 net on the second interface.  Assuming the 147 is on the 01 net,
it would have an address on that net and be the gateway to the backplane
net which might be the 10 net.  This would leave room for yet another
network (the 11 net) which could be another VxWorks system or something
completely different.  Also, from the outside world (i.e., the Internet),
your entire site looks like one big class C and your internal gateways
will have the responsibility for routing packets to the appropriate
gateway.  Here's a picture to help clarify:

                    Internet G/W             Main Ethernet  (00 sub-network)
Internet ----------[192.9.200.1]----------------------------------------------
(sees only                                    |
 net 192.9.200.0)                             |
                                       ---------------
                        Sun w/ 2 Enets [ 192.9.200.2 ]  on 00 sub-network
                                       [ 192.9.200.64]  on 01 sub-network
                                       ---------------
                                              |
                                              |  VxWorks Enet (01 sub-network)
         ---------------------------------------------------------------------
                |
                |  VxWorks VME Chassis
         -----------------------
         | CPU 0 192.9.200.65  | on 01 sub-network
         |       192.9.200.128 | on 10 sub-network 
         -----------------------
         | CPU 1 192.9.200.129 | on 10 sub-network
         |                     |
         -----------------------

  Handling the routing is the tricky part ;-).  Each of the Suns will have
to have entries in the /etc/netmasks file (or set the netmask in rc.local
by hand) set to 255.255.255.192 (0xFFFFFFC0).  Routes can be set statically via 
"route add net <destination net> <gateway> <metric>" or via the /etc/gateways
file if you're running in.routed.

On the Internet gateway, the routes would be:
route add net 192.9.200.64 192.9.200.2 1     (handles the 01 sub-net)
route add net 192.9.200.128 192.9.200.2 1    (handles the 10 sub-net)

On the Sun w/ 2 Enets, the routes would be:
route add net 192.9.200.128 192.9.200.65 1   (handles the 10 sub-net)
(because this sun has 2 Enet interfaces the
 the 00 and 01 networks are already 
 configured at boot time)

On VxWorks CPU 0, the boot params are:
inet on the enet : 192.9.200.65:ffffffc0
inet on backplane: 192.9.200.128:ffffffc0
host inet        : 192.9.200.64
(I think you will have to add a route after booting to 
 support getting to the 00 net via the Sun w/
 2 Enets.  Maybe Hwa Jin can clarify.)

On VxWorks CPU 1, the boot params are:
inet on the backplane: 192.9.200.129:ffffffc0
host inet            : 192.9.200.64
gateway              : 192.9.200.128

I hope I haven't missed anything :-).  If I have, please post corrections
because I'd like to get this message set up as a standard response to these
sort of questions.  BTW, you will still have to configure the 11 subnet if
you plan on using it for something.

Clearly, if we take bit 5 (the three high-order bits) as well for the net
mask we can now support up to 8 separate subnets.

Having said all of this, it all changes if we run proxyarp under 5.1.  But,
that's another discussion entirely.



==============================================================================
    AAAA  D D    D D    EEEEE   M   M  TM  // AAAA RRRR  TTTTTT SSSSS EEEEE TM
   A   A  D   D  D   D  E      M M M M    // A   A R   R   TT   S     E
  AAAAAA  D   D  D   D  EEEEE  M  M  M   // AAAAAA RRRR    TT    SSS  EEEEE
 A     A  D   D  D   D  E      M     M  // A     A R  R    TT       S E
A      A  D D    D D    EEEEE  M     M // A      A R   R   TT   SSSSS EEEEE

Process Distribution/Control and Communications for Distributed Systems

Mike Anderson                       Voice: (703) 448-0210 ext. 235
Director, ADDEM(TM) Project Office  FAX:   (703) 734-3323
SPARTA, Inc.                        EMAIL: mea@sparta.com
Suite 900                     
7926 Jones Branch Drive        "It is useless for sheep to pass resolutions 
McLean, VA  22102               in favor of vegetarianism while wolves remain
                                of a different opinion."

                                   William R. Inge, D.D.
==============================================================================