FANDOM


SummaryEdit

1. Number of study hours 20

2. Short description of the course: This module describes how telecommunication networks work, describing physical aspects, functional issues and protocols. The module addresses these problems first showing main concepts and principles and then showing their practical application to the Internet.

3. Target groups: The employers of IT core level professionals are the target sector. The project objectives directly address the promotion of high knowledge and skills standards in IT area and in particular provide an innovative approach to training. The first target group consists of IT students (vocational school IT basic level training and the first courses of colleges and universities) in technology area and IT practitioners not having vocational certificates yet.

4. Prerequisites We assume a basic mathematical background, which are useful to understand the elementary concepts regarding communication addressed in the first units of the module. We assume the ability to understand the representation of integers in different basis. Basic background in electromagnetic field physic might be useful but not strictly required.

5. Aim of the course - learning outcomes This module describes some basic aspects of telecommunication networks highlighting logical and physical functionalities and introducing the different commutation techniques used. The module describes then the main physical components of a telecommunication network; it also discusses the most important characteristics of transmission media and the different technologies to access the Internet. The protocol layers and related concepts are then described. We will then consider the Internet as a case study, describing in detail the specific protocol layer used in the Internet. We specifically focus on the network and transport layers, describing the main protocols and the corresponding service models. We will address the routing problem in the network layer and the issues related to connection-oriented services. The module will provide to the reader the knowledge of main aspects regarding modern telecommunication networks, specifically information coding and transfer. The reader will be introduced to the main physical components used in communication networks, and the most important characteristic regarding transmission media will be presented. The module will specifically focus on technology used in Internet. The reader will learn which the general characteristics of local area networks are and the main components used to realise them. Moreover, transmission media will be presented. The reader will know the main principles of protocol layers and the functionalities provided by each layer. The general concepts will always be grounded using the specific case of the Internet. Therefore, the reader will know the basic principles regarding the transport and network layer.

ContentsEdit

3.1 Communications principlesEdit

Main concepts It is possible to place the information exchange needs between two or more remote entities into the general problem of communication at distance: the information source and destination communicate using a telecommunication service offered by a communication infrastructure.

We can highlight the subjects involved by communication process: • network operator that interacts with the service provider. • service provider • service customer that acts as information source or sink; it interacts with the service provider. In order to access to the communication service offered by service provider, the client must use a set of functional components according to an opportune protocol: this defines the service logic and it is defined as a rules set that handle the information exchange between the communication entities. Using the previous definitions it is possible to define a telecommunication network as a platform that allows to satisfy the applicative requirements of the communication users supplying the supported services each one with its logic; the network infrastructure transfers both user information and control information that is needed by communication function. Main idea behind the telecommunication network concept is the resources sharing. The model commonly used to describe both the telecommunication network and the set of its functional elements is that one that uses the network geometric configuration (network topology). This model represents the network using a graph whose elements (nodes and lines) assume different semantic according to the considered operativity. In fact, it is important to distinguish, for each network, the logical and physical functionalities: the first ones (that configure the logical network) refer to the communication process evolution as a logical states succession while the second ones (that configure the physical network) refer to the electromagnetic signals transmission that transport the information. Logical and physical networks have a clear hierarchical relationship as they configure an interaction model client - server based; in this model the logical network (client) handles the information transfer using services offered by the underlining physical network (the server). Network topologies The semantic of the graph associated to the network topology changes considering physical or logical operativity; in particular, if we consider a graph that represents a logical network topology: • each line represents a direct path (not necessarily physics) used by information in transit between two connected nodes • each node represents an information switching point that is the network apparatus that runs the switching function. • If we consider a graph that represents a physical network topology: • each line represents the transmission media used to transmit signals (link) • each node represents the apparatus to transmit and / or receive signals • Referring to one given network, logical and physical topologies generally do not coincide: two logical adjacent nodes, which are able to communicate directly without usage of intermediate exchanging node, can be not physically adjacent that means that the physical path between the two nodes is only indirect.


Physical and logical topologies example The picture shows a physical network topology with 4 nodes; the nodes pairs 1,4 and 3,4 are not connected between them; however, in this example, all the logical network nodes are connected: logical connectivity between nodes 1-3 and 3-4 is obtained using indirect physical connectivity

According to the network topology configuration, it is possible to distinguish: • point to point network (point to point): each nodes pairs is at least connected by one transmissive link dedicated to itself; moreover each network devices must to interface with a node • broadcast network: one communication channel is shared by all network terminals; by definition, data flow exchanged between two network terminals is accessible by each other network terminal


Point to point network topologies The figure shows differently point-to-point network topologies. In the star topology, a node (star center) is connected to each other network node. In the ring topology, the nodes connectivity is assured by a circular mechanism while in the full topology each node is directly connected to each other one. In the tree topology the nodes connectivity is assured by a tree based hierarchical mechanism; it is possible to interpret the inverted ring topology as a set of overlapped ring topologies merging each time the common nodes; finally, irregular topology does not correspond to anyone of above described configurations.

Broadcast transmission refers to the simultaneous and multiple transmission of the same message to every network terminal. The following figure shows two classical network broadcast configurations. The first one, also known as bus topology, uses a single transmission media to connect each network terminal. Although the second one is more similar to a star configuration, its behavior is the same of bus network because the hub role is simply to resend the traffic received by a link to the other ones. In this scenario, it would be more efficient to send traffic only to the outgoing link that allows reaching the destination: it is possible to obtain this behavior replacing the hub with a switch and obtaining a star point-to-point configuration.

Two examples of broadcast topologies The figure shows two examples of broadcast topologies (or bus based); in the first one, the terminals share the same transmission media to access to the network; in the second one, the same behavior is obtained using a centralizer device (hub).

Logical network and network classification We can distinguish two network sections within logical network: • internal section or backbone also known as transport network or core network • external section also known as access network The access network implements the input / output network functionalities and provides the user – network interface; this section uses wired [based on cable] or wireless [based on radio signals] transmission media. Transport network nodes can be: • access nodes • transit nodes Transport network role is transferring the information between access nodes eventually using one or more transit nodes; this network section generally uses wired transmission media (e.g. optical fiber).

Logical network access nodes (A) and transit nodes (T) The figure shows a logical network example; transit nodes are internally and interconnect the access nodes placed on network border; access nodes are also known as network access points.

Transport network implements interconnection service between access nodes regardless of how these nodes implement the access.


Heterogeneous network access modalities The figure shows a network scenario where the user A uses a wireless network access while the user B uses a wired network access; role of network transport is to interconnect the access nodes regardless of the network access modalities.

Further network classifications are based on the following parameters: • terminal mobility: fixed and mobile (e.g. cellular networks); • geographic extension: o locale area networks (LAN ), whose extension ranges about the hundreds of meters; the Ethernet network, also available with radio access (W-LAN ) is an example of most common local area network; o metropolitan area networks (MAN ) whose extension can be several kilometers; o wide area networks (WAN ) whose extension can be national or even planetary • transported information type: analog networks (e.g. TACS ) or digital networks (e.g. GSM ); • access regulation: public or private networks; • used switching: circuit switched or packet switched networks.

Identifying the network path that information must follow is crucial: to such purpose, a routing function is needed. Using full point-to-point topology, this one would be trivial but if the number of terminals is high, it is unthinkable to build this type of networks due to the remarkable links complexity. Therefore, as we need to use shared resources, traffic routing through the network nodes has a primary importance.

Basing on nodes handling mechanisms it is possible to classificate the networks as follow: • circuit switched network • packet switched network.


Traffic routing between A and B terminals The figure shows a network scenario where the user A uses a wireless network access while the user B uses a wired network access. The information transferred between A and B is first routed by A network [using its mechanisms] to the access section of the transport network that interfaces the A network. Afterwards the information is routed within the transport network to the access section that interfaces the B network; finally, it is routed by B network [using its mechanisms] to the final destination.

Circuit and packet switching In the circuit switched network, each single communication uses a dedicated channel that is allocated for the entire communication length.

