EDOC017

EUROGAM PROJECT

NSF DATA ACQUISITION SYSTEM

Ethernet Communications

Edition 2.0 August 1990

NSF Software Systems Group UK Science and Engineering Research Council Daresbury Laboratory

Introduction

This document describes the basic protocols used within the NSF Data Acquisition System for communications over Ethernet.

There are two basic types of network protocol - connection orientated and connectionless.

Connection orientated - Networking started using telephone lines and other point to point links for long distance communications and the protocols reflected the connection nature of a telephone call. Familar protocols are X25 and TCP/IP.

Connectionless - Initially not favoured on wide area networks for practical reasons. Now very much preferred for local area use. Each frame of data contains all the information necessary for delivery without reference to any previous information. Protocols are LLC1 and UDP/IP. These are datagram protocols.

Connectionless protocols are very much simplier than connection orientated protocols and leave most error detection and recovery to the application levels. Since there are no fixed software connections in this mode of operation any number of requestors can communicate with a given service without the complications which can arise in a connection orientated environment.

Connectionless protocols are hence the most appropiate for communications between components of a data acquisition system such as that planned for Eurogam.

As support for this case it is noted that new applications protocols for use on local area networks tend to be connectionless - eg NFS.

Since it is expected that the UNIX operating system and UNIX workstations will be the primary computing base in the future it is appropiate to adopt at this time solutions based on the use of the Internet Protocol (IP) which is currently the network standard used by UNIX. This implies that applications within the Data Acquisition System will be based on use of the datagram protocol UDP/IP.

It is expected that eventually UNIX and Internet will adopt ISO protocols and at that time it will be necessary to change the protocols defined in this document to the corresponding ISO protocols.

Ethernet Header

The format of data in the Ethernet header is as follows.

destination address

source address

protocol id Destination address is a 6 byte field containing the destination station ethernet MAC address. Source address is a 6 byte field containing the source station ethernet MAC address. Procotol id identifies the communications protocol used in the following data - eg Internet (IP) is @0800.

It should be noted that the ethernet standard places a limit on the data portion of a data frame of 1500 bytes. For further information on the Ethernet standard see the ISO Standards document ISO 8802/3.

Internet Protocol (IP)

The Internet Protocol provides for transmitting blocks of data called datagrams from sources to destinations, where sources and destinations are identified by fixed length addresses. The Internet Protocol also provides for fragmentation and reassembly of long datagrams as required for transmission across networks which place a limitation on the size of an individual datagram. There are no facilities to augment end-to-end data reliability, flow control or sequencing which are left to be the responsibility of other software levels.

The Internet protocol contains a number of optional features which are of no interest within a data acquisition system and so this document describes only the neccessary subset required.

Internet Protocol header

version IHL  0  total length
ID  flags  offset
TTL  Protocol  checksum

source address destination address

VERSION: 4 bits - IP header version number - currently =4

IHL: 4 bits - Internet header length in unit of 32 bits. The subset uses the minimum header for which IHL = 5

TOTAL LENGTH: 16 bits - The length of the datagram , in bytes, including internet header and data.

ID: 16 bits - An identifying field assigned by the sender to aid in assembling the fragments of a datagram. Only needs to be unique for as long as the datagram exists.

IP allows for a datagram which is too big for the network to be fragmented, the fragments transmitted, and the result reassembled at the destination. FLAGS: 3 bits - value = 0 for the only or last fragment in a datagram : value = 1 if more fragments are to follow for this datagram.

OFFSET: 13 bits - this field indicates where in the datagram this fragment belongs. The fragment offset is measured in units of 8 bytes (64 bits). The first or only fragment of a datagram has offset zero.

TTL: 8 bits - Time to Live - indicates the maximum time in seconds the datagram may exist in the network. Only of use within a switched network. Should be set to a small number - say 2.

PROTOCOL: 8 bits - indicates the next level protocol used in the data portion of the Internet datagram. eg UDP = 17.

CHECKSUM: 16 bits - A checksum on the header only. This is the 16 bit one’s complement of the one’s complement sum of all 16 bit words in the header. For the purpose of computing the checksum the value of the checksum field itself is taken to be zero.

The checksum can be ignored by setting this field to zero, however this feature is not available on all hosts.

SOURCE ADDRESS: 32 bits - The source Internet address

DESTINATION ADDRESS: 32 bits - The destination Internet address

For further information on the IP standard see the Internet document RFC 791.

User Datagram Protocol (UDP)

This is Internet Protocol 17. The User Datagram Protocol assumes that the Internet Protocol (IP) is used as the underlying protocol. This protocol provides a means by which a number of applications programs can communicate with other programs by sending datagrams via a single Internet port.

User Datagram Protocol header

source port  destination port
length  checksum

SOURCE PORT: 16 bits - indicates the port of the sending process and may be assumed to be the port to which a reply should be addressed in the absence of any other information.

DESTINATION PORT: 16 bits - indicates the destination application to which this datagram should be sent.

LENGTH: 16 bits - is the length, in bytes, of this user datagram including this header and the data.

CHECKSUM: 16 bits - may be transmitted as all zeros indicating that the transmitter generated no checksum.

For further information on the UDP standard see the Internet document RFC 768.

It should be noted that since UDP uses IP the maximum length of a UDP datagram is 64 Kbytes (minus 28 bytes of a minimum length IP header + UDP header). However the Sun implementation of UDP/IP allows only slightly more than 8 Kbytes (just enough for NFS to perform 8 Kbyte data reads and writes!). This restriction will have to be adopted by uses of UDP/IP within the Data Acquisition System.

Other Protocols

The Internet defines may other protocols most of which will not be of interest within the Data Acquistion System. Some such as NFS for file access and Telnet for terminal access will be used by the support environment but will not be a used within the Data Acquisition System environment.

The Address Resolution Protocol (ARP) which provides a means by which given a hosts Internet address one can broadcast to determine its ethernet address is widely used and will have to be supported within the Data Acquisition System. Full details of the ARP can be found in the Internet document RFC 826.