Bt 72 computer networks

Embed Size (px)

Citation preview

BT 0072 Computer Networks

Contents

Unit 1

Introduction1 Unit 2Physical Layer33 Unit 3Medium Access Sublayer90 Unit 4Data Link Layer I119 Unit 5Data Link Layer II142 Unit 6Network Layer I158 Unit 7Network Layer II177 Unit 8Transport Layer207 Unit 9Session Layer241 Unit 10Application Layer I257 Unit 11Application Layer II283 Unit 12Internet Security309Prof.V.B.Nanda Gopal Director & DeanDirectorate 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 AcademicsManipal Education Bangalore.

Dr.Harishchandra Hebbar DirectorManipal Centre for Info. Sciences. Manipal.

Dr.N.V.Subba Reddy HOD-CSEManipal Institute of Technology Manipal.

Dr.Ashok Hegde Vice PresidentMindTree Consulting Ltd Bangalore.

Dr.Ramprasad Varadachar Director, Computer Studies Dayanand Sagar College of Engg. Bangalore.

Mr.M.K.N.Prasad Controller of ExaminationsSikkim Manipal University DDE Manipal.Content Preparation Team Content WritingMr.Nirmal Kumar Nigam Assistant Professor & HoP-IT Sikkim Manipal University DDEManipal.

Mr.Nirmal Kumar Nigam HOP- ITSikkim Manipal University DDE Manipal.

Dr.A.Kumaran

Research Manager (Multilingual) Microsoft Research Labs IndiaBangalore.

Mr.Ravindranath.P.S. Director (Quality)Yahoo India Bangalore.

Dr.Ashok Kallarakkal Vice PresidentIBM India Bangalore.

Mr.H.Hiriyannaiah Group ManagerEDS Mphasis Bangalore.

Mr.Ashok Kumar K Additional RegistrarSikkim Manipal University - DDE Manipal.

Content Editing Prof.K.Alok Agarwal Associate ProfessorICFAI University Dehradun.

Language Editing Dr.A.Lourdusamy HOD English St.Aloysius College Mangalore.

Edition: Spring 2009This 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.

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.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).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.

Computer Networks

Unit 1 Unit 1

Introduction

Structure:

1.0Objectives 1.1Introduction1.2Network Structures 1.3Network Architecture1.4OSI Reference Model: An Overview 1.5Network Services1.6TCP/IP Protocol Suite 1.7Summary1.8Self Assessment Questions 1.9Terminal Questions1.10Answers to Self Assessment Questions 1.11Answers 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 NetworksDefine and describe the ISO OSI Model

Describe the functionalities of each and every layer of the OSI Model State the terminology associated with Network ServicesDescribe various Network Services like connectionless and connection orientedState the relationship between Network Services and Network Protocols Describe TCP/IP Protocol Suite

Sikkim Manipal UniversityPage No. 1

Computer NetworksUnit 1

1.1 Introduction

Computer is an information tool. Networks enhance the computers 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)

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 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 UniversityPage No. 2

Computer NetworksUnit 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.

Figure 1.2: A network is a number of computers linked together to share 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 UniversityPage No. 3

Computer NetworksUnit 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 link, transmits at 1.5 Mbps, or 1 million bits per second, which makes the sharing of resources over a WAN difficult.

Sikkim Manipal UniversityPage No. 4

Computer NetworksUnit 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 Channels2. 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 UniversityPage No. 5

Computer NetworksUnit 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 UniversityPage No. 6

Computer NetworksUnit 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 UniversityPage No. 7

Computer NetworksUnit 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 UniversityPage No. 8

Computer NetworksUnit 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 UniversityPage No. 9

Computer NetworksUnit 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 UniversityPage No. 10

Computer NetworksUnit 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 UniversityPage No. 11

Computer NetworksUnit 1

Figure 1.5: The ISO OSI Model

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 UniversityPage No. 12

Computer NetworksUnit 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 UniversityPage No. 13

Computer NetworksUnit 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 UniversityPage No. 14

Computer NetworksUnit 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 UniversityPage No. 15

Computer NetworksUnit 1

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.

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 UniversityPage No. 16

Computer NetworksUnit 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 UniversityPage No. 17

Computer NetworksUnit 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 UniversityPage No. 18

