2
E2-223 Communication Protocols What is Network Reference Model? ● A network is a group of computers, printers and other devices that are connected together either with a cable or wireless media. ● The network users share hardware or software over the network. ● A network reference model clearly defines the functions of communication softwares in a generalized and structured manner which helps to carry out the network product development activities.

5
E2-223 Communication Protocols ● Collection of protocols ● network reference model. ● An entity could be a software (or a process) or hardware (circuit/chip) entity. ● The entities in the same layer on different machines are called as peer entities. ● succession of logically distinct entities ● 'n'th entity provides services to 'n+1'th entity and gets service from 'n-1'th entity. Features of Layered Architecture

7
E2-223 Communication Protocols Advantages of the Layered Model: ● Explicit structure allows identification of the relationship among a complex system's pieces. ● Modularization eases maintenance and updating of the system. ● Change of implementation of a layer's service transparent to rest of system. ● Without layering, each new application has to be re- implemented for every network technology.

8
E2-223 Communication Protocols Network Services & Interfaces Service: A set of service primitives (operations) that a layer provides to the layer above it. A service relates to an interface between two layers, with the lower layer being the service provider and the upper layer being the service user. Interface: a point at which the services are accessible to the layers. The services are available through the Service Access Points (SAPs). The layer 'n' SAPs are the places where layer 'n+1' can access the services offered. Each SAP has an address that uniquely identifies it. Fig. 2.3 Layer interface and the control units

9
E2-223 Communication Protocols Protocol Functions ● Protocol: – a set of rules governing the format and meaning of frames, packets, or messages that are exchanged by the peer entities within a layer. ● Functions of a Protocol: – Encapsulation, segmentation and reassembly of messages – Connection control – Ordered delivery – Error control, Flow control & Multiplexing – Addressing

10
E2-223 Communication Protocols Encapsulation, Segmentation and Reassembly of messages ● Encapsulation – is the technique used by layered protocols in which a layer accepts a message from a layer above it and places it in the data portion of the lower level layers message unit. – As data moves down the layers, additional information will be appended to it, and it may be segmented into smaller pieces. ● Segmentation: – Multiplexing and error control require messages to be of a maximum length, and application messages must be divided into segments that match the transmission criteria. ● Application messages that are divided must be reassembled before being presented to destination application.

14
E2-223 Communication Protocols ● The upper layers (5-7) of the OSI model deal with application issues and generally are implemented only in software. ● The highest layer, the application layer, is closest to the end-user. ● Both users and application layer processes interact with software applications that contain a communications component. ● The lower layers (1-4) of the OSI model handle data transport issues. ● The physical layer and the data link layer are implemented in hardware and software. ● The lowest layer, the physical layer, is closest to the physical network medium (for example, network cabling) and is responsible for actually placing information on the medium. OSI Model Overview

15
E2-223 Communication Protocols Data transfer across the OSI layers Where a message 'x' is transmitted from host A to host B. At each layer, a header (AH- Application Header, PH-Presentation Header, SH-Session Header, TH-Transport Header, NH-Network Header, DH-Data link Header) is attached to the message. A header and trailer is attached at data link layer. The trailer includes checksum bits for error detection at link level.

16
E2-223 Communication Protocols Physical Layer ● Provides direct mechanical and electrical connections between the computer system and the network nodes. ● The physical layer has set of interfacing rules to communicate with devices like modems, the broadband, carrier-band or other modulation techniques that puts signals on the network. ● Physical layer specifications defines characteristics such as voltage levels, timing of voltage changes, physical data rates, maximum transmission distances, and physical connectors.

17
E2-223 Communication Protocols Data link layer ● establishes and maintains a communication path between nodes of the network. ● responsible for transferring frames from one computer to another, without errors. ● establishes connections upon request by the network layer and disconnects them after the completion of the transmission. ● perform flow control, which moderates the transmission of data so that the receiving device is not overwhelmed with more traffic than it can handle at one time. ● Data link layer is divided into two sub-layers: – Logical Link Control (LLC): manages communications between the devices over a single link of a network, and supports both connection-less and connection-oriented services used by upper layer protocols. – Media Access Control (MAC): manages protocol access to the physical network medium. The MAC defines MAC addresses, which enable multiple devices to uniquely identify one another at the data link layer.