This requires: • a preliminary phase to setup the circuit during which network reserves in each nodes all the resources needed to create and maintain the circuit • an intermediate phase during which the data transfer takes place • a final phase to release the connection freeing the allocated resources

During the connection establishment phase the physical layer builds a data path that data will follow end to end blindly. Decision about traffic routing is taken once at channel establishment time; therefore, network only introduces a transfer delay (constant) on the transported information and each single data unit does not need the destination address to be routed. This switching technique is very useful if we need to offer quality assured services; however, the grade of usage of the shared resources is not ideal as a capacity fraction is assigned to the user even if it is not transmitting. From the application point of view, user sends and receives a continuous data flow (stream) usually with reliability assurance; network hides this service implementation details. Public switched telephone network is a classical example of circuit switched network. Packet switched networks use statistical multiplation as base mechanism: a channel is dynamically allocated according to current transmission needs. Unlike to circuit networks, packet networks operate according to a mechanism also known as “store and forward” presupposing that multiplation apparatus have memory to store the traffic in transit. In fact, each network node stores the received packet before to retransmit it to the following node over the routing path. This switching technique allows a more efficient usage of the transmission resources compared with static allocation and it is suitable for apparatus that generates discontinuous traffic. In addition to transfer delay, network also introduces a processing delay that depends on the current network load. Datagram and virtual circuit networks A packet switched network can be virtual circuit or datagram based according to resources allocation schema. • Virtual circuit packet network simulates the circuit network behaviour: resources are preassigned establishing a logical connection (virtual circuit) through which all the packets labelled with the same virtual connection identifier transit. The connection concept simplifies the routing function. • Datagram packet network does not use connection concept and resources are assigned on demand; the routing function is dynamic and it is applied to each single packet; intermediate crossed nodes (e.g. router) store the packet before to retransmit it to the correct outgoing link. Communication data are segmented using multiple data units (packet) and their destination information (address) it is added before each of them is delivered to the network; instant-by-instant network can use any available path to reach the destination.

Datagram networks introduces a transfer delay can be much variable and not predictable; virtual circuit networks can assure several quality of service profiles. A computer network is a set of autonomous and interconnected computers: it realizes the communication service between processes running on remote computers hiding to these ones the network complexity. The applications processes are running on remote network terminals (end system) and these systems are also known as host (computers, palmtop, mobile devices, home devices,…) as they host application level software that either use services offered by remote host (e.g. web browser, mail reader) or offer services to remote host (e.g. web server). Computers networks are generally packet switched network. Internet is a datagram based packet switched network and the IP protocol implements the routing function (that is only based on packet destination address); network service offered by IP protocol is unreliable as no assurances are provided about packets delivery, their integrity and delivery sequence; service prefers fast delivery to reliable delivery and errors handling is remitted to network services user.

Computers network communication example The figure shows two remote computers (host) that communicate using a network provided logical channel

Information transport The transport of information exchanged between several communications entities is committed to a signal using a codification procedure; on source – destination path the same information can be transported using different signal types and it can be successively encoded / decoded. A signal represents the time trend of physical largeness [e.g. electric tension] that are the values assumed by this largeness on successive time instants; univocally associating these values with the information to transmit it possible to understand how to a signal transports the information. If a signal changes with continuity during time is said analog.

A numerical representation (digital representation) of the analog signal is obtained discretizing both the time variable (sampling) and the signal values (quantization); thanks to this representation, it is possible: • to multiplex (band together) more numeric signals over the same communication channel • to obtain a signal transmission that is more strong regarding troubles also thanks to appropriate error detection – correction codifications • to execute complex signal digital processing using simple computers

Under appropriate hypotheses about the analog signal, it is possible (sampling theorem) to associate it to a binary signal [with only two values] that is only defined for given discrete time instants. This signal (digital or numeric) can be used in place of the original analog signal in order to execute signal processing and / or transmission. Given an analog signal x(t), its sampling with sampling interval Tc is defined as the values set x(nTc) with n=…,-1,0,1,…that is the set of signal values at time instants multiple of Tc. In order to encode the single sample value using a sequence of binary digits (0,1) [with finite length] a reference values set is used and each sample value is approximated with the closer reference value (quantization); therefore, quantization introduces an error during signal reconstruction (quantization error). Number of reference values (quantization levels) and binary digits needed to represent a signal sample depend on quantization process resolution.

Signal sampling and quantization The figure shows an analog signal, the correspondent sampling signal using 1 Hz as sampling frequency and the subsequently two levels [1 bit] quantization. Let us note that the bit 1 is associated to each positive sample and the bit 0 to each negative sample. This precision loss is also known as quantization error.

Analog and digital conversions - main standardization bodies Analog signal sampling and the subsequent quantization procedure generate a digital signal; this process is identified as analog to digital conversion; the dual conversion process, also known as digital to analog conversion, if the sampling theorem conditions are satisfied, reconstructs an approximation of the original signal that is as more actual as more the used quantization resolution is high.

Analog signals examples: • Video (Analog TV) • Audio (voice, music) • Digital signals examples (binary digits sequence or digit sequence): • Digitalized audio and video

International organisms that operate either worldwide and in European within handle rules of telecommunication context. Thanks to standardization activities, it is possible to assure the compatibility of apparatus that operates in heterogeneous scenarios. When a standardization body makes a standard (e.g. a communication protocol) it publishes a set of complete and detailed specifics; fulfilling these ones, the concrete standard implementation is not generally constrained.

Main worldwide standardization bodies are: • ITU : it is a specialistic agency of United Nations whose role is to harmonize all the Telecommunications worldwide initiatives; • ITU-TS is its section dedicated to standardization activities and it is organized into study groups (SG ) and makes “Recommendations”; although these ones are free they are de facto the guideline in Telecommunications context. • ISO: it is a United Nations body whose role is to support the international rules in order to facilitate goods and services commerce; in telecommunication within it operates jointly with IEC • Main European standardization bodies are: • ETSI : Technical Committees (TC ) make standards and there is a committee for each specific argument; • CEN : The ISO equivalent in European within; • CENELEC

3.2 Network Components and ArchitecturesEdit

Components of a computer network A computer network comprises a set of computational units that can exchange information. Internet is clearly the most well known example of a computer network. Internet is a very complex system that connects millions of computational units over the whole world. The computational units that are connected to the Internet can be of several types: personal computers, workstation, handheld computers etc. and are generally referred to as end systems. The connections among end systems are realised through communication links. Communication links provide the information flow among end systems. Communication links can be realised with different transmission media (e.g., coaxial cables, twisted twin pairs, optical fibre, radio wave etc.) as we will see more in detail in the following. Usually end systems do not exchange information directly, but use dedicated connection devices called routers. Routers manage the information flow among end systems.


Main components for a computer network. End systems are connected to routers through communication links. Routers can be connected among to each other and to the end systems.


The main functionality of a computer network is to allow data exchange among the computational units. This possibility gives rise to many applications such as controlling a remote computational unit (remote login), electronic mail, instant messaging, voice over IP video streaming etc. Such applications can be executed from the users on their own computational units because routers and communication links allow the exchange of information. The computer network is therefore a necessary infrastructure for all the distributed applications that users execute. Internet, for example, is the main infrastructure for all the above mentioned applications.

Most of the computational units present in a network are end systems. End systems do not manage the information flow; they both use the network infrastructure to execute specific applications. End systems can be of several typologies: desk computers, laptops or dedicated devices such as handheld or digital cameras. End systems can be either clients or servers. Servers are machines that provide various types of services. Examples of servers are web server and mail server. Clients are computational units that utilises services provided by the servers. Clients are usually the machines that users access directly

Internet access – general concepts The internal section of a computer network comprises all the devices that allow the data exchange among end systems, mainly the communication links and the routers. Communication links are simply transmission media used for the data exchange while the routers manage the information flow. Routers are “intelligent” devices that regulate the information traffic, allowing the end systems to share data. In the Internet, end systems can access the network through the ISP . An ISP comprises a set of communication links and routers connected among them. ISPs provide to the end systems different access typologies (modem, cable, wireless, etc.) and are organised in a hierarchical structure.

