6XGIZOIGR:)6/6GTJ+ZNKXTKZ4KZ]UXQOTM through the common upper and lower boundaries by passing physical information through service access points (SAPs). A SAP could be compared to a predefined ‘postbox’ where one layer would collect data from the previous layer. The relationship between layers, entities, functions and SAPs is shown in Figure 2.6. Figure 2.6 Relationship between layers, entities, functions and SAPs In the OSI model, the entity in the next higher layer is referred to as the N+1 entity and the entity in the next lower layer as N–1. The services available to the higher layers are the result of the services provided by all the lower layers. The functions and capabilities expected at each layer are specified in the model. However, the model does not prescribe how this functionality should be implemented. The focus in the model is on the ‘interconnection’ and on the information that can be passed over this connection. The OSI model does not concern itself with the internal operations of the systems involved. When the OSI model was being developed, a number of principles were used to determine exactly how many layers this communication model should encompass. These principles are: • A layer should be created where a different level of abstraction is required • Each layer should perform a well-defined function • The function of each layer should be chosen with thought given to defining internationally standardized protocols • The layer boundaries should be chosen to minimize the information flow across the boundaries • The number of layers should be large enough that distinct functions need not be thrown together in the same layer out of necessity and small enough that the architecture does not become unwieldy The use of these principles led to seven layers being defined, each of which has been given a name in accordance with its process purpose. The diagram below shows the seven layers of the OSI model. 4KZ]UXQOTML[TJGSKTZGRY Figure 2.7 The OSI reference model The service provided by any layer is expressed in the form of a service primitive with the data to be transferred as a parameter. (A service primitive is a fundamental service request made between protocols. For example, layer W may sit on top of layer X. If W wishes to invoke a service from X, it may issue a service primitive in the form of X.Connect.request to X. An example of a service primitive is shown in Figure 2.8. Service primitives are normally used to transfer data between processes within a node. Figure 2.8 Service primitive Typically, each layer in the transmitting site, with the exception of the lowest, adds header information, or protocol control information (PCI), to the data before passing it through the interface between adjacent layers. This interface defines which primitive operations and services the lower layer offers to the upper one. The headers are used to establish the peer-to-peer sessions across the sites and some layer implementations use the headers to invoke functions and services at the N+1 or N–1 adjacent layers. At the transmitter, the user invokes the system by passing data, primitive names and control information physically to the highest layer of the protocol stack. The system then passes the data physically down through the seven layers, adding headers (and possibly trailers), and invoking functions in accordance with the rules of the protocol. At each level, this combined data and header ‘packet’ is termed a protocol data unit or PDU. At the receiving site, the opposite occurs with the headers being stripped from the data as it is passed up through the layers. These header and control messages invoke services and a peer-to-peer logical interaction of entities across the sites. Generally, layers in the same 6XGIZOIGR:)6/6GTJ+ZNKXTKZ4KZ]UXQOTM site communicate with parameters passed through primitives, and peer layers across sites communicate with the use of the protocol control information, or header. At this stage, it should be quite clear that there is NO connection or direct communication between the peer layers of the network. Rather, all physical communication is across the physical layer, or the lowest layer of the stack. Communication is down through the protocol stack on the transmitting stack and up through the stack on the receiving stack. Figure 2.9 shows the full architecture of the OSI model, whilst Figure 2.10 shows the effects of the addition of PCI to the respective PDUs at each layer. As will be realized, the net effect of this extra information is to reduce the overall bandwidth of the communications channel, since some of the available bandwidth is used to pass control information. Figure 2.9 Full architecture of OSI model Figure 2.10 OSI message passing 4KZ]UXQOTML[TJGSKTZGRY 59/RG_KXYKX\OIKY Briefly, the services provided at each layer of the stack are: • Application Provision of network services TO the user’s application programs Note: the user’s actual application programs do NOT reside here • Presentation Maps the data representations into an external data format that will enable correct interpretation of the information on receipt. The mapping can also possibly include encryption and/or compression of data • Session Control of the communications between the users. This includes the grouping together of messages and the coordination of data transfer between grouped layers. It also affects checkpoints for (transparent) recovery of aborted sessions • Transport The management of the communications between the two end systems • Network Responsible for the control of the communications network. Functions include routing of data, network addressing, fragmentation of large packets, congestion and flow control. • Data link Responsible for sending a frame of data from one system to another. Attempts to ensure that errors in the received bit stream are not passed up into the rest of the protocol stack. Error correction and detection techniques are used here • Physical Defines the electrical and mechanical connections at the physical level, or the communication channel itself. Functional responsibilities include modulation, multiplexing and signal generation. A more specific discussion of each layer is now presented. 'VVROIGZOUTRG_KX The application layer is the topmost layer in the OSI reference model. This layer is responsible for giving applications access to the network. Examples of application-layer tasks include file transfer, electronic mail (e-mail) services, and network management. Application-layer services are much more varied than the services in lower layers, because the entire range of application and task possibilities is available here. The specific details depend on the framework or model being used. For example, there are several network management applications. Each of these provides services and functions specified in a different framework for network management. Programs can get access to the application-layer services through application service elements (ASEs). There are a variety of such application service elements; each designed for a class of tasks. To accomplish its tasks, the application layer passes program requests and data to the presentation layer, which is responsible for encoding the application layer’s data in the appropriate form. 6XGIZOIGR:)6/6GTJ+ZNKXTKZ4KZ]UXQOTM 6XKYKTZGZOUTRG_KX The presentation layer is responsible for presenting information in a manner suitable for the applications or users dealing with the information. Functions such as data conversion from EBCDIC to ASCII (or vice versa), use of special graphics or character sets, data compression or expansion, and data encryption or decryption are carried out at this layer. The presentation layer provides services for the application layer above it, and uses the session layer below it. In practice, the presentation layer rarely appears in pure form, and it is the least well defined of the OSI layers. Application- or session-layer programs will often encompass some or all of the presentation layer functions. 9KYYOUTRG_KX The session layer is responsible for synchronizing and sequencing the dialog and packets in a network connection. This layer is also responsible for making sure that the connection is maintained until the transmission is complete, and ensuring that appropriate security measures are taken during a ‘session’ (that is, a connection). The session layer is used by the presentation layer above it, and uses the transport layer below it. :XGTYVUXZRG_KX In the OSI reference model, the transport layer is responsible for providing data transfer at an agreed-upon level of quality, such as at specified transmission speeds and error rates. To ensure delivery, outgoing packets are assigned numbers in sequence. The numbers are included in the packets that are transmitted by lower layers. The transport layer at the receiving end checks the packet numbers to make sure all have been delivered and to put the packet contents into the proper sequence for the recipient. The transport layer provides services for the session layer above it, and uses the network layer below it to find a route between source and destination. The transport layer is crucial in many ways, because it sits between the upper layers (which are strongly application-dependent) and the lower ones (which are network-based). The layers below the transport layer are collectively known as the subnet layers. Depending on how well (or not) they perform their function, the transport layer has to interfere less (or more) in order to maintain a reliable connection. 9[HTKZYKX\OIKIRGYYKY Three types of subnet service are distinguished in the OSI model: • Type A: Very reliable, connection-oriented service • Type B: Unreliable, connection-oriented service • Type C: Unreliable, possibly connectionless service :XGTYVUXZRG_KXVXUZUIURY To provide the capabilities required for whichever service type applies, several classes of transport layer protocols have been defined in the OSI model: • TP0 (transfer protocol class 0) It is the simplest protocol. It assumes type A service; that is, a subnet that does most of the work for the transport layer. Because the subnet is reliable, TP0 requires neither error detection or error correction. Because the connection is connection-oriented, packets do not need to be numbered before transmission 4KZ]UXQOTML[TJGSKTZGRY • TP1 (transfer protocol class 1) It assumes a type B subnet; that is, one that may be unreliable. To deal with this, TP1 provides its own error detection, along with facilities for getting the sender to retransmit any erroneous packets • TP2 (transfer protocol class 2) It also assumes a type A subnet. However, TP2 can multiplex transmissions, so that multiple transport connections can be sustained over the single network connection • TP3 (transfer protocol class 3) It also assumes a type B subnet. TP3 can also multiplex transmissions, so that this protocol has the capabilities of TP1 and TP2 • TP4 (transfer protocol class 4) It is the most powerful protocol, in that it makes minimal assumptions about the capabilities or reliability of the subnet. TP4 is the only one of the OSI transport-layer protocols that supports connectionless service 4KZ]UXQRG_KX The network layer is the third lowest layer, or the uppermost subnet layer. It is responsible for the following tasks: • Determining addresses or translating from hardware to network addresses. These addresses may be on a local network or they may refer to networks located elsewhere on an internetwork. One of the functions of the network layer is, in fact, to provide capabilities needed to communicate on an internetwork • Finding a route between a source and a destination node or between two intermediate devices • Establishing and maintaining a logical connection between these two nodes, to establish either a connectionless or a connection-oriented communication. The data is processed and transmitted using the data link layer below the network layer. Responsibility for guaranteeing proper delivery of the packets lies with the transport layer, which uses network layer services • Fragmentation of large packets of data into frames which are small enough to be transmitted by the underlying data link layer (fragmentation). The corresponding network layer at the receiving node undertakes reassembly of the packet *GZGROTQRG_KX The data link layer is responsible for creating, transmitting, and receiving data packets. It provides services for the various protocols at the network layer, and uses the physical layer to transmit or receive material. The data link layer creates packets appropriate for the network architecture being used. Requests and data from the network layer are part of the data in these packets (or frames, as they are often called at this layer). These packets are passed down to the physical layer and from there, the data is transmitted to the physical layer on the destination machine. Network architectures (such as Ethernet, ARCnet, Token Ring, and FDDI) encompass the data link and physical layers, which is why these architectures support services at the data link level. These architectures also represent the most common protocols used at the data link level. 6XGIZOIGR:)6/6GTJ+ZNKXTKZ4KZ]UXQOTM The IEEE (802.x) networking working groups have refined the data link layer into two sub layers: • Logical-link control (LLC) sub layer at the top • Media-access control (MAC) sub layer at the bottom The LLC sub layer must provide an interface for the network layer protocols, and control the logical communication with its peer at the receiving side. The MAC sub layer must provide access to a particular physical encoding and transport scheme. 6N_YOIGRRG_KX The physical layer is the lowest layer in the OSI reference model. This layer gets data packets from the data link layer above it, and converts the contents of these packets into a series of electrical signals that represent 0 and 1 values in a digital transmission. These signals are sent across a transmission medium to the physical layer at the receiving end. At the destination, the physical layer converts the electrical signals into a series of bit values. These values are grouped into packets and passed up to the data link layer. :XGTYSOYYOUTVXUVKXZOKYJKLOTKJ The mechanical and electrical properties of the transmission medium are defined at this level. These include the following: • The type of cable and connectors used. Cable may be coaxial, twisted-pair, or fiber optic. The types of connectors depend on the type of cable • The pin assignments for the cable and connectors. Pin assignments depend on the type of cable and also on the network architecture being used • Format for the electrical signals. The encoding scheme used to signal 0 and 1 values in a digital transmission or particular values in an analog transmission depend on the network architecture being used. Most networks use digital signaling, and most use some form of Manchester encoding for the signal /TZKXUVKXGHOROZ_GTJOTZKXTKZ]UXQOTM Interoperability is the ability for users of a network to transfer information between different communications systems; irrespective of the way those systems are supported. One definition of interoperability is: ‘The capability of using similar devices from different manufacturers as effective replacements for each other without losing functionality or sacrificing the degree of integration with the host system. In other words, it is the capability of software and hardware systems on different devices to communicate together. This results in the user being able to choose the right devices for an application independent of the supplier, control system and the protocol.’ It describes how networks can communicate with each other, as well as how they can share data. Internetworking is a term that is used to describe the interconnection of differing networks so that they retain their own status as a network. What is important in these concepts is that internetworking devices be made available so that the exclusivity of each of the linked networks is retained, but that the ability to share information, and physical resources if necessary, becomes both seamless and transparent to the end user. The problems that can be observed through the inability to consider these important concepts can be seen in a typical plant wide situation. For example, consider a 4KZ]UXQOTML[TJGSKTZGRY manufacturing industry that wishes to connect a series of networks from the plant equipment through to the corporate management level. Equipment will have been purchased from a variety of vendors, most of who will not have previously considered the ability to interact with other vendors, let alone other levels of information system equipment. The difficulties have led to the introduction of a number of standardization schemes, which to a greater or lesser degree comply with the OSI reference model. In the United States, both Boeing Aircraft Company and General Motors – two large manufacturing organizations – have developed schemes to allow interoperability between equipment differing manufacturers. These standards are known as the Technical Office Protocol (TOP) and the Manufacturing Automation Protocol (MAP), and are designed as a subset of the OSI model. At the field sensor level, a standard that is being used is the international Fieldbus standard. These attempts at interoperability are shown in diagrammatic form below. The MAP/TOP approaches were never successful; but their design and implementation have been built into many of the protocol standards used today. Figure 2.11 It should be noted that at the plant level, the requirement for all seven layers of the OSI model is not appropriate if real time communications are to take place. Hence a simplified OSI model is often preferred for industrial applications where time critical communications is more important than full communications functionality provided by the full seven layer model. Such a protocol stack is acceptable since there will be no internetworking at this level. Two well-known stacks are the Mini-MAP and the Fieldbus standard, which is shown in Figure 2.12. Generally most industrial protocols are written around three layers: • The physical layer • The data link layer • The application layer When the reduced OSI model is implemented the following limitations exist: • The maximum size of the application messages is limited by the maximum size allowed on the channel (as there is no network layer to fragment large packets) • No routing of messages is possible between different networks (as there is no network layer) • Only half-duplex communications is possible (as there is no session layer) 6XGIZOIGR:)6/6GTJ+ZNKXTKZ4KZ]UXQOTM • Message formats must be the same for all nodes (as there is no presentation layer) MiniMAP and the Fieldbus protocol standards use the reduced OSI model with only three layers. Similarly other industrial protocols such as the Allen Bradley Data Highway Plus protocol, Modbus Plus and the HART smart instrumentation protocols have all standardized on the three layers only. One of the challenges with the use of the OSI model is the concept of interoperability and the need for definition of another layer above the application layer, called the ‘user’ layer. Figure 2.12 ‘Collapsed’ OSI stack However, it is the so-called user layer that actually specifies the type of data in information and how it is to be used. Specification of the user layer is essential to ensure complete performance of a fieldbus system. From the point of view of internetworking, TCP/IP operates as a set of programs that interacts at the transport and network layer levels without needing to know the details of the technologies used in the underlying layers. As a consequence this has developed as a de facto industrial internetworking standard. Many manufacturers of proprietary equip- ment are using TCP/IP to facilitate internetworking. 6XUZUIURYGTJVXUZUIURYZGTJGXJY A protocol has already been defined as the rules for exchanging data in a manner that is understandable to both the transmitter and the receiver. There must be a formal and agreed set of rules if the communication is to be successful. The rules generally relate to such responsibilities as error detection and correction methods, flow control methods, and voltage and current standards. However, there are other properties such as the size of the data packet that are important in the protocols that are used in LANs. Another important responsibility is the method of routing the packet, once it has been assembled. In a self contained local area network i.e. intranet work, this is not a problem, since all packets will eventually reach their destination by virtue of design. However, if the packet is to be switched across networks i.e. on an internetwork – such as a wide area network – then a routing decision must be made. In this regard we have already examined the use of a datagram service vis à vis a virtual circuit. 4KZ]UXQOTML[TJGSKTZGRY There are two other classes of service provision that you might encounter. These are the acknowledged connectionless service ALS and the unconfirmed connection oriented service UOS, sometimes called send-and-pray. The ALS service is used for real-time communications. It is similar to the datagram or connectionless service, except it provides the transmitter with an acknowledgment that the data has been delivered. The UOS service is a connection oriented service that insists a link be established before data packets are transmitted. However, subsequent delivery of the packets is not acknowledged. In summary, there are many different types of protocol, but they can be classified in terms of their functional emphasis. One scheme of classification is: • Master/slave vs peer-to-peer A master slave relationship requires that one of the communicators act as a master controller. Peer-to-peer protocols allow all communications to take place as and when required • Connection oriented Connectionless; acknowledged connectionless; unconfirmed connection oriented. These are described above • Asynchronous vs synchronous Synchronous protocols send data at the clock rate of the network. Asynchronous protocols send data one byte at a time, with a varying delay between each byte • Layered vs monolithic The OSI model illustrates a layered approach to protocols. The monolithic approach uses a single layer to provide all functionality • Heavy vs light A heavy protocol has a wide range of functions built in, and consequently incurs a high processing delay overhead. A light protocol incurs low processing delay but only provides minimal functionality /+++/95YZGTJGXJY The Institute of Electrical and Electronic Engineers in the United States has been given the task of developing standards for local area networking under the auspices of the IEEE 802 committees. Once a draft standard has been agreed and completed, it is passed to the International Standards Organization ISO for ratification. The corresponding ISO standard, which is generally internationally accepted, is given the same committee number as the IEEE committee, with the addition of an extra ‘8’ in front of the number i.e. the IEEE 802 committees are equivalent to the ISO 8802 committees. These IEEE committees, consisting of various technical, study and working groups, provide recommendations for various features within the networking field. Each committee is given a specific area of interest, and a separate subnumber to distinguish it. The main committees and the standards that they are working on are described below. /+++.OMNRK\KROTZKXLGIK The HILI sub committee is concerned with issues such as high level interfaces, internetworking and addressing. There are a series of sub committees, such as: • 802.1B LAN management • 802.1D Local bridging . standards are known as the Technical Office Protocol (TOP) and the Manufacturing Automation Protocol (MAP), and are designed as a subset of the OSI model. At the field sensor level, a standard. generally relate to such responsibilities as error detection and correction methods, flow control methods, and voltage and current standards. However, there are other properties such as the size. layer on the destination machine. Network architectures (such as Ethernet, ARCnet, Token Ring, and FDDI) encompass the data link and physical layers, which is why these architectures support