1 of 244

​

Data Communication CS601

2 of 244

​

CS601-Data Communication VU

​

Table of Contents

​

Lecture No. 1 .....................................................................................................3

​

Lecture No. 2 ...............................................................................................................12

​

Lecture No. 3 ...............................................................................................................17

​

Lecture No. 4 ...............................................................................................................22

​

Lecture No. 5 ...............................................................................................................28

​

Lecture No. 6 ...............................................................................................................33

​

Lecture No. 7 ...............................................................................................................39

​

Lecture No. 8 ...............................................................................................................44

​

Lecture No. 9 ...............................................................................................................49

​

Lecture No. 10 .............................................................................................................52

​

Lecture No. 11 .............................................................................................................56

​

Lecture No. 12 .............................................................................................................61

​

Lecture No. 13 .............................................................................................................66

​

Lecture No. 14 .............................................................................................................70

​

Lecture No. 15 .............................................................................................................75

​

Lecture No. 16 .............................................................................................................79

​

Lecture No. 17 .............................................................................................................84

​

Lecture No. 18 .............................................................................................................89

​

Lecture No. 19 .............................................................................................................95

​

Lecture No. 20 .............................................................................................................98

​

Lecture No. 21 ...........................................................................................................101

​

Lecture No. 22 ...........................................................................................................108

​

Lecture No. 23 ...........................................................................................................114

​

Lecture No. 24 ...........................................................................................................118

​

Lecture No. 25 ...........................................................................................................124

​

Lecture No. 26 ...........................................................................................................130

​

Lecture No. 27 ...........................................................................................................135

​

Lecture No. 28 ...........................................................................................................142

​

Lecture No. 29 ...........................................................................................................146

​

Lecture No. 30 ...........................................................................................................156

​

Lecture No. 31 ...........................................................................................................160

​

Lecture No. 32 ...........................................................................................................165

​

Lecture No. 33 ...........................................................................................................169

​

Lecture No. 34 ...........................................................................................................174

​

Lecture No. 35 ...........................................................................................................179

​

Lecture No. 36 ...........................................................................................................183

​

Lecture No. 37 ...........................................................................................................188

​

Lecture No. 38 ...........................................................................................................193

​

Lecture No. 39 ...........................................................................................................199

​

Lecture No. 40 ...........................................................................................................205

​

Lecture No. 41 ...........................................................................................................210

​

Lecture No. 42 ...........................................................................................................218

​

Lecture No. 43 ...........................................................................................................227

​

Lecture No. 44 ...........................................................................................................233

​

Lecture No. 45 ...........................................................................................................239

​

© Copyright Virtual University of Pakistan

3 of 244

​

CS601-Data Communication VU

​

LECT URE #1

​

Course Outline

⑩The course will consist of :

–45 lectures

–10-14 assignments

–2exams (1 midterm and 1 final)

–GMDB

⑩Grading Criteria:

–One Midterm: 35 %

–Final Exam: 45%

–Assignments: 15%

​

Textbook

⑩“Data Communications and Networking” 4th Edition by Behrouz A. Forouzan

⑩“Data and Computer Communication” 6th Edition by William Stallings

​

© Copyright Virtual University of Pakistan

4 of 244

​

CS601-Data Communication VU

​

INTRODUCTION TO DATA COMMUNICATION

​

DEFINITION OF DATA COMMUNICATION

“Data Communication is the exchange of Information from one entity to the other

using a Transmission Medium”.

​

DEFINITION OF DATA COMMUNICATION (Cont’d)

As you can clearly notice, the definition of Data Communication although Simple

leaves many questions unanswered:

​

🕘 Exchange??????

🕘 Information?????

🕘 Entities???????

🕘 Transmission????

🕘 Medium????

​

We will try to answer all these Questions in this Course

​

History of Data Communication

Data communications history represents a blend of histories, including:

​

🕘 The history of the telecommunications industry

🕘 The history of data communications, and

🕘 The history of the Internet

​

🙣 Telegraph 1837 Samuel Morse

Modern telecommunication industry began in 1837 with the invention of

the telegraph by Samuel Morse

​

This led to building a telecommunications infrastructure of poles and wires

as well as to the development of communication hardware and protocols

​

🙣 Telephone 1876 Alexander Graham Bell

Invention of telephone by Alexander Graham Bell in 1876 and the

development of wireless communication technology by Guglielmo

Marconi in the 1890s set the stage for today’s communication industry

🙣 By 1950’s

By 1950s, telephone and telegraph companies had developed a network of

communication facilities throughout the industrialized world

🙣 1970’S

Although development of databases, languages, operating systems, and

hardware was strong from 1950s to 1970s, large-scale data communication

systems did not emerge until the 1970s.

​

This was stimulated by 3 major developments:

​

🕘 Large-scale integration of circuits reduced cost and size of

terminals and communication equipment

​

© Copyright Virtual University of Pakistan

5 of 244

​

CS601-Data Communication VU

​

🕘 New software systems that facilitated the development of

data communication networks

🕘 Competition among providers of transmission facilities

reduced the cost of data circuits

​

TODAY’S EVERGHANGING & BUSY WORLD

​

o Today’s fast world demands better, secure and most of all FAST ways of

communication

o Gone are the days when you had to wait a couple of weeks to get a letter from

USA

o Why wait ONE week when you can get the information you require in just a split

of a second, using

​

HOW TO ACHIEVE THIS?

​

o How to achieve this ACCURACY, SECURITY and SPEED for the transfer of

this information?

o What HARDWARE and the SOFTWARE is needed?

o And, what should be the MEANS of sending this info?

​

ARE SOME OF TOPIC WE WILL BE EXPLORING DURING THE COURSE OF

OUR STUDY

​

DATA COMMUNICATION

​

o When we communicate , we share information

o Information can be LOCAL or REMOTE

o Between Individuals LOCAL communication occurs face to face

o REMOTE communication occurs over a long distance

o When we refer to COMPUTER SYSTEMS, Data is represented in the form of

Binary Units (Bits) in the form of Zeros (0’s) and One’s (1’s)

o Also the entities can most of the times be considered to be COMPUTERS

​

Data Communication Definition (Modified)

​

Therefore, our earlier definition can easily be modified to:

​

“Data Communication is the exchange of data (in the form of 0’s and 1’s)

between two devices (computers) via some form of the transmission medium.”

​

LOCAL and REMOTE Data Communication

​

🙣 LOCAL

Data communication is considered to be local if the communicating devices

are present in the same building or a similarly restricted geographical area

​

© Copyright Virtual University of Pakistan

what we know by the name of “DATA

COMMUNICATION”.

6 of 244

​

CS601-Data Communication VU

​

🙣 REMOTE

Data Communication is considered remote, if the devices are farther apart.

​

VAGUE DEFINITIONS

We will clarify

​

Data Communication System

For Data Communication to occur, the communicating devices must be a part of a

communication system made up of some specific kind of hardware and software

This type of a system is known as a

“DATA COMMUNICATION SYSTEM”

​

Effectiveness of Data Comm. System

Effectiveness depends upon three fundamental characteristics:

​

🕘 Delivery

🕘 Accuracy

🕘 Timeliness (Better NEVER than LATE)

​

🖲 Example of the POSTAL MAIL

​

Components of Data Comm. Systems

​

Components of Data Com Systems

Any system is made up of more than one component. Similarly, a data communication

system is made up of 5 components as shown in the fig:

​

🕘 Message

🕘 Sender

🕘 Receiver

🕘 Medium

🕘 Protocol

​

© Copyright Virtual University of Pakistan

7 of 244

​

CS601-Data Communication VU

​

🙣 MESSAGE

​

🕘 Information or Data to be communicated

🕘 Can be text, numbers, video or any combination of these

🕘 In short anything that can be represented using binary bits

​

Data Communication Messages

​

🖲 Files (meaningful collections of records)

🖲 Data/information requests (database queries, Web page requests,

etc.)

🖲 Responses to requests and commands or error messages

🖲 Status messages (about the network’s functional status)

🖲 Control messages transmitted between network devices to control

network traffic

🖲 Correspondence among network users

​

MESSAGE TYPES

​

🙣 SENDER

🙣 SENDER

​

🕘 Device that sends the data message

🕘 Can be a Computer , Workstation, Video camera etc

🕘 As already discussed, the data from the sender might not be in the

appropriate format for the transmission medium and will need to be

processed

​

🙣 RECEIVER

​

🕘 Device that receives the message

🕘 Can be a computer, workstation, Television etc

🕘 At times, the data received from the transmission medium may not

be in a proper form to be supplied to the receiver and it must be

processed

​

© Copyright Virtual University of Pakistan

8 of 244

​

CS601-Data Communication VU

​

🙣 MEDIUM

​

🕘 Physical path that a message uses to travel from the Sender to the

Receiver

🕘 Can be a Copper Cable (Telephone), Coaxial Cable (Cable TV),

Fiber Optic Cable, LASERS or Radio Waves (Wireless Medium)

🕘 We will see that Data needs to be transferred in the form of

ELECTROMAGNETIC signals and The Transmission Medium

should be capable of carrying these EM Signals

🕘 Transmission Media

​

Transmission Media

​

Medium Speed Cost

​

Twisted Wire 300bps-10Mbps Low

​

Microwave 256Kbps-100Mbps Low

​

Coaxial Cable 56Kbps-200Mbps Low

​

Fiber Optic Cable 500Kbps-10Gbps High

​

🙣 PROTOCOL

​

🕘 Set of Rules Governing Communication

🕘 Represents an Agreement between communication devices

🕘 Without Protocol, two devices may be connected but they will not

be able to communicate

​

🖲 EXAMPLE: Consider the communication between two

individuals. They can only communicate provided they both

speak the same language.

​

A little more complex Comm. System

​

© Copyright Virtual University of Pakistan

9 of 244

​

CS601-Data Communication VU

​

EXAMPLE – ELECTRONIC MAIL

​

Explanation In Terms of a little more complex Comm. System

​

🙣 SENDER SIDE

​

🕘 Input device and transmitter are components of a Personal Computer

🕘 User of a PC wishes to send a message ‘m’

🕘 User activates electronic mail package e.g. hotmail

🕘 Enters the message via input device (keyboard)

🕘 Character string is buffered in main memory as a sequence of bits ‘g’

🕘 PC is connected to some trans system such as a Telephone Network via

an I/O Transmitter like Modem

🕘 Transmitter converts incoming stream ‘g’ into a signal ‘s’

​

🙣 RECEIVER SIDE

​

🕘 The transmitted signal ‘s’ is subject to a number of impairments

depending upon the medium

🕘 Therefore, received signal ‘r’ may differ from ‘s’.

🕘 Receiver attempts to estimate original ‘s’ based on its knowledge of

the medium and received signal ‘r’

🕘 Receiver produces a bit stream g’(t)

🕘 Briefly buffered in the memory

🕘 Data is presented to the user via an output device like printer, screen

etc.

​

© Copyright Virtual University of Pakistan

10 of 244

​

CS601-Data Communication VU

​

🕘 The data viewed by user m’ will usually be an exact copy of the data

sent ‘m’

​

EXAMPLE-Telephone System

​

o Input to the Telephone is a message ‘m’ in the form of sound waves

o The sound waves are converted by telephone into electric signals of the same

frequency

o These signals are transmitted w/o any modification over the telephone line

o Hence g(t) and s(t) are identical

o S(t) will suffer some distortion so that r(t) will not be the same as s(t)

o R(t) is converted back to sound waves with no attempt of correction or

improvement of signal quality

o Thus m’ is not an exact replica of m

​

An Actual Digital Data Communication System Key Data

Communication Terminology

​

🙣 Session: communication dialog between network users or applications

Different Types of this session for Info Exchange

🙣 Network: interconnected group of computers and communication devices

We will look into it in a little bit

🙣 Node: a network-attached device

Node can be any device in the network

​

© Copyright Virtual University of Pakistan

11 of 244

​

CS601-Data Communication VU

​

Summary

⑩ Data Communication

⑩ Brief History of Communication

⑩ Data Communication System

⑩ Key Data Communication Terminology

​

Reading Sections

⑩ Section 1.2, “Data Communications and Networking” 4th Edition by Behrouz A.

Forouzan

⑩ Sections 1.1, 1.2, “Data and Computer Communication” 6th Edition by William

Stallings

​

© Copyright Virtual University of Pakistan

12 of 244

​

CS601-Data Communication VU

​

LECT URE #2

​

KEY DATA COMMUNICATION TERMINOLOGY

​

🙣 Link: connects adjacent nodes

Wires, Cables, Any thing that physically connects two nodes

​

🙣 Path: end-to-end route within a network

​

🙣 Circuit: the conduit over which data travels

​

🙣 Packetizing: dividing messages into fixed-length packets prior to transmission

over a network’s communication media

​

🙣 Routing: determining a message’s path from sending to receiving nodes

​

🖲 The transmission medium may itself be a network, so route needs to

be specified

​

Network

​

“A NETWORK is a set of devices (Nodes) connected by Communication Links”

​

🙣 Node: Can be a Computer, Printer or any other device capable of sending or

receiving

​

🕘 The links connecting Nodes are called COMMUNICATION CHANNELS

Networks- Why we need them?

​

Networks- Why we need them?

​

It is often impractical for devices to be directly connected for two major reasons:

​

o The devices are very far apart. They are expensive to connect just two devices

with one in Lahore and other in Islamabad

o Large set of devices would need impractical number of connections e .g.

Telephone Lines in the world and all the computers owned by a single

organization

​

Solution to the Problem=Networks

​

o Solution is to connect all devices to a central system known as a NETWORK in

which all terminals or computers share the links.

​

o Two Main Classifications of the Networks

​

© Copyright Virtual University of Pakistan

13 of 244

​

CS601-Data Communication VU

​

🕘 LANS

🕘 WANS

​

DISTRIBUTED PROCESSING

​

o Instead of a single large machine being responsible for all aspects of a process ,

each separate computer handles a subset of the task

🖲 Example – Project Given as a part of the Course

🖲 Example – Office Work

​

Advantages of Distributed Processing

​

🙣 Security

​

A system designer can limit the kind of interaction that a given user can have with

the entire system.

​

🖲 For example : Bank’s ATM

​

🙣 Distributed Data bases

​

No one system need to provide storage capacity for the entire database

​

🖲 For example WWW gives user access to pages stored anywhere on

Internet

​

🙣 Faster Problem Solving

​

Multiple computers working on a problem can solve a problem faster than a

computer working alone

​

🙣 Security through Redundancy

​

Multiple computers running the same program provide security through

redundancy

If one computer hardware breaks down then others cover up.

​

🙣 Collaborative Processing

​

Both multiple computers and multiple users can interact for a task

​

Network Criteria

​

© Copyright Virtual University of Pakistan

14 of 244

​

CS601-Data Communication VU

​

🙣 Performance

​

Can be measured in many ways including Transit and Response Time

​

o Depends on a no. of Factors:

​

🕘 Number of USERS

🕘 Type of Transmission Medium

🕘 Hardware

🕘 Software

🕘 Network Criteria

​

🕘 Number of USERS

​

🖲 Large Number of concurrent users slow network

🖲 Design of a network

🖲 Peak Load Periods

🖲 Network Criteria

🕘 Type of Transmission Medium

​

🖲 Medium defines speed at which data can travel

🖲 Fiber Optic Cable

🖲 100Mbps and 10 Mbps

🖲 Hardware

🖲 Software

🕘 Hardware

​

🖲 Effect speed and the capacity of transmission

🖲 Fast computer with large storage capacity

🖲 Software

🖲 Network Criteria

​

🕘 Software

​

© Copyright Virtual University of Pakistan

15 of 244

​

CS601-Data Communication VU

​

🖲 Software processes data at sender , receiver and

intermediate nodes

🖲 All communication steps need software:

🖲 Moving message from node to node

🖲 Transforming,

🖲 Processing at the sender and receiver

🖲 Error Free Delivery

Well designed software can speed up the process

​

🙣 Reliability

​

o Depends on a no. of Factors:

​

🕘 Frequency of Failure

🕘 Recovery Time of a Network after Failure

🕘 Catastrophe

🕘 Fire , Earthquake or Theft

​

🙣 Security

​

o Unauthorized Access

​

🕘 Sensitive data

🕘 Protection at multiple levels:

🕘 Lower level: Passwords and user ID codes

🕘 Upper Level: Encryption

​

o Viruses

​

Network Applications

​

🙣 Marketing and Sales

​

o Marketing

​

🕘 Collect, exchange and analyze data relating to the customers needs

🕘 Product development cycles

o Sales

​

🕘 Tele shopping,

🕘 On line reservation systems

​

🙣 Financial Services

​

o Online Banking

o Foreign Exchange Transfers

o Rates

​

🙣 Manufacturing

​

© Copyright Virtual University of Pakistan

16 of 244

​

CS601-Data Communication VU

​

o Computer Aided Design

o Computer Assisted Manufacturing

o Network Applications

​

🙣 Electronic Messaging

​

🙣 Teleconferencing

​

o Conferences to occur w/o participants at the same place

o Chat

o Voice Conferencing

o Video Conferencing

​

🙣 Cable Television

​

Summary

​

⑩ Key Data Communication Terminology

⑩ Networks and why we need them?

⑩ Distributed Processing

⑩ Network Criteria

⑩ Network Applications

​

Reading Sections

​

⑩ Section 1.3, “Data Communications and Networking” 4th Edition by Behrouz A.

Forouzan

⑩ Sections 1.3, “Data and Computer Communication” 6th Edition by William

Stallings

​

© Copyright Virtual University of Pakistan

17 of 244

​

CS601-Data Communication VU

​

LECT URE #3

​

Communication Tasks

There are some key tasks that must be performed in a data communication system

Elements can be added, deleted, or merged together

​

Transmission System utilization Interfacing

​

Signal Generation Synchronization

​

Exchange Management Error Detection and Correction

​

Flow Control Addressing

​

Routing Recovery

​

Security Network Management

​

🙣 Transmission System Utilization

​

Need to make efficient use of Transmission facilities that are shared among a no.

of communicating devices

​

For Example:

🖲 Techniques like Multiplexing to allow multiple users to share total

capacity of a Transmission Medium

🖲 Congestion Control: TX. System should not be overwhelmed by traffic

​

🙣 Interfacing

A device must have an Interface with the Transmission System/Transmission

Medium

​

🙣 Signal Generation

​

Electromagnetic Signals travel over Transmission Medium. Once an interface is

established, Signal generation is required

​

🕘 Properties of Signals

🖲 Capable of being propagated over TX. Medium

🖲 Interpretable as data at the Receiver

​

🙣 Synchronization

The transmission and the reception should be properly synchronized.

Synchronization means that the receiver must be able to determine, when to

​

© Copyright Virtual University of Pakistan

18 of 244

​

CS601-Data Communication VU

​

expect a new transmission and when to send acknowledgements. In other words

transmitter and receiver should have an agreement on the nature as well as timing

of the signals

​

🙣 Exchange Management

If the data needs to be exchanged in both directions over a period of time, both

parties must cooperate as follows

​

🕘 Whether both devices must transmit simultaneously or take turns

🕘 Amount of Data to be sent at one time

🕘 Format f the Data

🕘 What to do when an Error Arises

​

🙣 Error Detection and Correction

In all comm. Systems, there is a potential risk for errors and impairments.

Tx. Signals are distorted to some extent before reaching their destination. Error

Detection & Correction needs to be employed in Data Processing Systems where a

change in say the contents of a file cannot be tolerated

​

🙣 Flow Control

To make sure that source does not overwhelm destination by sending data faster

than it can be handled and processed

​

🙣 Addressing & Routing

If TX facility is shared by two or more devices, source must specify the identity or

the address of the destination system and if Tx. System is itself a system, a proper

route must be allocated that the data will take in order to reach the desired

destination

​

🙣 Recovery

If a data transmission is interrupted due to a fault somewhere in the system,

recovery techniques are needed. The objective is either to resume activity at the

point of interruption and to restore the state of the system to what it was prior to

the interruption

​

🙣 Security

​

Security is very important issue in a Data Communication System. The sender

needs to be assured that

​

🕘 Only the Intended receiver receives the data

🕘 Data is delivered unaltered

​

Introduction to Protocol

In computer Networks, communication occurs between two entities in different systems.

​

o Entity is anything sending and receiving information

o SYSTEM is a physical object containing more than one entities

​

© Copyright Virtual University of Pakistan

19 of 244

​

CS601-Data Communication VU

​

Now, two entities in different systems cannot just send data and expect to be understood.

For communication to occur, these entities must agree on a PROTOCOL

​

PROTOCOLS

As discussed earlier, “Protocol is a set of rules governing communication”

​

o Two computers cannot just send bit streams to each other and expect to be

understood

o Entities must agree on a PROTOCOL

​

🖲 Same Example French and German

​

Protocol defines:

​

🕘 What is Communicated?

🕘 How it is Communicated?

🕘 When it is Communicated?

​

KEY elements of a PROTOCOL

🙣 Syntax:

​

🕘 Represents the Structure or the format of the Data

🕘 Meaning the order in which data is presented

​

For Example

🖲 First eight bits to be Sender address

🖲 Next eight to be Receiver’s Address

🖲 The Rest to be Data

​

🙣 Semantics:

​

🕘 Refer to the Meaning of each section of bits

🕘 How is a particular pattern to be interpreted?

🕘 What action should be taken based on interpretation?

​

For Example

🖲 Does an address identify the route to be taken or the final destination of the

message?

🙣 Timing

​

Refers to 2 characteristics:

🕘 When data should be sent?

🕘 How fast it should be sent?

​

For Example

🖲 If sender produces data at 100 Mbps

🖲 But Receiver can only process data at 1 Mbps

🖲 The TX. will overload receiver and data will be lost

​

© Copyright Virtual University of Pakistan

20 of 244

​

CS601-Data Communication VU

​

Protocol Architecture

Instead of having a single Module for performing communication, there is a structured set

of modules that implement communications function”

This structure is called Protocol Architecture

Let’s explain it by an example of File transfer system.

​

Simplified File Transfer Architecture

​

•

​

🕘 File transfer application

🕘 Communication service module

🕘 Network access module

​

🙣 File transfer application

​

File Transfer contains all of the logic is unique to the file transfer application such as:

🕘 Transmitting passwords

🕘 File Commands

​

🖲 Checking File System on other machine if it is ready

🖲 Check File System Compatibility

🕘 File records

​

🙣 Communication service module

Instead of allowing File Transfer Module to deal with actual transfer of data and

commands, we can have a separate module for this transfer. This module must make

sure that the receiver system is ready to receive and look into the reliable exchange of

data

​

🙣 Network access module

​

Nature of the exchange between systems is independent of the network that connects

them. That allows us to have a 3rd module that handles the details of the Network

interface and interacts with the network. If Network to be used changes, only Network

access Module has to change

​

© Copyright Virtual University of Pakistan

In the above example File transfer could use three modules

21 of 244

​

CS601-Data Communication VU

​

Characteristics of a Protocol

​

🕘 Direct or indirect

🕘 Monolithic or structured

🕘 Symmetric or asymmetric

🕘 Standard or nonstandard

​

🙣 Direct

​

🕘 Systems share a point to point link or

🕘 Data can pass without intervening active agent

🕘 Simple Protocol

​

🙣 Indirect

​

🕘 Switched networks or

🕘 Interne works or internets

🕘 Data transfer depend on other entities

🕘 Complex Protocol

​

🙣 Monolithic or Structured

​

🕘 Communications is a complex task

🕘 To complex for single unit

🕘 Structured design breaks down problem into smaller units

🕘 Layered structure

​

🙣 Symmetric or Asymmetric

​

Symmetric

🕘 Communication between peer entities

​

Asymmetric

🕘 Client/server

​

Standard or Nonstandard

🕘 Nonstandard protocols built for specific computers and tasks

​

Summary

⑩ Communication Tasks

⑩ Protocols

⑩ Protocol Architecture

⑩ Characteristics of a Protocol

​

Reading Sections

⑩ Section 1.4 “Data Communications and Networking” 4th Edition by Behrouz A.

Forouzan

⑩ Sections 1.1,2.1 “Data and Computer Communication” 6th Edition by William

Stallings

​

© Copyright Virtual University of Pakistan

22 of 244

​

CS601-Data Communication VU

​

LECT URE #4

​

Standards

​

“A standard provides a model for development that makes it possible for a product

to work regardless of the individual manufacturer|”

​

🕘 A great deal of coordination and cooperation is required by the devices to

communicate

🕘 A device prepared by a specific manufacturer may not be compatible with the

devices prepared by other manufacturers

🕘 Unavailability of standards creates problems and puts a halt to product growth

​

🖲 An example of non-standardized products is AUTOMOBILES

​

Why Standards are Essential?

​

Standards are therefore essential in:

o Creating and Maintaining an Open and competitive Market for Equipment

Manufacturers

o Guaranteeing National and International Interoperability of Data and

Telecommunications Technology and Equipment

​

Let us understand this using an EXAMPLE

​

NOTE

• K sources and L receivers leads to K*L protocols and 2*K*L implementations

• If common protocol used, K + L implementations needed

​

© Copyright Virtual University of Pakistan

23 of 244

​

CS601-Data Communication VU

​

Categories of Data Communication Standards

​

Standards

​

De jure De facto

(By Law) (By Fact)

​

Proprietary Non Proprietary

​

🙣 De facto (By fact or By Convention)

​

Standards not approved by an organized body but have been adopted as standards

through their widespread use

​

🙣 De jure (By Law or By Regulation)

​

Standards that have been legislated by an officially recognized regulation body

​

Subdivision of De Facto Standards

​

🕘 PROPRIETARY (Closed Standards)

​

Standards that are originally invented by a Commercial Organization

as a basis for the operation of its products they are wholly owned by

that company. They are also called Closed Standards because they

close off Communication between systems

​

🕘 NON- PROPRIETARY (Open Standards)

​

They are originally developed by groups or committees that have

passed them into public domains. They are also called Open Standards

because they open Communication between different systems

​

Standard Organizations

​

Standards are developed mainly by 3 entities:

​

🕘 Standard Creation Committees

🕘 Forums

🕘 Regulatory Agencies

​

© Copyright Virtual University of Pakistan

24 of 244

​

CS601-Data Communication VU

​

🙣 Standard Creation Committees

​

They are Procedural Bodies and they are so slow moving and cannot co-op with the fast

growing communication industry.

​

🕘 ISO

​

🖲 International Standard’s Organization

🖲 Voluntary Organization

🖲 Created in 1947

🖲 Members are from Standard Creation Committees of different countries

🖲 Includes representatives from 82 countries

🖲 Open System Interconnection (OSI) Model

​

🕘 ITU-T

​

🖲 By 1970s a lot of countries were defining standards but there was no

International compatibility

🖲 United Nations made as a part of their ITU

🖲 Consultative Committee for International Telegraphy and Telephony

(CCITT)

🖲 IN 1993 , ITU-Telecomm Standards Sector

🖲 Important ITU-T Standards

