note

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 39

Learning Outcomes

1. Demonstrate knowledge on computer networks and the OSI reference model


2. Comprehensively explain the operations performed in each layer of the
OSI reference model
3. Evaluate and apply network security techniques

Outline Syllabus
1. Introduction
• Networks eg: LAN WAN
• Physical Medium
• Modulation and Encoding
2. Data Link Layer
• Node to node communication
• MAC Address
3. Medium Access Control Sublayer
4. network layer
5. Transport Layer
• End to end communication
6. Application Layer
• network protocols
7. Network Security
• security

1
Why Layers?
• Possible to have without layers
• These layers are for the sake of ease
• So people can work in different layers

What are protocols?


Set of rules

2
Lecture 1
Outlines
• Uses of Computer Networks
– Applications and Issues
• Network Hardware and Software
Next Lecture
• OSI Reference Model
• Exmaples of practical networks

What is a computer network?


• A collection of autonomous computers interconnected by a single technology
• image
• Interconnections can be made by either guided media or non-guided media
Ex: Internet

What is thediffernece between a computer network and a distributed


system?
• It is independent of the computer specifications and hardware
Ex: Internet vs WWW
• In a computernetwork to access a certain computerwe must be aware of
the specifications of the computer

Uses of ComputerNetworks
Business Applications
• Main goal is for effective resource sharing this may include proper sharing
of inforamtion too
• A network with two clients and one server
Ex: Shared Printers Ex: Virtual Private Networks
• The used model is theclient server model

3
• The medium of access to the server would be either guided or non-guided
• If we look at theclient-server model in detail, we see that two processes
are involved,
– one on the clientmachine
– and one on the server machine.
• Communication takes the form of the client process sending a message
over the network to the server process.
• The client process then waits for a reply message.When the server process
gets the request,it performs the requested work or looks up the requested
data and sends back a reply.

GOALS
1. Resourceand information sharing
2. Powerful communication medium (ex:e-mail,video-conferencing)
3. Doing businesses electronically with other companies
4. Doing businesses with consumers over internet

Home Applications
• for many web-based servers are based on client server model
• but some services like torrent use peer-peer models
1. Peer-Peer Communciation

4
• In a peer-peer system there are no fixed clients and servers
• Services are requested from an available peer in thr system otherwise
neighboring peers are directed to a peer having the requested resource
• A practical application would be torrent services
2. E-Commerce Tags

Tag Full name Example


B2C Business-to-consumer Ordering books online
B2B Business-to-business Car manufacturer ordering tires from supplier
G2C Government-consumer Governmet disturbing tax forms electronically
C2C Consumer-consumer Auctioning second-hand products online
P2P Peer-peer Music sharing

Mobile Applications
Mobile Applications
• Taxi services
• Useful where no reliable local networks are available
• Where mobility is essential

Wireless Mobile Typical Applications


No No Desktop computers in offices
No Yes A notebook computer used in a hotel room
Yes No Networks in unwired buildings
Yes Yes Store inventory witha hanheld computer

• In a wireless a certain or specific network is there on other hand a mobile

5
network can be established anywhere

Social issues of computer networks


Network neutrality
• refer gropu assignment

Copyright issues
Security issues - viruses,phishing,spoofing
Privacy issues
Profiling users
• Main selling points of big giant companies
• Advertisements are profilied to users
• This is becoming a social issue

Excessive bandwidth usage

Network Hardware

Interprocessor distance Processors located in same -PAN


1m Square meter -LAN
10 m Room -LAN
100 m Building -LAN
1 km Campus -LAN
10 km City -MAN
100 km Country -WAN
1000 km Contient -WAN
10,000 km Planet -The Internet

• Nowadays there is no major difference between WAN and MAN


• There is no generally accepted taxonomy into which all computer networks
fit,but two dimensions stand out as important:
1. Transmission technology
2. Scale
• There are two types of transmission technology:
1. Broadcat links4
– Have single communication channel that is shared by all machines
on the network
– Short messages called packets,sent by anymachine are recived by

