Bt 72 computer networks


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Bt 72 computer networks

  1. 1. BT 0072 Computer Networks Conte n ts Unit 1 Introduction 1 Unit 2 Physical Layer 33 Unit 3 Medium Access Sublayer 90 Unit 4 Data Link Layer – I 119 Unit 5 Data Link Layer – II 142 Uni t 6 Net work Layer – I 158 Unit 7 Network Layer – II 177 Unit 8 Transport Layer 207 Unit 9 Session Layer 241 Unit 10 Application Layer – I 257 Unit 11
  2. 2. Application Layer – II 283 Unit 12 Internet Security 309
  3. 3. Prof.V.B.Nanda Gopal Director & Dean Directorate of Distance Education Sikkim Manipal University of Health, Medical & Technological Sciences (SMU DDE) Board of Studies Dr.U.B.Pavanaja (Chairman) General Manager – Academics Manipal Universal Learning Pvt. Ltd. Bangalore. Prof.Bhushan Patwardhan Chief Academics Manipal Education Bangalore. Dr.Harishchandra Hebbar Director Manipal Centre for Info. Sciences. Manipal. Dr.N.V.Subba Reddy HOD-CSE Manipal Institute of Technology Manipal. Dr.Ashok Hegde Vice President MindTree Consulting Ltd Bangalore. Dr.Ramprasad Varadachar Director, Computer Studies Dayanand Sagar College of Engg. Bangalore. Mr.M.K.N.Prasad Controller of Examinations Sikkim Manipal University – DDE Manipal. Content Preparation Team Content Writing Mr.Nirmal Kumar Nigam Assistant Professor & HoP-IT Sikkim Manipal University – DDE Manipal. Mr.Nirmal Kumar Nigam HOP- IT Sikkim Manipal University – DDE Manipal. Dr.A.Kumaran Research Manager (Multilingual) Microsoft Research Labs India Bangalore. Mr.Ravindranath.P.S. Director (Quality) Yahoo India Bangalore. Dr.Ashok Kallarakkal Vice President IBM India Bangalore. Mr.H.Hiriyannaiah Group Manager EDS Mphasis Bangalore. Mr.Ashok Kumar K Additional Registrar Sikkim Manipal University - DDE Manipal. Content Editing Prof.K.Alok Agarwal Associate Professor ICFAI University Dehradun. Language Editing Dr.A.Lourdusamy HOD – English St.Aloysius College Mangalore. Edition: Spring 2009 This book is a distance education module comprising a collection of learning material for our students. All rights reserved. No part of this work may be reproduced in any form by any means without permission in writing from Sikkim Manipal University of Health, Medical and Technological Sciences, Gangtok, Sikkim. Printed and published on behalf of Sikkim Manipal University of Health, Medical and Technological Sciences, Gangtok, Sikkim by Mr.Rajkumar Mascreen, GM, Manipal Universal Learning Pvt. Ltd., Manipal – 576 104. Printed at Manipal Press Limited, Manipal.
  4. 4. SUBJECT INTRODUCTION This book is a walkthrough of all the layers of the ISO OSI model which is a preliminary requirement for a student to understand the world of networking. Traditionally the area of networking has gone drastic changes in accordance with the requirements of the user community. The layering in specific has been modified according to the current requirements. The units in this chapter provide a deep insight into the functionality of the networks along with their services offered to a host of machines. The reader is taken through a step-by-step approach to understand and implement those functionalities in the real world scenario by understanding on a layer to layer basis. Unit 1: Introduction This unit introduces computer networks and their applications in the real world scenario. The network types and their structures are discussed. The basic network architecture is presented. The base model of entire networking, the ISO OSI model is discussed in detail. The services offered by various types of networks are also discussed. The TCP/IP protocol is described along with its features and architecture. Unit 2: Physical Layer This unit discusses the physical layer which is involved in raw data transmission from source to destination machines. It describes various representations of data in the form of analog and digital signals. It discusses various possible errors during transmission called the Transmission impairments. The various types of transmission media used, the transmission and switching techniques are also highlighted. A detailed discussion of Integrated Services Digital Network is also done at the end of this unit. Unit 3: Medium Access Sublayer It starts with a detailed discussion on LANs and WANs. It describes the basic LAN protocols. It describes the IEEE 802 standards for LANS. It discusses the importance of Fiber Optic Networks and cabling used as backbone for LAN connectivity.
  5. 5. Unit 4: Data Link Layer – I This unit starts with the design issues of Data Link Layer and the application or usage of this layer in the OSI model. It discusses about various error detection and correction techniques. It describes the block coding techniques, Cyclic codes, and Checksum used for either error correction or error detection. It also describes the concept of Framing in Data Link Layer. Unit 5: Data Link Layer – II This unit describes the types of communication channels like Noisy and Noiseless channels. It describes the HDLC control technique of the Data Link Layer. It also describes the Point-to-Point Protocol. It discusses the importance and applications of Channelization. It discusses the IEEE 802.11 standard for Wireless LANs. It also describes various connecting devices used in LANs. Unit 6: Network Layer – I This unit starts with the design issues of the Network Layer. It describes the principles of Routing in Network Layer. It explains various routing algorithms adopted by the Network layer in message passing. At the end, a brief comparison of various routing algorithms is done. Unit 7: Network Layer – II This unit describes the various addressing schemes used by the network layer in identifying the hosts on a network. It describes both the IPV4 and IPV6 addressing schemes along with their comparisons. Unit 8: Transport Layer This unit provides the reader with the concepts of of the TCP/IP protocols like User Datagram Protocol (UDP), and the Transmission Control Protocol (TCP) and their related details. Unit 9: Session Layer This unit provides the reader with an overview of Session Layer, its design issues, services provided by it and the Remote Procedure Call Mechanisms. Unit 10: Application Layer – I This chapter provides an overview of the TCP/IP application protocols dealing with electronic mail, including Simple Mail Transport Protocol (SMTP), Sendmail, Multipurpose Internet Mail Extensions (MIME), Post Office Protocol (POP), and Internet Message Access Protocol (IMAP).
  6. 6. Unit 11: Application layer – II This unit introduces the components of DNS, the structure and architecture of DNS, the difference between domains and zones, define recursive and iterative queries and how DNS forward and reverse lookups work. It defines the various roles of DNS servers. Unit 12: Internet Security This unit starts with the basic concepts of Internet Security. It deals with the terminology associated with Internet Security. It then speaks about the IPSec. It gives an insight into the topics like SSL / TLS, PGP, Firewalls and so on relevant to the maintenance of Network Security. At the end it deals with Firewalls.
  7. 7. Computer Networks Unit 1 Unit 1 Introduction Structure: 1.0 Objectives 1.1 Introduction 1.2 Network Structures 1.3 Network Architecture 1.4 OSI Reference Model: An Overview 1.5 Network Services 1.6 TCP/IP Protocol Suite 1.7 Summary 1.8 Self Assessment Questions 1.9 Terminal Questions 1.10 Answers to Self Assessment Questions 1.11 Answers for Terminal Questions 1.0 Objectives The main objective of this unit is to make the reader understand the concept of data communications and computer networks. After completion of this unit the reader would be able to: • Explain the importance of Networks • Define and describe the ISO OSI Model • Describe the functionalities of each and every layer of the OSI Model • State the terminology associated with Network Services • Describe various Network Services like connectionless and connection – oriented • State the relationship between Network Services and Network Protocols • Describe TCP/IP Protocol Suite Sikkim Manipal University Page No. 1
  8. 8. Computer Networks Unit 1 1.1 Introduction Computer is an information tool. Networks enhance the computer‟s ability to exchange, preserve, and protect information. Networks make it easier to share expensive hardware and software. The type of information changes from business to business. The way that information is stored and worked with also varies. Personal Computer (PC)
  9. 9. It is a fantastic information tool. A PC is shipped from the manufacturer with minimum software to make it run and marginally useful; it is up to the user to customize it for his / her own purpose. Figure 1.1: A computer is a versatile tool that can perform many tasks when
  10. 10. configured with the software. Information constantly flows through the business. A publishing house collects market projections, receives manuscript drafts, delivers edited proofs, requests corrections and elaboration, and finally a book is sent to be printed. Before networks, people had to personally move the information about, whether it was on paper, over the phone, or on floppy disk or magnetic tape. When you use a computer not connected to a network, you are working in a stand – alone environment. In this environment, you can use software to produce data, graphics, spreadsheets, documents, and so Sikkim Manipal University Page No. 2
  11. 11. Computer Networks Unit 1 on, but to share information; you must print it out or put it on a floppy disk or CD – ROM so that someone else can use it. That is, you are moving the information about yourself rather than letting the computer do it for you. The Network Computers connected over a Network can make the information exchange easier and faster. The information moves directly from computer to computer rather than through a human intermediary. Due to this, people can concentrate on getting their work done rather than on moving information around the company. A group of computers and other devices connected together is called a Network, and the concept of connected computers sharing resources is called Networking. LAN: (Local Area Network) A LAN is a number of computers connected to each other by cables in a single location, usually a single floor of building or all the computers in a small company. A simple cabling method, known as the Bus Topology, allows about 30 computers on a maximum cable length of about 600 feet.
  12. 12. Figure 1.2: A network is a number of computers linked together to share
  13. 13. resources. Figure 1.2 shows a simple LAN. LANs are perfect for sharing resources within a small geographical area (Approx. 500 Meters), but they cannot be used to connect distant sites. Sikkim Manipal University Page No. 3
  14. 14. Computer Networks Unit 1 Another type of Network, called as Wide Area Network (WAN) addresses this need. WAN is a set of connecting links between LANs. The links in WAN can be made as follows: ♦ Over the telephone lines leased from various telephone companies. ♦ Using Satellite links ♦ Packet Radio Networks ♦ Microwave transceivers Figure 1.3: A WAN links computers in different locations Most WANs are private and are owned by the businesses that operate with them. Many companies are forming private WANs, known as the Virtual Private Networks (VPNs), through encrypted communication over the Internet. WANs suffer from extremely limited bandwidth. A typical LAN transmits at 10 Mbps, or 10 Million bits per second. A T1 line considered as a fast WAN
  15. 15. link, transmits at 1.5 Mbps, or 1 million bits per second, which makes the sharing of resources over a WAN difficult. Sikkim Manipal University Page No. 4
  16. 16. Computer Networks Unit 1 In general, WAN links are used only for inter-process communications to route short messages, such as e-mail or HTML traffic. 1.2 Network Structures In any network there exists a collection of machines for running user (or application) programs called Hosts. The Hosts are connected by the communication subnet, or just subnet. The job of the subnet is to carry messages from host to host. By separating the pure communication aspects of the network (the subnet) from the application aspects (the hosts), the complete network design is greatly simplified. In most Wide Area Networks, the subnet consists of two distinct components: Transmission Lines and Switching Elements. Transmission Lines (also called as circuits, channels, or trunks) move bits between machines. The Switching Elements are specialized computers to connect two or more transmission lines. When data arrives on an incoming line, the Switching Element must choose an outgoing line to forward them. The Switching Elements are also called as Interface Message Processors (IMPs). Each host is connected to one (or occasionally several) IMPs. All traffic to or from the host goes via its IMP. There are two types of designs for communication subnets: 1. Point – to – Point Channels 2. Broadcast Channels 1. In Point-to-Point channels, the network contains numerous cables or leased telephone line, each one connecting a pair of IMPs. If two IMPs that do not share a cable nevertheless wish to communicate, they must do this indirectly, via other IMPs. When a message in the form of a packet is sent from one IMP to another IMP via one or more Sikkim Manipal University Page No. 5
  17. 17. Computer Networks Unit 1 intermediate IMPs, the packet is received at each intermediate IMP in its entirety, stored there until the required output line is free, and then forwarded. A subnet using this principle is called a point-to-point, store-and-forward, or packet-switched subnet. When a point-to-point subnet is used, an important design issue is what the IMP interconnection topology should look like, LANs have a symmetric topology, whereas WANs have asymmetric topology. 2. Broadcasting: Most LANs and a small number of WANs are of this type. In a LAN, the IMP is reduced to a single chip embedded inside the host, so that there is always one host per IMP, whereas in a WAN there may be many hosts per IMP. Broadcast Systems have a single communication channel shared by all other machines on the network. Packets sent by any machine are received by all the others. An address field within the packet specifies for whom it is intended. Upon receiving a packet, a machine checks the address field. If the packet is intended for some other machine, it is just ignored. Broadcast systems also support transmission to a subset of machines, something known as Multicasting. A common scheme is to have all addresses with high order bit set to 1. The remaining n-1 address bits form a bit map corresponding to n-1 groups. Each machine can subscribe to any or all of the n-1 groups. 1.3 Network Architecture Modern computer networks are designed in a highly structured way. In the following discussion, we examine some of the structuring techniques. Protocol Hierarchies To reduce their design complexity, most networks are organized as a series of layers or levels, each one built upon its predecessor. The number of Sikkim Manipal University Page No. 6
  18. 18. Computer Networks Unit 1 layers, name, content, and function of each layer differs from network to network. In all networks, the purpose of each layer is to offer certain services to the higher layers, shielding those layers from details of how the offered services are actually implemented. Layer n on one machine carries on a conversation with layer n on another machine. The rules and conventions used in this conversation are collectively known as the Layer n protocol. The entities comprising the corresponding layers on different machines are called peer processes. It is the peer processes that communicate using the protocol. In reality, no data are directly transferred from layer n on one machine to layer n on another machine. Instead, each layer passes data and control information to the layer immediately below it, until the lowest layer is reached. Below layer 1 is the physical medium through which the actual communication occurs. Between each pair of adjacent layers there is an interface. The interface defines which primitive operations and services the lower layer offers to the upper one. For the designers of a network one of the most important considerations is defining clean interfaces between the layers. Doing so, in turn, requires each layer perform a specific collection of well-understood functions. In addition to minimizing the amount of information that must be passed between layers, clean-cut interfaces also make it simpler to replace the implementation of one layer with a completely different implementation, because all that is required in the new implementation is that it offer exactly the same set of services as the to its upstairs neighbor as the old implementation did. Sikkim Manipal University Page No. 7
  19. 19. Computer Networks Unit 1 The set of layers and protocols is called the Network Architecture. The specification of the architecture must contain enough information to allow an implementer to write the program or build the hardware for each layer so that it correctly obeys the appropriate protocol. Neither the details of the implementation nor the specification of the interfaces are part of the architecture because these are hidden away inside the machines and not visible from the outside. It is not even necessary that the interfaces on all machines in a network be the same, provided that each machine can correctly use all the protocols. Design Issues for Layers 1. Every layer must have a mechanism for connection establishment. Since a network normally has many computers, some of which have multiple processes, a means is needed for a process on one machine to specify with whom it wants to establish a connection. As a consequence of having multiple destinations, some form of addressing is needed in order to specify a specific destination. 2. Mechanisms for terminating the connections when they are no longer needed. 3. Data Transfer Rules:  Simplex Communication: In this type, data transfer occurs in only one direction, i.e., either from source to destination or destination to source machines.  Half-duplex Communication: In this type, data transfer occurs in either directions, but not simultaneously.  Full-duplex Communication: In this type, data transfer occurs in either directions simultaneously. The protocol must also determine the number of logical channels per connection along with their individual priorities. Many networks Sikkim Manipal University Page No. 8
  20. 20. Computer Networks Unit 1 provide at least two logical connections per channel, one for normal data, and one for urgent data. 4. Error Control Mechanisms: It is one of the important issues since physical communication circuits are not perfect. Many error-correcting and detecting codes are known, but both ends of the connection must agree on which one is being used. In addition, the receiver must have some way of telling the sender which messages have been correctly received and which have not. 5. Message Ordering: Not all communication channels preserve the ordering of messages sent on them. To deal with a possible loss of sequencing, the protocol must make explicit provision for the receiver to allow the pieces to be put back together properly. An obvious solution is to number the pieces, but this leaves open the question of what should be done with pieces that arrive out of order. 6. An issue that occurs at every level is how to keep a fast sender from swamping a slow receiver with data. All the proposed solutions have some kind of feedback mechanisms, wherein the receiver informs its current situation to the sender. 7. Another problem that must be solved at several levels is the inability of all processes to accept arbitrarily long messages. This property leads to mechanisms for disassembling, transmitting and then reassembling messages. A related issue is what to do when processes insist upon transmitting data in units that are so small that sending each one separately is inefficient. Here the solution is to gather together several small messages heading towards a common destination into a single large message and dismember the large message at the other site. 8. When it is inconvenient to set up a separate connection for each pair of communicating processes, the underlying layer may decide to use the Sikkim Manipal University Page No. 9
  21. 21. Computer Networks Unit 1 same connection for multiple, unrelated conversations. As long as this multiplexing and de-multiplexing is done transparently, it can be used by any layer. 9. When there are multiple paths between source and destination, a route must be chosen. Sometimes this decision must be split over two or more layers. 1.4 OSI Reference Model: An Overview The layered model that dominated data communications and networking literature before 1990 was the Open Systems Interconnection (OSI) model. Everyone believed that the OSI model would become the ultimate standard for data communications, but this did not happen. The TCP / IP protocol suite became the dominant commercial architecture because it was used and tested extensively in the Internet; the OSI model was never fully implemented. 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 OSI model, which was first introduced in 1970s. Open System: A set of protocols that allows any two different systems to communicate regardless of their underlying architecture. Purpose of OSI Model: It shows how to facilitate communication between different systems without requiring changes to the logic of underlying hardware and software. The OSI model is not a protocol; it is a model for understanding and designing a network architecture that is flexible, robust, and interoperable. The OSI Model is a layered framework for the design of network systems that allows communication between all types of computer systems. It Sikkim Manipal University Page No. 10
  22. 22. Computer Networks Unit 1 consists of seven separate but related layers, each of which defines a part of the process of moving information across a network. Layered Architecture: The OSI Model is composed of seven ordered layers: ♦ Layer 1 – The Physical Layer ♦ Layer 2 – The Data Link Layer ♦ Layer 3 – The Network Layer ♦ Layer 4 – The Transport Layer ♦ Layer 5 – The Session Layer ♦ Layer 6 – The Presentation Layer ♦ Layer 7 – The Application Layer Figure 1.5 below shows the layers involved when a message is sent from device A to device B. As the message travels from one device to another, it may pass through several intermediate nodes or devices. These intermediate nodes or devices usually involve only the first three layers of the OSI model. Sikkim Manipal University Page No. 11
  23. 23. Computer Networks Unit 1
  24. 24. Figure 1.5: The ISO OSI Model
  25. 25. In modeling the OSI model, the designers distilled the process of transmitting data to its most fundamental elements. They identified which networking functions had related uses and collected those functions into discrete groups that became the layers. Each layer defines a family of functions distinct from those of the other layers. By defining and localizing the functionality in this fashion, the designers created an architecture that is both comprehensive and flexible. Sikkim Manipal University Page No. 12
  26. 26. Computer Networks Unit 1 Within a single machine, each layer calls upon the services of the layer below it. Between machines, layer x on one machine communicates with layer x on another machine. This communication is governed by an agreed- upon series of rules and conventions called protocols. The processes on each machine that communicates at a given layer are called peer-to-peer processes. Communication between machines is therefore a peer-to-peer process using the protocols appropriate to a given layer. Peer-to-Peer Processes At the physical layer, the communication is direct. In the figure above, device A sends a stream of bits to device B (through intermediate nodes). At the higher layers, communication must move down through the higher layers on device A, over to device B, and then back up through the layers. Each layer in the sending device adds its own information to the message it receives from the layer just above it and passes the whole package to the layer just below it. At layer 1 the entire package is converted to a form that can be transmitted to the receiving device. At the receiving machine, the message is unwrapped layer by layer, with each process receiving and removing the data meant for it. Interfaces between Layers The passing of the data and the information down through the layers of the sending device and back up through the layers of the receiving device and back up through the layers of the receiving device is made possible by an interface between each pair of adjacent layers. Each interface defines the information and services a layer must provide for the layers above it. Well- defined interfaces and layer functions provide modularity to a network. As long as a layer provides the expected services to the layer above it, the specific implementation of its functions can be modified or replaced without requiring changes to the surrounding layers. Sikkim Manipal University Page No. 13
  27. 27. Computer Networks Unit 1 Layer Organization The seven layers can be thought of as belonging to three subgroups. Layers 1, 2, and 3 are the network support layers; they deal with the physical aspects of moving data from one device to another. Layers 5, 6, and 7 can be thought of as user support layers; they allow interoperability among unrelated software systems. Layer 4 links two subgroups and ensures that what the lower layers have transmitted is in a form that the upper layers can use. The upper OSI layers are almost always implemented in software, except for the physical layer which is mostly implemented in hardware. Layers in the OSI Model This section discusses the functions of all the 7 layers of OSI model. 1. Physical Layer: This layer coordinates the functions required to carry a bit stream over a physical medium. It deals with the electrical and mechanical specifications of the interface and transmission medium. It defines the procedures and functions that physical devices and interfaces have to perform for transmission to occur. 2. Data Link Layer: This layer transforms the physical layer, a raw transmission facility, to a reliable link. It makes the physical layer appear error-free to the upper layer (to the Network layer). It is also responsible for other functions such as framing, error control, flow control, physical addressing, and access control mechanisms. 3. Network Layer: This layer is responsible for the source-to-destination delivery of a packet, possibly across multiple networks (links). The Data Link Layer oversees the delivery of the packet between two systems on the same network (links), the network layer ensures that each packet gets from its point of origin to its final destination. If two systems are attached to the same link, there is no need for the network layer. Sikkim Manipal University Page No. 14
  28. 28. Computer Networks Unit 1 However, if the two systems are attached to different networks (links) with connecting devices between the networks (links), there is often a need for the network layer to accomplish source-to-destination delivery. Other responsibilities of the Network layer include logical addressing, and routing. 4. Transport Layer: This layer is responsible for process-to-process delivery of the entire message. A process is an application program running on the host. The Network layer oversees the source-to- destination delivery of individual packets, it does not recognize the relationship between those packets. It treats each packet independently, as though each piece belonged to a separate message, whether or not it does, The Transport layer, also ensures that the whole message arrives intact and in order, overseeing both error and flow control at the source- to-destination level. 5. Session Layer: This layer acts as the network dialog controller. It establishes, maintains, and synchronizes the interaction among communicating systems. 6. Presentation Layer: This layer is concerned with the syntax and semantics of the information exchanged between two systems. The specific responsibilities of this layer include Translation, Encryption, and Compression. 7. Application Layer: This 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 distributed information services. Specific services offered by the Application layer include: Provision of Network Virtual terminals, File transfer, access, and management, mail services, and Directory Services. Sikkim Manipal University Page No. 15
  29. 29. Computer Networks Unit 1
  30. 30. Figure 1.6: Summary of Layers in OSI Model Data Transmission in OSI Model The sending process has some data it wants to send to the receiving process. It gives the data to the application layer, which then attaches the application header, AH (which may be null), to the front of it and give the resulting item to the presentation layer.
  31. 31. The presentation layer may transform this item in various ways, where they are actually transmitted to the receiving machine. On the machine various headers are stripped off one by one as the message propagates up the layers until it finally arrives at the receiving process. Sikkim Manipal University Page No. 16
  32. 32. Computer Networks Unit 1 The key idea throughout is although actual data transmission is vertical, each layer is programmed as though it were really horizontal. 1.5 Network Services The real function of each layer is to provide services to the layer above it. i) Network Services Terminology 1. Entities: They are the active elements in each layer. An entity can be a software entity (For example, a process) or a hardware entity (For example, an intelligent I/O chip). 2. Peer Entities: Entities in the same layer on different machines 3. Service Provider and Service User: The entities in layer N implement a service used by layer N+1. Layer N is called the Service Provider and layer N+1 is called the Service User. 4. Service Access Points (SAPs): Services are available as SAPs. The layer N SAPs are the places where layer N+1 can access the services offered. Each SAP has an unique address that identifies it. 5. Interface Data Unit (IDU): For two layers to exchange information, there has to be an agreed upon set of rules about the interface. At a typical interface, the layer N+1 entity passes an IDU to the layer N entity through the SAP. 6. SDU (Service Data Unit): The IDU consists of an SDU (Service Data Unit) and some control information. The SDU is the information passed across the network to the peer entity and then up to layer N+1. The control information is needed to help the lower layer do its job, but is not part of the data itself. 7. PDU (Protocol Data Unit): In order to transfer the SDU, the layer N entity may have to fragment it into several pieces, each of which is given a header and sent as a separate PDU (Protocol Data Unit) such as a Sikkim Manipal University Page No. 17
  33. 33. Computer Networks Unit 1 packet. The PDU headers are used by the peer entities to carry out their peer protocol. They identify which PDUs contain data and which contain control information, provide sequence number counts, and so on. 8. Connection – Oriented Service: Modeled after the telephone system. To use a connection-oriented network service, the service user first establishes a connection, uses the connection, and terminates the connection. 9. Connection-less Service: Modeled after the Postal System. Each message carries the full destination address, and each one is routed through the system independent of all others. Network Models Computer networks are created by different entities. Standards are needed so that these heterogeneous networks can communicate with one another. The two best known standards are the OSI model and the Internet model. The OSI model defines a seven-layer network; the Internet model defines a five-layer network. 1.6 TCP / IP Protocol Suite The TCP/IP protocol suite has become a staple of today's international society and global economy. Continually evolving standards provide a wide and flexible foundation on which an entire infrastructure of applications are built. Through these we can seek entertainment, conduct business, make financial transactions, deliver services, and much more. The Transmission Control Protocol/Internet Protocol (TCP/IP) suite has become the industry-standard method of interconnecting hosts, networks, and the Internet. As such, it is seen as the engine behind the Internet and networks worldwide. Sikkim Manipal University Page No. 18
  34. 34. Computer Networks Unit 1 Although TCP/IP supports a host of applications, both standard and nonstandard, these applications could not exist without the foundation of a set of core protocols. Additionally, in order to understand the capability of TCP/IP applications, an understanding of these core protocols must be realized. Architecture, History, Standards, and Trends Today, the Internet and World Wide Web (WWW) are familiar terms to millions of people all over the world. Many people depend on applications enabled by the Internet, such as electronic mail and Web access. In addition, the increase in popularity of business applications places additional emphasis on the Internet. The Transmission Control Protocol/Internet Protocol (TCP/IP) protocol suite is the engine for the Internet and networks worldwide. Its simplicity and power has led to its becoming the single network protocol of choice in the world today. In this section, we give an overview of the TCP/IP protocol suite. We discuss how the Internet was formed, how it developed, and how it is likely to develop in the future. TCP/IP Architectural Model The TCP/IP protocol suite is so named for two of its most important protocols: Transmission Control Protocol (TCP) and Internet Protocol (IP). A less used name for it is the Internet Protocol Suite, which is the phrase used in official Internet standards documents. Internetworking The main design goal of TCP/IP is to build an interconnection of networks, referred to as an internetwork, or internet, that provide universal communication services over heterogeneous physical networks. The clear benefit of such an internetwork is the enabling of communication between Sikkim Manipal University Page No. 19
  35. 35. Computer Networks Unit 1 hosts on different networks, perhaps separated by a large geographical area. The words „internetwork‟ and „internet‟ are simply a contraction of the phrase interconnected network. However, when written with a capital “I”, the Internet refers to the worldwide set of interconnected networks. Therefore, the Internet is an internet, but the reverse does not apply. The Internet is sometimes called the connected Internet. The Internet consists of the following groups of networks: • Backbones: Large networks that exist primarily to interconnect other networks. Also known as network access points (NAPs) or Internet Exchange Points (IXPs). Currently, the backbones consist of commercial entities. • Regional networks connecting, for example, universities and colleges. • Commercial networks providing access to the backbones to subscribers, and networks owned by commercial organizations for internal use that also have connections to the Internet. • Local networks, such as campus-wide university networks. In most cases, networks are limited in size by the number of users that can belong to the network, by the maximum geographical distance that the network can span, or by the applicability of the network to certain environments. For example, an Ethernet network is inherently limited in terms of geographical size. Therefore, the ability to interconnect a large number of networks in some hierarchical and organized fashion enables the communication of any two hosts belonging to this internetwork. Figure 1.7 below shows two examples of internets. Each consists of two or more physical networks. Sikkim Manipal University Page No. 20
  36. 36. Computer Networks Unit 1
  37. 37. Figure 1.7: Internet examples: Two interconnected sets of networks, each seen as one logical network. Another important aspect of TCP/IP internetworking is the creation of a standardized abstraction of the communication mechanisms provided by each type of network. Each physical network has its own technology- dependent communication interface, in the form of a programming interface that provides basic communication functions (primitives). TCP/IP provides communication services that run between the programming interface of a physical network and user applications. It enables a common interface for these applications, independent of the underlying physical network. The architecture of the physical network is therefore hidden from the user and from the developer of the application. The application need only code to the standardized communication abstraction to be able to function under any type of physical network and operating platform. As is evident in figure 1.7, to be able to interconnect two networks, we need a computer that is attached to both networks and can forward data packets Sikkim Manipal University Page No. 21
  38. 38. Computer Networks Unit 1 from one network to the other; such a machine is called a router. The term IP router is also used because the routing function is part of the Internet Protocol portion of the TCP/IP protocol suite. To be able to identify a host within the internetwork, each host is assigned an address, called the IP address. When a host has multiple network adapters (interfaces), such as with a router, each interface has a unique IP address. The IP address consists of two parts: IP address = <network number><host number> The network number part of the IP address identifies the network within the internet and is assigned by a central authority and is unique throughout the internet. The authority for assigning the host number part of the IP address resides with the organization that controls the network identified by the network number. The TCP/IP protocol layers Like most networking software, TCP/IP is modeled in layers. This layered representation leads to the term protocol stack, which refers to the stack of layers in the protocol suite. It can be used for positioning (but not for functionally comparing) the TCP/IP protocol suite against others, such as Systems Network Architecture (SNA) and the Open System Interconnection (OSI) model. Functional comparisons cannot easily be extracted from this, because there are basic differences in the layered models used by the different protocol suites. By dividing the communication software into layers, the protocol stack allows for division of labor, ease of implementation and code testing, and the ability to develop alternative layer implementations. Layers communicate with those above and below via concise interfaces. In this regard, a layer provides a service to the layer directly above it and makes use of services provided by the layer directly below it. For example, the IP layer provides Sikkim Manipal University Page No. 22
  39. 39. Computer Networks Unit 1 the ability to transfer data from one host to another without any guarantee to reliable delivery or duplicate suppression. Transport protocols such as TCP make use of this service to provide applications with reliable, in-order, data stream delivery. Figure 1.8 shows how the TCP/IP protocols are modeled in four layers.
  40. 40. Figure 1.8: The TCP/IP protocol stack: Each layer represents a package of
  41. 41. Figure 1.8: The TCP/IP protocol stack: Each layer represents a package of
  42. 42. Figure 1.9: Detailed Architectural Model TCP/IP applications The highest-level protocols within the TCP/IP protocol stack are application protocols. They communicate with applications on other internet hosts and are the user-visible interface to the TCP/IP protocol suite. All application protocols have some characteristics in common: • They can be user-written applications or applications standardized and shipped with the TCP/IP product. Indeed, the TCP/IP protocol suite includes application protocols such as: – Telnet for interactive terminal access to remote internet hosts – File Transfer Protocol (FTP) for high-speed disk-to-disk file transfers – Simple Mail Transfer Protocol (SMTP) as an internet mailing system These are some of the most widely implemented application protocols, but many others also exist. Each particular TCP/IP implementation will include a lesser or greater set of application protocols. • They use either UDP or TCP as a transport mechanism. Remember that UDP is unreliable and offers no flow-control; so in this case, the application has to provide its own error recovery, flow control, and Sikkim Manipal University Page No. 25
  43. 43. Computer Networks Unit 1 congestion control functionality. It is often easier to build applications on top of TCP because it is a reliable stream, connection-oriented, congestion-friendly, and flow control-enabled protocol. As a result, most application protocols will use TCP, but there are applications built on UDP to achieve better performance through increased protocol efficiencies. • Most applications use the client/server model of interaction. IP Addressing IP addresses are represented by a 32-bit unsigned binary value. It is usually expressed in a dotted decimal format. For example, is a valid IP address. The numeric form is used by IP software. The mapping between the IP address and an easier-to-read symbolic name, for example,, is done by the Domain Name System (DNS). To identify a host on the Internet, each host is assigned an address, the IP address, or in some cases, the Internet address. When the host is attached to more than one network, it is called multihomed and has one IP address for each network interface. The IP address consists of a pair of numbers: IP address = <network number><host number> The network number portion of the IP address is administered by one of three Regional Internet Registries (RIR):  American Registry for Internet Numbers (ARIN): This registry is responsible for the administration and registration of Internet Protocol (IP) numbers for North America, South America, the Caribbean, and sub-Saharan Africa.  Reseaux IP Europeans (RIPE): This registry is responsible for the administration and registration of Internet Protocol (IP) numbers for Europe, Middle East, and parts of Africa. Sikkim Manipal University Page No. 26
  44. 44. Computer Networks Unit 1  Asia Pacific Network Information Centre (APNIC): This registry is responsible for the administration and registration of Internet Protocol (IP) numbers within the Asia Pacific region. IP addresses are 32-bit numbers represented in a dotted decimal form (as the decimal representation of four 8-bit values concatenated with dots). For example, is an IP address with 128.2 being the network number and 7.9 being the host number. Next, we explain the rules used to divide an IP address into its network and host parts. The binary format of the IP address is: 10000000 00000010 00000111 00001001 IP addresses are used by the IP protocol to uniquely identify a host on the Internet (or more generally, any internet). Strictly speaking, an IP address identifies an interface that is capable of sending and receiving IP datagrams. One system can have multiple such interfaces. However, both hosts and routers must have at least one IP address, so this simplified definition is acceptable. IP datagrams (the basic data packets exchanged between hosts) are transmitted by a physical network attached to the host. Each IP datagram contains a source IPaddress and a destination IP address. To send a datagram to a certain IP destination, the target IP address must be translated or mapped to a physical address. This might require transmissions in the network to obtain the destination's physical network address. Class-based IP addresses The first bits of the IP address specify how the rest of the address should be separated into its network and host part. The terms network address and netID are sometimes used instead of network number. Similarly, the terms host address and hostID are sometimes used instead of host number. Sikkim Manipal University Page No. 27
  45. 45. Computer Networks Unit 1 There are five classes of IP addresses as shown in Figure 1.10. Figure 1.10: Assigned classes of IP addresses Where: Class A addresses: These addresses use 7 bits for the <network> and 24 bits for the <host> portion of the IP address. This allows for 27 -2 (126) networks each with 224 -2 (16777214) hosts – a total of more than 2 billion addresses. Class B addresses: These addresses use 14 bits for the <network> and 16 bits for the <host> portion of the IP address. This allows for 214 -2 (16382) networks each with 216 -2 (65534) hosts – a total of more than 1 billion addresses. Class C addresses: These addresses use 21 bits for the <network> and 8 bits for the <host> portion of the IP address. That allows for
  46. 46. 221 -2 (2097150) networks each with 28 -2 (254) hosts – a total of more than half a billion addresses. Sikkim Manipal University Page No. 28
  47. 47. Computer Networks Unit 1 Class D addresses: These addresses are reserved for multicasting (a sort of broadcasting, but in a limited area, and only to hosts using the same Class D address). Class E addresses: These addresses are reserved for future or experimental use. Class A address is suitable for networks with an extremely large number of hosts. Class C addresses are suitable for networks with a small number of hosts. This means that medium-sized networks (those with more than 254 hosts or where there is an expectation of more than 254 hosts) must use Class B addresses. However, the number of small- to medium-sized networks has been growing very rapidly. It was feared that if this growth had been allowed to continue unabated, all the available Class B network addresses would have been used by the mid-1990s. This was termed the IP address exhaustion problem. The division of an IP address into two parts also separates the responsibility of selecting the complete IP address. The network number portion of the address is assigned by the RIRs. The host number portion is assigned by the authority controlling the network. As shown in the next section, the host number can be further subdivided: This division is controlled by the authority that manages the network. It is not controlled by the RIRs. Reserved IP addresses A component of an IP address with a value of all bits 0 or all bits 1 has a special meaning:  All bits 0: An address with all bits zero in the host number portion is interpreted as „this’ host (IP address with <host address>=0). All bits zero in the network number portion is this network (IP address with <network address>=0). When a host wants to communicate over a network, but does not yet know the network IP address, it can send Sikkim Manipal University Page No. 29
  48. 48. Computer Networks Unit 1 packets with <network address>=0. Other hosts in the network interpret the address as meaning this network. Their replies contain the fully qualified network address, which the sender records for future use.  All bits 1: An address with all bits 1 is interpreted as all networks or all hosts. For example, the following means all hosts on network 128.2 (Class B address): This is called a directed broadcast address because it contains both a valid <network address> and a broadcast <host address>.  Loopback: The Class A network is defined as the loopback network. Addresses from that network are assigned to interfaces that process data within the local system. These loopback interfaces do not access a physical network. Special use IP addresses: RFC 3330 discusses special use IP addresses. We provide a brief description of these IP addresses in Table 1.1. Table 1.1: Special use IP addresses
  49. 49. Sikkim Manipal University Page No. 30
  50. 50. Computer Networks Unit 1 1.7 Summary This unit started with introduction to computer networks and their applications in the real world scenario. The types of networks along with their structures were discussed. The basic network architecture is presented. The base model of entire networking, the ISO OSI model was discussed in detail. The services offered by various types of networks are also discussed. The latest TCP/IP protocol adopted by all networks is also presented along with its features. 1.8 Self Assessment Questions 1. A group of computers and other devices connected together is called a network, and the concept of connected computers sharing resources is called _______. 2. A simple cabling method, known as the _____ Topology, allows about 30 computers on a maximum cable length of about 600 feet. 3. ____ is a set of connecting links between LANs. 4. A ____ line considered as a fast WAN link, transmits at 1.5 Mbps, or 1 million bits per second. 5. The ______ elements are specialized computers to connect two or more transmission lines. 6. In ________, the network contains numerous cables or leased telephone line, each one connecting a pair of IMPs. 7. The entities comprising the corresponding layers on different machines are called _______ processes. 1.9 Terminal Questions 1. Write about different network structures in use. 2. Write about the ISO OSI Model 3. Write about TCP/IP Protocol suite Sikkim Manipal University Page No. 31
  51. 51. Computer Networks Unit 1 1.10 Answers to Self Assessment Questions 1. Networking 2. Bus 3. WAN 4. T1 5. Switching 6. Point-to-Point channels 7. peer 1.11 Answers for Terminal Questions 1. Refer to section 1.2 2. Refer to section 1.4 3. Refer to section 1.6 Sikkim Manipal University Page No. 32
  52. 52. Computer Networks Unit 2 Unit 2 Physical Layer
  53. 53. Structure: 2.0 Objectives 2.1 Analog and Digital Signals 2.2 Periodic Analog Signals 2.3 Transmission Impairments 2.4 Data Rate Limits 2.5 Transmission Media 2.6 Transmission and Switching 2.7 ISDN – Integrated Services Digital Network 2.8 Summary 2.9 Self Assessment Questions 2.10 Terminal Questions 2.11 Answers to Self Assessment Questions 2.12 Answers to Terminal Questions 2.0 Objectives This unit is mainly intended to enable the reader understand how the data transmission is done in a networked environment. After completion of this unit you will be able to: • Define and Distinguish between various kinds of signals • Describe transmission impairments and their affects on data transmission • Define the limitations posed by data rates • Describe the network performance with respect to various signaling mechanisms • Define and distinguish various transmission media • Compare and contrast various switching techniques • Define and describe ISDN and its services Sikkim Manipal University Page No. 33
  54. 54. Computer Networks Unit 2 2.1 Analog and Digital Signals One of the major functions of the physical layer is to move data in the form of electromagnetic signals across a transmission medium. The data usable to a person or application is not in a form that can be transmitted over a network. Fro example, a photograph must first be changed to a form that transmission media can accept. Transmission media works by conducting energy along a physical path. Both data and the signals that represent them can be either analog or digital in form. – Analog Data: It refers to information that is continuous. Example: An analog clock that has hour, minute, and second hands gives information in a continuous form; the movement of the hands are continuous. – Digital Data: It refers to information that has discrete states. Example: A digital clock that reports the hours and minutes will change suddenly from 8:05 to 8:06. Like the data they represent, signals can be either analog or digital. – Analog Signal: It has infinitely many levels of intensity over a period of time. As the wave moves from value A to value B, it passes through and it includes an infinite number of values along its path. – Digital Signal: It can have only limited number of defined values. Although each value can be any number, it is often as simple as 0 or 1. The simplest way to show signals is by plotting them on a pair of perpendicular axes. The vertical axis represents the value or strength of a signal. The horizontal axis represents time. Figure 2.1 below illustrates an analog signal and a digital signal. The curve represents the analog signal through an infinite number of points. The vertical lines of the digital signal, Sikkim Manipal University Page No. 34
  55. 55. Computer Networks Unit 2 however, demonstrate the sudden jump that the signal makes from value to value. Value Value Time Time a. Analog Signal b. Digital Signal Figure 2.1: Comparison of Analog and Digital Signals Periodic and Nonperiodic Signals Both analog and digital signals can take one of two forms: Periodic and Nonperiodic. A periodic signal completes a pattern within a measurable time frame called a period and repeats that pattern over subsequent identical periods. The completion of one full pattern is called a cycle. A nonperiodic signal changes without exhibiting a pattern or cycle that repeats over time. Both analog and digital signals can be periodic or nonperiodic. In data communications, we commonly used periodic analog signals (since they need less bandwidth) and nonperiodic digital signals (since they can represent variation in data). 2.2 Periodic Analog Signals These signals can be classified as simple or composite. A simple periodic analog signal, a sine wave, cannot be decomposed into simpler signals. A composite periodic signal is composed of multiple sine waves.
  56. 56. Sikkim Manipal University Page No. 35
  57. 57. Computer Networks Unit 2 Sine Wave The sine wave is the most fundamental form of a periodic analog signal. When we visualize it as a simple oscillating curve, its change over the course of a cycle is smooth and consistent, a continuous rolling flow. Figure 2.2 below shows a sine wave. Each cycle consists of a single arc above the time axis followed by a single arc below it. Value Time Figure 2.2: A Sine Wave A Sine wave can be represented by three parameters: 1. Peak Amplitude: The Peak Amplitude of a signal is the absolute value of its highest intensity, proportional to the energy it carries. For electric signals, peak amplitude is normally measured in volts. 2. Frequency: Period refers to the amount of time in seconds, a signal needs to complete one cycle. Frequency refers to the number of periods in 1 s. Period is the inverse of frequency and so on. Period is formally expressed in seconds. Frequency is formally expressed in Hertz (Hz). Frequency is the rate of change with respect to time. Change in a short span of time means high frequency. Change over a long span of time means low frequency. If a signal does not change at all, its frequency is zero. If a signal changes instantaneously, its frequency is infinite. Sikkim Manipal University Page No. 36
  58. 58. Computer Networks Unit 2 Table 2.1 Units of period and frequency Unit Equivalen t Unit Equivalent Second (s) 1 s Hertz (Hz) 1 Hz Milliseconds (ms) 10–3 s Kilohertz (kHz) 103 Hz Microseconds ( µ s) 10–6 s Megahertz (MHz) 106 Hz Nanoseconds (ns) 10–9 s Gigahertz (GHz) 109 Hz Picoseconds (ps) 10–12 s Terahertz (THz) 1012 Hz 3. Phase: This term describes the position of the waveform relative to time 0. If we think of the wave as something that can be shifted backward or forward along the time axis, phase describes the amount of that shift. It indicates the status of the first cycle. Phase is measured in degree or radians [3600 is 2∏ rad; 10 is 2/360 rad, and 1 rad is 360/2]. A phase shift of 3600 corresponds to a shift of a complete period; and a phase shift of 1800 corresponds to s shift of one-half of a period; and a phase shift of 900 corresponds to a shift of one-quarter of a period. Wavelength: It is a characteristic of a signal traveling through a transmission medium. Wavelength binds the period or the frequency of a simple sine wave to the propagation speed of the medium. While the frequency of a signal is independent of the medium, the wavelength depends on both the frequency and the medium. It is a property of any type of signal. In data communications, we often use wavelength to describe the transmission of light in an optical fiber. This wavelength is the distance a simple signal can travel in one period. It can be calculated if one is given the propagation speed (the speed of light) and the period of the signal. However, since period and frequency are related to each other, if we represent the wavelength
  59. 59. by, propagation speed by c (speed of light), and frequency by f, we get: Sikkim Manipal University Page No. 37
  60. 60. Computer Networks Unit 2 Wavelength = propagation speed X period = Propagation Speed / frequency c i.e., λ = f The wavelength is normally measured in micrometers (micro) instead of meters. Time and Frequency Domains A sine wave is comprehensively defined by its amplitude, frequency, and phase. The time domain plot of a sine wave shows changes in signal amplitude with respect to time. Phase is not explicitly shown on a time domain plot. To show the relationship between amplitude and frequency, we can use what is called a frequency-domain plot. A frequency domain plot is concerned with only the peak value and the frequency. Changes of amplitude during the period are not shown.
  61. 61. Figure 2.3: The time-domain and frequency domain plots of a sine wave A complete sine wave is represented by one spike. The position of the spike shows the frequency, the height shows the peak amplitude. Sikkim Manipal University Page No. 38
  62. 62. Computer Networks Unit 2 Composite Signals A composite signal is made of many sine waves. Fourier showed that any composite signal is actually a combination of simple sine waves with different frequencies, amplitudes and phases. A composite signal can be periodic or nonperiodic. A periodic composite signal can be decomposed into a series of simple sine waves with discrete frequencies – frequencies that have integer values (1,2,3, and so on). A nonperiodic composite signal can be decomposed into a combination of an infinite number of simple sine waves with continuous frequencies, frequencies that have real values. Figure 2.4: A composite periodic signal Figure below shows the result of decomposing the above signal in both time and frequency domains. Sikkim Manipal University Page No. 39
  63. 63. Computer Networks Unit 2
  64. 64. Figure 2.5: Decomposition of a composite periodic signal in time and frequency. The amplitude of the sine wave with frequency f is almost the same as the peak amplitude of the composite signal. The amplitude of the sine wave with frequency 3f is one-third of that of the first, and the amplitude of the sine wave with frequency 9f is one-ninth of the first. If the frequency of the sine wave with frequency f is the same as the frequency of the composite signal; it is called the fundamental frequency or first harmonic. If the sine wave with frequency 3f has a frequency of 3 times the fundamental frequency; it is called the third harmonic. The sine wave with frequency 9f has a frequency of 9 times the fundamental frequency; it is called the ninth harmonic. Bandwidth The range of frequencies contained in a composite signal is its bandwidth. The bandwidth is normally a difference between two numbers. For example, if a composite signal contains frequencies between 1000 and 5000, its bandwidth is 5000 – 1000 or 4000. Figure below shows the concept of bandwidth. The figure below depicts two composite signals, one periodic and the other nonperiodic. The bandwidth of the periodic signal contains all integer frequencies between 1000 and 5000. Sikkim Manipal University Page No. 40
  65. 65. Computer Networks Unit 2 The bandwidth of the nonperiodic signals has the same range, but the frequencies are continuous.
  66. 66. Figure 2.6: The bandwidth of periodic and nonperiodic composite signals Digital Signals Information can also be represented by digital signals. For example, a 1 can be encoded as a positive voltage and a 0 as zero voltage. A digital signal can have more than two levels. In this case, we can send more than 1 bit for each level. Figure 2.7 shows two signals, one with two levels and other with four levels. Sikkim Manipal University Page No. 41
  67. 67. Computer Networks Unit 2
  68. 68. Figure 2.7: Two digital signals: One with two signal levels and one with four signal levels. We send one bit per level in part ‘a’ of the figure and 2 bits per level in part b of the figure. In general, if a signal has L levels, each level needs log2 L bits.
  69. 69. Bit Rate The number of bits sent in 1s, expressed in bits per second (bps). Bit Length The distance one bit occupies on the transmission medium. Bit length = propagation speed x bit duration Digital Signal as a Composite Analog Signal Based on Fourier Analysis, a digital signal is a composite analog signal. The bandwidth of such a signal is infinite. A digital signal in the time domain comprises connected vertical and horizontal line segments. A vertical line in Sikkim Manipal University Page No. 42
  70. 70. Computer Networks Unit 2 the time domain means a frequency of infinity (sudden change in time); a horizontal line in the time domain means a frequency of zero (no change in time). Going from a frequency of zero to a frequency of infinity (and vice versa) implies all frequencies in between are part of the domain. Fourier analysis can be used to decompose a digital signal. If the digital signal is periodic, which is rare in data communications, the decomposed signal has a frequency-domain representation with infinite bandwidth and discrete frequencies. If the digital signal is nonperiodic, the decomposed signal has an infinite bandwidth, but the frequencies are continuous.
  71. 71. Figure 2.8: Time and Frequency domains of digital Signals Transmission of Digital Signals How can we send a digital signal from point A to point B? We can transmit a digital signal by using one of two different approaches: Baseband Transmission or Broadband Transmission (using Modulation). Baseband Transmission: It means sending a digital signal over a channel without changing the digital signal to an analog signal. Figure 2.9 below shows baseband transmission. Sikkim Manipal University Page No. 43
  72. 72. Computer Networks Unit 2 Digital Signal Channel Figure 2.9: Baseband Transmission Baseband transmission requires that we have a low-pass channel, a channel with a bandwidth that starts from zero. This is the case if we have a dedicated medium with a bandwidth constituting only one channel. For example, the entire bandwidth of a cable connecting two computers is one single channel.
  73. 73. Figure 2.10 below shows two low-pass channels: one with a narrow bandwidth and the other with a wide bandwidth. Figure 2.10: Bandwidth of two low pass channels Sikkim Manipal University Page No. 44
  74. 74. Computer Networks Unit 2 2.3 Transmission Impairments Analog signals consist of varying voltage with time to represent an information steam. If the transmission media were perfectly, the receiver could receive exactly the same signal that the transmitter sent. But communication lines are usually not perfect, so the receive signal is not the same as the transmitted signal. For digital data this difference can lead to errors. Transmission lines suffers from three major problems 1. Attenuation distortion 2. Delay distortion 3. Noise Attenuation distortion It is the loss of energy as the signal propagates outward. The amount of energy depends on the frequency. The signal attenuates as shown in figure 2.11 as it propagates. If the attenuation is too much, the receiver may not be able to detect the signal at all, or the signal may fall below the noise level. For reliable communication, the attenuation and delay over the range of frequencies of transmission should be constant.
  75. 75. Figure 2.11: Signals loose power at it travels time Issues 1. Signals must be sufficiently strong so that the receiver will be able to detect and interpret them 2. They should maintain a sufficient high level to make them distinguishable from noise 3. Too strong signals can overload the circuitry of the transmitter and result in distortion. Sikkim Manipal University Page No. 45
  76. 76. in log Computer Networks Unit 2 4. They should take into account that attenuation increases with the frequency. Attenuation is measured in Bel as Pow er 10 Pow er out Bel
  77. 77. It can be also expressed in decibel (dB) as o in Pow e 20 * log 10 Pow er r ut Decibel Decibels are commonly used because 1. Signal strengths often fall off logarithmically 2. Cascade losses and gains can be calculated with simple additions and subtractions. Delay distortion The second transmission impairment is delay distortion. Communication lines have distributed inductance and capacitance, which distort the amplitude of signals and also delay the signals at different frequencies by different amounts. It is caused by the fact that different Fourier components travel at different speed. The delay distortion is illustrated as shown in figure 2.12. It is due to velocity of propagation the frequency varies. Thus, various frequency components of a signal arrive at the receiver at different times. Figure 2.12: Delay distortion
  78. 78. Sikkim Manipal University Page No. 46
  79. 79. Computer Networks Unit 2 For digital data, fast components from one bit may catch up and over take slow component from bit ahead, mixing the two bits and increasing the probability of incorrect reception. Thus it is very critical in particular for digital data, that is because signal components of bit positions spill into other bit positions, and so limiting the allowed rate of transmission. Dispersion
  80. 80. Figure 2.13: Signal is dispersed Signals tend to spread as they travel, with the amount of spreading dependent on the frequency. It is illustrated as shown in figure 2.13. Noise Noise is a third impairment. It can be define as unwanted energy from
  81. 81. Noise is a third impairment. It can be define as unwanted energy from sources other than the transmitter. Thermal noise is caused by the random motion of the electrons in a wire and is unavoidable. Consider a signal as shown in figure 2.14, to which a noise shown in figure 2.15 is added may be in the channel. Figure 2.14: Signal
  82. 82. Figure 2.15: Noise Sikkim Manipal University Page No. 47
  83. 83. Computer Networks Unit 2
  84. 84. Figure 2.16: Signal + Noise At the receiver, the signal is recovered from the received signal and is shown in figure 2.16. That is signals are reconstructed by sampling. Increased data rate implies "shorter" bits with higher sensitivity to noise
  85. 85. Source of Noise Thermal: Agitates the electrons in conductors, and is a function of the temperature. It is often referred to as white noise, because it affects uniformly the different frequencies. • The thermal noise in a bandwidth W is N = kTW Where T=temperature, and k= Boltzmann's constant = 1.38 10-23 Joules/degrees Kelvin. S • Signal to noise ratio: : SNR(dB) = N dB Noise Pow er SNR(dB) = 10 * log10 signal Pow er It is typically measured at the receiver, because it is the point where the noise is to be removed from the signal. Intermodulation: Results from interference of different frequencies sharing the same medium. It is caused by a component malfunction or a signal with excessive strength Sikkim Manipal University Page No. 48
  86. 86. Computer Networks Unit 2 is used. For example, the mixing of signals at frequencies f1 and f2 might produce energy at the frequency f1 + f2. This derived signal could interfere with an intended signal at frequency f1 + f2. Cross talk: Similarly cross talk is a noise where foreign signal enters the path of the transmitted signal. That is, cross talk is caused due to the inductive coupling between two wires that are close to each other. Sometime when talking over the telephone, you can hear another conversation in the background. That is cross talk. Impulse: These are noise owing to irregular disturbances, such as lightning, flawed communication elements. It is a primary source of error in digital data. 2.4 Data Rate Limits A very important consideration in data communications is how fast we can send data, in bits per second, over a channel. Data rate depends on three factors: 1. The bandwidth available 2. The level of the signals we use 3. The quality of the channel (the level of noise) Two theoretical formulae were developed to calculate the data rate: one by Nyquist for a noiseless channel, another by Shannon for a noisy channel. Noiseless channel: Nyquist Rate For a noiseless channel, the Nyquist bit rate formula defines the theoretical maximum bit rate. BitRate = 2 x bandwidth x log2 L Sikkim Manipal University Page No. 49
  87. 87. Computer Networks Unit 2 Bandwidth is the banwidth of the channel. L is the number of signal levels used to represent data, and BitRate is the bit rate in bits per second. Noisy Channel: Shannon Capacity In reality, we cannot have a noiseless channel; the channel is always noisy. In 1944, Claude Shannon introduced a formula called the Shannon Capacity, to determine the theoretical highest data rate for a noisy channel. Capacity = bandwidth x log2 (1 + SNR) In the above formula, bandwidth is the bandwidth of the channel, SNR is the signal-to-noise ratio, and capacity is the capacity of the channel in bits per second. This formula defines the characteristic of the channel, not the method of transmission. 2.5 Transmission medium Transmission media: Transmission media is the physical path between the transmitter and receiver. It can be guided or unguided. Guided & Unguided Transmission medium Guided media provides a guided (by a solid medium) path for propagation of signals such as twisted pairs, coaxial cables, optical fibers etc. Unguided media employ an antenna for transmitting through air, vacuum or water. This form of transmission is referred to as wireless transmission. For example Broadcast radio, satellite etc. Selection of transmission Media depends on the characteristics and quality of data transmission which are in turn determined by characteristics of the medium and signal. For guided media the medium itself in determining the limitations of transmission. For Unguided media BW of the signal produced at the transmitting antenna is more important than characteristics of the transmission
  88. 88. characteristics. Sikkim Manipal University Page No. 50
  89. 89. Computer Networks Unit 2 In general, signals at lower frequencies are omni directional (all directions) and at higher frequencies are directional (focused). The key concern in design of data transmission system is Data Rate and Distance: The greater the data rate and distance, the better. Factors used to determine data rate and distance: • Bandwidth (BW): Greater the BW of the signal, higher the data rate that can be achieved. • Transmission impairment: These limit the distance. Twisted pair suffers more impairment than coaxial cable which in turn suffers more than optical fiber. • Interference: Overlapping frequency bands can distort/wipeout a signal. It is of more concern for unguided media than guided. For guided it can be caused due to nearby cables. Proper shielding of cables can minimize this problem. • Number of receivers: Point to point links are used or a shared link is used with multiple attachments. In a shared link, each attachment introduces some attenuation and distortion on the line limiting the distance and/or data rate. • For guided media the transmission capacity depends on data rate or BW and depends critically on the distance (whether medium is p-p or multipoint) Twisted pair They are least expensive and most widely used. They are easier to work with but limited in terms of data rate and distance. Sikkim Manipal University Page No. 51
  90. 90. Computer Networks Unit 2 Physical Description
  91. 91. Computer Networks Unit 2 Physical Description
  92. 92. Computer Networks Unit 2 Physical Description
  93. 93. Computer Networks Unit 2 Physical Description
  94. 94. Figure 2.17: a) CAT 3 UTP and b) CAT 5 UTP It consists of two insulated cu wires arranged in regular spiral pattern as shown in Figure 2.17. Wire pair acts like a communication link. Usually numbers of these pairs are bundled together in a protective sheath into a cable. Twisting tends to decrease the crosstalk. On long distance links, the twist length typically varies from 5-15 cm. The thickness of wires may be 0.4-0.9mm. Over long distance, cables may contain hundreds of pairs. It is most common for both analog and digital signals. It is commonly used in telephone network and is the workhouse for communication within buildings. Example: Individual residential telephone or in an office building. These were designed to support voice traffic using analog signaling. However it can handle digital data traffic at modest data rates. It is also commonly used for digital signaling with the use of a digital switch or digital PBX with data rate of 64kbps commonly. It is for LAN supporting PC’s with commonly 10Mbps (now a days may 1Gbps also is possible). For long distance Twisted pair 4Mbps or more is used. Transmission characteristics Twisted pair can be used for both analog and digital transmission. For analog signals, amplifiers are required about every 5-6km. For digital transmission (analog and digital signals), repeaters are required every 2- 3kms. Attenuation is a very strong function of frequency. Other impairments Sikkim Manipal University Page No. 52
  95. 95. Computer Networks Unit 2 are also severe for twisted pair. It is susceptible to interference and noise. Impulse noise can also intrude easily. Application as LAN Cables Unshielded Twisted Pair Cable (UTP) which is typically 1mm thick with a minimum number of twist per foot. Twisting reduces electrical interference. They run several kilometers without amplifications, repeaters are needed. They are used for transmitting either analog or digital signals. There are different categories of UTP’s that are used. They are: • CAT3 Cable: They are less expensive. It consists of 4 pairs grouped in plastic sheet to protect the wires. They are mostly used in office buildings. Bandwidth of 16 to 100 MHz signals can be handled • CAT5 Cable: They are similar to CAT3, but are with more twists/cm. They have less crosstalk and provide better quality over long distance. They are suitable for high speed computer communication. Bandwidth 16 to 100 MHz signals can be handled. • CAT6 & CAT7 Cable: They are still more improved version than CAT 5. They are suitable for higher bandwidth of 250MHz and 600MHz Coaxial Cable Coaxial cable has traditionally been an important part of the long distance telephone network. Today, it faces increasing competition from optical fiber, terrestrial microwave, and satellite. Using frequency-division multiplexing (FDM), a coaxial cable can carry over 10,000 voice channels simultaneously. Sikkim Manipal University Page No. 53
  96. 96. Computer Networks Unit 2 Physical Description Figure 2.18: Coaxial cable Coaxial cable, like twisted pair, consists of two conductors, but constructed differently to permit it to operate over a wider range frequency. It consists of hollow outer cylindrical conductor that surrounds a single inner wire conductor. The inner conductor is held in place by either regularly spaced insulating rings or a solid dielectric material. The outer conductor is covered with jacket or shield. The physical description is illustrated in Figure 2.18. A
  97. 97. single coaxial cable has a diameter of from 1 to 2.5cm. Because of its shielded, concentric construction, coaxial cable is much less susceptible to interference and crosstalk than twisted pair. Coaxial cable can be used over long distances and support more stations on a shared line than twisted pair. Coaxial cable is perhaps the most versatile transmission medium and is enjoying widespread use in a wide variety of applications. The most important of these are used in television distribution and long-distance telephone transmission. Also they find applications in Short-run computer system links and Local Area Networks. Coaxial cable is spreading rapidly as a means of distributing TV signals to individual homes-cable TV. From its modest beginnings as Community Antenna Television (CATV), designed to provide service to remote areas, cable TV will eventually reach almost as many homes and offices as the telephone. A cable TV system can carry dozens or even hundreds of TV channels at ranges up to a few tens of kilometers. Coaxial cable is also Sikkim Manipal University Page No. 54
  98. 98. Computer Networks Unit 2 commonly used for short range connections between devices. Using digital signaling, coaxial cable can be used to provide high-speed I/O channels on computer systems. Transmission Characteristics Coaxial cable is used to transmit both analog and digital signals. Coaxial cable has frequency characteristics that are superior to those of twisted pair, and can hence be used effectively at higher frequencies and data rates. Because of its shielded, concentric construction, coaxial cable is much less susceptible to interference and crosstalk than twisted pair. The principal constraints on performance are attenuation, thermal noise, and inter-modulation noise. The latter is present only when several channels (FDM) or frequency bands are in use on the cable. For long-distance transmission of analog signals, amplifiers are needed every few kilometers, with closer spacing, if higher frequencies are used. The usable spectrum for analog signaling extended to about 500MHz. For digital signaling, repeaters are needed every kilometer or so, with closer spacing needed for higher data rates. Application of LAN Cables Co-axial cable has better shielding than twisted pairs and can span longer distance at higher speeds. There are two types of coaxial cable that are used in LAN and are illustrated in figure 2.19. • Thick coax: They are used for Ethernets but are difficult to work with and are expensive. It has greater degree of noise immunity and is strong. It requires vampire tap and a drop cable to connect to the network. • Thin coax: They are easier to work and less expensive. It carries signals over shorter distance and is preferred over thick coax as it needs Sikkim Manipal University Page No. 55
  99. 99. Computer Networks Unit 2
  100. 100. simple BNC connector. They are flexible, cheaper, soft and ideal for
  101. 101. Figure 2.19: Thin and Thick coaxial cable Optical Fiber An optical fiber is a thin, flexible medium capable of guiding an optical ray. Total internal reflection is the basic principle on which the transmission of data takes place through fibers. If the angle of incidence is sufficiently large, then the light in the fiber will reflect repeatedly in the interface between the
  102. 102. Figure 2.20: Total internal reflection Sikkim Manipal University Page No. 56
  103. 103. Computer Networks Unit 2 Physical Description
  104. 104. Figure 2.21: (a) Side view of a single fiber (b) view of sheath with three fibers An optical fiber has a cylindrical shape and consists of three concentric sections; the core, the cladding and the jacket. The core is the inner most sections and consists of one or more very thin strands or fibers, made of glass or plastic and is as shown in Figure 2.21. The core has a diameter in the range of 8 to 100µm. Each fiber is surrounded by its own cladding, a
  105. 105. glass or plastic coating that has optical properties different from those of the core. Various glasses and plastics can be used to make optical fibers. The lowest losses have been obtained using fibers of ultra-pure fused silica. Ultra pure fiber is difficult to manufacture; higher loss multi component glass fibers are more economical and still provide good performance. Plastic fiber is even less costly and can be used for short-haul links, for which moderately high losses are acceptable. The interface between the core and cladding acts as a reflector to confine light that would otherwise escape the core. The outermost layer, surrounding one or a bundle of cladded fibers, is the jacket. The jacket is composed of plastic and other material layered to protect against moisture, abrasion, crushing and other environmental dangers. One of the most significant technological breakthroughs in data transmission has been the development of practical fiber optic communication systems. Optical fiber already enjoys considerable use in long-distance telecommunications, and its use in military applications is growing. Sikkim Manipal University The continuing improvements in Page No. 57
  106. 106. Computer Networks Unit 2 performance and decline in prices, together with the inherent advantages of optical fiber, have made it increasingly attractive for LAN. 2.6 Transmission and Switching Optical fiber transmits a signal encoded beam of light by means of total internal reflection. Total internal reflection can occur in any transparent medium that has a higher index of refraction than the surrounding medium. The principle is described in Figure 2.22. In effect, the optical fiber acts as a waveguide for frequencies in the range of about 1014 to 1015 Hz. This covers portions of infrared and visible spectra. Light from a source enters the cylindrical glass or plastic core. Rays at shallow angles are reflected and propagated along the fiber; other rays are absorbed by the surrounding material. This form of propagation is called Step-index multimode referring to the variety of angles that will reflect. With multimedia transmission, multiple propagation paths exist, each with a different path length and hence time to traverse the fiber. This causes signal elements (light pulses) to spread out in time, which limits the rate at which data can be accurately received. In other words, the need to leave spacing between the pulses limits data rate. This type of fiber is best suited for transmission over very short distances. When the fiber core radius is reduced, fewer angles will reflect. By reducing the radius of the core to the order of a wavelength, only a single angle or mode can pass: the axial ray. This single mode propagation provides superior performance for the following reason, because there is a single transmission path with single mode transmission. The distortion found in multimode cannot occur. Single- mode is typically used for long distance applications, including telephone and cable television. Sikkim Manipal University Page No. 58
  107. 107. Computer Networks Unit 2 Finally, by varying the index of refraction of the core, a third type of transmission, known as graded index multimode, is possible. This type is intermediate between the other two in characteristics. The higher refractive index at the center makes the light rays moving down the axis advance more slowly than those curves helically because of the graded index, reducing its travel distance. The shortened path and higher speed allows light at the periphery to arrive at a receiver at about the same time as the straight rays in the core axis. Graded index fibers are often used in LANs. Applications The advantages of optical fiber over twisted pair and coaxial cable become more compelling as the demand for all types of information (voice, data, image and video) increases. Five basic categories of applications have become important for optical fiber. They are: Long-haul trunks, Metropolitan trunks, Rural exchange trunks, Subscriber loops, and Local Area Networks. Long-haul transmission: It is becoming increasingly common in the telephone network. Long-haul routes average about 1500kms in length and offer higher capacity (typically 20,000 to 60,000 voice channels). These systems compete economically with microwave. Undersea optical fiber cables also enjoy increasing use. Metropolitan trunking: These circuits have an average length of 12km and may have as many as 1,00,000 voice channels in a trunk group. Most facilities are installed in underground conduits and are repeater-less, joining telephone exchange in a metropolitan or city area. Included in this category are routes that link long haul microwave facilities that terminate at a city perimeter to the main telephone exchange building downtown. Sikkim Manipal University Page No. 59
  108. 108. Computer Networks Unit 2 Rural exchange trunks: These have circuit lengths ranging from 40 to 60km and link towns and villages. In the United States, they often connect the exchanges of different telephone companies. Most of these systems have fewer than 5000 voice channels. The technology used in these applications competes with microwave facilities. Subscriber loop circuits: These are fibers that run directly from the central exchange to a subscriber. These facilities are beginning to displace twisted pair and coaxial cable links as the telephone networks evolve into full service networks capable of handling not only voice and data, but also image and video. Application as LAN Cable Standards have been developed and products introduced for optical fiber networks that have a total capacity of 100Mbps to 1 Gbps. Recent Achievable bandwidth is in excess of 50,000Gbps i.e 50Tbps but Current limit is 10Gbps. It can support hundreds or even thousand of stations in a large office building of a complex of buildings. Comparison of fiber optics and copper wire The following characteristics distinguish optical fiber from twisted pair or coaxial cable: Greater capacity: The potential bandwidth, and hence data rate, of optical fiber is immense, data rates of hundred of Gbps over tens of kilometers have been demonstrated. Compare this to the practical maximum of hundreds of Mbps over about 1km for coaxial cable and just a few Mbps over 1km or up to 100Mbps to 1Gbps over a few tens of meters for twisted pair. Sikkim Manipal University Page No. 60
  109. 109. Computer Networks Unit 2 Smaller size and lighter weight: Optical fibers are considerably thinner than coaxial cable or bundled twisted–pair cable at lest an order of magnitude thinner for comparable information transmission capacity. For cramped conduits in buildings and underground along public rights-of-way, the advantage of small size is considerable. The corresponding reduction in weight reduces structural support requirements. Lower attenuation: Attenuation is significantly lower in optical fiber than in coaxial cable or twisted pair and is constant over a wide range. Electromagnetic Isolation: Optical fiber systems are not affected by external electromagnetic fields. Thus the systems are not vulnerable to interference, impulses noise or crosstalk. By the same token, fibers do not radiate energy, so there is little interference with other equipment and there is a high degree of security from eavesdropping. In addition, fiber is inherently difficult to tap. Greater repeater spacing: Fewer repeaters mean lower cost and fewer sources of error. The performance of optical fiber systems from this point of view has been steadily improving. Repeater spacing in the tens of kilometers for optical fiber is common, and repeater spacing of hundreds of kilometers have been demonstrated. Coaxial and twisted pair systems generally have repeaters every few kilometers. Switching For transmission of data beyond local area, communication is typically achieved by transmitting data from source to destination through a network of intermediate switching nodes. The switching nodes are not concerned with the content of data. Rather their purpose is to provide a switching Sikkim Manipal University Page No. 61
  110. 110. Computer Networks Unit 2 facility that will move the data from node to node until it reaches the destination. Circuit switching and packet switching techniques are more commonly used and are as shown in Figure 4.5 (a) and (b) respectively. Circuit Switching A circuit switching network is one that establishes a dedicated circuit (or channel) between nodes and terminals before the users may communicate. Each circuit that is dedicated cannot be used by other callers until the circuit is released and a new connection is set up. Even if no actual communication is taking place in a dedicated circuit, then that channel still remains unavailable to other users. Channels that are available for new calls to be set up are said to be idle. Circuit switching is used for ordinary telephone calls. It allows communications equipment and circuits, to be shared among users. Each user has sole access to a circuit (functionally equivalent to a pair of copper wires) during network use.
  111. 111. Figure 2.22: (a) circuit switching (b) packet switching For call setup and control (and other administrative purposes), it is possible to use a separate dedicated signaling channel from the end node to the Sikkim Manipal University Page No. 62
  112. 112. Computer Networks Unit 2 network. ISDN is one such service that uses a separate signaling channel. The method of establishing the connection and monitoring its progress and termination through the network may also utilize a separate control channel. Circuit switching can be relatively inefficient because capacity is wasted on connections which are set up but are not in continuous use (however momentarily). On the other hand, the connection is immediately available and capacity is guaranteed until the call is disconnected Communication using circuit switching involves three phases discussed below: 1. Connection establishment: Before any signal can be transmitted, an end to end circuit must be established. 2. Data transfer: Information can now be transmitted from source through the network to the destination using the dedicated path established. 3. Termination: After some period of data transfer, the connection is terminated Consider communication between two points A and D in a network as shown in Figure 2.23. The connection between A and D is provided using (shared) links between two other pieces of equipment, B and C.
  113. 113. Figure 2.23: A four node and 3 link network
  114. 114. Network use is initiated by a connection phase during which a circuit is set up between source and destination and terminated by a disconnect phase as listed above. These phases, with associated timings, are illustrated in the Figure 2.24. Sikkim Manipal University Page No. 63
  115. 115. Computer Networks Unit 2 Figure 2.24: A circuit switched connection between A and D (Information flows in two directions. Information sent from the calling end is shown in grey and information returned from the remote end is shown in black) After a user requests a circuit, the desired destination address must be
  116. 116. communicated to the local switching node (B). In a telephony network, this is achieved by dialing the number. Node B receives the connection request and identifies a path to the destination (D) via an intermediate node (C). This is followed by a circuit connection phase handled by the switching nodes and initiated by allocating a free circuit to C (link BC), followed by transmission of a call request signal from node B to node C. In turn, node C allocates a link (CD) and the request is then passed to node D after a similar delay. Sikkim Manipal University Page No. 64
  117. 117. Computer Networks Unit 2 The circuit is then established and may be used. While it is available for use, resources (i.e. in the intermediate equipment at B and C) and capacity on the links between the equipment are dedicated to the use of the circuit. After completion of the connection, a signal confirming circuit establishment (a connect signal in the diagram) is returned; this flows directly back to node A with no search delays since the circuit has been established. Transfer of the data in the message then begins. After data transfer, the circuit is disconnected; a simple disconnect phase is included after the end of the data transmission. Delays for setting up a circuit connection can be high, especially if ordinary telephone equipment is used. Call setup time with conventional equipment is typically on the order of 5 to 25 seconds after completion of dialing. New fast circuit switching techniques can reduce delays. Trade-offs between circuit switching and other types of switching depend strongly on switching times. Message switching Message switching was the precursor of packet switching, where messages were routed in their entirety and one hop at a time. It was first introduced by Leonard Kleinrock in 1961. Message switching systems are nowadays mostly implemented over packet-switched or circuit-switched data networks. Hop-by-hop Telex forwarding are examples of message switching systems. E-mail is another example of a message switching system. When this form of switching is used, no physical path is established in advance in between sender and receiver. Instead, when the sender has a block of data to be sent, it is stored in the first switching office (i.e. router) then forwarded later at one hop at a time. Each block is received in its entity form, inspected for errors and then forwarded or re-transmitted. It is a form of store-and-forward network. Data Sikkim Manipal University Page No. 65
  118. 118. Computer Networks Unit 2 is transmitted into the network and stored in a switch. The network transfers the data from switch to switch when it is convenient to do so, and as such the data is not transferred in real-time. Blocking can not occur, however, long delays can happen. The source and destination terminal need not be compatible, since conversions are done by the message switching networks. Again consider a connection of a network shown in Figure 2.23. For instance, when a telex (or email) message is sent from A to D, it first passes over a local connection (AB). It is then passed at some later time to C (via link BC), and from there to the destination (via link CD). At each message switch, the received message is stored, and a connection is subsequently made to deliver the message to the neighboring message switch. Message switching is also known as store-and-forward switching since the messages are stored at intermediate nodes en route to their destinations.
  119. 119. Figure 2.25: Message switching to communicate between A and D Sikkim Manipal University Page No. 66
  120. 120. Computer Networks Unit 2 The Figure 2.25 illustrates message switching; transmission of only one message is illustrated for simplicity. As the figure indicates, a complete message is sent from node A to node B when the link interconnecting them becomes available. Since the message may be competing with other messages for access to facilities, a queuing delay may be incurred while waiting for the link to become available. The message is stored at B until the next link becomes available, with another queuing delay before it can be forwarded. It repeats this process until it reaches its destination. Circuit setup delays are replaced by queuing delays. Considerable extra delay may result from storage at individual nodes. A delay for putting the message on the communications link (message length in bits divided by link speed in bps) is also incurred at each node enroute. Message lengths are slightly longer than they are in circuit switching, after establishment of the circuit, since header information must be included with each message; the header includes information identifying the destination as well as other types of information. Most message switched networks do not use dedicated point-to-point links. Packet switching Packet switching splits traffic data (for instance, digital representation of sound, or computer data) into chunks, called packets. Packet switching is similar to message switching. Any message exceeding a network-defined maximum length is broken up into shorter units, known as packets, for transmission. The packets, each with an associated header, are then transmitted individually through the network. These packets are routed over a shared network. Packet switching networks do not require a circuit to be established and allow many pairs of nodes to communicate almost simultaneously over the same channel. Each packet is individually addressed precluding the need for a dedicated path to help the packet find its way to its destination. Sikkim Manipal University Page No. 67
  121. 121. Computer Networks Unit 2 Packet switching is used to optimize the use of the channel capacity available in a network; to minimize the transmission latency (i.e. the time it takes for data to pass across the network), and to increase robustness of communication. Again consider the same network as shown in figure 2.23. Now the message of Figure 2.25 is broken into three small units called packets and labeled 1-3 as illustrated in Figure 2.26.
  122. 122. Figure 2.26: Packet-switched communication between A and D The most well-known use of packet switching is the Internet. The Internet uses the Internet protocol suite over a variety of data link layer protocols. For example, Ethernet and Frame relay are very common. Newer mobile phone technologies (e.g., GPRS, I-mode) also use packet switching. Packet switching is also called connectionless networking because no connections are established. Sikkim Manipal University Page No. 68