Network Engineering Practice Lecture 2

Protocols



This lecture is divided into hyperlinked sections

Introduction
The OSI model
Details of the seven layers
Layering in General
The TCP/ IP Protocol Architecture Structure
OSI versus TCP/IP
Operation of TCP/IP
Addressing Comparison with Surface Post
Ports as Addresses
TCP/ IP Communication
TCP header details
IP header details
Network Access header details
Arrival at Router
Conclusion


Introduction

This lecture will examine:

The models of communication architecture that are used in today's networks including:

The OSI model

Figure 2.1 The ISO OSI model

The OSI (Open Systems Interconnection) model was developed by the International Organisation for Standardisation (ISO) as a model for a computer protocol architecture and as a framework for developing protocol standards. Unfortunately the model was presented after the general acceptance of the TCP/ IP protocol suite and as such is rarely implemented. However, the OSI model provides an excellent tool for discussing protocol structures and architectures.


Details of the seven layers:

1. Applications Layer: The layer of most interest to users as this is where services such as e-mail and file transfer are to be found. It is where the applications are stored. It provides access to the OSI environment for computer users.

2. Presentation Layer: Concerned with the representation of data. End users may have different data representations. This layer converts both to a common language. Encryption and compression are carried out at this level.

3. Session Layer: Manages and terminates connections (sessions) between co-operating applications. It is the layer where logon procedures reside and verifies that users have the right to proceed to use higher levels in the protocol stack, password verification for instance.

4. Transport Layer: Allocates resources to the network layer, for example it can decide the quality of service that a particular connection will have and generally isolates upper layers from the physical network. It provides reliable end-to-end transfer of data, error recovery and flow control.

5. Network Layer: It provides the upper layers with independence from the data transmission and switching technologies that are used to interconnect systems. It is also responsible for establishing, maintaining and terminating connections.

6. Data Link layer: The layer which is responsible for reliable transfer of information across the physical link and sends blocks of data (frames) with the necessary synchronisation, error and flow control.

7. Physical layer: This layer concerns the method of transmission of the unstructured bit stream across the network. It deals with voltage levels and hardware details such as pin numbering, cable type etc.


Layering in General

Notice there are seven layers in principle although these appear to be sub-divided by some manufacturers. In principle it should be possible to enter this protocol stack at any of the seven layers provided that the station/ terminal has the requisite software to cover all of the lower layers of the stack.

A PC when connected to a LAN would operate at the Network layer. The Network interface card (NIC) installed in the PC would implement the layers needed for communication.

The entry points into the stack are termed Service Access Points. It is not feasible that either end of a connection could function via different access points. For instance a dumb terminal is not capable of sending e-mail because the access level is at the physical level and no software resides at that level.

The various layers in the stack communicate upwards and downward across the interface using a defined set of commands. The layering allows manufactures to design specialised hardware and software which implement functions required by the various layers rather than a complete machine covering the whole of the stack.

Another advantage of layering is that within a layer, manufacturers are free to implement the functions as they wish or upgrade a layer without affecting the rest of the protocol stack.

An example of this occurred when the older X.25 protocol that operates with unreliable cabling (coax) was replaced with SONET/ SDH which operates over fibre optic cabling. Instead of redesigning the entire protocol stack, the layers from network to physical were replaced, leaving the upper layers intact.

Notice the three lower levels (Protocol Levels) exist at the ends and across the network whereas the peer levels only exist in the end entities (the computers or servers).

Figure 2.2 The OSI Model as part of a networked protocol structure


The TCP/ IP Protocol Architecture Structure

In reality, the TCP/ IP suite has come to dominate computer communications. The OSI protocols were still in development when the TCP/ IP protocols had already been tested and implemented. When businesses realised the need for interoperability, it was only TCP/ IP that was ready to be used. Another factor is that the OSI model is too complicated and does in seven layers what TCP/ IP does in five.

For reasons best known to themselves the Internet community have chosen to divide the functionality of the protocol stack in a different manner to OSI but not without maintaining the compatibility. The layers correspond roughly as shown in Figure 2.3.


