Complete Computer Networks
Complete Computer Networks
Unit 1 Data Communication: Data Communications, Data Networking and Internet, Protocol Architecture,
TCP/IP and Internet based Applications, Data Transmission, Data and Signals-periodic analog, Digital signals,
Transmission Impairments, Data Rate Limits, Performance.
The effectiveness of any data communications system depends upon the following four fundamen-
tal characteristics:
Delivery: The data should be delivered to the correct destination and correct user.
Accuracy: The communication system should deliver the data accurately, without introducing any
errors. The data may get corrupted during transmission affecting the accuracy of the delivered
data.
Timeliness: Audio and Video data has to be delivered in a timely manner without any delay; such a
data delivery is called real time transmission of data.
Jitter: It is the variation in the packet arrival time. Uneven Jitter may affect the timeliness of data
being transmitted.
Message
Message is the information to be communicated by the sender to the receiver.
Sender
The sender is any device that is capable of sending the data (message).
Receiver
The receiver is a device that the sender wants to communicate the data (message).
Transmission Medium
It is the path by which the message travels from sender to receiver. It can be
wired or wireless and many subtypes in both.
Protocol
It is an agreed upon set or rules used by the sender and receiver to communicate
data.
A protocol is a set of rules that governs data communication. A Protocol is a ne-
cessity in data communications without which the communicating entities are like
two persons trying to talk to each other in a different language without know the
other language.
DATA REPRESENTATION
Data is collection of raw facts which is processed to deduce information.There may be dif-
ferent forms in which data may be represented. Some of the forms of data used in communications
are as follows:
Text
Text includes combination of alphabets in small case as well as upper case. It is stored as a pat-
tern of bits. Prevalent encoding system : ASCII, Unicode
Numbers
Numbers include combination of digits from 0 to 9. It is stored as a pattern of bits. Prevalent encod-
ing system : ASCII, Unicode
Images
―An image is worth a thousand words‖ is a very famous saying. In computers images are dig-
itally stored.
The pixels are represented in the form of bits. Depending upon the type of im-
age (black n white or color) each pixel would require different number of bits to
represent the value of a pixel.
Audio
Data can also be in the form of sound which can be recorded and broadcasted.
Example: What we hear on the radio is a source of data or information. Audio
data is continuous, not discrete.
Video
Video refers to broadcasting of data in form of picture or movie
DATA TRANSMISSION
wo devices communicate with each other by sending and receiving data. The data can flow be-
tween the two devices in the following ways.
Simplex
Half Duplex
Full Duplex
Simplex
In Simplex, communication is unidirectional. Only one of the devices sends the data and the
other one only receives the data.
Example: in the above diagram: a cpu send data while a monitor only receives data.
Half Duplex
In half duplex both the stations can transmit as well as receive but not at the same time.
When one device is sending other can only receive and vice- versa (as shown in figure
above.)
Example: A walkie-talkie.
Full Duplex
In Full duplex mode, both stations can transmit and receive at the same time.
Example: mobile phones
COMPUTER NETWORK
Type of Connection
There are two possible types of connections: point-to-point and multipoint.
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. Most point-to-point connections use an actual length of wire or cable to connect
the two ends, but other options, such as microwave or satellite links, are also possible.
A multipoint (also called multidrop) connection is one in which more than two specific devices share a single link. In a mul-
tipoint environment, the capacity of the channel is shared, either spatiallyor temporally. If several devices can use the link
simultaneously, it is a spatially shared connection. If users must take turns, it is a timeshared connection
TOPOLOGY
The term physical topology refers to the way in which a network is laid out physically. One or
more devices connect to a link; two or more links form a topology. The topology of a network is
the geometric representation of the relationship of all the links and linking devices (usually
called nodes) to one another. There are four basic topologies possible: mesh, star, bus, and
ring
Mesh: In a mesh topology, every device has a dedicated point-to-point link to every other device
Advantage: High reliability and fault tolerance.
Disadvantage: Expensive and complex.
Star Topology:
In a star topology, each device has a dedicated point-to-point link only to a central controller, usually called a hub. The de-
vices are not directly linked to one another. Unlike a mesh topology, a star topology does not allow direct traffic between
devices
Disadvantage: If the main cable fails, the entire network goes down.
Ring topology: is a network design where devices are connected in a circular pattern to form a closed loop. Each device is
connected to exactly two other devices
Categories of network
Definition: A network that connects computers and devices within a limited area like homes, offices, or schools.
Range: Up to 1 km.
Devices Used: Routers, switches, Ethernet cables, Wi-Fi.
Example: A school or office network.
PRO-
TOCOL
A Pro-
tocol is
one of
the components of a data communications system. Without protocol communication cannot occur.
The sending device cannot just send the data and expect the receiving device to receive and fur-
ther interpret it correctly. When the sender sends a message it may consist of text, number, im-
ages, etc. which are converted into bits and grouped into blocks to be transmitted and often certain
additional information called control information is also added to help the receiver interpret the
data. For successful communication to occur, the sender and receiver must agree upon certain
rules called protocol.
A Protocol is defined as a set of rules that governs data communications.
A protocol defines what is to be communicated, how it is to be communicated and when it is to
be communicated.
Elements of a Protocol
There are three key elements of a protocol:
Syntax
It means the structure or format of the data. It is the arrangement of data in a particular order.
Semantics
It tells the meaning of each section of bits and indicates the interpretation of each section.
It also tells what action/decision is to be taken based on the interpretation.
Timing
It tells the sender about the readiness of the receiver to receive the data. It tells the sender at what
rate the data should be sent to the receiver to avoid overwhelming the receiver.
Principles of Protocol Layering
Let us discuss two principles of protocol layering.
First Principle
The first principle dictates that if we want bidirectional communication, we need to make each
layer so that it is able to perform two opposite tasks, one in each direction. For example, the
third layer task is to listen (in one direction) and talk (in the other direction). The second layer
needs to be able to encrypt and decrypt. The first layer needs to send and receive mail.
Second Principle
The second principle that we need to follow in protocol layering is that the two objects under
each layer at both sites should be identical. For example, the object under layer 3 at both sites
should be a plaintext letter both sites should be a cipher text letter. The object under layer 1 at
both sites should be a piece of mail.
THE OSI MODEL
International Organization for Standardization (ISO) is a multinational body dedicated to world-
wide agreement on international standards. Almost three-fourths of the countries in the world are
represented in the ISO. An ISO standard that covers all aspects of network communications is the
Open Systems Interconnection (OSI) model. It was first introduced in the late 1970s.
ISO is the organization; OSI is the model
The OSI model is a layered framework for the design of network systems that allows communica-
tion between all types of computer systems. It consists of seven separate but related layers,
each of which defines a part of the process of moving information across a network
Detailed
Explana-
tion of
Each Layer
1. Physical
Layer
(Layer 1)
Tr
an
smits raw binary data over the physical medium.
Involves cables, switches, modems, fiber optics.
Example: Ethernet cables, Wi-Fi signals.
Divided into MAC (Media Access Control) and LLC (Logical Link Control).
MAC Addressing: Unique hardware address for each device.
Error Detection: Uses techniques like Cyclic Redundancy Check (CRC).
Example: Switches, Ethernet, Wi-Fi (802.11).
The TCP/IP (Transmission Control Protocol/Internet Protocol) model is a set of networking protocols that allows comput-
ers to communicate over the internet
4 Application Layer
3 Transport Layer
2 Internet Layer
Number of Layers 4 7
Example Proto- IP, TCP, UDP, HTTP, FTP Ethernet, IP, TCP, SMTP
cols
1. Analog data refers to information that is continuous; ex. sounds made by a hu-
man voice
2. Digital data refers to information that has discrete states. Digital data take on
discrete values.
3. For example, data are stored in computer memory in the form of Os and 1s
ANALOG SIGNAL
An analog signal has infinitely many levels of intensity over a period of time. As the wave moves
from value A to value B, it passes through and includes an infinite number of values along its path
as it can be seen in the figure below.
A simple analog signal is a sine wave that cannot be further decomposed into
simpler signals.
Wavelength
The wavelength of a signal refers to the relationship between frequency (or period) and propagation
speed of the wave through a medium. The wavelength is the distance a signal travels in one
period. It is given by
Wavelength = Propagation Speed X Period
OR
Wavelength =Propagation Speed X 1
Frequency It is represented
by the symbol : λ (pronounced as lamda) It is measured in micrometers
It varies from one medium to another.
A complete sine wave in the time domain can be represented by one single spike in the
frequency domain
Composite Signal
A composite signal is a combination of two or more simple sine waves with different frequency,
phase and amplitude. If the composite signal is periodic, the decomposition gives a series of signals
with discrete frequencies;
A non-periodic signal when decomposed gives a combination of sine waves with continuous fre-
quencies.
Digital Signal
Information can also be explained in the form of a digital signal.
A digital signal can be explained with the help of following points:
Definition:-
A digital is a signal that has discrete values. The signal will have value that is not continuous.
LEVEL
Information in a digital signal can be represented in the form of voltage levels.
Ex. In the signal shown below, a ‗1‘ is represented by a positive voltage and a ‗0‘ is repre-
sented by a Zero voltage.
Fig: A digital signal with Two levels. „1‟ represented by a positive voltage and „0‟ represented by a nega-
tive voltage
A Signal can have more than two levels
11 10 01 00 00 01 10 10
LEVEL
4
LEVEL
3
LEVEL
2
LEVEL
1
In general, if a signal has L levels then, each level need Log2L bits
Example: Consider a digital Signal with four levels, how many bits are re-
quired per level?
Answer: Number of bits per level = Log2L
= Log24
=2
Hence, 2 bits are required per level for a signal with four levels.
TYPES OF CHANNELS:
Each composite signal has a lowest possible(minimum) frequency and a highest possible (maximum)
frequency. From the point of view of transmission, there are two types of channels:
Baseband Transmission
The signal is transmitted without making any change to it (ie. Without modulation) In baseband
transmission, the bandwidth of the signal to be transmitted has to be less than the bandwidth of
the channel.
Ex. Consider a Baseband channel with lower frequency 0Hz and higher frequency 100Hz, hence its
bandwidth is 100 (Bandwidth is calculated by getting the difference between the highest and
lowest frequency). We can easily transmit a signal with frequency below 100Hz, such a channel
whose bandwidth is more than the bandwidth of the signal is called Wideband channel. Logically a
signal with frequency say 120Hz will be blocked resulting in loss of information, such a channel
whose bandwidth is less than the bandwidth of the signal is called Narrowband channel
TRANSMISSION MODES
Data is transmitted between two digital devices on the network in the form of bits
Transmission mode refers to the mode used for transmitting the data. The transmission medium
may be capable of sending only a single bit in unit time or multiple bits in unit time.
When a single bit is transmitted in unit time the transmission mode used is Serial Transmission and
when multiple bits are sent in unit time the transmission mode used is called Parallel transmission.
Types of Transmission Modes:
There are two basic types of transmission modes Serial and Parallel as shown in the figure below.
Serialtransmission is further categorized into Synchronous and
Asynchronous Serial transmission.
In asynchronous serial transmission the sender and receiver are not synchronized.
The data is sent in group of 8 bits i.e. in bytes. The sender can start data transmission at any
time instant without informing the receiver.
To avoid confusing the receiver while receiving the data,
―start‖ and ―stop‖ bits are inserted before and after every group of 8 bits as
shown below
0 1 BYTE 1
Fig: Start and Bit before and after every data byte
The start bit is indicated by ―0‖ and stop bit is indicated by
―1‖.
The sender and receiver may not be synchronized as seen above but at the bit level they have to be
synchronized i.e. the duration of one bit needs to be same for both sender and receiver for accurate
data transmission.
There may be gaps in between the data transmission indication that there is no data being transmit-
ted from sender. Ex. Assume a user typing at uneven speeds, at times there is no data being trans-
mitted from Keyboard to the CPU.
Following is the Diagram for Asynchronous Serial Transmission.
Advantage
3. There are no start bits, stop bits or gaps between data units
4. Since the above are absent data transmission is faster.
5. Due to synchronization there are no timing errors.
Fig. Attenuation
Distortion
Distortion changes the shape of the signal as shown below
Fig. Distortion
Noise
Noise is any unwanted signal that is mixed or combined with the original signal
during transmission.
Due to noise the original signal is altered and signal received is not same as
the one sent.
TRANSMISSION MEDIA
• Transmission media is ameans by which a communication signal is carried from one system
to another
• A transmission medium can be defined as anything that can carry information from a source
to a destination.
• The transmission medium is usually free space, metallic cable or fiber – optic cable.
• Guided Transmission media uses a cabling system that guides the data signals along a spe -
cific path.
• Guided media also known as Bounded media, which are those that provide a conduit from one
device to another, include twisted-pair cable, coaxial cable, and fiber-optic cable.
• Out of these twisted-pair cable, coaxial cable transport signals in the form of electric signals
and fiber-optic cable transport signals in the form of light.
Types:
1. Twisted-Pair Cable
2. Coaxial Cable
3. Fiber-OpticCable
Twisted-pair cable
• The wires is twisted twisted together in pairs.
• Each pair would consist of wire used for the +ve data signal and a wire used for the —ve data
signal. Any noise that appears on +ve/—ve wire of the pair would occur on the other
wire.
• Because the wires are opposite polarities, they are 180 degrees out of phase (180 degree
phases or definition of opposite polarity) when the noise appears on both wires, it cancels or
nulls itself out at the receiving used.
• Twisted pair cables are most effectively used in a system that uses a balanced line method of
transmission.
Unshielded Twisted Pair Cable (UTP) &Shielded Twisted Pair Cable (STP)
• Cables with the shield are called shielded twisted pair and commonly abbreviated STP.
• Cables without a shield are called unshielded twisted pair or UTP.
• Twisting the wires together results in characteristics impedance for the cable.
• UTP or unshielded twisted pair cable is used on Ethernet
UTP cables are used for Ethernet cabling where 4 twisted pair cables (a total of 8 wires are used)
Co-Axial Cable
Advantages:
1. Small size and light weight: The size of the optical fibers is very small.Therefore a large number
of optical fibers can fit into a cable of small diameter.
2. Easy availability and low cost: The material used for the manufacturing of optical fibers is ―Sil-
ica glass‖. this material is easily available. So the optical fibers cost lower than the cables with
metallic conductors.
3 No electrical or electromagnetic interference: Since the transmission takes place in the form of light
rays the signal is not affected due to any electrical or electromagnetic Interference.
3. Large Bandwidth: As the light rays have a very high frequency in GHz range, the bandwidth of
the optical fiber is extremely large.
4. Other advantages: - No cross talk inside the optical fiber cable. Signal can be sent up to 100
times faster.
2. Sky-wave propagation
1. Radio waves:
• Electromagnetic wave ranging in frequencies between 3 KHz and 1GHz are normally called ra-
dio waves.
• Radio waves are omni-directional when an antenna transmits radio waves they are propa-
gated in all directions. This means that sending and receiving antenna do not have to he
aligned. A sending antenna can send waves that can be received by any receiving antenna.
• Radio waves particularly those waves that propagate in sky mode, can travel long distances.
This makes radio waves a good candidate for long-distance broadcasting such as AM radio.
• Radio waves particularly those of low and medium frequencies can penetrate walls. It is an ad-
vantage because; an AM radio can receive signals inside a building. It is the disadvantage be-
cause we cannot isolate a communication to first inside or outside a building.
2. Microwaves:
• Electromagnetic waves having frequencies between 1 and 300 GHz are called microwaves.
• Microwaves are unidirectional; when an antenna transmits microwaves they can be narrowly
focused. This means that the sending and receiving antennas need to be aligned. The unidi-
rectional property has an obvious advantage. A pair of antennas can be aligned without inter-
fering with another pair of aligned antennas.
• Microwaves propagation is line-of-sight. Since the towers with the mounted antennas needs to
be in direct sight of each other, towers that are far apart need to be very tall, the curvature of
the earth as well as other blocking obstacles do not allow two short towers to communicate
using microwaves, Repeaters are often needed for long distance communication very high fre-
quency microwaves cannot penetrate walls.
• Parabolic dish antenna and horn antenna are used for this means of trans-
mission
3 Infrared
• Infrared signals with frequencies ranges from 300 GHz to 400 GHz can be used for short range
communication.
• Infrared signals, having high frequencies, cannot penetrate walls. This helps to prevent inter -
ference between one system and another. Infrared Transmissionin one room cannot be af-
fected by the infrared transmission in another room.
• Infrared band, has an excellent potential for data transmission. Transfer digital data is possi -
ble with a high speed with a very high frequency. There are number of computer devices
which are used to send the data through infrared medium e.g. keyboard mice, PCs and print-
ers. There are some manufacturers provide a special part called the IrDA port that allows a
wireless keyboard to communicate with a PC.
Digital-to-analog conversion is the process of changing one of the characteristics of an analog signal based on the infor-
mation in digital data. Figure 5.1 shows the relationship between the digital information, the digital-to-analog modulat-
ing process, and the resultant analog signal.
A sine wave is defined by three characteristics: amplitude, frequency, and phase. When we vary anyone of these charac-
teristics, we create a different version of that wave. So, by changing one characteristic of a simple electric signal, we can
use it to represent digital data. Before we discuss specific methods of digital-to-analog modulation, two basic issues must
be reviewed: bit and baud rates and the carrier signal.
Aspects of Digital-to-Analog Conversion
Before we discuss specific methods of digital-to-analog modulation, two basic issues must be reviewed: bit and baud
rates and the carrier signal.
Carrier Signal
In analog transmission, the sending device produces a high-frequency signal that acts as a base for the information signal.
This base signal is called the carrier signal or carrier frequency. The receiving device is tuned to the frequency of the car-
rier signal that it expects from the sender. Digital information then changes the carrier signal by modifying one or more of
its characteristics (amplitude, frequency, or phase). This kind of modification is called modulation (shift keying).
Any of the three characteristics can be altered in this way, giving us at least three mechanisms for modulating digi-
tal data into an analog signal: amplitude shift keying (ASK), frequency shift keying (FSK), and phase shift keying
(PSK).
1. Amplitude Modulation:
In AM transmission, the carrier signal is modulated so that its amplitude varies with the chang-
ing amplitudes of the modulating signal. The frequency and phase of the carrier remain the
same. Only the amplitude changes to follow variations in the information. The following figure
shows how this concept works. The modulating signal is the envelope of the carrier.
3. Phase Modulation:
In PM transmission, the phase of the carrier signal is modulated to follow the changing voltage
level (amplitude) of the modulating signal. The peak amplitude and frequency of the carrier sig-
nal remain constant, but as the amplitude of the information signal changes, the phase of the
carrier changes correspondingly. It is proved mathematically that PM is the same as FM with
one difference.
In FM, the instantaneous change in the carrier frequency is proportional to the amplitude of the
modulating signal; in PM the instantaneous change in the carrier frequency is proportional to
the derivative of the amplitude of the modulating signal. The following figure shows the relation-
ships of the modulating signal, the carrier signal, and the resultant PM signal.
Digital signal is denoted by discreet signal, which represents digital data.There are three
types of line coding schemes available:
Uni-polar Encoding
Unipolar encoding schemes
use single voltage level to repre-
sent data. In this case, to represent
bi- nary 1, high voltage is trans-
mit- ted and to represent 0, no
volt- age is transmitted. It is also
called Unipolar-Non-return- to-
zero, because there is no rest condi-
tion i.e. it either represents 1 or 0.
Polar Encoding
Polar encoding scheme uses multiple voltage levels to represent binary values. Polar
encodings is available in four types:
It uses two different voltage levels to represent binary values. Generally, positive voltage represents 1
and negative value represents 0. It is also NRZ because there is no rest condition.
RZ uses three voltage levels, positive voltage to represent 1, negative voltage to represent 0 and zero voltage for none. Sig-
nals change during bits not between bits.
Manchester
This encoding scheme is a combination of RZ and NRZ-L. Bit time is divided into two halves. It transits in
the middle of the bit and changes phase when a different bit is encountered.
Differential Manchester
This encoding scheme is a combination of RZ and NRZ-I. It also transit at the middle of the bit but
changes phase only when 1 is encountered.
Bipolar Encoding
Bipolar encoding uses three voltage levels, positive, negative and zero. Zero voltage repre-
sents binary 0 and bit 1 is represented by altering positive and negative voltages.
Analog-to-Digital Conversion
Microphones create analog voice and camera creates analog videos, which are treated is
analog data. To transmit this analog data over digital signals, we need analog to digital con-
version.
Analog data is a continuous stream of data in the wave form whereas digital data is dis-
crete. To convert analog wave into digital data, we use Pulse Code Modulation (PCM).
PCM is one of the most commonly used method to convert analog data into digital form. It
involves three steps:
Sampling
Quantization
Encoding.
Sampling
The analog signal is sampled every T interval. Most important factor in sampling is the rate at
which analog signal is sampled. According to Nyquist Theorem, the sampling rate must be at
least two times of the highest frequency of the signal.
Quantization
Sampling yields discrete form of continuous analog signal. Every discrete pattern shows the
amplitude of the analog signal at that instance. The quantization is done between the maxi-
mum amplitude value and the minimum amplitude value. Quantization is approximation of
the instantaneous analog value.
Encoding
MULTIPLEXING
Whenever the bandwidth of a medium linking two devices is greater than the bandwidth needs of the devices, the link can
be shared. Multiplexing is the set of techniques that allows the simultaneous transmission of multiple signals across a single
data link. In a multiplexed system, n lines share the bandwidth of one link. Figure 6.1 shows the basic format of a multi-
plexed system. The lines on the left direct their transmission streams to a multiplexer (MUX), which combines them into a
single stream (many-to-one). At the receiving end, that stream is fed into a demultiplexer (DEMUX), which separates the
stream back into its component transmissions (one-to-many) and directs them to their corresponding lines. In the figure,
the word link refers to the physical path. The word channel refers to the portion of a link that carries a transmission be-
tween a given pair of lines. One link can have many (n) channels.
3. Time-Division Multiplexing
Time Division multiplexing (TDM) is a digital process that allows several connections to share the high bandwidth
of a linle Instead of sharing a portion of the bandwidth as in FDM, time is shared. Each connection occupies a por-
tion of time in the link. Figure 6.12 gives a conceptual view of TDM. Note that the same link is used as in FDM;
here, however, the link is shown sectioned by time rather than by frequency. In the figure, portions of signals
1,2,3, and 4 occupy the link sequentially.
UNIT 3
Data Link Layer: Error detection and correction, Block Encoding, Linear Block Encoding, Cyclic codes, Check-
sum. Data link Control- Framing, Flow and Error Control, Noiseless Channel, Noisy Channel, HDLC, Point to
point protocol.
Framing: The process of breaking the data from the Network Layer into manageable chunks called frames. Each frame is
encapsulated with necessary headers (like source and destination addresses) for proper routing.
Addressing: The Data Link Layer adds Media Access Control (MAC) addresses to the frame, ensuring that data reaches the
correct device in a network.
Error Control: It detects and corrects errors that may occur during data transmission, ensuring the integrity of the data.
Flow Control: Prevents data overflow in slow receivers by regulating the rate of data transfer.
Access Control: Determines how devices gain access to the physical medium (like Ethernet or Wi-Fi) and manage collisions
when two devices attempt to send data simultaneously.
Example: In Ethernet networks, the Data Link Layer defines how devices are addressed using MAC addresses and how they
handle data collisions using Carrier Sense Multiple Access with Collision Detection (CSMA/CD).
Framing Techniques:
Character Count: The first field in the frame specifies how many characters (or bytes) are in the frame. It is a simple
method but not very reliable since if the character count itself gets corrupted, the frame becomes unrecognizable.
Byte-Oriented Protocol (Byte Stuffing): Special escape characters are inserted before any special control byte (like 0x7E in
PPP). This ensures that data bytes do not conflict with control bytes.
Bit-Oriented Protocol (Bit Stuffing): In protocols like HDLC, bit stuffing is used where a '0' bit is inserted after five consecu-
tive '1's to prevent confusion with special flag sequences like 01111110 (used to denote the start and end of a frame).
Example: HDLC (High-Level Data Link Control) uses bit stuffing, where a '0' is inserted after five consecutive '1's to avoid
misinterpretation of the frame boundaries.
b) Flow Control
Flow control mechanisms prevent the receiver from being overwhelmed with data from the sender. These techniques
manage the pacing of data transmission.
Flow Control Techniques:
Stop-and-Wait Protocol: The sender sends one frame and waits for an acknowledgment before sending the next. Al-
though easy to implement, this method can be inefficient as the sender must wait after every transmission.
Sliding Window Protocol: The sender and receiver maintain a window (a set of frames that can be sent before receiving
an acknowledgment). This method supports full-duplex communication and allows the sender to transmit multiple frames
at once, improving throughput.
Example: TCP (Transmission Control Protocol) uses a sliding window mechanism to manage flow control in a connection,
allowing multiple packets to be sent and acknowledged without waiting for one packet at a time.
c) Error Control
Error control ensures that data is transmitted without corruption by detecting errors in transmitted frames and requesting
retransmission if necessary.
Error Detection: Methods like Parity, Checksum, and Cyclic Redundancy Check (CRC) are used to detect errors in transmit-
ted data.
Error Correction: In cases where errors are detected, data can be corrected using techniques like Automatic Repeat Re-
quest (ARQ), where frames are retransmitted when an error is detected.
Acknowledgment and Retransmission: The receiver sends an acknowledgment (ACK) to the sender if the frame was re-
ceived correctly, or a negative acknowledgment (NAK) to request a retransmission.
Example: The Go-Back-N ARQ protocol uses sequence numbers to track frames. If an error is detected in a frame, all sub-
sequent frames are resent, even if they were transmitted correctly.
Features:
Protocols are simpler since the assumption is that no errors will occur during transmission.
Use Case: Noiseless channels are often used in theoretical scenarios or simulations where focus is placed on flow control
and framing without complicating factors like noise.
b) Noisy Channel
A noisy channel is a real-world scenario where data can get corrupted due to noise, interference, or signal attenuation. In
this case, error detection and correction mechanisms are necessary.
ARQ Protocols:
Stop-and-Wait ARQ: After sending a frame, the sender waits for an acknowledgment (ACK). If no ACK is received, the
frame is retransmitted.
Go-Back-N ARQ: The sender can send several frames, but if any frame is lost or corrupted, all frames from that point are
retransmitted.
Selective Repeat ARQ: Only the frames that were detected to be in error are retransmitted, making it more efficient than
Go-Back-N.
Example: Wi-Fi and Ethernet use error detection codes like CRC to handle errors and ensure the integrity of data over
noisy channels.
Parity Check: A single bit (parity bit) is added to the data to make the total number of 1's either even or odd. If the total
number of 1's doesn't match the expected parity, an error is detected.
Checksum: The sender divides data into equal-sized parts, calculates a checksum (the sum of all parts), and sends it along
with the data. The receiver recalculates the checksum and compares it with the sent value.
Cyclic Redundancy Check (CRC): A more robust error detection technique where data is treated as a polynomial and di-
vided by a pre-defined generator polynomial. The remainder of this division is appended to the data as a CRC value.
b) Error Correction
Error correction goes a step further by not only detecting errors but also correcting them without needing retransmission.
Hamming Codes: These are a class of codes that can correct single-bit errors and detect two-bit errors by adding redun-
dant bits at specific positions.
Linear Block Codes: These codes add redundant bits to data to form a codeword (a combination of data and redundant
bits) that can be used to detect and correct errors.
Cyclic Codes (CRC): Used primarily for error detection, but when paired with error correction methods, they can correct
errors as well.
Example: Ethernet uses CRC-32 for error detection and correction in frames.
I-frames (Information Frames): These carry the actual data and sequence numbers.
S-frames (Supervisory Frames): Used for flow control and error control.
U-frames (Unnumbered Frames): Used for link management, such as establishing or terminating a connection.
Modes of Operation:
Normal Response Mode (NRM): In this mode, the primary device controls the communication link.
Asynchronous Balanced Mode (ABM): Both devices can initiate communication, making it more efficient.
Asynchronous Response Mode (ARM): A less commonly used mode.
Use Case: HDLC is commonly used in point-to-point and multipoint communication links, such as in WAN (Wide Area Net-
work) communication.
Features of PPP:
Provides authentication through PAP (Password Authentication Protocol) and CHAP (Challenge Handshake Authentication
Protocol).
Uses LCP (Link Control Protocol) for link management and error checking.
Use Case: PPP is commonly used in dial-up internet connections and VPNs (Virtual Private Networks).
UNIT 4
Unit 4 Multiple Access & Local Area Networks: Multiple Access, Random Access-CSMA, CSMA/CD,CSMA/CA. Controlled Access-Reser-
vation, Polling, Token Passing in FDDI and CDDI. Channelization- FDMA, TDMA, CDMA. Wired LANs: Ethernet, IEEE standards, Standard
Ethernet, Changes in the Standard, Fast Ethernet, Bridges, Functions of a bridge, Bridge Protocol Architecture, Fixed routing, Spanning
tree approach, Connecting devices like Repeaters, Hubs, Bridge Gigabit Ethernet. Wireless LANs, Applications, Architecture, IEEE
802.11, Architecture and Services, Medium Access Control, Physical layer.
Multiple Access refers to the method that allows multiple devices to share the same communication medium efficiently. It solves the
issue of medium contention when more than one device attempts to transmit data simultaneously.
Local Area Network (LAN) is a network that connects computers and other devices within a small geographical area such as a home,
office, or campus. LANs offer high data transfer rates, low latency, and are typically based on Ethernet and Wi-Fi standards.
Applications of LANs:
In random access methods, no device is given special priority. Devices transmit when they are ready and handle collisions if they occur.
i. ALOHA
ALOHA is one of the earliest random access protocols developed at the University of Hawaii.
Pure ALOHA:
· Devices transmit data whenever they want.
· If a collision happens, they wait for a random time and retransmit.
· Throughput Formula: S=G⋅e−2GS = G \cdot e^{-2G}, Maximum throughput is 18.4% at G=0.5G = 0.5
Slotted ALOHA:
Example: In satellite communication, ALOHA helps devices communicate with a central hub.
Types:
· 1-persistent CSMA: Transmits immediately if the channel is idle; causes collisions if many nodes act simultaneously.
· Non-persistent CSMA: Waits random time if channel is busy; reduces collisions.
· p-persistent CSMA: For slotted channels; sends with probability p when idle.
i. Reservation
Used in: FDDI (Fiber Distributed Data Interface), CDDI (Copper Distributed Data Interface)
c. Channelization Protocols
Multiple users are allowed to use the same channel simultaneously using separation techniques.
Mathematical Representation: r(t)=∑i=1ndi(t)⋅ci(t)r(t) = \sum_{i=1}^{n} d_i(t) \cdot c_i(t) Where di(t)d_i(t) is user data and ci(t)c_i(t) is
the spreading code.
3. Wired LANs
a. Ethernet Overview
Ethernet is the dominant wired LAN technology, governed by the IEEE 802.3 standard.
c. Changes in Standards
Fields:
a. Repeaters
· Regenerate signals
· Physical Layer (Layer 1)
b. Hubs
· Multiport repeater
· No traffic filtering
c. Bridges
5. Wireless LANs
a. Applications
Components:
d. Physical Layer
unit 5
Network Layer and Transport Layer: Internetwork protocols, principles of Internetworking, Internet protocol operation, IPV4: ICMP,
ARP, IPV6, Internetwork Operations, Multicasting, IGMP, Routing Protocols-distance Vector, Link State routing, path-vector routing,
Border Gateway Routing, OSPF, Integrated service Architecture, Differentiated services, service level agreements. Connection oriented
transport protocol mechanism, TCP, TCP congestion control, UDP
Application Layer: Domain Naming System, Remote Logging- Electronic mail & File Transfer, WWW and HTTP, webdocuments,
HTTP transactions, Network Management system, SNMPV2, V3.
1. Network Layer
A. Internetworking Concepts
Internetworking refers to connecting multiple networks together to function as a single large network. The goal is seamless data trans-
fer across different types of networks.
Principles of Internetworking:
· Transparency: Data should move across different networks without user awareness of the underlying technologies.
· Scalability: Should support growing numbers of devices and networks.
· Robustness: Must handle errors, congestion, and network failures.
Internetwork Protocols:
· The main protocol used for internetworking is the Internet Protocol (IP).
B. IP Protocols
IPv4:
IPv6:
C. Internetwork Operations
Packet Forwarding:
Fragmentation:
· If a packet is too large for a network, it's split into smaller fragments.
· IPv6 avoids this by enforcing path MTU discovery.
D. Multicasting
E. Routing Protocols
3. Path-Vector Routing:
· Packet-based model.
· Traffic classified and marked (EF, AF, BE).
2. Transport Layer
A. Overview
Characteristics:
· Connection-oriented.
· Reliable delivery.
· Ordered data transfer.
· Fields: Source Port, Destination Port, Sequence Number, Acknowledgment Number, Flags, Window Size, etc.
Connection Establishment:
· Three-way handshake:
1. SYN
2. SYN-ACK
3. ACK
Flow Control:
Error Control:
Congestion Control:
Characteristics:
· Connectionless.
· No error recovery or flow control.
· Suitable for time-sensitive applications like video streaming and DNS.
3. Application Layer
Hierarchy:
· Root Servers
· Top-Level Domains (TLDs)
· Authoritative Servers
Types of Records:
2. Electronic Mail:
C. Web Services
2. HTTP Transactions:
· Request/Response model.
· Methods: GET, POST, PUT, DELETE.
3. Web Documents:
D. Network Management