THE TCP/IP STACK PROVIDED WITH 5PM TERM 3.x FOR WINDOWS
PART III
-----------------------------------------------------------


		-------------------------------------
		Introduction to Ethernet and TCP/IP
                --------------------------------------   
                   
Thick Ethernet       Ethernet is a packet-oriented network
                     protocol developed by the XEROX
                     company in the 70's. The original
                     Ethernet standard used 1/2" coaxial
                     cable with a maximum line length of
                     500 m per network segment (i.e.
                     between two amplifiers or ). The
                     maximum data transmission rate is 10
                     Mbps (million bits per second). All
                     computers connected to an Ethernet
                     cable segment are treated identically
                     (there is no "master") - they are all
                     allowed to send data packets to the
                     network whenever they need to, and
                     they are all able to read all data
                     passing through the network.

If two computers try and send data simultaneously, the in
 terface chips on the Ethernet cards are designed to
 recognize collisions between the data packets, and to
 take appropriate steps to resolve the situation.
The packets are sent again automatically after a short
 delay, but the time delay is always slightly different
 each time (it is calculated according to a random
 principle to avoid a new collision between the same two
 computers again).
Since Ethernet cards in the same network segment all
 receive all data packets in that segment, each interface
 is identified by a hard-wired unique 48-bit Ethernet
 address. Each packet (message) contains in addition to
 the data and other information the hardware address of
 the intended receiver interface. In this way, each
 receiver only processes those packets containing its
 own, unique address. However, this means, too, that,
 strictly speaking, the Ethernet address is not unique to
 a particular computer, but rather to the Ethernet card
 instead; if it is moved to another computer, it carries
 the Ethernet address with it.
In addition to the address of the intended receiver and
 the data itself, each packet () also contains the
 hardware address of the sender, information on the
 packet type and a checksum. This allows the network to
 guarantee nearly error-free data transmission by
 recognizing errors and by automatically repeating
 packets. Temporary disturbances thus only slow down the
 network, without causing it to fail completely, although
 a hardware fault can cause an entire segment to fail.
     Connecting to As described above, standard (thick)
    thick Ethernet   Ethernet uses expensive, high-grade,
                     1/2" coaxial cable. Connecting to
                     "Thick Ethernet" requires you to use a
                     Thick Ethernet transceiver:Thick,
                     which is connected to the DB15 (or )
                     socket on the network card with a 15-
                     pole "". There are various methods
                     used to attach the transceiver to the
                     network cable, depending on the type.
                     The typical max. length for a thick
                     Ethernet cable segment is 500 m.
Connecting to thin   Thin Ethernet (also called thin-wire
          Ethernet   Ethernet) is a lower-cost but slightly
                     less capable alternative to thick
                     Ethernet. It uses the same data
                     transfer protocol, but is based on
                     economical 3/8" coaxial cable instead.
                     The typical max. length for a thin
                     Ethernet cable segment is 185 m.


Connecting to "Thin Ethernet" takes place with a , and
 does not normally require an external transceiver. If
 you want to connect the "T"-piece to the end of the
 network cable rather than in the middle, the unused arm
 of the T-piece must be terminated with a 50-=
 terminating plug. Failure to do this can cause network
 errors.


     Connecting to  Ethernet uses a connector like a US
 10Base-T Ethernet   telephone jack, and does not normally
                     require an external transceiver, but
                     it uses "hubs", or amplifiers. The
                     typical max. length for a 10Base-T
                     Ethernet cable segment is 100m.

     Other network    The TCP/IP Stack is also compatible
       connections   to other network types such as Token-
                     Ring or FDDI, provided that a suitable
                     ODI driver is available for the PC.
                     Please refer to the hardware
                     manufacturer's recommendations regarding
                     connectors etc.
           Cabling    When installing the network,
                     cabling cable, it is important to make
                     sure that the cable is not installed
                     with sharp bends or under tension. It
                     should be so installed that it cannot be
                     damaged, and should be routed as far
                     away as possible from powerful
                     electrical fields. Please observe the
                     exact specifications of the hardware
                     manufacturer. Refer to the
                     manufacturer's documentation for
                     information on admissible cable lengths,
                     types of connector to be used and other
                     points to be noted.
  Network topology The various routers, bridges and devices
                     in the network are called nodes, and
                     the way that they are connected
                     together is called the topology of the
                     network. On the one hand, the topology
                     is dependent on usage requirements
                     (the required position of the
                     workstations within an office
                     building). On the other hand, it is
                     also necessary to take account of
                     physical limitations imposed by the
                     chosen hardware (e.g. maximum cable
                     lengths) and by network standards.
 