Computer NetworksUnit 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 UniversityPage No. 19

Computer NetworksUnit 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 tosubscribers, 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 UniversityPage No. 20

Computer NetworksUnit 1

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 UniversityPage No. 21

Computer NetworksUnit 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 =

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 UniversityPage No. 22

Computer NetworksUnit 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.

Figure 1.8: The TCP/IP protocol stack: Each layer represents a package of functions.

These layers include:

(i) Application layer: The application layer is provided by the program that

uses TCP/IP for communication. An application is a user process cooperating with another process usually on a different host (there is also a benefit to application communication within a single host). Examples of applications include Telnet and the File Transfer Protocol (FTP). The interface between the application and transport layers is defined by port numbers and sockets

(ii) Transport layer: The transport layer provides the end-to-end data

transfer by delivering data from an application to its remote peer. Multiple

applications can be supported simultaneously. The most-used transport layer protocol is the Transmission Control Protocol (TCP), which provides connection-oriented reliable data delivery, duplicate data suppression, congestion control, and flow control. Another transport layer protocol is the

Sikkim Manipal UniversityPage No. 23

Computer NetworksUnit 1

User Datagram Protocol. It provides connectionless, unreliable, best-effort service. As a result, applications using UDP as the transport protocol have to provide their own end-to-end integrity, flow control, and congestion control, if desired. Usually, UDP is used by applications that need a fast transport mechanism and can tolerate the loss of some data.

(iii) Internetwork layer: The internetwork layer, also called the internet

layer or the network layer, provides the virtual network image of an internet

(this layer shields the higher levels from the physical network architecture below it). Internet Protocol (IP) is the most important protocol in this layer. It is a connectionless protocol that does not assume reliability from lower layers. IP does not provide reliability, flow control, or error recovery. These functions must be provided at a higher level. IP provides a routing function that attempts to deliver transmitted messages to their destination. A message unit in an IP network is called an IP datagram. This is the basic unit of information transmitted across TCP/IP networks. Other internetwork-layer protocols are IP, ICMP, IGMP, ARP, and RARP.

(iv) Network interface layer: The network interface layer, also called the

link layer or the data-link layer, is the interface to the actual network hardware. This interface may or may not provide reliable delivery, and may be packet or stream oriented. In fact, TCP/IP does not specify any protocol here, but can use almost any network interface available, which illustrates the flexibility of the IP layer. Examples are IEEE 802.2, X.25 (which is reliable in itself), ATM, FDDI, and even SNA. TCP/IP specifications do not describe or standardize any network-layer protocols per se; they only standardize ways of accessing those protocols from the internetwork layer.

A more detailed layering model is included in Figure 1.9.

Sikkim Manipal UniversityPage No. 24

Computer NetworksUnit 1

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 UniversityPage No. 25

Computer NetworksUnit 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, 9.167.5.8 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, myhost.ibm.com, 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 =

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 UniversityPage No. 26

Computer NetworksUnit 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, 128.2.7.9 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 128.2.7.9 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 UniversityPage No. 27

Computer NetworksUnit 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 and 24 bits for the 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 and 16 bits for the 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 and 8 bits for the portion of the IP address. That allows for 221-2 (2097150) networks each with 28-2 (254) hosts a total of more than half a billion addresses.

Sikkim Manipal UniversityPage No. 28

Computer NetworksUnit 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 =0). All bits zero in the network number portion is this network (IP address with =0). When a host wants to communicate over a network, but does not yet know the network IP address, it can send

Sikkim Manipal UniversityPage No. 29

Computer NetworksUnit 1

packets with =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):

128.2.255.255

This is called a directed broadcast address because it contains both a valid and a broadcast .

Loopback: The Class A network 127.0.0.0 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

Sikkim Manipal UniversityPage No. 30

Computer NetworksUnit 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 Model3. Write about TCP/IP Protocol suite

Sikkim Manipal UniversityPage No. 31

Computer NetworksUnit 1

1.10 Answers to Self Assessment Questions 1. Networking2. Bus 3. WAN 4. T15. 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 UniversityPage No. 32

Computer Networks

Unit 2 Unit 2

Physical Layer

Structure:

2.0Objectives

