Using SIXNET Universal Protocol over Ethernet TCP/IP Last Rev: 10/13/98 SIXNET Ethernet I/O stations provide a minimal TCP/IP protocol suite implementation to allow a standard TCP/IP protocol stack to communicate with it. All SIXNET Ethernet I/O and controllers share this common basic implementation and you may expect that drivers developed to support SIXNET Ethernet networking will work with all applicable products without exception. SIXNET Ethernet I/O and controllers support the ARP, IP, ICMP and UDP protocols. UDP is used to communicate with the station. ARP, IP, and ICMP are used to support features of the TCP/IP facilities of the host operating system, so that it can determine the Ethernet address of the SIXNET station given the IP address, send UDP messages, the ping utility can see the station and so on. They are normally invisible to the program using UDP to communicate to SIXNET. The required minimum IP packet size of 576 bytes is supported. UDP port number 1594 is the Registered Port for SIXNET Universal Protocol communications. This is the default port for SIXNET Ethernet stations. In the future it may be made configurable, but SIXNET software does not presently allow this to be set by the user. A SIXNET Ethernet station accepts messages from any UDP port and IP address that are sent to UDP port 1594 and its IP address. The reply is sent from UDP port 1594 and its IP address to the originator's UDP port and IP address. Standard SIXNET Universal Protocol messages are used to communicate with SIXTNET stations. Since the IP addresses uniquely identify the source and destination, the SIXNET Universal Protocol source and destination numbers could each be set to `FF'hex, (a special one byte address meaning `any station'), even with a multi-station and multi-master configuration. If a specific destination number is used (other than `FF'hex) in the message it must match the station's number or no reply is generated. SIXNET Universal Protocol Binary Format and Fixed CRC messages are supported. Hex format is not supported since 8-bit data is always supported on Ethernet, and Hex conversion wastes a lot of processing time to encode and decode at both ends of the communication. This wasted time becomes a significant burden on the response time, given the high speed of Ethernet communications. The Fixed CRC format saves even more processing time at each end. It is safe to use when the path is known to include error checking at least as good as the 16-bit CRC used with Binary Format. For example, if a computer is hooked to the same Ethernet network as the SIXNET station, the 32 bit CRC computed on the Ethernet packet provides a sufficient error check and wastes no processing time since it is computed and checked by the Ethernet hardware. One or more complete SIXNET Universal Protocol messages are sent as a single UDP message. The data portion of the UDP message (the SIXNET Universal Protocol messages) must be no more than 508 bytes. This makes sure that the IP packet is not more than 576 bytes (60 for maximum IP header + 8 for UDP header + 508 data). If more than one message is sent in a single UDP packet the sum of the length bytes + 6 bytes/message must not be greater than 508. To be sure that all replies will fit in a single UDP reply the replies must satisfy the same rule. Watch out for the GETS command, since the length byte of the reply is unknown in advance, and could be as large as 255! If the replies to the messages in a single UDP message exceed 508 bytes multiple UDP messages are generated. If multiple session numbers are referenced in a single UDP message the replies will not necessarily be grouped in a single UDP message, even if they would fit. UDP Reliability In some published documentation, UDP is sometimes described as 'unreliable', while TCP is 'reliable'. This is somewhat misleading, since in both cases the data travels as an IP packet in a similar manner with identical reliability. The IP packet receives the same delivery processing in either case, so it has the same chances of arriving at the destination independent of the higher level protocol being used. In the case of two nodes on an Ethernet network this is basically 100%. (Halfway around the world through the Internet, it may be somewhat less). The difference between TCP and UDP is who handles retries if a message is lost or duplicated. The TCP transport layers handle this for the client program, while UDP does not. The SIXNET Universal Protocol handles message acknowledgement, and when applicable, message sequencing. It is better suited to the specific task of moving I/O data than the more general TCP facilities. SIXNET Universal Protocol deals with a lost message retry or an extra reply more efficiently than the TCP stack, minimizing the delays in I/O updating caused by a lost message and allowing better control of retry timeouts by the program. SIXNET communications are field proven over inherently unreliable media such as radio links and telephone lines. In the case of direct connections via a single Ethernet LAN, there is high reliability, and these issues shouldn't be significant to the performance of your system.