6
all the others
– An address field within the packet specfies the intended recipient.
– Upon receiving a packet, a machinechecks the address field.
– If the packet is intended for the reciving machine, that machine
processes the packet,if the packet is intended for some other
machine,it is ignored
2. Point-to-point links
– Have many connections between individual pairs of machines
• Classification of networks on their scale is discussed below:

Personal Area Networks


• Has some fundamental properties over others
1. The network and devices have to be easy to install
2. Network and devices have to be foolproof in operational
3. Low price
4. Networks needs sufficient capacity
5. Possible to start with one or two devices and expand the reach of the
network gradually
6. Security and reliability
Ex: Bluetooth PAN Configuration

Local Area Networks


• Privately owned in a local area
• Various topologies are available

Ex: + 802.3 -This


is a bus-based broadcast network :also known as Ethernet
• Switched ethernet
• 802.5 - IBM token ring
• FDDI - an example for ring network
• A big LAN may be also divided into smaller networks
• This may be wireless and wired
• there will be congestions
1. Broadcast Networks

7
• Can be divided into two depending on the channel is allocated
(a) Static allocation
– A typical example would be to divide time into discrete
intervals and use a round-robin algorithm
– Each machine will be able to broadcast only when its time
slot appears
– This would be a waste of resources
(b) Dynamic allocation
– Either centralized or decenteralized
i. Centralized method
∗ There is a single entity(ex:a bus arbitration unit)
∗ This determines who goes next
ii. Decenteralized method
∗ There is no central entity
∗ Each machine must decide for itself whether to transmit

Metopolitan Area Networks

• no clear definition on MANS and WANS


Ex: Cable TV

8
Wide Area Networks

• Computers are linked over a large geographical area


• lease transmission lines
– Subnets
∗ mainly consist of switching elements and transmission lines
∗ made up by number of hosts(computers)
∗ hosts are owned by customers and subents(communication sub-
nets) are owned by the telephone company or the ISP
– Using a leasing network provider
∗ Drawbacks: There will always be no communication therefore
badnwidth will not be utilized efficiently
∗ But might have a good control
• Connected through the interent
– Subents are connected through the internet
– here ISP will control the bandwidth
– each subnet can connected as they wish so resources can be connected
easliy
• Connected through subnets provided by the ISP
– There is an ISP and some services are rented by the ISP
– Other parties may access the subnet in the local area
– this is kind of a virtual network
• In each case networks are made through "gateways"
1. Wireless Networks
• Three main categories
(a) System interconnection
(b) Wireless LANs
(c) Wireless WANs

The internet
• Collection of inter-connected networks
• A network is composed of subnets

9
Lecture 2 Continued
Network Software
Protocol hierarchies
• Basically to reduce design complexity

• A abstraction of the protocol hierarchies are shown below

10
1. Layered Architecture
• To reduce design complexity :most networks areorganized as a stack
of layers
• Each layer provides a serivce to thehigher layerwhile not letting other
layers knowhow they perform this serivce
• Each layer is kind of like a virtual machine and can be up-
graded/changed without affecting others
Similar to whats happening in computer science: OOP Hid-
ing, data abstract, data encapsulation, OOP
Now if a layer n machine communicates with layer n of
another machine.. They need to agree on the protocol
(a) Layering Advantages
• Reduce complexity -breaks a complex task into smaller easier
forms(i.e. stack of layers or levels)
• The no. of layers, the name of each laye, the contents of each
layer, and the function of each layermay differ from network to
network
• Lower layers can provide services to higher layers while hiding
information on how they actually carry out their services
• Flexible and easliy upgradable
• Allows parallel execution due to logical seperation
(b) Layers and interfaces
• Each layer should perform specific collection of well-understood
functions
• Between each pair of adjacent layers is an interface
– The interfaces defines which primitve operations and serives
the lower layer makes available to the upper layer
– There should be a clean interface between the layers so that it
minmizes the amount of inforamtion transfer between layers
– Should be able to easliy change the technology, implimenta-
tion, or the protocol of a single layer without affecting the
layers above or below that. (Ex: switching from telephone
lines to satelite or wireless)
So we have already learnet why layering is important and
the advantages of layering.
Here this slide highlight some of the key points in layering.
The first point states that each layer should perform a well
defined function. So if we go back to our airport example,
different layers carried out well defined tasks. For example,