OSI versus TCP/IP


Figure 2.3 Comparison of OSI and TCP/IP


Operation of TCP/IP

To understand how one application that resides on one computer operates, let us consider the case of a PC on an Ethernet network that wishes to communicate with another machine (and for our purposes an Token Ring connection at the far end will help illustrate the process) on a different network. For successful communication to take place, every entity in the overall system must have a unique address. The host is identified with an IP address so IP is implemented in all end systems and routers.


Addressing Comparison with Surface Post

Compare this with surface post. It is necessary to have the address of the house to which you want your letter to be delivered, and this is written on the envelope. However a PC may have many applications that are able to communicate and this may be compared with the inhabitants of the house to which you send the letter. When you write a letter, you specify the person within the address to which the letter is bound. The post office sorting system looks at the postcode and address written on the envelope and delivers it to the house. Once the letter has arrived at the house, it is further sorted by the person who picks up the letters and passed to the person whose name precedes the address.


Ports as Addresses

This is the same as computer addressing where the host has an address and the application within the host has an identity too. The address for the application within the host is known as a port. It is TCP that looks at the port address and delivers any incoming data to the proper application specified by the port number.

Let us consider the operation where a process running on one host wishes to send a message to another process on a remote host.
 
 

Figure 2.4 Overview of TCP/IP communication concepts


TCP/ IP Communication

To help with the following discussion, please refer to figure 2.4. The process (application) is associated with port 1 on host A and wishes to communicate with a process associated with port 2 on host B. The process on host A sends the message to TCP with instructions to send to host B, port 2. TCP hands the message down to IP with instructions to send to host B. IP does not need to know the destination port as this has been taken care of by TCP. IP then passes the message down to the network access layer, Ethernet in this case with instructions to send the message to a router R which is the first hop on the route to host B.

For this operation to take place, extra information other than the data generated by the application has to be transmitted too, see figure 1.5. For each piece of data passed to TCP, there is some control information too that is added by TCP in the form of a header, a few bytes of information that is prepended to the data. This forms a TCP segment. This information will be used when the TCP segment is examined by host B to pass the data to the correct port. It is not used or seen at any other point between host A and B. 


TCP header details

Some of the information included in the TCP header are:

Having formed the TCP segment, it is passed to IP.

IP header details

The IP layer is given instructions to pass the TCP segment to host B. The segments must be passed across one or more subnetworks and via one or more intermediate routers. This operation will require control information too and IP adds its own header containing control information. This forms an IP datagram. One of the items stored by the IP header is the destination host address. 


Network Access header details

This IP datagram is presented to the network access layer for transmission across the first subnetwork in its journey towards its destination. The network access layer then appends its own header containing information that is required to transfer data across this first subnetwork.

Information contained in the network access header includes:

Arrival at Router

Having arrived at router R, the network access layer header is removed, having fulfilled its usefulness and the IP address of the final destination is revealed in the IP header (in our case B). The router R then makes a decision based on internal tables as to which machine (together with its network address) the datagram ought to be passed to next. The datagram is once more augmented with a network access protocol header, but this time it will be the header associated with a Token Ring network. Although this header will be of a different format to the Ethernet header it will contain similar elements, i.e. subnetwork address and facilities request.

The data will then be delivered to host B where firstly the network header is stripped off. The IP header is removed too, revealing the TCP data (port address). The TCP layer in host B then is able to remove the TCP control information and pass the (original) data to the correct port for the residing application to decode and present to the user.
 
 

The protocol data unit now formed may be inserted onto the transmission medium (cabling)

Figure2.5 Protocol Data Units within the TCP/IP structure


Conclusion

The OSI model is useful as a reference model only and has rarely been implemented in any systems. The TCP/ IP model is the dominant model for computer communication and forms the basis of the majority of computer communications. IBM have their own communications model called SNA (Systems Network Architecture).

Despite never being implemented, the layering of the OSI model forms an ideal method of comparing communication structures and this is what we shall use for our discussions during this course.



 
 

Back to top of page

© MM Clements 2001