Important Announcement
PubHTML5 Scheduled Server Maintenance on (GMT) Sunday, June 26th, 2:00 am - 8:00 am.
PubHTML5 site will be inoperative during the times indicated!

Home Explore BCA_Sem IV_Computer Networks_Second Draft

BCA_Sem IV_Computer Networks_Second Draft

Published by Teamlease Edtech Ltd (Amita Chitroda), 2021-09-09 06:20:21

Description: BCA_Sem IV_Computer Networks_Second Draft

Search

Read the Text Version

Figure 10.15: Source-to-destination delivery As the figure shows, now we need a source-to-destination delivery. The network layerat A sends the packet to the network layer at B. When the packet arrives at router B, therouter makes a decision based on the final destination (F) of the packet. As we will seein later chapters, router B uses its routing table to find that the next hop is router E. Thenetwork layer at B, therefore, sends the packet to the network layer at E. The networklayer at E, in tum, sends the packet to the network layer at F. Transport Layer The transport layer is responsible for process-to-process delivery of the entire message.A process is an application program running on a host. Whereas the network layeroversees source-to-destination delivery of individual packets, it does not recognizeany relationship between those packets. It treats each one independently, as thougheach piece belonged to a separate message, whether or not it does. The transport layer,on the other hand, ensures that the whole message arrives intact and in order, overseeingboth error control and flow control at the source-to-destination level. Figure 10.16 showsthe relationship of the transport layer to the network and session layers. 151 CU IDOL SELF LEARNING MATERIAL (SLM)

Figure 10.16: Transport layer Other responsibilities of the transport layer include the following.  Service-point addressing. Computers often run several programs at the sametime. For this reason, source-to-destination delivery means delivery not only fromone computer to the next but also from a specific process (running program) onone computer to a specific process (running program) on the other. The transportlayer header must therefore include a type of address called a service-pointaddress (or port address). The network layer gets each packet to the correctcomputer; the transport layer gets the entire message to the correct process onthat computer.  Segmentation and reassembly. A message is divided into transmittable segments,with each segment containing a sequence number. These numbers enable the transportlayer to reassemble the message correctly upon arriving at the destination andto identify and replace packets that were lost in transmission.  Connection control. The transport layer can be either connectionless orconnectionoriented.  A connectionless transport layer treats each segment as an independentpacket and delivers it to the transport layer at the destination machine. A connectionorientedtransport layer makes a connection with the transport layer at the destinationmachine first before delivering the packets. After all the data are transferred,the connection is terminated.  Flow control. Like the data link layer, the transport layer is responsible for flowcontrol. However, flow control at this layer is performed end to end rather thanacross a single link.  Error control. Like the data link layer, the transport layer is responsible forerror control. However, error control at this layer is performed process-to processrather than across a single link. The sending transport layer makes surethat the entire 152 CU IDOL SELF LEARNING MATERIAL (SLM)

message arrives at the receiving transport layer without error(damage, loss, or duplication). Error correction is usually achieved throughretransmission. Figure 10.17 illustrates process-to-process delivery by the transport layer. Figure 10.17: Reliable process-to-process delivery of message Session Layer The services provided by the first three layers (physical, data link, and network) arenot sufficient for some processes. The session layer is the network dialog controller.It establishes, maintains, and synchronizes the interaction among communicatingsystems. Specific responsibilities of the session layer include the following.  Dialog control. The session layer allows two systems to enter into a dialog. Itallows the communication between two processes to take place in either half duplex(one way at a time) or full-duplex (two ways at a time) mode.  Synchronization. The session layer allows a process to add checkpoints, or synchronization points, to a stream of data. For example, if a system is sending a fileof 2000 pages, it is advisable to insert checkpoints after every 100 pages to ensurethat each 100-page unit is received and acknowledged independently. In this case,if a crash happens during the transmission of page 523, the only pages that need tobe resent after system recovery are pages 501 to 523. Pages previous to 501 neednot be resent. Figure 10.18 illustrates the relationship of the session layer to thetransport and presentation layers. 153 CU IDOL SELF LEARNING MATERIAL (SLM)

Figure 10.18: Session layer Presentation Layer The presentation layer is concerned with the syntax and semantics of the informationexchanged between two systems. Figure 10.19 shows the relationship between the presentation layer and the application and session layers. Figure 10.19: Presentation layer Specific responsibilities of the presentation layer include the following.  Translation. The processes (running programs) in two systems are usually exchanginginformation in the form of character strings, numbers, and so on. The informationmust be changed to bit streams before being transmitted. Because differentcomputers use different encoding systems, the presentation layer is responsible forinteroperability between these different encoding methods. The presentation layerat the sender changes the information from its sender-dependent format into acommon format. The presentation layer at the receiving machine changes thecommon format into its receiver-dependent format.  Encryption. To carry sensitive information, a system must be able to ensureprivacy. Encryption means that the sender transforms the original information to another form 154 CU IDOL SELF LEARNING MATERIAL (SLM)

and sends the resulting message out over the network. Decryptionreverses the original process to transform the message back to its original form.  Compression. Data compression reduces the number of bits contained in theinformation. Data compression becomes particularly important in the transmissionof multimedia such as text, audio, and video. Application Layer The application layer enables the user, whether human or software, to access the network.It provides user interfaces and support for services such as electronic mail,remote file access and transfer, shared database management, and other types of distributedinformation services.Figure 10.20 shows the relationship of the application layer to the user and the presentationlayer. Of the many application services available, the figure shows only three:XAOO (message-handling services), X.500 (directory services), and file transfer,access, and management (FTAM). The user in this example employs XAOO to send ane-mail message. Figure 10.20: Application layer Specific services provided by the application layer include the following.  Network virtual terminal. A network virtual terminal is a software version ofa physical terminal, and it allows a user to log on to a remote host. To do so, theapplication creates a software emulation of a terminal at the remote host. Theuser's computer talks to the software terminal which, in turn, talks to the host,and vice versa. The remote host believes it is communicating with one of its ownterminals and allows the user to log on. 155 CU IDOL SELF LEARNING MATERIAL (SLM)

 File transfer, access, and management. This application allows a user to accessfiles in a remote host (to make changes or read data), to retrieve files from a remotecomputer for use in the local computer, and to manage or control files in a remotecomputer locally.  Mail services. This application provides the basis for e-mail forwarding andstorage.  Directory services. This application provides distributed database sources andaccess for global information about various objects and services. Summary of Layers Figure 10.21 shows a summary of duties for each layer. Figure 10.21: Summary of layers 10.4 SUMMARY  A computer network connects two or more devices together to share information and services. Multiple networks connected together form an internetwork. Internetworking present challenges - interoperating between products from different manufacturers requires consistent standards. Network reference models were developed to address these challenges. A network reference model serves as a blueprint, detailing how communication between network devices should occur.  Protocols on one layer will interact with protocols on the layer above and below it, forming a protocol suite or stack. The TCP/IP suite is the most prevalent protocol suite, and is the foundation of the Internet.  There are two possible types of connections: point-to-point and multipoint. Point A point-to-point connection provides a dedicated link between two devices. The entire capacity of the link is reserved for transmission between those two devices. Most 156 CU IDOL SELF LEARNING MATERIAL (SLM)

point-to-point connections use an actual length of wire or cable to connect the two ends, but other options, such as microwave or satellite links, are also possible.  In a mesh topology, every device has a dedicated point-to-point link to every other device. The term dedicated means that the link carries traffic only between the two devices it connects. To find the number of physical links in a fully connected mesh network with n nodes, we first consider that each node must be connected to every other node. Node 1 must be connected to n - I nodes, node 2 must be connected to n – 1 nodes, and finally node n must be connected to n - 1 nodes.  A star topology is less expensive than a mesh topology. In a star, each device needs only one link and one I/O port to connect it to any number of others. This factor also makes it easy to install and reconfigure. Far less cabling needs to be housed, and additions, moves, and deletions involve only one connection: between that device and the hub. Other advantages include robustness. If one link fails, only that link is affected. All other links remain active. This factor also lends itself to easy fault identification and fault isolation.  Nodes are connected to the bus cable by drop lines and taps. A drop line is a connection running between the device and the main cable. A tap is a connector that either splices into the main cable or punctures the sheathing of a cable to create a contact with the metallic core. As a signal travels along the backbone, some of its energy is transformed into heat. Therefore, it becomes weaker and weaker as it travels farther and farther.  In a ring topology, each device has a dedicated point-to-point connection with only the two devices on either side of it. A signal is passed along the ring in one direction, from device to device, until it reaches its destination. Each device in the ring incorporates a repeater. When a device receives a signal intended for another device, its repeater regenerates the bits and passes them along.  Various mnemonics make it easier to remember the order of the OSI model’s layers. Established in 1947, the International Standards Organization (ISO) is a multinational body dedicated to worldwide agreement on international standards. An ISO standard that covers all aspects of network communications is the Open Systems Interconnection model. It was first introduced in the late 1970s. An open system is a set of protocols that allows any two different systems to communicate regardless of their underlying architecture.  The data link layer divides the stream of bits received from the network layer into manageable data units called frames. Physical addressing. If frames are to be distributed to different systems on the network, the data link layer adds a header to the frame to define the sender and/or receiver of the frame. If the frame is intended for a 157 CU IDOL SELF LEARNING MATERIAL (SLM)

