1
Data Communication &
Networking
Lecture 2
Instructor: Umar Farooqi
Network Topologies 2
Network Topologies 3
Mesh Topology Star Topology
Network Topologies 4
BUS Topology
Ring Topology
Network Topologies 5
???
Five Components of Data 6
Communication
SENDER RECEIVER MEDIUM MESSAGE PROTOCOL
Protocol 7
What is Protocol?
Protocol define the rules that Sender, receiver and all intermediate devices
needs to follow in order to be able to communicate effectively.
Why Do we need to have Protocol?
For effective communication b/w two parties.
What is Layered Protocol?
Divide complex tasks into small and simple tasks
For diversity in communication.
Easy maintenance. Etc.
Layered Tasks 8
We use the concept of layers in our daily life. As an example, let us
consider two friends who communicate through postal mail. The
process of sending a letter to a friend would be complex if there were
no services available from the post office.
Layered Architecture 9
Let’s Take an example of 3 LAN’s, each with Link Layer switch and the links are
connected to a router.
We have five communicating devices in this communication.
Source (A) along with Switch (Link 1).
Destination (B) along with Switch (Link 2).
Router in between A and B.
Routers:
Routers contain Network Layer, Data Link Layer and Physical Layer.
Routers serve as intermediate destinations for network traffic
Switches:
Switch contains Data link layer and Physical Layer.
Network switch is a small device that joins multiple computers together
within one LAN.
Layered Architecture 10
OSI Model 11
Established in 1947, the International Standards Organization (ISO) is a multinational
body dedicated to worldwide agreement on international standards. An ISO standard
that covers all aspects of network communications is the Open Systems
Interconnection (OSI) model. It was first introduced in the late 1970s.
OSI Model 12
Physical Layer:
The physical layer is responsible for movements of individual bits from one hop (node) to the next.
Data Link Layer:
The data link layer is responsible for moving frames from one hop (node) to the next.
Network Layer:
The network layer is responsible for the delivery of individual packets from the source host to the
destination host.
Transport Layer:
The transport layer is responsible for the delivery of a message from one process to another.
Session Layer:
The session layer is responsible for dialog control and synchronization.
Presentation Layer:
The presentation layer is responsible for translation, compression, and encryption.
Application Layer:
The application layer is responsible for providing services to the user.
OSI Model-Peer to Peer 13
Process
OSI Model-Encapsulation and 14
Decapsulation
Encapsulation/Decapsulation 15
Encapsulation done at the Source host.
1. At the Application Layer the data to be exchanged is referred as Message. It normally does not
require header but if it requires, after encapsulation the message is forwarded to Transport layer.
2. Transport Layer takes the message as a Payload and adds its own header to the payload, which
contains Source & destination address along with information for end to end delivery, flow
control congestion control and error control. The result in the transport Layer is called
Segment (TCP)/ User Datagram (UDP). after encapsulation the segment is forwarded to
network layer.
3. The Network Layer takes the segment as a payload and adds its own header to the payload,
which contains Source/Destination Hosts, Error Checking and Fragment Information. The
result in the Network Layer is called Datagram. after encapsulation the segment is forwarded to
Data Link layer.
4. The Data Link Layer takes the Datagram as a payload and adds its own header to the payload,
which contains the Link layer addresses of Host or Next Hop(Routers) . The result in the Data
link Layer is called Frame. after encapsulation the segment is forwarded to Physical layer.
Encapsulation/Decapsulation 16
Decapsulation done at the Destination host.
At the Destination Host the Headers are removed at every Layer
corresponding to the layer and at the end the Message is transferred to
the Application layer.
Encapsulation and Decapsulation both done in the Router.
OSI Model 17
Physical Layer Data-link Layer
Network Layer Transport Layer
OSI Model 18
Session Layer Presentation Layer
Application Layer
TCP/IP (Transmission Control 19
Protocol/ Internet Protocol)
A set of rules that governs the connection of computer systems to the Internet.
A set of protocols defined in different Layers.
Similar to OSI Model except:
1. Presentation Layer
2. Session layer
Some functionalities of
Session layer are in the
Transport layer.
Some functionalities of
presentation layer are in the
Application Layer.
TCP/IP (Transmission Control 20
Protocol/ Internet Protocol)
The layers in the TCP/IP protocol suite do not exactly match those in the OSI model.
The original TCP/IP protocol suite was defined as having four layers: host-to-network,
internet, transport, and application. However, when TCP/IP is compared to OSI, we can
say that the TCP/IP protocol suite is made of five layers: physical, data link, network,
transport, and application.
>Stream Control Transmission Protocol. SCTP is a connection-
oriented protocol that provides a reliable full-duplex association
Transmission Control Protocol. >TCP is a connection-oriented
protocol that provides a reliable, full-duplex byte stream to its
users. >User Datagram Protocol. UDP is a connectionless
protocol, and UDP sockets are an example of datagram
sockets.>SMTP (Send Mail Transfer Protocol)
>FTP data (File Transfer Protocol) >HTTP (HyperText Transfer
Protocol) >DNS (Domain Name Service)
>SNMP (Simple Network Management Protocol)
>TELNET allows a user on one computer to log into another
computer that is part of the same network.
>Internet Control Message Protocol (ICMP)
>The Internet Group Management Protocol (IGMP)
>The Reverse Address Resolution Protocol (RARP)
>Address Resolution Protocol (ARP)
TCP/IP Addressing 21
Any Communication that involves two parties requires Source and Destination
addresses.
So it means there are five pairs of Addresses?
Physical Layer does not need addresses.
TCP/IP Addressing 22
Physical Address Logical Address Port Address Specific Address
Addresses at the Addresses at the Addresses at the At The Application
Data link Layer, also Network Layer are Transport Layer are layer we normally
known as MAC called Logical called Port numbers. use names that
address. They are addresses. Network They are local defines the site that
locally defined Layer address addresses that provides the services,
addresses to a uniquely defines a distinguish b/w such as
specific host/router connection of a several programs
[email protected],
in a network device to the running at the same
[email protected],
(LAN/WAN) network. (Global on time. wetransfer.com etc.
the Internet)
TCP/IP Addressing 23
TCP/IP-Physical Address 24
In Figure 2.19 a node with physical address 10 sends a frame to a node with physical
address 87. The two nodes are connected by a link (bus topology LAN). As the figure shows,
the computer with physical address 10 is the sender, and the computer with physical address
87 is the receiver.
Figure 2.19 Physical addresses
TCP/IP-Network Address 25
Figure 2.20 shows a part of an internet with two routers connecting three LANs. Each
device (computer or router) has a pair of addresses (logical and physical) for each
connection. In this case, each computer is connected to only one link and therefore has only
one pair of addresses. Each router, however, is connected to three networks (only two are
shown in the figure). So each router has three pairs of addresses, one for each connection.
Figure 2.20 IP addresses
TCP/IP-Transport Address 26
Figure 2.21 shows two computers communicating via the Internet. The sending computer is
running three processes at this time with port addresses a, b, and c. The receiving computer
is running two processes at this time with port addresses j and k. Process a in the sending
computer needs to communicate with process j in the receiving computer. Note that
although physical addresses change from hop to hop, logical and port addresses remain the
same from the source to destination.
Figure 2.21 Port addresses
Multiplexing and Demultiplexing 27
Multiplexing means that a protocol at a layer can encapsulate a packet from several
next higher layer protocols (one at a time).
Demultiplexing means that a protocol can decapsulate and deliver a packet to several
next higher layer protocols (One at a time)
Multiplexing and Demultiplexing 28
Internet Protocol 29
What is IP?
A set of rules governing the format of data sent over the Internet or other
network.
Why do we need IP Addresses?
IP Address is like your contact address.
IP address is a numerical label assigned to any computer device
Components of an IP Header (IPv4).
IPv4 Header 30
Brief Description of the IPv4 Header:
1. VER (4 bits): Identify which protocol version? (IPv4/IPv6)
2. Internet Header Length (4 bits): Identify Length of header.
3. Service Type (8 bits): How the datagram should be handled.
4. Total Length (16 bits): Length of Header plus data.
5. Identification (16 bits): ensure uniqueness of the datagram, combination of source and
destination address.
6. Flags (3 bits): to identify that either fragmentation is possible or not
7. Fragment Offset (13 bits): Identify where in the original datagram this fragment belongs.
8. Time to Live (8 bits): how long to live in the internet.
9. Protocol (8 bits): which protocol the payload should be delivered.
10. Header Checksum (16 bits): An error detecting code applied for header.
11. Source/Destination Address (32/32 bits): The Addresses of source and destination.
12. Options and Padding (32 bits): Encodes the option if requested by user, ensure the header
is multiple of 32 bits.
IP Address 31
IP address is 32 bits (represented in 4 octets
separated by “.”)
IP address has two parts
Network Number & Host Number
To ensure that no two hosts have same IP addresses
ISP purchases IP address from “Internet Assigned
Number Authority”
If you need an IP address, you can get it from ISP
ISP (Retailer) IANA (Wholesaler)
Classes 32
Class A:
Few Networks, each with many hosts.
First bit 0 (binary)
7 bits represent Network & 24 bits represent hosts.
Class B
Medium number of networks with medium number of hosts.
First bit 10 (binary).
14 bits represent network & 16 represent hosts.
Class C
Many networks, each with a few hosts.
First bit 110 (binary)
21 bits represent networks & 8 bits represent Hosts.
Encoding
33
“Means to represent information is called Encoding”
“The process of converting the data or a given sequence of characters, symbols,
alphabets etc., into a specified format, for the secured transmission of data”.
example: watches and clocks --- Use mechanical means to represent information
Can we use a bulb to glow at different intensities to
represent 162 symbols of English Language?
What are the issues with this encoding mechanism?
– Require powerful bulb to show 162 different intensities
– Measurement errors can cause misinterpretation of symbols
What is the solution?
Why Computers Use Binary 34
Encoding?
Reliability
Simplicity
What if we use a bulb in only two states (on and off) for encoding?
– No need to have a high power bulb
– Scope of error due to measurement is eliminated
BUT we need minimum of 8 bulbs to represent 162 symbols
Any information inside a computer is made up of only a series of
0s (nothing) Off
Or
1s (something) On
BCD, ASCII and EBCDIC 35
Code
Binary Coded Decimal (BCD) Code:
• BCD uses the principle of converting each digit of a decimal number(0~9) into its binary form
1 0001
5 0101
American Standard Code For Information Interchange(ASCII):
• Uses 7 bits to represent symbols
• Maximum of 128 symbols
A 1000001 65
Extended Binary Coded Decimal Interchange Code(EBCDIC) IBMs:
• Uses 8 bits code
• Maximum 256 Symbols
• A 11000001
Multimedia
36
Pictures/Images:
• As the number of pixels increases and we get the higher resolution
• Our computer screen is made up of number of very small dots. Each of
these dots can be turned ON (binary 1) or turned OFF (binary 0). Our
computer memory can store these 1s and 0s
Video:
• If 24 pictures/sec are shown in succession our eyes sense it as continuous
motion
Car wheels in a movie seems to be moving in the opposite direction, why?
Sound:
• Continuous in nature
• Computer knows 1s and 0s
What is the solution?
Multimedia 37
Sampling: Measuring the signals at fixed intervals of time
Quantizing: Assigning numbers to the samples depending
on their amplitude
Now these numbers can be stored in computer memory in
binary form
Data Transmission 38
Analog signal transmission impairments introduce random
effects that degrade quality
Digital signal transmission impairments cause bit errors
Designer of the communication facility must deal with these
four factors:
– Bandwidth/Capacity
– Data Rate/Throughput
– Noise and other impairments
– Error Rate
Target: To maximize the data rate in a given bandwidth
Transmission Terminology 39
Transmission Media:
Channel through which signal travels
– Guided : Waves are guided along a physical path
• Examples: twisted pair, coaxial cable, optical fiber
– Unguided:
• Also called wireless
• Provide means of transmitting electromagnetic waves, but
do not guide them
• Examples: Air, Vacuum, sea water
Transmission Terminology 40
Point to Point:
• Direct link between transmitter and receiver
• Only transmitter and receiver share the medium --- no third
party
Multipoint:
• More than two devices share the same medium
Simplex, Half Duplex, Full 41
Duplex
Simplex:
• Signal is transmitted only in one direction
• One station is transmitter and other is receiver
• Example: Television broadcast
Half Duplex:
• Signal can be transmitted in both directions
• But only one at a time
• Example: Police Radio Set (Push To Talk)
Full Duplex:
• Both stations may transmit and receive signals
simultaneously
• Example: Telephone
Data And Signals 42
Analog Data Can Be Represented By Analog Signal
Digital Data Can Be Represented By Analog Signal
Data And Signals 43
Analog Data Can Be Represented By Digital Signal
Digital Data Can Be Represented By Digital Signal
Analog Transmission 44
Analog signals are transmitted without regard to content,
whether signal is representing analog data or digital data.
May be analog(e.g voice) or digital data (e.g binary data
pass through modem)
• Analog signal attenuates over distance.
• Use amplifiers to boost signal.
• What is Amplifier?
Digital Transmission 45
Digital signal assumes a binary content to the signal.
Limited distance transmission before attenuation endangers
the integrity of the data.
Repeaters used
– Repeater receives signal
– Extracts bit pattern
– Retransmits
Attenuation is overcome
Noise is not amplified
Advantages Digital 46
Transmission
Low Cost
– Low cost LSI/VLSI technology
Data integrity
– Repeaters are used rather than Amplifiers, Elimination of noise.
Capacity utilization
– High bandwidth transmission links economical
– High degree of MUXing easier with digital(TDM)
Security and privacy
– Encryption
Integration
– All signals can be combined and treated similarly.
– Can treat analog and digital data digitally.
Transmission Impairments 47
Received signal may differ from the transmitted signal because of transmission
impairments
Most Significant Impairments are:
• Attenuation and attenuation distortions
• Delay distortion
• Noise/ Interference
Attenuation: As the signal travels along the communication path its strength falls
off, this is called attenuation
• For guided media attenuation is exponential
For unguided media, attenuation is a more complex function of distance and
atmosphere
• Expressed in deciBells (dBs) per unit distance.
•Three Considerations for Transmission engineer:
Transmission Impairments 48
1. Received signal must be strong enough for the receiver to detect it. At the same
time it should not overload receiving circuitry
2. Level of the signal must be maintained sufficiently higher than noise to receive the
signal without error
3. Attenuation is the increasing function of frequency. That is for a given medium the
higher frequency signals suffer more attenuation
• To overcome this low fidelity:
– Loading coils are used that change the electrical properties of the medium (e.g:
Telephone Line) to smooth out attenuation effects
– Use of amplifier that amplify high frequencies more than lower frequencies
(Highlight the data out of the distorted signal)
• Attenuation distortion presents less problems with digital signal because
– Most of the energy of the signal is concentrated near fundamental frequency
Transmission Impairments
49
Delay
Distortion:
– Velocity of the propagation of signal through the guided medium varies with
frequency ()
– Various frequency components of a signal will arrive at
the receiver at different times ---- causing phase shifts
– Delay distortion is extremely critical for digital data
Because of:
• Intersymbol interference: signal components of one
bit spill over into other bit positions. Intersymbol
interference is the major limiting factor for data rate
Noise:
– Distortions imposed by transmission system
– Unwanted signal inserted during transmission and reception
Transmission Impairments
Four Categories of Noise
50
Thermal Noise:
– Thermal agitation of electrons
– Present in all electrical devices and media
– Function of temperature
– Uniformly distributed along the bandwidth --- White Noise
– Can not be eliminated
No = kT (Watts/Hertz)
» No=Noise Power Density
» K = Boltzmann's constant ()
» T = Temperature in Kelvins
– Independent of frequency
N = kTB
where B = Bandwidth; N=Noise
Example 1 51
Given a receiver with an effective noise temperature of
294K and a 10 MHz bandwidth, calculate the thermal noise
level at the receiver output.
Solution 52
Transmission Impairments 53
Inter-modulation Noise:
– When signals at different frequencies share the same transmission medium, the
result may be intermodulation noise.
Mixing of signals at different frequencies can produce energy at the sum(f1+f2),
difference(f1-f2) or multiplication(f1*f2) interfering with the signals at those
frequencies
– Produced by non-linearities of transmitter, receiver or transmission medium
Cross Talk:
– It is a disturbance caused by the electric or magnetic fields of one telecommunication
signal affecting a signal in an adjacent circuit. e.g.: electrical coupling between
nearby twisted pairs
Impulse Noise:
– Spikes of short duration and high amplitude such as caused by lightening
Channel Capacity 54
The maximum rate at which the data can be transmitted over a
given medium is referred as channel capacity.
Four major concepts:
Data Rate bandwidth
Noise Error Rate
Channel Capacity 55
Nyquist
Bandwidth:
For a given bandwidth B the maximum signal rate that can be
achieved is 2B in case of binary signal (2 voltage levels) .
Limitation is due to the intersymbol interference
With Multilevel signaling Nyquist formulation become;
M= No of discrete signals or voltage levels
C= Channel Capacity in bits/second
B= Bandwidth
Channel Capacity 56
Shannon
Capacity Formula:
By increasing the bandwidth the data rate will increase in
proportion.
Noise is prone to corrupt more bits when the data rate is high as
the bits become shorter.
Signal To Noise Ratio:
Shanon Capacity Formula:
This equation is also called error free capacity. Practically the
capacity is less than this
Example 2 57
Suppose that the spectrum of a channel is between 3MHz
and 4MHz and SNR=24dB.
a. Calculate the capacity using Shannon’s formula?
b. Assume that Shannon’s capacity is achievable. Based on
Nyquist’s formula, how many signaling levels are
required?
Solution 58
Signal Energy Per Bit To Noise 59
Power Ratio
• = Signal Energy Per Bit
• If is the time required to send 1 bit then data rate R(bit
rate)=1/. Assume S is the signal power
(dB)= S(dBW) – 10 log (RkT)
The bit error rate for digital data is a function of this ratio
Example 3 60
binary shift keying, = 8.4 dB is required for a bit error
For
rate of (one bit error out of every 10,000). If the effective
noise temperature is 290 K and data rate is 2400 bps, what
received signal power is required?
Solution 61