We can identify three main network access typologies for end systems: 1 home access: the access from an end system in a private house 2 enterprise access: the access commonly used in enterprises or public institutions 3 mobile access: the access for mobile devices

The three typologies can be differentiated along several parameters. A main one is the data rate, i.e. the amount of data that are transferred between the computing systems in time. Connection speed depends on several parameters, such as the access media, the modalities of data transfer, the amount of data that is flowing over the network etc. etc.

A home network usually connects a personal computer to an edge router Most of the time we have a modem connected to the home telephone line; a modem is a dedicated device that converts information from digital to analogue and vice versa, so that the information can be transmitted over the phone line. A modem provides a theoretical data transfer rate of 56 Kbit/sec. This can be considered as a fairly low rate, considering the amount of data that an average users download from the Internet, moreover the modem has exclusive access to the phone line, not allowing the users to utilise the phone while a connected. Also, the 56 Kbit/sec data rate is a theoretical data rate, in practice the rate at which users can download data is consistently lower, due to the fact that the ISPs need to manage at the same time requests from several users. Other access typologies such as DSL e HFC provide higher data rate while allowing the user to used the phone line.


Internet access – Home access and LAN To allow users to both have a faster access to the Internet and to use at the same time the phone line and the Internet connection, there exist several typologies of home access. The most common is the DSL. DSL is based on the phone line but uses a different type of modem. The DSL access utilises transmission frequencies for data that are not used by the phone system to transmit the voice. Using such frequencies DSL allows both to have the concurrent use of phone line and Internet connection and to have a higher data transfer rate. Most of the time the DSL connection is asymmetric and is thus called ADSL . The asymmetry is in the different data transfer rate to download data form the Internet and to upload data. Such difference is due to a choice of the ISPs, and the rational for that is that usually home users download much more data than they upload. The data transfer rate for a typical ADL connection ranges from 1.5 Mbit/sec to 384 Kbit/sec for data download, and from 128 Kbit/sec to 256 Kbit/sec for the data upload.

For enterprise or public institution, Internet access is usually realised through LAN . In these cases, end systems are connected among them in a local network. The LAN accesses the Internet via a router that manages the information flow from the LAN to the outside. LANs allow connecting end systems inside the network at a very high data transfer rate, and at the same time, allow connecting several end systems using only one (or few) direct connection to the ISP. In this way, connection costs can be dramatically reduced, but, at the same time, the data transfer rate with the outside world is reduced, because several users have to share the same direct connection with the ISP.


Enterprise Access The end systems are connected through a shared transmission media to the enterprise router that manages the internet connection.

The exchange of information among end systems does not always require the use of wires as transmission media: wireless technology allows the exchange of information among computational units using radio waves. The connection of a mobile device to the Internet is realised using wireless LAN. Wireless LAN users receive and transmit information connecting to a fixed station called access point. There are different technologies for wireless LAN; however, in all of them the users share the same radio frequency to exchange data. Theoretical data transfer rate varies between 11 Mbit/sec and 54 Mbit/sec. Transmission media A crucial component for all the access typologies is transmission media. Transmission media are the materials that transmit information, in the form of electromagnetic waves, among computational units. There are several types of transmission media that provide information transmission with different characteristics. One crucial characteristic for transmission media is bandwidth, e.g. how many information can be transmitted in each time unit through the transmission media.

The twisted pair is one of the most commonly used transmission media. A twisted pair comprises two insulated copper cables twisted together forming a helicoidal shape. Cables are twisted to reduce electrical interferences with neighbouring cable pairs. Twisted pairs are commonly used to transmit the voice in telephone systems and are therefore present in most buildings. There are two main twisted pair categories 1 Cat. 3, bandwidth 10 Mbit/sec; 2 Cat. 5, bandwidth 100 Mbit/sec. The two categories differ for the number of twisted pairs used and for the insulating material.

Coaxial cables are another type of transmission media. A coaxial cable comprises a rigid copper wire, surrounded by insulating material. The insulating material is enclosed by a cylindrical conductor, enclosed by a plastic sheath. Coaxial cables guarantee a high bandwidth and an excellent reliability. Bandwidth depends on the cable length; for a cable approximately 1 km long, the bandwidth is around few Gbit/sec.

Optical fibres are thin cables that transmit light pulses; usually optical fibres are made of glass fibre. Optical fibres can transmit information at very high speed, do not suffer from magnetic interferences and have very low signal attenuation. The main reason that limits the use of optical fibres is the high cost of the optical devices needed to generate and receive light pulses.

Wireless connections represent a very interesting alternative to guided transmission media, because they do not require installing cables and can propagate through particular types of materials. However, the signal quality heavily depends on the environment in which electromagnetic waves propagate; the signal strength is severely reduced by distance, and reflections on surrounding objects.

Wide Area Network and Local Area Network Computer networks can be divided in two main categories: WAN and LAN . WANs cover a wide geographic area, and comprise several computational units connected among them with different technologies. The most important example of WAN is the Internet. LANs are usually private networks, connecting end systems of enterprises, public institutions or universities. LANs allow users to share resources such as printers, scanners etc. Moreover, allow all users to access the Internet with only one (or a limited number of) ISP .

The main differences between LANs and WANs are: 1 network dimension; 2 transmission technology; 3 topology.

End systems are connected to the transmission media by a network card; there are several network card typologies, which differ depending on the end systems, the transmission media and the LAN network topology. Each network card has a network address or MAC. The MAC address is a unique identifier for the network card. The MAC address is composed of six bytes and is usually represented in the hexadecimal numeral system. To access the Internet, each end system is registered with an IP address. An IP address is a unique identifier for an end system in a given network. The MAC address is different from the IP address: the IP address is defined by the LAN network to which the end system is connected, the MAC address does not change no matter to which LAN the network card is connected. The IP address is used to exchange information among end systems, therefore the MAC address and the IP address of an end system have to be bound, somehow, one to the other. The ARP defines such binding .


A simple LAN, end systems access the transmission media using a network card. The figure shows a simple LAN. Each end system connects to the network using an interface with the transmission media, such interface is usually called network card. In the LAN, two end systems access the Internet through a router. End systems access the transmission media through a network card; for each end system the IP address is reported and for each network card the MAC address is represented in the hexadecimal numeral system. Computational units (or stations) that access a LAN can be connected among them in several ways; the structure of the connection among the computational units is called network topology. Network topology describes how end systems are connected to each other. For example in the figure we show a LAN network and its topology.

The network topology is directly connected with the technology used to provide data exchange among stations. The most commonly used topologies are: 1 ring topology; 2 bus topology; 3 star topology.


A LAN network and its topology The LAN is represented with all its components, end systems, routers and network cards. The topology captures only the connections among the components.

LAN topologies In the ring topology stations are directly connected to each other so that all stations are connected in a ring. End systems can communicate among them, even if they are not directly connected, using other stations on the ring. The stations are connected to the ring through dedicated interfaces, which manages the information flow on the ring. Usually twisted pairs are used as transmission media; also coaxial cables or optical fibres can be used. The ring topology is very simple to manage, because the information flow follows a precise order. Moreover, connections between stations are all direct; therefore there are no interferences on the transmission media. A main issue for ring topology is the high sensitivity to possible failures of components. In fact, if a single station or interface fails the information flow over the entire network might be stopped.


Ring network The figure shows a possible ring topology. Each end system is directly connected to two other end systems.

In the bus topology each station can exchange information with any other station directly through the shared cable. The main issue for bus topologies is the management of the shared transmission media. If two stations decide to send information at the same time, the electrical signal that the stations try to transmit on the cable, interfere among them generating inconsistent information. The cable must be managed so that it is used only by one station at time. Dedicated algorithms have been developed to avoid conflicts among the stations. The algorithms depend on the network technology used. An important benefit for the bus topology is the simple technology used and the low realisation cost.


Bus network The Figure shows a possible bus topology. In the bus topology stations are all connected to a single cable. The cable conveys all information flowing over the network.