2.1Analog and Digital Signals 2.2Periodic Analog Signals 2.3Transmission Impairments 2.4Data Rate Limits2.5Transmission Media

2.6Transmission and Switching

2.7ISDN Integrated Services Digital Network 2.8Summary2.9Self Assessment Questions 2.10Terminal Questions2.11Answers 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 transmissionDefine the limitations posed by data rates

Describe the network performance with respect to various signaling mechanismsDefine and distinguish various transmission media Compare and contrast various switching techniques Define and describe ISDN and its services

Sikkim Manipal UniversityPage No. 33

Computer NetworksUnit 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 UniversityPage No. 34

Computer NetworksUnit 2

however, demonstrate the sudden jump that the signal makes from value to value.

Value

Value

TimeTime

a. Analog Signalb. 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.

Sikkim Manipal UniversityPage No. 35

Computer NetworksUnit 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 UniversityPage No. 36

Computer NetworksUnit 2

Table 2.1 Units of period and frequency

Unit

Equivalent

Unit

Equivalent

Second (s)

1 s

Hertz (Hz)

1 Hz

Milliseconds (ms)

103 s

Kilohertz (kHz)

103 Hz

Microseconds ( s)

106s

Megahertz (MHz)

106 Hz

Nanoseconds (ns)

109 s

Gigahertz (GHz)

109 Hz

Picoseconds (ps)

1012 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 by, propagation speed by c (speed of light), and frequency by f, we get:

Sikkim Manipal UniversityPage No. 37

Computer NetworksUnit 2

Wavelength = propagation speed X period = Propagation Speed / frequency

ci.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.

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 UniversityPage No. 38

Computer NetworksUnit 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 UniversityPage No. 39

Computer NetworksUnit 2

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 UniversityPage No. 40

Computer NetworksUnit 2

The bandwidth of the nonperiodic signals has the same range, but the frequencies are continuous.

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 UniversityPage No. 41

Computer NetworksUnit 2

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 log2L bits.

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 UniversityPage No. 42

Computer NetworksUnit 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.

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 UniversityPage No. 43

Computer NetworksUnit 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.

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 UniversityPage No. 44

Computer NetworksUnit 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 problems1. Attenuation distortion 2. Delay distortion3. 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.

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 them2. They should maintain a sufficient high level to make them distinguishable from noise3. Too strong signals can overload the circuitry of the transmitter and result in distortion.

Sikkim Manipal UniversityPage No. 45inlog

Computer NetworksUnit 2

4. They should take into account that attenuation increases with the frequency.

Attenuation is measured in Bel as

Power 10 Powerout Bel

It can be also expressed in decibel (dB) as

oinPowe20*log10 PowerrutDecibel

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

Sikkim Manipal UniversityPage No. 46

Computer NetworksUnit 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

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 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

Figure 2.15: Noise

Sikkim Manipal UniversityPage No. 47

Computer NetworksUnit 2

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

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, andk= Boltzmann's constant = 1.38 10-23 Joules/degrees Kelvin.

SSignal to noise ratio: : SNR(dB) NdB

Noise PowerSNRdB10*log10 signal Power

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 UniversityPage No. 48

Computer NetworksUnit 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 log2L

Sikkim Manipal UniversityPage No. 49

Computer NetworksUnit 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 characteristics.

Sikkim Manipal UniversityPage No. 50

Computer NetworksUnit 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 UniversityPage No. 51

Computer NetworksUnit 2

Physical Description

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 PCs 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 UniversityPage No. 52

Computer NetworksUnit 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 UTPs 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 UniversityPage No. 53

Computer NetworksUnit 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 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 UniversityPage No. 54

Computer NetworksUnit 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 UniversityPage No. 55

Computer NetworksUnit 2

simple BNC connector. They are flexible, cheaper, soft and ideal for office cabling.

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 materials. The fiber need not be straight but can conduct light even when bent.

Figure 2.20: Total internal reflection

Sikkim Manipal UniversityPage No. 56

Computer NetworksUnit 2

Physical Description

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 100m. Each fiber is surrounded by its own cladding, a 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, andits use in military applications is growing.

Sikkim Manipal University The continuing improvements in

Page No. 57

Computer NetworksUnit 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 UniversityPage No. 58

Computer NetworksUnit 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