🖲 V Series (V32, V33, V42, Define Data Transmission over phone lines

🖲 X Series(X.25, 400, 500): Define Transmission over Public Digital

Network

🖲 ISDN: Integrated Services Digital Network

​

🕘 The American National Standard Institute (ANSI)

​

🖲 Private-Non Profit Cooperation not affiliated with US Government

🖲 Members include professional societies, industrial associations, govt. and

regulatory bodies

🖲 Submits proposal to ITU-T and is a voting member for USA in ISO

​

🕘 The Institute of Electrical and Electronics Engineers (IEEE)

​

🖲 Largest professional engineering society in the world

🖲 Also oversees the development of Telecommunication and Wireless

International Standards

🖲 Special committee for LANS out of which emerged Project 802 (802.3,

802.4, 802.5)

​

🙣 Forums

​

Special Interest Groups with representatives from interested corporations they

facilitate and fasten standardization process by working with universities, and

users to test, evaluate and standardize new technologies

​

© Copyright Virtual University of Pakistan

25 of 244

​

CS601-Data Communication VU

​

Each Forum Concentrate on a specific technology and present their conclusions to

the standard bodies

​

🕘 Frame Relay Forum

🕘 ATM Forum

🕘 Internet Society & IETF

​

🙣 Regulatory Agencies

All communication technology is subject to regulation and laws by government

agencies. The purpose is to protect Public Interest by regulating Radio, Television

and Cable Communications.

​

🕘 FCC

​

Before we go into the details of how data are transmitted from one device to the other, it

is important to understand:

​

o The relationship between communication devices.

o How the devices connect with each other in a System?

o How do they do the exchange of information?

​

Five Concepts provide the basis

​

o Line Configuration

o Topology

o Transmission Mode

o Categories of networks

o Internetworks

​

LINE CONFIGURATION

​

“Line Configuration refers to the way two or more devices attach to a Link”

​

A link is the physical communication path that transfers data from one device to the other.

Link can be thought of as a Line drawn between two points. For communication to occur,

two devices must be connected to each other using a link.

​

Line Configurations

​

© Copyright Virtual University of Pakistan

26 of 244

​

CS601-Data Communication VU

​

Line

Configuration

​

Point-to-Point Multipoint

​

Spatially Shared Time Shared

​

🙣 Point-to-Point Line Configuration

​

Dedicated Link between two devices. Entire Capacity of the channel is reserved

for TX B/w these two devices. Mostly point-to-point connection use wire/cable to

connect with each other. But Microwave, Satellite Links can also be used

Data and Control information pas directly between entities with no intervening

agent

​

🖲 TV Remote Control and TV Control Systems

🖲 Mobile Phone (when talking) and Base Station (Antenna)

​

🙣 Multipoint Line Configuration

More than two devices share the Link that is the capacity of the channel is SHARED

now. With shared capacity, there can be two possibilities in a Multipoint Line Config:

​

🕘 Spatial Sharing: If several devices can share the link simultaneously,

its called Spatially shared line configuration

​

© Copyright Virtual University of Pakistan

🕘 Examples:

27 of 244

​

CS601-Data Communication VU

​

🕘 Temporal (Time) Sharing: If users must take turns using the link ,

then its called Temporally shared or Time Shared Line Configuration

​

Summary

​

⑩ Standards

⑩ Standard Organizations

⑩ Line Configuration

⑩ Categories of Line Configuration

​

Reading Sections

⑩ Section 1.5,2.1 “Data Communications and Networking” 4th Edition by Behrouz

A. Forouzan

​

© Copyright Virtual University of Pakistan

28 of 244

​

CS601-Data Communication VU

​

LECT URE #5

​

TOPOLOGY

“The Topology is the geometric representation of the relationship of the links and the

linking devices (Nodes) in a Network”

Or

“Topology defines the physical or the Logical Agreement of Links in a Network”

​

Topology of a Network is suggestive of how a network is laid out. It refers to the specific

configuration and structure of the connections between the Links and the Nodes. Two or

more devices connect to a Link and two or more Links form a Topology

​

Categories of TOPOLOGY

​

Topology

​

Mesh Star Tree Bus Ring

​

🖲 Question: What to consider when choosing a Topology????????

🖲 Answer: Relative status of the devices to be linked.

​

Two relationships are possible in a network

​

🕘 PEER-TO-PEER: Devices share the link equally

​

🕘 PRIMARY-SECONDARY: One device controls traffic and the others must

transmit through it

​

© Copyright Virtual University of Pakistan

29 of 244

​

CS601-Data Communication VU

​

MESH TOPOLOGY

​

o Every device has dedicated a point-to-point link to every other device

o Dedicated: Means that the link carries traffic only between these two devices

​

n(n )

​

o

​

Example Mesh Topology

In figure above, we have 5 Nodes, therefore:

​

🖲 No. of Links= 5(5-1)/2 = 10

🖲 No. of I/O Ports= 5-1 = 4

​

This increase exponentially with increase in No. of Nodes

​

🖲 e.g. for 6 nodes = 15 Links

🖲 7 Nodes=21 Links

​

🙣 Advantages of Mesh Topology

​

🕘 Use of Dedicated links guarantees that each connection can carry its own load.

This eliminates Traffic Problems as in case of Shared Link

🕘 Mesh Topology is robust. If one link fails, it does not effect other links

🕘 Security & Privacy due to dedicated links

🕘 Point – to –Point links make Fault Identification easy

​

🙣 Disadvantages of Mesh Topology

​

🕘 Amount of Cabling

🖲 Makes Installation & Reconfiguration difficult

🖲 Sheer bulk of wiring can be greater than the available space

​

🕘 Number of I/O Ports Required

🖲 Hardware required to connect each link can be prohibitively expensive

​

© Copyright Virtual University of Pakistan

Links to connect ‘n’ devices

​

n −1

−

Each device must have I/O Ports

2

30 of 244

​

CS601-Data Communication VU

​

Therefore, Mesh topology has limited use

​

Star Topology

​

o Each device has a dedicated point-to-point link to a central controller ( Hub)

o Devices are not directly connected to each other

o Controller (Hub) acts as an exchange

o If one device wants to send data to the other, it sends the data to the controller ,

which then relays it to the other connected device

​

🙣 Advantages of Star Topology

​

🕘 Less Cabling

🕘 Less Expensive than Mesh as each device need sonly one link and one I./O

Port

🕘 Easy to Install and Reconfigure

🕘 Robust, if a link fails , only that link fails

🕘 Easy Fault Detection

​

🙣 Disadvantages of Star Topology

​

🕘 Although Cabling required is far less than Mesh

🕘 Still each node must be connected to a Hub , so Cabling is still much more

than some other Topologies

Tree Topology

​

o A variation of Star Topology

​

© Copyright Virtual University of Pakistan

31 of 244

​

CS601-Data Communication VU

​

o Nodes in a Tree are linked to a central hub that controls the traffic to and from

network

o Difference b/w star and tree is not all the devices plug directly into the central

HUB

o Majority connects to secondary hub that is connected to central hub

​

🙣 CENTRAL HUB in Tree Topology

​

🕘 Central Hub in a Tree is an ACTIVE HUB

🕘 ACTIVE HUB contains a repeater

🕘 Repeater is a hardware device that regenerates the received bit pattern before

sending them out.

🕘 Repeater strengthens TX. And increases the distance a signal can travel

​

🙣 Secondary HUB in Tree Topology

​

🕘 Secondary Hub in a Tree may be Active or Passive HUB

🕘 Passive Hub simply provides physical connection between attached devices

​

🙣 Advantages of Tree Topology

​

🕘 Because of Secondary Hub, More devices can be attached to a Central Hub

and therefore increase the distance a signal can travel

🕘 Enables Differentiated Services: Allows to prioritize communication, e.g.

computers attached to one secondary hub can be given priority over others

🕘 Therefore, TIME SENSITIVE data will not have to wait for access to the

network

🕘 Rest of the advantages are almost the same as STAR

🖲 Example Tree Topology: Cable TV

​

CABLE TV

–Main cable from main office is divided into many

branches and each branch is divided into smaller branches

and so on

–Hubs are used when cable is divided

BUS TOPOLOGY

​

o All the previous topologies describe Point-to-point communication

o Bus Topology is Multipoint

o One long cable acts as a BACKBONE to link all devices in the network

​

© Copyright Virtual University of Pakistan

32 of 244

​

CS601-Data Communication VU

​

o Drop Lines and Taps

o Drop Line is the connection between device and the main cable (Backbone)

🕘 Tap is a connector that;

Splices into the main cable or

Punctures the sheathing of a cable to create connection with the

metallic core

​

🕘 Signal degrades as it travels, therefore there is a limit on:

🖲 The number of Taps a Bus can support and

🖲 The distance between those Taps

​

🙣 Advantages of BUS TOPOLOGY

​

🕘 Easy to install

🖲 Backbone can be laid on the most efficient path and then rest of the

nodes can be connected using Drop Lines

🕘 Less cabling than Mesh , Star or Tree

🕘 Difference b/w Star Cabling and Bus Cabling

​

🙣 Disadvantages of BUS Topology

​

🕘 Difficult Reconfiguration

🖲 Difficult to add new devices

🖲 adding new devices may require modification of backbone

​

🕘 No Fault Isolation

🖲 A fault or break in backbone can disable communication even on the same

side of the problem

🖲 Damaged area reflects signals back in the direction of origin creating

Noise in both directions

Summary

​

⑩ Topology

⑩ Categories of Topologies

Reading Sections

⑩ Section 2.2 “Data Communications and Networking” 4th Edition by Behrouz A.

Forouzan

​

© Copyright Virtual University of Pakistan

33 of 244

​

CS601-Data Communication VU

​

LECT URE #6

​

Ring Topology

​

Ring Topology Diagram

​

o Each device has point-to-point dedicated link with only two devices on either side

o A signal is passed in the ring in one direction from device to device until it reaches its

destination

o Each device has a repeater incorporated

o When a device receives a signal destined for another device, it regenerates the bits

and pass them along

​

🙣 Advantages of Ring Topology

​

🕘 Easy to Install and Reconfigure

🖲 Only two connections to be moved to add or delete a device

​

🕘 SIMPLE Fault Isolation

🖲 Generally a signal is circulating at all times in a ring.

🖲 If one device does not receive a signal within a specified period, it can

issue an alarm to tell network operator about the problem and its location

​

🙣 Disadvantages of Ring Topology

​

🕘 Unidirectional Traffic

🖲 A break in a ring I.e. a disabled station can disable the entire network

​

🕘 Can be solved by using:

​

© Copyright Virtual University of Pakistan

34 of 244

​

CS601-Data Communication VU

​

🖲 Dual Ring or

🖲 A switch capable of closing off the Break

​

🙣 Hybrid Topologies

​

o Several topologies combined in a larger topology

​

🖲 Example: One department of a business may have decided to use a Bus

while other has a Ring

o The two can be connected via a Central Controller in Star Topology

​

TRANSMISSION MODE

​

“Transmission Mode is used to define the direction of the signal flow between the

linked

devices”

​

Transmission Modes

​

Simplex Half-Duplex Full-Duplex

​

🙣 SIMPLEX MODE

​

© Copyright Virtual University of Pakistan

Hybrid Topologies

35 of 244

​

CS601-Data Communication VU

​

o Communication is Unidirectional

o Only one of the two stations can transmit

o Other can only receive

​

🖲 Examples: KEYBOARDS (Only Input), Monitors (Only Output)

​

🙣 Half – Duplex Mode

​

o Each station can both transmit and receive but not at the same time

o When one device is sending the other can only receive and vice versa

o Lets understand the concept by using an example

​

🖲 One Lane Road with two directional traffic

🖲 When cars are traveling in one direction, cars going the other way must wait

​

o Full Channel capacity is allocated to whatever entity that is transmitting at a specific

time

​

🖲 Walkie Talkies

​

🙣 Full Duplex (Duplex)

​

o Both stations can transmit and receive simultaneously

o Two way street with traffic flowing in both directions at the same time

o Signals traveling in either direction share the capacity of the link

o The sharing can take place in two ways:

​

© Copyright Virtual University of Pakistan

36 of 244

​

CS601-Data Communication VU

​

o Either the link must contain two physically separate transmission paths:

🖲 One for sending and

🖲 One for receiving

​

o Capacity of the channel is divided between signals traveling in opposite directions

​

🖲 EXAMPLE

–Telephone Network

When two people are communicating via a telephone line, both can talk

and listen at the same time

​

Categories of Networks

​

o There are three main categories of Networks:

​

🕘 LANS

🕘 WANS

🕘 MANS

​

o Into which category a network falls is determined by its SIZE, OWNERSHIP,

DISTANCE IT COVERS, and its PHYSICAL ARCHITECTURE

​

🙣 LANS

​

o

or a campus

​

o

🕘 Care must be taken in choice of a LAN, because there may be a substantial

capital investment for purchase and maintenance.

🕘 Secondly, the network management responsibility falls solely on the

user/company

​

o

🕘 Size of a LAN depends upon the Needs of Organization and the Type of

Technology

​

🕘 LAN can be as simple as two PCs and a printer in someone’s home office or it

can extend throughout a company and include complex equipment too

🕘 Currently LAN size is limited to a few kilometers

​

o

​

© Copyright Virtual University of Pakistan

A LAN is usually Privately owned and Links the devices in a single office, Building

​

Two Implications

​

Size of a LAN

​

Design of a LAN

37 of 244

​

CS601-Data Communication VU

​

🕘 LANs are designed to allow resources to be shared between personal computers or

workstations

🕘 The resources to be shared can include hardware (printer), software (an

application program) or data.

​

🖲 Example of a LAN

A common example of a LAN found in many business environments links a

work group of task related computers, for example engineering workstations

or Accounting PCs. One of the PCs may be given a large capacity disk and

becomes a server to others. Software stored on the server and is used by the

whole group. In this case size is determined by software licenses

​

o

🖲 In addition to size, LANs are distinguished from other types of networks by

Transmission media and topology

🖲 In general a given LAN will use only one type of Transmission medium

🖲 The most common LAN topology Bus, Star Ring

​

o

🖲 Traditionally 4 – 1 Mbps

🖲 Speeds increased and now 100Mbps and above are also possible

🖲 Giga Bit LAN technologies

🙣 WANs

​

o Generally cover a large geographical area and it usually span an Unlimited number of

miles by utilizing Public or Leased networks instead of having their own hardware as

in the case of LANs

​

o

🖲 Typically , it consists of a large number of Switching Nodes

🖲 Transmission from any one device is routed through these internal nodes to the

specified destination device

🖲 These nodes are not concerned with the content of the data, rather their

purpose is to provide a switching facility that will move the data from node to

node until it reaches its destination

o How to Implement a WAN?

🖲 Traditionally WAN s have been implemented using one of the 2 technologies:

–Circuit Switching

–Packet Switching

​

o Frame Relay and ATM Networks play important role nowadays too

​

© Copyright Virtual University of Pakistan

Transmission Media & Topology

​

Data Rates in a LAN

​

Design of a WAN

38 of 244

​

CS601-Data Communication VU

​

🙣 Circuit Switching

​

o A dedicated communication path is established between two stations through the

nodes of the network

​

o

​

🙣 acket Switching

​

o No capacity is dedicated along a path through the network

o Data Is sent out in small chunks called “Packets”

o Each path is passed from node to node

o At each node, entire packet is received, stored briefly and then transmitted to the next

node.

🖲

​

Frame Relay & ATM

o Overhead bits for Error Protection are removed

o 10’s of 100’s of Mbps and also Gbps is possible

Summary

​

⑩ The OSI Model

⑩ Layered Architecture

⑩ Encapsulation and Decapsulation

⑩ Physical Layer

⑩ Data Link Layer

​

Reading Sections

​

⑩ Section 2.4,2.5, “Data Communications and Networking” 4th Edition by Behrouz

A. Forouzan

⑩ Sections 1.3, “Data and Computer Communication” 6th Edition by William

Stallings

​

© Copyright Virtual University of Pakistan

This path/CAPACITY stays up for the duration of the communication

Example is Telephone Network

​

Example is : Computer to Computer Communication

39 of 244

​

CS601-Data Communication VU

​

LECT URE # 7

​

Metropolitan Area Networks

​

o Designed to extend over an entire city

🕘 It may be a single network e.g. Cable TV Network

Or

🕘 Interconnection of a No. of LANs into a larger network

​

🖲 Example: A company can use a MAN to connect the LANs in all of its offices

throughout a city

​

Internetworks

​

o When two or more networks are connected they become an internetwork or internet

o Individual networks are joined together by the use of Internetworking Devices like

Routers, Gateways etc.

​

🕘 internet: Combination of Networks

🕘 Internet: Specific World wide Network

​

The OSI MODEL

​

o International Standards Organization (ISO) 1947

o Multinational body dedicated to worldwide agreement on International Standards

​

© Copyright Virtual University of Pakistan

40 of 244

​

CS601-Data Communication VU

​

o An ISO Standard that covers all aspects of Network Communication is Open System

Interconnection Model (OSI)

o Open System: A model that allows two different systems to communicate regardless

of their underlying network

o Vendor –Specific Models close off communication

​

🙣 Purpose of the OSI MODEL

​

🕘 Open Communication between different systems without requiring changes to the

underlying hardware and software.

​

OSI Model is not a Protocol. It is a model for understanding and

designing a network architecture that is flexible, robust and interoperable

​

🙣 Definition of the OSI MODEL

​

A layered framework for the design of network systems that allows communication

across all types of computer systems regardless of their underlying architecture

​

🙣 Layers of the OSI Model

​

1. Physical (Bits)

2. Data Link (Frames)

3. Network (Packets)

4. Transport (Segment)

5. Session (Dialog units)

6. Presentation (Raw Data)

7. Application (Text, Numbers)

​

Please Do not Touch Steve’s Pet Alligator

​

© Copyright Virtual University of Pakistan

41 of 244

​

CS601-Data Communication VU

​

What happen when a message travels from device A to Device B?

​

o As the message travels from A to B , it may pas through many intermediate “Nodes”

o These nodes usually involve only the first three layers of the OSI Model

o In developing the OSI model, designers identified which networking functions had

related uses and collected those functions into discrete groups that became the layers

o Each layer defines a family of functions distinct from other layers

o By defining and localizing functionality in this fashion , the designers created an

architecture that is both comprehensive and flexible

o The OSI model allows complete transparency b/w otherwise incompatible systems

​

Peer-to-Peer Processes

​

o

upon the services from the layer below it.

​

o

o Between machines, layer x on one machine communicates with layer x on the other

machine.

o The communication is governed by Protocols

o The processes on each m/c that communicate at a given layer are called Peer –to peer

processes

​

Headers and trailers

​

o Control data added to a data parcel

o Sender appends header and passes it to the lower layer

o Receiver removes header and passes it to upper layer

​

o Headers are added at layer 6,5,4,3,2. Trailer is added at layer 2

​

© Copyright Virtual University of Pakistan

Within a single machine, each layer provides services to the layer above it and all

​

For example Layer 3

42 of 244

​

CS601-Data Communication VU

​

Passing of data and network information down through the layers of sending machine

AND Back up through the layers of the receiving machine is made possible by an

​

INTERFACE

​

o Each interface defines what information and services a layer must provide for the

layer above it

o Interface provides MODULARITY

o Each layer works as a separate module

o Any modification or replacements can be made without changes in surrounding

layers

o Organization of Layers

​

🕘 Network Support Layers

–Deals with the Physical aspect of moving data from one device to another

–Layers 1, 2, 3

​

🕘 User Support Layers

–Allows interoperability among unrelated software systems

–Layers 5, 6, 7

​

Organization of Layers

​

o Layer 4

–Ensures end-to-end reliable transmission

​

o Upper OSI Layers always implemented in Software

o Lower Layers are a combination of software and hardware

o Physical layer is mostly Hardware

​

The OSI Model

​

© Copyright Virtual University of Pakistan

43 of 244

​

CS601-Data Communication VU

​

Summary

​

⑩ Categories of Networks (MANs)

⑩ Internetworks

⑩ The OSI Model

​

Reading Sections

​

⑩ Section 2.5, 3.1, 3.2 “Data Communications and Networking” 4th Edition by

Behrouz A. Forouzan

​

© Copyright Virtual University of Pakistan

44 of 244

​

CS601-Data Communication VU

​

LECT URE # 8

​

Critique of OSI Model

​

Reasoning for OSI not getting Widespread

​

🕘 Bad Timing(slide) (Apocalypse of Two Elephants)

–David Clarke of MIT

–If standards are written too early: subject is badly understood and bad standards

–If standards are written too late so many companies may have already made

investments in doing the same thing with different other ways

​

🕘 Bad Technology

–Flow control, error control, addressing is multiple

–Session and Presentation(EMPTY), Network and DL(Full)

​

🕘 Bad Implementations

​

Apocalypse of Two Elephants

​

🙣 Physical (Layer 1)

​

o Coordinates the functions required to transmit a bit stream over a physical medium

o Deals with mechanical and electrical specifications of Tx. Medium and Interface

o Also defines procedures and functions that physical devices and interfaces need to

perform for TX. To occur (Figure)

​

© Copyright Virtual University of Pakistan

45 of 244

​

CS601-Data Communication VU

​

Figure

​

• Functions of Physical Layer

​

o Physical Characteristics of Interface & Media

​

🕘 Defines characteristics of Interface b/w device and Tx Medium

🕘 Interface is a plug gable connector that joins one or more signal conductors

🕘 Also defines the type of transmission medium

​

o Representation of Bits/Encoding

​

🕘 The physical layer data consists of a stream of bits (sequence of 1’s and 0’s)

🕘 To be transmitted the bits must be ENCODED into signals: Electrical or

Optical

🕘 Physical layer decides the type of ENCODING

​

o Data Rate / Transmission Rate

​

🕘 Date Rate ( Bits per second) also decided by the Physical Layer

🕘 So , Physical layer defines the Duration of a Bit

🕘 Means how long will a bit last

​

o Synchronization of Bits

​

🕘 Sender and Receiver must be synchronized at the bit level

🕘 Sender and Receiver clocks must be synchronized

🕘 It is done by Physical layer

​

o Line Configuration

​

🕘 Physical Layer is also concerned with Line Configuration

🕘 Line Configuration represents the connection of device with the Medium

🕘 Point-To-Point or Multipoint

​

o Physical Topology

​

🕘 Mesh, Star, Ring, Bus etc.

​

© Copyright Virtual University of Pakistan

46 of 244

​

CS601-Data Communication VU

​

o Transmission Mode

​

🕘 Physical Layer also defines the direction of Transmission between the devices

🕘 Simplex. Half Duplex, Full Duplex

​

🙣 Data Link Layer (Layer 2)

​

o Transforms physical layer which is raw transmission facility to a reliable link

o Responsible for Node to Node Delivery

o Makes physical layer look error free to the upper layer

​

Figure

​

• Functions of Data Link Layer

​

o Framing

​

🕘 The data link divides the stream of bits from Network layer into manageable

data units called “FRAMES”. This process is known as Framing.

​

o Physical Addressing

​

🕘 Frames need to be transmitted to different systems on a network

🕘 Data Link layer adds a HEADER to Frame

🕘 Header defines the physical address of sender(Source address) and/or receiver

address (Destination address)

🕘 If frame is intended for a device outside the network, the receiver address is

the address of the device that connects one network to the other

​

o Flow Control

🕘 Data Link layer imposes Flow Control mechanisms to prevent overwhelming

the receiver

​

© Copyright Virtual University of Pakistan

47 of 244

​

CS601-Data Communication VU

​

o Error Control

🕘 Data link layer adds reliability to physical layer by adding mechanisms to

detect and retransmit lost or damaged frames

🕘 Also uses a mechanism to prevent duplication of frames

🕘 Error Control bits are added to the form in the TRAILER

​

o Access Control

🕘 Two or more devices may be connected to a single link

🕘 Data link protocols are necessary to determine which device will have the

control of the link at a given time

​

🖲 EXAMPLE

• Node with physical address 10 sends a frame to a node with

physical address 87

• Two nodes are connected by a link.

• At the DL level, this frame contains physical address in the Header,

This is the only address needed at this level

• Rest of header contains other info as needed

• Trailer contains extra bits needed for error detection

​

🙣 NETWORK LAYER

​

🙣

o Responsible for Source-to-Destination delivery

o DL Layer oversees the delivery of data between 2 systems on the same network

o Network Layer ensures that each packet gets from its point of origin to its final

destination

​

🕘 Node –to Node vs Source to Destination

🖲 If the two systems are connected to the same network, there is no need for

Network layer and node –to node delivery is enough

🖲 If two systems are connected to two different networks, there is often a

need for Source-to destination delivery

​

© Copyright Virtual University of Pakistan

48 of 244

​

CS601-Data Communication VU

​

• Function of Network Layer

​

o Logical Addressing

​

🕘 Physical addressing implemented by Data link layer handles addressing

problem locally

🕘 If a packet is going from one network to another, we need another addressing

system to help distinguish source & destination systems

🕘 Network layer adds Header to the data coming from upper layers that among

other things include LOGICAL ADDRESS of the sender and receiver

o Routing

🕘 When independent networks or links are connected together to create an

“internetwork”, the internetworking devices route packets to their final

destination

🕘 Routers are those internetworking devices

🕘 One of the functions of Network layer is to define this route

​

🖲 Example Network Layer

•We want to send data from a node with network address ‘A’ and physical

address 10, located on one LAN to

•A node with network address P and physical address 95 located on

another LAN

​

•Because the two nodes are present on two different networks, we cannot

use physical address only

•We need a Network address that can pass us from the Network

boundaries

•The packet therefore contains the logical address which remains the same

from source to destination

•The physical address will change when packet moves from one network

to the other

​

Summary

⑩ The OSI Model

⑩ Function of Layers

Reading Sections

​

⑩ Section 3.1,3.2, “Data Communications and Networking” 4th Edition by Behrouz

A. Forouzan

​

© Copyright Virtual University of Pakistan

•The box with R is a Router

49 of 244

​

CS601-Data Communication VU

​

LECT URE #9

​

🙣 Transport Layer

​

o Responsible for Source-to-Destination delivery of Entire Message

o Network Layer oversees source-to-destination delivery of the entire packets but it

does not recognize any relationship b/w those packets

o Network layer treats each packet independently

o Transport Layer ensures that whole message arrives at the destination intact

​

• Functions of Transport Layer

​

o Service Point Addressing

​

🕘 Computers run several programs at the same time

🕘 Source-to-Destination delivery means delivery not only from only from one

computer to the other but also from a specific process on one computer to a

specific process on the other

🕘 Transport layer header includes a type of address called Service Point Address

or PORT Address

🕘 Network layer each packet to the correct computer while Transport layer gets

entire message to the correct process on that comuter

​

o Segmentation and Reassembly

​

🕘 Message is divided into transmittable segments

🕘 Each segment contains a sequence number

🕘 These sequence no.s enable Transport layer at the receiving m/c to reassemble

message correctly at the destination and to identify and replace lost packets

​

© Copyright Virtual University of Pakistan

50 of 244

​

CS601-Data Communication VU

​

o Connection Control

​

🕘 Transport layer can be either connection-less or connection-oriented

🕘 Connectionless

Treats each segment as an independent packet and delivers it to the

transport layer of the destination m/c

​

🕘 Connection-Oriented

A connection is established first with Transport layer before

delivering the packet.

​

🕘 After all data is Tx. , the connection is disconnected

​

o Flow Control

​

🕘 Like Data link layer, Transport layer is also responsible for Flow control

🕘 Flow control is performed end-to-end rather than across a single link

​

o Error Control

​

🕘 Like data link layer, Transport layer is responsible for the Error Control

🕘 Error control is performed end-to-end

🕘 This layer makes sure that entire message reaches Rx Transport layer w/o

error

🕘 Error can be a result of Lost, damaged or duplicated data and usually Re Tx is

done

​

Example Figure

​

🙣 Session Layer

​

o Session layer is the Network Dialog Controller

o Establishes, Maintains, and Synchronizes the interaction between

communicating systems

​

© Copyright Virtual University of Pakistan

51 of 244

​

CS601-Data Communication VU

​

• Function of Session Layer

​

o Dialog Control

🕘 Session layer allows two systems to enter into a dialog.

🕘 It allows communication between two processes to take place either in half

duplex or full duplex mode

​

o Synchronization

​

🕘 Session layer allows a process to add check points (synchronization points)

in a stream of data

🕘 If a system is sending a file of 2000 pages, it is advisable to insert check

points after every 100 page to ensure that each 100 page unit is received

and acknowledged independently

🕘 In this case, if a crash happens during the transmission of page 523 ,

retransmission at page 501

🕘 Page 1-500 need not be retransmitted

​

🙣 Presentation Layer

o This layer is concerned with Syntax and Semantics of info exchange between

two systems

​

Summary

⑩ The OSI Model

⑩ Functions of Layers

Reading Sections

⑩ Section 3.2 “Data Communications and Networking” 4th Edition by Behrouz A.

Forouzan

​

© Copyright Virtual University of Pakistan

52 of 244

​

CS601-Data Communication VU

​

LECT URE #10

​

🙣 Presentation Layer

​

o This layer is concerned with Syntax and Semantics of info exchange between

two systems

​

• Functions of Presentation Layer

o Translation

​

🕘 The processes (running programs) in two systems are usually exchanging

info in the form of character strings, numbers and so on…..

🕘 The info should be changed to bit streams before being transmitted

🕘 Because different computers use different ENCODING SYSTEMS,

presentation layer is responsible for interoperability b/w these different

encoding methods

🕘 The presentation layer at the sender changes the info from its sender-

dependent format to the common format

🕘 The presentation at the receiver changes info from common to the receiver

dependent format

​

o Encryption

​

🕘 To carry sensitive info , a system must be able to assure privacy

🕘 Encryption means that sender transforms original info to another form and

sends the resulting message out over the network

🕘 Decryption reverses the original process to transform message back to its

original form

​

o Compression

​

🕘 Data compression reduces the number of bits to be transmitted

​

© Copyright Virtual University of Pakistan

53 of 244

​

CS601-Data Communication VU

​

🕘 Data compression becomes particularly important in transmission of

multimedia such as text, audio and video

​

🙣 Application Layer

o Enables the user either human or software to access the network

o It provides user interface and support for the services such as Electronic mail,

Remote File access and Transfer, Shared Database Management and other

services

​

Application Layer Figure

​

o In the figure, of many application services available, only three services are

shown

–X-400 (message Handling Services)

–X-500 (Directory Services)

–File Transfer, Access& Management (FTAM)

o In this example user uses X-400 to send an e-mail message

o No headers or trailers are added at this layer

​

• Application Layer Functions

​

🕘 Network Virtual Terminal

​

o NVT is a software version of a physical terminal and allows a user to log on to

a remote host

o To do so the application created emulation of terminal at the remote host

o Users computer talks to the software terminal which in turn talks to the host

*& vice versa

o Remote host believes it is communication with one of its own terminals and

allow you to log on

​

© Copyright Virtual University of Pakistan

54 of 244

​

CS601-Data Communication VU

​

🕘 File Transfer, Access & Manage.(FTAM)

​

o This application allows a user to access file on the remote computers to make

changes or read data

o The purpose of this access is to Retrieve files from a remote computer and to

manage or control files in that remote computer

​

🕘 M il Services

o This application provides the basis for email forwarding and storage

​

🕘 Directory Services

o Provides distributed database sources and access for global info about various

objects and services

​

Summary of Layer Functions

​

TCP/IP Protocol Suite

​

o Transmission Control Protocol / Internetworking Protocol

​

o

o Widely used in the Internet Today

​

🙣 Layers in TCP/IP Protocol Suite

​

o Physical (physical standards)

o Data Link (N/w Interface)

o Network (Interconnectivity)

o Transport(Transport Functions)

o Application(Session , Pres, app of OSI)

​

© Copyright Virtual University of Pakistan

Developed Prior to OSI Model

55 of 244

​

CS601-Data Communication VU

​

TCP/IP Protocol Suite

​

Summary

⑩

⑩Functions of Layers

⑩TCP/IP Protocol Suite

​

Reading Sections

⑩Section 3.2, 3.3 “Data Communications and Networking” 4th Edition by

Behrouz A. Forouzan

​

© Copyright Virtual University of Pakistan

The OSI Model

56 of 244

​

CS601-Data Communication VU

​

LECT URE #11

​

Signals

​

🙣 Need For Signals

​

o One of the major concerns of Physical layer is moving information in the form

of electromagnetic signals across a TX medium

o Information can be voice, image, numeric data, characters or any message that

is readable and has meaning to the destination user (human or m/c)

o Generally, the info usable to a person or application is not in a form that can

be transmitted over a network

o For Example, you cannot roll up a photograph, insert it into the wire and

transmit it across the city

o You can transmit however an encoded description of the photograph

o The binary digits must be converted into a form that TX. Medium can accept

o TX. Media work by conducting energy along a physical path. So the data

stream of 1s and 0s must be turned into energy in the form of EM signals

​

🙣 Analog and Digital

​

o Both data and signals that represent them can take either analog or digital form

​

🕘 ANALOG

​

• Analog refers to something that is continuous in time

• Continuous– A set of specific points of data and all possible points b/w

them

​

🕘 DIGITAL

​

• Digital refers to something that is discrete

• Discrete– A set of specific points of data with no points in between

​

o Data can be Analog or Digital

​

🖲 Example of ANALOG Data is Human voice

🖲 When somebody speaks, a continuous wave is created in the air.

🖲 This can be captured by a Microphone and converted to an Analog

Signal

🖲 An example of DIGITAL data is Data stored in the memory of a

computer in the form of 1s and 0s. It is usually converted to a digital

signal when it is transferred from one position to the other inside or

outside the computer

​

o Signals can be Analog or Digital

​

🙣 ANALOG Signal

​

© Copyright Virtual University of Pakistan

57 of 244

​

CS601-Data Communication VU

​

o It is a continuous waveform that changes smoothly over time

o As the wave moves from value ‘ A’ to value ‘B’, it passes through and

includes an infinite number of values along its path

​

🙣 DIGITAL Signal

​

o A digital signal is discrete. It can have only a limited number of defined

values, often as simple as 1s and 0s

o The transition of a digital signal from value to value is instantaneous like a

light being switched ON and OFF

​

Analog and Digital Signals

​

o We illustrate signals usually by plotting them on a pair of perpendicular axis

o Vertical axis represent the value or the strength of the signal

o Horizontal axes represent the passage of time

o The curve representing the Analog signal is smooth and continuous, passing

through an infinite number

o The vertical lines of the digital signal shows the sudden jump the signal makes

from value to value. The flat highs and the lows represent that those values are

fixed

o In short, Analog signal varies continuously w.r.t Time whereas Digital signal

varies instantaneous

​

Periodic and Aperiodic Signals

​

Signals

(Analog or Digital)

​

Periodic Aperiodic

​

© Copyright Virtual University of Pakistan

58 of 244

​

CS601-Data Communication VU

​

🙣 Periodic Signals

​

o A signal is called Periodic if it completes a pattern within a measurable time

frame called a Period and then repeats that pattern over identical subsequent

Periods

o The completion of one full pattern is called a CYCLE

o Period: Time required (in Seconds) to complete one full cycle, represented by

‘T’

​

🙣 Aperiodic Signals

​

o An Aperiodic or Non-Periodic signal is the one that changes constantly

without exhibiting a pattern or cycle that repeats over time

​

• Fourier Transform

It has been proved by a technique called FOURIER TRANSFORM

that any Aperiodic signal can be decomposed into an infinite number

of Periodic Signals

​

🙣 ANALOG SIGNALS

o Analog signals can be classified as Simple or Composite

​

o Simple Analog Signal(Sine Wave)

–Cannot be decomposed into simpler signal

​

o Composite Analog Signal

–Composed of multiple sine waves

​

🙣 Sine Waves

o Sine Waves are the most fundamental form of Periodic Analog Signals

o The curve oscillates over the course of a cycle smoothly and consistently

​

© Copyright Virtual University of Pakistan

59 of 244

​

CS601-Data Communication VU

​

o Each cycle consists of a single arc above the time axis followed by a single arc

below it

o Sine Waves can be fully described by three characteristics:

​

🕘 Amplitude

🕘 Period/Frequency

🕘 Phase

​

🕘 Amplitude

• Amplitude of a signal is the value of the signal at any point on the

wave

• It is equal to the vertical distance from a given point on the wave form

to the horizontal axis

• The maximum amplitude of the sine wave is equal to the highest value

it reaches on the vertical axis

• Amplitude measured in Volts, Amperes or Watts

​

🕘 Period & Frequency

• Period: Amount of time ( in seconds) a signal need to complete one

cycle

• Frequency: Number of cycles completed in one second

• Unit of Period: Period is expressed in seconds

​

• Communication industry uses 5 units to measure period

• Frequency is measured in hertz, There are 5 units used in Hertz

​

© Copyright Virtual University of Pakistan

60 of 244

​

CS601-Data Communication VU

​

Seconds____Hertz

Milliseconds____Kilohertz

Microseconds____Megahertz

Nanoseconds____Gigahertz

Picoseconds____Terahertz

​

Summary

⑩ Signals

⑩ Analog and Digital

⑩ Analog and Digital Data & Signals

⑩ Periodic & Aperiodic Signals

⑩ Sine Waves and its Characteristics

​

Reading Sections

​

⑩Section 4.1, 4.2, 4.3“Data Communications and Networking” 4th Edition by

Behrouz A. Forouzan

​

© Copyright Virtual University of Pakistan

61 of 244

​

CS601-Data Communication VU

​

LECT URE #12

​

Problems 4.3

A Sine wave has a frequency of 6 Hz. What is its period?

Solution

​

T =

​

Problems 4.5

A Sine wave completes one cycle in 4 seconds. What is its frequency?

Solution:

​

f =

​

Another Way to look at Frequency

​

o Measurement of the rate of change

o The rate at which a sine wave moves from its lowest to its highest point is its

frequency

o A 40 Hz signal has half the frequency of a 80 Hz signal, therefore each cycle

takes twice as long to complete one cycle I.e. to go from its lowest to its

highest

o Change in a short Time = High Frequency

​

Two Extremes Frequency

​

o What if a signal does not change at all?

o What if it maintains a constant voltage level the entire time?

🖲 In such cases , Frequency is going to be zero

​

o If a signal does not change, it will never complete any cycles, and frequency is

no. of cycles in 1 second so Freq = 0

o No change at all ⇒

– Zero frequency

o Instantaneous changes ⇒

​

Phase

o Phase describes the position of the waveform relative to time zero

o If we think of the wave as something that can be shifted backward or forward

along the time axis

o Phase describes the amount of that shift

o It indicates the status of the first cycle

o Phase is measured in Degrees or Radians

o 360 degrees – 2 pi Radians

o A phase shift of 360 degrees correspond to a shift of a complete period

o A phase shift of 180 degree correspond to a shift of half a period

o A phase shift of 90 degree correspond to a shift of quarter a period

​

© Copyright Virtual University of Pakistan

.17 sec

​

.25Hz

6

​

4

= =

​

= =

1 1

​

f

​

1 1

​

T

​

– Infinite frequency

62 of 244

​

CS601-Data Communication VU

​

Problem 4.7

A sine wave is offset of a cycle with respect to time zero. What is its phase?

​

Solution

​

One Cycle = 360 Degrees

​

1 360

of a cycle = = 60 Degrees

6 6

​

Control of Signals

​

o Signal can be controlled by three attributes:

🕘 Amplitude

🕘 Frequency

🕘 Phase

Control of Signals- Amplitude

​

Control of Signals- Frequency

​

© Copyright Virtual University of Pakistan

1

​

6

63 of 244

​

CS601-Data Communication VU

​

Control of Signals- Phase

​

Time and Frequency Domain

o Time Domain plots show changes in signal amplitude w.r.t Time

o It is an Amplitude versus Time Plot

o Phase and Frequency are not explicitly measured on a Time domain plot

o To show the relationship between amplitude and Frequency, we can use what is

called a Frequency Domain Plot

​

Time and Frequency Domain Example

​

© Copyright Virtual University of Pakistan

64 of 244

​

CS601-Data Communication VU

​

o Figure compares the time domain (instantaneous amplitude w.r.t Time) and the

Frequency domain (Max amplitude w.r.t Frequency)

o Low Frequency signal in frequency domain corresponds to a signal with longer period

in Time domain & vice versa.

o A signal changing rapidly in Time domain corresponds to High frequency in

Frequency domain

​

o Figure shows 3 signals with different frequencies and its time and frequency domain

presentations

​

Composite Signals

​

o Second type of Analog Signals, that is composed of multiple sine waves

o So far we have been focused on simple periodic signals or sine waves

o Many useful sine waves do not change in a single smooth curve b/w minimum and

maximum amplitude.

o They jump, slide , wobble and spikeAs long as as any irregularities are consistent,

cycle after cycle, a signal is still Periodic

o It can be shown that any periodic signal no matter how complex can be

decomposed into a collection of sine waves, each having a measurable amplitude,

frequency & phase

o We need FOURIER ANALYSIS to decompose a composite signal into its

components

​

© Copyright Virtual University of Pakistan

65 of 244

​

CS601-Data Communication VU

​

o Figure shows a periodic signal decomposed into two sine waves

o First sine wave (middle one) has a frequency of ‘6’ while the second sine wave has a

frequency of ‘0’

o Adding these two signals point by point results in the top graph

o Original signal looks like a sine wave that has its time axis shifted downward

o This shift is because of DC Component or zero frequency component in the signal

o If you look at the signal in time domain, a single point is there while in frequency

domain , two component freq.'s are there

Summary

​

⑩ Sine Waves and its Characteristics

⑩ Control of Signals

⑩ Time and Frequency Domain

⑩ Composite Signals

​

Reading Sections

​

⑩ Section 4.4, 4.5 “Data Communications and Networking” 4th Edition by Behrouz

A. Forouzan

​

© Copyright Virtual University of Pakistan

66 of 244

​

CS601-Data Communication VU

​

LECT URE #13

​

Frequency Spectrum / Bandwidth

o Frequency Spectrum: of a signal is the collection of all the component frequencies

it contains

o It is shown using a Frequency domain graph

o Bandwidth: of a signal is the width of the frequency spectrum

o In other words ,Bandwidth refers to the range of the component frequencies and

Frequency Spectrum refers to the elements within that range

​

How to calculate Bandwidth?

o To calculate Bandwidth, subtract the lowest frequency from the highest frequency

​

⑩ SLIDE

​

Example 4.8

If a periodic signal is decomposed into five sine waves with frequencies 100, 300, 500,

700, and 900 Hz, what is the Bandwidth?

Solution

​

B = f −

​

🙣 Other Definitions of Bandwidth

​

🕘 3 dB Bandwidth or Half Power Bandwidth

​

H ( f )

© Copyright Virtual University of Pakistan

f = 900 −100 = 800Hz

h l

67 of 244

​

CS601-Data Communication VU

​

For the magnitude spectra of , the range of the spectrum that does not

fall lower than 1

​

2

​

🕘 Equivalent Noise Bandwidth

​

The width of a fictitious rectangular spectrum created to have the same power

in the rectangular band as the power of the signal in positive frequencies

​

🕘 Null-to-Null Bandwidth or Zero Crossing Bandwidth

​

If the maximum frequency in a spectrum is

​

below will be

o

Null Bandwidth 1 2

​

🕘 Power Bandwidth

Frequency Band in which 99% of the total power resides

​

© Copyright Virtual University of Pakistan

is the Null-to-

,the first null above and

, where

f − f

2f

o

and

H ( f )

​

f 1f f

68 of 244

​

CS601-Data Communication VU

​

🙣 Digital Signals

In addition to being represented by Analog Signals, data can also be represented

by a Digital signal

​

🙣 Bit Interval and Bit Rate

Most digital signals are aperiodic and thus Period and Frequency are not the

appropriate terms to describe them

​

🕘 Bit Interval (seconds)

🖲 Time required to send one single bit

​

🕘 Bit Rate (bps)

🖲 Number of bits sent per second

​

Frequency Spectrum of a Digital Signal

​

o Frequency spectrum of a digital signal contains an infinite number of frequencies with

different amplitudes

o Ideally we want to send all the components but if we send only those components

whose amplitudes are significant , we can still recreate the digital signal with

reasonable accuracy at the receiver

​

© Copyright Virtual University of Pakistan

69 of 244

​

CS601-Data Communication VU

​

Summary

⑩ Frequency Spectrum and Bandwidth

⑩ Other Definitions of Bandwidth

⑩ Digital Signals

​

Reading Sections

​

⑩ Section 4.4, 4.5, 4.6 “Data Communications and Networking” 4th Edition by

Behrouz A. Forouzan

​

© Copyright Virtual University of Pakistan

70 of 244

​

CS601-Data Communication VU

​

LECT URE #14

​

Conversions

​

Introduction

o Information must be transformed into signals before it can be transported across the

communication media

o How info is transformed depends on its original format and on the format used by the

communication device

o If you want to send a letter by a smoke signal, you need to know which smoke

patterns make which words in your message before building the fire

o Words are the Information and the puffs of smoke are representation of that

information

​

Introduction to the type of Conversions

​

o Data stored in the computer is in the form of 0’s and 1’s. To be carried from

one place to the other, data is usually converted to digital signals

o This is called “Digital-to-Digital Conversion” or “Encoding digital data into

digital signals”

o Sometimes we need to convert an analog signal to the digital signal

o For Example, conversion of Telephone conversation to digital signal for a no.

of different reasons such as to decrease the effect of noise

o This is called “Analog-to-Digital Conversion” or “Digitizing an Analog

Signal”

o We might want to send a digital signal coming out of computer through a

medium designed for analog signals

o For example, To send data from one place to the other using a Telephone line

o This is called “Digital-to-Analog Conversion” or “Modulating a digital

Signal”

o Often an analog signal is sent over long distances using analog media

o For Example, voice or music from a radio station which is an analog signal is

transmitted through the air, however the frequency of voice or music is not

suitable for this kind of Tx.

o The signal should be carried by a higher frequency signal

o This is called “Analog-to-Analog Conversion” or “Modulating an analog

Signal”

​

🙣 Digital-to-Digital Conversion

o Digital-to-Digital conversion/encoding is the representation of digital

information by digital signal

​

© Copyright Virtual University of Pakistan

Types of Conversions

71 of 244

​

CS601-Data Communication VU

​

o For Example when you Tx data from Computer to the Printer, both original

and transmitted data have to be digital

o In this type of encoding, 1’s and 0’s generated by the computer are translated

into voltage pulses that can be propagated over the wire

​

o Figure shows the relationship between digital information, digital-to-digital

encoding hardware , and the resultant digital signal

​

Types of Digital-to-Digital Encoding

​

Digital/Digital Encoding

​

Unipolar Polar Bipolar

​

🙣 UNIPOLAR

🕘 Encoding is simple , with only one technique in use

🕘 Simple and Primitive

🕘 Almost Obsolete Today

🕘 Study provides introduction to concepts and problems involved with more

complex encoding systems

​

o Digital Transmission system works by sending voltage pulses on

the Tx. Medium

o One voltage level stands for binary 0 while the other stands for

binary 1

o It is called Unipolar because it uses only one polarity

​

© Copyright Virtual University of Pakistan

72 of 244

​

CS601-Data Communication VU

​

o This polarity is assigned to to one of the two binary states usually a

‘1’

o The other state usually a 0 is represented by zero voltage

o Figure shows the idea: 1’s are encoded as +ve values, and 0’s are

encoded as –ve values

​

Pros and Cons of Unipolar Encoding

• PROS

– Straight Forward and Simple

– Inexpensive to Implement

• CONS

– DC Component

– Synchronization

​

DC Component

o Average Amplitude of a unipolar encoded signal is non-zero

o This is called DC Component I.e. a component with zero

frequency

o When a signal contains a DC Component, it cannot travel

through a Tx. Medium that cannot handle DC components

​

Synchronization

o When the signal is unvarying, Rx. Cannot determine the beginning

and ending of each bit

o Synchronization Problem can occur when data consists of long

streams of 1’s or 0’s

o Therefore, Rx has to rely on a TIMER

​

o Consider we have a bit rate of the signal to be 1000bps

⑩ 1000 bits in 1 second

⑩ 1 bit in 0.001 second

o So if a +ve voltage lasts 0.005 sec, it reads five 1’s

o Sometimes it stretches to 0.006 seconds and an extra one bit is read

by the Rx

⑩ Solution:

– Separate Parallel Line

​

o Carries a clock pulse and allows receiver to resynchronize its timer

to that of the signal

o Doubling no. of Tx lines increase Cost and proves uneconomical

​

🙣 POLAR

Encoding has 3 subcategories:

🕘 Non Return to Zero (NRZ),-- Return to Zero (RZ)

🕘 Bi phase

🕘 Two of which have multiple variations of their own

​

🕘 Polar encoding uses two voltage levels

–One positive and one negative

​

© Copyright Virtual University of Pakistan

73 of 244

​

CS601-Data Communication VU

​

🕘 By using two voltage levels, average voltage level on the line is reduced

and DC Component problem of unipolar encoding is alleviated

​

Types of Polar Encoding

​

Non Return to Zero (NRZ)

o In NRZ Encoding, the level of signal is either positive or negative

​

NRZ

​

NRZ-L NRZ-I

​

o NRZ-L

Level of the signal depends on the type of bit it represents

A +ve voltage usually means the bit is a 1 and a –ve voltage means the

bit is a 0 (vice versa)

​

⑩Problem with NRZ-L: When long streams of 0’s or 1’s are there in

data, Rx receives a continuous voltage and should determine how many

bits are sent by relying on its clock , which may or may not be

synchronized with the sender clock

​

o NRZ-I

​

The inversion of the level represents a 1 bit

​

© Copyright Virtual University of Pakistan

74 of 244

​

CS601-Data Communication VU

​

A bit 0 is represented by no change

NRZ-I is superior to NRZ-L due to synchronization provided by signal

change each time a 1 bit is encountered

The string of 0’s can still cause problem but since 0’s are not as likely,

they are less of a problem

​

Summary

​

⑩ Introduction to the Encoding Techniques

⑩ Digital-To-Digital Encoding

⑩ Types of Digital-To-Digital Encoding

⑩ UniPolar Encoding

⑩ Polar Encoding

– NRZ

​

Reading Sections

​

⑩ Section 5.1, “Data Communications and Networking” 4th Edition by Behrouz A.

Forouzan

​

© Copyright Virtual University of Pakistan

75 of 244

​

CS601-Data Communication VU

​

LECT URE #15

​

Conversions

​

🙣 Return to Zero (RZ)

o Any time, data contains long strings of 1’s or 0’s, Rx can loose its timing

o In unipolar, we have seen a good solution is to send a separate timing

signal but this solution is both expensive and full of error

o A better solution is to somehow include synch in encoded signal somewhat

similar to what we did in NRZ-I but it should work for both strings of 0 &

1

o One solution is RZ encoding which uses 3 values : Positive, Negative and

Zero

o Signal changes not b/w bits but during each bit

o Like NRZ-L , +ve voltage means 1 and a –ve voltage means 0, but unlike

NRZ- L, half way through each bit interval, the signal returns to zero

o A 1 bit is represented by positive to zero and a 0 is represented by negative

to zero transition

o The only problem with RZ encoding is that it requires two signal changes

to encode one bit and therefore occupies more BANDWIDTH

o But of the 3 alternatives we have discussed, it is most effective

​

• Biphase Encoding

o Best existing solution to the problem of Synchronization

o Signal changes at the middle of bit interval but does not stop at zero

o Instead it continues to the opposite pole

​

Biphase Encoding

​

Manchester Differential Manchester

​

© Copyright Virtual University of Pakistan

76 of 244

​

CS601-Data Communication VU

​

🙣 Manchester

​

o Uses inversion at the middle of each bit interval for both synchronization and bit

representation

​

⑩Negative-to-Positive Transition= 1

⑩Positive-to-Negative Transition = 0

⑩By using a single transition for a dual purpose, Manchester

acheives the same level of synchronization as RZ but with only two

levels of amplitude

​

🙣 Differential Manchester

​

o Inversion at the middle of the bit interval is used for Synchronization but

presence or absence of an additional transition at the beginning of bit interval

is used to identify a bit

o A transition means binary 0 & no transition means binary 1

o Requires 2 signal changes to represent binary 0 but only one to represent

binary 1

​

• Bipolar Encoding

o Like RZ, it uses three voltage levels:

o Unlike RZ, zero level is used to represent binary 0

o Binary 1’s are represented by alternate positive and negative voltages

Types of Bipolar Encoding

​

© Copyright Virtual University of Pakistan

77 of 244

​

CS601-Data Communication VU

​

🕘 Alternate Mark Inversion (AMI)

🖲 Simplest type of Bipolar Encoding

🖲 Mark ⮴ Comes from Telegraphy (1)

🖲 Alternate Mark Inversion means Alternate ‘1’ Inversion

🖲 Pseudoternary

​

🖲 By inverting on each occurrence of 1, AMI accomplishes 2 things:

–The DC component is zero

–Long sequence of 1’s stay synchronized

🖲 No mechanism of ensuring synch is there for long stream of 0’s

o Two variations are developed to solve the problem of synchronization of sequential

0’s

​

–HDB3 ⮴ used in Europe & Japan

o Both modify original pattern of AMI only on case of long stream of zeroes

​

B8ZS

Convention adopted in North America to provide synch for long string of

zeros

Difference b/w AMI and B8ZS occurs only when 8 or more consecutive

zeros are encountered

Forces artificial signal changes called VIOLATIONS

Each time eight 0’s occur , B8ZS introduces changes in pattern based on

polarity of previous 1 (the ‘1’ occurring just before zeros)

​

© Copyright Virtual University of Pakistan

–B8ZS ⮴ used in North America

78 of 244

​

CS601-Data Communication VU

​

HDB3

Alteration of AMI adopted in Europe and Japan

Introduces changes into AMI, every time four consecutive zeros are encountered

instead of waiting for eight zeros as in the case of B8ZS

​

As in B8ZS, the pattern of violations is based on the polarity of the previous 1 bit

Unlike B8ZS, HDB3 also looks at the no. of 1’s that have occurred since the last

substitution

Summary

​

⑩ Types of Digital-To-Digital Encoding

⑩ Polar Encoding

– Return to Zero (RZ) Encoding

– Biphase Encoding

⑩ Bipolar Encoding

​

Reading Sections

⑩ Section 5.1, “Data Communications and Networking” 4th Edition by Behrouz A.

Forouzan

​

© Copyright Virtual University of Pakistan

79 of 244

​

CS601-Data Communication VU

​

LECT URE #16

​

Conversions

​

Types of Digital-to-Digital Encoding

​

Digital/Digital Encoding

​

Unipolar Polar Bipolar

​

Example 5.1

⑩ Using B8ZS, encode the bit stream 10000000000100. Assume that the polarity of

the first 1 is positive.

​

🙣 Analog-to-Digital Conversion

o We sometimes need to digitize an analog signal

o To send human voice over a long distance, we need to digitize it, since

digital signals are less prone to Noise

o This is called Analog-to-Digital Conversion or Digitizing an Analog

Signal

o This type of conversion requires a reduction of potentially infinite number

of values in the analog signal so that it can be converted to digital bit

stream with minimum loss of information.

​

© Copyright Virtual University of Pakistan

80 of 244

​

CS601-Data Communication VU

​

o CODEC ⮴ Coder Decoder

o Digital signal signals can take any of the forms discussed previously

o Problem is how to convert analog signal from infinite number of values to

discrete no. of values without scarifying quality

​

🕘 Pulse Amplitude Modulation

​

o First step in Analog-to-Digital Conversion

o This technique takes an Analog signal, Samples it, and Generates a series

series of Pulses based on the results of Sampling

o Sampling means measuring amplitudes of signal at equal intervals

​

o The original signal is sampled at equal intervals

o PAM uses a technique called Sample & Hold means At a given moment ,

signal level is read, then held briefly

o The pulses are of any amplitude (still analog not digital). To make them

digital, we need PCM

​

🕘 Pulse Code Modulation

​

o Modifies pulses created by PAM to a complete digital signal

o Four Separate Processes:

🖲 PAM

🖲 Quantization

🖲 Binary Encoding

🖲 Digital/Digital Encoding

​

🖲 Quantization

PCM’s first step is Quantization

​

“Quantization is a method of assigning integral values in a

specific range to sampled instances”

​

© Copyright Virtual University of Pakistan

81 of 244

​

CS601-Data Communication VU

​

Figure shows a simple method of assigning sign and magnitude

values to quantized samples

​

🖲 Results of Binary Encoding

​

Each value is translated into its seven bit binary equivalent. The

eight bit indicates the sign

​

🕘 Result of PCM

​

Figure shows the result of PCM of original signal encoded finally into

a unipolar signal

Only first 3 values are shown

​

🕘 Full PCM Process

​

© Copyright Virtual University of Pakistan

82 of 244

​

CS601-Data Communication VU

​

🕘 Sampling Rate

o The accuracy of any digital reproduction of an analog signal depends upon

the o. of samples taken

o How many samples are sufficient?

​

o <Nyquist theorem>

The sapling rate must be at least twice the highest

frequency

​

© Copyright Virtual University of Pakistan

83 of 244

​

CS601-Data Communication VU

​

🕘 Bit Rate

o Sampling Rate given by Nyquist Theorum

o No. of bits per sample chosen according to the Precision needed at the

receiver end.

BitRate = SamplingRate ⋅ No.ofbits / sample

​

Summary

​

⑩ Analog-to-Digital Conversion

⑩ Pulse Code Modulation (PCM)

– Pulse Amplitude Modulation (PAM)

– Quantization

– Binary Encoding

– Digital-To-Digital Conversion

​

Reading Sections

​

⑩ Section 5.2, “Data Communications and Networking” 4th Edition by Behrouz A.

Forouzan

​

© Copyright Virtual University of Pakistan

84 of 244

​

CS601-Data Communication VU

​

LECT URE #17

​

Conversion

Digital To Analog Conversion

o Process of changing one of the characteristics of an analog signal based on the info in

a digital signal

o When you Tx data from one computer to the other using a public telephone line

o Original data is digital but because telephone wires carry analog signal, original data

must be converted

o Digital data must be modulated on an analog signal that has been manipulated to look

like two distinct values corresponding to binary 1 to binary 0

​

o Figure shows the relationship b/w digital info the digital to analog conversion

hardware & resultant analog signal

🙣 Variation in Characteristics of Sine Wave

​

o A sine wave is defined by 3 characteristics:

​

🕘 Amplitude

🕘 Frequency

🕘 Phase

​

o By changing one aspect of a simple electrical signal back &

forth,we can use it to represent digital data

o When we vary any one of these characteristics ,we create a second version of

that wave

o If we than say that the original wave represents binary 1,the variation can

represent binary 0 or vice versa

o So by changing one aspect of a simple electrical signal back & forth,we can

use it to represent digital data

​

🙣 Mechanisms for Modulating Digital Data to Analog Signals

​

o Any of the three characteristics listed above can be altered in this way, giving

us at least 3 mechanisms for modulating digital data into analog signals

​

🕘 Amplitude shift keying(ASK)

🕘 Frequency shift keying(FSK)

🕘 Phase shift keying (PSK)

​

© Copyright Virtual University of Pakistan

85 of 244

​

CS601-Data Communication VU

​

• Fourth Mechanism

​

o In addition, there is a fourth and better mechanism that combines

changes in both amplitude and phase called Quadratue Amplitude

Modulation(QAM)

o QAM is the most efficient of these options and is the mechanism used

in all modern modems

​

Types of digital to analog modulation

​

• Aspects of Digital to Analog Conversion

​

o Before we discuss specific methods of digital to analog modulation,two

basic issues must be defined:

🕘 Bit/Baud rate

🕘 Carrier signal

​

🕘 Bit Rate & Baud Rate

o Two terms used frequently in data communication

–Bit rate

–Baud rate

⑩Bit rate: no of bits transmitted during one second

⑩Baud rate: no of signal units per second that are required

to represent that bit

Bit Rate & Baud Rate

o In discussion of computer efficiency, bit rate is more important –we want to

know how long it takes to process each piece of info

o In data transmission, however ,we are more concerned with how efficiently we

can more that data from place to place, whether in pieces or blocks

o The fewer signal units required, the most efficient the system and less

bandwidth required to transmit more bits ,so we are more concerned with baud

rate

o The baud rate determines the B.W required to send the signal

​

Relationship b/w bit rate &band rate

​

© Copyright Virtual University of Pakistan

86 of 244

​

CS601-Data Communication VU

​

o Bit rate equals the baud rate times the no. of bits represented by each signal

units

o The baud rate equals the bit rate divided by the no. of bits represented by each

signal shift

o Bit rate is always greater than or equal to Baud rate

​

🙣 Analogy for Bit rate &Baud rate

o In transportation a band is analogous to a car,a bit is analogous to a

passenger

o A car can carry one or more passengers

o If1000 cars can go from one point to another carrying only one

passenger(only driver),than 1000 passengers are transported

o However, if each car carries four passengers, then 4000 passengers are

transported

o Note that the number of cars, not the numbers of passengers

determines the traffic and therefore the need for wider highway

o Similarly, the baud determines the required bandwidth, not the bit rate

​

Example 5.6

An analog signal carries 4 bits in each signal element.If 1000 signal elements are sent per

second, find the Baud Rate and Bit Rate?

​

Solution:

​

–Baud Rate =1000 bauds/second

–Bit Rate=Baud Rate * Number of bits per signal element

–Bit Rate= 1000 * 4 = 4000 bps

​

🙣 Carrier Signals

o In analog TX. The sending device produces a high frequency signal, that acts as a

basis for the information signal

o This base signal is called the Carrier Signal or Carrier Frequency

o The receiving device is tuned to the frequency of the carrier signal that it expects

from the sender

o I=Digital info is then modulated on the carrier signal by modifying one or more of

its characteristics (Amplitude, Frequency, Phase)

o This kind of modification is called Modulation and info signal is called a

Modulating Signal

​

🙣 Amplitude Shift Keying (ASK)

​

o In ASK, the strength of carrier signal is varied to represent binary 1 or 0

o Both frequency and phase remain constant, while the amplitude changes

o Which voltage represents 1 and which represents 0 can be chosen by

System Designer

o A bit duration is the period of time that defines one bit

o The peak amplitude of the signal during each bit duration is constant and

its value depends on the bit (1 or 0)

​

© Copyright Virtual University of Pakistan

–Baud Rate= Number of Signal Elements

87 of 244

​

CS601-Data Communication VU

​

o Speed of transmission during ASK is limited by the physical

characteristics of Tx. Medium

​

Effect Of Noise on ASK

​

o ASK is highly susceptible to noise interference

o NOISE: Unintentional voltages introduced onto a line by various sources such

as Heat or Electromagnetic Radiation from other sources

o These unintentional voltages combine with signal to change the amplitude

o A 1 can be changed to 0 and a 0 to a 1

o ASK relies solely on Amplitude for recognition

o Noise usually affects the amplitude, therefore ASK is the modulating method,

that is most affected by Noise

​

🕘 On-Off Keying (OOK)

o A popular ASK Technique

o In OOK, one of the bit values is represented by no voltage

o The advantage is the reduction in the amount of energy required to

transmit Information

​

🕘 Bandwidth for ASK

o Bandwidth of a signal is total range of frequencies occupied by that

signal

o When we decompose an ASK modulated signal, we get a spectrum of

many simple frequencies

o The most significant ones are those b/w, fc-Nbaud/2 and fc+Nbaud /2

with carrier frequency fc at the middle

​

o Bandwidth requirements for ASK are calculated using the formula:

​

© Copyright Virtual University of Pakistan

88 of 244

​

CS601-Data Communication VU

​

o BW=(1+d) * Nbaud

o BW = Bandwidth

o Nbaud= Baud Rate

o d= factor related to condition of line (min.value = 0)

Example 5.8

Find minimum bandwidth required for an ASK signal TX at 2000 bps. TX. Mode is half

duplex

Solution:

–In ASK, Baud Rate= Bit Rate

–Therefore, Baud Rate = 2000

–Also ASK requires a minimum bandwidth equal to its Baud Rate

–Therefore Minimum BW = 2000 Hz

Summary

⑩ Digital-to Analog Conversion

⑩ Bit Rate and Baud Rate

⑩ Carrier Signals

⑩ Amplitude Shift Keying (ASK)

​

Reading Sections

⑩ Section 5.3, “Data Communications and Networking” 4th Edition by Behrouz A.

Forouzan

​

© Copyright Virtual University of Pakistan

89 of 244

​

CS601-Data Communication VU

​

LECT URE #18

​

🙣 Frequency Shift Keying (FSK)

o Frequency of signal is varied to represent binary 1 or 0

o The frequency of the signal during each bit duration is constant and depends

on the bit (0 or 1)

o Both peak amplitude and phase remains constant

​

Effect of Noise on FSK

o Avoids most of the Noise problems of ASK

o Because Rx device is looking for specific frequency changes over a given

number of periods, it can ignore voltage spikes

o The limiting factors of FSK are the physical capabilities of the carrier

​

🕘 BW of FSK

​

o Although FSK shifts between two carrier frequencies, it is easier to analyze as two

co-existing frequencies

o BW required for FSK is equal to the Baud rate of the signal plus the frequency

shift

o Frequency Shift=Difference b/w two carrier frequencies

o BW= (fc1 – fc0) +Nbaud

​

© Copyright Virtual University of Pakistan

90 of 244

​

CS601-Data Communication VU

​

Example 5.11

Find the minimum BW for an FSK signal transmitted at 2000 bps. TX is in half duplex

mode and carrier must be separated by 3000 Hz

​

Solution:

For FSK, if fc1 and fc2 are the carrier frequencies, then:

BW=Baud Rate + (fc1 – fc0)

Baud rate is the same as bit rate

BW=2000 + (fc1 – fc0) = 2000 + 3000 = 5000 Hz

​

🙣 Phase Shift Keying (PSK)

​

o In PSK, phase of carrier is varied to represent binary 1 or 0

o Both peak amplitude and frequency remains constant as the phase changes

o For Example: if we start with a phase of 0 degrees to represent binary 0 , then

we can change the phase to 180 degrees to send binary 1

o The phase of signal during duration is constant and its value depends upon the

bit (0 or

​

🕘 2PSK

🖲 The above method is often called 2 PSK, or Binary PSK, because two

different phases ( 0 and 180 degrees) are used

​

🖲 Figure makes this point clear by showing the relationship of phase to

bit value

🖲 A second diagram called constellation diagram or phase state diagram

shows same relationship by illustrating only the phases

Effect of Noise on PSK

o PSK is not susceptible to the noise degradation that affects ASK, nor to the

bandwidth limitations of FSK

o Smaller variations in signal can be detected reliably by the receiver

​

🕘 4PSK

​

© Copyright Virtual University of Pakistan

91 of 244

​

CS601-Data Communication VU

​

o Based on the above two facts, instead of utilizing only two variations of a

signal, each representing one bit, we can use four variations and let each phase

shift represent two bits

​

🕘 4PSK

​

🕘 BW for PSK

o Minimum bandwidth required for PSK transmission is the same

as ASK

o As we have seen max bit rate in PSK is much greater than that

of ASK

o So while max baud rate of ASK and PSK are the same for a

given BW, PSK bit rate using the same BW can be two or more

times greater

​

🕘 8 PSK

​

© Copyright Virtual University of Pakistan

92 of 244

​

CS601-Data Communication VU

​

QAM

​

• Limitations of PSK:

–PSK is limited by the ability of the equipment to distinguish small

differences in phase

–This factor limits its potential bit rate

–So far we have been changing only of the characteristics of the sine

wave, But what if we alter two

​

o What should these two characteristics be?

o BW limitations make combination of FSK with other changes practically useless

o Why not combine ASK and PSK?

o ‘x’ variation in phase and ‘y variations in amplitude result into a total of x * y

variations and corresponding no. of bits per variation

​

Quadrature Amplitude Modulation (QAM)

​

🕘 Variation of QAM

o Variations of QAM are numerous

o Any measurable amount changes in amplitude can be combined with any measurable

no. of changes in Phase

​

🕘 4 QAM & 8 QAM (Figure)

o In both case no. of amplitude shifts is more than the no. of phase shifts

o Because amplitude changes are susceptible to Noise , number of phase

shifts used by QAM is always larger than the amplitude shifts

​

© Copyright Virtual University of Pakistan

93 of 244

​

CS601-Data Communication VU

​

Time domain plot of 8 QAM

​

Three possible variations of 16 QAM

​

🕘 Bandwidth for QAM

o BW required for QAM is the same as in the case of

ASK and PSK

o QAM has the same advantages as PSK over ASK

o Bit Baud Comparison

​

Bit Baud Comparison

Consult book section 5.3

​

Example 5.11

A constellation diagram consists of eight equally spaced points on a circle. If bit rate is

4800 bps, what is the Baud Rate?

​

Solution:

Constellation indicates 8 PSK with the points 45 degree apart

Baud Rate= 4800 / 3 = 1600 baud

​

© Copyright Virtual University of Pakistan

94 of 244

​

CS601-Data Communication VU

​

Summary

⑩ Digital-to Analog Conversion

⑩ Frequency Shift Keying (FSK)

⑩ Phase Shift Keying (PSK)

⑩ Quadrature Amplitude Modulation (QAM)

​

Reading Sections

⑩ Section 5.3, “Data Communications and Networking” 4th Edition by Behrouz A.

Forouzan

​

© Copyright Virtual University of Pakistan

95 of 244

​

CS601-Data Communication VU

​

LECT URE #19

​

Conversions

​

🙣 Analog To Analog Conversion

o Representation of Analog information by an Analog signal

o For Example: Radio

​

🕘 Analog To Analog Conversion Methods

​

Amplitude Modulation (AM)

​

o Amplitude of carrier signal is changed according to the amplitude of

modulating signal

o Frequency and phase of the carrier remain the same

​

🖲 AM Bandwidth

​

Bandwidth of AM signal (modulated signal) = 2 * bandwidth of

modulating signal

Significant spectrum of AM audio = 5 KHz

⇒ 10 KHz bandwidth for an AM station

​

© Copyright Virtual University of Pakistan

96 of 244

​

CS601-Data Communication VU

​

AM Band Allocation

​

Example 5.18

We have an audio signal with a BW of 4 KHz. What is the BW needed, if we modulate

the signal using AM?

Solution:

​

–BW = 2 * 4 KHz = 8 KHz

​

Frequency Modulation (FM)

o Frequency of carrier signal is changed according to the amplitude of

modulating signal

o Amplitude and Phase of the carrier signal remain constant

​

© Copyright Virtual University of Pakistan

–AM signal requires twice the BW of original signal

97 of 244

​

CS601-Data Communication VU

​

🖲 FM Bandwidth

Bandwidth of FM signal (modulated signal) = 10 * bandwidth

of modulating signal

Significant spectrum of FM audio = 15 KHz

⇒ Minimum 150 KHz bandwidth

FM Band

​

FM Band Allocation

​

Example 5.19

We have an Audio signal with a BW of 4 MHz. What is the BW needed if we modulate

the signal using FM?

Solution:

–BW = 10 * 4 MHz = 40 MHz

Phase modulation (PM)

o Simpler hardware requirements

o Phase is modulated with the amplitude

o Amplitude & Frequency of the carrier signal remain constant

Summary

⑩ Analog-to Analog Conversion

⑩ Frequency Shift Keying (FSK)

⑩ Phase Shift Keying (PSK)

⑩ Quadrature Amplitude Modulation (QAM)

​

Reading Sections

⑩ Section 5.4, “Data Communications and Networking” 4th Edition by Behrouz A.

Forouzan

​

© Copyright Virtual University of Pakistan

98 of 244

​

CS601-Data Communication VU

​

LECT URE #20

​

Introduction

Q: How do we relay encoded data from the generating device to the next device?

A: Interface

–Defined by several popular standards

–Physical layer of the OSI model

–Mechanical/electrical/functional specifications

​

🙣 Digital Data Transmission

Do we send one bit at a time or do we group bits into larger groups and if so,

How?

​

• Parallel Transmission

o Binary data consisting of 1s and 0s may be organized into groups of ‘n’ bits each

o By grouping we can send data ‘n’ bits at a time instead of one bit

​

• Serial Transmission

o One bit follows another, so we need only one channel rather than ‘n’ to

transmit data between two devices

o Conversion devices are required at the interface

​

© Copyright Virtual University of Pakistan

99 of 244

​

CS601-Data Communication VU

​

🕘 Advantage

–COST

​

🙣 Types of Serial Transmission

⑩There are two types of Serial Transmission:

​

–Asychronous Transmission

–Synchronous Transmission

​

Asynchronous Transmission

o It is so named because the timing of the signal is unimportant. Instead information is

received and translated by agreed upon patterns

o Start and Stop Bits

​

Asynchronous Transmission

⑩Advantages

–Cheap

–Effective

​

⑩Disadvantages

​

Synchronous Transmission

⑩Data is transmitted as an unbroken string of 1’s and 0’s and the receiver separates that

string into the bytes or characters it need to reconstruct the information

​

© Copyright Virtual University of Pakistan

–Slow

100 of 244

​

CS601-Data Communication VU

​

Synchronous Transmission

⑩Advantage

–Speed

Summary Introduction to Interfaces

⑩

⑩Parallel Transmission

⑩Serial Transmission

⑩Asynchronous Transmission

⑩Synchronous Transmission

Reading Sections

​

⑩Section 6.1,6.2, “Data Communications and Networking” 4th Edition by

Behrouz A. Forouzan

​

© Copyright Virtual University of Pakistan

Digital Data Transmission

101 of 244

​

CS601-Data Communication VU

​

LECT URE #21

​

DTE-DCE Interface

​

o There are 4 basic functional units involved in communication of data:

–A DTE and DCE on one end

–A DTE and DCE on the other end

​

🕘 DTE: Any device that is a source of or destination of digital data

🕘 DCE: Any device that transmits/receives signal through network

​

o The DTE generates the data and passes it along with any control information to a

DCE

o The DCE converts the signal to a format appropriate to the TX medium and

introduces it onto the network link

o When the signal arrives at the receiving end this process is reversed

​

🕘 DTE

o DTE includes any unit that functions either as a source of or as a

destination for binary digital data

o At the physical layer, it cab a terminal, microcomputer, computer ,

printer or any other device that generates or consumes digital data

o DTEs do not often communicate with each other directly with each

other

o Think of DTE as your Brain.

o Your and your friends brains are DTEs

o The vocal chords or mouth are DCEs

o Air is TX Meduium

​

🕘 DCE

o DCE includes any functional unit that transmits or receives data in the

form of an analog or digital signal through a network

o At the physical layer, a DCE takes data generated by a DTE, converts

it to the appropriate signal and then introduces it to the comm link

o Commonly used DCEs at the physical layer include MODEMS

​

© Copyright Virtual University of Pakistan

102 of 244

​

CS601-Data Communication VU

​

o In any n/w , a DTE generates digital data and passes it on to a DCE,

the DCE converts the data to a form acceptable to the TX medium and

sends the converted signal to another DCE on the network

o The second DCE takes the signal off, converts it to a suitable form for

its DTE and delivers it

o To make this communication possible, the sending and receiving DCEs

must use the same modulation method

​

⑩The two DTEs need not be coordinated with each other but they need to be coordinated

with their respective DCEs and the DCEs must be coordinated so that data translation

occurs w/o loss of integrity

​

🙣 Standards

​

Many standards have been developed to define the connection b/w the DTE and a

DCE

o Though the solution differ, each standard provides a model for mechanical,

electrical and functional characteristics of the connection

o Electronic Industries Organization (EIA) and ITU-T

🙣 EIA 232 Interface

o Standard developed by EIA

o Defines Mechanical, Electrical and Functional characteristics of the interface

b/w DTE and a DCE

o Originally issued in 1962 as the RS 232 standard

o Revised several times, recent version EIA 232-D

o Defines not only the type of connectors to be used but also the specific cable

and plugs and the functionality of each pin

​

🕘 Mechanical Specifications

o EIA 232 standard defines interface as a 25-wire cable with a male and a

female DB 25 pin connector attached to either end.

o The length of the cable may not exceed 15 meters(50 feet)

o A DB 25 connector is a plug with 25 pin or receptacles each of which is

attached to a single wire with a specific function

o With this design, EIA has created the possibility of 25 separate interactions

b/w a DTE and a DCE

o Fewer are actually used but standard allows for future inclusion of

functions

​

© Copyright Virtual University of Pakistan

103 of 244

​

CS601-Data Communication VU

​

o EIA 232 calls for a 25 wire cable terminated at one end by by a male

connector and at the other end by a female connector

o Male refers to a plug with each wire in the cable attaching to a pin

o Female refers to a receptacle with each wire in cable connecting to a metal

tube or sheath

​

🕘 Electrical Specifications (Sending data)

​

o EIA 232 states that data must be tx as binary 1’s and 0’s using NRZ-L

encoding with 0 defines as a positive and 1 defined as a negative voltage

o However rather than defining a single range bounded by highest and

lowest amplitudes, EIA 232 defines two distinct ranges , one for +ve

voltages and one for -ve

​

o The receiver accepts any voltage that falls within these ranges as valid

signals

o To be recognized as data, the amplitude of the signal must fall b/w 3 and

15 volts or b/w –3 and –15 volts

o Degradation of noise will in misinterpretation of bits

o A square wave is shown to be converted into a curve by noise and it covers

many voltages

o If the rx were looking for a fixed voltage, or only for pulses that held a

single voltage for their entire duration,degradation would have made it

unrecoverable.

​

• Electrical Specifications

(Control & Timing)

o Only 4 wires out of 25 in EIA 232 are used for data functions.

o Remaining 21 are reserved for functions like Control, Timing,

Grounding and Testing

o Any of the functions is considered ON if it transmits a voltage of

atleast +3 and OFF if it tx a voltage with a value less than -3

​

o The specification for control signals is conceptually reversed from

that for data transmission

o A positive voltage means ON and a negative voltage means OFF

​

© Copyright Virtual University of Pakistan

104 of 244

​

CS601-Data Communication VU

​

• Electrical Specifications

(BIT rate)

o A final important function of electrical specifications is definition

of Bit Rate

o EIA 232 allows for a maximum bit rate of 20Kbps although in

practice it is often is exceeded

​

🕘 Functional Specifications

o Two different implementations of EIA 232 are available:

–DB 25

–DB 9

o DB 25 connector defines the functions assigned to each of the 25 pins in

the DB 25 connector

​

Functional Specifications

​

o Figure shows the ordering and functionality of each pin of a male

connector

o Female connector will be a mirror image of the male so that pin 1 in the

plug matches tube 1 in the receptacle and so on

o Each comm function has a mirror or answering function for traffic in the

opposite direction to allow for full duplex operation

o For Example, pin 2 is for transmitting data and pin 3 is for receiving data

o Pin 9 and 10 are for future use

o Pin 11 is yet unassigned

​

• DB9 IMPLEMENTATION

o Most of the pins in DB 25 implementation are not necessary ina

single asynchronous connection

o A simpler 9 pin version of EIA 232 is shown in the figure

Functioning Steps

⑩Step 1: Preparation

​

© Copyright Virtual University of Pakistan

105 of 244

​

CS601-Data Communication VU

​

–Preparation of the interface between DTE and DCE

⑩Step 2: Readiness

–Checks if all four devices are ready

⑩Step 3: Set up

–Set up the connection between two DCEs

⑩Step 4: Data Transfer

–DTE -> DCE -> DCE -> DTE

⑩Step 5: Clearing

–Turning OFF the connection

Functioning Example

​

o Step1: Preparation of interfaces for TX. The two grounding circuits,1(shield) and 7

(ground) are active b/w the two devices

o Step 2 ensures that all four devices are ready for TX. First the sending DTE activates

pin 20 and sends a Dte ready message to its DCE . DCE answers by activating pin6 .

Same sequence is performed by remote computer

o Step3: sets up the physical connection b/w the sending and the receiving modems.

o First the DTE activates pin 4 and sends its DCE a request to send message. The DCE

transmits a carrier signal to the idle receiving modem

o When receiving modem detects the carrier signal, it activates pin 8, telling its

computer that a TX is about to begin .

o After tx the carrier signal, sending DCE activates pin 5 sending its DTE a clear to

send message. The remote computer and modem do the same step

o Step4: Data transfer procedure

o Initiating computer transfers its data stream to its modem over circuit 2accompanied

by the timing pulse of circuit 24.

o Modem converts digital data to an analog signal and sends it over the network

o Responding modem retreives the signal, converts it back to digital and passes it to

DTE via circuit 3 and timing pulse of 17

o Step5: Once both computers have completed their transmission, both computers

deactivate their request-to-send circuits , modems turn off their carrier signals, their

received line signal detectors and their clear to send circuits

​

© Copyright Virtual University of Pakistan

106 of 244

​

CS601-Data Communication VU

​

🙣 NULL MODEM

o Suppose you need to connect two DTEs in the same building, for example two

workstations

o Modems are not needed to connect two compatible devices directly

o The TX never needs to cross analog lines, such as telephone lines and

therefore does not need to be modulated

o But you do need an interface to handle the exchanging , just as EIA 232 DTE-

DCE cable does

o The solution is a NULL Modem

o A null modem provide DTA –DTE interface w/o DCEs

o But why use a Null Modem

o If all you need is the interface, why not just a a standard EIA 232 cable?

​

o Part a shows a connection using a telephone network

o Part b shows what happens when we use the same connections between two

DTEs

o The receive circuit is void because it has been isolated completely for the TX

o The tx cct 2 endsup full of collision noise

​

NULL MODEM Crossing Connections

​

o Whereas EIA 232 DTE-DCE interface cable has a female connector at the

DTE and a male connector at the DCE end, a null modem has female

connectors at both ends to allow it to connect to the EIA 232 DTE ports which

a male

​

© Copyright Virtual University of Pakistan

107 of 244

​

CS601-Data Communication VU

​

Summary

⑩DTE-DCE Interface

⑩DTE-DCE Interface Standards

⑩EIA-232

⑩Null Modem

​

Reading Sections

Section 6.2,6.3, “Data Communications and Networking” 4th Edition by Behrouz A.

Forouzan

​

© Copyright Virtual University of Pakistan

108 of 244

​

CS601-Data Communication VU

​

LECT URE #22

​

Other Interface Standards

o Both Data Rate and Cable LENGTH are restricted by EIA 232

o Data rate to 20 Kbps and Cable length to 50 feet

o To meet need of users requiring more speed or distance , the EIA and ITU-T has

introduces additional standards: EIA 49, EIA 530 and X.21

🙣 EIA 449

o Mechanical specifications of EIA 448 define a combination of two connectors , on

with 37 pins ( DB 37) and one with 9 pins (DB 9) for a combined 46 pins

o The functional specifications of EIA 449 give the DB 37 pins properties similar to

those of the DB 25.

o The major functional difference b/w 25 and 37 pin connectors is that all functions

relating to the secondary channel have been removed from DB 37

o Because the secondary channel is seldom used, EIA 449 separates those functions out

and puts them in the second, 9 pin connector (DB9)

o In this way, a second channel is available to systems that need it

🕘 EIA 449 (PINS)

o To maintain compatibility with EIA 232, EIA 449 defines two categories of

pins to be used in exchanging data, control, and timing information

🖲 Category 1 pins

🖲 Category 2 pns

🖲 Category 1 and 2 pins

Category 1 includes those pins whose functions are compatible with EIA

232

Category 2 pins are those that have no equivalent in EIA 232 or have been

redefined

DB9 connector here is different from the one that is previously discussed

​

🕘 Electrical Specifications RS423, RS 422

EIA 449 uses two standards to define its electrical specifications:

• RS-423: Unbalanced Mode

• RS-422: Balanced Mode

• RS 423 Unbalanced Mode

o Unbalanced Circuit Specification

o Unbalanced means that it defines only one line for propagating a signal

o All signals in this standard use a common return or a ground to

complete the circuit

​

© Copyright Virtual University of Pakistan

109 of 244

​

CS601-Data Communication VU

​

o In unbalanced mode, EIA 449 calls for the use of only the first pin of

each pair of category 1 pins and all category 2 pins

• RS 422 Balanced Mode

o Balanced circuit specification

o Defines two lines for the propagation of each signal

o Signal again uses a common return

​

o EIA utilizes all pairs of pins in category 1 but does not use the category

2 pins

o The ration of data rate to distance is much higher in this case than EIA

232

o In balanced mode two lines carry same signal which are not identical

to each other

o Signal on one line is the complement of the other

​

Canceling of Noise in the Balanced Mode

When plotted, complement of the signal looks like the mirror image of the signal

​

🙣 EIA 530

​

© Copyright Virtual University of Pakistan

110 of 244

​

CS601-Data Communication VU

​

o EIA 449 provides much better functionality than EIA 232

o However it requires a DB 37 connector that industry has been reluctant

to use because of the widespread use of DB 25

o To encourage acceptance of EIA 449, EIA developed a version of EIA-

449 that uses DB 25 pins

o Pin functions of EIA 530 are essentially those of EIA 449

CATEGORY 1 pins plus three pins from category 2

o EIA 530 does not support a secondary circuit

​

🙣 X.21

o Eliminates most of control pins of EIA standards

–Control signals are encoded to control characters

–Send control characters within the data line

–More control information for digital telephony

​

o For digital communication between devices over a network, rather than

just between DTE and DCE

o DB-15, Work with balanced circuits at 64Kbps

​

🙣 MODEMS

o Most familiar type of a DCE

o We require modem to connect to the internet

o MODEM is a composite word for modulator and Demodulator

o Modulator converts a digital signal into an analog signal using ASK, FSK,

PSK or QAM

o A demodulator converts an analog signal into a digital signal

o While a demodulator resembles an analog-to-digital converter, it is not

infact a converter of any kind

o It does not sample the signal to create a digital signal

o It just reverses the process of modulation that is it performs demodulation

​

o Shows the relationship of a modulator with a demodulator

o Two PCs at the end are DTEs, and the modems are the DCEs

​

© Copyright Virtual University of Pakistan

111 of 244

​

CS601-Data Communication VU

​

o DTE creates a digital signal and relays it to the Modem via an interface via an

interface

o Modulated signal is received by the demodulation function of the second

modem

o This modem takes this ASK, FSK, PSK or QAM signal and decodes it into

whatever format its computer can accept

o It then relays the digital signal to the computer via an interface

o Each DCE must be compatible with both its own DTE and the other DCE

​

🕘 Transmission Rate

o Modems are often described as high speed or low speed to indicate how many

bits per second a specific device is capable of transmitting or receiving

o Limitations on the transmission rate of the Modem

🕘 Bandwidth

o Data rate of a link depends upon the type of encoding uses and the bandwidth

of the medium

o The medium bandwidth is related to the inherent limitation of the physical

property of the medium

o Every line has a range of frequencies it can pass

o If the frequency of a signal is too ow, it cannot overcome the capacitance of

the line

o If frequency is too high, it can be impeded by the inductance of the line

o So every line has an upper limit and a lower limit on frequencies of the signals

o This limited range is called Bandwidth

Telephone Line Bandwidth

​

o Traditional telephone lines can carry fre’s b/w 300 Hz and 3300 Hz giving them a

BW of 3000Hz

o All of this range is used for transmitting voice where a great deal of interference

and distortion can be accepted w/o any loss of intelligibility

o Data signal require a high degree of accuracy , so edges of this range are not used

for data comm

o Effective BW of telephone line used for data transmission is 2400 Hz covering a

range from 600 Hz to 3000Hz

🙣 Modem Speed

o Each type of Analog conversion manipulates signal differently:

​

© Copyright Virtual University of Pakistan

112 of 244

​

CS601-Data Communication VU

​

🕘 ASK manipulated Amplitude

🕘 FSK manipulates Frequency

🕘 PSK manipulates Phase

🕘 QAM manipulate both phase and amplitude

🕘 Modem Speed-ASK

​

o BW required for ASK is equal to the baud rate of the signal

o Assuming that entire link is being used by one signal, as in Simplex or

Half Duplex, the maximum baud rate for ASK modulation is equal to the

entire BW of the transmission medium

​

o Because the effective BW of a telephone line IS 2400 Hz, the maximum

baud rate is also 2400

o Baud rate and bit rate are equal for ASK, so maximum bit rate is also 2400

bps

Modem Speed-ASK (Full Duplex)

​

o For full duplex TX, only half of the total bandwidth cab be used in either

directions

o Therefore the maximum speed for ASK in full duplex mode is 1200 bps

o Noise problem makes it impractical for use in Modems

​

🕘 Modem Speed-FSK

o BW required for FSK is equal to the baud rate of the signal plus the frequency

shift

o So maximum baud rate becomes equal to the BW transmission medium minus

the frequency shift

​

© Copyright Virtual University of Pakistan

113 of 244

​

CS601-Data Communication VU

​

o Maximum Baud rate is therefore 2400 minus the frequency shift

o And bit rate is also 2400 minus frequency shift

o In full duplex mode it is equal to 1200 minus the frequency shift

​

🕘 Modem Speed-PSK & QAM

o Minimum BW for PSK or QAM is the same as for ASK but the bit rate can be

greater depending upon the number of bits that can be represented by each signal

unit

🕘 Modem Speed-PSK & QAM on two wire Twisted pair Telephone line

Comparisons of bit rates: HDX and FDX

2-PSK 2400 1200

4-PSK,4-QAM 4800 2400

8-PSK,8-QAM 7200 3600

16-QAM 9600 4800

​

Summary

​

⑩ EIA-449

⑩ EIA-530

⑩ X.21

⑩ Modems

​

Reading Sections

​

⑩ Section 6.4, 6.5, “Data Communications and Networking” 4th Edition by Behrouz

A. Forouzan

​

© Copyright Virtual University of Pakistan

32-QAM 12000 6000

114 of 244

​

CS601-Data Communication VU

​

LECT URE #23

​

Modem Standards

​

o Bell modems

–First commercial modems by Bell Telephone Co.

–Developed in early 1970s

​

o ITU-T modem standards

–V-series: Today’s most popular modem standards

–Bell modem compatible: V.21/22/23/26/27/29

​

o Intelligent modems

–Hayes (or Hayes-compatible) modems

–Modem is controlled by instructions (AT commands)

–Automatic answering, dialing, etc.

​

BELL Modems

​

© Copyright Virtual University of Pakistan

115 of 244

​

CS601-Data Communication VU

​

ITU-T Modems

​

🙣 Traditional Modems

o Traditional modems are limited to a data rate of 33.6 Kbps as determined by

Shannon’s formula Data rate ∝ Signal-to-noise ratio

o New modems with bit rated of 56 Kbps are wide spread now

​

o TX of data from A to B

o Digital data is modulated by the modem at site A

o Analog data is sent from the modem to to the switching station at site A using the

local loop

​

© Copyright Virtual University of Pakistan

116 of 244

​

CS601-Data Communication VU

​

o At the switching station, analog data is converted digital using PCM

o Digital data travels through the digital network of telephone company and arrives at

the switching station of site B

o At the switching station , digital data is converted to analog using inverse PCM

o Analog data is sent from switching station at site B to the modem using the local loop

o Analog data is demodulated by modem at site B

o The limiting factor is step 3. Here the analog signal is quantized to create digital

signal. The quantization noise resulting from this process limits the data rate to 33.6

Kbps

o The TX of data from site B to site A follows the same steps and again the limiting

factor is quantization.

​

⑩RESULT:

The maximum data rate in each direction is limited to 33.6 Kbps

​

🙣 56K Modems

o If one side is an ISP and the signal does not have to pass through a PCM converter ,

quantization is eliminated in one direction and data rate can be increased to 56 Kbps

​

🕘 Uploading

o Transmission of data from the subscriber to the ISP(UPLOADING) follows

the following steps:

o Digital data is modulated by Modem at site A

o Analog data is sent from the modem to the switching station at site A on the

local loop

o At the switching station, data is converted to digital signal using PCM

o Digital data travel through the digital network of the telephone network of the

telephone company and is received by the ISP computer

o The limiting factor is again step 3

o However user does not need high data rate since in this direction only small

blocks of data is sent

​

🕘 DOWNLOADING

​

© Copyright Virtual University of Pakistan

117 of 244

​

CS601-Data Communication VU

​

o Tx of data from ISP to the modem at site A follows these steps:

o Digital data is sent by the computer of ISP through the digital telephone

network

o At the switching station, digital data is converted to analog using inverse PCM

o Analog data is sent from the switching station at site A to the modem on the

local loop

o Analog data is demodulated by modem at site A

o Note that in this direction there is no quantization of data using PCM.

o The limitation when uploading is not an issue an here a

o Data can be sent at 56 Kbps

o This is what user is looking for since larger files are typically downloaded

from internet

⑩RESULT

The maximum data rate in the uploading direction is still 33.6 Kbps but the

data rate in downloading direction is now 56 Kbps

🖲 Why 56Kbps?

–Switching stations of the telephone company use PCM/Inverse PCM for

digitizing voice

–8000 samples/sec * 7 bits/sample = 56 Kbps

​

Summary

⑩MODEM Standards

–Bell Modems

–ITU-T Modems

⑩Traditional MODEMS

⑩56k MODEMs

⑩Cable Modems

​

Reading Sections

⑩Section 6.4, 6.5, 6.6,“Data Communications and Networking” 4th Edition by

Behrouz A. Forouzan

​

© Copyright Virtual University of Pakistan

118 of 244

​

CS601-Data Communication VU

​

LECT URE #24

​

Cable Modems

​

o Data rate limitation of traditional modems is mostly due to the narrow BW of the

local loop telephone line (4Khz)

o If higher BWs are available, one can design a modem that can handle much higher

data rates

o Fortunately, cable TV provides residential premises with a coaxial cable that has a

BW of up to 750 MHz and sometimes even more

o This BW is normally divided into 6MHz bands using FDM

o Each band provides a TV Channel

o Two bands can be left aside to allow a user to download and upload the information

from the internet

​

o Instead of the traditional cable box, we show a splitter

o The splitter directs the TV bands to the TV set and the Internet access bands to the PC

​

🙣 DOWNLOADING: Downloading requires a 6 MHz BW in the range above

40MHz. The demodulation technique used is 64 QAM (6 bits at a time)

​

o This means that a user can download info at a rate of 6MHz * 6 = 36Mbps

o However PCs are not yet capable of receiving data at this rate

​

🖲 Currently rate is b/w 3 and 10 Mbps

​

🙣 UPLOADING: Requires a 6MHz BW in a range below 40MHz

o At this low frequency, home appliances can create a noise environment that

effects modulation

o The modulation technique uses is QPSK (4 bits at a time)

o This means that user can Upload info at a rate of 6 MHz * 2=12 MHz

o Presently uploading rate is b/w 500Kbps and 1Mbps

Electromagnetic Energy

​

© Copyright Virtual University of Pakistan

119 of 244

​

CS601-Data Communication VU

​

o Signals are transmitted from one device to another in the form of electromagnetic

energy

o Electromagnetic signals can travel through Vacuum, Air or other transmission media

o Electromagnetic energy, a combination of electrical and mechanical fields vibrating in

relation to each other includes power, voice, video, radio waves, infrared light, visible

light and ultra violet light

​

o Each of the above constitute a portion of the Electromagnetic Spectrum:

​

Not all the portions of the spectrum are currently usable for Telecommunications

Voice-band frequencies are generally tx as current over metal cables, such a

twisted pair or coaxial cable

​

o Radio frequencies can travel through air or space but require specific transmitting and

receiving mechanisms

o Visible light, the third type of Electromagnetic energy currently used for

communications is harnessed using fiber optic cable

​

🙣 Classes of Transmission Media

​

o Two classes of Transmission Media:

–Guided Media

–Unguided Media

🕘 Guided Media

Guided Media, are those media that provide a conduit from one device to

another

​

© Copyright Virtual University of Pakistan

120 of 244

​

CS601-Data Communication VU

​

🕘 Twisted Pair Cable

o Twisted pair comes in two forms:

​

–Unshielded Twisted Pair (UTP) cable

–Shielded Twisted Pair (STP) cable

​

• Frequency range for Twisted Pair Cable

​

🕘 Unshielded Twisted Pair (UTP) Cable

o UTP cable is the most common type of Telecommunication Medium in

use today

o Although mostly used in Telephone systems,, its frequency range is

suitable for transmitting both data and voice

​

o A twisted pair consists of two conductors (usually copper) , each with

its own colored plastic insulation.

o The plastic insulation is color banded for identification

​

© Copyright Virtual University of Pakistan

121 of 244

​

CS601-Data Communication VU

​

o Colors are used both to identify the specific conductors in a cable and

to indicate which wires belong in pairs and how they relate to other

pairs in a large bundle

​

🕘 Parallel Flat Wire

o In the past, two parallel flat wires were used for communication.

o However, EM interference from devices such as motor can create noise

over those wires

​

• Effect of noise on Parallel Flat Wire

​

o If the two wires are parallel, the wire closest to the source of the noise gets

more interference and ends up with a higher voltage level than the wire further

away

o This results in an uneven load and a damaged signal

​

• Noise Effect on Twisted-Pair

o If the two wires are twisted around each other at regular intervals (b/w 2 &

12 twists per foot), each wire is closer to the noise source for half the time

and is away for the other half

o Twisting does not always eliminate the impact of Noise but it does

significantly reduce it

​

© Copyright Virtual University of Pakistan

122 of 244

​

CS601-Data Communication VU

​

o With twisting, therefore the cumulative effect of the interference is equal on

both wires

o Each section of wire has a “Load” of 4 when it is on the top of the twist and

‘3’ when it is on the bottom

o The total effect of the noise at the receiver is therefore 0 (14-14)

​

Advantage of UTP

​

• Advantages of UTP are:

–Cost

–Ease of Use

• Its cheap, flexible and easy to install

• Higher grades of UTP are used in many LAN technologies including

Ethernet and Token Ring

​

Cable with 5 UTP of wires

​

Categories of UTP Cable

EIA has developed standards to grade UTP cables by quality.

Categories are determined by cable quality, with 1 as the lowest and 5 as the

highest

Each EIA category is suitable for certain uses and not for others

​

⑩Category 1

–Basic Twisted pair cabling used in Telephone system

–Fine for voice but inadequate for all but low-speed data communication

​

⑩Category 2

​

© Copyright Virtual University of Pakistan

123 of 244

​

CS601-Data Communication VU

​

–The next higher grade, suitable for voice and for data transmission of up

to 4Mbps

⑩Category 3

–Required to have at least 3 twists per foot

–Can be used for for data tx ofup to 10Mbps

–Now the standard cable for most telephone lines

⑩Category 4

–Must have at least 3 twists per foot

–Possible tx rate of 16 Mbps

⑩Category 5

–Used for data transmission of up to 100 Mbps

​

UTP Connectors

o UTP is mostly connected to the networked devices via a type of snap-in plug like that

used with telephone jacks

o Connectors are either male (plug) or female (the receptacle)

o Male connectors snap into female connectors and have a repressible tab (key) that

locks them in place

​

o Each wire in the cable is attached to one conductor (or pin) in the connector

o The most frequently used of these plugs is an RJ 45 connector with 8 conductors, one

for each wire of 4 twisted pairs

Summary

⑩ Cable Modems

⑩ Electromagnetic Spectrum

⑩ Transmission Media and its Types

⑩ Guided Media

⑩ Twisted Pair

⑩ Coaxial Cable

⑩ Optical Fiber

Reading Sections

⑩ Section 6.6, 7.1, “Data Communications and Networking” 4th Edition by Behrouz

A. Forouzan

​

© Copyright Virtual University of Pakistan

124 of 244

​

CS601-Data Communication VU

​

LECT URE #25

​

Shielded Twisted Pair (STP)

o Has a metal foil or braided-mesh covering that encases each pair of insulated

conductors

​

o The metal casing prevents the penetration of EM noise

o It also can eliminate a phenomenon called Crosstalk, which is the undesired effect

of one circuit (or channel) on another circuit (or channel)

o It occurs when one one line picks up some of the signals traveling down another

line.

o This effect can be experienced during telephone conversations when one can hear

other conversations in the background

o Shielding each pair of twisted pair can eliminate most crosstalk

o STP Cable has the same quality considerations and uses the same connectors as

UTP but the shield must be connected to a ground

o STP is more expensive than UTP but is less susceptible to noise

🙣 Coaxial Cable

o Instead of having two wires, coaxial cable has a central core conductor of solid or

stranded wire (usually copper) enclosed in an insulating sheath

o This is in turn encased in an outer conductor of metal foil, braid or a combination

of the two

o The outer metallic wrapping serves both as a shield against Noise and as the

second conductor which completes the circuit

o This outer conductor is also enclosed in an insulating sheath and the whole cable

is protected by a plastic cover

​

🕘 Frequency Range of Coaxial Cable

Coax carries signals signals of higher frequency ranges than twisted pair cable

​

© Copyright Virtual University of Pakistan

125 of 244

​

CS601-Data Communication VU

​

🕘 Coaxial Cable Standards

Different coaxial cable designs are categorized by their Radio government (

RG ) ratings

Each RG number denotes a unique set of physical specifications, including

–the wire gauge of inner conductor

– the thickness and type of inner insulator

–Construction of the shield

–Size and type of outer casing

​

Each cable defined by RG rating is adapted for a specialized function:

⑩RG-8

–Used in Thick Ethernet

⑩RG-9

–Used in Thick Ethernet

⑩RG-11

–Used in Thick Ethernet

⑩RG-58

–Used in Thin Ethernet

⑩RG-59

–Used for TV

🕘 Coaxial Cable Connectors

o Over the years, a no. of connectors have been designed for use with coaxial

cable

o Most common of the connectors is called “BARREL connector” because of its

shape

o Of the barrel connectors, the most popular is the Bayonet Network Connector

(BNC)

o BNC connector pushes on and locks into place with half turn

o Other types of barrel connectors either screw together and so require more

effort to install or push on w/o locking which is less secure

o Coaxial cables are familiar in Cable TV and VCR hookups that employ both

threaded and alip on style

o Two other commonly used connectors are T-connectors and Terminators

​

⑩A T-connector (used in Thin Ethernet) allows a secondary cable or cables to

branch off from a main line

​

⑩Terminators are required for bus topologies where one main cable acts as a

backbone with branches to several devices but does not itself terminate in a

device

​

© Copyright Virtual University of Pakistan

126 of 244

​

CS601-Data Communication VU

​

If main cable is left un terminated, any signal tx over the line echoes back

and interferes with the original signal

A terminated absorbs the wave at the end and eliminates this echo

🙣 Optical Fiber

o Until this point we have discussed conductive (metal) cables that transmit signals

in the form of current

⑩Optical fiber is made of glass or plastic

⑩It transmits signals in the form of light

​

🕘 The Nature of Light

The speed of light

–300,000 Km/sec in a vacuum

–Depends on the density of the medium through which it is traveling

–The higher the density, the slower the speed

• Refraction

o Light travels in a straight line as long as it is moving through a single uniform

structure

o If a ray of light traveling through one substance enters another (more or less

dense) substance, its speed changes abruptly causing the ray to change

direction

o This phenomenon is called Refraction

🖲 Example of Refraction

o A pencil sticking out of a glass of water appears bent because the light

by which we see it changes direction as it moves from air to water

​

Direction of Refraction

Direction in which a light is refracted depends upon the density of a medium

​

o A beam of light moves from a less dense into a more dense medium

bend towards vertical axis

o Incident angle is ‘I’ and Refracted angle is ‘R’

​

© Copyright Virtual University of Pakistan

127 of 244

​

CS601-Data Communication VU

​

• Critical Angle

​

o We have a beam of light moving from a more dense to a less dense

medium

o We gradually increase the angle of incidence measured from vertical axis

o As angle of incidence increases, so does the angle of refraction

o The angle at which refracted line lies on the horizontal axis is called

​

o Critical Angle

• Reflection

​

o When angle of incidence becomes greater than critical angle, reflection occurs

o Light no longer passes into the less denser medium but is reflected back into

the same medium

o The Angle of Incidence (I) = Angle of Reflection (R)

​

• Optical Fibers & Reflection

o Optical fibers use Reflection to guide light through a channel

o A glass or plastic CORE is surrounded by a CLADDING of less dense glass or

plastic

o The difference in the density of CORE and CLADDING is such that the beam

of light moving through the core is reflected off the cladding

o Information is encoded onto a beam of light as a series of ON-OFF flashes that

represent 1 and 0 bits

​

© Copyright Virtual University of Pakistan

128 of 244

​

CS601-Data Communication VU

​

• Propagation Modes

​

o Fiber Technology supports two modes for the propagation of light

🕘 Multimode

🕘 Single Mode

Each of these modes require fiber with different physical

characteristics

o There are two further sub categories of Multimode Fiber:

🕘 Multimode Step-Index Fiber

🕘 Multimode Graded-Index Fiber

🕘 Multimode Fiber

o Multiple beams from a light source move through the core in different paths

​

o Two types of the Multimode fiber:

🕘 Multimode Step Index Fiber

🕘 Multimode Graded Index Fiber

🕘 Multimode Step-Index Fiber

​

o Density of the CORE remains constant from the center to the edges

o A beam of light moves through this constant density in a straight line until it

reaches the interface of the core and the cladding

o At the interface, there is an abrupt change to lower density, that alters the angle of

the beam’s motion

o Step Index⮴ Suddenness of this change

o Some beams travel straight and reach the destination without reflecting

o Some strike the interface of core and cladding at an angle smaller than critical

angle and penetrate cladding and are lost

​

© Copyright Virtual University of Pakistan

129 of 244

​

CS601-Data Communication VU

​

o Others hit edge of the core at angles greater than critical angle and bounce back

and forth to the destination

​

• Disadvantage of Multimode Step-Index Fiber

o Each beams angle is equal to its angle of reflection

o If I is small, R is small and the beam will require more bounces and it will

take more time to reach the destination

o If I is large, R is large and beam will reach destination quickly

o In other words there is a difference is Path Lengths that results into a

distortion at the receiver

o This distortion limits the data rate and make Multimode Step index fiber

inadequate for precise applications

​

🕘 Multimode Graded-Index Fiber

o The solution to the above problem is Multimode Graded Index Fiber

o A grade index fiber is the one with varying densities

o Density is highest at the center of the core and decreases gradually to its

lowest at the edge

​

o The signal is introduced at the center of the core

o The horiz beams move straight to the receiver

o Beams at other angles moves through the series of constantly changing

densities

o Each density difference causes each beam to refract into a curve

o Signal can be reconstructed with far greater precision as all the beams reach

the receiver at almost the same time

​

Summary

⑩ Transmission Media and its Types

⑩ Guided Media

– Twisted Pair

– Coaxial Cable

– Optical Fiber

​

Reading Sections

​

⑩ Section 7.1, “Data Communications and Networking” 4th Edition by Behrouz A.

Forouzan

​

© Copyright Virtual University of Pakistan

130 of 244

​

CS601-Data Communication VU

​

LECT URE #26

​

Single Mode Fiber

o Uses step index fiber and a highly focused source of light that limits beams to a small

range of angles all close to the horizontal

o Single Mode fiber is manufactured with a much smaller Diameter than Multimode

o All of the beams arrive at the destination together and can be recombined without

distortion to the signal

​

🙣 Fiber Sizes

o Optical Fibers are defined by the ratio of the diameter of their Core to the

diameter of their Cladding

o Both the diameters are expressed in Microns (Micrometers)

Fiber type Core Cladding

62.5/125 62.5 125

50/125 50 125

100/140 100 140

8.3/125 8.3 125

​

• Cable Composition

​

o A core is surrounded by cladding forming the Fiber.

o In most cases, fiber is covered by a Buffer layer that protects it from moisture.

o Finally the entire cable is encased in an outer jacket

o Both core and cladding can be made of either glass or plastic but must be of

different densities

o In addition the inner core must be ultra pure and completely regular in size and

shape

o Chemical differences in material and even small variations in the size or shape of

the core alter the angle of reflection and distort the signals

​

© Copyright Virtual University of Pakistan

131 of 244

​

CS601-Data Communication VU

​

o Some applications can handle a certain amount of distortion and their cables can

be made cheaply but others depend on complete uniformity

o The outer jacket can be made of several materials including Teflon, Plastic,

Fibrous Plastic, metal tubing

​

Each of these materials have a purpose:

–Plastic is lightweight and cheap but do not provide structural strength and

can emit fumes when burnt

–Metal tubing provides strength but is costly

–Teflon is lightweight and can be used in open air but it is expensive and

does not increase cable strength

​

Light Sources for Optical Cable

o For tx to occur the sending device must have a light source and the receiving

device with a photosensitive cell (Photodiode)

o Photodiode converts the light into current usable by the computer

​

⑩The ight source can either be an LED or an ILD

​

–Cheaper but provide Unfocused light that strikes the boundaries of

channel at uncontrollable angles

–Limited to short distance use

🕘 LASER:

–Can be focused to a narrow range allowing control over angle of

incidence

Fiber Optic Connectors

o Importance of Connectors

o If connector is over tight, two cores can be compressed and angle of

reflection of the signal will be altered

o All of popular connectors are Barrel shaped that come in male and

female versions

o The cable has a male connector that fixes into a female connector

attached to the device to be connected

Advantag s of Optical Fiber

The majo advantages of Fiber over twisted pair and coaxial cable are:

​

⑩Noise Resistance:

–Because fiber uses light rather than electricity, noise is not a factor

–External light the only form of possible interference is blocked from the

channel by the Outer jacket

⑩Less Signal Attenuation

–Fiber optic Transmission distance is significantly greater than other

media

​

–A signal can run miles w/o regeneration

⑩Higher Bandwidth

–Can support higher BWs and higher data rates

​

© Copyright Virtual University of Pakistan

🕘 LED:

132 of 244

​

CS601-Data Communication VU

​

–High rates are not utilized by absence of signal generation and reception

technology

Disadvantages of Optical Fiber

⑩COST

–Expensive

–No impurities or imperfections can be tolerated, so manufacturing is

costly

–Laser light sources can be expensive

⑩INSTALLATION

–Roughness & Cracking of core cannot be tolerated

–All connections must be perfectly alligned

​

Disadvantages of Optical Fiber

⑩Fragility

–Glass fiber is very fragile

–Can not be used in extreme conditions where hardware portability is

required

​

🙣 Unguided Media

o Unguided Media or Wireless Communication transport Electromagnetic

waves without a physical conductor

o Instead signals are broadcast through Air and are available to anyone who has

a receiver capable of receiving them

​

🕘 Radio Frequency Allocation

o The section of EM spectrum defined as Radio Communication is

divided into 8 ranges called BANDS

o BANDS are rated from very low frequency (VLF) to extremely high

frequency (EHF)

​

🕘 Propagation of Radio Waves

Radio Wave transmission utilizes five different types of propagation:

​

© Copyright Virtual University of Pakistan

133 of 244

​

CS601-Data Communication VU

​

🕘 Types of Propagation:

​

–Surface

–

–Ionospheric

–Line-of-Sight

–Space

Radio Technology considers the earth as surrounded by two layers

of atmosphere:

​

⑩TROPOSHERE

o It is the portion of the atmosphere extending outwards approx. 30 miles

from the earth’s surface

o It contains what we call as AIR

o Clouds, wind, Temp. variation and weather in general occur in the

Troposhere as does jet plane travel

​

⑩IONOSPHERE

o It is the layer of atmosphere above the troposhere but below space

o It is beyond what we think of as atmosphere

​

⑩Surface Propagation

o In surface propagation, radio waves travel through the lowest layer of the

atmosphere, hugging the earth

o At the lowest frequencies signal emanate in all direction from the tx

antenna and follow the curvature of the planet

​

o Distance depends on the amount of power in the signal

​

⑩Troposhpheric Propagation

This can work in two ways:

​

© Copyright Virtual University of Pakistan

Tropospheric

134 of 244

​

CS601-Data Communication VU

​

🕘 Line-of-Sight:

–A signal can be directed in a straight from Antenna to antenna

🕘 Broadcast:

–Signal is broadcasted at an angle into the upper layers of the

troposphere from where it is reflected back to earth’s surface

​

o The first method demands that both transmitter and receiver be placed

within line-of-sight distances and is limited by the curvature of the earth

o The second method allows greater distances to be covered

​

⑩Ionoshpheric Propagation

o Higher frequency radio waves are radiated towards the ionosphere where

they are reflected back to the earth

o The difference in density between troposhphere and ionosphere causes

each radio wave to speed up and change direction bending back to earth

o Allows greater distances to be covered by lower power output

⑩Line of Sight Propagation

o Very high frequencies signals are transmitted in straight line from antenna

to antenna

o Antennas must be directional facing each other or either tall enough or

close enough to each other to avoid earth’s curvature

o Radio waves can reflect of the objects in the middle and can reach late to

the receiver. These late signals distort signal

​

⑩Space Propagation

o A broadcast signal is received by the orbiting satellites which rebroadcasts

the signal to the intended receiver on the earth

Summary

⑩ Guide Media

⑩ Optical Fiber Cable

⑩ Unguided Media

⑩ Radio Frequency Allocation

⑩ Propagation of Radio Waves

​

Readi g Sections

⑩Section 7.1,“Data Communications and Networking” 4th Edition by Behrouz A.

Forouzan

​

© Copyright Virtual University of Pakistan

135 of 244

​

CS601-Data Communication VU

​

LECT URE #27

​

Propagation of Specific Signals

o The type of propagation used in radio transmission depends upon the frequency of the

signal

o Each frequency is suited for a specific layer of atmosphere and is most efficiently

transmitted and received by technologies adapted to that layer

​

🙣 Very Low Frequency (VLF) (Figure)

o VLF waves are propagated as surface waves through air

o Do not suffer much attenuation in TX but are susceptible to high levels

of atmospheric noise I.e. electricity and heat

o Used for Long-range radio navigation and Submarine Communication

​

🙣 Low Frequency (LF) (Figure)

o Also propagated as surface waves

o Used for Long-range radio and for navigational locators

o Attenuation is greater in the day time when absorption of waves by

natural obstacles increases

​

🙣 Middle Frequency (MF)

o Propagated in the Troposhere

o These frequencies are absorbed by Ionosphere

o The distance they cover is limited by the angle needed to get the signal

reflect from the troposhere and not enter ionosphere

o Absorption increases during the day time

o Used for AM Radio

​

🙣 High Frequency (HF) (Figure)

o Use ionospheric propagation

​

© Copyright Virtual University of Pakistan

136 of 244

​

CS601-Data Communication VU

​

o These frequencies move into the ionosphere where the density difference

reflects them back on earth

o Used for Citizen’s Band Radio, International Broadcasting, Military

Communication, Telephone, Telegraph and Fax

​

🙣 Very High Frequency (VHF) (Figure)

o Most VHF waves use line-of-sight propagation

o Used for VHF Television, FM Radio, Aircraft AM Radio

​

o

​

🙣 Ultra High Frequency (UHF) (Figure)

o Always use line-of-sight propagation

o Used for UHF Television, Mobile Telephone, Cellular Radio, Paging,

Microwave Links

o Note that microwave communication begins at 1GHz in UHF and

continues into SHF and EHF band

​

o

​

🙣 Super High Frequency (SHF) (Figure)

o SHF waves are TX using mostly line-of-sight and some Space propagation

o Used for Terrestrial and Satellite Microwave and Radar Communication

​

© Copyright Virtual University of Pakistan

137 of 244

​

CS601-Data Communication VU

​

🙣 Extremely High Frequency (EHF) (Figure)

o Use space propagation

o Used for Radar , Satellite and Experimental Communication

​

o

​

Terrestrial Microwave

o Microwaves do not follow the curvature of earth and therefore require line-of-sight

TX and RX equipment

o Distance covered by line-of-sight signal depends to a large extent on the height of the

antennas

o Height allows the signal to travel farther by crossing a lot of obstacles like low hills

and buildings

o Microwave signals propagate in one direction at a time, which means that two

frequencies are necessary for 2-way communication such as telephone conversation

o One frequency is reserved for MICROWAVE communication in one direction and the

other for TX in the other direction

o Each frequency requires its own transmitter & receiver combined in a Transceiver

nowadays

​

🕘 Repeaters

o To increase distance for terrestrial microwave, a system of repeaters can be

installed with each antenna

o A signal received by one antenna can be converted back to the transmittable

form and relayed to the next antenna

o The distance required b/w repeaters varies with frequencies of the signal and

the environment in which the antennas are found

o A repeater may broadcast the regenerated signal either at original frequency or

a new frequency depending on system

o Used in Telephone systems worldwide

​

🕘 Antennas

​

Two types of Antennas are used for Microwave communication:

–Parabolic Dish

​

© Copyright Virtual University of Pakistan

138 of 244

​

CS601-Data Communication VU

​

–Horn

​

Parabolic Dish

​

o Based on the geometry of a Parabola

o Every line parallel to the line of symmetry (line of sight) reflects off

the curve at an angle such that they intersect in a common point called

FOCUS

o Parabolic dish works like a funnel catching a wide range of waves and

directing them to a common point

o In his way most of the signal is recovered than would be possible with

a single-point receiver

​

HORN

o Outgoing transmissions are broadcast through a horn aimed at the dish.

The microwaves hit the dish and and are deflected outward in a

reversal of the receipt path

o A horn antenna looks like a gigantic scoop

o Outward TXs are directed upward a stem and are deflected outward in

a series of narrow parallel beams

​

Satellite Communication

o Satellite TX is much like line-of-sight transmission in which one of the stations is the

satellite orbiting around the earth

o The principle is similar to the terrestrial microwave with a satellite acting as a Super

tall antenna and Repeater

​

© Copyright Virtual University of Pakistan

139 of 244

​

CS601-Data Communication VU

​

o Although in satellite TX, signals must still travel in straight line, the limitations

imposed on distance by curvature of earth are reduced

o In this way satellites can span Continents and oceans with one bounce off the satellite

o Satellite can provide TX capability to and from any location on earth no matter how

remote

o This advantage makes high quality communication available to underdeveloped parts

of the worked at almost no cost

o Satellites themselves are very expensive but leasing a freq or time on one can be

cheap

​

Geosynchronous Satellite

o Line of sight propagation requires the sending and receiving antennas must

be locked into each other

o To ensure continuous communication, satellites must move with the same

speed as earth. So that they seem fixes w.r.t earth

o These satellites are called Geosynchronous Satellites

​

Figure shows 3 satellites in geosynchronous orbit each 120 degree

from one another so that whole earth can be covered

​

Satellite Frequency Bands

​

© Copyright Virtual University of Pakistan

140 of 244

​

CS601-Data Communication VU

​

Each satellite sends and receives over two bands

​

–Uplink: From the earth to the satellite

–Downlink: From the satellite to the earth

Band Downlink Uplink

C 3.7-4.2 GHz 5.925-6.425 GHz

​

Ku 11.7-12.2 GH 14-14.5 GHz

​

Ka 17.7-21 GHz 27.5-31 GHz

​

Cellular Telephony

o Each service area is divided into small ranges called cells

o Each cell office is controlled by a switching office called MTSO

​

Operations of Cellular Telephony

​

⑩Transmitting

–Mobile phone sends the number to the closest cell office

–Cell office ⮴ MTSO ⮴ Telephone office

–MTSO assigns an unused voice channel

​

⑩Receiving

–Telephone office sends the signal to MTSO

–MTSO sends queries to each cell (paging)

–If mobile phone is found and available, assigns a channel

​

⑩Handoff

–MTSO monitors the signal level every few seconds

​

© Copyright Virtual University of Pakistan

141 of 244

​

CS601-Data Communication VU

​

–If the strength diminishes, MTSO seeks a new cell and changes the channel

carrying the call

​

Transmission Impairments

​

Transmission media are not perfect

What is sent is not what is received

​

🕘 Attenuation

o Attenuation means loss of energy

o Some of electrical energy is converted to heat

​

🖲 Decibel (dB)

Relative strengths of two signals or a signal at two points

dB = 10 log10 (P2/P1)

P2 and P1 are signal powers

​

Negative dB means attenuation

Positive dB means amplification

​

Example 7.1

Imagine a signal travels through a transmission medium and its power is reduced to half.

This means P2=(1/2)P1. Calculate Attenuation?

Solution:

–10log10(P2/ P1)= 10log10(0.5 P1/ P1)

=10(-0.3)= -3 dB

🕘 Distortion

o Distortion means that the signal changes its form or shape

o Distortion occurs in a composite signal

​

Summary

⑩ Frequency Ranges

⑩ Microwave Communication

⑩ Satellite Communication

⑩ Cellular Telephony

⑩ Transmission Impairments

​

Reading Sections

​

⑩ Section 7.2, 7.3 “Data Communications and Networking” 4th Edition by Behrouz

A. Forouzan

​

© Copyright Virtual University of Pakistan

142 of 244

​

CS601-Data Communication VU

​

LECT URE #28

​

Transmission Impairments

TX Media are not perfect

Imperfections cause impairments in the signal through the medium

This means that the signal at the beginning and the end of the medium are

not the same

What is sent is not what is received

​

🕘 Attenuation

​

o

o When a signal travels through a medium, it looses some of its energy in

order to overcome the resistance of the medium

o That is why wire carrying electric signals get hot

​

o

o To compensate for this loss Amplifiers are used to amplify the signal to

heat

​

🖲 Decibel (dB)

Measures the relative strength of the two signals or a signal at 2

different points

dB is negative if a signal is attenuated

dB is positive if a signal is Amplified

​

Relative strengths of two signals or a signal at two points

dB = 10 log10 (P2/P1)

P2 and P1 are signal powers

​

Negative dB means attenuation

Positive dB means amplification

​

© Copyright Virtual University of Pakistan

Loss of Energy

​

Some of the electrical energy in the signal is converted to heat

143 of 244

​

CS601-Data Communication VU

​

Example 7.1

Imagine a signal travels through a transmission medium and its power is reduced to half.

This m

ution:

–10log10(P / P )= 10log (0.5 P / P )

​

🕘 Distortion

o Distortion means that the signal changes its form or shape

o Distortion occurs in a composite signal

o Signal changes its form or shape

o Occurs in a composite signal, made of different frequencies

o Each signal component has its own speed

​

🕘 NOISE

o Thermal Noise

–Due to random motion of electrons in a wire that creates an extra signal not

originally sent by TX

​

o

–Comes from sources like Motors and Appliances

o Crosstalk:

–Effect of one wire on another

o Impulse Noise

–Spike (A signal with high energy in a very short period of time) that comes from

power lines, lightening etc,.

​

© Copyright Virtual University of Pakistan

eans P2=(1/2)P1. Calculate Attenuation?

Sol

​

=10(-0.3)= -3 dB

​

Induced Noise

144 of 244

​

CS601-Data Communication VU

​

🙣 Performance of Medium

Three oncepts are used to measure the performance of TX Media:

–Throughput

–Propagation Speed

–Propagation Time

🕘 Throughput

o Measurement of how fast data can pass through a point

o In other words, if we consider any point in the TX Medium as a wall through

which bits pass, then throughput is the number of bits that can pass this wall in

second

​

🕘 Propagation Speed

o Propagation speed measures the distance a signal or a bit can travel through a

medium in one second

o The propagation speed of EM signals depend on the medium and the

frequency of the signal

​

🕘 Propagation Time

o Measures the time required for a signal (or a bit) to travel from one point of

the TX medium to another

o The propagation time is calculated as:

Propagation time =

​

Pr opagationSpeed

​

🙣 WAVELENGTH

o Another characteristic of a signal traveling through the TX Medium

o This concept binds the frequency of the signal to the propagation speed of

medium

o It is customary to talk about wavelength when talking about TX of light in

Optical Fiber

​

© Copyright Virtual University of Pakistan

Dis tan ce

145 of 244

​

CS601-Data Communication VU

​

o The wavelength is the distance a simple signal can travel in one period

o The wavelength depends on both the frequency and the medium

​

–Wavelength = Propagation speed * period

–Wavelength = Propagation speed / frequency

​

🙣 Shannon Capacity

In 1944, Claude Shannon introduced a formula to determine the theoretical

highest data rate for a channel:

​

C = B log2 (1 + S/N) in bps

–B: bandwidth of the channel

–S/N: signal to noise ratio

​

Examples

​

⑩ Extremely noisy channel

​

– S/N ≈ 0

– C = B log2 (1+0) = 0

⑩ Telephone line

– Bandwidth is 3000 Hz, S/N ratio is 3162 (35 dB)

– C = 3000 log2 (1+3162) = 34,860 bps

Media Comparison

When evaluating the suitability of a particular medium to a specific application, 5 factors

should be kept in mind:

​

⑩COST: This is the cost of materials plus installation

⑩SPEED: Speed is the max no. of bits per second that a medium can transmit reliably

–Speed varies with frequency, with physical size of medium and Transmission

Equipment

⑩ATTENUATION: Tendency of EM signal to become weak or distorted over signal

⑩EM Interference: EMI is the susceptibility of the medium to external EM energy

introduced into the link that interferes with the intelligibility of a signal

–Familiar effects of EMI are static(audio) and snow (visual)

​

© Copyright Virtual University of Pakistan

146 of 244

​

CS601-Data Communication VU

​

⑩SECURITY: How easy it is for an unauthorized device to listen on the link?

–Twisted pair is intercept able

–Optical Fiber is more secure

​

Summary

⑩ Transmission Impairments

⑩ Performance of Transmission Medium

⑩ Wavelength

⑩ Shannon Capacity

⑩ Media Comparison

​

Reading Sections

⑩ Section 7.4, 7.5, 7.6. 7.7, “Data Communications and Networking” 4th Edition by

Behrouz A. Forouzan

​

© Copyright Virtual University of Pakistan

147 of 244

​

CS601-Data Communication VU

​

LECT URE #29

​

Introduction

o Whenever the TX capacity of a medium linking 2 devices is greater than the TX

needs of the devices, the link can be shared

o Example: Large Water pipe can carry water to several separate houses at once

o Multiplexing is the set of techniques that allows simultaneous TX of multiple signals

across a single data link

o As data communication usage increases, traffic also increases

o We can add a new line each time a new channel is needed

o Or we can install higher capacity links and use each to carry multiple signals

o All current TX media i.e. Coax, Optical fiber have high available BWs

o Each of these has carrying capacity far in excess of that needed for one signal

o If TX capacity of a link is greater than the TX needs of devices attached to it, the

excess capacity is wasted

Multiplexing

Set of techniques that allows the simultaneous transmission of multiple signals

across a single data link”

​

In the multiplexed system, ‘n’ devices share the capacity of one link

​

o Fig. shows two possible ways of linking 4 pairs of device

o In fig. (a), each pair has its own link. If full capacity of each link is not utilized, it

will be wasted

o In fig. (b), TX b/w pairs are multiplexed . The same 4 pairs share the capacity of

single link

o Fig. (b) shows the basic format of a Multiplexed system

o The 4 devices on left direct their TX streams to a MUX , which combines them

into a single stream

o At the receiving end, that stream is fed into a DEMUX, which separates the

stream back into its component transmissions and directs them to their intended

devices

⑩Path: Physical Link

⑩Channel: A portion of the path that carries TX b/w a given pair of devices

⑩One path can have many channels

​

© Copyright Virtual University of Pakistan

148 of 244

​

CS601-Data Communication VU

​

🙣 Categories of Multiplexing

​

🕘 FDM

o An analog technique that can be applied when BW of the link is greater than the

combined BW of the signals to be TX

o Signals generated by each sending device modulate difference carrier frequencies

o These modulated signals are then combined into a single Composite signal that

can be transported by the link

o Carrier frequencies are separated by enough BW to accommodate the modulated

signal

o These BW ranges are the channels through which the various signals travel

​

FDM (Guard Bands)

•GUARD BANDS: Channels must be separated by strips of unused BW (guard

bands) to prevent signals from Overlapping

​

o In fig. the TX path is divided into 3 parts, each representing a channel to carry one

TX

o As an analogy, imagine a point where 3 narrow streets merge to form a 3-lane

highway

​

© Copyright Virtual University of Pakistan

149 of 244

​

CS601-Data Communication VU

​

o Each of these streets correspond to a lane of the highway

o Each car merging on to the highway from one of these streets still has its own lane

and can travel w/o interfering with cars from other lanes

​

The FDM Process-TIME DOMAIN

​

o Figure shows a Time domain fdm

o FDM is an analog process and we show it here in using Telephones as I/p & o/p

devices

o Each telephone generates a signal of similar frequency range

o Inside the MUX, these similar signals are modulated on to different carrier

frequencies

o The resulting modulated signals are then combined into a single composite signal

that is sent over a media link that has enough BW to accommodate it

​

The FDM Process-Freq domain

​

o Fig is freq domain representation of FDM process

o In FDM, signals are modulated onto separate carrier frequencies (f1,f2,f3) using either

FM or AM

o Modulating one signal into the other results in a BW of at least twice the original

​

© Copyright Virtual University of Pakistan

150 of 244

​

CS601-Data Communication VU

​

o In fig, the BW of resulting composite signal is more than 3 times the BW of each

input signal

o Plus extra BW to allow for necessary GUARD BANDS

​

🙣 DEMULTIPLEXING

o DEMUX uses a series of filters to decompose multiplexed signal into its

constituent signals

o Individual signals are then passed to a demodulator that separates them to the

carriers and passes them to the waiting receivers

​

DEMULTIPLEXING (Time Domain)

​

This figure is the time domain representation of the FDM MUX again using 3 telephones

as the communication devices

​

DEMULTIPLEXING (Freq Domain)

​

This figure is the time domain representation of the FDM MUX again using 3 telephones

as the communication devices

​

Wave Division Multiplexing (WDM)

o It is conceptually the same as FDM except that multiplexing and demultiplexing

involves light signals TX through fiber optic channels

o Idea is the same: We are combining different signals of the different frequencies

o However in this case frequencies are very high

​

© Copyright Virtual University of Pakistan

151 of 244

​

CS601-Data Communication VU

​

o WDM MUX and DEMUX

o Very narrow bands of light from different sources are combined to make a wider

band of light

o At the receiver are separated by DEMUX

​

🕘 Mechanism of WDM

o Although the technology is very complex, the idea is very simple

o We want to combine multiple sources into one single light at the the MUX

and do the reverse at the DEMUX

​

PRISM

o Combining and Splitting of light sources is easily handled by a PRISM

o From Physics, a prism can deflect the light depending upon the angle of incidence

and the frequency

​

o

o Using this technique, a MUX can be made to combine several input beams of light

each containing a narrow band of frequencies into one o/p beam of a wider band

of frequencies

o The DEMUX can also be made to reverse the process

​

TDM

o TDM is a digital process that can be applied when the data rate capacity of the TX

medium is greater than the data rate required by the sending and receiving devices

​

© Copyright Virtual University of Pakistan

152 of 244

​

CS601-Data Communication VU

​

o In such case, multiple transmissions can occupy a single link by subdividing them

and Interleaving the portions

​

In fig, same link is used as in FDM. However, here the link is shown sectioned by time

rather than frequency In TDM fig, portions of signals 1, 2, 3 and 4 occupy the link

sequentially

​

🕘 Implementation of TDM

TDM can be implemented in two ways:

–Synchronous TDM

–Asynchronous TDM

​

🕘 Synchronous TDM

o The term synchronous has a different from that used in other areas of

telecommunication

o Here synchronous means that MUX allocates exactly the same time slot to

each device at all device whether or not the device has any thing to transmit

​

🕘 Synchronous TDM Example

o Time slot A for example is assigned to device A alone and cannot be used by

any other device

o Each time its allocated time slot comes up a device has the opportunity to send

a portion of its data

o If a device is unable to transmit or does not have data to send time slot

remains empty

​

🕘 Synchronous TDM Frames

o Time slots are grouped into Frames

o A frame consists of one complete cycle of Time slots including one or more

slots dedicated to each sending device

o In a system with ‘n’ I/p lines, each frame has atleast ‘n’ slots with each slot

allocated to carrying data from a specific I/p line

o If all the I/p devices sharing a link are transmitting at the same data rate, each

device has 1 timeslot per frame

o However it is possible to accommodate varying data rates

o A TX with two slots per frame will arrive twice as quickly as one with 1 slot

per frame

​

© Copyright Virtual University of Pakistan

153 of 244

​

CS601-Data Communication VU

​

o The time slots dedicated to a given device occupy the same location in each

frame and constitute that device’s channel

​

o In figure, we have 5 I/p lines Multiplexed onto a single path using

synchronous TDM

o In this example all of the I/p’s have the same data rate, so the number of time

slots in each frame is equal to the number of I/p lines

​

Interleaving

o Synchronous TDM can be compared to a very fast rotating switch

o As the switch opens in front of a device, the device has the opportunity to send a

specifies amount of data on to the path

o The switch moves from device to device at a constant rate and in a fixed order

o This process is called INTERLEAVING

o Interleaving can be done by BITS, BYTES or by any other DATA UNIT

o In other words MUX can take one byte from each device, then another byte from each

device and so on

o In a given system interleaved units will always be of the same size

​

o Fig,, shows interleaving and frame building

o In the example we interleave the various TXs by character (equal to 1 byte each) but

the concept is the same for data units of any length

o Each device is sending a different message

o The MUX interleaves the different and forms them into FRAMES before putting them

onto the link

o At the receiver the DEMUX decomposes each frame by extracting each character

​

© Copyright Virtual University of Pakistan

154 of 244

​

CS601-Data Communication VU

​

o As a character is removed from a frame, it is passed to the appropriate receiving

device

​

Weakness of Synchronous TDM Figure

o Both figures point out major weakness in Synchronous TDM

o By assigning each timeslot to a specific I/p line, we end up with empty slots whenever

not all the lines are active

o In figure only the first three frames are completely filled, The last 3 frames have a

collective 6 empty slots

o Having 6 empty slots out of 24 means that a quarter of a capacity of the link is wasted

o Framing Bits

o Because the time slots order in a synchronous TDM does not vary from frame to

frame, very little overhead information need to be included in each frame

o The order of receipt tells the DEMUX where to direct each time slot so no

ADDRESSING is necessary

​

Demultiplexing Process

​

o Demultiplexer decomposes each frame by extracting each data unit in turn

o Weakness of synchronous TDM

–Waste of empty slots

​

Framing Bits

o Various factor however can cause timing inconsistencies.

o For this reason one or more synchronization bits are added to the beginning of each

frame

o These bits called Framing bits follow a pattern frame to frame that allows a DEMUX

to synchronize with the incoming stream so that it can separate time slots accurately

o This synch info consist of one bit /frame alternating b/w 0 and 1.

​

© Copyright Virtual University of Pakistan

155 of 244

​

CS601-Data Communication VU

​

Synchronous TDM Example

​

Summary

⑩ Multiplexing

⑩ Frequency division multiplexing

⑩ Wave division multiplexing

⑩ Time division multiplexing

​

Reading Sections

⑩ Section 8.1,8.2,8.3,8.4

“Data Communications and Networking” 4th Edition by Behrouz A. Forouzan

​

© Copyright Virtual University of Pakistan

156 of 244

​

CS601-Data Communication VU

​

LECT URE #30

​

Bit Stuffing

o It is possible to connect devices of different data rates to synchronous TDM

o For Example, device A uses one time slot, while the faster device B uses two slots

o The Time slot length is FIXED

o Therefore data rates should be integer multiples of each other

o For example, we can accommodate a device that is 5 times faster than the other device

by giving it five slots to one for each of the other devices

o We cannot accommodate a device which is five and a half times faster using this

method because we cannot introduce half a time slot into a frame

o When the speeds are not integer multiples of each other, they can be made to behave

as if they were

o This is done by a technique known as BIT STUFFING

o In bit stuffing, MUX adds extra bits to a device

o For Example, if we have one device with a bit rate of 2.75 times that of other devices,

we can add enough bits to raise this rate to 3 times that of others

o The extra bits are then discarded by the Demultiplexer

​

Asynchronous TDM

o Synchronous TDM does not guarantee full utilization of the timeslots

o Because the time slots are fixed and pre assigned, whenever a connected device is not

transmitting, the corresponding slot is empty and much of the channel capacity is

wasted

o For Example, imagine that we have multiplexed the o/p of 20 identical computers

onto a single line

o Using synchronous TDM, the speed of that line must be at least 20 times the speed of

each i/p line

o But what if only 10 computers are in use at a time?

o Half of the capacity of the line is wasted

o Asynchronous TDM or Statistical TDM is designed to avoid this type of waste

o Asynchronous means flexible or Not fixed

o In an asynchronous system, if we have ‘n’ input lines, the frame contains no more

than ‘m’ slots, where m is less than n

​

o In this way asynchronous TDM supports the same number of I/p lines as synchronous

TDM with a lower capacity link

o A slot is available to any device that wants to send data

o MUX scans I/p lines, accepts data until a frame is filled and then sends the frame

across the link

​

© Copyright Virtual University of Pakistan

157 of 244

​

CS601-Data Communication VU

​

🙣 Advantages of Asynchronous TDM

​

⑩Two major advantages:

–Ability to allocate time slots dynamically

–Lower ration of time slots to I/p lines

​

Above two factors greatly reduce the likelihood of a waste

​

o Fig. shows a system with 5 I/p lines sharing a link using Asynchronous TDM

o Frame size is 3 slots per frame

o Fig shows how MUX handles 3 levels of traffic

​

o In the first case, only 3 of the 5 computers have data to send

o In the second case, 4 lines are sending data

o In the third case, all devices are sending data

o In each case, MUX scans the devices in order from 1 to 5 filling time slots as it

encounters data to be sent

🕘 Asynchronous TDM Figure 1

o In the first case, the 3 active i/p lines correspond to the 3 slots in each frame

o etrically distributed among all the devices.

o By the 5 frame however, devices 3 and 5 have completed their transmission but

device 1 still has two characters to go

​

🕘 Asynchronous TDM Figure 2

​

© Copyright Virtual University of Pakistan

For the first 4 frames, the I/p is symm

158 of 244

​

CS601-Data Communication VU

​

o The MUX picks up the A from device 1, scans down the line without finding another

transmission and returns to device 1 to pick up the last A

o frame with only 2

slots filled

o Compare with Synchronous TX: 6 frames of 5 slots each would be required=30 slots,

14 slots used only

o In second case, there is one more I/p line than there are slots in each frame

o This time MUX scans from 1 to 5 and fills up a frame before each of the lines are

checked

o The first frame contains data from device 1, 3,and 4

​

🕘 Asynchronous TDM Figure 3

o MUX continues the scan and pu

frame and so on

o When the number of active senders does not equal the number of slots in a frame, the

time slots are not filled symmetrically

o Device 1 occupies the first slot in the first frame , 2 slot in second frame and so on

o In the third case, frames are filled as shown above

o All 5 I/p lines are active

o In this case device 1 occ

frame and so on

​

Aspects of Asynchronous TDM

🕘 Addressing and Overhead

o Case 2 & 3 above show a major weakness of Asynchronous TDM

o How does the DEMUX know which slot belongs to which output line?

o As opposed to Synchronous TDM, in this case, data from a given device might be in

the first slot of one frame and in the third of the next

o Therefore, each time slot must carry an address telling the DEMUX how to direct data

o This address is for local use only attached by the MUX and detached by the DEMUX

o In the figure above address is specified by a digit

o Adding address bits to each time slot increase the overhead of an Asynchronous

system and limits its efficiency

o Addresses usually consist of only a small number of bits

o Need for Addressing makes Asynchronous TDM inefficient for bit or byte

interleaving

o Imagine bit interleaving with each bit carrying an address

o One bit of data plus 3 bits of address

o Asynchronous TDM is efficient only when the size of the time slot is kept relatively

large

Inverse Multiplexing

o Opposite of Multiplexing

o Takes data from one high speed line and breaks it into portions that can be sent over

several lower speed lines simultaneously

​

Why do we need Inverse Multiplexing?

o An organization wants to send data, voice and video each of which requires a

different data rate

o To send voice it needs 64Kbps,

o To send data, it needs 128 Kbps link

​

© Copyright Virtual University of Pakistan

​

ts first portion of 5th device into the first slot of next

​

upies the 1 slot in the first frame, the 3rd slot in the second

159 of 244

​

CS601-Data Communication VU

​

o To send video it may need 1.544 Mbps link

o It can lease a 1.544 Mbps line from a common carrier and only use it fully for

sometime

o Or it can lease several separate channels of lower data rates

o Voice can be sent over any of these channels

o Data & Video can be broken into smaller portions using Inverse Multiplexing

and TX

​

🙣 Multiplexing Application

​

THE TELEPHONE SYSTEM

o Multiplexing has long been used as an essential tool in the Telephone industry

o A country’s telephone system may include various carriers that offer local and

long-distance service

o These various carriers form a Telephone Network I.e. PTCL

​

⑩

Summary

⑩ Time Division Multiplexing

⑩ Asynchronous TDM

⑩ Inverse Multiplexing

⑩ The Telephone System

​

Reading Sections

⑩ Section 8.4,8.5 “Data Communications and Networking” 4th Edition by Behrouz

A. Forouzan

​

© Copyright Virtual University of Pakistan

Each subscriber is connected to the telephone network as a service line

160 of 244

​

CS601-Data Communication VU

​

LECT URE #31

​

Telephone Services

​

🙣 Common carrier Services & Hierarchies

​

o Telephone companies began by providing their subscribers with ANALOG services

using ANALOG networks

o Later digital services were introduced

o Nowadays carriers are even thinking about changing their service lines digital too

o Soon the entire n/w will be digital

o For now both types of services are available and both FDM and TDM are in use

​

🙣 Analog Services

o Of the many analog services available to telephone subscribers, two are really

important:

​

–

o Familiar dial up service most often encountered when using a home telephone

o Uses twisted pair cable to connect subscriber’s phone to the network via exchange

o This connection is called LOCAL LOOP

o The n/w it joins is called PSTN

o Signal on a local loop is Analog and BW is usually b/w 0 and 4000 Hz

​

o

​

© Copyright Virtual University of Pakistan

–Switched Analog Services

​

Leased Analog Services

161 of 244

​

CS601-Data Communication VU

​

Switched Analog Services

​

With switched lines, caller dials a number and call is conveyed to a

series of switches at the exchange

The switch connects two lines for the duration of the call

​

Analog Leased Service

​

Offers customers the opportunity to lease a line, sometimes called a

Dedicated Line

Dedicated line is permanently connected to the other customer

Although the connection still passes through switches in the

exchange, the customer experiences it as a single line because

switch is always closed

No dialing is needed

​

Conditioned Lines

​

o Another service offered by the carriers

o Conditioning means improving the quality of a line by lessening attenuation, signal

distortion or delay distortion

o Conditional lines are Analog but their quality makes them suitable for digital data

communication when connected to Modems

​

Analog Hierarchy

o To maximize efficiency, telephone companies multiplex signal from lower BW lines

onto higher BW lines

o In this way many switched or leased lines can be combined into fewer but bigger

channels

o FDM is used for analog lines

​

© Copyright Virtual University of Pakistan

162 of 244

​

CS601-Data Communication VU

​

🙣 Digital Services

o Digital services are largely offered nowadays

o Digital services are less sensitive than analog ones

o Telephone line acts as an antenna and pick up noise both in case of analog and digital

TX

o In analog, both noise and signal are analog

o In digital, signal can easily be separated

​

Types of Digital Services

​

Switched / 56 Service

It is digital version of Analog switched line

Allows data rates of up to 56 Kbps

Both parties must subscribe to the service

A caller with normal telephone service cannot connect to a telephone or

computer with this service even with a Modem

​

© Copyright Virtual University of Pakistan

163 of 244

​

CS601-Data Communication VU

​

Because this service is already digital, subscribers do not need modems

They need DSU (Digital service unit)

DSU changes the rate of digital data created by the subscriber’s device to

56 Kbps and encodes it in the format used by service provider

​

DSU is often included in dialing process

DSU is more expensive than Modem

So why would a subscriber pay for switched/56 service and DSU?

Because digital line has better speed, better quality and less susceptibility

to noise

Bandwidth on Demand

​

Digital Data Service (DDS)

Digital version of analog leased line

Max. data rate of 64 Kbps

Like switched/56, DDS requires a DSU

DSU for this service is cheaper than switched /56 DSU because it does not

need a dial pad

​

Digital Signal (DS) Service

Telephone companies saw the need to develop a hierarchy of digital

services much like those used for Analog services

The next step was DS service

DS is a hierarchy of digital signals

​

© Copyright Virtual University of Pakistan

164 of 244

​

CS601-Data Communication VU

​

DS-0 resembles DDS. It is single digital channel of 64 Kbps

DS-1 is 1.544 Mbps service = 24 * 64 Kbps+8 Kbps of overhead

DS-2 ⮴6.312 Mbps=96*64 Kbps + 168Kbps

DS-3 ⮴44.376 Mbps=672*64Kbps +1.368 Mbps of overhead

DS-4 ⮴274.176Mbps4032 * 64 Kbps+ 16.128Mbps overhead

​

T Lines

o DS-0 DS1 are the names of the Services

o To implement those services, telephone companies use T-lines

o These are the lines with capacities matched to the data rates of DS-0 to DS-4

​

Service Line Rate(Mbps) Voice channels

--------------------------------------------------------

DS-1 T-1 1.544 24

DS-2 T-2 6.312 96

DS-3 T-3 44.736 672

DS-4 T-4 274.176 4032

​

Summary

⑩ The Telephone System

⑩ Analog Services

⑩ Digital Services

⑩ Fiber To The Curb (FTTC)

​

Reading Sections

​

⑩ Section 8.5, “Data Communications and Networking” 4th Edition by Behrouz A.

Forouzan

​

© Copyright Virtual University of Pakistan

165 of 244

​

CS601-Data Communication VU

​

LECT URE #32

​

T Lines

🙣 T Lines for Analog Lines

o T Lines are digital lines designed for digital data

o However they can also be used for analog transmission (Telephone

connections)

o Analog signals are first sampled and the Time Multiplexed

​

🕘 T 1 Frame (Figure)

o DS-1 requires 8 Kbps of overhead

o To understand this overhead, lets examine format of a 24-voice channel frame

o Frame used on T-1 line is usually 193 bits divided into 24 slots of 8 bits each

+ 1 bit for synchronization (24*8+1=193)

o 24 segments are interleaved in one frame

o If a T-1 carries 8000 frames, the data rate is 1.544 Mbps (193 * 8000=1.544

Mbps) which is capacity of the line

​

© Copyright Virtual University of Pakistan

166 of 244

​

CS601-Data Communication VU

​

🕘 Fractional T Lines (Figures)

o Many subscribers do not need the entire capacity of the T line

o For example, a small business may need only one-fourth of the capacity of a

T-1 line

o If four business of same size lie in same building, they can share a T-1 line

o DSU/CSU allow the capacity of T-1 line to be interleaved into 4 channels

​

E-Lines

⑩Europeans use a version of T-lines called E-lines

⑩Two are conceptually identical but capacities vary

​

Line Rate(Mbps) Voice channels

------------------------------------------------

E-1 2.048 30

E-2 8.448 120

E-3 34.368 480

E-4 139.264 1920

​

Fiber to t e Curb (FTTC)

⑩Optical fiber has many advantages:

–Noise Resistance

–High BW Capacity

⑩Very Expensive

⑩Telephone & Cable companies have devise FTTC to employ optical fiber while

keeping the expense down

⑩Optical Fiber is the medium from the Central Office of the telephone company

or from main office of a cable company to the Curb

⑩The medium from the Curb to the subscriber’s premises if the less expensive

twisted pair or coaxial cable

​

🕘 FTTC in Telephone Network

o Optical Fiber is used to connect and multiplex different voice channels

o Copper twisted pair coming from individual premises is multiplexed in

junction boxes and converted to optical signals. Optical signals are

​

© Copyright Virtual University of Pakistan

167 of 244

​

CS601-Data Communication VU

​

multiplexed using WDM at switching office to create wider BW optical

​

🕘 FTTC in Cable TV Network

o Cable TV uses optical fibers to connect and multiplex different cable channels

o Coaxial cables coming from individual premises are multiplexed in the

junction box and converted to the optical signals

o Optical signals are multiplexed using WDM at switching office to create wider

BW optical signals

​

ERROR DETECTION AND CORRECTION

Introduction

o Networks must be able to transfer data from one device to another with complete

accuracy

o A system that cannot guarantee that the data received by one device is identical to the

data transmitted by another device is essentially useless

o Anytime the data is TX from source to destination, it gets corrupted on the way

o Many factors including NOISE can alter or wipe out one or more bits of a given data

unit

o Reliable systems must have a mechanism for detecting and correcting such ERRORS

o Error detection and Correction is implemented either at the data link layer or at the

Transport layer

​

Types of Errors

​

© Copyright Virtual University of Pakistan

168 of 244

​

CS601-Data Communication VU

​

o Whenever an EM signal flows from one point to the other, it is subject to

unpredictable interference from heat, magnetism and other forms of electricity

o This interference can change the shape or timing of the signal

o If the signal is carrying encoded binary data, such changes can alter the meaning of

the data

Summary

⑩ T-Lines in Analog Transmission

⑩ Fractional T-Lines

⑩ E-Lines

⑩ Fiber To The Curb (FTTC)

⑩ Error Detection and Correction

​

Reading Sections

​

Section 8.5, 8.7, 9.1,

“Data Communications and Networking” 4th Edition by Behrouz A. Forouzan

​

© Copyright Virtual University of Pakistan

169 of 244

​

CS601-Data Communication VU

​

LECT URE #33

​

Types of Errors

🙣 Single Bit & Burst

o In a single-bit error, a 0 is changed to a 1 or a 1 to a 0

o In a burst error multiple bits are changed

o For Example, a 0.01 second burst of impulse noise on a TX with a data rate of

1200 bps might change all or some of 12 bits of information

​

o The term single bit error means that only one bit of a given data unit (such as a

byte, character, or a packet) is changed from 1 to 0 or from 0 to 1

​

o

o ASCII character 000000010 (ASCII STX) is sent but 00001010 (ASCII LF) is

received

o Single bit errors are the least likely type of error in serial data TX

​

o

o This means that each bit lasts only 1/1,000,000 seconds or 1 microsecond

o For single bit error to occur, the noise must have a duration of 1 microsecond

which is very rare, noise lasts much longer than that

o However, single bit error can occur if we are sending data using parallel TX

o For Example, if 8 wires are used to send all of the eight bits of a byte at the same

time and one of the wires is noise, one bit can be corrupted in each byte

​

🙣 Burst Errors

⑩The term burst error means that two or more bit sin the data unit have changed from 1

to 0 or from 0 to 1

​

o Figure shows the effect of a burst error on a data unit

o In this case 0100010001000011 was sent but 0101110101000011 was received

o Note that a burst error does not necessarily mean that error occur in consecutive

bits

​

© Copyright Virtual University of Pakistan

Figure shows the effect of a single bit error on a data unit

​

To see Why? Imagine a sender sends data at 1Mbps

170 of 244

​

CS601-Data Communication VU

​

o The length of the burst is measured from the first corrupted bit to the last

corrupted bit

o Some bits in b/w may not have been corrupted

o Burst error is most likely to happen in a serial TX

o The duration of the noise is normally longer than the duration of a bit which

means that when noise affects data, it affects a set of bits

o The number of bits affected depends on the data rate and duration of noise

​

o For example, if we are sending data at 1 Kbps, a noise of 1/100 seconds

can affect 10 bits

o If we are sending data at 1 Mbps, the same noise can affect 10,000 bits

Error Detection

o Even if we know what type of errors can occur, will we recognize one when we

see it?

o If we have a copy of the intended TX for comparison, of course we will

o But what if we don’t have a copy of the original

o Then we will have no way of knowing we have received an error until we have

decoded the TX and failed to make sense of it

o For a device to check for errors this way will be Costly and Slow

o We don’t need a machine that decodes every thing and then sits and decides

whether a specific word makes sense or not

o We need a mechanism that is Simple and Completely objective

​

🕘 Redundancy

o One error detection mechanism that would satisfy these requirements would be to

send every data unit twice

o The receiving device would then be able to do a bit-for-bit comparison b/w two

TXs

o Any discrepancy will indicate an error and an appropriate error correction

mechanism could be set in place

o This system will be completely Accurate because the odds of error affecting the

same bits in both version will be infinitesimally small

o But this system will be extra ordinarily SLOW

o Not only will the TX time double, but the time it takes to compare two data units

is also added up

o The concept of including extra information in the TX solely for the purpose of

comparison is a good one

o But instead of repeating the entire data stream, a shorter group of bits may be

appended to the end of each unit

o This technique is called REDUNDANCY because the extra bit are redundant to

the information and are discarded as soon as the accuracy of TX has been

determined

​

© Copyright Virtual University of Pakistan

171 of 244

​

CS601-Data Communication VU

​

o Fig shows the process of using redundant bits to check the accuracy of data unit

​

o

and adds on an appropriately coded redundancy check

o The data unit now enlarged by several bits (7) travels over the link to the receiver

o The receiver puts the entire stream through a checking function

o If the received bit stream passes the checking criteria, the data portion of the data unit

is a cepted and the redundant bits are discarded

​

• Types of Redundancy Checks

o There are 4 types of redundancy checks used in data communication:

–Vertical Redundancy Check (VRC)

–Longitudinal Redundancy Check (LRC)

–Cyclic Redundancy Check (CRC)

–Checksum

o First 3 are normally implemented in the physical layer for use in data link

layer

o Fourth is used by Upper layers

​

🕘 Vertical Redundancy Check (VRC)

o Most common and least expensive

o Also called Parity Check

o A redundant bit called parity bit is appended to every data unit so that total

number of 1’s in the unit becomes even including the parity bit

​

© Copyright Virtual University of Pakistan

Once the data stream has been generated, it passes through a device that analyzes it

172 of 244

​

CS601-Data Communication VU

​

⑩We want to TX the binary data unit 1100001

⑩Adding together the number of 1’s gives us 3, an odd number

o Before TX, we pass the data unit through a parity generator, which counts the 1’s

and appends the parity bit (1) to the end

o The total number of 1’s is now 4, an even number

o The system now transfers the entire expanded across the network link

​

o When it reaches its destination, the RX puts all 8 bits through an even parity

checking function

o If the RX sees 11100001, it counts four ones, an even number and the data unit

passes

o But what if the data unit has been damaged in transit?

o What if instead of 11100001, receiver sees 11100101?

o Th n when the parity checker counts the 1’s, it gets 5 an odd number

o The re eiver knows that an error has occurred somewhere and therefore rejects the

whole unit

o Some systems may also use ODD parity checking

o The principal is the same as even parity

​

🖲 Example 9.1, 9.2, 9.3

Example 9.1

Sender wants o send “world” In ASCII, the five characters are coded as:

1110111 w 1110111 0

1101111 o 1101111 0

1110010 r 1110010 0

1101100 l 1101100 0

1100100 d 1100100 1

​

Example 9.2

⑩ | Suppose “world” is received by the receiver without being corrupted:

​

⑩ Receiver counts the 1’s and passes it

1110 11 w 1110111 0 6

1101111 o 1101111 0 6

1110010 r 1110010 0 4

1101100 l 1101100 0 4

1100100 d 1100100 1 4

​

© Copyright Virtual University of Pakistan

173 of 244

​

CS601-Data Communication VU

​

Example 9.3

​

⑩ Suppose “world” is received by the receiver corrupted:

​

⑩ Receiver counts the 1’s and rejects it

1110111 w 1111111 0 7

1101111 o 1101111 0 6

1110010 r 1110110 0 5

1101100 l 1101100 0 4

​

Performance of VRC

o VRC can detect all single bit errors

o Can also detect Burst errors as long as the total number of bits changed is ODD

(1,3,5 etc)

​

Examples

⑩ We have an Even Parity data unit where the total number of 1’s including the

parity bit is ‘6’ : 1000111011

⑩ If 3 bits change value resulting parity will be odd and an error will be detected:

1111111011: 1’s = 9

⑩ If 2 bits change value resulting parity will still be even and error will not be

detected: 1110111011: 1’s = 8

​

o VRC cannot detect errors when the total number of bits changed are even

o VRC checker will return a result of 1 and the data unit will be rejected

o The same hold true for any odd number of errors

o In the second case, VRC checker will check parity and will return an even

number although the data unit contains two errors

​

o VRC cannot detect error when the number of bits changed is even

o If any two bits change in TX, the changes cancel each other and the data unit will

pass a parity check even though the data unit is damaged

o Same holds true for any even number of errors

​

Summary

​

⑩ Types of Errors

⑩ E ror Detection Techniques

⑩ Redundancy

⑩ Types of Redundancy Checks

​

Reading Sections

⑩ Section 9.1, 9.2, 9.3

“Data Communications and N tworking” 4th Edition by Behrouz A. Forouzan

​

© Copyright Virtual University of Pakistan

174 of 244

​

CS601-Data Communication VU

​

LECT URE #34

​

Error Detection And Correction Methods

​

o In LRC, a block of bits is ganized in a table (rows and columns)

o For example instead of sending 32 bits, we organize them in a table made of 4

rows and 8 columns

​

o We then calculate the Parity bit for each column and create a new row of 8 bits

which are the parity bits for the whole block

​

o Note that the first parity bit in the 5 row is calculated based on all the first

bits

o The second parity bit is calculated based on all the second bits and so on

​

o We then attach the 8 parity bits to the original data and send them to the

receiver

Example 9.4

Suppo e the following block is sent:

10101001

00111001

11011101

11100111

__________

10101010 (LRC)

​

⑩ It is hit by a burst of length 8 and some bits are corrupted:

​

10100011

10001001

11011101

11100111

__________

10101010 (LRC)

⑩ Receiver checks LRC, some of bits do not follow even parity rule and whole

block is discarded

​

© Copyright Virtual University of Pakistan

🙣 Longitudinal Red Check(LRC)

175 of 244

​

CS601-Data Communication VU

​

10100011

10001001

11011101

11100111

__________

10 01010 (LRC)

​

Performance of LRC

​

o Burst errors can be detected more often

o As shown in the last example, an LRC of ‘n; bits can easily detect a burst error

of ‘n’ bits

o A burst error of more than ‘n’ bits is also detected by LRC with a very high

probability

o One pattern of errors remain elusive

o If two bits in one data unit are changed and two bits in exactly the same place

in another data unit are also damaged

For Example:

– Original data units

11110000

11000011

– Changed data units

01110001

01000010

🙣 Cyclic Redundancy Check (CRC)

o Most powerful of checking techniques

o VRC and LRC are based on Addition

​

o

o A sequence of redundant bits called CRC or CRC remainder is appended to

the end of the data unit, so that the resulting data unit becomes exactly

divisible by a second predetermined binary number

o At its destination, the data unit is divided by the same number

o If at this step, there is no remainder, the incoming data unit is assumed to be

intact and is therefore accepted

o A remainder indicates that a data unit has been damaged and therefore must be

rejected

​

Qualities of CRC

⑩

–It m st have exactly one less bit than the divisor

​

–Appending it to the end of the data must make the resulting bit sequence exactly

divisible by the divisor

​

© Copyright Virtual University of Pakistan

CRC is based on Binary Division

​

To b valid the CRC must have two qualities:

176 of 244

​

CS601-Data Communication VU

​

⑩First a string of n 0’s is appended to the data unit

⑩The number ‘n’ is one less than the number of bits in the predetermined divisor, which

is n+1 bits

⑩Secondl , newly elongated data unit is divided by the divisor using a process called

binary div sion. The remainder resulting from this division is the CRC

​

⑩Third,the CRC of ‘n’ bits replaces the appended 0’s at the end of the data unit

⑩Note that CRC may consist of all zeros

⑩The data unit arrives at the receiver followed by the CRC

​

⑩The receiver treats the whole string as a unit and divides it by the same divisor that was

used to find the CRC remainder

⑩If string arrives without an error, the CRC checker yields a remainder of zero and data

unit passes

⑩If the st ing has been changed in transit, the division yields a non-zero remainder and

the data unit does not pass

The CRC Generator

⑩Uses Modulo-2 Division

​

The CRC Checker

⑩Functions exactly like CRC Generator

​

© Copyright Virtual University of Pakistan

177 of 244

​

CS601-Data Communication VU

​

Polynomials

o CRC generator ( the divisor) is most often represented not as a string of 1’s and 0’s

but as an algebraic polynomial

o The polynomial format is useful for two reasons:

–It is short

–Can be used to prove the concept mathematically

​

Selection of a Polynomial

o A polynomial should have the following properties:

–It should not be divisible by ‘x’

–It should be divisible by ‘x+1’

​

⑩The first condition guarantees that all burst errors of a length equal to the degree of the

polynomial are detected

⑩The 2nd guarantees that all burst errors affecting an odd number of bits are detected

​

© Copyright Virtual University of Pakistan

178 of 244

​

CS601-Data Communication VU

​

Popular Polynomials for CRC

​

Performance of CRC

o CRC can detect all burst errors that affect an odd number of errors

o CRC can detect all burst errors of length less than or equal to the degree of the

polynomial

o CRC can detect with a very high probability burst errors of length greater than

the degree of the polynomial

Example 9.6

​

12

⑩ The CRC-12 (

⑩ It will detect

– All burst errors affecting odd no. of bits

– All burst errors with a length equal to or less than 12

– 99.97 % of the time burst errors with a length of 12 or more

​

Summary

⑩ Types of Redundancy Checks

⑩ Longitudinal Redundancy Check (LRC)

⑩ Cyclic Redundancy Check (CRC)

​

Reading Section

​

⑩ Section 9.4, 9.5

“Data Communications and Networking” 4th Edition by Behrouz A. Forouzan

​

© Copyright Virtual University of Pakistan

3

) has a degree of 12

​

x 1

x + x + + x +

179 of 244

​

CS601-Data Communication VU

​

LECT URE #35

​

Error Correction And Detection Method

🙣 CHECKSUM

o Error detection method used by the Higher Layers

o Like VRC, LRC, CRC, Checksum is also based on the concept of

redundancy

One’s Complement

​

Finding one’s complement

– Invert every 1 to 0 and 0 to 1

– A and –A are one’s complement of each other

– +A = 1010 → -A = 0101

– +0 = 0000 → -0 = 1111

o Error detection method used by the Higher Layers

o Like VRC, LRC, CRC, Checksum is also based on the concept of redundancy

​

🕘 CHECKSUM Generator

​

o The sender subdivides data units into equal segments of ‘n’ bits(16 bits)

o These segments are added together using one’s complement

o The total (sum) is then complemented and appended to the end of the original

data unit as redundancy bits called CHECKSUM

o The extended data unit is transmitted across the network

o The receiver subdivides data unit as above and adds all segments together and

complement the result

o If the intended data unit is intact, total value found by adding the data

segments and the checksum field should be zero

o If the result is not zero, the packet contains an error & the receiver rejects it

​

Checksum Figure

​

© Copyright Virtual University of Pakistan

180 of 244

​

CS601-Data Communication VU

​

Performance of Checksum

o Detects al errors involving an odd number of bits

o Detects most errors involving an even number of bits

o One pattern remains elusive

​

Examples

Example 9.7

​

⑩ Suppose a block of 16 bits need to be sent: 10101001 00111001

10101001

00111001

----------------

11100010 Sum

00011101 Checksum

⑩ Sent pattern:

10101001 00111001 00011101

checksum

​

Example 9.8

⑩ Examples of no error and a burst error

​

Segment 1 10101001 Segment1 10101111

Segment 2 00111001 Segment2 11111001

Ch cksum 00011101 Checksum 00011101

----------------- ----------------

Su 11111111 Sum 11000110

Complement 00000000 Complement 00111001

​

⑩ Error is invisible if a bit inversion is balanced by an opposite bit inversion in

the corresponding digit of another segment

​

Segment1 10111101

​

© Copyright Virtual University of Pakistan

181 of 244

​

CS601-Data Communication VU

​

Segment2 00101001

Checksum 00011001

----------------------

Sum 11111111

→ The error is undetected

ERROR CORRECTION

o Mechanisms that we have studied all detect errors but do not correct them

​

o Error correction can be done in two ways:

–Receiver can ask Sender for Re- TX

–Receiver can use an error-detecting code, which automatically correct certain

errors

o Error correcting code are more sophisticated than error detecting codes

o They require more redundancy bits

o The number of bits required to correct multiple –bit or burst error is so high

that in most cases it is inefficient

o Error correction is limited to 1, 2 or 3 bit

​

🙣 Single-bit Error Correction

⑩Simplest case of error correction

o Error correction requires more redundancy

detection

o One additional bit can detect single-bit errors

⑩ Parity bit in VRC

⑩ One bit for two states: error or no error

o To correct the error, more bits are required

⑩ Error correction locates the invalid bit or bits

⑩ 8 states for 7-bit data: no error, error in bit 1, and so

on

⑩ Looks like three bits of redundancy is adequate

⑩ What if an error occurs in the redundancy bits?

Hamming Code

Redundancy Bits (r)

o r must be able to indicate at least m+r+1 states

o m+r+1 states must e discoverable by r bits

o Therefore, 2r ≥ m+r+1

o If m=7, r=4 as 24 ≥ 7+4+1

​

© Copyright Virtual University of Pakistan

bits than error

182 of 244

​

CS601-Data Communication VU

​

Hamming Code

⑩ Each r bit is the VRC bit for one combination of data bits

⑩ r1(r2) bit is calculated using all bit positions whose binary representation includes

a 1 in the first(second) position, and so on

​

Summary

⑩ Checksum

⑩ Single-Bit Error Correction

⑩ Ha ming Code

​

Reading Sections

​

⑩ Section 9.6, 9.7, “Data Communications and Networking” 4th Edition by Behrouz

A. Forouzan

​

© Copyright Virtual University of Pakistan

183 of 244

​

CS601-Data Communication VU

​

LECT URE #36

​

Hamming Code

Redundancy Bits (r)

o r must be able to indicate at least m+r+1 states

o m+r+1 states must be discoverable by r bits

o Therefore, 2r ≥ m+r+1

o If m=7, r=4 as 24 ≥ 7+4+1

​

Hamming Code

⑩ Each r bit is the VRC bit for one combination of data bits

⑩ r1(r2) bit is calculated using all bit positions whose binary representation includes

a 1 in the first(second) position, and so on

​

© Copyright Virtual University of Pakistan

184 of 244

​

CS601-Data Communication VU

​

© Copyright Virtual University of Pakistan

185 of 244

​

CS601-Data Communication VU

​

Data Link Layer

Introduction

o Unless accurately received by a 2nd device, a signal TX over a wire is a waste of

electricity

o With TX alone, we can put a signal to the line, but we have

–no way of controlling which of several devices attached to that line will

receive it

–no way of knowing if the intended receiver is ready and able to receive it

–No way of keeping a second device from TX at the same time

o Communication requires at least 2 devices working together:

–Sender

–Receiver

​

o Even such a basic arrangement requires great deal of coordination

o For Example, in Half Duplex TX, it is essential that only one device TX at a time

o If both device TX, the signals will collide leaving nothing on the line but Noise

o The coordination of half-duplex TX is a part of a procedure called Line Discipline,

which is one of the functions included in the second layer of OSI Model, the data link

layer

​

o In addition to Line Discipline, the most important functions in the data link layer are

Flow Control and Error Control

o Collectively these functions are called Data Link Control

​

© Copyright Virtual University of Pakistan

186 of 244

​

CS601-Data Communication VU

​

🙣 Data Link Layer & its Functions

​

🙣 Data Link Control

​

🕘 Line Discipline:

– Coordinates the link systems, which device can send and when it can send?

​

🕘 Flow Control:

–The amount of data that can be sent before the receiving acknowledgement

–It also provides the receiver’s acknowledgement for frames received intact and

so is linked to error control

​

🕘 Error Control:

–Means Error detection and Correction

–It allows the receiver to inform the sender of any frames lost or damaged in TX

and coordinates Retransmission of those frames by the sender

​

🕘 Line Discipline

o How efficient the system is, no device in it should be allowed to transmit until that

device has the evidence that the intended receiver is:

–able to receive

–is prepared to accept the TX

​

o What if the Rx device does not expect a transmission or is busy

​

© Copyright Virtual University of Pakistan

187 of 244

​

CS601-Data Communication VU

​

o With no way of determining the status of the intended receiver, the transmitting

device may waste its time sending data to a non-functioning receiver

​

o The Line Discipline functions of the data link layer oversee:

– the establishment of links and

–The right of a particular device to transmit at a given time

​

• Ways to do Line Discipline

Line Discipline is done in 2 ways:

⑩Enquiry / Acknowledgement (ENQ/ACK)

–Used in Peer-to-Peer Communication

​

⑩Poll / Select

–Primary-Secondary communication

​

Summary

​

⑩ Hamming Code

⑩ Data Link Control

⑩ Line Discipline

– ENQ/ACK

– POLL/SELECT

⑩ Flow Control

​

Reading Sections

​

Section 9.7, 10.1 “Data Communications and Networking” 4th Edition by Behrouz A.

Forouzan

​

© Copyright Virtual University of Pakistan

188 of 244

​

CS601-Data Communication VU

​

LECT URE #37

​

Line Discipline

​

Enquiry / Acknowledgement (ENQ/ACK)

o Used primarily in systems where there is no question of wrong receiver getting the

transmission

o In other words when there is a Dedicated Link b/w the two devices so that the

only device that can receive data is the intended one

o Enquiry / Acknowledgement (ENQ/ACK)

o ENQ/ACK coordinates who may start a transmission and whether or not the

intended recipi nt is ready and enabled

​

o Using ENQ/ACK, a session can be initiated by either station on a link as long as

both are of equal rank- a printer for example cannot initiate communication with a

CPU

o Enquiry / Acknowledgement (ENQ/ACK)

o In both half duplex and full duplex TX, the initiating device establishes the

session

o In half-duplex, the initiator then sends its data while the responder waits

o The respondent may take over the link when the initiator is finished or has

requested a response

o In full duplex, both the devices can TX simultaneously once the link has been

established

​

How It Works?

o The receiver must answer either with an acknowledgement (ACK) frame if it is

ready to receive or with a negative acknowledgement ( NAK), if it is not

o By requiring a response, even if the answer is negative, the initiator knows that his

enquiry was in fact received even if the receiver is currently unable to receive

o If neither an ACK or a NAK is received within a specified time limit, the initiator

assumes that an ENQ frame was lost in transit, it disconnects and sends a

replacement

o An initiating system ordinarily makes 3 such attempts before giving up

o If the response to the ENQ is negative for 3 attempts, the initiator disconnects and

begins the process again at another time

⑩If the response is positive the initiator is free to send its data

​

© Copyright Virtual University of Pakistan

189 of 244

​

CS601-Data Communication VU

​

o The initiator first transmits a frame called an enquiry (ENQ) asking if the receiver

is available to receive data

o Once all of its data have been transmitted, the sending system finishes with an

End of Transmission (EOT) frame

​

🙣

​

Primary-Secondary communication

o This method works with topologies where one device is designed as a Primary station

and the other devices are Secondary stations

o Multipoint systems must coordinate several nodes, not just two

o The questions are not only Are you Ready? But also Which of the device has the right

to use the channel

o Whenever a multipoint link consists of a primary device and multiple secondary

devices using a single TX line , all exchanges must be made through the primary

device even when the ultimate destination is a secondary device

o The primary device controls the link and the secondary device follow sits instruction

o It is up to the primary to determine which device is allowed to use the channel ata

given time

o The primary therefore is always the initiator of the a session

​

⑩If the primary wants to receive data, it asks the second-arise if they have anything to

send, This is called POLLING

⑩If th primary wants to send data, it tells the target secondary to get ready to receive,

This function is called SELECTING

​

© Copyright Virtual University of Pakistan

Poll / Select

190 of 244

​

CS601-Data Communication VU

​

ADDRESSING

o For point-to-point configuration, there is no need for addressing

o Any TX put onto the link by one device can be intended only for the other

o For the primary device in a a multipoint topology to be able to identify and

communicate with a specific secondary device, there must be some addressing

convention

o For this reason, every device on the link has an address that can be used for

identification

o In ny transmission, this address will appear in a specified portion of each frame,

called the Address Field or Header depending upon the protocol

o If the TX comes from a secondary device, the address indicates the originator of the

data

🕘 SELECT

o The select mode is used whenever the primary device has something to send

o Primary control the link and if primary is not sending or receiving data, it knows that

the link is available

o If it has something to send, it sends it

o As a frame makes its way to the intended device, each of the other devices check the

address field

o Only when the device recognizes its own address, does it open the frame and read the

data

o In case of a SEL frame, the enclosed data consists of an alert that data is forthcoming

o What it does not know, however is if the target device it ready to receive (ON)

o So the primary must alert the secondary to the upcoming TX and wait for an

acknowledgement of the secondary ready status

o Primary send a SEL frame, one field of which includes the address of the intended RX

o If the secondary is awake and running, it returns an ACK frame to the primary

o The primary then sends one or more data frames , each addressed to the intended

secondary

​

© Copyright Virtual University of Pakistan

191 of 244

​

CS601-Data Communication VU

​

🕘 POLL

o Used by the primary device to receive transmissions from the secondary devices

o The secondaries are not allowed to TX data until asked

​

o

TX can occur at a time

​

o

it has anything to send

​

o

nothing to send or with data if it does

​

o

o When the primary has received data, it acknowledges by sending an ACK

⑩Two possibilities for termination:

–A secondary sends all its data and finishes with EOT frame

–Primary says “ Time is Up”

​

© Copyright Virtual University of Pakistan

By keeping control with the primary, the multipoint system guarantees that only one

​

When the primary is ready to receive, data , it must ask (POLL) each device in turn if

​

When the first secondary is approached, it responds either with a NAK frame if it has

​

If the response is negative, primary then polls the next secondary

192 of 244

​

CS601-Data Communication VU

​

🙣 Flow Control -Definition

⑩2nd aspect of data link control is Flow Control

⑩In most protocols, flow control is a set of procedures that tells the sender how

much data it can transmit before it must wait for an ACK from the receiver

⑩The flow of data must not be allowed to overwhelm the receiver

​

Summary

⑩ Line Discipline

-ENQ/ACK

-POLL/SELECT

⑩ Flow Control

– Stop-and-Wait

– Sliding Window

​

Reading Sections

Section 10.1,10.2 “Data Communication and Networking” 4th Edition by Behrouz

A. orouzan

​

© Copyright Virtual University of Pakistan

193 of 244

​

CS601-Data Communication VU

​

LECT URE #38

​

Flow Control- Explanation

​

o Any receiving device has a limited speed at which it can process incoming data and a

limited amount of memory in which to store incoming data

o The receiving device must be able to inform the sending device before those limits are

reached and to request that the TX device send fewer frames or stop temporarily

​

🙣 Flow Control-Buffer

​

o Incoming data must be processed and checked before it can be used

o The rate of such processing is often slower than the rate of TX

o So, each receiving device has a block of memory called BUFFER, reserved for

storing incoming data until it is processed

o If the buffer begins to fill up, the receiver must be able to tell the sender to halt the TX

until it is once again able to receive

​

Methods for Flow Control

​

o Two methods have been developed to control the flow of data across communication

links :

🕘 Stop and Wait

🕘 Sliding Window

🕘 Stop and Wait

In this method, the sender waits for an ACK after every frame it sends

​

© Copyright Virtual University of Pakistan

194 of 244

​

CS601-Data Communication VU

​

o Only when an ACK has been received, is the next frame sent

o This process of alternately sending and waiting repeats until the sender transmits an

EOT frame

Example: Officer giving dictation to the Typist, He says a word, typist says OK,

he says the next word, typist says OK and so on

• Advantages of Stop and Wait

⑩SIMPLICITY

–Each frame is checked and acknowledged before the next frame is sent

• Disadvantages of Stop and Wait

⑩INEFFICIENT ( Slow)

o Each frame must travel all the way to the receiver and an ACK must tra

the way back before the next frame can be sent

o If the distance b/w devices is long, the time spent waiting for ACKs between

each frame can be significantly long

​

🙣 Sliding Window

o In this method, sender can transmit several frames before needing an ACK

o Frames can be sent one right after another meaning link can carry several

frames at once and its capacity can be used efficiently

o The receiver uses a single ACK to confirm the receipt of multiple data frames

o Sliding Window refers to imaginary boxes at both the sender and the receiver

o This window can hold frames at either end and provides the upper limit on the

number of frames that can be sent before requiring an ACK

o Frames may be ACK at any point w/o waiting for the window to fill up and

may be TX as long as the window is not yet Full

o To keep track of which frames have been transmitted and which received,

sliding window introduces an identification scheme based on the size of the

window

o The frames are numbered modulo-n means from 0 to n-1

o If n=8, frames are numbered 0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,….

​

© Copyright Virtual University of Pakistan

vel all

195 of 244

​

CS601-Data Communication VU

​

o When the receiver sends the ACK, it includes the number of the next frame it

expects to receive

​

o

​

⑩For example, to ACK the receipt of a string of frames ending in frame 4,

the receiver sends an ACK with number 5

⑩The window can hold n-1 frames at either end, therefore a max of n-1

frames may be sent before an ACK is required

​

⑩At the beginning of a TX, sender’s window contains n-1 frames

⑩As frames are sent out, the left boundary of window moves inward,

shrinking the size of the window

⑩When an ACK is received, the window expands to allow in a number of

new frames equal to the number of frames acknowledged by that ACK

​

⑩At the beginning of TX, the receiver window contains n-1 spaces for

frames

⑩As new frames come in, the size of the receiver window shrinks

​

© Copyright Virtual University of Pakistan

196 of 244

​

CS601-Data Communication VU

​

⑩The receiver window therefore does not show the frames that are

received but the frames that may still be received before an ACK is sent

​

• ERROR CONTROL

Refers primarily to error detection and correction

​

⑩

Error control in data link layer is implemented simply:

–Anytime an error is detected in an exchange, a negative

acknowledgement (NAK) is returned and the specified frames are

retransmitted

Categories of Error Control

​

© Copyright Virtual University of Pakistan

AUTOMATIC REPEAT REQUEST (ARQ)

197 of 244

​

CS601-Data Communication VU

​

Stop and Wait ARQ

o It is a form of stop-and-wait flow control extended to include

retransmission of data in case of Lost or Damaged frames

o For retransmission to work, 4 features are added to the basic flow control

mechanism

o Sending device keeps a copy of the last frame transmitted until it receives

the ACK for that frame

o Both data and ACK frames are numbered 0 and 1 alternately

o A data 0 frame is acknowledged by a ACK 1 frame indicating that the

receiver has received data 0 and is now expecting data 1

o Sending device keeps a copy of the last frame transmitted until it receives

the ACK for that frame

o Both data and ACK frames are numbered 0 and 1 alternately

–A data 0 frame is acknowledged by a ACK 1 frame indicating that the

receiver has received data 0 and is now expecting data 1

If an error is discovered in a data frame an NAK frame is returned

NAK frames which are not sent tell the sender to retransmit the last

frame

The sending device is equipped with Timer. If an expected ACK is

not received within an allotted time period, the sender assumes that

the last frame sent is lost and resends the frame

​

• Damaged Frame

​

© Copyright Virtual University of Pakistan

198 of 244

​

CS601-Data Communication VU

​

• Lost Frame

Any of the 3 frame types can be lost in transit:

​

🕘 Lost Data Frame

🕘 Lost ACK Frame

🕘 L t NAK Frame

​

Lost ACK, NAK Frame

​

⑩

Summary

⑩ Flow Control

-Stop-and-Wait-

-Sliding Window

⑩ Error Control

​

Reading Sections

​

Section 10.2, 10.3 “Data Communications and Networking” 4th Edition by Behrouz A.

Forouzan

​

© Copyright Virtual University of Pakistan

199 of 244

​

CS601-Data Communication VU

​

LECT URE #39

​

SLIDING WINDOW ARQ

​

Among several popular mechanisms for error control two protocols are important:

​

🕘 Go-back-n ARQ

🕘 Selective Reject ARQ

​

Three features are added to sliding window flow control to allow for the retransmission of

the lost or the damaged frames:

​

o The sending device keeps copies of the transmitted frames until all of them have been

acknowledged

o In addition to ACK frames, receiver also has the option of NAK frames, if data has

been received damaged

o Because sliding window is a continuous TX mechanism, both ACK and NAK frames

must be numbered for identification

​

ACK frames carry the number of the next frame expected

• ACK 5 tells sender that all frames up to frame 5 are received

NAK frames carry the number of the damaged frame itself

• If data frames 4 and 5 are damaged, NAK 4 and NAK 5 must

be sent

o Like sender in stop-and wait ARQ, the sliding window ARQ is also equipped with a

timer in the sender to deal with lost ACKs

​

🙣 Go Back n ARQ

In Go Back n ARQ, if one frame is lost or damaged, all frames sent since last frame

acknowledged are retransmitted

Go Back n- Damaged Frame

​

🕘 Go Back n- Lost Data Frame

o Sliding window requires that data frames be transmitted sequentially

​

© Copyright Virtual University of Pakistan

200 of 244

​

CS601-Data Communication VU

​

o If one or more frames are so noise corrupted that they become lost in

transit, the next frame to arrive at the receiver will be out of sequence

​

🕘 Go Back n- Lost ACK

o When the window capacity is reached and all frames allowed have

been s nt, the sender starts a Timer

​

o If an ACK is not received before that Timer expires, sender retransmits

all the rames since the last ACK

​

🙣 Selective Reject ARQ

o In selective-reject ARQ, only the specific damaged or los frame is

retransmitted

o If a frame is corrupted in transit, a NAK is returned and the frame is resent out

of sequence

​

© Copyright Virtual University of Pakistan

201 of 244

​

CS601-Data Communication VU

​

o The R device must be able to sort frames and insert the retransmitted frame

into the proper place

​

The selective reject ARQ differs from Go Back n in the following ways:

o The Rx device must contain sorting logic to enable it to reorder frames

received out of sequence

o Sending device must contain a searching mechanism that allows it to

find and select only the requested frame for retransmission

o Selective Reject ARQ

o A buffer in the receiver must keep all previously received frames on

hold until all retransmissions have been stored

​

o To avoid selectivity, ACK number, like NAK numbers must refer to

frame received instead of next expected frame

o A smaller window size is required because of this added complexity

​

🕘 Selective Reject ARQ-Lost Frame

​

Lost ACK/NAK are treated exactly in the same way as by Go Back n

​

Selective Reject ARQ vs Go Back n

​

o

efficient than resending all the frames

​

© Copyright Virtual University of Pakistan

Although retransmitting only specific damaged or lost frames may seems more

202 of 244

​

CS601-Data Communication VU

​

o Because of the complexity of sorting and storage required by the receiver and

ex a logic needed by sender to select specific frames for retransmission, selective

reject ARQ is EXPENSIVE and not often used

o Selective reject gives better performance but in practice it is usually it is discarded

in favor of go-back-n for simplicity of implementation

​

Protocols

Protocol: Set f rules or conventions for executing a particular task

​

Protocol in Data Comm.: Set of rules or specifications used to implement one or more

layers of the OSI Model

​

Example: EIA 232-D interface is a protocol used at the physical layer in the OSI Model

Protocols

​

Data Link Protocols: Set of specifications used to implement the data link layer

​

Data link protocols contain rules for:

–Line Discipline

–Flow Control

–Error Control

​

Categories of Data Link Protocols

Data link protocols can be divided into two sub-groups:

​

Asynchronous Protocols: Treat each character in a Bit stream independently

​

Synchronous rotocols: Take the whole bit stream and chop it into characters of equal

Size

​

🕘 Asynchronous Protocols

Employed mainly in Modems

​

Inherent Slowness is a disadvantage: Requires addition of start and stop bits

and extended spaces b/w frames, so these are mainly replaced with High-speed

synchronous mechanisms

​

© Copyright Virtual University of Pakistan

203 of 244

​

CS601-Data Communication VU

​

Not Complex and Inexpensive to Implement

Transmission does not require timing coordination; Timing is done by using

extra bits

​

• Different Asynchronous Protocols

​

A variety of Asynchronous protocols have been developed

​

We will discuss some of the important ones

​

🖲 XMODEM

In 1979 Ward Christiansen designed a File transfer protocol for Telephone-line

communication b/w PCs called XMODEM

​

Half Duplex and Stop-and-Wait ARQ protocol

​

XMODEM

o The first field is a One Byte start of header (SOH) field

o The second field is a two-byte Header.

–The first header byte , the Sequence number carries the Frame number

–The second header byte is used to check the validity of the sequence number

​

o The fixed data field holds 128 bytes of data

o The last field CRC checks for errors in the data field only

​

Transmission in XMODEM

o TX begins with sending of a NAK frame from the receiver to the sender

o Each time, the sender sends a frame, it must wait for an ACK before sending next

frame

​

© Copyright Virtual University of Pakistan

204 of 244

​

CS601-Data Communication VU

​

o If NAK is received instead of ACK, the last frame is sent again

o A frame is also resent if no response arrives from a receiver after a fixed time period

o A sender can also receive cancel (CAN) to abort TX

​

Control Frames in XMODEM

​

Control frames from the receiver

–ACK: Acknowledgement

–NAK: Error or start of transmission

–CAN: Aborts the transmission

​

Summ

​

Control

​

–Sliding Window ARQ

•Go-back-n

•Selective Reject

⑩Data Link Protocols

​

Reading Sections

⑩Section 10.3, 11.1,

“Data Communications and Networking” 4th Edition by Behrouz A. Forouzan

​

© Copyright Virtual University of Pakistan

ary

​

–Stop-and-Wait ARQ

⑩Error

205 of 244

​

CS601-Data Communication VU

​

LECT URE #40

​

YMODEM

YMODEM is similar to X-MODEM with only the following major differences:

​

o 1024-Byte data unit

o Two CANs to abort Transmission

o ITU-T CRC-16 for Error Checking

o Multiple files can be sent simultaneously

​

ZMODEM

•Newer Protocol

•Combines features of

– XMODEM

and

– YMODEM

​

BLAST

o Blocked Asynchronous Transmission

o More powerful than XMODEM

o Full Duplex

o Sliding Window Flow Control

o Allows transfer of Data and Binary Files

​

KERMIT

o Designed at Columbia University

o Most Widely used Asynchronous Protocol

o File Transfer protocol is similar in operation to XMODEM, with sender waiting for an

NAK before it starts TX

o Kermit allows the transmission of control characters as Text

​

Synchronous Protocols

Speed of synchronous TX makes it a better choice over Asynchronous T for LAN, MAN

and WAN technology

​

Classes of Synchronous Protocols

Synchronous Protocols can be divided into two main classes:

​

© Copyright Virtual University of Pakistan

206 of 244

​

CS601-Data Communication VU

​

🕘 Character – Oriented Protocols

🕘 Bit – Oriented Protocols

​

Character – Oriented Protocols

​

o

o These protocols interpret a transmission frame or packet as a succession of characters,

each usually composed of one byte

o All control information is in the form of an existing character encoding system

​

Bit – Oriented Protocols

These protocols interpret a transmission frame or packet as a succession of

individual bits, made meaningful by their placement in the frame

Control information can be one or multiple bits depending on the information

embodied in the pattern

​

o Character –Oriented Protocols are not as efficient as bit – oriented protocols and are

seldom used

o They are easy to comprehend and employ the same logic as bit-oriented protocols

o Their study will provide the basis for studying the other data link layer protocols

o In all data link protocols, control information is inserted in the data frame as separate

control frames or as addition to existing data frames

o In character oriented protocols, this info is in the form of code words taken from

existing character sets such as ASCII

o IBN’s BSC is the best known character oriented protocol

​

Binary Synchronous Communication (BSC)

o Developed by IBM in 1964

o Usable in both point-to-point and multiple communications

o It supports half-duplex TX using stop-and-wait ARQ flow control

o Does not support full duplex TX or sliding window protocol

​

BSC FRAMES

​

•BSC protocol divides a transmission into frames

​

CONTROL FRAMES

o If a frame is used strictly for control purposes, it is called a Control fram

o Control frames are used to exchange information b/w communicating devices for

example, to establish the connection, to control the flow, to request error correction

etc

​

DATA FRAMES

​

© Copyright Virtual University of Pakistan

Also called Byte- Oriented Protocol

207 of 244

​

CS601-Data Communication VU

​

o If a frame contains part or all of the message itself, it is called a Data Frame

o Data frames are used to transmit information, but may also contain control

information applicable to that information

​

o Figure shows the format of a simple data frame

o Arrow shows the direct of TX

o The frame begins with two or more synch. (SYN) characters

o These characters alert the receiver to the arrival of a new frame and provide a bit

pattern used by the receiving device to synch itself with that of the sending device

o After the two synch characters, comes a start of text (STX) character

o This character signals to the receiver that the control information is ending and the

next byte will be data

o Data or text can consist of varying number of characters

o An end of text (ETX) indicates the end of text

o Finally, the Block Check Count (BCC) are included for error correction

o A BCC field can be a one-character LRC or a two –character CRC

​

Data Frame with Header

•A frame as simple as above is seldom used

•Usually we need to include the address of the receiving device, the address of the

sending device and the identity number of the frame (0 or 1) for stop-and-wait ARQ

​

o All the above information is included in a special field called Header

o Header begins with start of the header (SOH) character

o The header comes after the SYNs and before the STX character

o Everything received after the SOH field but before STX character is the Header

information

​

M ltiblock Frame

​

© Copyright Virtual University of Pakistan

208 of 244

​

CS601-Data Communication VU

​

The probability of an error in the block of text increases with the length of the frame

o The more bits in a frame, the more are the chances of an error

o For this reason, text in a message is often divided b/w several blocks

o Each block starts with STX and ends with ITB, intermediate text block except the last

one

o Last block ends with ETX character

o After the ETX has been reached, and the last BCC checked, the receiver sends a

single ACK for the entire frame

​

o

o Some messages may be too long to fit in a frame

​

o

o To let the Rx know that the end of frame is not the end of transmission, the ETX

character in all the frames but the last one is replaced by an End of Transmission

block (ETB)

​

o

​

Multi

Frames

​

Control Frames

o A control frame is used by one device to send commands to or to get information

from another device

o A control frame contains control characters but no data

o It carries information specific to the functioning of the data link layer itself

​

© Copyright Virtual University of Pakistan

The figure includes only 2 blocks but actual frames can have more than two

​

Several frames can carry continuation of a single message

​

The receiver must acknowledge each frame separately

209 of 244

​

CS601-Data Communication VU

​

Control frames serve 3 purposes:

​

– Establishing Connections

– Maintaining Flow and Error Control during Data Transmission

– Terminating Connection

​

Summary

⑩ ata Link Protocols

⑩ synchronous Protocols

⑩

​

Reading Sections

⑩Section11.1, 11.2

“Data Communications and Networking” 4th Edition by Behrouz A. Forouzan

​

© Copyright Virtual University of Pakistan

Synchronous Protocols

210 of 244

​

CS601-Data Communication VU

​

LECT URE #41

​

Bit-Oriented Protocols

o In character-oriented protocols, bits are grouped into predefined patterns forming

characters

o By comparison, bit-oriented protocols can pack more information into shorter frames

​

A lot of bit-oriented protocols have been developed over the years:

​

o One of these HDLC is the design of the ISO and has become the basis for all bit-

oriented protocols in use today

•In 1975, IBM gave Synchronous Data Link Control (SDLC)

•In 1979, ISO answered with High Level Data Link Control (HDLC)

​

o Since 1981, ITU-T has developed a series of protocols called Link Access Protocols

o LAPs: LAPB, LAPD, LAPM, LAPZ etc. all based on HDLC

​

HDLC is basis for all protocols, so we will study it in detail:

​

High Level Data Link Control (HDLC)

o Bit-oriented data link protocol designed for:

– Full Duplex and Half Duplex

– Point-to-point And Multipoint Links

​

Characterization of HDLC

HDLC can be characterized by:

–Station Types

–Configurations

–Response Modes

​

STATION TYPES (1)

HDLC differentiates b/w 3 types of stations:

– Primary Station

​

© Copyright Virtual University of Pakistan

211 of 244

​

CS601-Data Communication VU

​

– Secondary Station

– Combined Station

​

STATION TYPES (2)

​

Primary Station

o Primary station works in the same way as primary devices in the discussion of flow

control

o The primary is a device in point-to-point or multipoint line configuration that has

complete control of the link

​

STATION TYPES (3)

​

Secondary Station

o The primary sends commands to the secondary stations

o A primary issues commands and a secondary issues responses

​

STATION TYPES (4)

​

Combined Station

o A combined station can both command and respond

o A combined station is one of a set of connected peer devices programmed to behave

either as a primary or as a secondary depending on the nature and the direction of the

transmission

​

Configuration (1)

o Configuration refers to the relationship of the hardware devices on a link

o Primary , secondary and combined stations can be configured in three ways:

​

🕘 Unbalanced Configuration

🕘 Symmetrical Configuration

🕘 Balanced Configuration

​

Configuration (2)

Unbalanced Configuration

o Also called Master/Slave Configuration

o One device is a primary and others are secondary

o Unbalanced configuration can be point to point if only two devices are

involved

o Most of the times it is multipoint with one primary controlling several

secondaries

Configuration (3)

Symmetrical Configuration

o Each physical station on a link consists of two logical stations, one a primary

and the other a secondary

o Separate lines link the primary aspect of one physical station to the secondary

aspect of another physical station

​

© Copyright Virtual University of Pakistan

212 of 244

​

CS601-Data Communication VU

​

Configuration (4)

Balanced Configuration

o Both stations in a point-to-point topology are of combined type

o HDLC does not support balanced multipoint

Station Types & Configurations

​

Modes

o A mode in HDLC is the relationship b/w two devices involved in an exchange

o The mode describes who controls the link

o HDLC supports 3 modes of communication b/w stations:

–Normal Response Mode (NRM)

–Asynchronous Response Mode (ARM)

–Asynchronous Balanced Mode (ABM)

​

Normal Response Mode (NRM)

o Refers to the standard primary-secondary relationship

o Secondary device must have permission from primary device before transmitting

o Once permission has been granted, the secondary may initiate a response transmission

of one or more frames containing data

​

© Copyright Virtual University of Pakistan

213 of 244

​

CS601-Data Communication VU

​

Asynchronous Response Mode (ARM)

o A secondary may initiate a TX w/o permission from the primary whenever the

channel is idle

o ARM does not alter the primary secondary relationship in any other way

o All transmissions from the primary still go to the secondary and are then relayed to

the other devices

​

Asynchronous Balanced Mode (ABM)

o All stations are equal and therefore only combined stations connected in point-to-

point are used

o Either combined station may initiate TX with the other combined station w/o

permission

HDLC Frames

​

HDLC defines 3 types of Frames:

​

– Information Frames (I-Frames)

– Supervisory Frames (S-Frames)

– Unnumbered Frames(U-Frames)

​

I-Frames are used to transport user data and control information relating to user data

S-Frames are used only to transport control information

U-Frame are reserved for System Management

​

Each frame in HDLC may contain up to six fields

–A beginning Flag Field

–An address field

–A control field

–An information Field

–A frame check sequence (FCS)

–An ending Flag Field

​

© Copyright Virtual University of Pakistan

214 of 244

​

CS601-Data Communication VU

​

Flag Field

​

•The flag field of an HDLC frame is an 8-bit sequence with a bit patter 01111110 that

identifies both the beginning and the ending of the of a frame

•It serves as a Synchronization pattern for the receiver

•Fig. shows placement of 2 flag fields in an I-Frame

​

HDLC Address Field

​

o

​

that is either the originator or the destination of the frame

o If a primary station creates Frame it includes a ‘To’ address and if a secondary

creates the frame, it contains a ‘From’ address

o Can be of one byte or several bytes depending upon the network

o If the address field is only 1 byte, the last bit is always a 1

o If the address is of several bytes, all bytes but the last one will end with 0 , and the

last will end with a 1

o Ending each intermediate byte with 0 indicates to the receiver that there are more

address bytes to come

​

© Copyright Virtual University of Pakistan

The second field of HDLC frame contains the address of the secondary station

215 of 244

​

CS601-Data Communication VU

​

HDLC Control Field

​

o The control field is a one o two byte segment of the frame used for flow management

o The two byte case is called the Extended Mode

​

Control fields differ depending on the frame type:

– If the control field is a 0, the frame is an I-Frame

– If the first bit is 1 and the second bit is a 0 , it is S-Frame

– If both first and second bits are 1’s, it is U-Frame

​

o P/F bit is a single bit with dual purpose

o It has meaning only when it is ‘1’ and it can mean Poll or Final

o When the frame is sent by a primary to secondary, it means POLL

o When the frame is sent by a secondary to a primary, it is FINAL

​

HDLC Control Field –EXTENDED

​

o Control field in the I-Frame and S-Frame is two bytes long to allow seven bits of

sending and receiving sequence

o However the control field in the U-Frame is still one byte

​

© Copyright Virtual University of Pakistan

216 of 244

​

CS601-Data Communication VU

​

o Information field contains the user’s data in an I-Frame and Network Management

information in a U-Frame

o An S-Frame has no information field

o Its length can vary from one network to another but remains fixed within each

network

o It is possible to send Control information in the information field of the I-Frame along

with data.

o This process is called Piggybacking

​

o The FCS is HDLC’s error detection field

​

o

o It can contain a two- or four byte CRC

​

© Copyright Virtual University of Pakistan

217 of 244

​

CS601-Data Communication VU

​

Link Access Procedures

🕘 LAPB

–Link access procedure, balanced

​

🕘 LAPD

–Link access procedure for D- channel

​

🕘 LAPM

–Link access procedure for modems

​

Summary

⑩Synchronous Protocols

–Bit-Oriented Protocols

•HDLC

⑩Link Access Protocols (LAPs)

​

Reading Sections

⑩Section11.4, 11.5

“Data Communications and Networking” 4th Edition by Behrouz A. Forouzan

​

© Copyright Virtual University of Pakistan

218 of 244

​

CS601-Data Communication VU

​

LECT URE #42

​

Local Area Network

​

A local area network is a data communication system that allows a number of

independent devices to communicate directly with each other in a limited geographical

area

​

Architectures for LANS

Dominated by 4 architectures:

​

o Ethernet, Token Bus, Token Ring ⮴ Standards of IEEE and a part of its Project 802

o Fiber Distributed Data Interface (FDDI) ⮴ ANSI Standard

​

LAN compared with OSI

o In 1985, the computer society of IEEE started a project called PROJECT 802 to set

standards to enable intercommunication b/w equipment from a variety of

manufacturers

o This project does not seek to replace any part of the OSI Model

o Instead it is a way of specifying functions of physical layer , the data link layer and up

to some extent the network layer to allow for interconnectivity of major LAN

protocols

o The relationship of IEEE project 802 to the OSI Model is shown in the figure:

​

• FIGURE

​

o IEEE has divided the data link layer into two sub-layers:

Logical Link Control (LLC)

Medium Access Control (MAC)

​

o LLC is non-architecture specific i.e. it is the same for all IEEE-defined LANs

o The MAC sub layer on the other hand contains a number of distinct modules; each

carries proprietary info specific to the LAN product being used

o LAN compared with OSI -Figure

​

© Copyright Virtual University of Pakistan

219 of 244

​

CS601-Data Communication VU

​

o In addition to the two sub-layers , Project 802 contain a section governing

internetworking

o This section assures the compatibility of different LANs and MANs across protocols

and allows data to be exchanged across otherwise incompatible networks

​

PROJECT 802

o Strength of Project 802 is Modularity

o By subdividing the functions necessary for LAN management, the designers were

able to standardize those that can be generalized and isolate those that must remain

specific

​

•

​

🕘 IEEE 802.11

o Is the section of Project 802 devoted to internetworking issues in LANs and MANs

o Although not yet complete, it seek to resolve the incompatibilities b/w network

architectures w/o requiring modifications in existing addressing, access, and error

recovery mechanisms

​

🕘 LLC

In general, IEEE project 802 model takes the structure of an HDLC frame and divides

into two sets of functions:

One set contains the end-user portions of the frame: The logical address,

control information and data

These functions are handled by IEEE 802.2 LLC protocol

LLC is upper of data link layer and is common to all LAN protocols

​

🕘 MAC

o The second set of functions, the MAC sub-layer , resolves the contention for the

shared media

o It contains Synchronization Flag, Flow and Error control specifications as well as

the physical address of next station to receive & route a packet

​

© Copyright Virtual University of Pakistan

220 of 244

​

CS601-Data Communication VU

​

o MAC protocols are specific to LAN using them (Ethernet, Token Ring, Token

Bus etc)

o Protocol Data Unit (PDU)

o The data unit in the LLC level is called the Protocol Data unit (PDU)

o The PDU contains 4 fields familiar from HDLC:

–A destination service access point (DSAP)

–A source service access point (SSAP)

–A control field

–An Information field

​

Protocol Data Unit (PDU)

​

DSAP and SSAP

o The DSAP and SSAP are addresses used by LLC to identify the protocol stacks on the

receiving and sending machines that are generating and using data

o The first bit of the DSAP indicates whether the frame is intended for an individual or

a group

o The first bit of SSAP indicates whether the communication is a command or a

response PDU

​

CONTROL

o The control field of PDU is identical to the control field in HDLC.

o As in HDLC, PDU frames can be I-frames, S-frames, or U-Frames and carry all of the

codes and the information that the corresponding HDLC frame carry

​

•The PDU has no flag fields, no CRC, and no station address

•These fields are added in the lower sub-layer i.e. MAC Layer

​

© Copyright Virtual University of Pakistan

221 of 244

​

CS601-Data Communication VU

​

ETHERNET

IEEE 802.3 supports a LAN standard originally developed by Xerox and later extended

by a joint venture b/w Digital Equipment Corporation, Intel Corporation and Xerox

This is called ETHERNET

​

Categories of 802.3-Figure

​

•

​

IEEE 802.3 defines two categories:

–BASEBAND

–BROADBAND

​

The word “base” specifies a digital signal

The word “broad” specifies an analog signal

​

© Copyright Virtual University of Pakistan

222 of 244

​

CS601-Data Communication VU

​

IEEE divides the base band category into 5 standards:

–10 Base 5 , 10 Base 2, 10 Base-T, 1 Base 5, 100 Base-T

​

o The first number (10, 1, or 100) indicates the data rate in Mbps.

o The last number or letter (5, 2, 1, or T) indicates the maximum cable length or the

type of cable

o IEEE defines only one specification for the broadband category:

–10 Broad 36

o Again the first number (10) indicates the data rate.

o The last number defines the maximum cable length

o Max. cable length restriction can be changed using networking devices i.e. Repeaters

or Bridges

​

Access Method: CSMA/CD

• Multiple Access: Multiple users access to a single line

• Carrier Sense: A device listens to the line before it transmits

• Collision Detection: Extremely high voltage indicates a collision

​

Need for a Access Method

• Whenever multiple users have unregulated access to a single line, there is a danger of

signals overlapping and destroying each other

• Such overlaps which turn signals to Noise are called COLLISIONS

• As traffic increases on multiple-access link, so do collisions

• A LAN therefore needs a mechanism to coordinate traffic, minimize the number of

collisions and maximizes the number of frames that are delivered successfully

• The access mechanism used in Ethernet is called Carrier Sense Multiple Access

with Collision Detection (CSMA/CD)

•MA⮴ CSMA ⮴ CSMA/CD

​

🙣 CSMA/CD

o The original design was a multiple access method in which every workstation had

equal access to the link

o In multiple access, there was no provision for traffic coordination

o Access to the line was open to any node at any time

o Any device wishing to transmit sent its data and then relied on ACKs to know if it had

reached its destination

​

o In a CSMA system, any device wishing to transmit must first listen for existing traffic

on the line

o A device must listen by checking for voltage

o If no voltage is detected, the line is considered idle and the TX is initiated

o CSMA cuts down on the number of collisions but does not eliminate them

o If a system transmits after checking the line and another system transmits during this

small interval, collisions can still occur

o The final step is the addition of Collision Detection (CD)

o In CSMA/CD, the station wishing to transmit first listens to make certain the link is

free, then transmits its data, then listens again

​

© Copyright Virtual University of Pakistan

223 of 244

​

CS601-Data Communication VU

​

o During the data transmission, the station checks for the extremely high voltages that

indicate a collision

o If a collision is detected, the station quits the current TX and waits a predetermined

amount of time for the line to clear, then sends its data again

​

•

​

🕘 Addressing

o Each station on the Ethernet network such as a PC, workstation or printer has its own

Network Interface Card (NIC)

o The NIC usually fits inside the station and provides the station with a 6-byte physical

address

o The number on the NIC is unique

​

🕘 Data Rate

o Ethernet LANs can support data rates between 1 and 100 Mbps

​

Implementation

o In IEEE 802.3 standard, the IEEE defines types of cables, connections and signals that

are to be used in each of the five different Ethernet implementations

o Each frame is transmitted to every station on the link but read only by the station to

which it is addressed

​

10 Base 5: Thick Ethernet

o The first of the physical standards defined in IEEE 802.3 model is called 10 Base 5,

Thick Ethernet or Thicknet

o The name is derived from the size of the cable which is roughly the size of a garden

hose and cannot be bent with hands

o 10 Base 5 is a bus topology LAN that uses base band signaling and has a max.

segment length of 500 meters

​

© Copyright Virtual University of Pakistan

224 of 244

​

CS601-Data Communication VU

​

Size Limitations of 10 Base 5

o Networking devices such as Repeaters and Bridges are used to overcome the size

limitation of LAN

o In Thicknet, a LAN can be divided into segments by connecting devices

o In this case, the length of each segment is limited to 500 meters

o However to reduce collisions, the total length of the bus should not exceed 2500

meters (5 segments)

o Also the standard demands that each station be separated from each other 2.5 meters

o 200 stations per segment and 1000 stations total

​

•

​

Topology of 10 Base 5

The physical connectors and cables utilized by 10 base 5 include coaxial cable, Network

Interface Card, Transceivers and Attachment Unit Interface (AUI) cables

​

© Copyright Virtual University of Pakistan

225 of 244

​

CS601-Data Communication VU

​

🕘 RG-8 Cable

RG-8 cable (Radio Government) is a thick coaxial cable that provides the

backbone of IEEE 802.3 standard

​

🕘 TRANSCEIVER

Each station is attached by an AUI cable to an intermediary device called a

Medium Attachment Unit (MAU) or a Transceiver

Transceiver performs the CSMS/CD function of checking for voltages and

collisions on the line and may contain a small buffer

​

🕘 AUI Cables

Each station is linked to its corresponding transceiver by an AUI cable also called

the Transceiver cable

An AUI is a 15 wire cable with plug that performs the physical layer interface

functions b/w the station and the transceiver

An AUI has a max. Length of 50 meters and it terminates in a 15-pin DB- 15

connector

​

🕘 TRANSCEIVER TAP

Each transceiver contains a connecting mechanism called a TAP because it allows

the transceiver to tap into the line at any point

The TAP is a thick cable sized well with a metal spike in the center

​

© Copyright Virtual University of Pakistan

226 of 244

​

CS601-Data Communication VU

​

o The spike is attached to wires inside the transceiver

o When the cable is pressed into the well, the spike pierces the jacket and sheathing

layers and makes an electrical connection b/w the transceiver and the cables

o This kind of connector is often called a VAMPIRE TAP because it bites the cable

​

Summary

⑩Local Area Networks (LANs)

⑩Project 802

⑩Protocol Data Unit (PDU)

⑩Ethernet

​

Reading Sections

⑩Section12.1, 12.2

“Data Communications and Networking” 4th Edition by Behrouz A. Forouzan

​

© Copyright Virtual University of Pakistan

227 of 244

​

CS601-Data Communication VU

​

LECT URE #43

​

Ethernet

​

10 Base 2: Thin Ethernet

o The second Ethernet Implementation defined by IEEE 802 series is called 10 Base

2, Thin Ethernet, Thin net

o Also called Cheap net because it provides an inexpensive alternative to 10 Base 5

Ethernet, with the same data rate

o Like 10 Base 5, 10 Base 2 is a Bus Topology LAN

o 10 Base 2: Thin Ethernet

​

• The advantages of thin Ethernet are :

–reduced cost and

–ease of installation

Because the cable is lighter weight and more flexible than that used in Thicknet

​

• The disadvantages are:

–Short Range (185 m as opposed to 500 m)

–Smaller Capacity (thinner cable accommodates fewer stations)

​

🙣 Physical Topology of 10 base 2

o The connectors and cables utilized are: NICs, Thin coaxial cable and BNC-T

connectors

o In this technology, the transceiver circuitry is moved to the NIC, and

transceiver tap is replaced by connector that splices directly into the cable

o No AUI cables are needed

​

© Copyright Virtual University of Pakistan

228 of 244

​

CS601-Data Communication VU

​

🕘 NIC

o NICs in Thin Ethernet provide the same functionality as those in Thicknet plus the

functions of the Transceiver

o A 10 Base 2 NIC not only provides the station with an address but also checks for

voltages on the link

​

🕘 RG-58 Cable

o These cables are relatively easy to install and move around

o Especially inside the buildings where cable must be pulled through the walls and

the ceilings

​

🕘 BNC-T

The BNC-T connector is a T-shaped device with three ports:

–One for the NIC

–One each for the input and output ends of the cable

​

10 base T: Twisted Pair Ethernet

o Most popular standard defined in IEEE 802.3 series is 10 Base T also called Twisted

Pair Ethernet

o It is a Star topology LAN that uses Unshielded Twisted pair (UTP) cable instead of

coaxial cable

o It supports a data rate of 10 Mbps and has a maximum length of 100 meters

​

© Copyright Virtual University of Pakistan

229 of 244

​

CS601-Data Communication VU

​

o Instead of individual transceivers, 10 Base T Ethernet places all of its networking

operations in an intelligent Hub with a port for each station

o Stations are linked into the hub by four pair RJ-45 cable terminating at each end in a

male-type connector much like a Telephone jack

o The hub fans out any transmitted frame to all of its connected stations

o Each station contains a NIC

o A 4-pair UTP of not more than 100 meters connects the NIC to the appropriate port in

10 Base T Hub

o The weight & flexibility of the cable and the convenience of RJ-45 jack and plug

makes it the easiest to install and reinstall

​

1 Base 5: STAR LAN

o Star LAN is infrequently used nowadays because of its slow speed of approx. 1Mbps

o Range can be increased by DAISY CHAINING

o Like 10 Base T, Star LAN uses Twisted pair cable to connect stations to a central hub

o Star LAN allows 10 devices to be linked with only the lead device connected to the

hub

​

Switched Ethernet

o An attempt to improve the performance of 10BASE-T

o N ×10 Mbps with N devices

​

© Copyright Virtual University of Pakistan

230 of 244

​

CS601-Data Communication VU

​

Fast Ethernet

o Data rate can be increased by decreasing the collision domain

o If 10 Mbps ⇒ 100 Mbps, then

– 2500 m ⇒ 250 m

​

© Copyright Virtual University of Pakistan

231 of 244

​

CS601-Data Communication VU

​

🙣 100 Base-TX and 100 Base-FX

​

🙣 100 Base-T4

​

© Copyright Virtual University of Pakistan

232 of 244

​

CS601-Data Communication VU

​

Gigabit Ethernet

o Usually serves as a backbone

o Four implementations

–1000Base-SX, 1000Base-LX: Optical fiber, 550-5000 m

–1000Base-CX (STP), 1000Base-T (UTP): 25 m

​

Token Bus

o Other LANs are not suitable for this purpose

o Token Bus has no commercial application in data communications

o Token Ring allows each station to send one frame per turn

o Access method: Token passing

​

Summary

⑩Ethernet

–Implementations

⑩Other Ethernet Networks

⑩Token Bus/Ring

​

Reading Sections

⑩Section 12.2, 12.3, 12.4, 12.5

“Data Communications and Networking” 4th Edition by Behrouz A. Forouzan

​

© Copyright Virtual University of Pakistan

233 of 244

​

CS601-Data Communication VU

​

LECT URE #44

​

Token Ring

​

o Token Ring allows each station to send one frame per turn

o Access method: Token passing

​

Access Control of Token Ring

🕘 Priority and reservation

–Each station has a priority code

🕘 Time limits

–Token Ring imposes a time limit to keep traffic moving

​

🙣 Monitor Stations

o One station is designated as a monitor station to handle several problems

o Monitor station generates a new token when it is lost

o Monitor station removes recirculating data frames

​

Token Ring Frame

​

© Copyright Virtual University of Pakistan

234 of 244

​

CS601-Data Communication VU

​

Data Frame Fields

​

Implementation

o Each station in the Token Ring regenerates the frame

o One disabled or disconnected node could stop the traffic flow around the entire

network

–Each station is connected to an automatic switch

​

© Copyright Virtual University of Pakistan

235 of 244

​

CS601-Data Communication VU

​

Token Ring Switch

​

🕘 Multi station Access Unit (MAU)

o Individual automatic switches are combined in to a hub

o One MAU can support up to 8 stations

o Although it looks like a star, it is in fact a ring

​

© Copyright Virtual University of Pakistan

236 of 244

​

CS601-Data Communication VU

​

🙣 FDDI

​

o Fiber Distributed Data Interface standardized by ANSI and the ITU-T

o 100 Mbps LAN protocol

o CDDI: Copper version of FDDI

o Access method: Token passing

​

🕘 FDDI Time Registers

​

Time registers

–Values are set when the ring is initialized and do not vary

–SA (Synchronous Allocation)

–TTRT (Target Token Rotation Time)

–AMT (Absolute Maximum Time)

​

🕘 FDDI Timers

​

Timers

–Each station contains two timers

–TRT (Token Rotation Timer) : Incrementing

–THT (Token Holding Timer) : Decrementing

​

© Copyright Virtual University of Pakistan

237 of 244

​

CS601-Data Communication VU

​

Station Procedure

​

Station Procedure

o THT is set to the difference between TTRT and TRT

o THT = TTRT - TRT

o TRT is reset to zero (TRT = 0)

o The station sends S-frames during the time in SA

o The station sends A-frames as long as THT ≥ 0

o Release the token

​

Dual Ring (Figure-1)

​

© Copyright Virtual University of Pakistan

238 of 244

​

CS601-Data Communication VU

​

Dual Ring (Figure-2)

​

Summary

⑩Token Ring

⑩FDDI

​

Reading Sections

⑩Section 12.5, 12.6, 12.7

“Data Communications and Networking” 4th Edition by Behrouz A. Forouzan

​

© Copyright Virtual University of Pakistan

239 of 244

​

CS601-Data Communication VU

​

LECT URE #45

​

Internet

o An internet is a generic term used to mean an interconnection of individual networks

o To create an internet, we need networking devices called routers and gateways

o An internet is different from the Internet

o Internet is the name of a specific worldwide network

​

Connecting devices (Figure-1)

​

Connecting devices (Figure-2)

​

© Copyright Virtual University of Pakistan

240 of 244

​

CS601-Data Communication VU

​

Repeaters

​

o A repeater allows us to extend only the physical length of a network

o Repeater is a regenerator, not an amplifier

Repeaters (Figure-2)

​

Repeaters (Figure-3)

​

© Copyright Virtual University of Pakistan

Repeaters (Figure-1)

241 of 244

​

CS601-Data Communication VU

​

Bridges

​

o Bridges can divide a large network into smaller segments

​

When a frame enters a bridge, the bridge:

​

© Copyright Virtual University of Pakistan

242 of 244

​

CS601-Data Communication VU

​

–not only regenerates the signal

–but check the address of the destination and forwards the new copy only to the

segment to which the address belongs

​

Routers

​

Routers relay packets among multiple interconnection networks

​

© Copyright Virtual University of Pakistan

243 of 244

​

CS601-Data Communication VU

​

TCP/IP

o Transmission Control Protocol/ Internet Protocol

o 1969

o ARPA(Advanced Research Project Agency) net

​

© Copyright Virtual University of Pakistan

244 of 244

​

CS601-Data Communication VU

​

TCP/IP and OSI

​

TCP/IP Protocols

🙣 Network Layer

–IP (Internetworking Protocol )

–ARP(Address Resolution Protocol)

–RARP(Reverse Address Resolution Protocol)

–ICMP(Internet Control Message Protocol)

–IGMP(Internet Group Message Protocol)

​

🙣 Transport Layer

–TCP (Transmission Control Protocol)

​

Summary

​

⑩Internet work

⑩Connecting Devices

–Repeaters

–Bridges

–Routers

⑩TCP/IP Protocol Suite

​

Reading Sections

⑩Section 21.1, 21.2, 21.3, 24.1, 24.2,

“Data Communications and Networking” 4th Edition by Behrouz A. Forouzan

​

© Copyright Virtual University of Pakistan