The star topology is by far the most commonly used in LANs for enterprise and public institution. LANs using such topology are also called commuted LANs. The start topology does not need dedicated algorithms to manage the transmission media, because the information flow is managed directly by the central station. Star topology networks are very robust to failures of stations: if a station has a failure the rest of the network can keep on exchanging data without any problem. However, if the central station fails the information flow is completely interrupted.


Star topology The Figure shows a possible star topology. In the star topology stations are all connected to a central station that manages the information flow of the entire network.

LAN technologies LAN technologies define all components that are necessary for realising the information exchange over the LAN. In particular, LAN technologies comprise the topology, the transmission media, the algorithm used to manage the transmission media, the coding method used to encode information flowing in the network. For a set of technologies standards have been defined that specify each of the above components. Such standards have been defined from IEEE and are known as IEEE 802. Standards have been defined in different parts; parts from 802.3 to 802.5 describe the main LAN technologies that will be discussed in the following. The main difference among the LAN technologies that we will consider is the algorithm to manage the shared channel, the standard 802.3 describes networks that use a channel manager algorithm called CSMA/CD , the standard 802.4 describes token bus networks, and the standard 802.5 describes token ring networks.

The networks described in the standard 802.3 can have bus or star topology. Bus topology has been the first topology used for this type of networks, thus the managing the access to the transmission media was one of the main issues to solve. The algorithm used for media access control in these network topologies is based on a protocol called CSMA . More specifically, it is CSMA with Collision Detection: CSMA/CD. The CSMA/CD protocol is very simple and very efficient, which guarantees good performance and high data transfer rate. The simplicity and efficiency of the CSMA/CD protocol allowed the wide use of 802.3 LANs, which are, by far, the most commonly used.

Ethernet was the first technology to use a media access control protocol based on CSMA/CD. Ethernet was a great success thanks to the high performance and low costs for the technology. The IEEE 802.3 standard is a generalisation of the Ethernet technology; it describes an entire class of systems that use CSMA/CD as media access control protocol. The CSMA/CD protocol The CSMA/CD protocol is based on two main concepts: 1 Avoid collisions checking whether the shared transmission media is already in use before transmitting; 2 Detect possible collisions and solve them, by interrupting the transmission for a random period of time. When a station decides to transmit, it checks, before starting the transmission, whether the transmission media is already in use. If the transmission media is already in use it waits until the transmission media becomes free, otherwise it starts the transmission. If two (or more) stations sense that the transmission media is free and decide to transmit at the same time, a collision will occur. Stations can detect collisions, and when a station detects a collision, it stops the transmission and waits for a random amount of time before trying to transmit again. It is interesting to understand why collisions can happen even if stations check whether the transmission media is free before transmitting. This is due to transmission lag in the transmission media. Signal propagation speed in the transmission media is close to light speed, however, the signal transmitted from a station A is received by a station B only after a given time interval. Let us assume that the station B decides to transmit after the station A but before the signal from A reaches it (i.e., exactly in the time interval needed by the signal to propagate in the transmission media). The station B will sense the transmission media free and start transmitting. Only when the signal from A will reach B the station will detect the collision, and will thus stop the transmission. The number of collisions in system utilising the CSMA/CD protocol is heavily dependent on the number of stations sharing the access media. In particular the higher the number of stations, which share the transmission media, the lower the average data transfer rate. Nonetheless, CSMA/CD protocol is practically very effective, and is able to provide good data transfer rate even for system composed of several stations.

CSMA/CD discussion and execution example Another important concept of CSMA/CD protocol is to wait a random time before trying again to transmit when a collision is detected. The waiting time need to be random to avoid that all stations involved in a collision will not try to retransmit at the same time, generating another collision. There are several algorithms to determine the random waiting time. The most well-known and widely used algorithm is the exponential back-off algorithm. The most important concept for this algorithm is to adapt the waiting time depending on the number of consecutive collisions. Each terminal stores the number of consecutive collisions, and waits for a random time between 0 and 2n-1, where n is the number of consecutive collision detected. Suppose two stations A and B detect a collision and therefore they use the exponential back-off algorithm to determine how many temporal units to wait. After the first collision both stations can choose to wait either 0 or 1 time units. Therefore, there is a 0.5 chance that the stations transmit in the same time unit, thus generating another collision. Suppose a new collision arise, because both A and B choose to wait one time unit. A and B will detect a new collision, and thus the number of consecutive collisions will now equals 2. Now, both stations can wait 0, 1, 2 or 3 time units. In this case there is a probability of 0.25 that both stations choose the same time slot. Suppose that for bad luck, both stations choose to wait for one time unit. After the new collision is detected both A and B knows that 3 consecutive collisions happened. Now, stations can choose among 0, 1, …, 23-1 = 7 time units, in this case the probability that both stations choose to transmit in the same time unit is 0.125. To have a new collision would really mean bad luck!

The CSMA/CD protocol was a great success and it is still the most commonly used protocol for enterprise and public institute LANs. However, the probabilistic element used in the protocol does not allow having guarantees on the maximum waiting time for a station. A station could potentially wait for an arbitrary long time. For some applications this is an important issue. Other approaches to Media Access Control The 802.4 standard provide a solution to this. The idea is to create a logic ring between stations, and to allow only one station to transmit at a time. This is done by using transmission turns. The possibility to transmit is represented by a token. A token is a specific message, which is passed among the stations, following the order imposed by the logic ring. Only the station currently holding the token is allowed to transmit. After a given amount of time or after the data transmission is terminated, the station passes the token on to the following station on the logic ring. In this way each station will wait a fixed maximum amount of time, which is dependent on the number of stations and on the transmission turn length. The ring positioning of the stations guarantees a fixed maximum waiting time for the stations, but it is difficult to realise in practise. However, the ring positioning is only a logic order among the stations. The ring defines a successor and a predecessor for each station, but it is not required for the station to be physically positioned following the ring order.

Up to now, we have seen how different LAN types can be designed and realised. When we need to connect a large number of stations geographically distributed across a wide area, using a single LAN is not practical for several reasons. The media access protocol has been designed to manage limited number of stations. For example, using the CSMA/CD protocol for a large number of stations that share the same transmission media we could have so many collisions that the information transfer might be impossible or not effective. At the same time the use of a token-based protocol would be not practical, because the waiting time in the worst case might be huge. Moreover, there are physical constraints such as the maximum cable length (hundreds of meters).

Interconnecting devices – Hubs and Bridges To connect a large number of stations the best way is to realise separate LANs and interconnect the different LANs among them. This is the approach used in the Internet.

To interconnect different LANs we need dedicated devices to manage the information flow: 1 Hubs; 2 Bridges; 3 Routers; 4 Switches.

The simplest way to connect different LANs is to use a Hub. A Hub has several connectors. Each connector can be linked to a network cable. The connectors are usually called network interfaces. The Hub replicates the signals received on one network interface to all the others. Hubs extend the maximum distance between two stations. For example using 10BaseT cables a Hub positioned 100 meters away from a station it allows two stations to be 200 meters far away from each other. The main problem related to the use of Hubs, is that Hubs only replicate the signals among interfaces, therefore each Hub increases the number of stations that can collide (collision domain). Moreover, since Hubs only repeat the signal, all network interfaces should use the same technology, i.e. a Hub cannot connect a LAN using 10Base5 cables with another LAN using 10Base2 cables.


Two LANs connected using a Hub. The Hubs can be connected among them as shown in the figure, creating a hierarchical structure. The Hubs connect two LANs, the collision domain increases.