11
the boarding pass was always issued by the check in counter,
the passport was stamped by the immigration.
Now the second point states that there should be a clean
interface and communication must be minimized. so, in our
airport example, the immigration is not going communicate
back and forth between check in counters.
another important advantage of layering is that we can easiliy
upgrade one layer woithout affecting others. a simple example
os given here.
(c) Protocols and physical medium
• A protocol defines the set of rules and regulations that are to be
followed by two parties when making a connections and executing
some task(i.e.communicate)
• A protocol specifies the sequence, the format, and layout of the
messages that is exchanged between two or more systems to
accomplish a given task
• When layer n of one machine(i.e host 1)communicate with layer
n of another machine(host 2), the rules and conventions used in
this communication is collectively known as layer n protocol
• Physcial medium performs the actual transmission of data
between two hosts.
Note: data does not directly transfer from layer n of host 1
to layer n of host 2 directly
[[./images/proh3.png ]]
(d) Network architecture and protocol stack
• A set of layers and underlying protocols are defined as a network
architecture
• A list of protocols used by a system,one protocol perlayer, is
called a protocol stack
• The network architecture should provide sufficient information
to an implmentator to build the hardware or write a program for
each layer so that it will obey the protocol
• Details of the interfaces are hidden away inside the machine and
not visible from outside
What is a network architecture:
What is a protocol stack:
Important: the network architecture provides the relevant
information for person to build devices targetting different
layers.

12
For example, a router may work with three sepearte layers
only.
The only requirement is the person needs to know what
protocols the device needs to comply with.
For example when you buy a router you make sure that it
works with Wifi 802.11/b/g/n and support RJ 45 ethernet
protocol.

A more technical view - you have seen this in the previous


lecture
Lets, see what happens to the message as it travels through
these layers, Layer 5: We have the message, the message can
be a very long message (a few lines) or a very short message
(a simple word). Since we are transmitting data we have to
convert the mssage into binary bits. Then we pass this entire
message to the layer 4.
Layer 4 : no limit on the size, header may contain the address,
sequence number, size, and time Layer 3: breaks into smaller
chunks and apply another header (IMPORTANT no idea
about H4 header, so just serve it as a single lump) Layer
2: more headers and trailer Then transfer to the physical
medium
So you see layering simplifies the task, but There are several
design issues

Design issue for the layers


1. What if the information is not properly recived?

13
• Error detection and error correction are performed by adding redun-
dant bits to the message both higher and lower layers to ensure that
packets are recived and right data is recived
2. How to find the correct path among many posibilties?
• Routing algorithm are used to find the appropriate paths for each
packet
• Each packet will take different paths
3. How will the network evolve? Or how to connect existing networks to new?
• For this protocol layering might help. So that you can replace/upgrade
one layer without totally overhauling the other layers
4. How to identify each computer in a large network?
• Naming and addressing using IPV4 and IPV6
There are several design issues
(a) What if the information is not properly received: error
detection and error correction by adding redundant bits to
the message .. applied at both higher and lower layers to
ensure that packets are received and right data is received.
(b) Finding the correct path among many possibilities: Routing,
each pcket will take difefernt paths
(c) Evolution: How to connect existing networks to new.. For
this protocol layering might help.. So that you can replace
one layer without totally overhauling the second
(d) How to identify each computer in a large network: naming
and addressing IPV4 and IPV6
5. What is the maximum message size?
• Different technologies and transmission media have different limita-
tions.Thus, we need to disassemble and re-assemble when two or more
technologies are used for transferring data
6. How to perform resource allocations and management?
• Statistical multiplexing,flow control, congestions, oversubscription
7. What is Quality of Service(QoS)?
• Different services have different requirements
8. How to preserve security,authentication and confidentiality when data
travel via different ISPs and routers?
• Different encryption methods can be used

14
(a) Maximum message size: different tech different limitations.
Then we need to disassemble and re-assamble (Aggregation
methods)
(b) Resource allocations and managelemt: Staistical multiplex-
ing, flow control, over subscription (TDM, scheduling)
(c) Quality of service: different services have diffefent require-
ments ( maximum delay, jitter, noise)
(d) Security: authentication and confidentiality.. The data
travel via different ISPs and routers so security have to be
ensured.