system outside the sender's network, the receiver address is the address of the device that connects the network to the next one. 10.5 KEYWORDS  Mesh Topology - A network configuration in which each device has a dedicated point-to-pointlink to every other device.A mesh topology is a network setup where each computer and network device is interconnected with one another. This topology setup allows for most transmissions to be distributed even if one of the connections goes down. It is a topology commonly used for wireless networks.  Switch - A device connecting multiple communication lines together.A switch is a device in a computer network that connects other devices together. Multiple data cables are plugged into a switch to enable communication between different networked devices.  Switched Virtual Circuit (SVC) - A virtual circuit transmission method in which a virtual circuit is created and in existence only for the duration of the exchange.A virtual circuit (VC) is a means of transporting data over a packet-switched network in such a way that it appears as though there is a dedicated physical link between the source and destination end systems of this data. The term virtual circuit is synonymous with virtual connection.  Switched Ethernet - An Ethernet in which a switch, replacing the hub, can direct a transmission to its destination.In switched Ethernet, the hub connecting the stations of the classic Ethernet is replaced by a switch. The switch connects the high-speed.  Suffix - For a network, the varying part (similar to the hostid) of the address. In DNS, a string used by an organization to define its host or resources.In computer system file names, a suffix is a convention for having one or more characters appended to a file name (usually separated from the file name with a dot) so that it can be distinguished from other files or grouped together with similar types of files.  Teardown Phase - In virtual circuit switching, the phase in which the source and destination inform the switch to erase their entry.At the final Circuit disconnect phase, when any one of the subscriber in the network, sender or receiver needs to disconnect the path, a disconnect signal is sent to all involved switches to release the resource and break the connection. This phase also called as teardown phase in circuit switching method. 10.6 LEARNING ACTIVITY 1. Analyse the various layers of OSI model and mention its advantages. 158 CU IDOL SELF LEARNING MATERIAL (SLM)

___________________________________________________________________________ ___________________________________________________________________________ 2. Compare the different network topologies and list its features. ___________________________________________________________________________ __________________________________________________________________________ 10.7 UNIT END QUESTIONS A.Descriptive Questions Short Questions: 1. Write a short note on OSI model layers. 2. Explain layered architecture. 3. What is data link layer? 4. What are the responsibilities of network layer? 5. What are the factors which are concerned for the physical layer? Long Questions: 1. Explain transport layer with diagram. 2. Explain the interfaces between the layers. 3. Describe the organization of layers. 4. Write a short note on physical layer with suitable diagram. 5. Explain the term framing? B. Multiple choice Questions 159 1. How many types of network topologies are there? a. One b. Five c. Three d. Four 2. Which layer architectures is the OSI model? a. One b. Five c. Seven CU IDOL SELF LEARNING MATERIAL (SLM)

d. Four 3. How does the physical layer in OSI architecture transfer the data? a. Bits b. Bytes c. Megabytes d. None of these 4. Which layer transmits the error free frames in an OSI level architecture? a. Physical layer b. Data link layer c. Network layer d. Transport layer 5. Where will the packetsbe created in OSI model architecture? a. Physical layer b. Data link layer c. Network layer d. Transport layer Answers 1-b, 2-c, 3-a, 4-b, 5-c 10.8 REFERENES References  Stamper, D. (1993). Local Area Networks, Addison-Wesley, Reading. MA.  Stamper, D. (1991). Business Data Communications, Third Edition. Addison-Wesley, Reading, MA.  W, Stallings. (n.d). Data and Computer Communications. Eight Editions. Pearson Education. Textbooks  Dr. Sidnie, Feit. (n.d). TCP/IP. Second Edition. TMH  Behrouz, A, Forouzan. (n.d). Data communications and Networking. Fourth Edition. Mc-Graw Hill Achyut Godbole, ―Data communications and Networks, TMH.  Computer Networks – Andrew Tannenbaum. 160 CU IDOL SELF LEARNING MATERIAL (SLM)

Websites  http://fcit.usf.edu/network/chap2/chap2.htm  www.pragsoft.com  http://pages.cs.wisc.edu/~tvrdik/7/html/Section7.html  http://www.garymgordon.com/misc/tutorials/networking/Lesson2.pdf  http://networkworld.com/ns/books/ciscopress/samples/0735700745.pdf 161 CU IDOL SELF LEARNING MATERIAL (SLM)

UNIT – 11: NETWORK REFERENCE MODELS PART 2 STRUCTURE 11.0 Learning Objectives 11.1 Introduction 11.2 TCP/IP Reference Model 11.2.1 Layers of TCP/IP 11.3 Comparison of ODI and TCI Reference Model 11.3.1 Similarities 11.3.2 Challenges 11.4 Summary 11.5 Keywords 11.6 Learning Activity 11.7 Unit End Questions 11.8 References 11.0 LEARNING OBJECTIVES After studying this unit, you will be able to:  Explain about TCP/IP reference model.  Illustrate different layers of TCP/IP.  Explain the comparison of ODI and TCI reference model.  Describe the similarities and challenges of ODI and TCI reference model. 11.1 INTRODUCTION The TCP/IP protocol suite was developed prior to the OSI model. Therefore, the layersin the TCP/IP protocol suite do not exactly match those in the OSI model. Theoriginal TCP/IP protocol suite was defined as having four layers: host-to-network,internet, transport, and application. However, when TCP/IP is compared to OSI, we cansay that the host-to-network layer is equivalent to the combination of the physical anddata link layers. The internet layer is equivalent to the network layer, and the applicationlayer is roughly doing the job of the session, presentation, and application layerswith the transport layer in 162 CU IDOL SELF LEARNING MATERIAL (SLM)

TCPIIP taking care of part of the duties of the session layer. We assume that the TCPIIP protocol suite is made of five layers: physical,data link, network, transport, and application. The first four layers provide physicalstandards, network interfaces, internetworking, and transport functions that correspondto the first four layers of the OSI model. The three topmost layers in the OSI model,however, are represented in TCP/IP by a single layer called the application layer (seefigure 11.1). Figure 11.1: TCP/IP and OSI model TCP/IP is a hierarchical protocol made up of interactive modules, each of whichprovides a specific functionality; however, the modules are not necessarily interdependent.Whereas the OSI model specifies which functions belong to each of its layers,the layers of the TCP/IP protocol suite contain relatively independent protocols thatcan be mixed and matched depending on the needs of the system. The term hierarchicalmeans that each upper-level protocol is supported by one or more lower-levelprotocols. ODI (Open Data-Link Interface) is a software interface that allows different Data-Link Layer protocols to share the same driver or adapter in a computer. ODI was introduced by Novell. For example, using ODI, both TCP/IP and IPX/SPX can share the same device adapter. The Data-Link Layer, part of the Open Systems Interconnect (OSI) model, provides a way to move data across a physical link. The Open Data-Link Interface (ODI), developed by Apple and Novell, serves the same function as Microsoft and 3COM's Network Driver Interface Specification (NDIS). Originally, ODI was written for NetWare and Macintosh environments. Like NDIS, ODI provides rules that establish a vendor-neutral interface between the protocol stack and the adapter driver. It resides in layer 2, the data link layer, of the OSI model. This interface also enables one or more network drivers to support one or more protocol stacks. 163 CU IDOL SELF LEARNING MATERIAL (SLM)

11.2 TCP/IP REFERENCE MODEL At the transport layer, TCP/IP defines three protocols: Transmission ControlProtocol (TCP), User Datagram Protocol (UDP), and Stream Control TransmissionProtocol (SCTP). At the network layer, the main protocol defined by TCP/IP is theInternetworking Protocol (IP); there are also some other protocols that support datamovement in this layer. 11.2.1 Layers of TCP/IP Physical and Data Link Layers At the physical and data link layers, TCP/IP does not define any specific protocol. Itsupports all the standard and proprietary protocols. A network in a TCP/IP internetworkcan be a local- area network or a wide-area network. Network Layer At the network layer (or, more accurately, the internetwork layer), TCP/IP supportsthe Internetworking Protocol. IP, in turn, uses four supporting protocols: ARP,RARP, ICMP, and IGMP. Internetworking Protocol (IP) The Internetworking Protocol (IP) is the transmission mechanism used by the TCP/IPprotocols. It is an unreliable and connectionless protocol-a best-effort delivery service.The term best effort means that IP provides no error checking or tracking. IP assumesthe unreliability of the underlying layers and does its best to get a transmission throughto its destination, but with no guarantees.IP transports data in packets called datagrams, each of which is transported separately.Datagrams can travel along different routes and can arrive out of sequence or beduplicated. IP does not keep track of the routes and has no facility for reordering datagramsonce they arrive at their destination.The limited functionality of IP should not be considered a weakness, however. IPprovides bare-bones transmission functions that free the user to add only those facilitiesnecessary for a given application and thereby allows for maximum efficiency. Address Resolution Protocol The Address Resolution Protocol (ARP) is used to associate a logical address with aphysical address. On a typical physical network, such as a LAN, each device on a linkis identified by a physical or station address, usually imprinted on the network interfacecard (NIC). ARP is used to find the physical address of the node when its Internetaddress is known. Reverse Address Resolution Protocol The Reverse Address Resolution Protocol (RARP) allows a host to discover its Internetaddress when it knows only its physical address. It is used when a computer is connectedto a network for the first time or when a diskless computer is booted. 164 CU IDOL SELF LEARNING MATERIAL (SLM)