18
E2-223 Communication Protocols Network Layer & Transport Layer ● NETWORK LAYER: ● Concerned with routing of data from one network node to another. ● defines network layer implementations, network addresses in a way that route selection can be determined systematically by comparing the source network address with the destination network address and applying the subnet mask. ● It also has the responsibility of interconnecting two or more similar/dissimilar networks. ● TRANSPORT LAYER: ● accepts the data from session layer and segments the data for transport across the network. ● responsible for making sure that the data is delivered error-free and in the proper sequence. ● decides to multiplex transport connections either upwards (from a single network connection to several transport connections) or downwards (splitting a single transport connection among many network connections).

19
E2-223 Communication Protocols Session layer & Presentation Layer ● SESSION LAYER: ● establishes, manages, and terminates communication sessions. ● Communication sessions consist of service requests and service responses that occur between applications located in different network devices. ● It determines which of the three modes of interaction the communication may take: simplex, half-duplex, or full-duplex. ● It synchronizes and checks the points to keep the two end devices in step with each other. ● PRESENTATION LAYER: ● Provides a variety of coding and conversion functions that are applied to application layer data. ● These functions ensure that information sent from the application layer of one system would be readable by the application layer of another system. ● Some data coding and conversion schemes used in presentation layer include common data representation formats, conversion of character representation formats, common data compression schemes, and common data encryption schemes.

20
E2-223 Communication Protocols Application layer ● The application layer is the OSI layer closest to the end user, which means that OSI application layer interacts with the user through the user interface programs. ● Its primary function is to provide the mechanisms and interfaces that enable an end user to communicate within the network environment. ● Functions may include logging in, checking password, file request, file transfer, etc.

23
E2-223 Communication Protocols MAC Protocols ● used for sharing a single broadcast channel among several users by avoiding conflicts between the sending hosts. ● three types of MAC protocols: – Channel partitioning: divides the channel into smaller pieces (in terms of either time slots or frequency) and allocates a piece to a node for exclusive use. ● eg. TDMA, FDMA and CDMA. ● TDMA (Time Division Multiple Access): – access to a channel by the hosts is in rounds, – i.e., each station gets a fixed length slot (length = packet transmission time) in each round. – The unused slots by nodes go idle and hence bandwidth is wasted. ● FDMA (Frequency Division Multiple Access): – channel spectrum is divided into frequency bands where each host is assigned a xed frequency band. – The unused transmission time in frequency bands go idle and hence bandwidth is wasted.

24
E2-223 Communication Protocols MAC Protocols ● CDMA (Code Division Multiple Access): – a unique code is assigned to each host in a network. – used in wireless broadcast channels (cellular, satellite, etc.) where all hosts share same frequency, but each host has its own chipping sequence (i.e., code) to encode the data. – The encoded signal is given as product of original data and chipping sequence. – The decoding inner-product of encoded signal and chipping sequence allows multiple hosts to coexist and transmit simultaneously with minimal interference (if codes are orthogonal). – Random Access protocols: allows collisions between the nodes, and uses some mechanisms to recover from collisions ● eg. pure Aloha, slotted Aloha, CSMA/CD, etc. ● pure Aloha: – the nodes can start transmission as and when the frames are ready. If transmission is not successful, a node retransmits the frame. – This protocol has higher collision probability.

25
E2-223 Communication Protocols MAC Protocols ● Slotted Aloha: – considers all frames of same size since it divides time into equal sized slots which is given as the time to transmit one frame. – The nodes start transmitting frames only at beginning of a slot (nodes are synchronized). – In case if two or more nodes transmit in a slot, all nodes will detect the collision and try retransmitting in each subsequent slot with probability 'p' until success.

27
E2-223 Communication Protocols MAC Protocols – Taking Turn protocols: share the channel either by polling or token passing methods. ● Polling: – a master node invites the slave nodes to transmit in turn. – Issues: polling overhead, latency, and single point of failure (master). ● Token Passing method: – a control token is passed from one node to next sequentially where presence of token indicates transmit permission. – issues: token overhead, latency, and single point of failure (token).

28
E2-223 Communication Protocols LLC Protocols Logical link control (LLC): ● used for storing the data in the buffers until media is accessed and data sent is acknowledged. a. Simple stop-wait protocol: assumes an error free channel with finite buffer capacity processing speed at the nodes prevents a sender from flooding the receiver. Senders send one frame at a time and then waits for ACK (acknowledgment) before proceeding to transfer next data. b. Stop-wait protocol with timers and ARQ (Automatic Repeat request): used in case of error prone channels Sender could send a frame and timeout, and send a frame again if it does not receive ACK from the receiver. Cont.