Connection-oriented VS connectionless service


Six different types of servcies
Layers can provide two different kinds of services to the upper layers
Connection oriented and connection less Connections oriented is
similar to a traditional telephone service.. You pickup the receiver
and dial a number, and the switching station connects to the intended
receiver.. A connection is made and you communicate. Until you
keep the phone the connection that was established remains. The
resources are held.
Sometimes they might need to negotiate on certain parameters.
We call this circuit switching
Conenctionless communication is inspired by telegram services.. The
messages are sent as packets
Each message or packet carries the full address routed independently..
They can also be transferred using either store and forward mecha-
nism or cut through switching.
Here you see two images, the first one shows a circuit switched
connection oriented network
So all packets travel via the same path. Resource/road is dedicated
for this transmission.
Next you see an image, where packets from A to B travel via multiple
paths.
This is a connectionless (store and forrward or cut through) trans-
mission.
Here you see that some paths are being shared by packets arrivng
from different hosts. Better resource utlization.

15
Service primitives
• A service is formally specified by a set of primitives(operations)that a layer
provides to the layer above it
• A service defines whatoperations the layer is prepared to perform,but it
does not reveal how they perform these operations
• A service relates to an interface between two layers, where the lower layer
being the service provider and the upper layer being the service user
• If the protocol stack is loacted in the operating system, as it often is, the
primitives are normally system calls
• The primitives forconnection-oriented service are different from those of
connectionless service
• A protocol in contrast is a set of rules governing the format and meaning
of packets sent between peer entities on different machines
Now let’s try and understand service primitives.
These are used to communicate via the interface between two seperate
layers.
A service is formally specified by a set of primitives (operations) that
a layer provides to the layer above it.
A service defines what operations the layer is prepared to perform,
but it does not reveal how they peform these operations.
A service relates to an interface between two layers, where the lower
layer being the service provider and the upper layer being the service
user.

16
If the protocol stack is located in the operating system, as it often is,
the primitives are normally system calls.
The primitives for connection-oriented service are different from those
of connectionless service.
A protocol in contrast is a set of rules governing the format and
meaning of packets sent between peer entities on different machines.
1. Additional references Additonal references
• This discusses four different kinds of service primitives
(a) Request: A primitive sent by layer (N + 1 ) to layer N to request a
service. It invokes the service and passes any required parameters.
(b) Indication: A primitive returned to layer (N + l) from layer N to
advise of activation of a requested service or of an action initiated by
the layer N service.
(c) Response: A primitive provided by layer (N + 1) in reply to an
indication primitive. It may acknowledge or complete an action
previously invoked by an indication primitive.
(d) Confirm: A primitive returned to the requesting (N + l)st layer by the
Nth layer to acknowledge or complete an action previously invoked
by a request primitive.
2. Service Primitives(1)
Here you see six primitivess that are often used un connection-
oriented services.
Remeber, these take place within the machine/host.
You can use these primitives for a simple client-server communi-
cation,

Primitive Meaning

LISTEN Blockwaiting for an incoming connection


CONNECT Establish a connection with a waiting peer
ACCEPT Accept an incoming connection from a peer
RECEIVE Block waiting for an incoming message
SEND Send a message to the peer
DISCONNECT Terminate a connection

3. Service Primitives(2)
Here you get to see a simple client server interaction.

17
There are two machines. One is a client, the other is the server
The protocol stack, well not the entire stack, but a portion of it
is situated within the operating system.
So the service calls, primitives, are basically system calls within
each machine.
First, the server executes LISTEN to indicate that it is prepared
to accept incoming connections. You basically block the server
process until a request for connection appears.
Next, the client process executes CONNECT to establish a
connection with the server. Typically you need to specify the
address you need to connect to:
Now the operating system will send a packet to the peer asking
it to connect, as shown by (1) in Fig. 1-18.
The client process is suspended until there is a response.
When the packet arrives at the server, the operating system sees
that the packet is requesting a connection. It checks to see if
there is a listener, and if so it unblocks the listener.
The server process can then establish the connection with the
ACCEPT call.
This sends a response (2) back to the client process to accept
the connection. The arrival of this response then releases the
client.
At this point the client and server are both running and they
have a connection established.

