module i final
TRANSCRIPT
COMPUTER NETWORKS
Department of Computer Science Engineering & Application
Lecture NotesModule I
Computer Networking / Module I / TCM / 2
Out Line of Module I
Overview of Data Communications and Networking Physical Layer
Digital Transmission Analog Transmission Multiplexing Transmission Media Circuit switching and Telephone Network
Text: “Data Communications and Networking” 4th Edition, Behrouz A Forcuzan, Tata Mc Graw-Hill.Chapter 1 - Chapter 7
Computer Networking / Module I / TCM / 3
Overview of Data Communications Overview of Data Communications and Networkingand Networking
Lecture ILecture I
• Data CommunicationData Communication• Networks & InternetNetworks & Internet• Protocols & StandardsProtocols & Standards• Layered TasksLayered Tasks• Internet ModelInternet Model• OSI ModelOSI Model
Computer Networking / Module I / TCM / 4
Data Communication Sharing of information is “Data
Communication” Sharing can be local (face to face) Remote (over a distance)
“Data” refers to facts, concepts and / or instructions In the context of computers, data represented in
the form of 0’s and 1’s “Data Communication” is “Exchange of data
between two/more devices via a transmission medium.
Computer Networking / Module I / TCM / 5
Characteristics of Data Communication
Delivery: system must deliver data to correct destination
Accuracy: Accurate data should be delivered Timeliness: Data delivered late are useless
Computer Networking / Module I / TCM / 6
Components of Data Communication
Message: It is the Information (data) to be communicated (shared) with others
Sender: The device that sends the message Receiver: The device that receives the message Medium: Physical path by which a message
travels from sender to receiver Protocol: A set of rules that governs the data
communication
Computer Networking / Module I / TCM / 7
Direction of Data Flow Communication can be simplex, Half-
duplex, or full-duplex. Simplex:
communication is unidirectional
Half-duplex: bi-directional but not at the same time
Full-duplex: bi-directional and simultaneously.
Any real life examples?
Computer Networking / Module I / TCM / 8
Computer Networks Interconnection of ‘Intelligent devices’ is called
a ‘computer network’ Network Criteria: to design an effective and
efficient network the most important criteria are ‘Performance’ depends on
No of users: large no of users may slow down the ‘response time’ due to heavy traffic
Type of transmission medium: defines the speed at which the data can travel (speed of light is the upper bound)
Hardware: A high-speed computer with greater storage provides better performance
Software: efficient mechanisms to transform raw data into transmittable signal, to route the signals, to ensure error-free delivery etc.
Computer Networking / Module I / TCM / 9
Network Criteria Reliability depends on
Frequency of failure: all networks fail occasionally
Recovery time: how long does it takes to restore the service
Security depends on Unauthorized access should be prevented Should be protected from viruses, spy
wares, etc.
Computer Networking / Module I / TCM / 10
Physical Structure It refers to the way two or more devices
are attached to a link Point-to-Point: provides a dedicated
link between two devices. i.e. entire capacity of the link is reserved for transmission between those two devices
Multi-point: In this configuration more than two devices share the same link
If several devices can use the link at same time.
Computer Networking / Module I / TCM / 11
Topology Topology of a network is the geometric
representation of the links and nodes of a physical network.
ETC.
Computer Networking / Module I / TCM / 12
Mesh Topology Every device has a dedicated
point-to-point link to every other device
A fully connected mesh network has n(n-1)/2 links ( nC2
)
Every device required to have at least n-1 I/O ports
Eliminates traffic problem as links are not shared It is robust as breaking one link couldn't disturb the
network completely Privacy/security is maintained Installation and reconfiguration is difficult due to complicated connections Expensive in terms of cost and space Very Difficult to add/remove a device
Computer Networking / Module I / TCM / 13
Star Topology Each computer has a point-
point link only to a central controller called the HUB
HUB acts as an exchange to send data from one device to another
Less expensive than mesh It is robust as one link failure causes that device to go out of the network and it does not affect others Easy fault finding when one device sending data to another device, all other devices have to be idle however, a switch in place of hub can eliminate this problem
Computer Networking / Module I / TCM / 14
Bus Topology Multi-point One long cable acts as a
backbone to link all the devices
There is a limit on the no of drop lines (tapes) as in each tape some energy is lost
Installation is easy It uses less cabling than star or mesh difficult reconnection and fault finding Adding new device may require modification/replacement of the backbone otherwise the performance will be degraded Fault in bus stops all transmission, the damaged area reflects signal back in the direction of origin, creating noise in both directions
Computer Networking / Module I / TCM / 15
Ring Topology Point-to-point Each device is linked
only to its immediate neighbours
To add or remove a device requires moving two connections only
Each device in the ring has a repeater to regenerate a signal before passing to neighbour. Easy to install and reconfiguration Maximum ring length and no of devices are fixed failure of one device causes network failure if not bypassed unidirectional data traffic
Computer Networking / Module I / TCM / 16
Category of networks The networks may be categorized
according to its size, ownership, distance it covers and its physical architecture.
Computer Networking / Module I / TCM / 17
Local Area Network(LAN) LAN is a privately owned
networks within a single building or campus
Size is restricted? (10m-1KM) Common LAN topologies are
bus, ring, star
Speed is high (100Mbps – 1 Gbps) These are designed to share resources (hardware/software) between personal computers or workstations the size is restricted as the H/w will not work correctly over wires that exceed the bound as electrical signal becomes weaker over distance due to resistance.
Computer Networking / Module I / TCM / 18
Figure 1.13 LAN (Continued)
Example: LAN of an organisation
Computer Networking / Module I / TCM / 19
Metropolitan Area Network(MAN) MAN is designed to
extend over an entire city It may be either
private(cable TV, Bank ATMs), or public (Telephone)
May be a single network like cable TV or may be a means of connecting a number of LANs into a larger network so that the resources may be shared It forms the basic long distance connection in a large network & technologies that provide high speed digital access to individual homes & business Also sometimes called the access network, as it provides access to various services, say cable TV, Internet etc.
Computer Networking / Module I / TCM / 20
Wide Area Network(WAN)
It utilizes public, leased or private communication devices The end systems are connected to subnets, which are intelligent entities and contains communication channels and routers A WAN wholly owned by a single company is called an ‘enterprise network ‘ speed is less than LANs
WAN provides long distance transmission of data, voice, image, and video information over large geographical areas that may comprise a country, a continent or even the whole world
Computer Networking / Module I / TCM / 21
A metropolitan area network based on cable TV.
Computer Networking / Module I / TCM / 22
Defining A Protocol
A Protocol defines the format and the order of messages exchanged between two or more communicating entities, as well as the actions taken on the transmission and/or receipt of a message of other event.
. . . J. F. Kurose
Computer Networking / Module I / TCM / 23
Protocols contd. A protocol defines what is communicated,
How it is communicated, when it is communicated
The key elements of a protocol are Syntax: refers to structure or format of data,
i.e. the order in which they are presentedExample: a date Semantics: refers to structure meaning of each
section Timing: refers to two characteristics. i. When
data should be sent. ii. How fast they can be sent
Depends on link availability, and speed of receiver
day Yearmonth8 8 16
Computer Networking / Module I / TCM / 24
Standards The standard provides a model for development
that makes it possible for a product to work regardless of the individual manufacturer Example: A steering wheel of a car from one make
may not feet into other make Standards are essential in creating and
maintaining an open and competitive market and guarantees international inter-operability
Two categories of standards De Facto: that have just happened without any
formal plan De Jure: are formal, legal standards adopted by some
authorized or officially recognized body
Computer Networking / Module I / TCM / 25
Standards Organizations Standards Creation Committees
International Standards Organization (ISO) International Telecommunications Union-Telecommunication standards
(ITU-T) American National Standards Institute (ANSI) Institute of Electrical and Electronics Engineers (IEEE) Electronic Industries Association (EIA)
Forums The forums work with universities and users to test, evaluate and the
conclusion is presented to standard bodies to standardize new technologies
Regulatory Agencies Govt. agencies responsible for protecting the public interest.
Internet Standards Internet draft is a working document with no official status and a 6
month life time. If recommended by IETF then a draft may be published as a Request for
Comment (RFC)
Computer Networking / Module I / TCM / 26
Layered Tasks The service that we expect from a Computer Network are
much more complex than just sending a signal from one device to another.
To solve a complex problem we apply the strategy “Divide and Rule”. i.e. the main problem is divided into some small tasks/ levels of reduced complexity and then handled individually.
In other words Each level is responsible to solve a more focused problem of the original problem is a called layer in network terminology.
Each layer observes a different level of abstraction and performs some well defined functions.
Each layer uses the service of the layer below below it and each layer provides service to its upper layer.
There exists an interface between each pair of adjacent layers that defines the information and services a layer must provide to the adjacent layer.
Computer Networking / Module I / TCM / 27
Example: Sending a letter
Computer Networking / Module I / TCM / 28
Example: The philosopher-translator-secretary architecture.
Computer Networking / Module I / TCM / 29
The Internet model The layered protocol stack that is
used in practice is a five ordered layer Internet model, also called TCP/IP protocol suite
The responsibility of each layer is well defined and focused
Each end user device engaged in communication must have these layers in it (in form of HW or SW)
An intermediate device may not have all the layers but at least first two/three layers
Layer x on one device communicates with layer x of other device.
The processes on each machine that communicate at a given layer are called peer-to-peer processes.
Computer Networking / Module I / TCM / 30
Peer-to-peer processes
Computer Networking / Module I / TCM / 31
An exchange using the Internet model
Computer Networking / Module I / TCM / 32
Physical layer The responsibility of physical layer is to coordinate the
functions required to transmit a bit stream over a physical medium
The duties are Defines the characteristics of the interface between devices and
transmission medium Type of transmission medium, topology, etc…
Representation of bits Encoding, voltage level, duration etc…
Data rate Synchronization of bits
Sender’s and receiver’s clock shynchronization
Computer Networking / Module I / TCM / 33
Data link layer
is responsible for transmitting frames from one node to the next
The duties are Framing
Stream of bits received from upper layer is divided into manageable data units(?) called frame
Physical addressing Adds the address of sender and receiver in the header
Flow control This mechanism helps to prevents overflow at receiving side
Error control Mechanism to detect/correct errors in transmission
Access Control Which device has the control over the link at a given time
Computer Networking / Module I / TCM / 34
Datalink layer contd. Physical addressing and hop-hop delivery
can be done in one network only
If the message is to be passed across the network then network layer functionality is required.
Computer Networking / Module I / TCM / 35
Network Layer The network layer is responsible for the delivery of packets
from the original source to the final destination possibly across multiple networks.
The Duties are Logical addressing
It adds logical addresses into the packet header Routing
Forwarding the packet towards the destination
Computer Networking / Module I / TCM / 36
Source-to-Destination
Computer Networking / Module I / TCM / 37
An Example
sending from a node with network address A and physical address 10 to a node with a network address P and physical address 95
Because the two devices are located on different networks, we cannot use physical addresses only;as the physical addresses only have local jurisdiction.
What we need here are universal addresses that can pass through the LAN boundaries. The network (logical) addresses have this characteristic.
Computer Networking / Module I / TCM / 38
Transport layer The transport layer is responsible for delivery of a message
from one process to another. The Duties
Port addressing Actual transmission occurs from a specific process on one device to a
process of another. Port address (an integer) defines the process/application in a device
Segmentation and reassembly Message received from application layer is divided in to transmittable
segments containing sequence nos
Computer Networking / Module I / TCM / 39
Transport layer contd. Connection control
Two types of connection service is allowed Connection oriented: establish the connection, use the connection, release
the connection. (guarantee of delivery) Example: telephone
Connection less: each message carries the destination address and routed through the system
Example: postal service
Flow Control Responsible for end-to-end flow control as well as
intermediate flow control (congestion) Error Control
End-to-end error control
Computer Networking / Module I / TCM / 40
Application layer
The application layer is responsible for providing services to the user. It provides user interfaces and support
services such as email, remote file transfer, remote logins etc…
Computer Networking / Module I / TCM / 41
Summary of duties
Computer Networking / Module I / TCM / 42
OSI model
Session Layer is the network dialog controller, It establishes maintains and synchronizes the interaction between communicating systems
Duties are Dialog control Synchronization at data level
Presentation layer is concerned with syntax and semantics of the information exchanged between two systems
Duties are Translation: converting to bit streams Encryption: to ensure privacy Compression: increases virtual BW
Computer Networking / Module I / TCM / 43
The Physical LayerThe Physical Layer
Lecture IILecture II
• SignalsSignals• Digital TransmissionDigital Transmission• Analog TransmissionAnalog Transmission• MultiplexingMultiplexing• Transmission MediaTransmission Media
Computer Networking / Module I / TCM / 44
Position of the physical layer
Computer Networking / Module I / TCM / 45
Signals Information is transmitted in the form of
electromagnetic signals Signals are of two types
Analog Signal is a continuous signal in which the signal intensity varies smoothly over time
Digital Signal is a discrete signal in which the signal intensity maintains a constant level for some period and then changes to another constant level.
Analog Data: human voice, Digital data: data stored in a computer
Computer Networking / Module I / TCM / 46
Periodic / Aperiodic Signals
Periodic Signal: A signal completes a pattern within a measurable time frame (period)
The completion of one full pattern is called a cycle. The period is constant for any given periodic signal
Aperiodic Signal: Changes without exhibiting a pattern
In data communication, we commonly use periodic and analog signals and aperiodic digital signals
Aperiodic SignalPeriodic Signal
Computer Networking / Module I / TCM / 47
Analog Signals
The sine wave is the most fundamental form of a periodic signal
Represented as s(t)=Asin(2ft+) Characteristics
Amplitude: intensity of signal at any given time
Frequency: no of cycles/periods in one second, measured in Hz
Frequency = 1/Period Phase: describes the position of the
waveform relative to time zero A complete cycle is 360o = 2
Computer Networking / Module I / TCM / 48
Amplitude Period and frequency
Computer Networking / Module I / TCM / 49
Time and frequency domains
A signal can also be represented in frequency domain
Computer Networking / Module I / TCM / 50
Composite signals A single-frequency sine wave is not useful in
data communications; we need to change one or more of its characteristics to make it useful.
When we change one or more characteristics When we change one or more characteristics of a single-frequency signal, it becomes a of a single-frequency signal, it becomes a composite signal made of many frequencies.composite signal made of many frequencies.
A composite signal is composed of multiple A composite signal is composed of multiple sine waves called sine waves called harmonicsharmonics
Computer Networking / Module I / TCM / 51
Example : A Square wave
According to Fourier analysis, this signal can be decomposed in to a series of sine waves i.e.
f is called fundamental frequency 3f is third harmonic, and 5f 5th harmonic To recreate the complete square wave
requires all the odd harmonics upto infinity
...])5(2sin[5
4])3(2sin[
3
42sin
4)( tf
Atf
Aft
Ats
Computer Networking / Module I / TCM / 52
Three harmonics
Computer Networking / Module I / TCM / 53
Frequency spectrum
The Signal using the frequency domain and containing all its components is called the frequency spectrum of that signal The range of frequencies that a medium can pass is called its Bandwidth
The bandwidth is a property of a medium: It is the difference between the highest and the lowest frequencies that the medium can satisfactorily pass.
Computer Networking / Module I / TCM / 54
Example Example
A signal has a spectrum with frequencies between 1000 and 2000 Hz (bandwidth of 1000 Hz). A medium can pass frequencies from 3000 to 4000 Hz (a bandwidth of 1000 Hz). Can this signal faithfully pass through this medium?
SolutionSolution
The answer is definitely no. Although the signal can have the The answer is definitely no. Although the signal can have the same bandwidth (1000 Hz), the range does not overlap. The same bandwidth (1000 Hz), the range does not overlap. The medium can only pass the frequencies between 3000 and 4000 medium can only pass the frequencies between 3000 and 4000 Hz; the signal is totally lost.Hz; the signal is totally lost.
Computer Networking / Module I / TCM / 55
Digital Signals Digital signals can be better described by two terms
Bit interval: time required to send a single bit Bit rate: number of bit intervals in one second
A digital signal is a composite signal having an infinite number of frequencies i.e. infinite bandwidth
The digital BW is bits per sec (bps)
Computer Networking / Module I / TCM / 56
Analog vs Digital
• Channels or links are of two types
• low-pass: lower limit is zero and upper limit is any frequency ()
• band-pass: has a band width with frequencies f1and f2
A digital signal theoretically needs a BW between o and
if the upper limit will be relaxed than digital transmission can use a low-pass channel
An analog signal has a narrower BW with frequencies f1and f2
Also BW of analog signal can be shifted, i.e. f1and f2 can be shifted to f3 and f4
Analog signal can use a band-pass channel
Computer Networking / Module I / TCM / 57
Data rate limits Data rate depends on
The BW available The levels of signal that can be used The quality of channel (i.e. the level of noise)
Nyquist Bit rate: noise less channel Bit rate= 2 BW lg L For a noise less channel the nyquist bit rate defines the
theoretical maximum bit rate BW: band width of channel, L: no of signal levels used
to represent data Shannon Capacity: noisy channel
Capacity = BW lg (1+SNR) The signal-to-noise ratio is the statistical ratio of power
of the signal to the power of the noise
Computer Networking / Module I / TCM / 58
ExampleExample
We have a channel with a 1 MHz bandwidth. The SNR for this channel is 63; what is the appropriate bit rate and signal level?
SolutionSolution
C = B logC = B log22 (1 + SNR) = 10 (1 + SNR) = 1066 log log22 (1 + 63) = 10 (1 + 63) = 1066 log log22 (64) = 6 Mbps (64) = 6 Mbps
Then we use the Nyquist formula to find the number of signal levels.
4 Mbps = 2 4 Mbps = 2 1 MHz 1 MHz log log22 LL L = 4 L = 4
First, we use the Shannon formula to find our upper limit.First, we use the Shannon formula to find our upper limit.
Computer Networking / Module I / TCM / 59
Transmission Impairment In practice the signal sent at sending end
using a transmission medium is not exactly same at receiving end due to some impairments Attenuation: loss of energy
Decibel: is the unit to measure the relative strength of two signals
dB = 10 log (P2/P1) It is negative if attenuated and +ve if amplified
Computer Networking / Module I / TCM / 60
Distortion Signal changes its forms at the receiving end It is normally happens in case of composite
signals As each signal component has its own
propagation speed thus received out of phase
Computer Networking / Module I / TCM / 61
Noise Several types of noise such as
thermal noise: random motion of electrons in a wire
induced noise: sources such as motors and elecrical appliances
cross talk: effect of one wire over the other impulse noise: is a spike may corrupt the original
signal that comes from power lines and lightning
Computer Networking / Module I / TCM / 62
Signal-to-Noise-Ratio SNR=avg.signal power avg.noise power
Computer Networking / Module I / TCM / 63
More terminologies
Throughput: number of bits passed per second at a given point
Propagation Delay: the time required for a bit to travel from one point to another
Wavelength: is the distance a signal can travel in
= c / f
Computer Networking / Module I / TCM / 64
Digital Transmission
Line codingBlock CodingSamplingTransmission Mode
Computer Networking / Module I / TCM / 65
What is Line Coding? Is the process of converting binary data
(a sequence of bits) to a digital signal
Computer Networking / Module I / TCM / 66
Signal Level versus Data Level No of values allowed in a signal No of values used to represent data
Computer Networking / Module I / TCM / 67
DC Component A component having zero frequency
Can’t be passed through a transformer Energy consumed is useless
Computer Networking / Module I / TCM / 68
Pulse Rate versus Bit Rate No of pulses per second
Minimum amount of time required to transmit a symbol
No of Bits per second If a pulse carries one bit then pulse rate and bit rate
are same
Example
A signal has two data levels with a pulse duration of 1 ms. We calculate the pulse rate and bit rate as follows:
Pulse Rate = 1/ 10Pulse Rate = 1/ 10-3-3= 1000 pulses/s= 1000 pulses/s
Bit Rate = Pulse Rate x logBit Rate = Pulse Rate x log22 L = 1000 x log L = 1000 x log22 2 = 1000 bps 2 = 1000 bps
Computer Networking / Module I / TCM / 69
No Synchronization: if receivers clock is faster
A Signal that includes timing information along with data is called a self-synchronizing signal i.e. transitions in the signal alerts the receiver to
reset the clock
Self Synchronization
Computer Networking / Module I / TCM / 70
ExampleExample
In a digital transmission, the receiver clock is 0.1 percent faster than the sender clock. How many extra bits per second does the receiver receive if the data rate is 1 Kbps? How many if the data rate is 1 Mbps?
SolutionSolution
At 1 Kbps:1000 bits sent 1001 bits received1 extra bpsAt 1 Mbps: 1,000,000 bits sent 1,001,000 bits received1000 extra bps
Computer Networking / Module I / TCM / 71
Line Coding Schemes
Computer Networking / Module I / TCM / 72
Unipolar encoding uses only one voltage level.
Note:Note:
UniPolar Encoding
Computer Networking / Module I / TCM / 73
Unipolar Encoding One is coded as +ve voltage Zero is coded as –ve voltage
Computer Networking / Module I / TCM / 74
Polar encoding uses two voltage levels Polar encoding uses two voltage levels (positive and negative).(positive and negative).
Note:Note:
Polar Encoding
Computer Networking / Module I / TCM / 75
Polar Encoding Avarage voltage level is decreased DC component problem is avoided Four Important type of polar encoding
are:
There are many others also!
Computer Networking / Module I / TCM / 76
In NRZ-L the level of the signal is In NRZ-L the level of the signal is dependent upon the state of the bit.dependent upon the state of the bit.
Note:Note:
NRZ-L Encoding
Computer Networking / Module I / TCM / 77
In NRZ-I the signal is inverted if a 1 is In NRZ-I the signal is inverted if a 1 is encountered.encountered.
Note:Note:
NRZ-I Encoding
Computer Networking / Module I / TCM / 78
NRZ Encoding
Loss of synchronization incase of continuous ones or zeros
Computer Networking / Module I / TCM / 79
RZ uses three values i.e. +ve, zero & -veRZ uses three values i.e. +ve, zero & -ve
Signal change occurs during each bitSignal change occurs during each bit
Note:Note:
RZ Encoding
Computer Networking / Module I / TCM / 80
RZ Encoding
A +ve voltage means 1 and –ve voltage means zero.
But signal returns to zero at mid of the bit interval
Computer Networking / Module I / TCM / 81
RZ is a good encoded digital signal that contain RZ is a good encoded digital signal that contain a provision for synchronization.a provision for synchronization.
But it requires two signal changes to encode 1 But it requires two signal changes to encode 1 bit bit moremore bandwidth! bandwidth!
Note:Note:
RZ Encoding
Computer Networking / Module I / TCM / 82
In Manchester encoding, the transition at In Manchester encoding, the transition at the middle of the bit is used for both the middle of the bit is used for both
synchronization and bit representation.synchronization and bit representation.
Note:Note:
Manchester Encoding
Computer Networking / Module I / TCM / 83
Manchester Encoding
It achieves the synchronization but with two levels of amplitude
Datarate(R) = 1/tb , tb: bit duration in seconds Modulation rate (D) = R/b, b: no of bits per signal
element
Computer Networking / Module I / TCM / 84
In differential Manchester encoding, the In differential Manchester encoding, the transition at the middle of the bit is used transition at the middle of the bit is used
only for synchronization. only for synchronization. The bit representation is defined by the The bit representation is defined by the
inversion or noninversion at the inversion or noninversion at the beginning of the bit.beginning of the bit.
Note:Note:
Diff-Manchester Encoding
Computer Networking / Module I / TCM / 85
Diff-Manchester Encoding
Manchester Encoding used for 802.3 base band – CSMA/CD Lans
Diff-Manchester is used foe 802.5 token ring LAn
Computer Networking / Module I / TCM / 86
In bipolar encoding, we use three levels: In bipolar encoding, we use three levels: positive, zero, positive, zero, and negative.and negative.
Note:Note:
Bipolar Encoding
Computer Networking / Module I / TCM / 87
Bipolar Encoding AMI(alternate mark inversion)
Computer Networking / Module I / TCM / 88
Multilevel scheme2B1Q Encoding Two Binary One Quaternary Each pulse represents 2 bits
-1
-3
Computer Networking / Module I / TCM / 89
MLT-3 Encoding Multi transmission, three level (MLT-3) The signal transition from one level to the
next at the beginning of a 1 bit
Computer Networking / Module I / TCM / 90
To ensure synchronization some redundant bits may be introduced
Steps in Transformation Division Substitution Line Coding
Block Coding
Computer Networking / Module I / TCM / 91
Block Coding
Computer Networking / Module I / TCM / 92
Substitution
Computer Networking / Module I / TCM / 93
4B/5B Encoding Each 4-bit ‘pattern' of received data has
an extra 5th bit . If input data is dealt with in 4-bit patterns
there are 24 = 16 different bit patterns. With 5-bit ‘pattern' there are 25 = 32 different bit patterns.
As a result, the 5-bit patterns can always have two '1's in them even if the data is all '0's a translation.
This enables clock synchronizations required for reliable data transfer.
Computer Networking / Module I / TCM / 94
Data Code Data Code
0000 1111011110 1000 1001010010
0001 0100101001 1001 1001110011
0010 1010010100 1010 1011010110
0011 1010110101 1011 1011110111
0100 0101001010 1100 1101011010
0101 0101101011 1101 1101111011
0110 0111001110 1110 1110011100
0111 0111101111 1111 1110111101
4B/5B encoding4B/5B encoding
Computer Networking / Module I / TCM / 95
Example 8B/6T sends 8 data bits as six ternary (one of three
voltage levels i.e. +, 0, -) signals. Each bit block of 8-bit group with a six symbol
code i.e. 8 bit 28 & six symbol 36 possibilities i.e. the carrier just needs to be running at 3/4 of
the speed of the data rate. Helps to maintain synchronization and error
checking
Computer Networking / Module I / TCM / 96
Analog-to-Digital-data conversion Pulse Code Modulation
Generates a series of pulses by sampling a given analog signal
Sampling is measuring amplitude in equal intervals
Computer Networking / Module I / TCM / 97
Pulse amplitude modulation has some Pulse amplitude modulation has some applications, but it is not used by itself in applications, but it is not used by itself in data communication. However, it is the data communication. However, it is the
first step in another very popular first step in another very popular conversion method called conversion method called
pulse code modulation.pulse code modulation.
Note:Note:
PAM
Computer Networking / Module I / TCM / 98
PCM: Quantization It is a method of assigning integral values
in a specific range to sampled instances
Computer Networking / Module I / TCM / 99
Binary encoding Each quantized value is translated into a
7bit binary equivalent. The eighth bit indicates the sign
Computer Networking / Module I / TCM / 100
Line coding The binary digits are transformed to a
digital signal by using one of the line coding techniques.
Computer Networking / Module I / TCM / 101
Analog to PCM Digital Code
Computer Networking / Module I / TCM / 102
According to the Nyquist theorem, the According to the Nyquist theorem, the sampling rate must be at least 2 times the sampling rate must be at least 2 times the
highest frequency.highest frequency.
Note:Note:
Sampling rate Accuracy of reproduction depend on the
no of samples taken What should be the sampling rate?
Computer Networking / Module I / TCM / 103
Nyquist Theorem
Computer Networking / Module I / TCM / 104
ExampleExample
What sampling rate is needed for a signal with a bandwidth of 10,000 Hz (1000 to 11,000 Hz)?
SolutionSolution
The sampling rate must be twice the highest frequency in the signal:
Sampling rate = 2 x (11,000) = 22,000 samples/sSampling rate = 2 x (11,000) = 22,000 samples/s
Computer Networking / Module I / TCM / 105
ExampleExample
A signal is sampled. Each sample requires at least 12 levels of precision (+0 to +5 and -0 to -5). How many bits should be sent for each sample?
SolutionSolution
We need 4 bits; 1 bit for the sign and 3 bits for the value.
A 3-bit value can represent 23 = 8 levels (000 to 111), which is more than what we need. A 2-bit value is not enough since 22 = 4. A 4-bit value is too much because 24 = 16.
Computer Networking / Module I / TCM / 106
ExampleExample
We want to digitize the human voice. What is the bit rate, assuming 8 bits per sample?
SolutionSolution
The human voice normally contains frequencies from 0 to 4000 Hz. Sampling rate = 4000 x 2 = 8000 samples/sSampling rate = 4000 x 2 = 8000 samples/s
Bit rate = sampling rate x number of bits per sample Bit rate = sampling rate x number of bits per sample = 8000 x 8 = 64,000 bps = 64 Kbps= 8000 x 8 = 64,000 bps = 64 Kbps
Computer Networking / Module I / TCM / 107
Transmission mode
Computer Networking / Module I / TCM / 108
Information is organized into group of bits All bits of one group are transmitted with each
clock tick from one device to other
More speed Cost is high restricted to short distance
Parallel Transmission
Computer Networking / Module I / TCM / 109
Serial Transmission One bit follows another using same line
Reduced cost (by a factor n) Parallel/serial converter required May used for large distance
Computer Networking / Module I / TCM / 110
In asynchronous transmission, we send 1 In asynchronous transmission, we send 1 start bit (0) at the beginning and 1 or start bit (0) at the beginning and 1 or
more stop bits (1s) at the end of each byte. more stop bits (1s) at the end of each byte. There may be a gap between each byte.There may be a gap between each byte.
Note:Note:
Asynchronous Transmission Serial transmission occurs in one of the
two ways
Computer Networking / Module I / TCM / 111
Asynchronous Transmission Insertion of extra bits & a gap makes it slower But cheap and effective
Suitable for low speed communication like KB to computer. i.e. typing is done one character at a time and unpredictable gap between characters.
Computer Networking / Module I / TCM / 112
Asynchronous Transmission When receiver detects a start bit, it starts a
timer and begins counting After receiving a stop bit it ignores all pulses till
next start bit arrives and resets the timer
Computer Networking / Module I / TCM / 113
In synchronous transmission, In synchronous transmission, we send bits one after another without we send bits one after another without
start/stop bits or gaps. start/stop bits or gaps. It is the responsibility of the receiver to It is the responsibility of the receiver to
group the bits.group the bits.
Note:Note:
Synchronous Transmission
Computer Networking / Module I / TCM / 114
Synchronous Transmission More speed Synchronization is necessary
Accuracy is completely dependent on the ability of the receiving device to keep an accurate count of the bits as they come in
Byte synchronization is done in datalink layer
Computer Networking / Module I / TCM / 115
Modulation of Digital Data
Digital-to-Analog ConversionAmplitude Shift Keying (ASK)Frequency Shift Keying (FSK)Phase Shift Keying (PSK)Quadrature Amplitude ModulationBit/Baud Comparison
Analog Transmission
Computer Networking / Module I / TCM / 116
Digital to analog modulation
It is Needed if the transmission line is analog but the data produced is binary.
Example: sending data from a computer via a public access telephone line
Computer Networking / Module I / TCM / 117
Bit rate is the number of bits per second. Baud rate is the number of signal units per second. Baud rate is less than or equal to the bit rate.
Note:Note:
Bit rate / Baud rate
The sending device produces a signal that acts as a basis of information signal called carrier signal or carrier frequency
The digital information is then modulates the carrier signal by modifying one or more of its characteristics.
Computer Networking / Module I / TCM / 118
Example Example
An analog signal carries 4 bits in each signal unit. If 1000 signal units are sent per second, find the baud rate and the bit rateSolutionSolution
Baud rate = 1000 bauds per second (baud/s)Baud rate = 1000 bauds per second (baud/s)Bit rate = 1000 x 4 = 4000 bpsBit rate = 1000 x 4 = 4000 bps
Example Example
The bit rate of a signal is 3000. If each signal unit carries 6 bits, what is the baud rate?SolutionSolution
Baud rate = 3000 / 6 = 500 baud/sBaud rate = 3000 / 6 = 500 baud/s
Computer Networking / Module I / TCM / 119
Amplitude Shift Keying• The intensity of the signal is varied to represent binary one or zero
• ASK is highly susceptible to noise interference, i.e a zero may be changed to 1 or vice versa• If one of the bit values is represented
by no voltage then it is called on/off keying (OOK). It results in reduction of energy transmitted. • ASK modulated signal contains many simple frequencies
• band width is given by BW=(1+d) Nbaud
• Where Nbaud is the baud rate and d is a factor of modulation with minimum value=0
Computer Networking / Module I / TCM / 120
Frequency Shift Keying Frequency of carrier
signal varies to represent a binary 1 or 0
Effect of noise is less, receiving device ignores spikes but more Bandwidth is required
Although there are two carrier frequencies, the process of modulation produces a composite signal
Bandwidth = fc1 – fc0 + Nbaud
Computer Networking / Module I / TCM / 121
Example Example
Find the maximum bit rates for an FSK signal if the bandwidth of the medium is 12,000 Hz and the difference between the two carriers is 2000 Hz. Transmission is in full-duplex mode.
SolutionSolution
Because the transmission is full duplex, only 6000 Hz is allocated for each direction. BW = baud rate + fc1 BW = baud rate + fc1 fc0 fc0 Baud rate = BW Baud rate = BW (fc1 (fc1 fc0 ) = 6000 fc0 ) = 6000 2000 = 4000 2000 = 4000But because the baud rate is the same as the bit rate, the bit rate is 4000 bps.
Computer Networking / Module I / TCM / 122
Phase Shift Keying Phase of carrier signal
varies to represent a binary 1 (180o)or 0 (0o) also called 2-PSK or binary PSK
Avoids problems of noise and bandwidth
Can be represented in a constallation diagram or phase-state diagram
BW=same as of ASK More variations in phase
may be added to represent more than one bit
Computer Networking / Module I / TCM / 123
Other variations of PSK 4-PSK / Q-PSK, 2 bits per baud
8-PSK, 3 bits per baud
i. The bit rate increases as compared to baud rate
ii. But needs sophisticated devices to distinguish small difference in phase
Computer Networking / Module I / TCM / 124
QAM is a combination of ASK and PSK so that a maximum contrast between each signal unit (bit, dibit, tribit, and so on) is
achieved.
Note:Note:
Quadrature Amplitude Modulation
Computer Networking / Module I / TCM / 125
4-QAM & 8-QAM Constellation
Computer Networking / Module I / TCM / 126
16-QAM constellations
QAM is less susceptible to noise than ASK?
Bandwidth required for QAM is same as PSK and ASK
Computer Networking / Module I / TCM / 127
Modulation of Analog SignalsModulation of Analog Signals
Methods:Amplitude Modulation (AM)Frequency Modulation (FM)Phase Modulation (PM)
• Representation of analog information by an analog signal
Computer Networking / Module I / TCM / 128
Amplitude modulation• The carrier signal is modulated so that its amplitude varies with the changing amplitude of modulating signal
• Phase and frequency remains the same
• The modulating signal becomes an envelope to the carrier
• The bandwidth of an AM signal is twice the bandwidth of the modulating signal
• BWt = 2 BWm
• BWt is total bandwidth
• BWm is bandwidth of modulating signal
Computer Networking / Module I / TCM / 129
Frequency modulation• The carrier signal is modulated so that its frequency varies with the changing amplitude of modulating signal
• Phase and peak amplitde remains the same
•The bandwidth of an AM signal is ten times the bandwidth of the modulating signal
• BWt = 10 BWm
• BWt is total bandwidth
• BWm is bandwidth of modulating signal
Computer Networking / Module I / TCM / 130
The Physical Layer contd.The Physical Layer contd.
Lecture IIILecture III
• MultiplexingMultiplexing• Transmission MediaTransmission Media• SwitchingSwitching
Computer Networking / Module I / TCM / 131
Multiplexing It is not practical to have a separate line for each other
device we want to communicate Therefore, it is better to share communication medium The technique used to share a link by more than one device
is called multiplexing Multiplexing needs that the BW of the link should be greater
than the total individual BW of the devices connected. In a multiplexed system one link may contain more than one
channel
Computer Networking / Module I / TCM / 132
Categories of multiplexing
Computer Networking / Module I / TCM / 133
Frequency Division Multiplexing FDM is an analog
multiplexing technique that combines signals
Signals generated by each device modulate different carrier frequencies
These modulated signals are combined to form a composite signal
Demultiplexer uses a series of filters to decompose the signal into its component signals
Computer Networking / Module I / TCM / 134
FDM
• Carrier frequencies are separated by sufficient BW to accommodate modulated signal
•These BW ranges are channels through which the various signal travel
• Channels must be separated by strips of unused BWs (called Guard Bands) to prevent signals from overlapping
• Carrier frequencies must not interfere with the original signals
f
t
Computer Networking / Module I / TCM / 135
Example 1Example 1
Assume that a voice channel occupies a bandwidth of 4 KHz. We need to combine three voice channels into a link with a bandwidth of 12 KHz, from 20 to 32 KHz. Show the configuration using the frequency domain without the use of guard bands.
SolutionSolution
Shift (modulate) each of the three voice channels to a different bandwidth, as shown in Figure
Computer Networking / Module I / TCM / 136
Example Example
Five channels, each with a 100-KHz bandwidth, are to be multiplexed together. What is the minimum bandwidth of the link if there is a need for a guard band of 10 KHz between the channels to prevent interference?
SolutionSolution
For five channels, we need at least four guard bands. This means that the required bandwidth is at least
5 x 100 + 4 x 10= 540 KHz as shown in Figure
Computer Networking / Module I / TCM / 137
ExampleExample
Four data channels (digital), each transmitting at 1 Mbps, use a satellite channel of 1 MHz. Design an appropriate configuration using FDM
SolutionSolution• The satellite channel is analog. We divide it into four channels, each channel having a 250-KHz bandwidth. • Each digital channel of 1 Mbps is modulated such that each 4 bits are modulated to 1 Hz.
• One solution is 16-QAM modulation. • Figure shows one possible configuration.
Computer Networking / Module I / TCM / 138
Wave Division Multiplexing Very narrow bands of light
from different sources are combined to make a wider band of light
A prism is used to bend a beam of light based on the angle of incidence and frequency and acts like a multiplexer
Another prism may be used to reverse the process and acts like a demultiplexer
Computer Networking / Module I / TCM / 139
Time division Multiplexing Each shared connection occupies a portion of
time but uses full BW f
t
The data flow of each connection is divided into units
For n input connections, a frame is organised into a minimum of n units Each slot carrying one unit from each section
Data rate of the link has to be n times the data rate of one unit
Computer Networking / Module I / TCM / 140
Time division Multiplexing contd. If the data rate of a link is 3 times the data
rate of a connection then the duration of a unit on a connection
will be 3 times that of a time slot
Computer Networking / Module I / TCM / 141
ExampleExample
Four 1-Kbps connections are multiplexed together. A unit is 1 bit. Find (1) the duration of 1 bit before multiplexing, (2) the transmission rate of the link, (3) the duration of a time slot, and (4) the duration of a frame?
SolutionSolution
1. The duration of 1 bit is 1/1 Kbps, or 0.001 s (1 ms).2. The rate of the link is 4 times the rate of connection, i.e. 4 Kbps.3. The duration of each time slot is 1/4 th of the bit duration before multiplexing i.e. 1/4 ms or 250 s.
or inverse of data rate i.e. 1/4 Kbps = 250 ms. 4. The duration of a frame is same as duration of each unit, i.e. 1 ms.
or 4 times the bit duration i.e. 4 * 250 ms = 1ms
Computer Networking / Module I / TCM / 142
ExampleExampleFour channels are multiplexed using TDM. If each channel sends 100 bytes/s and we multiplex 1 byte per channel, show the frame traveling on the link, the size of the frame, the duration of a frame, the frame rate, and the bit rate for the link.
SolutionSolution
Computer Networking / Module I / TCM / 143
Example Example
A multiplexer combines four 100-Kbps channels using a time slot of 2 bits. Show the output with four arbitrary inputs. What is the frame rate? What is the frame duration? What is the bit rate? What is the bit duration?
SolutionSolution
Computer Networking / Module I / TCM / 144
Example Example
We have four sources, each creating 250 characters per second. If the interleaved unit is a character and 1 synchronizing bit is added to each frame, find
(1) the data rate of each source,
(2) the duration of each character in each source,
(3) the frame rate,
(4) the duration of each frame,
(5) the number of bits in each frame, and
(6) the data rate of the link.
SolutionSolution
1. The data rate of each source is 2508=2000 bps
2. The duration of a character is 1/250 s, or 4 ms.
3. The link needs to send 250 frames per second.
4. The duration of each frame is 1/250 s, or 4 ms.
5. Each frame is 4 x 8 + 1 = 33 bits.
6. The data rate of the link is 250 x 33, or 8250 bps.
Computer Networking / Module I / TCM / 145
Transmission Media Signals in the form of electromagnetic
energy is propagated through transmission media from one device to another device
Computer Networking / Module I / TCM / 146
Classes of transmission media
Computer Networking / Module I / TCM / 147
Guided Media Provides a specific path from one device to
another, includes Twisted-Pair Cable
Consists of two conductors(normally copper), each with its own plastic insulation, twisted together
Due to twists, the noise interference and crosstalk affects both wires equally thus cancels each other
Computer Networking / Module I / TCM / 148
Computer Networking / Module I / TCM / 149
Unshielded vs Shielded Twisted-Pair Cable
STP has a metal foil covering each pair of insulated conductor
Metal casing improves mechanical strength, prevents of noise or cross talk but it is more expensive
STP is produced by IBM and seldom used else where.
Computer Networking / Module I / TCM / 150
Computer Networking / Module I / TCM / 151
Coaxial Cable It can carry higher frequency
ranges than UTP The outer metallic wrapping
serves both as a shield against noise and as the second conductor
Computer Networking / Module I / TCM / 152
Computer Networking / Module I / TCM / 153
Fiber-Optic cables Transmits signals in the form of visible light It uses the refraction property of light for
transmission i.e. light travels in a straight line in an uniform
medium and changes the direction when passes from one medium to another having different density
Core: glass or plastic, cladding: covering with less dense glass or plastic
Computer Networking / Module I / TCM / 154
Advantages and DisadvantagesAdavntages Higher Bandwidth
BW is not limited by medium but by signal generation and reception
Less Signal Attenuation Can run 50 KM without regeneration
No electromagnetic interference Resistance to corrosive materials Light weight
Disadvantages Installation and Maintenance Unidirectional (two fibers needed to make it bi-
directional) Cost
Computer Networking / Module I / TCM / 155
Unguided Media It transports electromagnetic waves without using a
physical conductor called Wireless Communication
Computer Networking / Module I / TCM / 156
Wireless transmission waves Wireless transmission is broadly divided into three groups
Radio Wave: Between 3KHz to 1GHz, omni directional, can travel long distance thus making suitable for log-distance broadcasting like AM radio, FM radio, TV, cordless phones etc.
Microwave: Ranging from 1 and 300GHz, unidirectional, low interference uses unidirectional antennas with line-of-Sight (LOS) propagation
Very high frequency microwaves cannot penetrate walls, used for long distance transmission, cellular phones, wireless LANs, two types: terrestrial microwave and satellite microwave
Infrared: frequencies from 300GHz to 400THz, can be used for very short range communication, cannot penetrate walls, confined to one room only(remote control of TV), no licensing required
May be used to communicate between devices such as keyboards, mice, PCs, printers, handset, PDAs etc.
Computer Networking / Module I / TCM / 157
Switching To connect multiple devices over a distance
we adopt a method called switching Switches are hardware and/or software
devices capable of creating temporary connections as per requirements
A switched network consists of a series of interlinked switches
Switching Methods Circuit switching Packet switching[Datagram,Virtual-circuit] Message switching
Computer Networking / Module I / TCM / 158
Circuit Switching It consists of a set of switches connected by physical links. A connection
between two stations is dedicated path made of one or more links. It creates a direct physical connection between two devices i.e. it
establishes a physical circuit before transmission
Circuit Switching Techniques Space Division Switches
Crossbar switch, multistage switch Time division switches
Time Slot Interchange
Computer Networking / Module I / TCM / 159
Crossbar switch It connects n I/Ps and m O/Ps in a grid Each cross point consists of a electronic switch
The order of switch required is huge O(nm) It is impractical because of the size of the
crossbar It is also inefficient because in practice 25% of
the switches are used at a given time
Computer Networking / Module I / TCM / 160
Multistage switch Uses crossbar switches in several stages The design of multistage switch depends on the no of
stages and the no of switches required in each stage
Number of outputs in one stage=number of switches in the next stage
The number of cross points required is much less than a crossbar switch
The reduction in the number of cross points results in blocking. i.e. one input is blocked to connect to a output due to unavailability of a path
Computer Networking / Module I / TCM / 161
Time Division Switches It uses time division multiplexing to achieve
switching Time Slot Interchange(TSI)
It changes ordering of slots based on desired connections
It consists of RAM with several memory location TSI fills up incoming data inorder of reception Slots are sent out in an order based on the decission
of control unit
Computer Networking / Module I / TCM / 162
Packet Switching Circuit switching are best suited for voice
communication, as data communication are bursty in nature i.e. data transmitted in blocks with gaps between them
A circuit switched link assumes a single data rate for both devices
In Circuit switching all transmissions are equal, priority base communication is not allowed
In Packet switching data transmitted in discrete units called packets
There are two approaches for packet switching Datagram approach, and Virtual Circuit approach
Computer Networking / Module I / TCM / 163
Datagram Approach
In this approach each packet treated independently called datagrams
Each datagram contains appropriate information about the destinations and the network carries the datagrams towards destination
Datagrams may reach at destination out of order The links joining each pair of nodes may contain
multiple channels. Each of these channels is capable of carrying datagrams from several sources or from a single source
Computer Networking / Module I / TCM / 164
Virtual Circuit Approach In this approach the relationship between all packets
belonging to a message is preserved A single route is chosen between sender and receiver at the
beginning of session All packets now travel one after another along the same
route It is implemented in two formats
Switched Virtual Circuit (SVC), and Permanent Virtual Circuit (PVC) Switched Virtual Circuit
A Virtual Circuit is created whenever it is needed (e.g. TCP’s three way handshake) and exists for the duration of the specific exchange
Each time a device makes a connection to another device, the route may be same or may differ in response to varying network conditions
Permanent Virtual Circuit The same virtual circuit is provided between two users on a
contineous basis. The circuit is dedicated to specific users without making a connection establishment or release
Computer Networking / Module I / TCM / 165
Comparison A circuit switch connection creates a physical path
between two points where as a virtual circuit creates a route between two points
The Network resources (link and switches) that make a path are dedicated but that make a route can be shared by other connections
The line efficiency is greater in Packet switching as a single link can be shared by many packets over time
A packet switching network can perform data-rate conversion. i.e. two stations having different data rates can exchange packets but it is not possible in circuit switching
In a typical user/host data connection, much of the time line is idle thus making circuit switching inefficient
When traffic becomes heavy on a circuit switching network, some calls are blocked, but in packet switching network
Computer Networking / Module I / TCM / 166
Circuit Switching Datagram Virtual-Circuit
Dedicated transmission path
No dedicated path No dedicated path
Continuous transmission of data
Transmission of packet Transmission of packet
Fast enough for interactive Fast enough for interactive Fast enough for interactive
Messages are not stored Packets may be stored until transmitted
Packets may be stored until delivered
The path is established for entire conversation
Route established for each packet
Route established for entire conversation
Call set-up delay, transmission delay
Packet transmission delay Call setup delay, packet transmission delay
Busy signal if called party busy
Sender may be notified if packet not delivered
Sender notified of connection denial
Overload may block call setup; no delay for established calls
Overload increases packet delay
Overload may block call set-up; increases packet delay
Usually no speed or code conversion
Speed and code conversion Speed and code conversion
Fixed Bandwidth Dynamic use of bandwidth
Dynamic use of bandwidth
No overhead bits after call setup
Overhead bits in each packet
Overhead bits in each packet
Computer Networking / Module I / TCM / 167
End of Module I