Hubs do not provide good solutions for collisions among stations. The Bridge is a more sophisticated device and avoids the increase of collision domains. As the Hub, the Bridge is composed of several interfaces, but the Bridge is able to filter information coming from each interface and to direct them to the correct interfaces. Thus the Bridge does not simply replicate signals but is able to interpret information and to decide where to direct them. The information relay is based on a table, which each Bridge has. The table associates MAC addresses of the stations connected to the Bridge, to interfaces to which they are connected. The Bridge extract the destinations MAC address, it looks up the table and relay the message to the proper interface. In this way, the Bridges separate the collision domains of the LANs that they are interconnecting. To keep into account changes in the network (e.g., station being added or removed) Bridges are able to build and maintain the MAC look-up table. Finally, Bridges can connect systems that use different transmission media, thus they can interconnect networks using different cable types. Interconnecting devices – Routers and Switches Routers have very similar functionalities to the Bridges. The Routers manage the information flow over the network filtering received messages and relaying them to the proper interfaces. The main difference among Routers and Bridges is that Bridges filter messages based on the receiver’s MAC address while Routers filter messages based on the receiver’s IP address. Routers can provide a more sophisticated filtering process than Bridges. For example, Routers can avoid possible cycles in the network topology. However, Routers are slower than Bridges in the message relaying procedure and they need an initial configuration of the IP addresses. Usually, for LAN with a limited number of stations Bridges are used, while for LAN with complex topologies and a higher number of stations Routers are preferred. Another important component frequently used to interconnect LANs is the switch. Switches are basically high performance Bridges. Similar to Bridges, Switches filters and relay messages based on the MAC addresses. Switches are also able to build and maintain look-up tables for MAC associating addresses and interfaces. Therefore, from a functional point of view Bridges and Switches are the same. However, from a practical perspective Switches are more sophisticated devices that can manage several network interfaces at the same time. The main difference is that Switches have for each interface a full-duplex access. Therefore, Switches can transmit and receive messages at the same time on any interface. This feature significantly increases the data transfer rate among stations connected to the network. Usually, Switches are used in networks with a star topology, connecting each station directly to one of the Switch interfaces. In this way each station has a full-duplex direct connection with every other station in the network. This kind of connection provides huge benefit in terms of data transfer rate, and it is actually the most commonly used solution for LAN with a limited number of stations. To connect LAN with a large number of station routers are preferred for the reasons stated above.

3.3 Communication ProtocolsEdit

Layered architectures In order to reduce the design complexity, networks are usually organized according to a layered (stratified) architecture. Each network layer (also defined level) uses the functionalities provided by immediately lower layer in order to implement the own functionalities. In turn, each layer offers services to the upper layer hiding their implementation details.


Mail service layering The figure shows the mail service layering. User A wants to send a letter to the user B. User A delivers the letter to its mail office. In turn this one physically delivers the letter to the destination mail office (from witch B depends) using the mail shipping service. Finally, B’s mail office delivers the letter to the addressee. From the logical point of view A sends the letter directly to B using the mail service and without knowing as the letter shipment has place physically. In turn, A mail office sends the letter to the B one using the mail shipping service and without knowing as the delivery has place physically (e.g. using railway, air transport or a combination of media)

Services that each layer provides to the upper one are specified by an interface. In particular, the interface between the layers n and n-1 defines both the services that the last one provides to the first one and the primitives (that are, generally speaking, the modalities) to access to these services. Let us note that the layering approach corresponds to a network functionalities subdivision into several groups, one for each layer. The simplified mail service that we have considered previously offers an example of tree levels layering. In this case, the message transmission interface (the place where A physically delivers its letter) is any post-box while the receiving interface (the place where B physically receives the letter sent by A) is the B letterbox. If we consider two computers A and B that communicate through a given network, the generic nth-layer of A communicates with the correspondent layer of B (if present). This communication takes place according to rules and conventions that altogether are defined as layer protocol or nth-level protocol. In effect, there is no direct physical data flow between the two correspondent layers of two remote machines. Rather, data from A to B together with control information across downward each layer of A until the physical layer is reached. Crossing this one, data physically reach B. Finally, they across upward each protocol layer of B until the destination layer is reached.


Five layers network architecture example The figure shows an example of two directly connected machines. The corresponding layers of each machine communicate using a shared protocol. About the information physical and logical path, at each level takes place a communication (and therefore an information exchange) that uses the corresponding protocol layer rules. In each connected systems, the actual information data flow is vertical until the physical media where the effective data and control information transferring takes place.

Message sent from a computer A to a computer B could be both processed and modified when it crosses layer A. In particular, the generic protocol layer n can add a header to the message coming from the upper layer in order to implement both the layer n functionalities and protocol. For this reason, this header only contains control information and it is not a part of the message.


Message transmission between two hosts The figure shows the message (M) transmission process from a computer A to a computer B. During the transmission process, each crossed layer can add a header to the message received by the upper layer. This header contains both information’s needed to implement the layer functionalities and control information’s. During the receiving process, each layer removes the corresponding header and it uses the related information both to perform its functions and to reach the protocol aims.

OSI reference model

The OSI reference model proposes seven layers architecture so that each layer runs well defined functionalities and these are different by the others layers ones. Each layer uses the services offered by lower layers in order to offer services, in turn, to the upper layers. Starting from the lowest layer and proceeding to the highest one, the layers are the following: physical, link or data-link, network, transport, session, presentation and application. To each layer it is also associated a level: 1 for the physical layer, 2 for the link one and so on until 7 for the application layer. The active entities in each layer communicate with the same layer entities of a remote system using the corresponding layer protocol.


The ISO OSI Model The figure shows the ISO OSI reference architecture. It highlights the layers partitioning. Let us note that the paired entities communicate among them using the corresponding layer protocol

Data transmission from source process A to destination process B takes place as showed by figure below. A passes sending data to the application layer specifying the destination process B. Application layer adds its header to this data and passes the obtained message to the presentation layer. This process continues similarly crossing the different layers until the physical layer is reached; here the effective data transmission takes place. Let us note that: • Every layer handles each message received by upper layer as a single data block to send to destination • Physical communication follows a different path compared to the logical one; each protocol layer exchanges messages with the corresponding layer on the remote system according to the layer protocol rules.


Data transmission in OSI model The figure shows the data physical transmission from source process A to the destination process B and the corresponding logical communication between each layers (dotted rows). They are highlighted also the messages logically exchanged in each layer. Each message contains a header and a data part (payload). Each header’s name is indicated as XH, where X is the English initial of the corresponding layer and H is the initial of “header”. For example, LH is the header of data link layer. Let us note that: i) each layer handles messages received by upper layer as data to send to destination; ii) each layer can generally add a header to the received data; this header contains information needed by protocol layer operations; iii) from the logical point of view, each layer sends and receives data to / by the corresponding layer of remote system using the services offered by lower layer. For example, when the application layer receives by A the data to send, it adds to them the own header (AH) that contains information needed by application layer operations. Afterward the application layer sends the so obtained message using the presentation layer services.

Base OSI terminology is the following: • Entity is an active element of one layer; entities examples are running browser (software entity) or switch device (hardware entity). • The entities of the same layer on different hosts are said pair entities. • Layer 7 entities are said application entities and so on until physical layer entities that are said physical entities. • Data block that a layer n entity sends to a pair entity is said n-SDU (layer n service data unit) • Message of layer n protocol that is exchanged by pair entities of this level is said n-PDU (layer n protocol data unit). One n-PDU contains layer n header and either one (n+1)-SDU or its fragment if layer n has fragmented the (n+1)-SDU.

Connectionless and connection oriented services Each layer can offer to the upper one two types of service: connection oriented or connectionless. • Connection oriented service follows the telephony service philosophy. The communication between two pair entities takes place into 3 distinct phases: connection establishment, data exchange and connection release. Once the connection is established it offers to the entities a logical channel through witch the data packets sent by source reach the destination in the same order that they have been sent. If the channel also assures both lossless and errorless data transfer, it is said reliable. • Connectionless service offers only an unreliable logical channel to transfer data. In particular, sent packets can reach the destination in different order compared with the sending sequence and they can be lost or wrong. The physical layer main task is to transport the source output (that is a binary flow) using an electromagnetic signal over a communication channel. An important facet refers to the data transferring modality; in fact, data can be headed: • to only one direction (simplex communication channel) • to both the directions but not simultaneously (half-duplex communication channel) • to both the directions simultaneously (full-duplex communication channel).