4. Service Primitives(3)

18
Here you see something very important, now in the first table
you see how primitives actually relate to communication between
the two machines.
LISTEN takes place within the server machine and it does not
relay any information/pass any packets to the client.
On the other hand, CONNECT takes place in the client will
initiate a packet transfer.

Relationship of serives to protocols


Here you get to see that services are between layers within the same
machine.
Protocols are between the same layer of two seperate machines.
Layer K provides the service to layer k+1. How does layer k + 1 get
the service from layer k, by using primitives (operation/system calls)

19
Reference Models(Protocol Stack)
Design Considerations
• some layers can be combined together as required
1. A layer should be created where a differentabstraction is needed
2. Each layer should perform a well defined function
3. The function of each layer should be chosen with an eye toward defining
internationally standardized protocols
4. The layer boundaries should be chosen to minimize the information flow
across the interfaces
5. The number of layers should be large enough that distinct functions need
not be thrown together in the same layer out of necessity and smallenough
that the architecture does not become unwieldy

OSI Reference Model


• Open System Interface~has 7 layers
[[./images/osi.png ]]
Here you see 7 layers
There are two hosts. Host A is physically connected to Host B via
two intermediate routers. You can see a number next to each layer.
Number one is assigned to the bottom most layer and number 7 is
attached to the top most layer.
Another important thing you can see is that although Host A and
B run all 7 layers, intermediate routers will only run the bottom 3
layers. So, this shows that some devices may not run all 7 layers.
Now if you look at Host A, it can be a computer where you actually
run an application and you see information on screen. However, the
router does not display information. Thus, there is no need for the
router to have the application, presentation layers.
• The following shows a breif function of each layer
• Additional reference Interesting Video

20
• Note that the recommended textbook uses bottom-up approach

TCP/IP Model
• Transmission Control Protocol/Internet Protocol ~ has 4/5 layers
• Transmission Control Protocol/Internet Protocol suite of protocols has
become the dominant standard for internet working
• TCP/IP represents a set of public standards that specify how packets of
information are exchanged between computer over one or more networks
• This module specifically only discusses about TCP/IP
• TCP model has two forms
1. 4-layer model
– Data link layer
– Internet layer
– Transport layer
– Application layer
2. 5-layer model
– Physical layer
– Data Link layer
– Network layer
– Transport layer
– Application layer
1. Layer 1 Physical Layer

• Converts didgital signals to analog and transmits the signal

21
• Provides the physical connection between two devices/networks com-
munciation
• We have two applications that generate data(bits) and underlying
network converts this into analog signals and transport across the
medium
• Can be wired or wireless medium
2. Layer 2 Data Link Layer
• Initially we had just two devices communicating with each other
• What if more than two devices want to communicate???

• So when two or more devices communicate collisions may occur


• In a communciation network if the data snet by a one device collides
another data packet,it will create errors in the output
• If this happens we have to retransmit the data which would incur
more time and is an inefficient process
• Therefore,to aviod this we can give a device its own cahnce to com-
municate(otherwise schedule)
• This can be carried out in a communication network using a
hub,switch, or router
• Then we say that all devices are in the same broadcast domain, but
in different collision domains
• TCP/IP doesn’t define anyspecific protocol for the data-link layer.
• It supports any protocol that can take the datagram and carry it
through the link suffics for the network layer.
• The data-link layer takes a datagram and encapsulates it in a packet
called a frame
3. Layer 3 Network Layer
• What would happen if two groups are having seperate conversations?

22
• Now the solution would be to create multiple networks
• When these networks want to communicate with one another, we
need to connect them via LEVEL 3 switches and routers
• To connect them we need a physical path as well as routing(This is a
way of instructions for swirching)
4. Layer 4 Transport Layer
So now you have multiple networks,
And these networks may run different applications. For example
some may use web browsers, some emails, video streaming, voip
These applications can be vaguely categorized under different
processes.
For example, voip and video file down laoding may require a
direct link (connectio oriented), whereas, video streaming may
not require direct link.
So we perform these using transport layer protocols.
So in the class room exmple, if the two teachers are singining a
duet (synchronization is important) not only that you have to
create a physical conenction between the classes, you also have
ensure that they are synchronized, managed, and pay attention
to each other.
Transport layer provides errior free transmission and provides
traffic management features.

