
Artisoft Technical Bulletin
Dated: 10.05.93 RRR
IPX Bridging & Routing with LANtastic 5.0                  Page 1 of 5



The following is a brief description of IPX Routing and how it
functions through bridges and routers.

THE STRUCTURE OF THE MAC FRAME

IEEE 802.3 Ethernet (Media Access Control - MAC) Frame

 Ŀ
 PreambleDest  SourceLn (IPX Header)   DATA           CRC 
 
   8bytes  6bytes 6bytes  2bytes     46-1500 bytes       4bytes


IEEE 802.3 Ethernet (MAC) Frame

     Ŀ     Preamble 8 bytes
          Destination Address 6 bytes
     Ĵ         Source Address 6 bytes
              Length 2 bytes
     
     Encapsulated Data 46-1500 bytes
     Ŀ
     CRC 4 bytes
 
IPX Header - Encapsulated in Data Section of IEEE802.3 Frame

    Ŀ
                                  
    
     Checksum                 Source Address
        Length                       Source Network
           Transport control              Source Socket
              Packet Type
                 Destination Address
                   Destination Network
                      Destination Socket

IPX Header - Encapsulated in Data section of IEEE802.3 Frame

     Ŀ             Checksum                    - 2 bytes
     Ĵ             Length                      - 2 bytes
                  Transport Control           - 1 byte
     Ĵ               Packet Type                 - 1 byte
     Ŀ     Destination Node Address    - 6 bytes
          Destination Network Address - 4 bytes
              Destination Socket          - 2 bytes
     Ŀ     Source Node Address         - 6 bytes
          Source Network Address      - 4 bytes
              Source Socket               - 2 bytes
     
     Encapsulated Data 16-1470 bytes

What happens when a workstation logs into the network

When a workstation logs onto a server it establishes a NetBIOS
session.  To establish a session a workstation sends out a multicast
datagram with a call command.  The packet sent out contains the
ethernet address of the calling adapter card and a multicast address
of the destination computer in the MAC frame.  The multicast address
is FF FF FF FF FF FF.

(BUZZWORD ALERT - Multicast vs Broadcast.  A multicast address is
defined as an address where the most significant of the high order
byte is set to 1; i.e., 01 00 23 1D 5F 3C would be a multicast address
because of the 01.

A broadcast address is all FF's and so meets the above criteria.

All adapters receive broadcast addresses, a multicast address must be
enabled on the adapter card in order for it to receive on that
address.  A multicast address is derived from the NetBIOS name of the
computer.  LANtastic normally uses multicast addressed rather than
broadcast addresses to reduce load on the system. With IPX routing
broadcast packets are sent as shown below:

Workstation during Login
Source Node Address=00006E123456
Destination Node Address=FF FF FF FF FF FF

When the packet arrives at the server with the NetBIOS name specified
in the NetBIOS call packet, the server responds with a answering
packet.  This packet's header contains the servers ethernet address as
the source address and the workstations ethernet address as the
destination address.

Server's answer to Workstations Login
Source Address=0000006E654321
Destination Address=00006E123456

The destination and source then each send out acknowledge packets so
each side is sure that a session has been established.  Graphically it
would appear something like.

Fred - WS                                    Joe - Server
Establish Name                               Establish name
Call                     ------------>
                         <------------       Answer call       
                         <------------       Session Established
Session Established      ------------>
                         <------------       Established Session
Established session      ------------>

Once a session has been established each MAC frame header will contain
both a source and a destination address.

BRIDGING

When a workstation is connected to a server via one or more bridges
the process is the same.  The workstation sends out a multicast
packet, each bridge in line passes the packet on down the line.  When
a server with the NetBIOS name specified in the workstation's call
receives the packet it sends out a reply.  The source and destination
address are the same as in the local login example.

The main difference between a bridge and a repeater is the ability of
a bridge to filter the packets based on the source and destination
addresses only allowing certain packets through the bridge.  This
allows the bridge to minimize traffic on each section.

A bridge is transparent to the network, the network does not know it
is there.  This places a great strain on the bridge as it must receive
and act on every packet transmitted on both sides of the bridge.  This
necessarily limits the intelligence of a bridge, since it must receive
and act on every packet. 

A bridge acts on the MAC or transport protocol layer the "FRAME", it
does not need to know about the underlying network protocol.

ROUTING

When a workstation is connected to a server via one or more routers
the process is very different. Since the router does NOT act on the
data in the ethernet frame the network protocol must contain
addressing information.  NetBIOS normally does not contain this
information and so is considered inherently unroutable.  

To get around this Artisoft has added a 30 byte IPX header to the
front of the data field of each packet.  Since IPX and NetBIOS use the
same ethernet IEEE802.3 frame a router will view the packet as an IPX
packet and route accordingly.

1.   The workstation sends our a broadcast datagram just is it does on
     a local network.  The source address is the ethernet address of
     the adapter card in the workstation and the destination address
     is all FF's in the MAC frame.  Inside the data of the packet is
     an IPX header.  In this header the workstation inserts the
     following information.  

IPX Header - Encapsulated in Data section of IEEE802.3 Frame

     Ŀ
     Ĵ             Checksum                      FF
                  Length                        53
     Ĵ               Transport Control             00
     Ŀ     Packet Type                   0x14
          Destination Node Address      000000000000
              Destination Network Address   0000
     Ŀ     Destination Socket            0x573  
          Source Node Address           00006E123456
              Source Network Address        0000
                  Source Socket                 0x573

2.   When this broadcast datagram hits the router it strips the
     IEEE802.3 frame from the packet, increments the Transport Control
     field by 1, inserts it's local network number into the source
     network address (if it is 000000000000) and forwards the packet
     to another router or the other side of a local router.  The
     changed part of the packet would look like:

     IPX header changes:
     Transport Control             1
     Source Network Address:       0002

3.   When the router receives the packet it builds a packet frame
     around it, and INSERTS the ROUTERS ethernet address as the MAC
     source address and leaves the the MAC destination node address as
     FF's (broadcast datagram).  The Transport control field in the
     IPX header is again incremented.

     MAC Frame Changes:
     Ethernet Address: 00006E46A7F4 [Router's ethernet address]

     IPX header changes: 
     Transport Control             2

4.   Steps 2-3 are repeated until the packet arrives at the
     destination server or the hop count in the Transport Control
     field exceeds 8 (the packet is discard at this time).

5.   When the server named receives the packet a reply packet is sent. 
     The Mac layer of the reply packet contains the ethernet address
     of the server as the source address and the ethernet address of
     the LAST router as the destination address.  In the IPX header,
     the transport control is set back to 0, the source node address
     is set the the ethernet address of the server, the destination
     node address is set to the address of the original workstation,
     the destination network address is set to the network address
     added in step 2 above and the packet is transmitted.

     MAC Frame Changes:
     Source Address: 00006E20A35B [Server's ethernet address]
     Destination Address: 00006E46A7F6 [last routers ethernet address]

     IPX header changes:
     Transport Control             0
     Source Node Address      00006E20A35B
     Destination Node Address 00006E123456
     Destination Network Address   0001

6.   When the packet arrives at the router that is ADDRESSED (note the
     system is no longer broadcasting), the IEEE MAC frame is
     stripped, the SOURCE address is added to the IPX header if the
     source is 0's and the packet is forwarded via the stored route to
     the network specified in the ipx header.

7.   When the router at the remote site receives the packet it builds
     a MAC frame and transmits the packet to the destination node.