Internet Control Message Protocol The Internet Control Message Protocol (ICMP) is a mechanism used by hosts andgateways to send notification of datagram problems back to the sender. ICMP sendsquery and error reporting messages. Internet Group Message Protocol The Internet Group Message Protocol (IGMP) is used to facilitate the simultaneoustransmission of a message to a group of recipients. Transport Layer Traditionally the transport layer was represented in TCP/IP by two protocols: TCP andUDP. IP is a host-to-host protocol, meaning that it can deliver a packet from onephysical device to another. UDP and TCP are transport level protocols responsiblefor delivery of a message from a process (running program) to another process. A newtransport layer protocol, SCTP, has been devised to meet the needs of some newerapplications. The User Datagram Protocol (UDP) is the simpler of the two standard TCPIIP transportprotocols. It is a process-to-process protocol that adds only port addresses, checksumerror control, and length information to the data from the upper layer. Transmission Control Protocol The Transmission Control Protocol (TCP) provides full transport-layer services toapplications. TCP is a reliable stream transport protocol. The term stream, in this context,means connection-oriented: A connection must be established between both endsof a transmission before either can transmit data.At the sending end of each transmission, TCP divides a stream of data into smallerunits called segments. Each segment includes a sequence number for reordering afterreceipt, together with an acknowledgment number for the segments received. Segmentsare carried across the internet inside of IP datagrams. At the receiving end, TCP collectseach datagram as it comes in and reorders the transmission based on sequencenumbers. Stream Control Transmission Protocol The Stream Control Transmission Protocol (SCTP) provides support for newerapplications such as voice over the Internet. It is a transport layer protocol that combinesthe best features of UDP and TCP. Application Layer The application layer in TCPIIP is equivalent to the combined session, presentation,and application layers in the OSI model. Many protocols are defined at this layer. 165 CU IDOL SELF LEARNING MATERIAL (SLM)

11.3 COMPARISON OF ODI AND TCI REFERENCE MODEL ODI (Open Data-Link Interface) is a software interface that allows different Data-Link Layer protocols to share the same driveror adapter in a computer. ODI was introduced by Novell. For example, using ODI, both TCP/IPand IPX/SPX can share the same device adapter. The Data-Link Layer, part of the Open Systems Interconnect (OSI) model, provides a way to move data across a physical link. The Open Data-Link Interface (ODI), developed by Apple and Novell, serves the same function as Microsoft and 3COM's Network Driver Interface Specification(NDIS). Originally, ODI was written for NetWare and Macintoshenvironments. Like NDIS, ODI provides rules that establish a vendor-neutral interface between the protocol stack and the adapter driver. It resides in layer 2, the data link layer, of the OSI model. This interface also enables one or more network drivers to support one or more protocol stacks. 11.3.1 Similarities The Open Data-Link Interface (ODI)is a protocol-independent software interface for NetWare that provides similar functions to the Network Driver Interface Specification (NDIS) developed by Microsoft and 3Com for use on networked Windows computers. Like NDIS, ODI operates at layer 2 of the Open Systems Interconnection (OSI) reference model called Data-Link Control. It specifies how communication protocol programs—such as TCP/IP, IPX, AppleTalk and others—and network device drivers should communicate with each other. It enables multiple protocols to operate on the network simultaneously and provides the ability to install and support multiple types of network interface cards (NICs) in the same computer. As with NDIS, ODI consists of several discrete components. 11.3.2 Challenges Multiple link interfaces - The interface to which device drivers for the NIC are attached. Link support layer - Provides a link for drivers, directing network traffic from the drivers to the proper protocol. Multiple protocol interfaces - Provides an interface for the connection of protocol stacks such as TCP/IP, IPX and AppleTalk. When a packet arrives at a NIC, it is processed by the card’s driver and passed to the link support layer, where it is handed off to the appropriate protocol stack. The packet passes up through the protocol stack for higher-level processing before being transmitted over the network to its proper destination. 11.4 SUMMARY  At the transport layer, TCP/IP defines three protocols: Transmission Control Protocol (TCP), User Datagram Protocol (UDP), and Stream Control Transmission Protocol (SCTP). At the network layer, the main protocol defined by TCP/IP is the 166 CU IDOL SELF LEARNING MATERIAL (SLM)

Internetworking Protocol (IP); there are also some other protocols that support data movement in this layer.  The Internetworking Protocol (IP) is the transmission mechanism used by the TCP/IP protocols. It is an unreliable and connectionless protocol-a best-effort delivery service. The term best effort means that IP provides no error checking or tracking. IP assumes the unreliability of the underlying layers and does its best to get a transmission through to its destination, but with no guarantees.  IP transports data in packets called datagrams, each of which is transported separately. Datagrams can travel along different routes and can arrive out of sequence or be duplicated. IP does not keep track of the routes and has no facility for reordering datagrams once they arrive at their destination. The limited functionality of IP should not be considered a weakness, however. IP provides bare-bones transmission functions that free the user to add only those facilities necessary for a given application and thereby allows for maximum efficiency.  The Address Resolution Protocol (ARP) is used to associate a logical address with a physical address. On a typical physical network, such as a LAN, each device on a link is identified by a physical or station address, usually imprinted on the network interface card (NIC). ARP is used to find the physical address of the node when its Internet address is known.  The Reverse Address Resolution Protocol (RARP) allows a host to discover its Internet address when it knows only its physical address. It is used when a computer is connected to a network for the first time or when a diskless computer is booted.  IP assumes the unreliability of the underlying layers and does its best to get a transmission through to its destination, but with no guarantees. IP transports data in packets called datagrams, each of which is transported separately. Datagrams can travel along different routes and can arrive out of sequence or be duplicated. IP does not keep track of the routes and has no facility for reordering datagrams once they arrive at their destination. The limited functionality of IP should not be considered a weakness.  The Reverse Address Resolution Protocol (RARP) allows a host to discover its Internet address when it knows only its physical address. It is used when a computer is connected to a network for the first time or when a diskless computer is booted.  A new transport layer protocol, SCTP, has been devised to meet the needs of some newer applications. The User Datagram Protocol (UDP) is the simpler of the two standard TCPIIP transport protocols. It is a process-to-process protocol that adds only port addresses, checksum error control, and length information to the data from the upper layer. 167 CU IDOL SELF LEARNING MATERIAL (SLM)

 ODI (Open Data-Link Interface) is a software interface that allows different data protocols to share the same driveror adapter in a computer. ODI was introduced by Novell. For example, using ODI, both TCP/IPand IPX/SPX can share the same device adapter.  The Data-Link Layer, part of the Open Systems Interconnect (OSI ) model, provides a way to move data across a physical link. 11.5 KEYWORDS  TCP/IP Protocol Suite - A five-layer protocol suite that defines the exchange of transmissions across the Internet.The Internet protocol suite, commonly known as TCP/IP, is the set of communications protocols used in the Internet and similar computer networks. The current foundational protocols in the suite are the Transmission control protocol and the Internet Protocol.  Presentation Layer - The sixth layer of the OSI model; responsible for translation, encryption, authentication, and data compression.In the seven-layer OSI model of computer networking, the presentation layer is layer 6 and serves as the data translator for the network. It is sometimes called the syntax layer.  Network Layer - The third layer in the Internet model, responsible for the delivery of a packet to the final destination.In the seven-layer OSI model of computer networking, the network layer is layer 3. The network layer is responsible for packet forwarding including routing through intermediate routers.  Internetworking Protocol (IP) - The Internetworking Protocol (IP) is the transmission mechanism used by the TCP/IP protocols. It is an unreliable and connectionless protocol-a best-effort delivery service. The term best effort means that IP provides no error checking or tracking. IP assumes the unreliability of the underlying layers and does its best to get a transmission through to its destination, but with no guarantees. IP transports data in packets called datagrams, each of which is transported separately. Datagrams can travel along different routes and can arrive out of sequence or be duplicated. IP does not keep track of the routes and has no facility for reordering datagrams once they arrive at their destination.  Address Resolution Protocol - The Address Resolution Protocol (ARP) is used to associate a logical address with a physical address. On a typical physical network, such as a LAN, each device on a link is identified by a physical or station address, usually imprinted on the network interface card (NIC). ARP is used to find the physical address of the node when its Internet address is known.  Reverse Address Resolution Protocol - The Reverse Address Resolution Protocol (RARP) allows a host to discover its Internet address when it knows only its physical 168 CU IDOL SELF LEARNING MATERIAL (SLM)