23
5. Layer 5 Application Layer
So finally, we have the application layer.
The application can be the browser, email, . . . .etc..
application to application communication is peformed using the
application layer.
If im sending an email, i open the browser and go to my email
client.
the receiving person would also do the same.
6. Network devices and layers

7. Protocols at different layers


(a) Application - HTTP,FTP,SMTP
(b) Transport - TCP,UDP,RTP
(c) Network - IPv4,IPv6,MPLS
(d) Data Link - Ethernet,Wifi,Bluetooth,UMTS,LTE

24
Model used for this text
• TCP/IP

Comparison of OSI and TCP/IP


1. OSI model VS TCP/IP 5-layer model

• The following image shows protocols and networks in the TCP/IP


model initially

25
• The following image shows a more detailed version

• A detailed sequnece is shown below

• Both models are based on the concpet of a stack of independent


protocols
• OSI model is well-hidden while TCP/IP is not
• A major difference is in when it comes to the area of connectionless
VS connection-oriented communication.
• OSI model supports both connectionless and connectio-oriented com-
munication in the Network layer but only connection-oriented com-
munication in the transport layer
• The TCP/IP model has only one mode in the network
layer(connectionless) but supports both modes in the transport layer

26
Critique of OSI model and protocols
1. Bad Timing - This implies that this model was introduced way before
modern protocols are introduced
2. Bad Technology
3. Bad implementations
4. Bad politics

Critique of TCP/IP model


1. The model does not clearly distimguish between concepts of service,interface
and protocol
2. Not at all general and is poorly suited to describing any protocol stack
other than TCP/IP
3. No proper distinction between layers and interfaces(ex: host-to-network
layer)

Example Networks

Tutorial 1
1. Explain how the notion of layering and internetworking make the rapid
growth ofapplications such as the World Wide Web possible.
2. What are two reasons for using layered protocols? What is one possible
disadvantageof using layered protocols?
3. Which OSI layer is responsible for the following networking functions?
a. Determining the best path to route packets. b. Providing end-to-end
communications with reliable service c. Providing node-to-node communi-
cations with reliable service within a network
4.

Lecture 3 Physical Layer


Lecture 4 Baseband and Passband modulation
REVIEW: DIGITAL COMMUNICATION FUNDAMENTALS
• Wired and wireless channels carry analog signals such as varying volt-
age,light intensity
• To send digital information,we need to convert digital bits to analog signals
• The process of converting between bits and siganls that represent them is
called digital modulation
– Bassband modulation schemes directly convert bits to signals
– Bassbad signals occupy frequency from zero up to a maximum as
defined by the signal rate
– However, a channel may only allow certain frequnecies to pass through

27
– Thus, passband modulation will ensure that the signal match the
channel frequency

Key Reference Materials

Line Coding-Introduction
• Defined as the process of converting binary data to a *a digital sig-
nal*(map binary bits to voltage or current levels)

• The most basic form is Unipolar Non Return to Zero(NRZ): a positive


voltage for binary 1 and zero voltage for binary 0
Digital signal of binary data 0 1 0 1 1 0 0

Line coding -essentials


Data element and signal element
• Data element - smallest piece of information we want to send(binary
1 or 0,a bit)
• Signal element- shortest element of the signal
• Data elements are what we want to send
• Signal elements are what we want to send
• Data elements are being carried by signal elements
• Notation "r" denotes the number of data elements carried by a single signal
element
• A signal element can also be called a symbol or a pulse

28
Signal level and Data level
• Signal level - The number of possible values allowed in a particular
signal(ex:voltage levels, amplitude levels)
• Data level - The number of values used to represent data(ex:binary 0s
and 1s, so 2 levels)

1. Multiple signal and data levels


• Why should we use multiple levels?
– Two levels can be used to represent 1 bit data,0 and 1
– Four levels can be used to represent two bit data 00,01,10,11
– Eight levels can be used to represent three bit data
000,001,010,011,100,101,111