29
E2-223 Communication Protocols LLC Protocols Cont. c. Sliding window protocols: It considers two channels (forward and reverse) in which regular frames will be sent in forward channel and ACKs will be sent in the reverse channel. The protocol maintains a sender and receiver window. d. Go-back protocol: sender sends N frames and waits for an acknowledgment, if rth frame is in error, it starts sending from rth to Nth frame and early packets received after rth frame will be discarded

30
E2-223 Communication Protocols Standard Data link Protocols ● HDLC (High level Data Link Control): – packetization standard for serial links connecting the remote devices in the network with central computer either point-to-point or point-to-multipoint. – supports sliding window mode for reliable delivery mode of operation among others ● SLIP (Serial Line IP): – used to connect a computer to Internet over dial-up line using the modem. – does not support error checking, correction, detection and authentication. – It supports only IP networks and uses character stuffing for data framing. ● PPP (Point-to-Point Protocol): – It is approved and widely used protocol to connect home PCs to Internet over dial- up lines. – The protocol handles error detection. – It has two components: ● LCP (link control protocol): It is used for authentication, bringing up lines, negotiating and bring down lines when needed. ● NCP (network control protocol). This of handles negotiation with network layer and gets the IP address allocated at connection time. It supports multiple protocols.

31
E2-223 Communication Protocols Internet Protocol (IP) ● It is mainly concerned with addressing of network nodes, security, network quality of service, fragmentation of packets. ● An IP packet consists of sender and destination addresses to facilitate forwarding of packets. ● An IP address is 32 bits long, which is grouped eight bits at a time, separated by dots and represented in decimal format (dotted decimal notation).

35
E2-223 Communication Protocols Routing ● Internet has been divided into logical clusters called as Autonomous Systems (ASs). ● An AS consists of group of networks and routers. ● Three types of ASes: – Stub AS: Used for small corporation which has single connection to other ASes. – Multihomed AS: Used for large corporation (no transit) which has multiple connections to other ASes. – Transit AS: Used by service providers to hook many ASes together.

36
E2-223 Communication Protocols Internet Hierarchical Routing ● Intra-AS routing - Routing within the ASs ● Inter-AS routing - Routing between the ASs ● Internet routing protocols are classified into two types: – Intra-AS routing protocol: The routing protocol run by a router in an AS to find the routes within AS is called as intra-AS routing protocol – Inter-AS routing protocol: routing protocol used by the gateway routers to find the paths between the ASs is called inter-AS routing protocol. ● Gateway routers – of an AS are connected to routers of others ASs that run intra-AS routing protocol with all other routers in AS. – The gateway router also runs intra-AS routing protocol to find routes within the AS.

37
E2-223 Communication Protocols Intra-AS & Inter-AS Routing Three ASes, A, B, and C. AS A has four routers, A.a, A.b, A.c, and A.d, which run the intra-AS routing protocol used within autonomous system A, ASes B and C have three and two routers, respectively. The gateway routers are A.a, A.c, B.a, and C.b. In addition to running the intra-AS routing protocol in conjunction with other routers in their ASs, these four routers run an inter-AS routing protocol among themselves.

39
E2-223 Communication Protocols Example Routing Scenario... Host h1 attached to router A.d needs to route a packet to destination h2 in autonomous system B. The packet is first routed on the link connected to A.d to A.c using A's intra-AS routing protocol. Router A.c will receive the packet and see that it is destined to an autonomous system outside of A. A.c's routing table for the inter-AS protocol would indicate that a packet destined to autonomous system B should be routed along the A.c to B.a link. When the packet arrives at B.a, B.a's inter-AS routing sees that the packet is destined for autonomous system B. The packet is then "handed over" to the intra-AS routing protocol within B, which routes the packet to its final destination, h2. In Figure 2.18, the portion of the path routed using A's intra-AS protocol is shown on the lower plane with a dotted line, the portion using the inter-AS routing protocol is shown in the upper plane as a solid line, and the portion of the path routed using B's intra-AS protocol is shown on the lower plane with a dotted line.

41
E2-223 Communication Protocols Cont.. ● Multicast protocols: – IP Multicasting uses class D addresses. – Multicasting provides an efficient way of disseminating data from a sender to a group of receivers. – Data destined for the receivers in a multicast group is sent to a single multicast address.