address. It is used when a computer is connected to a network for the first time or when a diskless computer is booted.  Internet Control Message Protocol - The Internet Control Message Protocol (ICMP) is a mechanism used by hosts and gateways to send notification of datagram problems back to the sender. ICMP sends query and error reporting messages. 11.6 LEARNING ACTIVITY 1. Analyse the various TCP/IP layers and make a tabular column. ___________________________________________________________________________ ___________________________________________________________________________ 2. Create a survey on TCP and TCI reference model comparison. ___________________________________________________________________________ ___________________________________________________________________________ 11.7 UNIT END QUESTIONS A.Descriptive Questions Short Questions: 1. Define inter networking protocol. 2. What is address resolution protocol? 3. Explain reverse address resolution protocol. 4. What is internet control message protocol? 5. Define transmission control protocol. Long Questions: 1. Explain the comparison of ODI and TCI reference model. 2. Describe the similarities and challenges of ODI and TCI reference model. 3. Explain about TCP/IP reference model. 4. Illustrate different layers of TCP/IP. 5. Explain application layer. B. Multiple Choice Questions 1. Which layer establishes and terminates the session in OSI model architecture? 169 CU IDOL SELF LEARNING MATERIAL (SLM)

a. Session layer b. Transport layer c. Data link layer d. Network layer 2. Which layer doesTCP/IP model not have, but OSI model has? a. Session layer b. Transport layer c. Application layer d. Network layer 3. Which address is used on the internet for employing the TCP/IP protocols? a. Physical address and logical address b. Port address c. Specific address d. All of these 4. When did TCP/IP modeldevelop compared to the OSI model? a. After b. Prior to c. Simultaneous to d. With no link to 5. Which layer is responsible for process to process delivery in a network model? a. Network layer b. Session layer c. Data link layer d. Transport layer Answers 1-a, 2-a, 3-d, 4-b, 5-d 170 CU IDOL SELF LEARNING MATERIAL (SLM)

11.8 REFERENCES References  Huitema, C. IPv6: The New Internet Protocol. Second edition. Upper Saddle River, NJ: Prentice Hall, 1998.  Miller, M. Implementing IPv6: Supporting the Next Generation of Protocols. Second edition. Foster City, CA: M&T Books, 2000.  [RFC1886] S. Thomson and C. Huitema, 1995, DNS Extensions to support IP version 6. Textbooks  R. Hinden and S. Deering, 1995, IP version 6 addressing architecture.  S. Thomson and T. Narten, 1998, IPv6 Stateless Address Autoconfiguration.  Alain Durand, Paolo Fasano, and Domenico Lento, 2000, IPv6 Tunnel broker, draft- ietf-ngtrans-broker-05. Websites  https://whatis.techtarget.com/definition/Open-Data-Link-Interface-ODI  https://ecomputernotes.com/computernetworkingnotes/multiple-access/what-is-wired- transmission-type-of-wired-transmission  https://www.techopedia.com/definition/30527/switched-line  https://www.c-sharpcorner.com/uploadfile/abhikumarvatsa/basics-of-data- communication-part-1/ 171 CU IDOL SELF LEARNING MATERIAL (SLM)

UNIT – 12: DATA LINK LAYER DESIGN ISSUE PART 1 STRUCTURE 12.0 Learning Objectives 12.1 Introduction 12.2 Services Provided to the Network Layer 12.2.1 Logical Addressing 12.2.2 Internet Protocol 12.2.3 Error Reporting 12.3 Framing 12.3.1 Types of Framing 12.4 Error Control 12.5 Summary 12.6 Keywords 12.7 Learning Activity 12.8 Unit End Questions 12.9 References 12.0 LEARNING OBJECTIVES After studying this unit, you will be able to:  Describe the different services provided to the network layer.  Explain logical addressing.  Explain the framing methods and its different types.  Describe error control. 12.1 INTRODUCTION Networks must be able to transfer data from one device to another with acceptable accuracy.For most applications, a system must guarantee that the data received are identical tothe data transmitted. Any time data are transmitted from one node to the next, they canbecome corrupted in passage. Many factors can alter one or more bits of a message. 172 CU IDOL SELF LEARNING MATERIAL (SLM)

Someapplications require a mechanism for detecting and correcting errors. Data can be corrupted during transmission. Some applications require that errors be detected and corrected.Some applications can tolerate a small level of error. For example, random errorsin audio or video transmissions may be tolerable, but when we transfer text, we expecta very high level of accuracy. Logical addresses are necessary for universal communications that are independent of underlying physical networks. Physical addresses are not adequate in an internet work environment where different networks can have different address formats. A universal addressing system is needed in which each host can be identified uniquely, regardless of the underlying physical network. The logical addresses are designed for this purpose. A logical address in the Internet is currently a 32-bit address that can uniquely define a host connected to the Internet. No two publicly addressed and visible hosts on the Internet can have the same IP address. The computer with logical address A and physical address 10 needs to send a packet to the computer with logical address P and physical address. We use letters to show the logical addresses and numbers for physical addresses, but note that both are actually numbers, as we will see later in the chapter. The sender encapsulates its data in a packet at the network layer and adds two logical addresses (A and P). Note that in most protocols, the logical source address comes before the logical destination address (contrary to the order of physical addresses). The network layer, however, needs to find the physical address of the next hop before the packet can be delivered. The network layer consults its routing table and finds the logical address of the next hop (router I) to be F. The ARP discussed previously finds the physical address of router 1 that corresponds to the logical address of 20. Now the network layer passes this address to the data link layer, which in turn encapsulates the packet with physical destination address 20 and physical source address 10. The frame is received by every device on LAN 1, but is discarded by all except router 1, which finds that the destination physical address in the frame matches with its own physical address. The router de-capsulates the packet from the frame to read the logical destination address P. Since the logical destination address does not match the router's logical address, the router knows that the packet needs to be forwarded. The router consults its routing table and ARP to find the physical destination address of the next hop (router 2), creates a new frame, encapsulates the packet, and sends it to router 2. Note the physical addresses in the frame. The source physical address changes from 10 to 99. The destination physical address has changed from 20 (router 1 physical address) to 33 (router 2 physical address). The logical source and destination addresses must remain the same; otherwise the packet will be lost. 12.2 SERVICES PROVIDED TO THE NETWORK LAYER 173 CU IDOL SELF LEARNING MATERIAL (SLM)

At router 2 we have a similar scenario. The physical addresses are changed, and a new frame is sent to the destination computer. When the frame reaches the destination, the packet is de capsulated. The destination logical address P matches the logical address of the computer. 12.2.1 Logical Addressing The data are de-capsulated from the packet and delivered to the upperlayer. Note that although physical addresses will change from hop to hop, logicaladdresses remain the same from the source to destination. There are some exceptions tothis rule that we discover later in the book. Communication at the network layer is host-to-host (computer-to-computer); a computer somewhere in the world needs to communicate with another computer somewhere else in the world. Usually, computers communicate through the Internet. The packet transmitted by the sending computer may pass through several LANs or WANs before reaching the destination computer. For this level of communication, we need a global addressing scheme; we called this logical addressing or IP address. IPv4 Address An IPv4 address is a 32-bit address that uniquely and universally defines the connection of a device (for example, a computer or a router) to the Internet.  IPv4 addresses are unique. They are unique in the sense that each address defines one, and only one, connection to the Internet. Two devices on the Internet can never have the same address at the same time. But by using some strategies, an address may be assigned to a device for a time period and then taken away and assigned to another device.  On the other hand, if a device operating at the network layer has m connections to the Internet, it needs to have m addresses. A router is such a device which needs as many IP addresses as the number of ports are there in it. Address Space A protocol such as IPv4 that defines addresses has an address space. This means that, theoretically, if there were no restrictions, more than 4 billion devices could be connected to the Internet. But the actual number is much less because of the restrictions imposed on the addresses. .IPv4 Address Notations There are two prevalent notations to show an IPv4 address: i. a. Binary notation and ii. b. Dotted decimal notation. Binary Notation 174 CU IDOL SELF LEARNING MATERIAL (SLM)