29
Siganl rate and bitrate(Baud rate,Symbolrate,modulation rate,pulse
rate)
1. Signal Rate
• Signal rate, baud rate, pulse rate,modulation rate, and symbol rate
are related one to another
• The signal rate is defined as the number of signal elements sent in
one second
• These signal elements may go through voltage,phase, or frequency
changes(i.e,transitions)over time
• A signal element is also called a symbol or a pulse
• A symbol is the smallest possible thing in a system, which can encode
information
• The baud rate is defined as the rate of change of symbol(i.e. symbol
rate,signaling rate,pulse rate)
2. Signal Rate vs Bit rate
• Bit rate can be defined as the number of bits transmitted per second
• Each bit can be carried by an "X" number of symbols
• In other words,each symbol may correspond to more or less than one
bit
(e.g. in NRZ and Manchester coding, each bit is carried by one symbol
and two symbols, respectively)
• If X=1,each bit is carried by a single symbol: bit rate = signal rate(i.e.
symbol/baud/pulse rate)
• If x>1,i.e. each bit is carried by more than one symbol: bit rate <
signal rate
• If x<1, i.e. each bit is carried by more than one symbol: bit rate >
signal rate
Formulae for bit rate

30

Bitrate = P ulseRate × log2 L

where L is the number of data levels


Bitrate = P ulseRate × m

where m is the number of bits per data level

EXAMPLE 01
Q. A signal has two data levels with a pulse duration of 1 ms. We calculate
the pulse rate and bit rate as follows:

1
P ulseRate = = 1000pulses/s
10−3

BitRate = P ulseRate × log2 L = 1000 × log2 2 = 1000bps

EXAMPLE 02
Q. A signal has four data levels with a pulse duration of 1 ms.We calculate
the pulse rate and bit rate as follows:

1
P ulseRate = = 1000pulses/s
10−3

BitRate = P ulseRate × log2 L = 1000 × log2 4 = 2000bps

Bandwidth
• A digital signal has an infinite bandwidth(Fourier analysis can be used to
decompose a digital signal)
• A periodic digital signal can be decomposed into infinte bandwidth and
discrete frequnecies

31
• A non-periodic digital signal can be decompsed into infinite bandwidth
and continous frequnecies
• The following images show the time and frequency domains of a periodic
and non-periodic digital signals

• Base-band transmission of a digital signal that preserve the shape of the


digital signal is possible only if we have a low-pass channel with infinite
bandwidth

1. Bandwidth Efficiency
• With NRZ, the signal may cycle between the positive and negative
levels up to every 2 bits(in the case of alternating 1s and 0s)

32
• This means that we need a bandwidth of at least B/2 Hz when the
bit rate is B bits per second
• This relation comes from the Nyquist rate. It is a fundamental limit,so
we cannot run NRZ faster wthout using more bandwidth

DC Components
• When voltage level remains constant for a while, very low frequencies are
often created
• These frequencies around zero are called DC or Direct Current Com-
ponents
• Over one cycle period,if all positive voltages are cancelled by negative
voltages then DC component is zero(0)
• In line coding, a signal with DC components is treated as a distorted signal
and it can create errors in received signal due to following reasons:
– They cannot pass through a communication media such as a telephone
lines, which only allows frequencies above 200 Hz.

– They carry extra energy that is considered useless


Reference 1 Reference 2 Reference 3 Reference 4 Reference 5

Self Syncgronization and Clock Recovery


• If the receiver bit intervals corresponds exactly to the sender’s bit
intervals, only then it is possible to receive a signal correctly
• If the clock frequency of the reciver is faster/slower than the sender(bit
intervals are not matched), then receiver will misinterpret the signal
• A self synchronization digital signal carries timing information within the
signal itself:
– Transition in the signal alerts the receiver on the beginning,middle
and in the end of a pulse

33
EXAMPLE 03
Q. 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?
At 1 Kbps:
1000 bits sent -> 1001 bits received -> 1 extra bps At 1 Mbps:
1,000,000 bits sent -> 1,001,000 bits received -> 1000 extra bps

