Computer Networks PDF
Computer Networks PDF
M. Ajanthan
Computer Networks
V S B Engineering College
Karur – 639 111
COMPUTER NETWORKS
(CS 1302) – Semester – V (CSE / IT), Semester – VI (ECE)
M. Ajanthan
Department of ECE
V S B Engineering College
Karur – 639 111
Yours friendly
M. Ajanthan
Error, Detection and correction, Parity, LRC, CRC, Hamming codes, Flow and Error
control: Stop and wait, Go back – N ARQ, Selective Repeat ARQ, Sliding window Techniques,
HDLC. LAN: Ethernet IEEE 802.3, IEEE 802.5, IEEE 802.11, FDDI, SONET, Bridges.
Domain Name Space (DNS), SMTP, FDP, HTTP, WWW, Security, Cryptography.
Data Communications
Data Communications
Data Communications is the exchange of data between two devices via some form of
transmission medium such as wire cable. For the data communications to occur, the communicating
devices must be part of a communication system made up of a combination of hardware and
software. The effectiveness of the data communication system depends on three fundamental
characteristics: delivery, accuracy, and timeliness.
1. Delivery: The system must deliver data to the correct destination. Data must be
received by the intended device or user.
2. Accuracy: The system must deliver the data accurately. Data that have been altered in
transmission and left uncorrected are unusable.
3. Timeliness: The system must deliver the data in a timely manner. Data delivered late are
useless. In the case of video and audio, timely delivery means delivering data as they are
produced, in the same order that they are produced, without significant delay. This kind
of delivery is called real – time transmission
1.1 Components
Medium
Sender Receiver
2. Sender: The sender is the device that sends the data message. It can be computer,
workstation, telephone, video camera, and so on.
3. Receiver: The receiver is the device that receives the message. It can be computer,
workstation, telephone, television, and so on.
4. Medium: The transmission medium is the physical path by which the message travels
from sender to the receiver. It could be a twisted pair wire, coaxial cable, fiber optic
cable, or radio waves.
5. Protocol: A protocol is the set of rules that governs the data communications. It
represents an agreement between the communicating devices. Without protocol two
devices may be connected but not communicating.
Communication between two devices can be simplex, half duplex, or full duplex
1. Simplex
In simplex mode, the communication in unidirectional, as on a one – way street. Only one of the
two devices on the link can transmit; the other can only receive as shown in fig 1.2 (a)
Direction of data
CPU Monitor
2. Half - Duplex
In half duplex mode, each station can transmit and receive the data, but not at the same time.
When one device is sending means the other can only receive at the time, and vise versa as
shown in fig 1.2 (b).
The entire channel capacity is taken over by whichever of the two devices is transmitting at the
time.
Example:
Walkie – talkies and citizen band (CB) radios are the examples for the half duplex
communication.
3. Full – Duplex
In full – duplex mode, both stations can transmit and receive the data simultaneously. The full –
duplex mode is also called as duplex mode communication.
Direction of data
In full – duplex mode, the signals going in either direction share the capacity of the link. This
sharing can occur in two ways: Either the link must contain two physically separate transmission
paths, one for sending and the other for receiving; or the capacity of the channel is divided
between signals travelling in both directions.
Example:
A common example for the full – duplex communication is the telephone network. When two
peoples are communicating by telephone line, both can talk and listen at the same time.
A network is a set of devices connected by the communication links. Each device is referred
to as a node. A node can be a computer, printer, or any capable of sending and/ or receiving
data generated by the nodes on the network.
Network criteria
a) Performance: It can be measured by transit time (propagation delay) and response time
(speed of operation). Performance is decided by many factors such as number of users,
type of transmission medium, hardware and software.
c) Security: Network security concerned with protection of data from unauthorized access.
The nodes in computer network are interconnected by some link. A link is a communication
pathway that transfers the data from one device to another. There are two types of
connections are available. They are
1) Point – to – point
2) Multipoint / Multidrop
Point – to – point:
A point – to – point connection provides a dedicated link between two devices. The entire
capacity of the link is reserved for transmission between those two devices. The link can be a
cable or microwave link. The fig 1.3.1 (a) shows the point – to – point link. The typical
example for the point – to – point connection is TV and its remote control.
Link
Multipoint:
A multipoint connection (also called as Multidrop) is one in which more than two specific
devices share a single link. In the multipoint environment, the capacity of the channel is
shared, either spatially or temporally. If several devices can use the link simultaneously, it is
a spatially shared connection. If user must take turns, it is a timeshare connection. The fig
1.3.1 (b) shows the multipoint link.
10 M. Ajanthan | Computer Networks V S B Engineering College
Link
Work station
1.3.2 Topology
The term topology refers to the way in which a network is laid out physically. Two or more
devices connected to a link; two or more links form a topology. The topology of the network
is the geometrical representation of the relationship of all the links and linking devices (or
nodes) to one another. There are four topologies that are commonly used. They are
1. Mesh topology
2. Star topology
3. Bus topology
4. Ring topology
Mesh topology:
In a mesh topology, every 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. A fully connected mesh network has n(n-1)/2 physical channels to link n devices.
To accommodate that many links, every device on the network must have n-1 input /output
ports. The figure 1.3.1 shows the mesh topology.
Fig 1.3.1
1. Dedicated link between nodes ensure optimum data rate and eliminates traffic problem.
5. Point – to – point links make fault identification and fault isolation easy.
Disadvantages
2. Hardware required for each link and redundant link increase cost.
3. Difficulty in installation
4. Difficult to reconfigure.
In star topology, each device has a dedicated point – to – point link only to a central
controller, usually called hub. The devices are not directly linked to one another. If one
device wants to send data to another, it sends the data to the controller(hub), which then
relays the data to the other connected device. The fig 1.3.2 shows the star topology.
Hub
Fig 1.3.2
Advantage
1. Each device needs only one link and one I/O port makes star topology less expensive,
easy to configure.
2. Robust topology.
Disadvantage
Bus topology uses multipoint link i.e. multiple devices are connected by means of connectors
or drop cables. One long cable acts as a backbone to link all the devices in the network. Fig
1.3.3 shows the bus topology.
Drop line Error! Not a valid link. Error! Not a valid link.
Error! Not a valid link.
Advantage
Disadvantage
In a ring topology, each device has a dedicated point – to – point connection only with two
devices on either side of it. A signal is passed along the ring in one direction, from device to
device, until it reaches its destination. Each device in the ring incorporates a repeater. When
a device receives the signal intended for another device, its repeater regenerates the bits
and passes them along the link. Fig 1.3.4 shows ring topology.
Advantage
2. Link failure can be easily found as each device is connected to its immediate neighbors
only.
3. Because every node is given equal access to the token no one node can monopolize the
network.
Disadvantage
2. Failure of one node on the ring can affect the entire network.
A protocol is a set of rules that governs data communications. Protocol defines what is
communicated, how it is communicated and when it is communicated. The key elements of
a protocol are syntax, semantics, and timing.
Syntax: syntax refers to the structure or format of the data, meaning the order in
which they are presented. For example, a simple protocol might expect the first 8
bits of a data to be the address of the sender, the second 8 bits to be the address of
the receiver, and rest of them to be the message.
Timing: Timing refers to two characteristics: when data should be sent and how fast
they can be sent. For example, if a sender produces data at 100 Mbps but the
receiver can process data at only 1 Mbps, the transmission will overload the receiver
and the data will be largely lost.
Standards:
a) De facto : Standards that have not been approved by an organized body but have
been adopted as standards through widespread use are de facto standards.
b) De jure : Those that have been legislated by an officially recognized body are de
jure standards.
The international organization for standards (ISO) developed the open system
interconnection (OSI) reference model. OSI model is most widely used model for
networking. OSI model is a seven layer standard. The figure 1.5 shows OSI model.
The OSI model does not specify the protocols to be used for networking tasks but is a
model for understanding and designing network architecture.
5) Narrows the options in order to increase the ability to communicate without expansive
conversions and translation between products.
The physical layer 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. It also defines the procedures and functions that physical devices
and interfaces have to perform for transmission to occur.
The physical layer is responsible for transmitting individual from one node to next.
Simply it can be called node to node delivery. The position of the physical layer with the
transmission medium and the next layer (data link layer) is shown in figure 1.51.
1010100000001011110011 1010100000001011110011
Transmission medium
Physical characteristics of interface and media: The physical layer defines the
characteristics of the interface between the devices and the transmission media. It
also defines the type of transmission medium.
Representation of bits: The physical layer data consists of a stream of bits without
any interruption. To be transmitted, bits must be encoded into signals – electrical or
optical. The physical layer defines the types of the representation.
Data rate: the data rate or transmission rate is the number of bits sent each second
– is also defined by the physical layer. In other words, the physical layer defines the
duration of bit, which is how long it lasts.
The data link layer transforms the physical layer, a raw transmission facility, to a reliable
link. It makes the physical layer appear error – free to the upper layer (network layer). Fig
1.5.2 shows the data link layer.
T2 Data H2 T2 Data H2
The data link layer is responsible for transmitting frames from one node to the next.
The data link layer provides hop – to – hop (node – to – node) delivery. The major duties of
the data link layer are as follows:
Framing: The data link layer divides the stream of data bits received from the
network layer into manageable data units called frames.
Flow control: When the rate of the data transmitted and the rate of data received
by the receiver is not same, then there will be some losses in the data. The data link
layer prevents the data by the flow control mechanism from the overwhelming of
receiver.
Error control: The data link layer incorporates reliability to the physical layer by
adding mechanism to detect and retransmit the damaged or lost frames.
Access control: When two or more devices are connected to the same link, the data
link layer will determines which device has the control over link.
When two systems are connected to the different networks with connecting devices
between the networks, there is a need for the network layer to accomplish the source to
destination delivery. Fig 1.5.3 shows the network layer.
Data H3 Data H3
The network layer is responsible for source – to – destination delivery. (For the
delivery of packets from original source to the final destination). The major duties of
network layer as follows:
Logical addressing: The physical addressing implemented by the data link layer
handles the address problem locally. If the packet is in the network boundary we
need another addressing system to distinguish the source and the destination. the
network layer adds a header to the packet coming from upper layer includes the
logical address of the source and the destination.
The transport layer is responsible for process – to – process delivery of the entire
message. Whereas the network layer oversees the host – to – destination delivery of the
individual packets, it does not recognize any relationship between those packets. The
transport layer on the other hand side ensures the whole message arrives intact and in
order, overseeing both error control and flow control at the process to process level. Fig
1.5.4 shows the transport layer.
The transport layer is responsible for delivery of message from one process to
another. The major functions of transport layer as follows:
Port addressing: Computers often run several processes at the same time. For this
region process to process delivery not only from one computer to other but also
from the specific process on one computer to the specific process on the other. The
transport layer header must therefore include the type of addressing called port
addressing.
Flow control: The transport layer is responsible for end to end flow control
mechanism rather than across a single link.
Error control: Error control in transport layer is performed end to end rather than
across the link. The sending transport layer makes sure that the entire message
arrives at receiving transport layer without error. Error correction is usually achieved
through retransmission.
The session layer is network dialog controller i.e. it establishes and synchronizes the
interaction between communication systems. Fig 1.5.5 shows the session layer.
Dialog Control: Communication between two process take places in either half
duplex or full duplex mode. The session layer manages the dialog control for this
communication.
The presentation layer deals with the syntax and semantics of the information being
exchanged. Fig 1.5.6 shows the presentation layer.
Application layer enables the user, whether human or software, to access the
network. It provides user interfaces and support for service such as electronic mail, remote
file access and transfer, access to the World Wide Web, and so on. Fig 1.5.7 shows the
application layer.
(User)
H7 H7
Data Data
Mail services: This application is the basis for email forwarding and storage.
File transfer and success: This application allows a user to access the files in remote
host (to make changes or data), to the retrieve files from a remote computer for use
in the local computer for use in the local computer, and to manage or control files in
a remote locality.
Remote log-in: A user can log into a remote computer and access the resources of
that computer.
Accessing the World Wide Web: The most common application today is the access
of World Wide Web (WWW).
Transmission media is the physical structure used for the communication between
two or more devices. The transmission media is classified in to two types. They are
Guided media, which are those that provide a conduit from one device to another,
include twisted – pair cable, coaxial cable, and fiber – optic cable. A signal traveling along
any of these media is directed and contained by the physical limits of the medium.
One of the wires is used to carry signals to the receiver, and the other is used only
as a ground reference. The receiver uses the difference between the two levels. In addition
to the signal sent by the sender on one of the wires, interference (noise) and crosstalk may
affect both wires and create unwanted signals. The register at the end, however, operates
only on the difference between these unwanted signals. If the two wires are parallel, the
effect of these unwanted signals is not the same in both wires because they are at different
location related to the noise or crosstalk sources. This results in a difference at the receiver.
By twisting pairs, a balance is maintained.
CONNECTORS
The most common UTP connector is RJ45 (Registered Jack). The RJ45 is a keyed
connector, meaning the connector can be inserted in only one way.
PERFORMANCE
One way to measure the performance of twisted pair cable is to compare
attenuation versus frequency and distance. A twisted pair cable can pass a wide range of
frequencies.
Coaxial Cable
The most common means of conducting video signals from one piece of equipment
to another is coaxial cable. Coaxial cable is often referred to as simply "coax". Not only is
coax the most commonly used cable, but also the least expensive, most reliable, most
convenient, and easily maintained way of transferring electronic images in a CCTV system.
Coax is available from many manufacturers and comes in a variety of sizes, shapes,
colors, specifications and capabilities. The most commonly recommended "coax" type is
RG59/U, but this designation actually represents a family of cables with widely varying
electrical characteristics. Other varieties like RG59/U are RG6/U and RG11/U; these are used
predominately in CCTV and video work.
Though similar in many ways, each cable group has its own various physical and
electrical characteristics, which must be taken into consideration.
All three "coax" cable groups are included in the same general family classification
for coaxial cables. The RG reference is the cable specification for use as a "radio guide ",
while the numerical value helps differentiate the specifications of each individual cable.
Although each cable has its own number, characteristics, and size, there is no difference in
the way these different numbered cables work.
COAXIAL CONSTRUCTION
Common "coax" cable RG59//U, RG6/U, and RG11/U is circular. Each has a center
conductor surrounded by dielectric insulating material, which in turn is covered by a braid to
shield against electromagnetic interference (EMI). The outer covering is the "jacket".
The center conductor is the primary means of carrying a video signal. The center
conductor comes in varying diameters, usually ranging from 14 gauges to 22 gauges. The
structure of the center conductor generally is solid copper or copper- clad steel, designated
as bare copper weld, or BCW. For CCTV applications, solid copper conductors are required.
Copper clad, copper weld or BCW cables have much greater loop resistance at baseband
video frequencies and should never be used for CCTV. To determine the type, look at the cut
end of the center conductor. Copper clad cable will be silver in the center instead of copper
all the way through. Variation in the size of the center conductor has an overall effect on the
amount of DC resistance offered by cable. Cables which contain large diameter center
conductors have lower resistances than cables with smaller diameters. This decreased
resistance of large diameter cable enhances the ability of a cable to carry a video signal over
a longer distance with better clarity, but, it is also more expensive and harder to work with.
For applications where the cable may move up/down or side-to-side, select cable
that has a center conductor consisting of many small strands of wire. As the cable moves,
these strands flex and resist wear due to fatigue better than a cable with a solid center
conductor.
Because of its rigid properties, solid polyethylene maintains its shape better than
foam and withstands the pressures of accidental pinching or crimping, but, this
characteristic also makes it slightly more difficult to handle during installation. In addition, its
loss/length attenuation factor is not quite as good as foam, which should be considered in
long cable runs.
Wrapped around the outside of the dielectric material is a woven copper braid
(shield), which acts as a second conductor or ground connection between the camera and
the monitor. It also acts as a shield against unwanted external signals commonly called
electromagnetic interference or EMI, which may adversely affect a video signal.
The amount of copper or wire strands in the braid deter- mine how much EMI it
keeps out. Commercial grade coax cables containing loosely woven copper braid have
shielding coverage of approximately 80 percent. These cables are suitable for general
purpose use in applications where electrical interference is known to be low. They also work
well when the cable is to be installed in metal conduit or pipe, which also aids in shielding.
If you are not sure of the conditions and are not running pipe to screen out more
EMI, use a cable with a "maximum shield" or heavy braid--type cable containing more
copper than those of commercial grade coax. This extra copper obtains the higher shielding
coverage by having more braid material made in a tighter weave. For CCTV applications,
copper conductors are needed.
Cables using aluminum foil shielding or foil wrap material are not suitable for CCTV
work. Instead, they usually are intended to transmit radio frequency signals such as those
employed in transmitter systems or in master antenna distribution systems.
Aluminum or foil cable may distort a video signal to such a point that signal quality
may be far below the level required for proper system operation, especially over long cable
runs, and therefore not recommended for CCTV use.
OUTER JACKET
The last component comprising a coax cable is the outer jacket. Although other
materials are used, polyvinyl chloride, or PVC, is commonly used in its construction.
Available in many colors such as black, white, tan, and gray, the jacket lends itself to both
indoor and outdoor applications.
Coaxial Cable Connectors are used to connect coaxial cable to devices. The most
common type of connector is the Bayone Neill-concelman or BNC connectors. There
are three popular types of connectors
BNC connectors
BNC T connectors &
BNC terminator
BNC CONNECTOR
BNC T CONNECTOR
BNC TERMINATOR
It is used at the end of the cable to prevent the reflection of the signal.
PERFORMANCE
BASIC DEFINITIONS
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.
Cable TV networks also used RG-59 coaxial cables.
It is also used in traditional Ethernets.
OVERVIEW
The advantages provided by optical fiber systems are the result of a continuous
stream of product innovations and process improvements. As the requirements and
emerging opportunities of optical fiber systems are better understood, fiber is improved to
address them. This tutorial provides an extensive overview of the history, construction,
operation, and benefits of optical fiber, with particular emphasis on outside vapor
deposition (OVD) process.
One way of thinking about this concept is to envision a person looking at a lake. By
looking down at a steep angle, the person will see fish, rocks, vegetation, or whatever is
below the surface of the water (in a somewhat distorted location due to refraction),
assuming that the water is relatively clear and calm. However, by casting a glance farther
out, thus making the angle of sight less steep, the individual is likely to see a reflection of
trees or other objects on an opposite shore. Because air and water have different indices of
refraction, the angle at which a person looks into or across the water influences the image
seen. This principle is at the heart of how optical fiber works. Controlling the angle at which
the light waves are transmitted makes it possible to control how efficiently they reach their
destination. Light waves are guided through the core of the optical fiber in much the same
way that radio frequency (RF) signals are guided through coaxial cable. The light waves are
guided to the other end of the fiber by being reflected within the core. The composition of
the cladding glass relative to the core glass determines the fiber’s ability to reflect light. That
reflection is usually caused by creating a higher refractive index in the core of the glass than
in the surrounding cladding glass, creating a “waveguide.” The refractive index of the core is
increased by slightly modifying the composition of the core glass, generally by adding small
amounts of a dopant. Alternatively, the waveguide can be created by reducing the refractive
index of the cladding using different dopants.
Single-mode fiber, on the other hand, has a much smaller core that allows only one
mode of light at a time to propagate through the core. While it might appear that multimode
fibers have higher capacity, in fact the opposite is true. Single mode fibers are designed to
maintain spatial and spectral integrity of each optical signal over longer distances, allowing
more information to be transmitted. Its tremendous information-carrying capacity and low
intrinsic loss have made single-mode fiber the ideal transmission medium for a multitude of
applications. Single-mode fiber is typically used for longer-distance and higher-bandwidth
applications (see Figure 3). Multimode fiber is used primarily in systems with short
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.
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.
DATA LEVEL
The number of values used to represent data is termed as data level.
The line coding schemes can be categorized into three types. They are,
Unipolar
Polar
Bipolar
1.7.1 Unipolar
Unipolar encoding uses only one voltage level. 1’s are encoded as positive value and
0’s are encoded as zero value. Fig 1.7.1 shows the unipolar encoding.
1.7.2 Polar
Polar encoding uses two voltage levels, one positive and one negative. By using two
levels, in most polar encoding methods are average voltage levels on the line is reduced and
the dc component problem seen in unipolar encoding is avoided. The polar encoding
schemes are classified as follows
In NRZ encoding, the value of the signal is always either positive or negative. The NRZ
encoding is classified in to two categories. They are
In NRZ-L level encoding, the level of the signals depends on the type of bit that
represents. A positive value is represented for symbol ‘1’ and the negative value is
represented for the symbol ‘0’. Thus the level of signal depends on the bit.
NRZ-I
In NRZ-I level encoding an inversion of voltage level is represented for a symbol ‘1’. It
is the transition between a positive and the negative voltage, not the voltage itself that
represents the bit‘1’. A ‘0’ bit is represented by no change. The diagram shows the non
return to zero level encoding.
The return to zero line coding scheme uses three voltage levels. They are positive,
negative and the zero level. The signal will reach to zero level after completing the half of
the present signal.
There will be two signal changes to encode on single bit. And this type of encoding
scheme will occupies more bandwidth. These are the main disadvantages of the RZ type of
encoding.
MONCHESTER ENCODING
Manchester encoding uses an inversion at the middle of each bit interval for both
synchronization and the data reception. The bit 1 represents the negative - to - positive
transition. The bit 0 represents the positive - to - negative transition. The Manchester level
encoding achieves the same level of synchronization as RZ level. The figure shows the
Manchester encoding.
In differential Manchester level encoding the inversion at the middle of the bit
intervals 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
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
The figure shows the different types of the line coding schemes.
Unipolar encoding
Polar encoding
Bipolar encoding
1.8 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. Modem stands for modulator and demodulator.
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.
MODULATION /DEMODULATION
Telco Telco
Telephone
network
Modem Modem
A B
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 STANDARDS
V.32
V.32bis
V.34bis
V.90
V.92
In any QAM system, the receiver compares each received signal point to all valid
points in the constellation and selects the closest point as the intended value. A signal
distorted by transmission noise can arrive closer in value to an adjacent point than to the
intended point, resulting in a misidentification of the point and an error in the received data.
By adding a redundant bit to each quad bit, trellis-coded modulation increases the
amount of information used to identify each bit pattern thereby reduces the number of
possible matches.
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.
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.
Inverse PCM
Telephone
PCM
network
Modem B to A Modem
Quantization
noise happens in
the telco office
A near B 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.
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 line has call-waiting service.
RS 232 is a standard interface by EIA and RS232C is the latest version of this
interface.
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
RS232 SIGNALS
7 7 SG Signal Ground
10 22 RI Ring Indicator
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.
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.
Data link layer (DLL) is the second layer in OSI reference model. The DLL lies between the
network layer and the physical layer. It receives services from the physical layer and provides the
service to the network layer. The DLL is the responsible for carrying a packet from one hop to next
hop
Packaging
Addressing
Error control
Flow control
Data can be corrupted during transmission. For reliable communication, errors must
be detected and corrected. Signals flows from one point to another. It is subjected to
unpredictable interferences from heat, magnetism and other forms of electricity.
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 are 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.
2.2 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.
1010000000010101 10100000000101010
Ok
Medium
101000000001010
Data unit
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.
Parity Check
Cyclic redundancy check
Check sum
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).
In a simple parity check a redundant bit is added to a string of data so that total
number of 1’s in the data become even or odd.
The total data bit is then passed through parity checking function. For even parity, it
checks for even number of 1’s and for odd parity it checks even number of 1’s. If an error is
detected the data is rejected.
Parity bit is 1
If receiver gets 101100011, parity check fails ---reject (OK), ask for frame to be re-
transmitted
If receiver gets 101110011, parity check ok ---accept (NOT OK: even number of errors
undetected)
If receiver gets 001100011, parity check ok ---accept (NOT OK: even number of errors
undetected)
Form data into a 2-dimensional array; add single parity check bits to each row and
each column; transmit row-by-row
Data bits
1110001 0
1000111 0 row
0011001 1 parity bits
0101111 1
Column parity
Bits
Receiver knows to form received bit string into 4×8 array, then check the row and
column parity bits…
Can detect any odd number of bit errors in a row or column, and can detect an even
number of bit errors if they’re in a single row (using the column parity checks) or in a
single column (using the row parity checks); and can correct any single bit error
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 bit.
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 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 add
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.
CRC Generator
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.
• 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.
• 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
10101001 00111001
10101001
00111001
1 1 1 0 0 0 1 0 sum
Checksum
The receiver adds these three sections, it will get all ones, which, after
complementing, is all 0s and shows that there is no error.
10101001
00111001
00011101
11111111 sum
10101111
11111001
00011101
111000101
1 1 0 0 0 1 0 1 sum
PERFORMANCE
• It detects all errors involving an odd number of bits as well as most errors involving
an even number of bits.
• 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.
• Redundancy bits in the Hamming code are placed in the codeword bit positions that
are a power of 2
• Each redundancy bit is the parity bit for a different combination of data bits
• Each data bit may be included in more than one parity check.
• 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
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.
The two main features of data kink layer are flow control and error control.
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.
This is the simplest flow and error control mechanism. It has the following
features.
• The sending devise keeps the copy of the last frame transmitted until it receives an
acknowledgement for that frame. Keeping a copy allows the sender to re- transmit
lost or damaged frames until they are received correctly.
• Both data and acknowledgement frames are numbered alternately 0 and 1. A data
frame 0 is acknowledged by an ACK 1.
• 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:
Normal operation
Lost frame
ACK lost
Delayed ACK.
NORMAL OPERATION:
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.
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.
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.
A lost or damaged ACK is handling in the same by the sender; if the sender receives a
damaged ACK, it discards it.
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.
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.
DELAYED ACKNOWLEDGEMENT
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.
The sender has already retransmitted a copy of frame 0. The receiver expects frame
1 so its simply discards the duplicate frame 0.
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.
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
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
Window size=7
4. Control variables:
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 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.
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.
If an ACK is lost, we can have two situations. If the next ACK arrives before the
expiration of timer, there is no need for retransmission of frames because ACK are
cumulative in this protocol.. if the next ACK arrives after the timeout, the frame and all the
frames after that are resent. The receiver never resends an ACK.
OPERATION
NORMAL OPERATION:
Normal operations of the selective repeat ARQ are 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.
In this sender also sets a timer for each frame sent. The remaining operations are
same as GO-BACK-N ARQ.
2.7 HDLC
Only difference is that secondary needs permission from the Primary in NRM, but
doesn’t need permission from the Primary in ARM.
FRAMES:
3 types of Frames are
I-Frame – transports user data and control info about user data.
S-Frame – supervisory Frame, only used for transporting control information
U-Frame – unnumbered Frame, reserved for system management(managing the link itself)
FRAME FORMAT
U-FRAMES:
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.
• Two bits indicate the frame type, so that there are four possibilities.
CONTROL FIELD:
PHYSICAL TOPOLOGY
• The token bus standard specifies three physical layer options in terms of
transmission medium, signaling technique, data rate and maximum electrical cable
segment length.
Medium options
2. Carrier band: Transmission medium is co-axial cable and its uses KSK as a
signaling techniques, data rate is 1, 5, 10Mbps.
• 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.
2.9 IEEE 802.5 Token Ring
• IEEE 802.4 describes a token ring LAN standard.
• In a token ring a special bit pattern, called the token circulates around the ring when
all stations are idle.
• When a station transmits, it breaks the ring and inserts its own frame with source
and destination address.
• When the frame eventually returns to the originating station after completing the
round, the station removes the frame and closes the ring. Because there is only one
token, only one station can transmit at a given instant, thus solving the channel
access problem.
The following figure shows the operation and arrangement of the Token Ring.
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 bit (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:
INTRODUCTION:
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.
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.
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.
• Preamble— gives a unique sequence that prepares each station for an upcoming
frame.
• Start delimiter—indicates the beginning of a frame by employing a signaling pattern
that differentiates it from the rest of the frame.
• Frame control— indicates the size of the address fields and whether the frame
contains asynchronous or synchronous data, among other control information.
• Destination address—Contains a unicast (singular), multicast (group), or broadcast
(every station) address. As with Ethernet and Token Ring addresses, FDDI
destination addresses are 6 bytes long.
• Source address— identifies the single station that sent the frame. As with Ethernet
and Token Ring addresses, FDDI source addresses are 6 bytes long.
• Data— contains either information destined for an upper-layer protocol or control
information.
• Frame check sequence (FCS)—Is filed by the source station with a calculated cyclic
redundancy check value dependent on frame contents (as with Token Ring and
Ethernet). The destination address recalculates the value to determine whether the
frame was damaged in transit. If so, the frame is discarded.
• End delimiter—Contains unique symbols; cannot be data symbols that indicate the
end of the frame.
• Frame status—Allows the source station to determine whether an error occurred;
identifies whether the frame was recognized and copied by a receiving station.
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 ring
without performance impact during the wrap condition. Figure 8-6 and Figure 8-7 illustrate
the effect of a ring wrapping in FDDI.
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.
• 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.
• Figure 7-4 Ethernet's Logical Relationship to the ISO Reference Model
• 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
76 M. Ajanthan | Computer Networks V S B Engineering College
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.
• Source addresses (SA)—Consists of 6 bytes. The SA field identifies the sending station.
The SA is always an individual address and the left-most bit in the SA field is always 0.
• 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.
Network layer
Network Layer
The network layer in the internet model is responsible for carrying a packet from one
computer to another; it is responsible for host – to – host delivery. In other words, when we send
the packet from San Francisco to Miami, the two network – layer protocols in the two computers co-
operate to supervise the delivery of message.
NETWORK-LAYER FUNCTIONS
3.1 INTERNETWORKING
SWITCHING SCHEMES
• Circuit Switching
CIRCUIT SWITCHING
Provides service by setting up the total path of connected lines hop-by-hop from the
origin to the destination
A VC consists of:
PACKET SWITCHING
• These packets are numbered and addressed and sent through the network one at a
time.
• Allows Pipelining
3.2 IP Addressing
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
81 M. Ajanthan | Computer Networks V S B Engineering College
10000000 in 1st Byte
IP ADDRESS CLASSES
• Class A:
• Class B:
• Class C
– Multicast addresses
– No network/host hierarchy
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
IP SUBNETTING
• Subnetting is done by using some of the bits of the host-id part of the IP address
physical layer network identifier
• The subnet mask is used to determine the bits of the network identifier.
• All hosts on the same network should have the same subnet mask.
• 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 Host id 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 Net id is 141.14, the Subnet id is 2, and the Host id is 21.
The Net id defines the site, the Subnet id defines the physical network, and the Host
id defines the actual machine.
SUBNET MASKS
Subnet masks allow hosts to determine if another IP address is on the same subnet
or the same network.
3.3 Routing
ROUTING ISSUES:
Policy: "choose a route that doesn't cross a government network" (equivalently: "let
no non-government traffic cross this network")
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
Internal routers
Backbone routers
AS boundary routers
ROUTING
The most common routing algorithms are distance-vector and link-state routing.
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.
Link-State routing
• Each router sends information about its neighborhood to every other router
• 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.
• First, identify all link costs in the network: either from the link-state database, or
using the fact that the cost of any link from a network to a router is 0
• This algorithm builds a shortest-path spanning tree for the router such a tree has a
route to all possible destinations, and no loops.
• The router running the algorithm is the root of its shortest-path spanning tree.
• Even if all routers’ link-state databases are identical, the trees determined by the
routers are different (since the root of each tree is different)
• A node is either a network or a router; nodes are connected by arcs.
• 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.
• 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.
Transport layer
Transport Layer
The transport layer is the fourth layer in OSI layered architecture. The transport layer is
responsible for reliable data delivery. The upper – layer protocols depends heavily on the transport
layer protocol. A high level of error recovery is also provided in this layer. This layer ensures, that
packets are delivered error free, in sequence and with no losses or duplications.
TCP service:
• does not provide: connection setup, reliability, flow control, congestion control,
timing, or bandwidth guarantee guarantees
4.1 UDP
• Can have multiple application processes on a single host, each with their
own port number.
• A process is uniquely addressed by a < port, host > pair
• Common services are available at well-known (and reserved) ports on each
host; user applications must choose their ports from the set of non-reserved
ports.
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
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
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.
Flag bits:
• If the bit is set, the following bytes contain an urgent message in the sequence
number range “SeqNo <= urgent message <= SeqNo + urgent pointer”
• ACK: Segment carries a valid acknowledgement
• PSH: PUSH Flag
• Notification from sender to the receiver that the receiver should pass all data that it
has to the application.
• Normally set by sender when the sender’s buffer is empty
• RST: Reset the connection
• The flag causes the receiver to reset the connection.
• Receiver of a RST terminates the connection and indicates higher layer application
about the reset
• SYN: Synchronize sequence numbers
• Sent in the first packet when initiating a connection
• FIN: Sender is finished with sending
• Used for closing a connection
• Both sides of a connection must send a FIN.
Retransmission policy:
Window policy:
Discarding Policy:
Admission Policy
Choke point:
Implicit Signaling:
Explicit Signaling:
Backward Signaling:
Forward Signaling:
SLOW START:
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 leaky bucket enforces a constant output rate regardless of the burstiness of
the input. Does nothing when input is idle.
• 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.
• 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.
• Idle hosts can capture and save up tokens (up to the max. size of the bucket) in
order to send larger bursts later.
• 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
• 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
Application layer
Application Layer
This is the part of the book explores several application programs, available at the topmost
layer, layer five, of the internet model. The application layer allows people to use the internet. We
could say that the other four layers are created so that people can use these application programs.
Introduction
It has 2 columns
• 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
• Divide the huge amt of info into smaller parts
• Store each part on a different computer
• The host that needs mapping can contact the closest computer holding the needed
information
• i.e. DNS
• 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.
Demerit:
Label:
Each node in the tree has a label (a string with a maximum of 63 characters)
FQDN
DOMAIN:
ZONE
ROOT SERVER
• It does not store any info about domain but delegates authority to other servers
• 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
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
Label Description
Follows the same format as the generic domain but uses two character country
abbreviations.
Inverse Domain
Ex:
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 asks 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.
• The resolver gives a domain name to the server and asks for the corresponding
address
• In this ,server checks the generic domain or the country domain to find the mapping
• If from the generic domain the resolver receives a domain name such as
chal.atc.fhda.edu.
• 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
Recursive Resolution
Header format
Identification
Used by the client to match the response with the query.
Flag
Collection of fields that define the
Type of message
Question Section
Answer Section
Authoritative Section
DNS can use the services of UDP or TCP, using the well-known port 53.
5.4 SMTP
Format of an email
Addresses
Email address
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.
5.5 MIME:
MIME Header:
Category Description
Base64
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
琰茞ᓀ 琰茞ᓀ
䦋Ü 䦋Ü
5.6 MTA
• 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
Connection establishment
•
After a client has made a TCP connection to the well known port 25 ,SMTP
server starts the connection phase.
Message transfer
Connection Termination
Consists of 3 stages
First stage
Second stage
• 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
• The remote user agent uses a mail access protocol such as POP3 or IMAP4 to
access the mailbox and the mail
• SMTP is involved in the first and second stages but not in third stage, since it is a
push protocol (pushes msgs from sender to receiver).
• The third stage needs a pull protocol
• Operation must start with the recipient
• Mail must stay in the mail server mailbox until the recipient receives it
• Third stage uses a mail access protocol(POP3,IMAP4)
POP3
Delete 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
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
Data connection
Communication
File transfer
The request and response messages carry data in the form of a letter with a MIME-
like format
Request Message
Request Line:
Request type:
URL
It defines 4 things
Methods
Status Line:
Header Format:
Specifies the servers configuration and special info about the request
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
5.10 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
Browser Architecture:
Static Document:
Boldface tags
Common tags
Beginning Ending
Meaning
Tag Tag
Skeletal Tags
Beginning Ending
Meaning
Tag Tag
Beginning Ending
Meaning
Tag Tag
List Tags
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
Active document
import java.applet.*;
import java.awt.*;