42
E2-223 Communication Protocols Cont.. ● IGMP (Internet Group Management Protocol): – Used by IP hosts to report their host group memberships to any immediately-neighboring multicast routers. – IGMP is an asymmetric protocol ● BOOTP (Bootstrap Protocol): – allows a diskless client machine to discover its own IP address, the address of a server host, and the name of a file to be loaded into memory and executed. ● DHCP (Dynamic Host Configuration Protocol): – It is used to control vital networking parameters of hosts with the help of a server. – DHCP is backward compatible with Bootstrap protocol.

43
E2-223 Communication Protocols Mobile IP ● Designed to solve problem of mobility. ● Allows mobile node to use two IP addresses: – home address: is static and is used to identify TCP connections. – care-of address: changes at each new point of attachment and can be called as the mobile node's topologically significant addres ● Mobile IP is a way of performing three related functions: – Agent Discovery: Mobility agents advertise their availability on each link for which they provide service. – Registration: When the mobile node is away from home, it registers its care-of address with its home agent. – Tunneling: In order for datagrams to be delivered to the mobile node when it is away from home, the home agent has to tunnel the datagrams to the care-of address.

45
E2-223 Communication Protocols Protocols ● ICMP (Internet Control Message Protocol): – used for out-of-band messages related to network operation or mis- operation. – Some of ICMP's functions are to: ● Announce network errors. ● Assist Troubleshooting. ● CIDR (Classless Inter Domain Routing): – more efficient allocation of IP addresses – CIDR currently uses prefixes anywhere from 13 to 27 bits. – A CIDR address includes the 32-bit IP address and information on how many bits are used for the network prefix. ● 206.13.01.48/25: the "/25" indicates the first 25 bits are used to identify the unique network and the remaining bits identify the specific host. – Used to overcome two problems: ● Running short of IP addresses. ● Running out of capacity in the global routing tables.

50
E2-223 Communication Protocols TCP Cont... a) Establishment of a connection oriented session using 3 way handshake mechanism. b) The disconnection takes place using three service primitives disc_request, disc_response and disc_confirm after the transfer is over

54
E2-223 Communication Protocols TCP Cont... ● RTT Estimation Algorithms: – Karn Algorithm: ● measures RTT for only those packets that are not retransmitted. ● When an acknowledgment arrives for a datagram that has been sent more than once, any RTT measurement based on this datagram is ignored. ● The algorithm uses more aggressive RTO (re- transmission timeout) backoff to enable the collection of accurate RTT measurements uncontaminated by retransmission ambiguity. ● The backed-off RTO for the retransmitted datagram is kept for the next datagram. ● The RTO is recalculated only when an acknowledgment arrives for a datagram that has not been retransmitted.

56
E2-223 Communication Protocols Transport Protocols ● RTP (Real Time Protocol) – supports multimedia data transfer over Internet – uses UDP as a transport mechanism – services include payload type identification (type of coding used), sequence num- bering, timestamping (generation time of packet) and delivery monitoring. – supports data transfer to multiple destinations using multicast distribution. – packet sequence numbers included in RTP allow the receiver to reconstruct the sender's packet sequence, but sequence numbers might also be used to determine the proper location of a packet, (for example in video decoding packet need not be in sequence.) – It uses RTP control protocol (RTCP), to monitor the quality of service and to convey information about the participants in an on-going session.

58
E2-223 Communication Protocols Application Protocols ● FTP (File Transfer Protocol): – used to make reliable file transfers between the machines connected across the network by using TCP as a transport protocol. ● TFTP (Trivial File Transfer Protocol): – used to perform unreliable file transfers between two machines connected across the network by using UDP as a transport protocol. Cont..

59
E2-223 Communication Protocols Application Protocols E-mail: ● Facilitates people to communicate with each other through the network. ● Three major components of E- mail are: ● User agents: for composing, editing, and reading mail messages. ● Mail servers: to store outgoing, and incoming messages ● Simple mail transfer protocol (SMTP): a protocol between mail servers to exchange email messages, client is a sending mail server and server is the receiving mail server

60
E2-223 Communication Protocols Application Protocols ● Telnet: – used in emulating the terminal. – facilitates a user to login to a remote machine connected across the network and emulate the remote terminal at the user machine. ● POP (Post Office Protocol): – used to fetch e-mails from the remote mailbox and store it on the user's local machine to be read later. ● IMAP (Interactive Mail Access Protocol): – A more sophisticated mail delivery protocol. – It is designed to help the user who uses multiple computers, perhaps, a workstation in office, a PC at home, and a laptop on the road. – maintains a central repository that can be accessed from any machine. Cont..