Ethernet uses a so-called linear bus topology. This means
 that all workstations and printers etc. connected to the
 network are attached to a single cable which runs
 through all rooms of the building. The cable has a
 beginning and an end, and must not be arranged as a "T"
 or a ring. In contrast, Token-Ring, for example, is a so
 called distributed star system, with active hubs
 ("amplifiers") at the centre of each star. The "ring" is
 only virtual - the "token" packet is passed in a pre-
 defined sequence from one workstation to the next.

                      To summarise, the term Ethernet
                     specifies both the network hardware
                     (cable, connections, topology) and the
                     data transmission protocol. The latter
                     is specifically designed for this type
                     of network topology. Furthermore, due to
                     the inclusion of packet type information
                     in the Ethernet "frame", the Ethernet
                     protocol is capable of simultaneously
                     supporting many higher-level protocols
                     such as TCP/IP, AppleTalk, DECnet  etc.
                     This allows Ethernet to be used as the
                     basis for a wide range of data
                     connections.
Internet Protocol     In contrast to Ethernet, which is a
                     hardware-oriented protocol, the internet
                     protocol (IP) is fully independent of
                     the hardware used to connect the compu
                     ters. The physical connection can be
                     made by a variety of methods such as
                     Ethernet or Token-Ring, but IP has the
                     advantage of offering a programming
                     interface which is independent of the
                     hardware.
                      Ideally speaking, the internet
                     protocol should use the same (or
                     smaller) packet sizes as that used by
                     the underlying physical protocol, so
                     that each IP packet can be completely
                     contained within a single packet of the
                     hardware protocol. If the data packets
                     of the internet protocol are larger than
                     those of the physical protocol, the IP
                     packet needs to be split between several
                     transport packets. This "" is not
                     supported by PCShare network
                     connections.
   IP address        Just as with Ethernet, with the
                     internet protocol each of the users
                     (computers) in the network are
                     characterised by an "IP address", which
                     is unique within the network. An IP
                     address consists of 32 bits, sometimes
                     referred to as 4 octets (groups of 8
                     bits). This number of bits allows well
                     over 2 billion unique numbers to be used
                     to identify a node on a network. Just
                     having a unique identifier is not much
                     help in locating a node, however. The
                     problem would be similar to locating
                     someone if all you knew was a social
                     security or passport number.

If the internet protocol is only used within a local net
 work, the internet address:choice of ... of each
 computer must be unique within your network but can
 otherwise be chosen freely within the rules of the class
 system. However, if the network is to be connected to
 the world-wide Internet system, it is necessary to apply
 to the appropriate for a world-wide unique network
 number. The Network Information Center (NIC) is the
 world-wide steward of IP addresses. The NIC:(Network
 Information Center) will assign a main network address
 of suitable IP class to allow a participant enough
 unique addresses to identify each of the nodes on that
 participant's local net.
If you only communicate within your own organization, you
 should appoint someone to serve as your own in-house
 company-wide NIC.
When specifying an IP address, it is common to use a
 dotted decimal representation. In dotted decimal, each
 octet is represented by a decimal number and separated
 by a period. An address such as 192.003.000.012 is
 easier to remember than 110000000000001100000000
 00001100.


Internet addresses    There are three classes of Internet
- Class A, B, and    addresses. Class A addresses are
C                    assigned to large companies or to
                     universities that have networks with a
                     large number of nodes. A Class A address
                     uses 24 of the 32 available address bits
                     to identify individual nodes, allowing
                     over sixteen million nodes. Using 24
                     bits for node identification leaves only
                     8 bits for identifying the main network,
                     one of which is used to identify the
                     class of address. This means that there
                     can only be 127 Class A addresses
                     worldwide. Class A addresses are only
                     allocated to extremely large
                     organizations.
Class A address:
  If the first bit of an IP address is "0", then this is
 a Class A address, and the structure is one octet for
 the network address and three octets for the host
 address:
                       Onnnnnnn aaaaaaaa aaaaaaaa
                   aaaaaaaa
                       1-126    aaa     aaa     aaa
                   
for example:
                       01111101 00000011 00000000
                   00001100
                       125     003     000     012
                   
In Class A addresses, network 0 is reserved for the
 "default route" and network 127 is reserved for the
 "loopback address".
Class B address:
 If the first two bits of an IP address are "10", then
 this is a Class B address, and the structure is two
 octets for the network address and two octets for the
 host address. This allows over 65,000 nodes on each of
 16,000 networks:
                       10nnnnnn nnnnnnnn aaaaaaaa
                   aaaaaaaa
                       128-191  nnn     aaa     aaa
                   
for example:
                       1O11101O 00000000 00001111
                   000011OO
                       188     000     015     012
                   
Class C address:
 If the first three bits of an IP address are "110", then
 this is a Class C address, and the structure is three
 octets for the network address and one octet for the
 host address.
This is the most common class of Internet address, and it
 can be used for over 4 million for small and medium size
 companies that need fewer than 255 nodes on their
 network:
                       110nnnnn nnnnnnnn nnnnnnnn
                   aaaaaaaa
                       192-223  nnn     nnn     aaa
                   