Role of data link layer is to add further functionalities to the simple bit transport service offered by physical layer so the communication channel provided to the network layer is able to transport the network layer messages over a channel without transmissions errors. In case of shared communication channel, data-link layer also provides mechanisms for mutual exclusion accessing. Network layer main task is to transport packets from source host to the destination one. For this purpose, it includes addressing mechanisms in order to identify the network computers univocally. It also includes routing mechanisms through network nodes, from source to destination. Furthermore, the network layer can offer mechanisms to control the network congestion level, to establish and close network connections and to bill the user’s traffic.

Transport, Session and Presentation layers Transport layer main purpose is to offer a logical communication channel between processes that run on different network nodes.

The main services that it offers are the following: • Mechanisms to identify the running processes on different network nodes • Mechanisms to fragment (at source) and to restore (at destination) messages received by session layer

Transport layer is said end-to-end (source-destination) that means that the transport entities involved by communication are always two: the first one on source node and the second one on destination node. The main difference with the network layer is that this one transports messages from source to destination host while transport layer delivers messages among processes.


Logical communication among processes through the transport layer The figure shows the processes communication using the transport layer services. An end-to-end logical channel between source and destination is made available to the upper layers. Let us note that the only involved transport entities are the end systems ones. The transport layer hides to the upper layers the presence of physical network between the machines that host the communication processes.

Session layer allows to users on different hosts to establish sessions between them. Session layer adds to the transport one the following functionalities: • Communication handling: session layer decides if traffic can proceed in both directions simultaneously and, if not, decides witch of the two parts can send data • Synchronization handling: session layer offers mechanism to resume sessions interrupted by unexpected reasons. Presentation layer (presentation) main task is the representation modality of the exchanged information. Complex data (e.g. real numbers) can be represented differently using different systems. A presentation layer task is to define universally information encoding standards that are independent by the particular considered system. On each end system, the presentation layer also provides to universal encoding conversion and vice versa. If present, others presentation layer functionalities are data ciphering and compression.

The application layer contains all the protocols that users normally use to exchange information. Some services offered by these protocols are: • Web access: as we will show later, web access uses some protocols and the most important is HTTP used to transfer HTML pages. • Electronic mail usage and handling; • Multimedia applications Internet protocol stack Referring to its public part, Internet is a worldwide computers network that interconnects millions of heterogeneous devices using different media transmission types that range from telephony twisted pair link to satellite one. Internet slang refers to these devices as host or end system . Internet uses a five levels protocol layering unlike ISO OSI model that has been proposed later; Internet has not OSI session and presentation layers and their functionalities are essentially distributed among transport and application layers. Furthermore, Internet is distinguished by specifics network and transport protocols usage: IP protocol at network level and TCP /UDP in alternative at transport level. Lower layers (physical and data link ones) can use different standards while for the application layer several protocols have been defined in order to realize a lot of functionalities: e.g. Web browsing, file transfer, e-mail, etc.


Internet protocol layering The figure shows the Internet layered architecture. Let us observe that both physical and link layers can use different protocols (e.g. IEEE 802.3 or ATM ). Network layer is distinguished by IP protocol usage while the transport layer is based on either TCP or UDP protocols; the first one offers a reliable connection oriented service while the second one an unreliable connectionless service.

Internet network layer takes care of message transfer from source node to the destination one. In particular, network layer of given host receives messages by transport layer of the same host and it takes care to deliver them to the destination host. Using Internet slang, the network layer messages are also known as packets. The IP protocol is the Internet network layer main component. It defines addressing conventions for network nodes so each of them has a unique address. It also defines both messages format and their semantic (this messages are also known as IP packets); furthermore, IP protocol defines mechanisms to handle and deliver messages. To such purpose, it is important to highlight that IP protocol offers a connectionless data transfer service and as such unreliable. Others network layer functionalities are: network path selection between source and destination and packets switching on each crossed network nodes. Routers usually provide these functionalities selecting an output line for packets that reach the router according to the address of the packet destination. To provide routing functionality, each router locally executes a routing algorithm. Internet transport layer Internet transport layer takes care of messages transfer among processes running on remote hosts. Let us note that using Internet slang, messages exchanged between transport layer pair entities are also known as segments.

Internet offers two distinct transport protocols: • TCP protocol (transmission control protocol) offers a reliable connection oriented service. That means that each message sent by the source process A to the destination process B will be delivered without errors to B. Furthermore, if A sends a messages sequence to B, these will be delivered in the same sending order • UDP protocol (user datagram protocol) offers a connectionless service that uses directly the service provided by IP protocol

Let us note that in the Internet architecture both the transport and application layers are only present on ending systems while they are usually absents on packets switching devices (routers); higher layer functionalities can be present inside routers but only for specifics questions (e.g. to run network supervision and control functions).


Main internet elements and its protocol layering The figure shows an Internet part and its main elements. In particular, they are two local area networks (A and B) both connected to the Internet residual part using a subnet of five routers. Network A has two workstations and an applications server while network B has two workstations and a mobile devices access point. Let’s observe the difference between ending systems (workstations, applications servers, mobile devices) that run user applications and the network elements that route the information through ending systems (e.g. routers). The last ones have the Internet protocol layering until network layer. Higher layer functionalities can be present but only for specifics questions (e.g. to run network supervision and control functions).

As we have showed previously, both session and presentation layers are absent in the Internet protocol layering. If there is the need, the application protocols can execute the typical functionalities of these layers; these protocols offer to the user several services. In the following, we remember: • HTTP (hypertext transfer protocol) is the protocol that regulates transferring among client and server of HTML pages and others related objects • FTP (file transfer protocol) offers a service to access to remote directories • SMTP (simple mail transfer protocol) offers a service to send e-mail messages to remote user mailbox. • Several protocols allows to user to access by remote to its mailbox. • Several protocols designed to multimedia applications. IP addresses The node addressing in the Internet are defined by the IP protocol and is based on the concept of network interface. A network interface is the connection point between the transmission media and a network node. For example, if a Router has three physical connections we will have three network interfaces. The IP protocol requires each interface to have a unique IP address. Each address is a binary string composed by 32. Usually, each IP address is represented in the dot-decimal notation (or dotted quad notation): each group of 8 consecutive binary digits is converted to the corresponding decimal number. For example the binary string 10000000111111110000000100000010 is represented as 128.255.1.2. Each IP address is divided in a network prefix of variable length and in a network suffix. The network prefix defines an IP subnet, while the suffix uniquely identifies the network interface within the subnet.

Example of IP addressing The figure shows two IP subnets connected through a Router. Notice that IP addresses are assigned to network interfaces and not to nodes. Each interface of the same Router has a different IP address. The figure shows two IP subnets: i) the first one has a network prefix 223.1.1.0/24 (24 bits); ii) the second has a network prefix 223.1.2.0/24 (also in his case 24 bits). Notice that the first subnet is composed by 4 interfaces (including the interface 223.1.1.4 which belongs to the Router), while the second subnet has three interfaces. Finally notice that interfaces belonging to the same IP subnet are directly connected though the transmission media, i.e. among them there are no intermediate Routers.

Since the prefix can have a variable length, we need to specify the number of bits that compose the prefix. To this end a specific notation is used. For example, if the interface 223.1.1.2 belongs to the subnet 223.1.1 with 24 bit prefix, we write 223.1.1.0/24. In practice, when configuring an IP subnet the length of the subnet prefix is specified using a net mask. The net mask is a binary string composed by 32 bits. When a logic bitwise AND operator is aaplied to the net mask and to the IP address the result will be subnet address, fixing to zero all the bits that belong to the suffix. For the above example (24 bit prefix) the net mask would be 11111111111111111111111100000000,e.g., 255.255.255.0 in the dot-decimal notation.

An IP network is composed by all the network interfaces having the same prefix, and by all the physical links among them. Different IP networks are connected through Routers. In the figure we show three networks. For all of them, the IP address is specified by the most significant 24 bits of the address. In the figure the networks are 223.1.1/24, 223.1.2/24 and 223.1.5/24. The first network is composed by four interfaces (one interface for each computer and on interface for the router); the third is composed by two interfaces.