In binary notation, the IPv4 address is displayed as 32 bits. Each octet is often referred to as a byte. So it is common to hear an IPv4 address referred to as a 32-bit address or a 4-byte address. The following is an example of an IPv4 address in binary notation: Dotted-Decimal Notation To make the IPv4 address more compact and easier to read, Internet addresses are usually written in decimal form with a decimal point (dot) separating the bytes. The following is the dotted decimal notation of the above address. Example Change the following IPv4 addresses from binary notation to dotted-decimal notation. a. 10000001 00001011 00001011 11101111 b. 11000001 10000011 00011011 11111111 Solution We replace each group of 8 bits with its equivalent decimal number and add dots for separation. a. 129.11.11.239 b. 193.131.27.255 Example Change the following IPv4 addresses from dotted-decimal notation to binary notation. a. 111.56.45.78 b. 221.34.7.82 Solution We replace each decimal number with its binary equivalent. a. 01101111 00111000 00101101 01001110 b. 11011101 00100010 00000111 01010010 Classful Addressing IPv4 addressing, at its inception, used the concept of classes. This architecture is called classful addressing. Although this scheme is becoming obsolete, we briefly discuss it here to show the rationale behind classless addressing.  In classful addressing, the address space is divided into five classes: A, B, C, D, and E.  Each class occupies some part of the address space. 175 CU IDOL SELF LEARNING MATERIAL (SLM)

 We can find the class of an address when given the address in binary notation or dotted-decimal notation.  If the address is given in binary notation, the first few bits can immediately tell us the class of the address.  If the address is given in decimal-dotted notation, the first byte defines the class. Example Find the class of each address. a. 00000001 00001011 00001011 11101111 b. 11000001 10000011 00011011 11111111 c. 14.23.120.8 d. 252.5.15.111 Solution a. The first bit is 0. This is a class A address. b. The first 2 bits are 1; the third bit is 0. This is a class C address. c. The first byte is 14 (between 0 and 127); the class is A. d. The first byte is 252 (between 240 and 255); the class is E. Classes and Blocks One problem with classful addressing is that each class is divided into a fixed number of blocks with each block having a fixed size  Class A addresses were designed for large organizations with a large number of attached hosts or routers.  Class B addresses were designed for midsize organizations with tens of thousands of attached hosts or routers.  Class C addresses were designed for small organizations with a small number of attached hosts or routers. Limitations of Classful Addressing:  A block in class A address is too large for almost any organization. This means most of the addresses in class A were wasted and were not used.  A block in class B is also very large, probably too large for many of the organizations that received a class B block.  A block in class C is probably too small for many organizations. 176 CU IDOL SELF LEARNING MATERIAL (SLM)

 Class D addresses were designed for multicasting. Each address in this class is used to define one group of hosts on the Internet. The Internet authorities wrongly predicted a need for 268,435,456 groups. This never happened and many addresses were wasted here too.  And lastly, the class E addresses were reserved for future use; only a few were used, resulting in another waste of addresses. Netid and Hostid  In classful addressing, an IP address in class A, B, or C is divided into netid and hostid.  These parts are of varying lengths, depending on the class of the address. It shows some netid and hostid bytes.  The netid is in color, the hostid is in white. Note that the concept does not apply to classes D and E.  In class A, one byte defines the netid and three bytes define the hostid.  In class B, two bytes define the netid and two bytes define the hostid.  In class C, three bytes define the netid and one byte defines the hostid. Mask A mask (also called the default mask) is a 32-bit number made of contiguous 1s followed by contiguous 0s. The masks for classes A, B, and C are shown. The concept does not apply to classes D and E.   The mask can help us to find the netid and the hostid. For example, the mask for a class A address has eight 1s, which means the first 8 bits of any address in class A define the netid; the next 24 bits define the hostid.   The last column shows the mask in the form /n where n can be 8, 16, or 24 in classful addressing.   This notation is also called slash notation or Classless Interdomain Routing (CIDR) notation. Address Depletion Problem The fast growth of the Internet led to the near depletion of the available addresses in classful addressing scheme. Yet the number of devices on the Internet is much less than the 2 32 address space. We have run out of class A and B addresses, and a class C block is too small for most midsize organizations.  One solution that has alleviated the problem is the idea of classless addressing.  Classful addressing, which is almost obsolete, is replaced with classless addressing. 177 CU IDOL SELF LEARNING MATERIAL (SLM)

Classless Addressing To overcome address depletion and give more organizations access to the Internet, classless addressing was designed and implemented. In this scheme, there are no classes, but the addresses are still granted in blocks. Address Blocks  In classless addressing, when an entity, small or large, needs to be connected to the Internet, it is granted a block (range) of addresses.  The size of the block (the number of addresses) varies based on the nature and size of the entity. For example, a household may be given only two addresses; a large organization may be given thousands of addresses. An ISP, as the Internet service provider, may be given thousands or hundreds of thousands based on the number of customers it may serve.  The Internet authorities impose three restrictions on classless address blocks. Mask A better way to define a block of addresses is to select any address in the block and the mask. As we discussed before, a mask is a 32-bit number in which the n leftmost bits are 1s and the 32 - n rightmost bits are 0s.  However, in classless addressing the mask for a block can take any value from 0 to 32. It is very convenient to give just the value of n preceded by a slash (CIDR notation).  In 1Pv4 addressing, a block of addresses can be defined as x.y.z.t/n in which x.y.z.t defines one of the addresses and the /n defines the mask.  The address and the /n notation completely define the whole block (the first address, the last address, and the number of addresses). Example A block of addresses is granted to a small organization. We know that one of the addresses is 205.16.37.39/28. What is the first address in the block? Solution The binary representation of the given address is 11001101 00010000 00100101 00100111. If we set 32 - 28 rightmost bits to 0, we get 11001101 0001000 00100101 0010000 or 205.16.37.32. This is actually the block shown. Example Find the last address for the block 205.16.37.39/28 Solution 178 CU IDOL SELF LEARNING MATERIAL (SLM)

The binary representation of the given address is 11001101 00010000 00100101 00100111. If we set 32 - 28 rightmost bits to 1, we get 11001101 00010000 00100101 0010 1111 or 205.16.37.47. 12.2.2 Internet Protocol Now let us see how the data link layer can combine framing, flow control, and error controlto achieve the delivery of data from one node to another. The protocols are normally implementedin software by using one of the common programming languages. To make our discussions language-free, we have written in pseudocode a version of each protocol thatconcentrates mostly on the procedure instead of delving into the details of language rules.We divide the discussion of protocols into those that can be used for noiseless(error- free) channels and those that can be used for noisy (error-creating) channels. Theprotocols in the first category cannot be used in real life, but they serve as a basis forunderstanding the protocols of noisy channels. Figure 12.1 shows the classifications. Figure 12.1: Taxonomy of protocols There is a difference between the protocols we discuss here and those used in realnetworks. All the protocols we discuss are unidirectional in the sense that the data framestravel from one node, called the sender, to another node, called the receiver. Althoughspecial frames, called acknowledgment (ACK) and negative acknowledgment (NAK)can flow in the opposite direction for flow and error control purposes, data flow in onlyone direction.In a real-life network, the data link protocols are implemented as bidirectional;data flow in both directions. In these protocols the flow and error control information suchas ACKs and NAKs is included in the data frames in a technique called piggybacking.Because bidirectional protocols are more complex than unidirectional ones, we chose thelatter for our discussion. If they are understood, they can be extended to bidirectionalprotocols. 12.2.3 Error Reporting Below discuss some issues related, directly or indirectly, to error detection andcorrection. 179 CU IDOL SELF LEARNING MATERIAL (SLM)

Types of Errors Whenever bits flow from one point to another, they are subject to unpredictablechanges because of interference. This interference can change the shape of the signal.In a single-bit error, a 0 is changed to a 1 or a 1 to an O. In a burst error, multiple bits arechanged. For example, an 11100 s burst of impulse noise on a transmission with a datarate of 1200 bps might change all or some of the12 bits of information. Single-Bit Error The term single-bit error means that only 1 bit of a given data unit (such as a byte,character, or packet) is changed from 1 to 0 or from 0 to 1.Figure 12.1 shows the effect of a single-bit error on a data unit. To understand theimpact of the change, imagine that each group of 8 bits is an ASCII character with a 0 bitadded to the left. In Figure 10.1,00000010 (ASCII STX) was sent, meaning start oftext, but 00001010 (ASCII LF) was received, meaning line feed. Figure 12.1: Single-bit error Single-bit errors are the least likely type of error in serial data transmission. To understandwhy, imagine data sent at 1 Mbps. This means that each bit lasts only 1/1,000,000 s,or 1micro second. For a single-bit error to occur the noise must have duration of only 1 micro seconds whichis very rare; noise normally lasts much longer than this. Burst Error The term burst error means that 2 or more bits in the data unit have changed from 1 to 0or from 0 to 1.Figure 12.2 shows the effect of a burst error on a data unit. In this case,0100010001000011 were sent, but 0101110101100011 were received. Note that a bursterror does not necessarily mean that the errors occur in consecutive bits. The length ofthe burst is measured from the first corrupted bit to the last corrupted bit. Some bits inbetween may not have been corrupted. 180 CU IDOL SELF LEARNING MATERIAL (SLM)

Figure 12.3: Burst error of length 8 A burst error is more likely to occur than a single-bit error. The duration of noise isnormally longer than the duration of 1 bit, which means that when noise affects data, itaffects a set of bits. The number of bits affected depends on the data rate and durationof noise. For example, if we are sending data at me kbps, a noise of 11100 s can affect10 bits; if we are sending data at I Mbps, the same noise can affect 10,000 bits. Redundancy The central concept in detecting or correcting errors is redundancy. To be able todetect or correct errors, we need to send some extra bits with our data. These redundantbits are added by the sender and removed by the receiver. Their presence allows thereceiver to detect or correct corrupted bits. Detection versus Correction The correction of errors is more difficult than the detection. In error detection, we arelooking only to see if any error has occurred. The answer is a simple yes or no. We arenot even interested in the number of errors. A single-bit error is the same for us as aburst error.In error correction, we need to know the exact number of bits that are corrupted andmore importantly, their location in the message. The number of the errors and the size ofthe message are important factors. If we need to correct one single error in an 8-bit dataunit, we need to consider eight possible error locations; if we need to correct two errorsin a data unit of the same size, we need to consider 28 possibilities. You can imagine thereceiver's difficulty in finding 10 errors in a data unit of 1000 bits. Forward Error Correction versus Retransmission There are two main methods of error correction. Forward error correction is the processin which the receiver tries to guess the message by using redundant bits. This ispossible, as we see later, if the number of errors is small. Correction by retransmissionis a technique in which the receiver detects the occurrence of an error and asks the senderto resend the message. Resending is repeated until a message arrives that the receiverbelieves is error-free (usually, not all errors can be detected). 181 CU IDOL SELF LEARNING MATERIAL (SLM)

