Computer Networks
Computer Networks
UNIT – I
DATA COMMUNICATION
Data Communication:
Data Communication is defined as the exchange of data between two devices via some
form of transmission medium such as a wire cable. The communicating devices must be a
part of a communication system made up of a combination of hardware ( physical
equipment) and software (programs).
1
Characteristics of data Communication :
The effectiveness of a data communication depends on three characteristics
1.Delivery
2.Accuracy
3.Timeliness
Timeliness: The system must deliver data in a timely manner. Data delivered late are
useless. Timely delivery means delivering data as they are produced, in the same order
that they are produced. and without significant delay. This kind of delivery is called real
–time transmission.
Components:
The components of a data communication are
Message
Sender
Receiver
Medium
Protocol
2
Data representation.
Information comes in different forms such as text, numbers, images, audio and video.
Text.
Text is represented as a bit pattern ,
The number of bits in a pattern depends on the number of symbols in the language.
Different sets of bit patterns have been designed to represent text symbols. Each set is
called a code. The process of representing the symbols is called coding.
ASCII
The American National Standards Institute developed a code called the American
Standard code for Information Interchange .This code uses 7 bits for each symbol.
Extended ASCII
To make the size of each pattern 1 byte(8 bits),the ASCII bit patterns are augmented with
an extra 0 at the left.
Unicode
To represent symbols belonging to languages other than English,a code with much
greater capacity is needed. Unicode uses 16 bits and can represent up to 65,536 symbols.
ISO
The international organization for standardization known as ISO has designed a code
using a 32 – bit pattern. This code can represent up to 4,294,967,296 symbols.
Numbers
Numbers are also represented by using bit patterns. ASCII is not used to represent
numbers.The number is directly converted to a binary number.
Images
Images are also represented by bit patterns.An image is divided into a matrix of
pixels,where each pixel is a small dot. Each pixel is assigned a bit pattern.The size and
value of the pattern depends on the image.The size of the pixel depends on what is called
the resolution.
Audio
Audio is a representation of sound. Audio is by nature different from text, numbers or
images. It is continuous not discrete
Video
Video can be produced either a continuous entity or it can be a combination of images.
3
Half-duplex
In half-duplex mode ,each station can both transmit and receive but not at the same time.
When one device is sending ,the other can only receive.
The half-duplex mode is like a one-lane road with two directional traffic. The entire
capacity of a channel is taken over by whichever of the two devices is transmitting at the
time.
Ex. Walkie-talkies and CB(citizen band radios.
Full-duplex
In full-duplex mode ,both stations can transmit and receive simultaneously. The full
duplex is like a two –way street with traffic flowing in both directions at the same time.
Signals going in either direction share the capacity of the link.
Ex. Telephone network
Network:
Definition :
4
Distributed Processing
Networks use distributed processing which is termed as a task divided among multiple
computers. Instead of a single machine responsible for all aspects of a process, separate
computers handle a subset.
Performance
Performance can be measured by means of transit time, response time, number of users,
type of transmission medium, capabilities of the connected hardware and the efficiency
of the software.
Transit time
The amount of time required for a message to travel from one device to another.
Response time
The elapsed time between an inquiry and a response.
Reliability
Reliability is measured by the frequency of failure ,the time it takes a link to recover from
a failure.
Security
Network security is protecting data from unauthorized access.
Type of connection
There are two possible type of connections
Point-to-point
Multipoint
Point-to-point
A point-to-point connection provides a dedicated link between two devices. The entire
link is reserved for transmission between those two devices.
Ex. Change of television channel by infrared remote control. A point-to-point connection
is established between the remote control and the televisions control system.
Multipoint
A multipoint (also called multidrop) connection is one in which more than two specific
devices share a single link. The capacity of the channel is shared either spatially or
temporally.
Physical Topology
Physical Topology refers to the way in which network is laid out physically. Two or more
links form a topology. The topology of a network is the geometric representation of the
relationship of all the links and the linking devices tone another.
The basic topologies are Mesh,StarBus andRing
Mesh
In a mesh topology each device has a dedicated point to point link to every other
device. The term dedicated means that the link carries traffic only between the two
devices it connects.
5
A fully connected mash network therefore has n(n-1)/2 physical channels to link n
devices. To accommodate that many links every device on the network has (n-1) I/O
ports.
Merits.
• Dedicated link guarantees that each connection can carry its own data load. This
eliminates the traffic problems that occur when links shared by multiple
devices.
• If one link becomes unusable ,it does not incapacitate the entire system.
• Privacy or security: When every message travels along a dedicated line only the
intended recipient
Demerits
• The amount of cabling and the I/O ports required
• Installation and reconnection are difficult
• The sheer bulk of the wire accommodate more space than available. The hardware
required to connect each link can be prohibitively expensive.
Star topology
Each device has a dedicated point to point link only to a central controller usually called
a hub. If one device has to send data to another it sends the data to the controller, which
then relays the data to the other connected device.
Merits
• Less expensive than a mesh topology. Each device needs only one link and I/O
port to connect it to any number of others.
• Installation and reconfigure is easy.
• Robustness. If one link fails only that link is affected.
• Requires less cable than a mesh.
Demerits
• Require more cable compared to bus and ring topologies.
Bus
6
One long cable acts as a backbone to link all the devices in a network Nodes are
connected to the bus cable by drop lines and taps. A drop line is a connection running
between the device and the main cable. A tap is a connector that either splices into the
main cable or punctures the sheathing of a cable to create a contact with a metallic core.
As the signal travels farther and farther ,it becomes weaker .So there is limitation in the
number of taps a bus can support and on the distance between those taps.(In this diagram
taps and connectors are
Merits
• Ease of installation.
• Bus use less cabling than mesh or star topologies.
Demerits
• Difficult reconnection and isolation.
• Signal reflection at the taps can cause degradation in quality.
• A fault or break in the bus cable stops all transmission. It also reflects signals
back in the direction of origin creating noise in both directions.
Ring
Each device has a dedicated point to point connection only with the two devices on either
side of it.
A signal is passed along the ring in one direction from device to device until it reaches
the destination
Each device in the ring incorporates a repeater. It regenerates the bits and passes them
along ,when it receives the signal intended for another device.
Merits:
• Easy to install and reconfigure.
• To add or delete a device requires changing only two connections.
• The constraints are maximum ring length and the number of devices.
• If one device does not receive the signal within a specified period, it issue an
alarm that alerts the network operator to the problem and its location
Demerits
• A break in the ring disables the entire network. It can be solved by using a dual
ring or a switch capable of closing off the break.
7
Categories of Network
The three primary categories are of network are Local Area Network (LAN),
Metropolitan Area Network (MAN), and Wide Area Network(WAN). The category into
which a network fall is determined by its size, ownership, the distance it covers and its
physical architecture.
LAN
• A LAN is usually privately owned and links the devices in a single office,
building or campus.
• A LAN can be as simple as two PCs or it can extend throughout a company. LAN
size is limited to a few kilometers. The most widely used LAN system is the
Ethernet system developed by the Xerox Corporation.
• It is designed to allow resources (hardware , software or data) to be shared
between PC’s or workstations. It may be used to provide a (shared) access to
remote organizations through a router connected to a Metropolitan Area Network
(MAN) or a Wide Area Network (WAN).
• One of the computers may be given a large capacity disk drive and may become a
server to other clients. Software can be stored on this server and used by the
whole group.
• The size of the LAN may be determined by the licensing restrictions on the
numbers per copy of software. or the number of users licensed to access the
operating system.
• Also differentiated from other types of network by transmission media and
topology.
8
Wide Area Network (WAN)
• A WAN provides long distance transmission of data .,voice ,image and video
information over large geographic areas.
• It may comprise a country ,continent or even the whole world. Transmission
rates are typically 2 Mbps, 34 Mbps, 45 Mbps, 155 Mbps, 625 Mbps (or
sometimes considerably more).
• WAN utilize public, leased, or private communication equipment usually in
combinations and therefore span an unlimited number of miles.
• A WAN that is wholly owned and used by a single company is referred to as an
Enterprise Network. The figure represents the comparison of the different types of
networks
Internetwork
When two or more networks are connected they become an internetwork or internet
Protocols
Standards
Why do we need standards ?
• To create and maintain an open and competitive market for equipment
manufacturers
• To guarantee national and international interoperability of data,
telecommunication technology and process
• To give a fixed quality and product to the customer
• To allow the same product to be re used again elsewhere
• To aid the design and implementation of ideas
• To provide guidelines to manufacturers, vendors, government agencies and other
service providers to ensure kind of interconnectivity.
10
Standards Creation Committees
ITU, International Telecommunications Union formerly the (CCITT):
• It a standard for telecommunication in general and data systems in particular.
•
ISO, International Standards Organization :
• It is active in developing cooperation in the realms of scientific, technological and
economic activity.
11
OSI
The Open Systems Interconnection (OSI) architecture has been developed by the
International Organization for Standardization (ISO) to describe the operation and design
of layered protocol architectures. This forms a valuable reference model and defines
much of the language used in data communications.
Layer
• Each layer provides services to the next higher layer and shields the upper layer
from the details implemented in the lower layers.
• Each layer appears to be in direct (virtual) communication with its associated
layer on the other computer. Actual communication between adjacent layers takes
place on one computer only.
• Layering simplifies design, implementation, and testing. Only the lowest level
(Physical layer) can directly communicate with its peer communications process
into parts.
Peer-to-Peer Processes
• The processes on each machine that communicate at a given layer are called peer-
to-peer processes.
• At higher layers communication must move down through the layers on device A
aver to device B and then back up through the layers.
• Each layer in the sending device adds its own information to the message it
receives from the layer just above it. and passes the whole package to the layer
just below and transferred to the receiving device.
12
Physical Layer
Functions:
• It coordinates the functions required to transmit a bit stream over a
physical medium.
• It deals with the mechanical and electrical specifications of the interface
and transmission media.
Mechanical: cable, plugs, pins...
Electrical/optical: modulation, signal strength, voltage levels,
bit times,
• It also defines the procedures and functions that physical devices and
interfaces have to perform for transmission to occur
Major responsibilities
• Physical characteristics of interfaces and media:
It defines the characteristics of the interface between the devices and the
transmission media. Also defines the type of transmission medium.
• Representation of bits:
To transmit the bits, it must be encoded into electrical or optical
signals. It defines the type of representation how 0s and 1s are
changed to signals.
• Data rate:
The number of bits sent each second is also defined by the physical
layer.
• Synchronization of bits:
Sender and the receiver must be synchronized at the bit level .i.e the
sender and the receiver clocks must be synchronized.
13
Data link layer
Functions:
The data link layer is responsible for hop-to-hop (node-to-node) delivery.
It makes physical layer appear error free to the network layer.
Responsibility
• Framing: The data link layer divides the stream of bits received from the
network layer into manageable data units called frames.
• Physical Addressing: If the frames are to be distributed to different
systems on the network the data link layer adds a header to the frame to
define the receiver or sender of the frame. If the frame is intended for a
system located outside the senders network then the receiver address is
the address of the connecting device that connects the network to the next
one.
• Flow Control: If the rate at which the data absorbed by the receiver is
less than the rate produced in the sender, the data link layer imposes a
flow control mechanism to overwhelming the receiver.
• Error control: Reliability is added to the physical layer by data link layer
to detect and retransmit loss or damaged frames. and also to prevent
duplication of frames. This is achieved through a trailer added to the end
of the frame
• Access control: When two or more devices are connected to the same link
it determines which device has control over the link at any given time.
Network Layer
Functions:
The network layer is responsible for source-to-destination delivery of a packet across
multiple networks. It ensures that each packet gets from its point of origin to its final
destination
Responsibility
• Logical Addressing: If a packet has to cross the network boundary then the
header contains information of the logical addresses of the sender and the receiver.
• Routing: Route the packet to correct destination
14
Transport Layer
Functions:
The network layer is responsible for process-to-process(end to end)delivery ,that is
source to destination delivery of the entire message.
Responsibilities
• Service-point (port) addressing :Computers run several programs at the same
time. source-to-destination delivery means delivery from a specific process on one
computer to a specific process on the other. The transport layer header therefore
include a type of address called a service – point address.
• Segmentation and reassembly A message is divided into segments and each
segment contains a sequence number. These numbers enable the Transport layer to
reassemble the message correctly upon arriving at the destination. The packets lost in
the transmission is identified and replaced.
• Connection control : The transport layer can be either connectionless or
connection-oriented.
1. A connectionless transport layer treats segment as an independent packet and
delivers it to the transport layer.
2. A connection-oriented transport layer makes a connection with the transport
layer at the destination machine and delivers the packets. After all the data are
transferred the connection is terminated.
• Flow control :Flow control at this layer is performed end to end .
• Error Control: Error control is performed end to end. At the sending side ,the
transport layer makes sure that the entire message arrives at the receiving transport
layer with out error. Error correction is achieved through retransmission.
Session Layer :
Functions:
1. Session layer is the network dialog controller.
2. It establishes ,maintains, and synchronizes the interaction between communicating
systems.
Specific responsibilities
• Dialog Control : Session layer allows two systems to enter in to a dialog.
Communication between two processes take place either in half-duplex or full-duplex..
• Synchronization. The session layer allows a process to add checkpoints into a
stream of data. Example If a system is sending a file of 2000 pages , check points may
be inserted after every 100 pages to ensure that each 100 page unit is advised and
acknowledged independently. So if a crash happens during the transmission of page
523,retransmission begins at page 501,pages 1 to 500 need not be retransmitted.
Presentation layer.
Functions:
It is concerned with the syntax and semantics of the information exchanged between
two systems.
Responsibilities
15
• Translation .The processes in two systems are usually exchanging information
in the form of character strings, numbers, and so on. The Since different computers use
different encoding systems ,the presentation layer is responsible for interoperability
between these different encoding methods.
• Encryption. The sender transforms the original information from to another
form and sends the resulting message over the entire network. Decryption reverses the
original process to transform the message back to its original form.
• Compression. It reduces the number of bits to be transmitted. It is important in
the transmission of text, audio and video.
Application Layer :
Functions:
1. It enables the user(human/software) to access the network.
2.It provides user interfaces and support for services such as electronic mail, remote file
access and transfer, shared database management .
Responsibilities
• Network Virtual terminal. A network virtual terminal is a software version of
a physical terminal and allows a user to log on to a remote host.
• File transfer, access and management. This application allows a user to
access files in a remote computer, to retrieve files from a remote computer and to
manage or control files in a remote computer.
• Mail services. This application provides the basis for e-mail forwarding and
storage.
• Directory services. It provides distributed database sources and access for
global information about various objects and services .
Transmission Media
Transmission media are actually located below the physical layer and directly
controlled by the physical layer.
Transmission media can be divided into two broad categories
• Guided &- twisted-pair cable, coaxial cable, and fiber-optic cable
• Unguided – by air
Guided media
Twisted Pair Cable- Twisting reduces the interference and cross talk
UTP- Set of wires consists of two conductors surrounded by insulating material
STP- It offers a protective sheathing around copper and distance limited to 100M
Coaxial cable
• Coaxial cable carries signals of higher frequency ranges than twisted pair cable.
• It has a central core conductor of solid or stranded wire enclosed in an insulating
sheath. This in turn encased in an outer conductor of metal foil, braid or a
combination of the two.
• The metallic wrapping serves both as a shield against noise and as the second
conductor completes the circuit.
16
• The outer conductor is also enclosed in an insulating sheath and the whole cable
is protected by a plastic cover.
• BNC connector – to connect the end of the cable to a device such as TV.
• BNC T connector – To branch out a cable to a computer or other devices.
• BNC terminator- Used at the end of cable to prevent the reflection of the signal.
Performance
• Attenuation is much higher in coaxial cables than in twisted pair cable.
• Coaxial cable has a much higher bandwidth the signal weakens rapidly and
needs the frequent use of repeaters.
Basic definitions
• Signal Attenuation is the phenomenon whereby the amplitude of a signal
decreases as it propagates along a transmission line.
• Attenuation is a function of distance and frequency of signal
• Repeaters are used to increase the power of the signal at appropriate intervals
• Skin effect, which increases attenuation as the bit rate of the transmitted signal
increases
Applications
• Coaxial cable is used in analog telephone network where a single coaxial
cable could carry 10,000 voice signals.
• It is also used in digital telephone network where a cable could carry
digital data up to 600 Mbps.
17
• Cable TV networks also used RG-59 coaxial cables.
• It is also used in traditional Ethernets.
Properties of light
• Light travels in a straight line as long as it moves through a single uniform
substance. If array traveling through one substance suddenly enters another the ray
changes direction.
Refraction:
If the angle of incidence (the angle the ray makes with the line perpendicular to the
interface between the two substances) is less than the critical angle the ray refracts and
moves closer to the surface.
Reflection:
If the angle of incidence is greater than the critical angle the ray reflects and travels
again in the denser substance.
Optical fibers use reflection to guide light through a channel.
A glass or plastic core is surrounded by a cladding of less dense glass or plastic. The
difference in the density of the two materials must be such that a beam of light moving
through the core is reflected off the cladding.
Propagation Modes
There are two modes for propagating light along optical channels, each requires fiber
with different physical characteristics
• Multimode- Light source move through the core in different paths
• Single mode- Single path.
Profile Index
18
• Step-index- The density of the fiber remains constant from the center to
the edges
• Graded index- The Density is highest at the center of the core and decreases
gradually to its lowest at the edge
Multimode Step –index fiber
• In Multimode Step –index fiber the density of the fiber remains constant from the
center to the edges
• A beam of light moves through this constant density in a straight line .
• When it reaches the interface of the core and the cladding, there is an abrupt
change to a lower density that alters the angle of the beams motion.
• Step-index -> the suddenness of this change.
Single-Mode
• It uses step-index fiber and a highly focused source of light that limits beams to a
small range of angles, all close to the horizontal
• The Single-Mode fiber itself is manufactured with a smaller diameter than that of
multimode fiber and with lower density.
• This results in a critical angle that is close enough to 90. to make it horizontal.
• All the beams arrive at the destination together and can be recombined with little
distortion to the signal.
Fiber Sizes
19
Optical fibers are defined by the ratio of the diameter of their core to the diameter of their
cladding expressed in micrometers.
Fiber-optic cable connectors.
Three different types of connectors are used by fiber –optic cable.
SC ( subscriber channel) Connector:
It is used in cable TV.
ST(Straight-tip) Connector:
It is used for connecting cable to networking devices .
Performance :
• Attenuation is flatter than in the case of twisted pair cable and coaxial cable.
• Few repeaters are needed when we use fiber optic cable.
Application
It is used in cable TV and LAN (Fast Ethernet and 100Base –X.
Advantages
Higher bandwidth: It can support higher bandwidth than twisted pair or coaxial cable.
Less signal attenuation: Transmission distance is greater than that of other guided
media. Signals can be transmitted for 50 km without requiring regeneration.
Immunity to electromagnetic Interference : Electromagnetic noise can not affect fiber-
optic cables
Resistance to corrosive materials: glass is more resistant to corrosive materials.
Light-weight: It is of less weight than the copper cables.
More Immune to taping: Fiber-optic cables are more immune to taping than copper
cables.
Disadvantages :
Installation/Maintenance. Installation/Maintenance need expertise since it is a new
technology.
Unidirectional: Propagation of light is unidirectional. Bidirectional communication is
achieved by means of two optical fibers.
Cost: It is more expensive and the use of optical fiber cannot be justified if the need for
bandwidth is not high.
Line Coding : Line Coding is the process of converting binary data , a sequence of bits ,
to a digital signal.
Unguided Media
Transport electromagnetic waves without using physical connector
Propagation of Waves:
1. Ground wave
2. Sky wave
3. Line of sight
20
Ground wave propagation follows the curvature of the Earth.Ground waves have
carrier frequencies up to 2 MHz. AM radio
Ionospheric propagation bounces off of the Earth’s ionospheric layer in the upper
atmosphere. It is sometimes called double hop propagation. It operates in the frequency
range of 30 - 85 MHz. Because it depends on the Earth’s ionosphere, it changes with the
weather and time of day. The signal bounces off of the ionosphere and back to earth.
Hamradios operate in this range.
Line of sight propagation transmits exactly in the line of sight.The receive station must
be in the view of the transmit station.It is sometimes called space waves or tropospheric
propagation.It is limited by the curvature of the Earth for ground-based stations (100 km,
from horizon to horizon). Reflected waves can cause problems. Examples of line of sight
propagation are: FM radio, microwave and satellite.
Microwave
Microwave transmission is line of sight transmission. The transmit station must be in
visible contact with the receive station. This sets a limit on the distance between stations
depending on the local geography. Typically the line of sight due to the Earth’s curvature
is only 50 km to the horizon! Repeater stations must be placed so the data signal can hop,
skip and jump across the country. Microwaves operate at high operating frequencies of 3
to 10 GHz. This allows them to carry large quantities of data due to their large
bandwidth.
Advantages:
a. They require no right of way acquisition between towers.
b. They can carry high quantities of information due to their high operating frequencies.
c. Low cost land purchase: each tower occupies only a small area.
d. High frequency/short wavelength signals require small antennae.
Disadvantages:
a. Attenuation by solid objects: birds, rain, snow and fog.
b. Reflected from flat surfaces like water and metal.
21
c. Diffracted (split) around solid objects.
d. Refracted by atmosphere, thus causing beam to be projected away from receiver.
Satellite
Satellites are transponders (units that receive on one frequency and retransmit on another)
that are set in geostationary orbits directly over the equator. These geostationary orbits
are 36,000 km from the Earth’s surface. At this point, the gravitational pull of the Earth
and the centrifugal force of Earth’s rotation are balanced and cancel each other out.
Centrifugal force is the rotational force placed on the satellite that wants to fling it out
into space.
Signal level
The number of values allowed in a particular signal are termed as signal level.
Data level
The number of values used to represent data are termed as data level.
DC component(zero frequency):
If the positive voltages are not get cancelled by the negative voltages then it is called a dc
component. This component is undesirable for 2 reasons They are
• If the signal is to pass through a system that does not allow the passage of a dc
component ,the signal is distorted and may create errors in the output.
• This component is an extra energy residing on the line and is useless.
Self-synchronization:
Need : To correctly interpret the signals received from the sender, the receivers bit
intervals must correspond exactly to the senders bit intervals. If the receiver clock is
faster or slower ,the bit intervals are not matched and the receiver might interpret the
signals differently than the sender intended.
22
Bipolar
Unipolar
Unipolar encoding uses only one polarity.0 is represented by zero voltage and 1 is
represented by positive voltage.
It is inexpensive to implement. Unipolar encoding has two problems
Lack of synchronization
A dc component
Polar encoding :
It uses two voltage levels
Positive
Negative
The types of polar encoding are
Non return to zero(NRZ)
Return to zero(RZ)
Biphase
NRZ
The level of the signal is always either positive or negative.
NRZ-L
The level of the signal depends on the type of bit it represents.
The bit 0 is represented by positive voltage
The bit 1 is represented by negative voltage.
Demerits
Problem arises when there is a long stream of 0s or 1s in the data.
23
If the receiver receives a continuous voltage ,it should determine how many bits are sent
by relying on its clock. not be synchronized with the sender clock
NRZ-I
The 1 bit is represented by an inversion (transition between a positive and a negative
voltage) of the voltage level.
A string of 0’s can still cause problems.( not be synchronized)
RZ
It uses three values
• Positive
• Negative &
• Zero
In RZ the signal changes during each bit.
A 1 bit is actually represented by positive-to-zero and
A 0 bit is actually represented by negative-to-zero
Demerits
It requires two signal changes to encode one bit.
It occupies more bandwidth.
Biphase
The signal changes at the middle of the bit interval and does not return to zero.
There are two types of biphase encoding
• Manchester
• Differential Manchester
Manchester
• It uses the inversion at the middle of each bit interval for both synchronization
and bit representation.
• The bit 1 is represented by negative -to-positive transition.
• The bit 0 is represented by positive-to-negative transition.
Merits
A single transition achieves the level of synchronization but with only two levels of
amplitude
24
Differential Manchester
Inversion at the middle of the bit interval is used for synchronization.
Presence or absence of additional transition at the beginning of the interval is used to
identify the bit.
A bit 0 is represented by a transition.
A bit 1 means no transition.
It requires two signal changes to represent binary 0,but only one to represent binary 1.
Bipolar
It uses three voltage levels Positive ,Negative and Zero
• The bit 0 is represented by zero level
• The 1s are represented by alternate positive and negative voltages.If the first 1 bit
is represented by positive amplitude,the second will be represented by the
negative amplitude, and so on.
There are three types of bipolar encoding
AMI
B8ZS
HDB3
Bipolar Alternate Mark Inversion
A binary 0 is represented by zero voltage.
A binary 1s are represented by alternate positive and negative voltages.
25
Merits
By inverting on each occurrence of 1,
The dc component is zero
A long sequence of 1s stays synchronized.
Pseudoternary
A binary 0 alternate between positive and negative voltages.
26
Differential Signal Encoding
The bipolar-AMI encoding supplemented with a scrambling scheme, which uses two
code violations to ensure synchronization in runs of 0's.
• Replace `00000000' with `000+-0-+', if the preceding voltage pulse was positive
• Replace `00000000' with `000-+0+-', if the preceding voltage pulse was not
positive
The bipolar-AMI encoding supplemented with the following substitution scheme for
`0000' runs.
27
Comparison
The comparison of the different encoding schemes of the following NRZ, Polar
NRZ,NRZ Inverted, Bipolar, Manchester, Differential Manchester are given.
MODEMS
The term modem is a composite word that refers to the two functional entities that make
up the device; a signal modulator and a signal demodulator. A modulator creates a band-
pass analog signal from binary data. A demodulator recovers the binary data from the
modulated signal.
28
TELEPHONE MODEMS
Traditional telephone lines can carry frequencies between 300 and 3300 HZ, giving them
BW of 3000 Hz; All this range is used for transmitting voice, where a great deal of
interference and distortion can be accepted without loss of intelligibility.
The effective BW of a telephone line being used for data Transmission is 2400 Hz,
covering the range from 600 to 3000 Hz.
Modem Modem
A B
Figure shows the relationship of modems to a communication link. The computer on the
left sends binary data to the modulator portion of the modem; the data is sent as an analog
signal on the telephone lines. The modem on the right receives the analog signal,
demodulates it through its demodulator, and delivers data to the computer on the right.
The communication can be bidirectional, which means the computer on the right can also
send data to the computer on the left using the same modulation and demodulation
processes.
MODEM TYPES
Traditional modems
29
Sampling & noise
Telephon Inverse
PCM/IPCM
e network PCM/PCM
Modem A to B Modem
Quantization
noise happens in
the Telco office
near A & B to A
A B
After modulation by the modem, an analog signal reaches the telephone company
Switching station. Where it is sampled and digitized to be passed through the digital
network. The quantization noise introduced in the signal at the sampling point limits the
data rate according to the capacity. This limit is 33.6 Kbps.
56K Modems
Communication today is via the Internet. In Uploading, The analog signal must still be
sampled at the switching station, which means the data rate in the uploading is limited to
33.6 Kbps. There is no sampling in downloading. Data rate in downloading is 56Kbps.
56K MODEMS
PCM Telephon
e network ISP
server
Modem
Uploading,
quantization
noise
30
Cable Modem
A cable modem is a device that enables you to hook up your PC to a local cable TV line
and receive data at about 1.5 Mbps. This data rate far exceeds that of the prevalent 28.8
and 56 Kbps telephone modems and the up to 128 Kbps of Integrated Services Digital
Network (ISDN) and is about the data rate available to subscribers of Digital Subscriber
Line (DSL) telephone service. A cable modem can be added to or integrated with a set-
top box that provides your TV set with channels for Internet access. In most cases, cable
modems are furnished as part of the cable access service and are not purchased directly
and installed by the subscriber.
A cable modem has two connections: one to the cable wall outlet and the other to a PC or
to a set-top box for a TV set. Although a cable modem does modulation between analog
and digital signals, it is a much more complex device than a telephone modem. It can be
an external device or it can be integrated within a computer or set-top box. Typically, the
cable modem attaches to a standard 10BASE-T Ethernet card in the computer.
All of the cable modems attached to a cable TV company coaxial cable line communicate
with a Cable Modem Termination System (CMTS) at the local cable TV company office.
All cable modems can receive from and send signals only to the CMTS, but not to other
cable modems on the line. Some services have the upstream signals returned by telephone
rather than cable, in which case the cable modem is known as a telco-return cable
modem.
The actual bandwidth for Internet service over a cable TV line is up to 27 Mbps on the
download path to the subscriber with about 2.5 Mbps of bandwidth for interactive
responses in the other direction. However, since the local provider may not be connected
to the Internet on a line faster than a T-carrier system at 1.5 Mpbs, a more likely data rate
will be close to 1.5 Mpbs.
In addition to the faster data rate, an advantage of cable over telephone Internet access is
that it is a continuous connection.
V.92
The standard above V.92 is called V.92. These modems can adjust their speed,
and if the noise allows, they can upload data at the rate of 48 Kbps. The modem has
additional features. For example, the modem can interrupt the internet connection when
there is an incoming call if the lines has call-waiting service.
31
Modem standards
Modulation Theoretical
Mode Description
Standard Bandwidth
Full
CCITT V.21 300 bps An international standard similar to the Bell 103 standard.
duplex
Half
ITU V.22 1,200 bps An international standard close to the Bell 212A standard.
duplex
32
Bell 103 - Asynchronous data transmission, full-duplex operation over 2-wire dialup or
leased lines; 300-bps data rate. Ideal for the "low demand" user who exchanges files
infrequently with another PC user or an on-line bulletin board. Comparable to ITU V.21.
This modulation is well suited for bad phone lines – as the communication guys use to
say "103 modems will work on barb wire".
Bell 201 B, Bell 201 C - 201 B: Synchronous data transmission, full-duplex operation
over 4-wire leased lines and half-duplex operation over 2-wire leased lines; 2400-bps
data rate. 201 C: synchronous data transmission, half-duplex operation over 2-wire dialup
lines; 2400-bps data rate. Both are comparable to ITU V.26. Bell 201 B compatible
modems are the first of the fast modems. Many businesses still use them in typical
terminal-to-host, multidrop applications. Bell 201 C modems are for use with dialup lines
and are basically a complement to the 201 B.
If you need to transmit synchronous data (for example, IBM' 3780/2780 applications) at
2400 bps, but you don't need the on-demand performance and cost of a leased line, then
consider buying a Bell 201 C.
Bell 208 A, Bell 208 B - 208 A: Synchronous data transmission, full-duplex operation
over 4-wire leased lines, half-duplex operation over 2-wire leased lines; 4800-bps data
rate. 208 B: same as 208 A, but over 2-wire dialup lines. Comparable to ITU V.27. The
first standards to enable higher-speed data transmission (4800 bps) over leased lines for
multipoint networks. For example, these standards enable us connect IBM mainframes at
a central office to terminals in branch office, with fewer modems and more A efficient in-
house cable runs.
Error correction and data compression ensure accurate, swift data transfers. The protocols
are employed during the data exchange between two modems. The following protocols
are the most widely used by today's modems:
V.32
This modem uses a combined modulation and demodulation encoding technique
called trellis-coded modulation. Trellis is essentially QAM plus a redundant bit. The Data
stream is divided into 4-bit sections. Instead of a quad bit, however, a pentabit is
transmitted. The value of the extra bit is calculated from the values of the data bits.
The V.32 calls for 32-QAM with a baud rate of 2400. Because only 4 bits of each
pentabit represents data, the resulting speed is 4*2400=9600.
FDX 2400 baud 9600 bps 2-wire
33
600 1800 3000
Bandwidth diagram
V.32 bis
The V.32 bis modem support 14,400-bps transmission. The V.32 uses
128-QAM transmission.
V.34 bis
The V.34 bis modem support 28,800-bps transmission with a 960-point
constellation to a bit rate of 33,600 with a 1664-point constellation.
V.90
Traditional modems have a limitations on the data rate.V.90 modems with
a bit rate of 56,000 bps, called 56Kmodems, are available. Downloading rate is 56K,
while the uploading rate is a maximum of 33.6 kbps.
RS 232 INTERFACE
• RS 232 is a standard interface by EIA and RS232C is the latest version of this
interface.
• It expects a modem to be connected to both receiving and transmitting end.
• The modem is termed as DCE(Data Communication Equipment) And the
computer with which modem is interfaced is called DTE (Data Terminal
Equipment).
• The DCE and DTE are linked via a cable whose length does not exceed 50 feet.
The DTE has 35 pins male connector and DCE has 25 pins Female connector.
Mechanical Specification
The mechanical specification of the EIA-232 standard defines the interfaces a 25-
wire cable with a male and female DB-25 pin connector attached to either end. The
length of the cable may not exceed 15 meters.
A DB-25 connector is a plug with 25 pins or receptacles, each of which is
attached to a single wire with a specific function. With this design, the EIA has created
the possibility of 25 separate interactions between a DTE and a DCE. The EIA- 232 calls
for a 25-wire cable terminated at one end by a male connector refers to a plug with each
wire in the cable connecting to a pin. The term female connector refers to a receptacle
with each wire in the cable connecting to a metal tube, or sheath. In the DB-25 connector,
these pins and tubes are arranged in two rows, with 13 on the top and 12 on the bottom.
Electrical Specification
The electrical specification of the standard defines the voltage levels and the type
of signal to be transmitted in either direction between the DTE and the DCE.
34
Sending the Data
The electrical specification for sending data is shown in figure EIA-232 states that
all data must be transmitted as logical is 1s and 0s using NRZ-L encoding, with 0 defined
as a positive voltage and 1 defined as a negative voltage. However, rather than defining a
single range bounded by highest and lowest amplitudes. EIA-232 defines two distinct
ranges, one for positive voltages and one for negative. A receiver recognizes and accepts
as an intentional signal any voltage that falls within these ranges, but no voltages that fall
between 3 and 15 volts or between -3 and -15 volts.
Functional Specification
Two different implementations of EIA-232 are available: DB-25 and DB-9.
Each communications function has a mirror or answering function for traffic in
the opposite direction, to allow for full-duplex operation. For example, pin 2 is for
transmitting data, while pin 3 is for receiving data. In this way, both parties can transmit
data at the same time. As you can see from figure not every pin is functional. Pins 9 and
10 are reserved for future use. Pin 11 is as yet unassigned.
DB-9 Implementation
Many of the pins on the DB-25 implementation are not necessary in a single
asynchronous connection. A simpler 9-pin version of EIA-232 known as DB-9 and
shown in figure was developed. Note that there is no pin-to-pin relationship in the two
implementations.
35
1. RS232 Signal LEVEL
• RS232 standard follows –ve logic, Logic1 is represented by negative
voltage., logic0 is represented by +ve voltage.
• Level 1 varies from -3 to -15v and level 0 varies from 3 to 15v
2. RS232 SIGNALS
• Before sending data to the other end the DTE requests the permission from the
modem by issuing RTS signal.
• The modem has a method to find out if any telephone line is free and if the other
end of modem is ready.
• When the modem finds the communication path is ready for communication it
issues CTS signal to DTE as an acknowledgement.
• The DTE issues DTR signal when it is powered on, error free and ready for
logical connection through the modem.
36
• The modem issues a DSR signal to indicate that it is powered on and it is error
free.
• The data is transferred by TXD signal from DTE to DCE and RXD signal
receives data from DCE to DTE.
• The RI and RLSD signals are used with the dialed modem, when the telephone
link is shared.
37
UNIT II
ERROR:
TYPES OF ERRORS:
The term single bit error means that only one bit of a given data unit is changed
from 1 to 0 or 0 to 1. 010101 is changed to 110101 here only one bit is changed
by single bit error.
• Burst Error:
A burst error means that 2 or more bits in the data unit have changed.
• the bits in the frame can be inverted, anywhere within the frame including the
data bits or the frame's control bits,
• additional bits can be inserted into the frame, before the frame or after the frame
and bits can be deleted from the frame.
38
DETECTION
Redundancy
Error detection use the concept of redundancy, which means adding extra bits for
detecting errors at the destination .i.e., instead of repeating the entire data stream, a
shorter group of bits may be appended to the end of each unit.
101000000001010 10100000000101010
O
k
1010000000010101 1011101
?
101000000001010 1011101
Medium
Above figure shows the process of using redundant bits to check the accuracy of a data
unit. Once the data stream has been generated, it passes through a device that analyses it
and adds an appropriately coded redundancy check.
The receiver puts the entire stream through a checking function. The received bit stream
passes the checking criteria. The data portion of the unit is accepted if there is no error,
otherwise rejected and the redundant bits are discarded.
Detection methods
• Parity check
• Cyclic redundancy check
• checksum
Parity check
A redundant bit called parity bit, is added to every data unit so that the total number of
1’s in the unit becomes even (or odd).
39
Example 1: data to be transmitted = 10110101
Form data into a 2-dimensional array; add single parity check bits to each row
and each column; transmit row-by-row
Example: data = 1110001 1000111 0011001
• Form 3×7 array and add row and column parity bits:
Data bits
1110001 0
1000111 0 row
0011001 1 parity bits
0101111 1
Column parity
bits
40
1 •Example (cont.): suppose bit in position (1,3) is received in error (in other words,
1 bit error)
Therefore the receiver can detect that bit errors Occurred, but it cannot Correct them (here, if the
Bit errors were in positions (1,3) and (2,1) instead, the receiver parity checks would be the same)
CRC is based on binary division.In CRC, instead of adding bits to achieve the
desired parity, a sequence of redundant bits, called the CRC or the CRC remainder, is
appended to the end of the data unit so that the resulting data unit becomes exactly
divisible by a second, predetermined binary number. At its destination, the incoming data
unit is assumed to be intact and is therefore accepted. A remainder indicates that the data
unit has been damaged in transit and therefore must be rejected.
• Dividing the data unit by a predetermined divisor derives the redundancy bits
used by CRC; the remainder is CRC.
• First a starting of n 0’s is appended to the data unit. The number n is one less than
the number of bits in the predetermined divisor, which is n+1 bits.
• The newly elongated data unit is divided by the divisor, using a process called
binary division. The remainder resulting from this division is the CRC.
• The CRC of n bits derived in step 2 replaces the appended 0s at the end of the
data unit. Note that the CRC may consist of all 0s.
• The data unit arrives at the receiver data first, followed by the CRC. The receiver
treats the whole string as unit and divides it by the same divisor that was used to
find the CRC remainder.
• If the string arrives without error, the CRC checker yields a remainder of zero ad
the data unit passes. If the string has been changed in transit, the division yields a
non zero remainder and the data does not pass.
41
data CRC data 00..
00
N bits
divisor divisor
CRC
N+
data
1
remainder CRC bits
Zero, accept
Non zero, reject
receiver sender
111101
1000
1101
1010
1101
1110
1101
0110
0000
1100
1101
0 0 1 remainder(CRC)
42
CRC CHECKER
• A CRC checker function is exactly as the generator does. After receiving the data
appended with the CRC, it does the same modulo-2 division.
• If the remainder is all 0s, the CRC is dropped and the data are accepted;
otherwise, the received stream of bits is discarded and data are resent.
• The following figure shows the process of division in the receiver. We assume
that there is an error.
• The remainder is not full of 0s, and the data are rejected.
111101
1000
1101
1010
1101
1110
1101
0110
0000
1101
1101
0 0 1 result
POLYNOMIALS
The divisor in the CRC most often represented not as a string of 1s and 0s, but as
an algebraic polynomial. The polynomial format is useful to solve the concept
mathematically.
x7+x5+x2+x+1
A polynomial
x7+x5+x2+x+1
43
1010 0 1 1 1
CHECKSUM
CHECKSUM GENERATOR
In the sender side , the checksum generator subdivides the data unit into equal segments
of n bits.
• These segments are added using ones complement a, the total is also in n bits long
• The total is then complemented and appended to the end of the original data unit
as redundancy bits, called the checksum field.
• The extended data is transmitted across the network.
Receiver sender
Section2 Section2
N bits N bits
--------- ---------
Checksum N bits Checksum All 0s
CHECKSUM CHECKER
• The receiver subdivides the data unit into k sections each of n bits.
• All sections are added using ones complement arithmetic to get the sum.
• The sum is complemented.
• If the result is zero, the data are accepted: otherwise they are rejected.
EXAMPLE
Suppose the block of 16 bits is to be sent using a checksum of 8 bits.
10101001 00111001
the numbers are added using ones complement arithmetic
44
10101001
00111001
11100010 sum
10101001
00111001
00011101
11111111 sum
10101111
11111001
00011101
111000101
1
11000101 sum
00111000 complement ( the pattern is corrupted )
PERFORMANCE
• It detects all errors involving an odd number of bits as well as most errors
involving an even number of bits.
45
• If one or more bits of a segment are damaged and the corresponding bit or bits
of opposite value in the second segment are also damaged, the sum of those
columns will not change and the receiver will not detect the problem.
HAMMING CODE:
1 •A minimum number of redundancy bits needed to correct any single bit error in
2 the data
3
4 •A minimum of 4 redundancy bits is needed if the number of data bits is 4.
5
6 •Redundancy bits in the Hamming code are placed in the codeword bit positions
7 that are a power of 2
8
9 •Each redundancy bit is the parity bit for a different combination of data bits
10
11 •Each data bit may be included in more than one parity check.
46
• Easy way to compute the redundancy bit values: write down binary
representations for positions of data bits which contain a 1; compute parity
bits for each “column”; put parity bits into codeword in correct order.
• Here: data is 1001101 so codeword will look like 100x110x1xx (where x denotes
redundancy bits) ⇒1’s in positions 3, 6, 7, and 11
11: 1 0 1 1
7: 0 1 1 1
6: 0 1 1 0
3: 0 0 1 1
1001
parity bits
r1 r2 r4 r8
So codeword is 10011100101(as before)
suppose that the bit in position 7 is received in error:
1 • If the transmitted codeword is received error-free, the “new” parity bits the
receiver computes will all be 0 ,the receiver knows no bit errors occurred.
1 • This simple form of Hamming code can be used to provide some protection
against burst errors, by transmitting 1st bit from every codeword to be transmitted, then
2nd bit from every one of these codeword, and so on…In some cases, burst errors can be
corrected
47
1
.FLOW CONTROL
Flow control coordinates that amount of data that can be sent before receiving ACK It is
one of the most important duties of the data link layer.
ERROR CONTROL
• Error control in the data link layer is based on ARQ (automatic repeat request), which
is the retransmission of data.
• The term error control refers to methods of error detection and retransmission.
• Anytime an error is detected in an exchange, specified frames are retransmitted. This
process is called ARQ.
48
• A damaged or lost frame is treated in the same manner by the receiver. If the
receiver detects an error in the received frame, it simply discards the frame and
sends no acknowledgement.
• The sender has a control variable, which we call S, that holds the number of
recently sent frame. The receiver has a control variable, which we call R that
holds the number of the next frame expected.
• The sender starts a timer when it sends a frame. If an ACK is not received within
an allotted time period the sender assumes that the frame was lost or damaged and
resends it.
• The receivers send only positive ACK for frames received safe and sound; it is
silent about the frames damaged or lost.
OPERATION:
The possible operations are
Normal operation
lost frame
ACK lost
delayed ACK.
The sender sends frame 0 and wait to receive ACK 1. when ACK 1 is received it sends
frame 1 and then waits to receive ACK 0, and so on.
The ACK must be received before the time out that is set expires. The following figure
shows successful frame transmission.
Sender Receive
r
S=0 Frame 0
R=0
ACK 1
S=1 Frame 1
R=1
ACK 0
S=0
•
•
•
Time Time
Lost or damaged acknowledgement
o When the receiver receives the damaged frame it discards it, which essentially
means the frame is lost. The receiver remains silent about a lost frame and
keeps its value of R.
49
o For example in the following figure the sender transmits frame 1, but it is lost.
The receiver does nothing, retaining the value of R (1). After the timer at the
sender site expires, another copy of frame 1 is sent.
Sender Receive
r
S=0 Frame 0
R=0
ACK 1
S=1 Frame 1
R=1
Lost
S=1 Frame 1 R=1
Time-out
ACK0 R=0
S=0
Lost acknowledgement
o A lost or damaged ACK is handle in the same by the sender; if the sender
receives a damaged ACK, it discards it.
o The following figure shows a lost ACK 0.the waiting sender does not know if
frame 1 has been received. When the timer for frame 1 expires the sender
retransmits frame 1.
o Note that the receiver has already received frame 1 and is expecting to receive
frame 0. Therefore, its silently discards the second copy of frame 1.
Sender Receive
r
S=0 Frame 0
R=0
ACK 1
S=1 Frame 1
R=1
ACK 0
Time-out S=1 Lost
Frame 1
R=0
ACK0
S=0 Expecting frame 0
Frame 1 is discarded
50
Time Time
• Delayed acknowledgement
o An ACK can be delayed at the receiver or by some problem with the link. The
following figure shows the delay of ACK 1; it ids received after the timer for
frame 0 as already expired.
o The sender has already retransmitted a copy of frame 0. The receiver expects
frame 1 so its simply discards the duplicate frame 0.
o The sender has now received two ACK’s, one that was delayed and one that
was sent after the duplicate frame 0 arrived. The second ACK 1 is discarded.
Sender Receive
r
S=0 Frame 0
R=0
Time-out ACK1
S=0 Frame0 R=1
S=1 Frame1
Time-out R=1
ACK0
Time Time
BIDIRECTIONAL TRANSMISSION
The stop – and – wait mechanism is unidirectional. We can have bi-directional
transmission if the two parties have two separate channels for full duplex communication
or share the same channel for off duplex transmission. In this case, each party needs both
S and R variables to track frames sent and expected.
PIGGYBACKING
It’s a method to combine a data frame with an ACK. In following figure both the
sender and the receiver have data to send. Instead of sending separate data and ACK
frames. It can save bandwidth because the overhead from a data frame and an ACK frame
can be combined into just one frame
51
Sender Receive
r
R=0
S=0 Frame 0,ACK0 R=0
S=0
R=0 Frame0,ACK 1
S=1
Frame 1,ACK1 R=1
S=1
R=1 Frame1,ACK 0
S=0
Time Time
GO-BACK-N ARQ
• As in Stop-and-wait protocol senders has to wait for every ACK then next frame
is transmitted. But in GO-BACK-N ARQ number of frames can be transmitted
without waiting for ACK. A copy of each transmitted frame is maintained until
the respective ACK is received.
1.sequence numbers.
Sequence numbers of transmitted frames are maintained in the header of
frame. If k is the number of bits for sequence number, then the numbering can
range from 0 to 2k-1. Example: if k=3 means sequence numbers are 0 to 7.
2. sender sliding window:
• Window is a set of frames in a buffer waiting for ACK. This window keeps on
sliding in forward direction, the window size is fixed. As the ACK is received, the
respective frame goes out of window and new frame to sent come into window.
Figure illustrates the sliding window.
• If Sender receives. ACK 4, then it knows Frames upto
and including Frame 3 were correctly received
52
Window size=7
6 7 0 1 2 3 4 5 6 7
4. Control variables:
Sender variables and Receiver variables:
Sender deals with three different variables
S -> sequence number of recently sent frame
SF -> sequence number of first frame in the window.
SL -> sequence number of last frame in the window.
The receiver deals with only one variable
R -> sequence number of frame expected.
5. Timers
The sender has a timer for each transmitted frame. The receivers don’t have any
timer.
6. Acknowledgement:
The receiver responds for frame arriving safely by positive ACK. For damaged or
lost frames receiver doesn’t reply, the sender has to retransmit it when timer of that frame
elapsed. The receiver may ACK once for several frames.
7. resending frames:
if the timer for any frame expires, the sender sender has to
resend that frame and the subsequent frame also, hence the protocol is called GO-
BACK-N ARQ.
Operation
Normal operation:Following diagram shows this mechanism. The sender keeps track of
the outstanding frames and updates the variables and windows as acknowledgements
arrive.
53
Sender Receive
SF SL r
0 1 2 3 0 1 Frame 0
0 1 2 3 0 1
S Frame 1
0 1 2 3 0 1
0 1 2 3 0 1 ACK 2
S Frame 2
0 1 2 3 0
0 1 2 3 0 1 ACK3
S Frame 3 0 1 2 3 0 1
0 1 2 3 0 •
•
S
Time Time
Damaged or lost frame:
Figure shows that frame 2 is lost. Note that when the receiver receives frame 3, it is
discarded because the receiver is expecting frame 2, not frame3. after the timer for frame
2 expires at the sender site, the sender sends frame 2 and 3.
Sender Receive
SF SL r
0 1 2 3 0 1 Frame 0
0 1 2 3 0 1
S Frame 1
0 1 2 3 0 1
0 1 2 3 0 1 ACK 2
S Frame 2 lost
0 1 2 3 0
0 1 2 3 0 1
Frame 3
0 1 2 3 0 1 Frame 3 is discarded, not
in the window
54
Timeout
resent Frame 2
0 1 2 3 0 1
0 1 2 3 0 1
Frame 3
resent
0 1 2 3 0 • 0 1 2 3 0 1
•
S R
Time Time
Delayed Acknowledgement:
A delayed ACK also triggers the resending of frames.
55
selective repeat also defines a negative ACK NAK that reports the sequence
number of a damaged frame before the timer expires.
Operation
Normal operation
Normal operations of the selective repeat ARQ is same as GO-BACK-N ARQ
mechanism.
Lost or damaged frame
The following figure shows operation of the mechanism with an example of a lost
frame.
Frame 0 and 1 are accepted when received because they are in the range specified
by the receiver window. When frame 3 is received, it is also accepted for the same
reason. However the receiver sends a NAK 2 to show that frame 2 has not been
received. When the sender receives the NAK 2, it resends only frame 2, which is then
accepted because it is in the range of the window.
Sender Receive
r
0 1 2 3 0 1 Frame 0
0 1 2 3 0 1
S Frame 1
0 1 2 3 0 1
0 1 2 3 0 1 ACK 2
S Frame 2 lost
0 1 2 3 0 1
Frame 3
0 1 2 3 0 1
56
NAK 2 0 1 2 3 0 1
Frame 2
0 1 2 3 0 1
resent 0 1 2 3 0 1
Time Time
In this sender also sets a timer for each frame sent. The remaining operations are
same as GO-BACK-N ARQ.
• HDLC standardized ISO in 1979 and accepted by most other standards bodies
(ITU-T, ANSI)
• 3 types of end-stations:
Primary–sends commands
Secondary–can only respond to Primary’s commands
Combined–can both command and respond
• 3 types of configuration
(Note: no balanced multipoint)
57
TRANSFER MODE
FRAMES:
3 types of Frames are
1 I-Frame – transports user data and control info about user data.
1 S-Frame – supervisory Frame, only used for transporting control information
1 U-Frame – unnumbered Frame, reserved for system management(managing the
link itself)
58
FRAME FORMAT
U-Frames:
• U-frames are used for functions such as link setup. They do not contain any
sequence numbers.
• Five code bits denote the frame type (but there are not 32 different possibilities):
• Set Asynchronous Balanced Mode (SABM).Used in the link set up to indicate
ABM mode will be used.
• Set Normal Response Mode (SNRM).Used for asymmetric mode (master/slave).
• SABME and SNMRE—extended format.
• Disconnect (DISC).Used to disconnect the logical connection.
• Frame Reject (FRMR)—reject frame with incorrect semantics.
• Unnumbered Acknowledgement (UA).Used to acknowledge other frames in this
class.
• Unnumbered Information (UI)–initialisation, poling and status information
needed by the data link layer.
• U-frames may carry data when unreliable connectionless service is called for.
S-Frames:
• S-frames are similar to unnumbered frames, the main difference being that they
do carry sequence information.
• Some supervisory frames function as positive and negative acknowledgements,
they therefore play a very important role in error and flow control.
59
• Two bits indicate the frame type, so that there are four possibilities.
Control Field:
60
Physical topology
90 50 120
400 75
50 75
400
120 90
Medium options
1. Broadband: Transmission medium is co-axial cable and its uses AM/PSK
as a signaling techniques, data rate is 1,5,10 mbps.
2. Carrier band: Transmission medium is co-axial cable and its uses KSK as
a signaling techniques, data rate is 1,5,10Mbps.
61
3. Optical fiber: Transmission medium is optical fiber and its uses ASK with
Manchester encoding as a signaling techniques, data rate is 5,10,20Mbps.
Preamble
pr SD FC DA SA DATA FCS ED
• Preamble: the preamble is an at least one byte long pattern to establish bit
synchronization
• SD: Start frame delimiter: Its also one byte unique bit pattern, which marks the
start of the frame.
• FC: Frame control: The frame control field is used to distinguish data frames from
control frames. For data frame, it carries the frames priority. The frame control
field indicates the type of the frame data frame or control frame.
• DA: Destination address: The destination address field is 2 or 6 bytes long.
• SA: Source address: The destination address field is 2 or 6 bytes long.
• DATA: Data field
• FCS: Frame check sequence: frame check sequence is 4 bytes long and contains
CRC code. It is used to detect transmission errors on DA, SA, FC and data fields.
• ED: End delimiter: It is a unique bit pattern, which marks the end of the frame. It
is one byte long.
• The total length of the frame is 8191 bytes.
Performance:
For token ring, the slightly higher delay compared to CSMS/CD bus occurs. For
higher transmission loads the token ring performs well.
62
• Each station is connected to the ring through a Ring Interface Unit (RIU). The
sequence of token is determined by the physical locations of the stations on the
ring.
The following figure shows the operation and arrangement of the Token Ring.
stations
Unidirectional bus
Ring interface
63
1 1 1 byte
SD AC ED
Data Frame
• SD: Start frame delimiter: Its also one byte unique bit pattern, which marks the
start of the frame.
• AC: Access control: It is one byte long field containing priority bits(P), Token
bit(T),
monitoring bit(M), and reservation bir(R).
• FC: Frame control: The frame control field is used to distinguish data frames from
control frames. For data frame, it carries the frames priority. The frame control
field indicates the type of the frame data frame or control frame.
• DA: Destination address: The destination address field is 2 or 6 bytes long.
• SA: Source address: The destination address field is 2 or 6 bytes long.
• DATA: Data field
• FCS: Frame check sequence: frame check sequence is 4 bytes long and contains
CRC code. It is used to detect transmission errors on DA, SA, FC and data fields.
• ED: End delimiter: It is a unique bit pattern, which marks the end of the frame. It
is one byte long.
• FS: Frame status: This field is none byte long and contains a unique bit pattern
marking the end of a token or a data frame.
Performance:
When traffic is light, the token will spend most of its time idly circulating around
the ring. When traffic is heavy, there is a queue at each station. Network efficiency is
more.
Disadvantages:
• A break in a link or repeater failures disturbs the entire network.
• Installation of new repeaters requires identification of two topologically
adjacent repeaters.
64
• Since the ring is closed loop, a packet will circulate indefinitely unless it is
removed.
• Each repeater adds an increment of delay.
• There is practical limit to the number of repeaters.
Introduction
The Fiber Distributed Data Interface (FDDI) specifies a 100-Mbps token-passing, dual-
ring LAN using fiber-optic cable. FDDI is frequently used as high-speed backbone
technology because of its support for high bandwidth and greater distances than copper. It
should be noted that relatively recently, a related copper specification, called Copper
Distributed Data Interface (CDDI), has emerged to provide 100-Mbps service over
copper. CDDI is the implementation
of FDDI protocols over twisted-pair copper wire. This chapter focuses mainly on FDDI
specifications and operations, but it also provides a high-level overview of CDDI.
FDDI uses dual-ring architecture with traffic on each ring flowing in opposite directions
(called counter-rotating). The dual rings consist of a primary and a secondary ring.
During normal operation, the primary ring is used for data transmission, and the
secondary ring remains idle. As will be discussed in detail later in this chapter, the
primary purpose of the dual rings is to provide superior reliability and robustness. Figure
8-1 shows the counter-rotating primary and secondary FDDI rings.
FDDI Specifications
FDDI specifies the physical and media-access portions of the OSI reference model. FDDI
is not actually a single specification, but it is a collection of four separate specifications,
each with a specific function. Combined, these specifications have the capability to
provide high-speed connectivity between upper-layer protocols such as TCP/IP and IPX,
and media such as fiber-optic cabling.
FDDI's four specifications are the Media Access Control (MAC), Physical Layer
Protocol (PHY), Physical-Medium Dependent (PMD), and Station Management (SMT)
specifications. The MAC specification defines how the medium is accessed, including
frame format, token handling, addressing, algorithms for calculating cyclic redundancy
check (CRC) value, and error-recovery mechanisms. The PHY specification defines data
encoding/decoding procedures, clocking requirements, and framing, among other
functions. The PMD specification defines the characteristics of the transmission medium,
including fiber-optic links, power levels, bit-error rates, optical components, and
connectors. The SMT specification defines FDDI station configuration, ring
configuration, and ring control features, including station insertion and removal,
initialization, fault isolation and recovery, scheduling, and statistics collection.
65
FDDI is similar to IEEE 802.3 Ethernet and IEEE 802.5 Token Ring in its relationship
with the OSI model. Its primary purpose is to provide connectivity between upper OSI
layers of common protocols and the media used to connect network devices. Figure 8-3
illustrates the four FDDI specifications and their relationship to each other and to the
IEEE-defined Logical Link Control (LLC) sublayer. The LLC sublayer is a component of
Layer 2, the MAC layer, of the OSI reference model.
The FDDI frame format is similar to the format of a Token Ring frame. This is one of the
areas in which FDDI borrows heavily from earlier LAN technologies, such as Token
Ring. FDDI frames can be as large as 4,500 bytes. Figure 8-10 shows the frame format of
an FDDI data frame and token.
66
Figure 8-10: The FDDI Frame Is Similar to That of a Token Ring Frame
The following descriptions summarize the FDDI data frame and token fields illustrated in
Figure 8-10.
Dual Ring
FDDI's primary fault-tolerant feature is the dual ring. If a station on the dual ring fails or
is powered down, or if the cable is damaged, the dual ring is automatically wrapped
(doubled back onto itself) into a single ring. When the ring is wrapped, the dual-ring
topology becomes a single-ring topology. Data continues to be transmitted on the FDDI
67
ring without performance impact during the wrap condition. Figure 8-6 and Figure 8-7
illustrate the effect of a ring wrapping in FDDI.
68
When a single station fails, as shown in Figure 8-6, devices on either side of the failed (or
powered-down) station wrap, forming a single ring. Network operation continues for the
remaining stations on the ring. When a cable failure occurs, as shown in Figure 8-7,
devices on either side of the cable fault wrap. Network operation continues for all
stations.
It should be noted that FDDI truly provides fault tolerance against a single failure only.
When two or more failures occur, the FDDI ring segments into two or more independent
rings that are incapable of communicating with each other.
Figure 7-4 shows the IEEE 802.3 logical layers and their relationship to the OSI
reference model. As with all IEEE 802 protocols, the ISO data link layer is divided into
two IEEE 802 sublayers, the Media Access Control (MAC) sublayer and the MAC-client
sublayer. The IEEE 802.3 physical layer corresponds to the ISO physical layer.
• Logical Link Control (LLC), if the unit is a DTE. This sublayer provides the interface
between the Ethernet MAC and the upper layers in the protocol stack of the end station.
The LLC sublayer is defined by IEEE 802.2 standards.
• Bridge entity, if the unit is a DCE. Bridge entities provide LAN-to-LAN interfaces
between LANs that use the same protocol (for example, Ethernet to Ethernet) and also
between different protocols (for example, Ethernet to Token Ring). Bridge entities are
defined by IEEE 802.1 standards.
Because specifications for LLC and bridge entities are common for all IEEE 802 LAN
protocols, network compatibility becomes the primary responsibility of the particular
69
network protocol. Figure 7-5 shows different compatibility requirements imposed by the
MAC and physical levels for basic data communication over an Ethernet link.
Figure 7-5 MAC and Physical Layer Compatibility Requirements for Basic Data
Communication
The MAC layer controls the node's access to the network media and is specific to the
individual protocol. All IEEE 802.3 MACs must meet the same basic set of logical
requirements, regardless of whether they include one or more of the defined optional
protocol extensions. The only requirement for basic communication (communication that
does not require optional protocol extensions) between two network nodes is that both
MACs must support the same transmission rate.
The 802.3 physical layer is specific to the transmission data rate, the signal encoding, and
the type of media interconnecting the two nodes. Gigabit Ethernet, for example, is
defined to operate over either twisted-pair or optical fiber cable, but each specific type of
cable or signal-encoding procedure requires a different physical layer implementation.
• Media access control, including initiation of frame transmission and recovery from
transmission failure
70
The Basic Ethernet Frame Format
The IEEE 802.3 standard defines a basic data frame format that is required for all MAC
implementations, plus several additional optional formats that are used to extend the
protocol's basic capability. The basic data frame format contains the seven fields shown
in Figure 7-6.
• Data—Is a sequence of n bytes of any value, where n is less than or equal to 1500. If
the length of the Data field is less than 46, the Data field must be extended by adding a
filler (a pad) sufficient to bring the Data field length to 46 bytes.
Figure 7-6 The Basic IEEE 802.3 MAC Data Frame Format
71
Note Individual addresses are also known as unicast addresses because they refer to a
single MAC and are assigned by the NIC manufacturer from a block of addresses
allocated by the IEEE. Group addresses (a.k.a. multicast addresses) identify the end
stations in a workgroup and are assigned by the network manager. A special group
address (all 1s—the broadcast address) indicates all stations on the network.
Frame Transmission
After the frame is assembled, actual frame transmission will depend on whether the MAC
is operating in half-duplex or full-duplex mode.
The IEEE 802.3 standard currently requires that all Ethernet MACs support half-duplex
operation, in which the MAC can be either transmitting or receiving a frame, but it
cannot be doing both simultaneously. Full-duplex operation is an optional MAC
capability that allows the MAC to transmit and receive frames simultaneously.
UNIT III
72
Network Layer
• Transport segment from sending to receiving host.
• On sending side encapsulates segments into datagrams.
• On receiving side, delivers segments to transport layer.
• network layer protocols in every host, router.
• Router examines header fields in all IP datagrams passing through it.
Network-Layer Functions
• forwarding: move packets from router’s input to appropriate router
Output.
• routing: determine route taken by packets from source to destination.
Internetworking
Switching Schemes
Circuit Switching
• Provides service by setting up the total path of connected lines hop-by-hop from the
origin to the destination
• Example: Telephone network
73
VC implementation
A VC consists of:
1. Path from source to destination
2. VC numbers, one number for each link along path
3. Entries in forwarding tables in routers along path
Packet belonging to VC carries a VC number.
VC number must be changed on each link.
New VC number comes from forwarding table
Packet Switching
• Messages are split into smaller pieces called packets.
• These packets are numbered and addressed and sent through the network one at a time.
• Allows Pipelining
– Overlap sending and receiving of packets on multiple links.
74
IP Addresses
Each network interface on the Internet as a unique global address, called the
IP address. An IP address- is 32 bits long. It encodes a network number and a host
number.IP addresses are written in a dotted decimal notation:
128.238.42.112 means
10000000 in 1st Byte
11101110 in 2nd Byte
00101010 in 3rd Byte
01110000 in 4th Byte
Internet Address Classes:
IP Address classes
• Class A:
– For very large organizations
– 16 million hosts allowed
• Class B:
– For large organizations
– 65 thousand hosts allowed
• Class C
– For small organizations
– 255 hosts allowed
• Class D
– Multicast addresses
– No network/host hierarchy
75
Internet= a collection of connected networks which share a common set of rules for
communication
IP Address Hierarchy
• Note that Class A, Class B, and Class C addresses only support two levels
of hierarchy
• Each address contains a network and a host portion, meaning two levels of
Hierarchy.
• However, the host portion can be further split into “subnets” by the address
class owner
• This allows for more than 2 levels of hierarchy.
IP Subnetting
1
2
3
4
5
6
7
8
9
76
10
Subnetting
• An IP packet from some other network destined for host 141.14.2.21 still reaches
router R1, since the destination address is still a Class B address with Netid141.14
and Hostid 2.21 as far as the rest of the Internet is concerned.
• when the packet reaches router R1, the interpretation of the IP address changes
• R1 knows that there are 3 levels of hierarchy within the organization, and that in
this case, the Netid is 141.14,the Subnetid is 2, and the Hostid is 21.
• How is this knowledge of the internal network hierarchy implemented in the
organization’s routers?
• Masking of IP addresses during the packet-forwarding process.
• Masking is done whether or not subnetting is being used with subnetting,
the Netid defines the site, the Subnetid defines the physical network, and the Hostid
defines the actual machine.
11
12
13
14
Subnet Masks
Subnet masks allow hosts to determine if another IP address is on the same subnet or the
same network.
15
16
17
18
77
19
20
21 Router
22
• A router is a hardware component used to interconnect networks
• A router has interfaces on multiple networks
Policy : "choose a route that doesn't cross a government network" (equivalently: "let no
non-government traffic cross this network")
25
Classification of Routing algorithms
Centralized: central site computes and distributed routes (equivalently: information for
computing routes known globally, each router makes same
computation)
78
Decentralized: each router sees only local information (itself and physically-connected
neighbors) and computes routes on this basis. pros and cons?
Static: routing tables change very slowly, often in response to human intervention
Dynamic: routing tables change as network traffic or topology change
Distance-vector:
• Each router exchanges information about the entire network with neighboring
routers at regular intervals.
• Neighboring routers = connected by a direct link (e.g. a LAN)
• Regular intervals: e.g. every 30 seconds
Link-state:
• Each router exchanges information about its neighborhood with all routers in the
network when there is a change.
• Neighborhood of a router = set of neighbor routers for this router.
• Each router’s neighborhood information is flooded through the network.
• Change: e.g. if a neighboring router does not reply to a status message.
79
• “Clouds” represent LANs; number in cloud represents network ID
• A, B, C, D, E, F are routers (or gateways)
• Each router sends its information about the entire network only to its neighbors
80
How do non-neighboring routers learn about each other and share information?
•A router sends its information to its neighbors
•Each neighbor router adds this information to its own, and sends the updated
information to its neighbors; the first router learns about its neighbors’ neighbors.
81
Problem with distance-vector routing:
• Slow convergence of distance vector routing algorithms under some conditions
• Slow reaction to link/router failure because information only comes from
neighboring routers and it may be out-of-date (e.g. it may not properly reflect the
impact of the failure on route costs)
Link-State routing
•Each router sends information about its neighborhood to every other router
82
• Link cost is usually a weighted sum of various factors
• e.g. traffic level, security level, packet delay
• Link cost is from a router to the network connecting it to another router.
• when a packet is in a LAN (which is typically a broadcast network), every node –
including the router –can receive it
• No cost assigned when going .
83
1
• Every router builds a link-state packet and floods it through the network, so when
all such packets have been received at a router, it can build its link-state database.
• Assuming that every router receives the same set of link-state packets (as if the
routers were synchronized),every router builds the same link-state database.
Using this database, each router can then calculate its routing table.
• The algorithm keeps track of 2 sets of nodes and arcs –Temporary and Permanent.
• Initially, the Temporary set contains all neighbor nodes of the router itself, and
the arcs connecting them to the router; only the router is initially Permanent.
• When all nodes and arcs are in the Permanent set, the algorithm has terminated.
• Identify the Temporary node whose arc has the lowest cumulative cost from the
root: this node and arc are moved into the Permanent set.
• Any nodes which are connected to the new Permanent node and are not already in
the Temporary set, along with the connecting arcs, are made Temporary.
84
• Also, if any node already in the Temporary set has a lower cumulative cost from
the root by using a route passing through the new Permanent node, then this new
route replaces the existing one
• Repeat until all nodes and arcs are Permanent.
1
2
Let’s follow the steps of the algorithm run by router A.
85
86
87
• Once a router has found its shortest-path spanning tree, it can build its routing
table.
• To complete the Example, here is router A’s link-state routing table
• In large networks, the memory required to store the link-state database and the
computation time to calculate the link-state routing table can be significant.
• in practice, since the link-state packet receptions are not synchronized, routers
may be using different link-state databases to build their routing tables.
Note:
88
UNIT - IV
The Transport Layer is responsible for end-to-end data transport
Primary functions include:
• Provision of connection oriented or connectionless service.
• Disassembling and reassembling data.
• Setup and release of connections across the network.
TCP service:
• connection- oriented: setup required between client, server
• reliable transport between sending and receiving process
• flow control: sender won’t overwhelm receiver
• congestion control: throttle sender when network overloaded
• does not provide: timing, minimum bandwidth
UDP service:
• unreliable data transfer between sending and receiving process
• does not provide: connection setup, reliability, flow control, congestion
control, timing, or bandwidth guarantee guarantees
UDP
•UDP doesn’t support flow control or reliable/in-order delivery, but it does support error
detection by computing an “optional” checksum over the UDP header, UDP data, and IP
pseudo header(includes source and destination address fields from the IP header)
•New: Reliable UDP –provides reliable in-order delivery (up to a maximum number of
retransmissions), with simple window flow control, for virtual connections.
Addressing
89
UDP Data Packet
• The source port, much like the source port in TCP, identifies the process on the
originating system. TCP ports and UDP ports are not the same. There is no
relationship between the two.
• The destination port identifies the receiving process on the receiving machine.
Whereas the IP address identifies which machine should get the packet, the port
identifies which machine should get the data.
• The length field contains the length of the UDP datagram. This includes the
length of the UDP header and UDP data. It does not include anything added to the
packet in-transit by other protocols -- but these are stripped away before UDP
sees the datagram at the other side.
• The checksum field is used by UDP to verify the correctness of the UDP header
and data. If the checksum indicates an error, the packet is dropped. UDP is
unreliable, so it makes no attempt to mitigate the loss.
Application
• Datagram oriented
• unreliable, connectionless
• simple
• unicast and multicast
• Useful only for few applications, e.g., multimedia applications
• Used a lot for services
– network management(SNMP), routing (RIP),naming(DNS), etc.
Port Numbers
• UDP (and TCP) use port numbers to identify applications
90
• A globally unique address at the transport layer (for both UDP and TCP) is a
tuple <IP address, port number>
• There are 65,535 UDP ports per host.
Reliable: A reliable protocol ensures that data sent from one machine to another will
eventually be communicated correctly. It does not guarantee that this data will be
transmitted correctly within any particular amount of time -- just that given enough time,
it will arrive. Life isn't perfect, and it is possible for corrupted data to be thought correct
by a reliable protocol -- but the probability of this occurring is very, very, very low Point-
to-point: Point-to-point protocols are those protocols that communicate information
between two machines. By contrast, broadcast and multicast protocols communicate
information from one host to many hosts.
91
TCP header fields
Flag bits:
92
TCP uses a three-way handshake
Connection Termination :
93
Congestion Control
Retransmission policy :
Good Retransmission policy & Retransmission timer.
Window policy
-Selective Repeat Window.
Acknowledgement policy:
-Does not acknowledge every packet.
Discarding Policy:
-Good discarding Policy.
Admission Policy
-Switches check the resource requirement of flow.
94
Choke point:
-packet sent by router to Source.
Implicit Signaling:
-Source can detect
Explicit Signaling:
-Routers inform sender
Backward Signaling:
-Warn the Source (opp dir)
Forward Signaling:
-Warn the Destination
Slow Start :
Set cwnd size to max. seg size. Increases exponentially.
Additive Increase:
After it reaches threshold increase by 1 seg.If it reaches time-out then multiplicative
decrease.
Multiplicative decrease:
Set the threshold to one half of last cwnd size. Each time it is reduced to one half of last
cwnd size if a time –out occurs.
Traffic Shaping
• Traffic shaping controls the rate at which packets are sent (not just how many)
• At connection set-up time, the sender and carrier negotiate a traffic pattern
(shape)
• The host injects one packet per clock tick onto the network. This results in a
uniform flow of packets, smoothing out bursts and reducing congestion.
• When packets are the same size (as in ATM cells), the one packet per tick is okay.
For variable length packets though, it is better to allow a fixed number of bytes
per tick.
95
Token Bucket Algorithm
• In contrast to the LB, the Token Bucket (TB) algorithm, allows the output rate to
vary, depending on the size of the burst.
• In the TB algorithm, the bucket holds tokens. To transmit a packet, the host must
capture and destroy one token.
• Tokens are generated by a clock at the rate of one token every ∆ t sec.
• Idle hosts can capture and save up tokens (up to the max. size of the bucket) in
order to send larger bursts later.
Token bucket operation
• TB accumulates fixed size tokens in a token bucket
• Transmits a packet (from data buffer, if any are there) or arriving packet if the
sum of the token sizes in the bucket add up to packet size
• More tokens are periodically added to the bucket (at rate ∆ t). If tokens are to be
added when the bucket is full, they are discarded
Token bucket properties
• Does not bound the peak rate of small bursts, because bucket may contain enough
token to cover a complete burst size
• Performance depends only on the sum of the data buffer size and the token bucket
size
96
Domain Name System
Introduction
A sys that can map a name to an address or an add to a name.
Mapping was done using a host file
It has 2 columns
Name and address
Every host could store the host file on its disk and should be updated from master
file.
If a program or a user wanted to map a name to an add. ,host consulted the host
file and found mapping
Names assigned to machines must be selected from name space with control over
the binding between names and IP addresses.
A name space that maps each address to a unique name can be organised in two
ways.
Flat Name Space
Hierarchical Name Space
FQDN
PQDN
DNS client adds suffix atc.fhda.deu before passing the address to the DNS server.
Domain:
A domain is a sub-tree of the domain space.
Domain may itself be divided into sub domains.
99
So distribute the information among many computers called servers
Zone
Root server
It does not store any info about domain but delegates authority to other servers
Primary server:
A server that stores a file about the zone for which it is an authority.
Responsible for creating, maintaining the and updating the zone file
It stores the zone file on a local disk
100
Secondary server
A server that transfers the complete information about a zone from another server
and stores the file on its local disk
It neither creates nor updates the zone files.
Updating is done by a primary server, which sends the updated version to
secondary
A primary server loads all information from the disk file; the secondary server
loads all information from the primary server
Generic Domain
101
Generic Domain Labels
Label Description
Country Domain
102
Follows the same format as the generic domain but uses two character country
abbreviations.
Inverse domain
Ex:
When a server has received a request from a client to do a task
Whereas the server has a file that contains a list of authorized clients, the server
lists only the IP address of the client
To determine if the client is on the authorized list ,server send a query
To inverse DNS server and ask for a mapping of address to a name
This query is called inverse or pointer (PTR) query
To handle this ,inverse domain is added to the domain space with the first level
node called arpa
Second level is also one single node named in-addr
Rest of the domain defines the IP address.
103
Resolution
Mapping a name to an address or an address to a name is called name-address
resolution.
Resolver
A host that needs to map an address to a name or a name to an address calls a
DNS client named a resolver.
It accesses the closest DNS server with a mapping request
If the server has the information , it satisfies the resolver.
Otherwise it refers the resolver to other servers or ask other servers to provide
information.
After the resolver receives the mapping ,it interprets to see if it is a real resolution
or an error and finally delivers the result to the process that requested it.
Query is sent by the resolver to the local DNS server for resolution
If cant refers the resolver to other servers or ask other servers directly
104
If from the country domain, the resolver receives a domain name such as
ch.fhda.cu.ca.us.
Mapping addresses to names
Client can send an IP address to a server to be mapped to a domain name – called
PTR query
To answer this uses inverse domain
In the request IP address is reversed and 2 labels in-addr & arpa are appended to
create a domain acceptable by the inverse domain section
132.34.45.121 ,121.45.34.132.in-addr.arpa.
Recursive Resolution
If the parent is the authority respond otherwise sends the query to yet another
server
If resolved, response travels back until it reaches the requesting client
This is recursive resolution
Iterative Resolution
105
DNS Messages
Header format
Identification
Used by the client to match the response with the query.
Uses a diff id no. each time it sends a query.
Server duplicates this no. in the corresponding response.
Flag
Collection of fields that define the
Type of msg
Type of answers requested
Type of desired resolution (recursive or iterative)
106
No. of question records
Contains the number of queries in the question section of the msg
No. of answer records
Contains the number of answer records in the answer section of the response msg.
value is zero in the query msg
No. of authoritative records
Contains the number of authoritative records in the authoritative section of a
response msg
value is zero in query msg
No. of additional records
Contains the number of additional records in the additional section of a response
msg
value is zero in query msg
Question Section
Consist of one or more question records
Present on both query and response msg
Answer Section
Consist of one or more resource records
Present only on response msg
It includes the answer from the server to the client (resolver)
Authoritative Section
Consist of one or more resource records
Present only on response msg
It gives info (domain name ) about one or more authoritative servers for the query
DNS can use the services of UDP or TCP, using the well-known port 53.
SMTP
Format of an email
107
Addresses
Email address
User agent
A s/w package that composes, reads, replies to, and forward messages.
Some examples of command-driven user agents are mail, pine, and elm
Some examples of GUI-based user agents are Eudora, Outlook, and Netscape.
108
MIME:
It converts a Non-ASCII code to ASCII code.
MIME Header:
109
Video MPEG Video is in MPEG format
Single-channel encoding of
Audio Basic
voice at 8 KHz
PostScript Adobe PostScript
Application Octet- General binary data (8-bit
Stream bytes)
Content-transfer encoding
Category Description
Type ASCII characters and short lines
7bit ASCII characters and short lines
8bit Non-ASCII characters and short lines
Non-ASCII characters with unlimited-
Binary
length lines
6-bit blocks of data are encoded into
Base64
8-bit ASCII characters
Base64
110
Base64 encoding table
Value Code Value Code Value Code Value Code Value Code Value Code
0 A 11 L 22 W 33 h 44 s 55 3
1 B 12 M 23 X 34 i 45 t 56 4
2 C 13 N 24 Y 35 j 46 u 57 5
3 D 14 O 25 Z 36 k 47 v 58 6
4 E 15 P 26 a 37 l 48 w 59 7
5 F 16 Q 27 b 38 m 49 x 60 8
6 G 17 R 28 c 39 n 50 y 61 9
7 H 18 S 29 d 40 o 51 z 62 +
8 I 19 T 30 e 41 p 52 0 63 /
䦋㌌㏒䦋좈琰
9 J 20 U 31 f 42 q 53 1 䦋㌌㏒䦋좈琰茞 ᓀ
Ü
䦋㌌㏒䦋좈琰茞 ᓀ 䦋㌌㏒䦋좈琰
10 K 21 V 32 g 43 r 54 2
䦋Ü Ü
Quoted Printable:
MTA
111
Commands and responses
Uses commands and responses to transfer messages between an MTA client and
an MTA server
Command or reply is terminated by a two character end–of–line token
Commands
Sent from client to server
Consist of a keyword followed by zero or more arguments
Responses
Sent from server to the client
Response is a three digit code that may be followed by additional textual
information
Mail transfer
Transferring a mail message occurs in 3 phases
Connection establishment
After a client has made a TCP connection to the well known port 25 ,SMTP
server starts the connection phase.
Message transfer
Message between a sender and one or more recipients can be exchanged.
Connection Termination
After the message is transferred ,the client terminates the connection
Mail Delivery
Consists of 3 stages
Ist stage
Email goes from user agent to the local server.
Mail does not go directly to the remote server.
Mail is stored in the local server until it can be sent.
User agent uses SMTP client s/w and the local server uses SMTP server s/w.
Second stage
112
Email is relayed by local server, which now acts as SMTP client to the remote
server, which is the SMTP server in this stage
Email is delivered to the remote server ,not to the remote user agent
Third stage
The remote user agent uses a mail access protocol such as POP3 or IMAP4 to
access the mailbox and the mail
POP3
Simple but limited in functionality
Mail access starts with the client when the user needs to download email from the
mailbox on the mail server
Client (user agent opens a connection with the server on TCP port 110.
It sends its user name and password to access the mailbox
User can then list and retrieve the mail messages one by one
POP3 has two modes
Delete mode& Keep mode
Delete mode
113
Mail is deleted from the mail box after each retrieval
Normally used when the user is working at permanent computer and save and
organize the received mail after reading or replying
Keep mode
Normally used when the user accesses mail away from primary computer. Mail is
read but kept in the system for later retrieval and organizing.
Assumes that each time a client accesses the server, the whole mailbox will be
cleared out
Not convenient when access their mailboxes from different clients (home or
hotel)
IMAP4
Powerful and more complex.
User can check the email header prior to downloading.
User can check the contents of email for a specific string of characters prior to
downloading.
Can partially download email.
User can create, delete or rename mailboxes on the mail server.
Can create a hierarchy of mailboxes in a folder for email storage.
FTP
For copying a file from one host to another
FTP uses the services of TCP. It needs two TCP connections. The well-known port 21
is used for the control connection, and the well-known port 20 is used for the data
connection
114
When a user starts an FTP session control connection opens
While the control connection is open, the data connection can be opened and close
multiple times if several files are transferred
Conn remains open during the entire process
Service type used is minimize delay
User types commands and expects to receive responses without significant delay
Data connection
Uses the well known port 20 at the server site
Connection open when data ready to transfer
Closed when it is not needed
Service type used is maximize throughput
Communication
FTP client and server run on different computers
Must communicate with each other
May use different operating system, diff character sets, diff file structures and diff
file formats
FTP make this compatible
FTP has 2 diff approaches. one for ctrl conn & the other for data conn
Communication over ctrl conn
Same approach as SMTP
Uses the ASCII character set.
Communication is achieved through commands and responses
Each line is terminated with a two-character (carriage return and line feed) end-
of-line token
115
Communication over data conn
To transfer files through data conn, client must
Define the type of file
Structure of the data
Transmission mode
Heterogeneity solved by
File type ,data structure and transmission mode
Using the data connection
File transfer
HTTP
Used mainly to access data on the www
The protocol transfers data in the form of plain text, hyper text, audio and video
and so on.
A client sends a request ,which looks like mail to the server
The server sends the response which looks like a mail reply to the client
The request and response messages carry data in the form of a letter with a MIME-like
format
116
Request Message
Request Line:
Request msg
Request type:
Several request types are defined
RT categorizes the request msgs into several methods
URL
A client that wants to access a web page needs an address.
To facilitate access of documents ,it uses URL.
It defines 4 things
Method: a protocol used to retrieve the document (FTP and HTTP)
Host : a computer where info is located
Port number of server
Path name of file where info is located
Current version is HTTP 1.1
Methods
Request type defines several kinds of messages referred as methods
117
Request method is the actual command or request that a client issues to the server
GET :if the client wants to retrieve the document from the server
HEAD: if the client wants some info about the document
POST: used by the client to provide some info to the server
Response Message:
Status Line:
Header Format:
118
Exchange additional info between the client and the server
Example:
Client can request that the doc be sent in a special format
Server can send extra info about the document
General header: gives info about the msg
Request Header: can only be in response msg
Specifies the servers configuration and special info about the request
Entity header :gives info about the body of the document
Other features
Persistent Connection: the server leaves the connection open for more requests
after sending a response.
Non-Persistent Connection: one TCP connection is made for each request and
response.
HTTP version 1.1 specifies a persistent connection by default
WWW
Repository of info spread all over the world and linked together
It has a unique combination of flexibility, portability and user-friendly features .
It is a distributed client-server service.
A client using a browser can access a service using a server.
The service provided is distributed over many locations called websites.
Info is stored in a set of documents that are linked using the concept of pointers
An item can be associated with another document by a pointer
Hypermedia: It can contain pictures , graphics and sound
A unit of Hypertext or hypermedia available on the web is called a page
Hypertext:
119
Browser Architecture:
Static Document :
120
HTML
Boldface tags
121
Structure of a Web page
Common tags
Beginning Ending
Meaning
Tag Tag
122
Skeletal Tags
Beginning Ending
Meaning
Tag Tag
Beginning Ending
Meaning
Tag Tag
List Tags
<OL> </OL> Ordered list
<UL> </UL> Unordered list
<LI> </LI> An item in a list
123
Image Tag
䦋㌌㏒䦋좈琰茞 ᓀ
<IMG> Defines an image
䦋Ü
Hyperlink Tag
Executable Contents
This example shows how tags are used to let the browser format the appearance of the
text
Dynamic Document
124
Active document
Skeleton of an applet
125
Instantiation of the object defined by an applet
126
HTML document carrying an applet
In this example, we first import two packages, java.awt and java.applet. They
contain the declarations and definitions of classes and methods that we need. Our
example uses only one publicly inherited class called First. We define only one
public method, paint. The browser can access the instance of First through the
public method paint. The paint method, however, calls another method called
drawString, which is defined in java.awt.*.
127
import java.applet.*;
import java.awt.*;
128
129
Objectives
130
Upon completion of this Lesson, you should be able to:
• Explain the Radio Transmission, Microwave, Satellite
Communication.
• Identify the application of each
• Discuss the Advantages and Limitations of the different
types of approach
Points to Ponder:
• Relative advantages and Disadvantages of using Various
Media type.
• Cost/Performance analysis of different Medias.
Lesson:
So Students, Lets start by looking at various types of Unguided
Transmission media then looking at analysis of using them
Unguided transmission media is data signals that flow through
the air. They are not guided or bound to a channel to follow.
They are classified by the type of wave propagation.
RF Propagation
There are three types of RF (radio frequency) propagation:
• Ground Wave
• Ionospheric
• Line of Sight (LOS)
Ground wave propagation follows the curvature of the Earth.
Ground waves have carrier frequencies up to 2 MHz. AM radio
is an example of ground wave propagation.
Ionospheric propagation bounces off of the Earth’s
ionospheric layer in the upper atmosphere. It is sometimes
called double hop propagation. It operates in the frequency
range of 30 - 85 MHz. Because it depends on the Earth’s
ionosphere, it changes with the weather and time of day. The
signal bounces off of the ionosphere and back to earth. Ham
radios operate in this range.
Line of sight propagation transmits exactly in the line of sight.
The receive station must be in the view of the transmit station.
It is sometimes called space waves or tropospheric propagation.
It is limited by the curvature of the Earth for ground-based
stations (100 km, from horizon to horizon). Reflected waves
can cause problems. Examples of line of sight propagation are:
FM radio, microwave and satellite.
Radio Frequencies
The frequency spectrum operates from 0 Hz (DC) to gamma
rays (1019 Hz).
Name Frequency (Hertz) Examples
Gamma Rays 1019+
X-Rays 1017
Ultra-Violet Light 7.5 x 1015
Visible Light 4.3 x 1014
Infrared Light 3 x 1011
EHF - Extremely High
Frequencies
30 GHz (Giga = 109) Radar
SHF - Super High Frequencies 3 GHz Satellite & Microwaves
UHF - Ultra High Frequencies 300 MHz (Mega = 106) UHF TV (Ch. 14-83)
VHF - Very High Frequencies 30 MHz FM & TV (Ch2 – 13)
HF - High Frequencies 3 MHz2 Short Wave Radio
MF - Medium Frequencies 300 kHz (kilo = 103) AM Radio
LF - Low Frequencies 30 kHz Navigation
VLF - Very Low Frequencies 3 kHz Submarine Communications
VF - Voice Frequencies 300 Hz Audio
ELF - Extremely Low
Frequencies
30 Hz Power Transmission
Radio frequencies are in the range of 300 kHz to 10 GHz. We
are seeing an emerging technology called wireless LANs. Some
131
26 3E.271
© Copy Right: Rai University
DATA COMMUNICATION
use radio frequencies to connect the workstations together,
some use infrared technology.
Microwave
Microwave transmission is line of sight transmission. The
transmit station must be in visible contact with the receive
station. This sets a limit on the distance between stations
depending on the local geography. Typically the line of sight due
to the Earth’s curvature is only 50 km to the horizon! Repeater
stations must be placed so the data signal can hop, skip and
jump across the country.
Microwaves operate at high operating frequencies of 3 to 10
GHz. This allows them to carry large quantities of data due to
their large bandwidth.
Advantages:
a. They require no right of way acquisition between towers.
b. They can carry high quantities of information due to their
high operating frequencies.
c. Low cost land purchase: each tower occupies only a small
area.
d. High frequency/short wavelength signals require small
antennae.
Disadvantages:
a. Attenuation by solid objects: birds, rain, snow and fog.
b. Reflected from flat surfaces like water and metal.
c. Diffracted (split) around solid objects.
d. Refracted by atmosphere, thus causing beam to be projected
away from receiver.
Satellite
Satellites are transponders (units that receive on one frequency
and retransmit on another) that are set in geostationary orbits
directly over the equator. These geostationary orbits are 36,000
km from the Earth’s surface. At this point, the gravitational pull
of the Earth and the centrifugal force of Earth’s rotation are
balanced and cancel each other out. Centrifugal force is the
rotational force placed on the satellite that wants to fling it out
into space.
The uplink is the transmitter of data to the satellite. The
downlink is the receiver of data. Uplinks and downlinks are also
called Earth stations because they are located on the Earth. The
footprint is the “shadow” that the satellite can transmit to, the
shadow being the area that can receive the satellite’s transmitted
signal.
Iridium Telecom System
The Iridium Telecom System is a new satellite system that will
be the largest private aerospace project. It is a mobile telecom
system intended to compete with cellular phones. It relies on
satellites in lower Earth orbit (LEO). The satellites will orbit at
an altitude of 900 - 10,000 km in a polar, non-stationary orbit.
Sixty-six satellites are planned. The user’s handset will require
less power and will be cheaper than cellular phones. There will
be 100% coverage of the Earth.
Unfortunately, although the Iridium project was planned for
1996-1998, with 1.5 million subscribers by end of the decade, at
132
the time of this writing, it looked very financially unstable.
Conclusion
In this lesson we have discussed Various Types of Unguided
media
You must look at various type unguided media options
available. You can also
Take good look at relative advantages & disadvantages of using
133