IP subnets The figure shows an example with three IP subnets connected through a Router. All the interfaces belonging to the same subnet have the same network prefix. Notice that a subnet can be composed by only two interfaces. For example such a subnet is the one composed by the interfaces 223.1.5.6 and la 223.1.5.7 TCP protocol: overview Transport layer main task is to provide a logical communication channel between two remote processes. As an example, a Web server process sends back the Web page to the client that has requested it using the logical channel provided by transport layer. Starting from this base requirement, services provided by transport layer can be considerably different. In Internet, it is possible to distinguish two service modalities: • Connection oriented service: this service assures both lossless and ordered packets delivery from the source process to the destination one. It requires that source and destination processes explicitly set up and release the connection. It also offers additional services like flow control and congestion control; the first one assures that a fast sender does not overflow a slower receiver while the second one provides distributed mechanisms to limit the network congestion. In Internet, the connection-oriented service is offered by TCP protocol (Transmission Control Protocol). • Datagram service: this service offers a mechanism to transfer packets between the source process and the destination one without any assurance about packets loss and their delivery sequence. UDP (User Datagram Protocol) is the Internet protocol that implements this service modality. The Internet transport layer main function is to identify the remote hosts’ processes. Each process is univocally identified using both the IP address of the host that runs the process and an integer between 0 and 65535 also known as port number; this number univocally identifies the process within the host where it is running. Let us note that each Internet process is univocally identified by the pair (<IP address>, <port number>) and no one of them, considered singularly, it is sufficient. Some port numbers are reserved. In particular the first 1024 port numbers, from 0 to 1023 (well known ports), are reserved to public utility service. Examples of these ones are: e-mail services or page transfer service between client and Web server provided by HTTP (that uses the port 80).


Internet processes identification The figure shows an example of browser (e.g. Mozilla Firefox or Internet Explorer) and Web server process running on different hosts. So that the two processes can communicate (e.g. to transfer a Web page from server to client) it is needed that each of them is univocally identified on Internet. This is possible as i) each internet host (more precisely each network interface as we have showed previously) has a unique IP address and ii) the transport layer assures that for each process is assigned a unique port number within the host that runs the process. The figure example refers to a Web server process that uses the port number 80 as established by HTTP protocol. Web servers on different hosts are distinguished by IP addresses of the hosts where they are running.


Processes identification The figure shows two processes P1 e P2 that send two messages M1 and M2 to as many remote processes P3 and P4. P1 is a process (e.g. Mozilla Firefox or Internet Explorer) running on host A with IP address 223.21.3.23 that sends a HTTP message to request a Web page owned by remote host C with IP address 153.1.3.1. Request is sent by Web server process P3, identified by the number port 80 (reserved to HTTP protocol). P2 is an e-mail agent (e.g. Microsoft Outlook) running on host B with IP address 163.19.21.3. It sends an e-mail message (M2) to the user mail server so that this one can send it to destination. The e-mail server is the process P4 and it is running on host C. In order to distinguish P3 e P4, both running on host C, obviously only the destination IP address is not sufficient. Instead, it is possible to distinguish them using the port numbers: in particular 80 for the Web server and 25 for the mail server

TCP protocol: service model TCP (Transfer Control Protocol) is a point-to-point protocol: it offers to each process a logical channel in order to transfer packets to and from another remote process. It also provides additional services: • Reliable transport: TCP assures that each packet sent by process A to the remote process B reaches the destination (no packets loss); furthermore, it assures that the delivering packets sequence is the same of the sending one • Flow control: this feature is designed to avoid that a process that sends data quickly does not overflow the destination process that is able to process them only with lower speed. • Congestion control: this feature comes carried out in distributed mode by all the TCP network entities and it contributes to limit the router congestion.

TCP does not assure others services: as examples, the minimum assured bandwidth conditions for the various applications or the bounded maximum packet delivery delay. In turn, the TCP protocol uses services provided by IP protocol. TCP protocol is based on the connection concept that refers to the logical channel provided to the applications. The communications processes pairs (<IP address>, <port number>) univocally identifies the connection between remote processes. Each message that a process P1 sends to the remote process P2 is sent to destination as data part of one or more TCP protocol’s data units (PDU ) also known as segments. Each TCP message has a header that contains, as well as other information’s, the port numbers of source and destination process. This header is followed by the message data part that contains the message (or a part of it).

TCP connection The figure shows the connection concept. The big arrow represents the connection between the two remote processes P1 e P2. It is univocally identified using the pairs (153.1.3.1, 3225) and (163.19.21.3, 4421). The first one univocally identifies the process P1, the second one the process P2. In this mode, the connection between the two processes is univocally identified as: i) two different hosts (or with more precision two network interfaces) have different IP addresses ii) two processes that run on the same host have two different port numbers. Referring to the example, P1 sends the message M (e.g. a Web page) to P2 using the connection. M is transferred as data part of one TCP segment that is also showed in the figure. The figure highlights the message header part that contains both the source (P1) and destination (P2) process port numbers

TCP requires that connection be explicitly established between two processes on demand by one of them. If the process P1 must send a message M (e.g. a Web page) to the remote process P2, the communication will proceed according to the three following distinct phases: • P1 opens a connection to P2. From the logical point of view, this means that P1 has a reliable channel to reach P2 and using it all messages sent by P1 will reach P2 according to the sending sequence. • P1 sends one or more messages to P2 (depending on the application) using the channel provided by the transport layer • P1 (or P2) terminates the connection.

TCP protocol: segmentation, sequence numbers and acknowledgments TCP provides to the applications a reliable communication channel between remote processes that assures packets delivery without losses and out of sequence. This type of interaction corresponds to the so-called client-server paradigm: the client is the process that starts the communication while the server is the process that answers to the request. TCP’s layer on each host generally has a maximum admissible size for the data part of the TCP segments that can be sent. This value cannot exceed in any case 65536 byte , but it can be different on different hosts depending on several factors, first of all the host operating system. This value is said Maximum Segment Size or simply MSS and it refers to the maximum size (in byte) of the segment data part that the transport layer of one given host can send. When host needs to send a message whose size exceeds the MSS the message is segmented into several smaller parts whose size is 1 MSS (eventually with the exception of the last one). Each of them will be the data part of as many TCP segments that will be sent to destination sequentially. Since the message will reach the destination fragmented into several segments, TCP protocol uses opportune sequence numbers associated to the single segments that allow fragment identification using its position into the original message.


Messages transfer and segmentation The figure shows a Web page transfer case. The page has been requested previously by the browser on host A to the Web server on host B. The page size is 1400 byte while B’s MSS is only 500 byte. Therefore, the TCP entity on host B segments the message (the Web page requested by browser) into three parts and it encapsulates them as data in as many TCP segments that they will sent back sequentially to the browser that has requested the page. Let us observe that each TCP segment contains both the header (dark part) and the data part (that is clearer in the figure). Moreover, let us observe that the first two segments data part is 1 MSS (that is 500 byte) while the last segment data part transports the Web page residual part (that is 400 byte). On receiver side, the TCP entity of host A will reassemble the original page starting from the received segments and using their sequence numbers to reconstruct it. Finally, the so reconstructed page will be delivered to the browser that had requested it.

TCP enriches the unreliable transfer service offered by the below network layer. In particular: • Lossless delivery: TCP assures that each sent packet reach the destination correctly offering in this mode to the processes that use it a channel that appears as lossless. • Ordered delivery: TCP assures that packets sent by process A to the remote process B reach the last one in the same order that they have been sent by A. These services are assured using: • Sequence numbers: each segment that is sent by TCP entity A to the entity B has an associated integer that refers to the segment sending order. This information allows identifying both the lost packets and their out of sequence delivery. • Acknowledgment and retransmission: TCP uses explicit acknowledgment mechanisms of received packets. Together with sequence numbers, they allow packets losses identification and they’re out of sequence delivery.