Pulse shaping and line coding


Main pulse shaping techniques
1. Unipolar
2. Polar
3. Bipolar
4. Multilevel

Main encoding techniques


1. Return to Zero(RZ)
2. Non Return to Zero(NRZ)
3. Differential coding
4. Manchester coding
5. Block coding
6. Bipolar

34
1. Unipolar
• Uses only one polarity (but two signal levels)
• The polarity is assigned to one of the two binary states, usually the 1
• Very simple and primitive(almost obsolete)
• Send voltages pulses along wired links

Bits Levels

1 +V
0 0V

Drawbacks
• Since the average amplitude is not zero,unipolar will produce a DC
component

35
• Synchronization issues:
– A long series of 1s or 0s may result in synchronization problems
since there is no change in the signal
– Solution would be to use a seperate parallel line to carry clock
2. Polar
• Use two voltage/amplitude levels(ex: +5V and -5V)
• Helps to dilute "DC component" problem
• Used in 4 main types of coding

Bits Levels

1 +5V
0 -5V

(a) Polar NRZ


i. NRZ-level (NRZ-L)
• Each signal level represents a particular bit(ex:0=+V and
1=-V)
• Drawback: poor synchronization for long series of 1s or 0s

i. NRZ-invert (NRZ-I)
• Alternate the voltage level for binary 1s and no voltage change
for binary 0
• Advantage : 1s in data streams enable synchronization
• Drawback : long sequence of 0s still causes synchronization
issues

36
• NRZ-I provide better synchronization than NRZ-L
• However,neither provide full self-synchronizatiom
• To ensure complete synchronization, there must be a
signal change for each bit
(b) Polar RZ
• Uses two distinct voltage levels to represent binary 1s and 0s(ex:
1=+5V, 0=-5V)
• The signal returns to no-voltage(0 V) halfway through the bit
interval
• Advantge: Good synchronization
• Drawback: Consume more badnwidth as 2 signal changes
i.e, (2 signal elements) are required to encode 1 bit

(c) Polar Machester


• Uses two signal levels(ex:+V and -V)
• The signal inverts(i.e. goes from +V to -V or -V to +V) at half
way of a bit interval
• Bits are represented using signal level transitions
– Bit 0 represented using -V to +V transition
– Bit 1 represented using +V to -V transition
• Advantage: Perfect self-synchronization as it genreates one tran-
sition at the middle and one at the start of each bit
• Drawback: Perfect for alternating sequence of bits(1010) but
results in bandwidth waste when a series of 0s or 1s are encoded
• This is used by IEEE 802.3(Ethernet)

(d) Differential Manchester

37
• Similar to Manchester, with the following exceptions
– bit 0 represented by a transition at the beginning of bit
interval
– bit 1 represented by no transition at the beginning of bit
interval
– 2 signal changes for 0s and 1 signal change for 1s
• Used by IEEE 802.5 (Token Ring)

3. Bipolar
• Use three signal levels
• Typically, we use two non-zero and one zero voltage levels(i.e +V,-
V,0V)
• Assign bit 0 =0V and bit 1=alternates between +V and -V

Bits Levels

1 +V,-V
0 0V

Ex: In sequence of bits, the 1st occurance of "bit 1" is assigned a +V,the
2nd occurance of bit 1 will be assigned -V, and the 3rd will be assigned a
+V again
• Advantage: Consume less bandwidth required than with Manchester
coding(for any sequence of bits)
• Disadvantage: Loss of synchronization may take place when the bit
sequence has a series of consecutive 0s
• AMI,B8ZS, and HDB3 encoding techniques utilize Bipolar pulse
shaping
• Reference 1
• Reference 2
4. Multilevl Codes

38
• In multilevel coding, more than three signal levels and two data levels
are used
– 2 data elements(bits) are encoded by one signal element
– Produce a higher data rate (2 times faster than NRZ-L)
– Receiver has to process 4 signal levels
5. Block Codes
• Unlike line codes which operate on a stream of information bits, block
codes operate on block of information bits
• Redundant bit(s) are added to each block of information bits to ensure
synchronization and error detection
:smile: :cry: :heart: :bat:

39

You might also like