for example:
                       11000010 00000000 00000000
                   00001100
                       194     000     000     012
                   
Class D address:
 Network  addresses greater than 223 (i.e. the first
 three bits are "111") are reserved for multicasts. They
 are sometimes called Class D addresses.
For all address classes, some host addresses are reserved
 for special uses. If all host bits are "0", then this
 refers to the network itself. For example, 188.66.0.0
 refers to network 188.66. Addresses like this are used
 in routing table listings. If all host bits are "1",
 then this is a broadcast address, which simultaneously
 addresses all hosts on the network. For example, a
 packet addressed to 188.66.255.255 is delevered to every
 host on network 188.66.
 
       Subnet mask    If required, the internet protocol
                     offers the possibility of addressing
                     several physical networks within the
                     same logical network. This is done by
                     using part of the node address to select
                     the physical "subnet", and the rest to
                     select the computer itself within the
                     subnet. The part of the internet address
                     used for subnet addressing is filtered
                     out from the rest of the address with
                     the help of a so-called "". If the
                     logical network is not subdivided into
                     several physical networks, the subnet
                     mask solely filters out the logical net
                     work address. For example, with Class C
                     addresses, the subnet mask is
                     "255.255.255.0".
There are good reasons for having multiple networks at a
 single geographical site. Trying to connect all of your
 nodes to a single Ethernet segment can overload the net
 and degrade response time, whereas breaking up your
 network into subnets can limit the amount of traffic on
 a single subnet to acceptable levels. Security can also
 be an issue, requiring that networks are split up into
 separate sections to limit the access.
The subnet mask supplies an easy way to compare IP
 addresses to see whether or not they can be delivered
 directly, or must be routed to another network. A
 comparison is made between the IP address of the
 destination and the sending station's own IP address.
 This is accomplished, in part, by use of the subnet
 mask.
Take the address below as an example: 192.82.110.192
 translates to
                       11000000 01010010 01101110
                   11000000
                       bit 31                    bit
                   0
                   
Since bits 30 and 31 are l's, then this is a Class C
 Internet address. If all eight bits of the first octet
 (bits 0 through 7, above) are used for node addressing,
 this allows you to have 255 unique nodes on the local
 network. Alternatively, it is also possible to use the
 eight bits to address two local networks, each with 127
 nodes. In this case, it is necessary to determine if the
 destination is on our own network or on the other one.
 To determine whether a host is on our net, it is only
 necessary to mathematically "and" the destination IP
 address with the subnet mask, and compare it with our
 own address.
By convention, each Class C address allows 22 bits for the
 network address, and 8 bits for the node (i.e. host) id.
 In order to distinguish one local net from the other, we
 can use bit 7 to tell us which net we're on. In this
 example, bit 7 is either "0" for "net 1" or "1" for "net
 2".
The following subnet mask:
                       11111111 11111111 11111111
                   11000000
                       bit 31                    bit
                   0
                   
means that only the first 6 bits (bits 0 through 5, above)
 are used for the node id, and bits 6 and 7 are used for
 the network address. If we wish to send a datagram to
 host l92.82.110.126 from 192.82.110.192, is it on our
 network?
"and" each address to the subnet mask:
                   11000000 01010010 01101110 11000000
                   192.82.110.192
                   11111111 11111111 11111111 11000000
                   11000000 01010010 01101110 11000000
                               +
                   
                   11000000 01010010 01101110 01111110
                   192.82.110.126
                   11111111 11111111 11111111 11000000
                   11000000 01010010 01101110 01000000
                               +
                   
The results differ in bit 7, which our subnet mask
 indicates is part of the network address. This quickly
 shows that the destination address is not on our
 network, and we must send the packet to a router for
 transmission to another one.
   Router            A "" is a computer or device which
                     is connected to two or more independent
                     networks, and is able to transfer data
                     bi-directionally between them. The
                     internet protocol supports the use of
                     routers in the following way: If the
                     network address of the target computer
                     is not the same as the address of the
                     current network, the target system is
                     obviously connected to another network.
                     Furthermore if the address of a router
                     is known, the target system must lie on
                     the far side of it. If several routers
                     exist in several other networks, "" of
                     the data may be complicated but the
                     principle remains the same.
UDP/IP                The internet protocol (IP), which
 TCP/IP              was briefly described above, is only
                     able to exchange data packets between
                     computers. The "User Datagram Protocol"
                     and "Transmission Control Protocol"
                     extend this ability to allow processes
                     to be addressed on the target computer
                     and to improve the reliability of the
                     inter-process communication.
                      To summarise, the internet
                     specification describes a hardware-
                     independent data protocol. It lies above
                     the hardware protocol (such as Ethernet)
                     used by the particular physical network.
                     Drivers for TCP/IP are usually available
                     for most versions of Unix. TCP/IP has
                     been implemented by all major software
                     and hardware providers and has become
                     the only protocol suite that can claim
                     to be an industry-wide standard.