TCP congestion control and UDP protocol The network congestion refers to the packets accumulation inside the routers output queues waiting for transmission. This phenomenon obviously generates a delay about packet delivery to destination. It happens each time that the packets arrival rate of one given router exceeds its processing and transmission capabilities. The congestion effects are multiple: • Queue waiting delay: this increases the packet delivery time to destination. • Packets loss: due to limited size of routers queues, the exceeding packets will be lost.

Network congestion and packets loss The figure shows a network congestion condition and the corresponding packets loss on router. In order to simplify, the figure shows only the router R output queue towards B, while the other ones are not showed. Furthermore, we will assume that both each packet has the same size and the queue is able to host up to two packets at the same time (in practice the output queues are able to host simultaneously a higher number of packets). All the packets are bounded for B and they are represented using rectangles with different colors depending on packet source. In the example A has sent three packets to B (they are showed using light green). When the second of them reach the router output queue towards B the queue is full. Therefore, the packet P is discarded. In case it contained a TCP segment or part of it, the entire segment will be retransmitted. Let us observe that also the packets queued will suffer a delay. In particular, the blue packet will have to wait the black one transmission before to leave the queue while the green packet will have to wait both the black and blue packets transmissions TCP uses a distributed congestion control mechanism that is executed by hosts. These ones can change the TCP segments emission rate during the time depending on the network congestion status. In particular, the transmission rate decreases when the congestion increases and vice versa according to a quite complex algorithm. In order to work this mechanism requires that each TCP entity is able to estimate independently the network congestion status. To such purpose, the TCP protocol considers the packets loss as a symptom of network congestion in some network routers. The UDP protocol (User Datagram Protocol) offers a datagram service that is a connectionless service. As the TCP protocol previously described, UDP offers mechanisms that allow to an application to send and receive packets from and to another application running on remote host. In particular, the protocol univocally identifies each process running on one given host using the pair (<IP address>, <port number>) according to the previous description. However, the UDP protocol does not offer any assurance about the sent packets delivery. In particular, packets can be lost or it can reach the destination with different sequence order compared with the sending one; in both cases, none of these events will be notified to the application that has sent the packets. The difference with TCP protocol is that UDP does not execute any congestion control: each UDP entity transmits at the maximum possible rate. Thanks to this feature UDP is the reference protocol for the greater part of multimedia applications that they are generally tolerant about low packets loss but more sensible referring to both bandwidth availability and transfer delay.

Service offered by UDP protocol The figure shows the main features provided by UDP service. In this example the process P1, univocally identified by IP address and port number, sends three messages (M1, M2 e M3) to the process P2, using the UDP protocol. Messages M1 and M2 reach P2 following different paths (that is possible as the below Internet network layer does not offer any assurance about this) and therefore they can arrive to destination according to a different order compared with the sending one. Unlike TCP protocol, UDP does not include any mechanism to reorder packets on receiver side. Moreover, in the example the packet M3 is lost (e.g., a router queue is full). Also in this case UDP does not take any actions. In particular, P1 sends its messages without any assurance about transmission result and, most importantly, without any notifications by UDP.


7. Links to additional materials: • [AT03] Tanenbaum, A. W. S. Computer networks, 4th Edition, Prentice Hall, 892 pages, 2003 • [JK07] Kurose, J. F. and Ross, K. W. Computer Networking: A Top-Down Approach, 4th Edition, Addison-Wesley, 2007 • [AR95] Roveri A., Reti di Telecomunicazioni - principi generali. Scuola Superiore G. Reiss Romoli, L'Aquila, 1995

8. Test questions: Question 1. Let us consider a packet switched network based on datagram. A. Each packet is routed independently B. Packets delivered to the network always reach their destination C. Transmission error handling is always executed by network D. Packets sent by the same source to the same destination are always routed on the same path

Question 2. Internet network: A. It is a packed switched network B. It is a circuit switched network C. It is a datagram network that offers a reliable packet transfer service D. It is a datagram network that does not offer a reliable packet transfer service but it offers at least assurance about the global packet delivery delay

Question 3. Which of the following statements regarding MAC addresses is true? A. MAC address is a unique identifier for a network card. B. Two different network cards cannot have the same MAC address. Each MAC address is composed of 4 bytes. C. The MAC address depends on the LAN to which the network card is connected. D. The MAC address is assigned to an end system dynamically from the ISP.

Question 4. Does the CSMA/CD always avoid collisions among the stations? A. No, the CSMA/CD detects collisions and solves them. B. Yes, because each station transmits only if the transmission media is free. C. Yes because the central unit manages the information flow. D. Yes because the signal propagation over the transmission media can be considered instantaneous.

Question 5. Which of the following statements is true? A. The network layer main task is to transport the packets from the source host to the destination one B. The network layer main task is to offer a service to establish and close network connection C. The network layer only defines the addressing mechanisms to univocally identify the hosts connected to the network D. The network layer takes care of the users messages transport from source to destination

Question 6. Which of the following statements is true? A. The IP protocol offers an unreliable connectionless service B. The IP protocol offers a connection oriented transfer service C. The IP protocol offers a network service that is not connection oriented but it is reliable D. The IP protocol only defines the addressing conventions used by network nodes Question 7. The network interfaces in an IP subnet: A. have all same network prefix B. have all the same IP address. C. have all the same IP address but different network prefix D. have all the same network prefix only if they belong to the same node

Question 8. An IP subnet: A. is composed by the set of the network interfaces that have the same network prefix and by all the physical links among them. B. is composed by the set of computational units that belong to the network C. Is a set of Routers connected among them. D. is a set of computational units having the same IP address.

Question 9. TCP protocol: A. does not assure a minimum bandwidth to the applications B. does not provide assurance about packets loss C. does not assure the ordered packets delivery from source to destination D. does not offer congestion control mechanism

Question 10. UDP protocol: A. offers mechanisms that allow to an application to send and receive packets to and from another application running on a remote host B. offers mechanisms to deliver ordered packets C. offers mechanisms to control the network congestion D. offers mechanisms to recover lost packets

6.1 Answers (correct and false)

Question 1 answer: A. True: In this type of network does not exist the connection concept and the routing function is dynamic B. False! Datagram based network offers an unreliable service C. False! Network service user handles transmission errors, sequence control, packets losses and duplications D. False! Routing function is dynamic and it is applied on each packet

Question 2 answers: A. True: it is a packet switched network based on datagram B. False! Internet is a packet switched network based on datagram C. False! Internet offers an unreliable packet transfer service D. False! Internet does not offer any assurance about the global packet delivery delay

Question 3 answers: A. True: MAC address is a unique identifier for a network card. B. False: each MAC address is composed by 6 bytes. C. False: the MAC address depends only on the network card. D. False: the MAC address is assigned to the network card only once by the network card producer when the network card is è assembled

Question 4 answers: A. True: the CSMA/CD detects collisions and solves them. B. False: even if this is true collision can still happen due to delay of the signal propagation. C. False: the CSAM/CD protocol does not use any central unit. D. False: such assumption is not realistic and the main reason why collisions happen is due to the signal propagation delay.

Question 5 answers: A. True B. False. Transport layer executes this functionality C. This layer also offers others functionalities as for example the packets routing D. False. Transport layer executes this functionality


Question 6 answers: A. True B. False. The IP protocol offers a service that it is not connection oriented C. False. The IP protocol offers a an unreliable service D. False. It also defines both the messages format and their semantic about the exchanged packets among network entities

Question 7 answers: A. True: they all have all same network prefix. B. False: the IP address for an interface is unique. C. False: the opposite is true D. False: have the same network prefix if they belong to the same IP subnet Question 8 answers: A. True: an IP subnet is composed by the set of the network interfaces that have the same network prefix and by all the physical links among them B. False: it is composed by the network interfaces having the same network prefix and by all the physical links among them C. False: a set of connected Routers can corresponds to more than one subnet D. False: two network interfaces must have different IP address Question 9 answers: A. True B. False. TCP assures that no packets can be lost C. False. TCP assures the ordered packets delivery to destination D. False. TCP offers a distributed mechanism to control the network congestion

Question 10 answers: A. True B. False. TCP protocol provides this service C. False. TCP protocol provides this service D. False. TCP protocol provides this service

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.