12.3 FRAMING Data transmission in the physical layer means moving bits in the form of a signal fromthe source to the destination. The physical layer provides bit synchronization to ensurethat the sender and receiver use the same bit durations and timing.The data link layer, on the other hand, needs to pack bits into frames, so that eachframe is distinguishable from another. Our postal system practices a type of framing.The simple act of inserting a letter into an envelope separates one piece of informationfrom another; the envelope serves as the delimiter. In addition, each envelope definesthe sender and receiver addresses since the postal system is a many-to-many carrierfacility. Framing in the data link layer separates a message from one source to a destination,or from other messages to other destinations, by adding a sender address and adestination address. The destination address defines where the packet is to go; the senderaddress helps the recipient acknowledge the receipt.The whole message could be packed in one framethat is not normallydone. One reason is that a frame can be very large, making flow and error control veryinefficient. When a message is carried in one very large frame, even a single-bit errorwould require the retransmission of the whole message. When a message is dividedinto smaller frames, a single-bit error affects only that small frame. 12.3.1 Types of framing Fixed-Size Framing Frames can be of fixed or variable size. In fixed-size framing, there is no need for definingthe boundaries of the frames; the size itself can be used as a delimiter. An exampleof this type of framing is the ATM wide-area network, which uses frames of fixed sizecalled cells. Variable-Size Framing Our main discussion in this chapter concerns variable-size framing, prevalent in localareanetworks. In variable-size framing, we need a way to define the end of the frameand the beginning of the next. Historically, two approaches were used for this purpose:a character-oriented approach and a bit-oriented approach. Character-Oriented Protocols In a character-oriented protocol, data to be carried are 8-bit characters from a codingsystem such as ASCII (see Appendix A). The header, which normally carries the sourceand destination addresses and other control information, and the trailer, which carrieserror detection or error correction redundant bits, are also multiples of 8 bits. To separateone frame from the next, an 8-bit (I-byte) flag is added at the beginning and the end of aframe. The flag, composed of protocol-dependent special characters, signals the start orend of a frame. Figure 12.3 shows the format of a frame in a character-oriented protocol. 182 CU IDOL SELF LEARNING MATERIAL (SLM)

Figure 12.4: A frame in a character-oriented protocol Character-oriented framing was popular when only text was exchanged by the datalink layers. The flag could be selected to be any character not used for text communication.Now, however, we send other types of information such as graphs, audio, andvideo. Any pattern used for the flag could also be part of the information. If this happens,the receiver, when it encounters this pattern in the middle of the data, thinks it hasreached the end of the frame. To fix this problem, a byte-stuffing strategy was added tocharacter-oriented framing. In byte stuffing (or character stuffing), a special byte isadded to the data section of the frame when there is a character with the same pattern asthe flag. The data section is stuffed with an extra byte. This byte is usually called theescape character (ESC), which has a predefined bit pattern. Whenever the receiverencounters the ESC character, it removes it from the data section and treats the nextcharacter as data, not a delimiting flag. Byte stuffing by the escape character allows the presence of the flag in the data sectionof the frame, but it creates another problem. What happens if the text contains one ormore escape characters followed by a flag? The receiver removes the escape character,but keeps the flag, which is incorrectly interpreted as the end of the frame. To solve thisproblem, the escape characters that are part of the text must also be marked by anotherescape character. In other words, if the escape character is part of the text, an extra one isadded to show that the second one is part of the text. Figure 12.4 shows the situation. Figure 12.5: Byte stuffing and unstuffing 183 CU IDOL SELF LEARNING MATERIAL (SLM)

Character-oriented protocols present another problem in data communications.The universal coding systems in use today, such as Unicode, have 16-bit and 32-bitcharacters that conflict with 8-bit characters. We can say that in general, the tendency ismoving toward the bit- oriented protocols. Bit-Oriented Protocols In a bit-oriented protocol, the data section of a frame is a sequence of bits to be interpretedby the upper layer as text, graphic, audio, video, and so on. However, in additionto headers (and possible trailers), we still need a delimiter to separate one frame fromthe other. Most protocols use a special 8-bit pattern flag 01111110 as the delimiter todefine the beginning and the end of the frame, as shown in figure 12.5. Figure 12.6: A frame in a bit-oriented protocol This flag can create the same type of problem we saw in the byte-oriented protocols.That is, if the flag pattern appears in the data, we need to somehow inform thereceiver that this is not the end of the frame. We do this by stuffing 1 single bit (insteadof I byte) to prevent the pattern from looking like a flag. The strategy is called bitstuffing. In bit stuffing, if a 0 and five consecutive I bits are encountered, an extra 0 isadded. This extra stuffed bit is eventually removed from the data by the receiver. Notethat the extra bit is added after one 0 followed by five 1s regardless of the value of thenext bit. This guarantees that the flag field sequence does not inadvertently appear inthe frame.Figure 12.6 shows bit stuffing at the sender and bit removal at the receiver. Note thateven if we have a 0 after five 1s, we still stuff a O. The 0 will be removed by the receiver. 184 CU IDOL SELF LEARNING MATERIAL (SLM)

Figure 12.7: Bit stuffing and unstuffing This means that if the flaglike pattern 01111110 appears in the data, it will changeto 011111010 (stuffed) and is not mistaken as a flag by the receiver. The real flag 01111110is not stuffed by the sender and is recognized by the receiver. 12.4 ERROR CONTROL Data communication requires at least two devices working together, one to send and theother to receive. Even such a basic arrangement requires a great deal of coordinationfor an intelligible exchange to occur. The most important responsibilities of the datalink layer are flow control and error control. Collectively, these functions are knownas data link control. Flow Control Flow control coordinates the amount of data that can be sent before receiving an acknowledgmentand is one of the most important duties of the data link layer. In most protocols,flow control is a set of procedures that tells the sender how much data it can transmitbefore it must wait for an acknowledgment from the receiver. The flow of data must notbe allowed to overwhelm the receiver. Any receiving device has a limited speed at whichit can process incoming data and a limited amount of memory in which to store incomingdata. The receiving device must be able to inform the sending device before thoselimits are reached and to request that the transmitting device send fewer frames or stoptemporarily. Incoming data must be checked and processed before they can be used. Therate of such processing is often slower than the rate of transmission. For this reason,each receiving device 185 CU IDOL SELF LEARNING MATERIAL (SLM)

has a block of memory, called a buffer, reserved for storing incomingdata until they are processed. If the buffer begins to fill up, the receiver must be ableto tell the sender to halt transmission until it is once again able to receive. Error Control Error control is both error detection and error correction. It allows the receiver toinform the sender of any frames lost or damaged in transmission and coordinates theretransmission of those frames by the sender. In the data link layer, the term error controlrefers primarily to methods of error detection and retransmission. Error control inthe data link layer is often implemented simply: Any time an error is detected in anexchange, specified frames are retransmitted. This process is called automatic repeatrequest (ARQ). 12.5 SUMMARY  The logical addresses are designed for this purpose. A logical address in the Internet is currently a 32-bit address that can uniquely define a host connected to the Internet. No two publicly addressed and visible hosts on the Internet can have the same IP address. The computer with logical address A and physical address 10 needs to send a packet to the computer with logical address P and physical address 95. We use letters to show the logical addresses and numbers for physical addresses, but note that both are actually numbers, as we will see later in the chapter. The sender encapsulates its data in a packet at the network layer and adds two logical addresses (A and P).  The physical addresses are changed, and a new frame is sent to the destination computer. When the frame reaches the destination, the packet is decapsulated. The destination logical address P matches the logical address of the computer. The data are decapsulated from the packet and delivered to the upper layer. Note that although physical addresses will change from hop to hop, logical addresses remain the same from the source to destination.  There is a difference between the protocols we discuss here and those used in real networks. All the protocols we discuss are unidirectional in the sense that the data frames travel from one node, called the sender, to another node, called the receiver. Although special frames, called acknowledgment (ACK) and negative acknowledgment (NAK) can flow in the opposite direction for flow and error control purposes, data flow in only one direction. In a real-life network, the data link protocols are implemented as bidirectional; data flow in both directions. In these protocols the flow and error control information such as ACKs and NAKs is included in the data frames in a technique called piggybacking.  In a burst error, multiple bits are changed. For example, a 11100 s burst of impulse noise on a transmission with a data rate of 1200 bps might change all or some of the12 bits of information. 186 CU IDOL SELF LEARNING MATERIAL (SLM)

 A burst error is more likely to occur than a single-bit error. The duration of noise is normally longer than the duration of 1 bit, which means that when noise affects data, it affects a set of bits. The number of bits affected depends on the data rate and duration of noise.  The number of the errors and the size of the message are important factors. If we need to correct one single error in an 8-bit data unit, we need to consider eight possible error locations; if we need to correct two errors in a data unit of the same size, we need to consider 28 possibilities.  The data link layer, on the other hand, needs to pack bits into frames, so that each frame is distinguishable from another. Our postal system practices a type of framing. The simple act of inserting a letter into an envelope separates one piece of information from another; the envelope serves as the delimiter. In addition, each envelope defines the sender and receiver addresses since the postal system is a many-to-many carrier facility.  Character-oriented framing was popular when only text was exchanged by the data link layers. The flag could be selected to be any character not used for text communication. Now, however, we send other types of information such as graphs, audio, and video. Any pattern used for the flag could also be part of the information.  The flow of data must not be allowed to overwhelm the receiver. Any receiving device has a limited speed at which it can process incoming data and a limited amount of memory in which to store incoming data. The receiving device must be able to inform the sending device before those limits are reached and to request that the transmitting device send fewer frames or stop temporarily. Incoming data must be checked and processed before they can be used. 12.6 KEYWORDS  Error Control - The handling of errors in data transmission.Error control in data link layer is the process of detecting and correcting data frames that have been corrupted or lost during transmission. In case of lost or corrupted frames, the receiver does not receive the correct data-frame and sender is ignorant about the loss.  Frame - A group of bits representing a block of data.A frame is a digital data transmission unit in computer networking and telecommunication. In packet switched systems, a frame is a simple container for a single network packet. If a receiver is connected to the system during frame transmission, it ignores the data until it detects a new frame synchronization sequence.  Frame Bursting - A technique in CSMAlCD Gigabit Ethernet in which multiple frames are logically connected to each other to resemble a longer frame.Frame 187 CU IDOL SELF LEARNING MATERIAL (SLM)

