Introduction

Many computer applications rely heavily on communications between computers or between one computer and the user of another computer. The computers can be in the same room or thousands of kilometers from each other and the application can be, e.g.
– some widely used standard application such as an e-mail progran or a web browser
– a business application that transfers documents (memos, orders, invoices, transport documents…) either within one organisation or between business partners
– a remote control application or an application that enables the user to use another computer remotely
– a game or
– a file transfer application that merely moves a file from one computer to another without regard to the file´s format or purpose.
For an application to work, several components have to fit together and co-operate, such as
– the mutually communicating applications programs on several computers
– the corresponding computer hardware and systems software and
– the communications network (hardware and software) as well as the software used to access the network.
The task of the telecommunications engineer is above all to solve problems of the user and to plan and realise working applications out of standard components or – when necessary – to specify new components that fit to the particular application. Besides being an expert on networks, it is important to have at least rudimentary knowledge of software and programming in order to understand the solution as a whole and the role and interfaces of the telecommunications network in it. Thus, this document is divided to two parts: first we review basic properties of networks and protocols and at the end there are some design problems.

Applications protocols

To understand what an applications level protocol is, consider two applications programs, such as two programs sending e-mail to each others and to third parties. The programs might differ from each others in many respects: one of them might, e.g., have a sophisticated mouse-controlled graphical interface for the user to edit, send and receive mail while the other program might be based on typed commands. The programs may have been written in different programming languages and for different operating systems. Nevertheless, there is always a set of primitives that performs the needed e-mail functions, such as
– starting and finishing of  e-mail-related communications with another party
– specifying the sender or receiver of mail
– sending mail
– receiving mail or
– queries related to mail.
This set of application-related primitives realized in the form of, say, a set of pre-written procedures, is the applications protocol. It consists of only those aspects of the application that require agreement and communication between the parties. The applications program takes care of local matters such as the user interface or the idiosyncracies of the particular file system. The interface between the applications program and the applications protocol is also a local matter and the details of its implementation may vary from case to case as long as basically the same service is delivered. This interface is known as the applications service interface.

To send messages to each other, the applications protocols of the communicating parties use the services of an underlying transport protocol, such as TCP. The messages passed between the parties have to be carefully standardised in format and coding, because the other party has to be able to interpret them. This interface is known as the applications protocol interface. The applications protocol entities appear to communicate directly with each others, although the messages actually pass through the lower protocol layers.

Get aquainted to some of the widely used and standarsised applications level protocols such as HTTP, SMTP or NNTP. It is not necessary to memorise small details. Instead, try to understand more clearly what an applications level protocol is and its relationships to the application program and to the underlying protocol layers. You may also try to sketch a protocol for some simple application of your own, such as some simple game or the discussion protocol of the socket programming exercise.

The transport layer

The transport layer service interface (known as the socket interface in Unix and Linux) offers to two programs (application protocol entities) running on different computers (or the same computer) a way to communicate with each other. The transport protocol offers a high  level of service so that the messages sent may be expected to arrive at their destinations sooner or later and to be free of transmission errors. The service offered at this level is independent of the particular application.

Why is the transport layer needed? Why can´t the programs communicate directly through the network service interface? There are two reasons:
– There are many kinds of networks and the service offered by the particular network may be unreliable. In that case the transport protocol takes care of the needed checks and retransmissions.
– Telecommunications devices are usually shared resources of several users of a computer (or even several simultaneously running programs of the same user, e.g. on a PC). The transport protocol works in co-operation with the operating system of the particular computer and keeps the data packets of the several users separate so that they may be interleaved and sent over the same telecommunications lines.
To fully understand how the transport protocol works, it is necessary to know some key concepts related to the operating system, e.g.
- process (a program in operation)
- interrupt
- multitasking
- scheduling
- thread
- device driver
- demon (in unix/linux)
- queue
- buffer
While there are many protocol alternatives at higher as well as lower levels, we discuss only two widely used transport protocols, TCP and UDP. TCP works as described above, but UDP does not take care of transmission error. UDP is used when the network service is reliable or when small errors can be tolerated (consider, say, a single faulty bit in a video stream).

Get aquainted to the properties of TCP and UDP. If possible, try to find the programmer´s handbook of some operating system to get some idea of how the transport interface (socket interface) is used in practice. Again, try to understand key principles rather than memorise small details.

Networks – general

Whether a network is worldwide or restricted to a single room, the main purpose of the network is to route the data to be transferred from the original sender to the ultimate destination possibly via one or more intermediate nodes. When making a choice for a particular purpose between the numerous network alternatives many factors have to be considered, such as
- availability of the service
- extent of the network
- capacity of the network
- reliability of transmission
- security questions
- access points and availability of  software capable of using the network
- is the service connection based or datagram based and - last but not least
- cost and principle of charging (fixed fee, by connection time or by volume).
Wide area networks