bursting is a transmission technique used at the data link layer of the OSI model to increase the rate of transmission of data frames. It can be effectively deployed in Gigabit Ethernets to increase network throughput.  Frame Relay - A packet-switching specification defined for the first two layers of the Internet model. There is no network layer. Error checking is done on end-to-end basis instead of on each link.Frame Relay is a standardized wide area network (WAN) technology that specifies the physical and data link layers of digital telecommunications channels using a packet switching methodology. Each end-user gets a private line (or leased line) to a Frame Relay node.  Internet Protocol (lP) - The network-layer protocol in the TCP/IP protocol suite governing connectionless transmission across packet switching networks.The Internet Protocol (IP) is the network layer communications protocol in the Internet protocol suite for relaying datagrams across network boundaries.  Internet Service Provider (ISP) - Usually, a company that provides Internet services.Internet service provider (ISP), company that provides Internet connections and services to individuals and organizations. In addition to providing access to the Internet, ISPs may also provide software packages (such as browsers), e-mail accounts, and a personal Web site or home page. 12.7 LEARNING ACTIVITY 1. Analyse the different services provided to the network layer and compare its features. ___________________________________________________________________________ ___________________________________________________________________________ 2. Create a survey of different Internet protocol used in banking institution. ___________________________________________________________________________ ___________________________________________________________________________ 12.8 UNIT END QUESTIONS A. Descriptive Questions 188 Short Questions: 1. What is error reporting? 2. Describe a single bit error. 3. What is burst error? 4. How forward error correction differs from re-transmission CU IDOL SELF LEARNING MATERIAL (SLM)

5. Explain framing? Long Questions: 1. Explain logical addressing. 2. Describe internet protocol in detail. 3. Explain different types of error reporting. 4. What is redundancy? 5. How detection is different from correction method? B. Multiple choice Questions 1. Which is not done by the data link layer? a. Framing b. Error control c. Flow control d. Channel coding 2. What is usually present in header of a frame? a. Synchronisation bytes b. Addresses c. Frame identifier d. All of these 3. What is the error when two or more bits in data unitshave been changed during the transmission? a. Random error b. Burst error c. Invertor error d. Double error 4. Which supplier of the data link layer performsdata link functions that depend upon the type of medium? a. Logical link control sublayer 189 b. Media access control sublayer c. Network interface control sublayer d. Error control sublayer CU IDOL SELF LEARNING MATERIAL (SLM)

5. Who has provided the automatic repeat request error management mechanism? a. Logical link control sublayer b. Media access control sublayer c. Application interface control sublayer d. None of these Answers 1-d, 2-d, 3-b, 4-b, 5-a 12.9 REFERENCES References  Martin, J. and Leben, J. (1988), Principles of Data Communication, Prentice Hall, Englewood Cliffs, NJ.  Spohn, D. (1993) Data Network Design, McGraw-Hill, NY.  Stallings, W. (1990), Handbook of Computer Communications Standards, Volumes I and II, Howard Sams and Company, Carmel. Textbooks  Stallings, W. (1992), ISDN and Broadband ISDN, Second Edition, Macmillan, NY.  Stallings, W. (1994), Data and Computer Communications, Fourth Edition, Macmillan, NY.  Davies, J. Understanding IPv6. Redmond, WA: Microsoft Press, 2002. Websites  https://ecomputernotes.com/computernetworkingnotes/multiple-access/what-is-wired- transmission-type-of-wired-transmission  https://www.techopedia.com/definition/30527/switched-line  https://www.c-sharpcorner.com/uploadfile/abhikumarvatsa/basics-of-data- communication-part-1/  https://www.dummies.com/programming/networking/network-basics-the-osi- network- layer/#:~:text=Logical%20addresses%20are%20created%20and,IP%20addresses%20 such%20as%20207.120.  https://www.javatpoint.com/network-layer 190 CU IDOL SELF LEARNING MATERIAL (SLM)

 https://new.bhu.ac.in/Images/files/Lecture%20Notes- Chapter%2019_Network%20Layer_%20Logical%20Addressing.pdf 191 CU IDOL SELF LEARNING MATERIAL (SLM)

UNIT – 13: NETWORK LAYER DESIGN ISSUES STRUCTURE 13.0 Learning Objectives 13.1 Introduction 13.2 Routing Algorithms 13.3 Congestion Control Algorithms 13.4 Quality of Service 13.4.1 End-to-End QoS Levels 13.5 Internetworking 13.6 Network-Layer in the Internet 13.7 Summary 13.8 Keywords 13.9 Learning Activity 13.10 Unit End Questions 13.11 References 13.0 LEARNING OBJECTIVES After studying this unit, you will be able to:  Describe routing algorithm.  Describe congestion controlalgorithm.  Explain quality of service.  Describe the different network layers in the internet. 13.1 INTRODUCTION We have frequently referred to the routing algorithm as the network layer protocol thatguides packets through the communication subnet to their correct destination. The timesat which routing decisions are made depend on whether the network uses datagrams orvirtual circuits. In a datagram network, two successive packets of the same user pairmay travel along different routes, and a routing decision is necessary for each individual packet. In a virtual circuit network, a routing decision is made when eachvirtual circuit is set up. The routing algorithm is used to choose the communication pathfor the virtual circuit. All packets 192 CU IDOL SELF LEARNING MATERIAL (SLM)

of the virtual circuit subsequently use this path upto the time that the virtual circuit is either terminated or rerouted for some reason (see figure. 13.1). Figure 13.1: Routing in a datagram network Routing in a network typically involves a rather complex collection of algorithmsthat work more or less independently and yet support each other by exchanging servicesor information. The complexity is due to a number of reasons. First, routing requirescoordination between all the nodes of the subnet rather than just a pair of modules as,for example, in data link and transport layer protocols. Second, the routing system mustcope with link and node failures, requiring redirection of traffic and an update of thedatabases maintained by the system. Third, to achieve high performance, the routingalgorithm may need to modify its routes when some areas within the network becomecongested. Unicast Routing Protocols A routing table can be either static or dynamic. A static table is one with manual entries. A dynamic table, on the other hand, is one that is updated automatically when there is a change somewhere in the internet. Today, an internet needs dynamic routing tables. The tables need to be updated as soon as there is a change in the internet. For instance, they need to be updated when a router is down, and they need to be updated whenever a better route has been found. Routing protocols have been created in response to the demand for dynamic routing tables. A routing protocol is a combination of rules and procedures that let routers in the internet inform each other of changes. It allows routers to share whatever they know about the internet or their neighbourhood. The sharing of information allows a router in San 193 CU IDOL SELF LEARNING MATERIAL (SLM)

Francisco to know about the failure of a network in Texas. The routing protocols also include procedures for combining information received from other routers. 13.2 ROUTING ALGORITHM Optimization A router receives a packet from a network and passes it to another network. A router isusually attached to several networks. When it receives a packet, to which networkshould it pass the packet? The decision is based on optimization: Which of the availablepathways is the optimum pathway? What is the definition of the term optimum?One approach is to assign a cost for passing through a network. We call this cost ametric. However, the metric assigned to each network depends on the type of protocol.Some simple protocols, such as the Routing Information Protocol (RIP), treat allnetworks as equals. The cost of passing through a network is the same; it is one hopcount. So if a packet passes through 10 networks to reach the destination, the total costis 10 hop counts.Other protocols, such as Open Shortest Path First (OSPF), allow the administrator toassign a cost for passing through a network based on the type of service required. A routethrough a network can have different costs (metrics). For example, if maximum throughputis the desired type of service, a satellite link has a lower metric than a fibre-optic line.On the other hand, if minimum delay is the desired type of service, a fibre-optic line hasa lower metric than a satellite link. Routers use routing tables to help decide the bestroute. OSPF protocol allows each router to have several routing tables based on therequired type of service.Other protocols define the metric in a totally different way. In the Border GatewayProtocol (BGP), the criterion is the policy, which can be set by the administrator. Thepolicy defines what paths should be chosen. Distance Vector Routing In distance vector routing, the least-cost route between any two nodes is the routewith minimum distance. In this protocol, as the name implies, each node maintains avector (table) of minimum distances to every node. The table at each node also guidesthe packets to the desired node by showing the next stop in the route (next-hop routing).We can think of nodes as the cities in an area and the lines as the roads connectingthem. A table can show a tourist the minimum distance between cities.In figure 13.2, we show a system of five nodes with their corresponding tables. 194 CU IDOL SELF LEARNING MATERIAL (SLM)

Figure 13.2: Distance vector routing tables The table for node A shows how we can reach any node from this node. For example,our least cost to reach node E is 6. The route passes through C. Initialization The tables in figure 13.2 are stable; each node knows how to reach any other nodeand the cost. At the beginning, however, this is not the case. Each node can know onlythe distance between itself and its immediate neighbours, those directly connected to it.So for the moment, we assume that each node can send a message to the immediateneighbours and find the distance between itself and these neighbours. Figure 13.3 showsthe initial tables for each node. The distance for any entry that is not a neighbour ismarked as infinite (unreachable). Figure 13.3: Initialization of tables in distance vector routing Sharing 195 CU IDOL SELF LEARNING MATERIAL (SLM)

The whole idea of distance vector routing is the sharing of information between neighbours.Although node A does not know about node E, node C does. So if node C sharesits routing table with A, node A can also know how to reach node E. On the other hand,node C does not know how to reach node D, but node A does. If node A shares its routingtable with node C, node C also knows how to reach node D. In other words, nodesA and C, as immediate neighbours, can improve their routing tables if they help eachother.There is only one problem. How much of the table must be shared with eachneighbour? A node is not aware of a neighbour’s table. The best solution for each nodeis to send its entire table to the neighbour and let the neighbour decide what part touse and what part to discard. However, the third column of a table (next stop) is notuseful for the neighbour. When the neighbour receives a table, this column needs tobe replaced with the sender's name. If any of the rows can be used, the next node isthe sender of the table. A node therefore can send only the first two columns of itstable to any neighbour. In other wordssharing here means sharing only the first twocolumns Updating When a node receives a two-column table from a neighbour, it needs to update its routingtable. Updating takes three steps. 1. The receiving node needs to add the cost between itself and the sending nodeto each value in the second column. The logic is clear. If node C claims that itsdistance to a destination is x mi, and the distance between A and C is y mi, then thedistance between A and that destination, via C, is x + y mi. 2. The receiving node needs to add the name of the sending node to each row as thethird column if the receiving node uses information from any row. The sendingnode is the next node in the route. 3. The receiving node needs to compare each row of its old table with the correspondingrow of the modified version of the received table. i. If the next-node entry is different, the receiving node chooses the row with thesmaller cost. If there is a tie, the old one is kept. ii. If the next-node entry is the same, the receiving node chooses the new row. Forexample, suppose node C has previously advertised a route to node X with distance. 4. Suppose that now there is no path between C and X; node C now advertisesthis route with a distance of infinity. Node A must not ignore this valueeven though its old entry is smaller. The old route does not exist anymore. Thenew route has a distance of infinity. Figure 13.4 shows how node A updates its routing table after receiving the partial tablefrom node C. 196 CU IDOL SELF LEARNING MATERIAL (SLM)

Figure 13.4: Updating in distance vector routing There are several points we need to emphasize here. First, as we know from mathematics,when we add any number to infinity, the result is still infinity. Second, themodified table shows how to reach A from A via C. If A needs to reach itself via C, itneeds to go to C and come back, a distance of 4. Third, the only benefit from this updatingof node A is the last entry, how to reach E. Previously, node A did not know how toreach E (distance of infinity); now it knows that the cost is 6 via C. Each node can update its table by using the tables received from other nodes. In ashort time, if there is no change in the network itself, such as a failure in a link, eachnode reaches a stable condition in which the contents of its table remains the same. When to Share The question now is, when does a node send its partial routing table (only two columns)to all its immediate neighbours? The table is sent both periodically and when there is achange in the table. Periodic Update A node sends its routing table, normally every 30 s, in a periodicupdate. The period depends on the protocol that is using distance vector routing.Triggered Update A node sends its two- column routing table to its neighbours anytimethere is a change in its routing table. This is called a triggered update. Thechange can result from the following. 1. A node receives a table from a neighbour, resulting in changes in its own table afterupdating. 2. A node detects some failure in the neighbouring links which results in a distancechange to infinity. Two-Node Loop Instability 197 CU IDOL SELF LEARNING MATERIAL (SLM)

A problem with distance vector routing is instability, which means that a network usingthis protocol can become unstable. To understand the problem, let us look at the scenariodepicted in figure 13.5. Figure 13.5: Two-node instability Figure 13.5 shows a system with three nodes. We have shown only the portions ofthe routing table needed for our discussion. At the beginning, both nodes A and B knowhow to reach node X. But suddenly, the link between A and X fails. Node A changes it stable. IfA can send its table to B immediately, everything is fine. However, the systembecomes unstable if B sends its routing table to A before receiving A's routing table.Node A receives the update and, assuming that B has found a way to reach X, immediatelyupdates its routing table. Based on the triggered update strategy, A sends its new update to B. Now B thinks that something has been changed around A and updates itsrouting table. The cost of reaching X increases gradually until it reaches infinity. At thismoment, both A and B know that X cannot be reached. However, during this time thesystem is not stable. Node A thinks that the route to X is via B; node B thinks that theroute to X is via A. If A receives a packet destined for X, it goes to B and then comesback to A. Similarly, if B receives a packet destined for X, it goes to A and comes backto B. Packets bounce between A and B, creating a two-node loop problem. A few solutionshave been proposed for instability of this kind. Link State Routing Link state routing has a different philosophy from that of distance vector routing. Inlink state routing, if each node in the domain has the entire topology of the domainthelist of nodes and links, how they are connected including the type, cost (metric), andcondition of the links (up or down)-the node can use Dijkstra's algorithm to build arouting table. Figure 13.6 shows the concept. 198 CU IDOL SELF LEARNING MATERIAL (SLM)

Figure 13.6: Concept of link state routing The figure shows a simple domain with five nodes. Each node uses the same topologyto create a routing table, but the routing table for each node is unique because the calculationsare based on different interpretations of the topology. This is analogous to a citymap. While each person may have the same map, each needs to take a different route toreach her specific destination. The topology must be dynamic, representing the latest state of each node and eachlink. If there are changes in any point in the network (a link is down, for example), thetopology must be updated for each node.How can a common topology be dynamic and stored in each node? No node canknow the topology at the beginning or after a change somewhere in the network. Linkstate routing is based on the assumption that, although the global knowledge about thetopology is not clear, each node has partial knowledge: it knows the state (type, condition,and cost) of its links. In other words, the whole topology can be compiled from thepartial knowledge of each node. Figure 13.7 shows the same domain as in figure 13.6,indicating the part of the knowledge belonging to each node. Figure 13.7: Link state knowledge 199 CU IDOL SELF LEARNING MATERIAL (SLM)

Node A knows that it is connected to node B with metric 5, to node C with metric 2,and to node D with metric 3. Node C knows that it is connected to node A with metric 2,to node B with metric 4, and to node E with metric 4. Node D knows that it is connectedonly to node A with metric 3. And so on. Although there is an overlap in theknowledge, the overlap guarantees the creation of a common topology-a picture ofthe whole domain for each node. Building Routing Tables In link state routing, four sets of actions are required to ensure that each node has therouting table showing the least-cost node to every other node. 1. Creation of the states of the links by each node, called the link state packet (LSP). 2. Dissemination of LSPs to every other router, called flooding, in an efficient andreliable way. 3. Formation of a shortest path tree for each node. 4. Calculation of a routing table based on the shortest path tree. Creation of Link State Packet (LSP) A link state packet can carry a large amountof information. For the moment, however, we assume that it carries a minimum amount of data: the node identity, the list of links, a sequence number, and age. The first two,node identity and the list of links, are needed to make the topology. The third, sequencenumber, facilitates flooding and distinguishes new LSPs from old ones. The fourth, age,prevents old LSPs from remaining in the domain for a long time. LSPs are generated on two occasions. 1. When there is a change in the topology of the domain. Triggering of LSP disseminationis the main way of quickly informing any node in the domain to update itstopology. 2. On a periodic basis. The period in this case is much longer compared to distancevector routing. As a matter of fact, there is no actual need for this type of LSP dissemination.It is done to ensure that old information is removed from the domain.The timer set for periodic dissemination is normally in the range of 60 min or 2 hbased on the implementation. A longer period ensures that flooding does not createtoo much traffic on the network.Flooding of LSPs After a node has prepared an LSP; it must be disseminated to allother nodes, not only to its neighbours. The process is called flooding and based on thefollowing. 1. The creating node sends a copy of the LSP out of each interface. 2. A node that receives an LSP compares it with the copy it may already have. If thenewly arrived LSP is older than the one it has (found by checking the sequencenumber), it discards the LSP. If it is newer, the node does the following. 200 CU IDOL SELF LEARNING MATERIAL (SLM)


Like this book? You can publish your book online for free in a few minutes!
Create your own flipbook