The traditional wide area networks, such as telephone modem connections, ISDN or frame relay (ab)use the ordinary telephone network for data transmission. Because of its much higher speed, ATM needs a connection of higher capacity, say, a leased E1 (T1) line. Each one of these networks can be used either for switched connections (formed as needed on call-by-call basis) or for permanent (virtual) connections. Compare the properties of these networks. To get an idea of the availability and relative prices of these alternatives, you might consult the web pages of the service providers (if you don´t understand Finnish, use, e.g., www.bt.com).

The Internet

The Internet is a virtual network. It does not have an infrastructure (cables etc.) of its own, but is built on top of other networks and leased lines. It does have an address plan and routing protocols. These are used to deliver traffic between Internet nodes. To pass from one Internet node to another, the traffic may use all kinds of connections through various networks.

The basis of Internet is the datagram-based and unreliable Internet Protocol (IP). The IP datagram passes from node to node till it arrives at the destination node given in the binary address field of the datagram. Get aquainted to the protocol.

The payload of an IP datagram is usually a frame of the transport level TCP protocol, so people very often speak of TCP/IP or even the TCP/IP protocol, although the two protocols are strictly speaking separate. Besides taking care of transmission errors and making it possible for several users to use the Internet node (virtually) simultaneously as explained above, the TCP protocol also transforms the binary IP addresses to human readable textual addresses (with the help of the DNS protocol). Although it is planned for Internet use, the TCP protocol can also be used on top of  other kinds of connections (such an Ethernet or telephone lines) to take care of error control and because many popular applications work on top of TCP.

The IP datagrams can be sent through many kinds of networks. For the end user, one possibility is a leased line to the Internet service provider (ISP). Two kinds of these should be mentioned. ADSL is a fixed broadband connection to the premises of the telephone operator. Clever line coding is used to get a high speed (up to several Mbps) out of an ordinary telephone cable, but the subscriber loop has to be shortish and of reasonably good quality. Cable modem is used to send datagrams to and from the premises of a cable TV operator over the cable network. The connection is broadband, but the TV channel reserved for this purpose is shared by many users. These connections are not networks but point-to-point connections and belong to the link layer of the protocol stack. Nevertheless, they are discussed here, because they are used practically exclusively to pass IP datagrams.

Local area networks

Local area networks (LANs) are restricted to a single building or a group of buildings. They are used to connect the computers of a single organisation. Nowadays Ethernet is by far the most popular LAN, so we´ll concentrate on it, but there are still many varieties of the basic idea. Originally, a shared coaxial cable was used to pass unreliable datagrams from computer to computer at the speed of 10 Mbps. Newer versions of Ethernet have been built around  twisted pair cable and fiber optic cable and there are wireless Ethernets, asw well. 100 Mbps is now a fairly standard speed and 1 Gbps and 10 Gbps speeds exist. Many of the basic principles still remain the same, especially from the standpoint of the service user. To get a grasp of the packets and how they are passed through the network, start with the 10 Mbps networks. Also find out about the differences between hubs, repeaters, bridges and routers.

A Virtual Private Network (VPN) can be used when the company has several locations far from each other. The Ethernet frames are then sent from one LAN to another through some kind of a wide area network, e.g. a leased telephone line or the public Internet (a.k.a. tunneling). This is invisible to the users of the network, who see the networks as one big LAN. Consider the benefits and problems of this arrangement.

To give the LAN users a controlled access to the external world and to protect the network, one computer is usually dedicated as  a network server, or there may be several servers for different purposes. Find out how e-mail and web pages are handled by the server.

Problems

1. Tic-tac-toe

Two players take turns to draw X´s and O´s to the squares of a table, trying to get five in a row horizontally, vertically or diagonally. The player who manages to do this first, wins. Sketch the functions of the application protocol needed to play the game by computer over a network. You may assume that a reliable transport (socket) level service exists.

2. Marketing

A company has a proprietary program to keep track of its inventory, orders, deliveries etc. The program has been duly split up to client and server modules. What kind of telecommunications arrangements (hardware and software) would you use to connect the users to each others when

        a) the company has headquarters at downtown Helsinki and a factory just out of the city
        b) the company works at several locations all over Finland

3. Web surfing

You are sitting at a PC in Otaniemi and request a web page of another university. What happens and which protocols are needed before you can see the page.

4.(last) Discussion groups

You would like to establish several news and discussion groups for internal use in your company. You have found a good program, but it works on top of Internet and your company is using an internal (virtual) LAN. How can the program be made to run within the LAN and what happens when a news item is downloaded from the server (which protocols etc. are used and in which order)?

Literature

Halsall: Multimedia Communications
Kurose-Ross: Computer Networking
Peterson-Davie: Computer Networks
Stallings: Data and Computer Communications
Tanenbaum: Computer Networks
Understanding Telecommunications 1
Understanding Telecommunications 2