Lecture Note (CN) - 930272516
Lecture Note (CN) - 930272516
ON
Computer Networks
(20CS503)
V Semester (R20 Regulation)
Text Books:
1. Data Communication and Networking, 4th Edition, Behrouz A. Forouzan, McGraw-
Hill.
Reference Books:
1. Data and Computer Communication, 8th Edition, William Stallings, Pearson Prentice
Hall India.
2. Computer Networks, 8th Edition, Andrew S. Tanenbaum, Pearson New
International Edition.
3. Vilas S Bagad and Irish A Dhotre Computer Networks, Technical Publications.
Web References:
1. http://computer.howstuffworks.com/computer-networking-channel.htm
2. https://www.geeksforgeeks.org/layers-osi-model/
3. https://www.wikilectures.eu/w/Computer_Network
E-Books:
1. http://www.freebookcentre.net/networking-books-download/Lecture-Notes-on-
Computer-Networks.html
2. http://www.freebookcentre.net/networking-books-download/Introduction-to-
Computer- Networks.html
Course Outcomes:
At the end of the course students able to:
1. Understanding the basic network infrastructure to learn the overall function of
networking systems
2. Analyze various wired and wireless transmission media for data communication
networks
3. Apply knowledge of different techniques of error detection and correction to detect
and solve error bit during data transmission
4. Analyze various routing algorithm and select an appropriate one for a routing design
5. Understand the concepts of Domain name space.
UNIT-I
Information today comes in different forms such as text, numbers, images, audio, and video.
Text: In data communications, text is represented as a bit pattern, a sequence of bits (Os or
Is).
Different sets of bit patterns have been designed to represent text symbols. Each set is called
a code, and the process of representing symbols is called coding. Today, the prevalent coding
system is called Unicode, which uses 32 bits to represent a symbol or character used in any
language in the world.
The American Standard Code for Information Interchange (ASCII), developed some decades
ago in the United States, now constitutes the first 127 characters in Unicode and is also
referred to as Basic Latin.
Numbers: Numbers are also represented by bit patterns. However, a code such as ASCII is
not used to represent numbers; the number is directly converted to a binary number to
simplify mathematical operations. Appendix B discusses several different numbering
systems. Images: Images are also represented by bit patterns.
DATA FLOW:
•
TOPOLOGY:
The term 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
1.MESH:
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. To find the number of physical links in a fully connected mesh network with n
nodes, we first consider that each node must be connected to every other node. Node 1 must
be connected to n - I nodes, node 2 must be connected to n – 1 nodes, and finally node n must
be connected to n - 1 nodes. We need n(n - 1) physical links. However, if each physical link
allows communication in both directions (duplex mode), we can divide the number of links
by 2. In other words, we can say that in a mesh topology, we need n(n -1) /2 duplex-mode
links. To accommodate that many links, every device on the network must have n – 1
input/output (VO) ports to be connected to the other n - 1 stations
• Advantages:
• 1. The use of dedicated links guarantees that each connection can carry its own data
load, thus eliminating the traffic problems that can occur when links must be shared
by multiple devices.
• 2. A mesh topology is robust. If one link becomes unusable, it does not incapacitate
the entire system. Third, there is the advantage of privacy or security. When every
message travels along a dedicated line, only the intended recipient sees it. Physical
boundaries prevent other users from gaining access to messages. Finally, point-to-
point links make fault identification and fault isolation easy. Traffic can be routed to
avoid links with suspected problems. This facility enables the network manager to
discover the precise location of the fault and aids in finding its cause and solution.
• Disadvantages:
• 1. Disadvantage of a mesh are related to the amount of cabling because every device
must be connected to every other device, installation and reconnection are difficult.
• 2. Second, the sheer bulk of the wiring can be greater than the available space (in
walls, ceilings, or floors) can accommodate. Finally, the hardware required to connect
each link (I/O ports and cable) can be prohibitively expensive.
2.STAR:
• In a star topology, each device has a dedicated point-to-point link only to a central
controller, usually called a hub. The devices are not directly linked to one another.
Unlike a mesh topology, a star topology does not allow direct traffic between devices.
The controller acts as an exchange: If one device wants to send data to another, it
sends the data to the controller, which then relays the data to the other connected
device . A star topology is less expensive than a mesh topology. In a star, each device
needs only one link and one I/O port to connect it to any number of others. This factor
also makes it easy to install and reconfigure. Far less cabling needs to be housed, and
additions, moves, and deletions involve only one connection: between that device and
the hub.
3.BUS:
4.RING:
In a ring topology, each device has a dedicated point-to-point connection with only the two
devices on either side of it. A signal is passed along the ring in one direction, from device to
device, until it reaches its destination. Each device in the ring incorporates a repeater. When a
device receives a signal intended for another device, its repeater regenerates the bits and
passes them along
NETWORK TOPOLOGY
PROTOCOLS:
STANDARDS:
Standards are the set of rules for data communication that are needed for exchange of
information among devices. It is important to follow Standards which are created by
various Standard Organization like IEEE , ISO , ANSI etc
Types of Standards :
• Standards are of two types :
• De Facto Standard.
• De Jure Standard
OSI MODEL:
• OSI stands for Open System Interconnection is a reference model that describes
how information from a software application in one computer moves through a
physical medium to the software application in another computer.
• OSI consists of seven layers, and each layer performs a particular network function.
• OSI model was developed by the International Organization for Standardization (ISO)
in 1984, and it is now considered as an architectural model for the inter-computer
communications.
• OSI model divides the whole task into seven smaller and manageable tasks. Each
layer is assigned a particular task.
• Each layer is self-contained, so that task assigned to each layer can be performed
independently.
• The OSI model is divided into two layers: upper layers and lower layers.
• The upper layer of the OSI model mainly deals with the application related issues, and
they are implemented only in the software. The application layer is closest to the end
user. Both the end user and the application layer interact with the software
applications. An upper layer refers to the layer just above another layer.
• The lower layer of the OSI model deals with the data transport issues. The data link
layer and the physical layer are implemented in hardware and software. The physical
layer is the lowest layer of the OSI model and is closest to the physical medium. The
physical layer is mainly responsible for placing the information on the physical
medium.
Functions of the OSI Layers:
• There are the seven OSI layers. Each layer has different functions. A list of seven
layers are given below:
1. Physical Layer
2. Data-Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer
TRANSMISSION MEDIA:
• Transmission media is a communication channel that carries the information from the
sender to the receiver. Data is transmitted through the electromagnetic signals.
• The main functionality of the transmission media is to carry the information in the
form of bits through LAN(Local Area Network).
• It is a physical path between transmitter and receiver in data communication.
• In a copper-based network, the bits in the form of electrical signals.
• In a fibre based network, the bits in the form of light pulses.
• In OSI(Open System Interconnection) phase, transmission media supports the Layer
1. Therefore, it is considered to be as a Layer 1 component.
• The electrical signals can be sent through the copper wire, fibre optics, atmosphere,
water, and vacuum.
• The characteristics and quality of data transmission are determined by the
characteristics of medium and signal.
• Transmission media is of two types are wired media and wireless media. In wired
media, medium characteristics are more important whereas, in wireless media, signal
characteristics are more important.
• Different transmission media have different properties such as bandwidth, delay, cost
and ease of installation and maintenance.
• The transmission media is available in the lowest layer of the OSI reference model,
i.e., Physical layer.
• Bandwidth: All the factors are remaining constant, the greater the bandwidth of a
medium, the higher the data transmission rate of a signal.
• Transmission impairment: When the received signal is not identical to the
transmitted one due to the transmission impairment. The quality of the signals will get
destroyed due to transmission impairment.
• Interference: An interference is defined as the process of disrupting a signal when it
travels over a communication medium on the addition of some unwanted signal.
• Attenuation: Attenuation means the loss of energy, i.e., the strength of the signal
decreases with increasing the distance which causes the loss of energy.
• Distortion: Distortion occurs when there is a change in the shape of the signal. This
type of distortion is examined from different signals having different frequencies.
Each frequency component has its own propagation speed, so they reach at a different
time which leads to the delay distortion.
• Noise: When data is travelled over a transmission medium, some unwanted signal is
added to it which creates the noise.
• A shielded twisted pair is a cable that contains the mesh surrounding the wire that
allows the higher transmission rate.
Characteristics Of Shielded Twisted Pair:
• The cost of the shielded twisted pair cable is not very high and not very low.
• An installation of STP is easy.
• It has higher capacity as compared to unshielded twisted pair cable.
• It has a higher attenuation.
• It is shielded that provides the higher data transmission rate.
Coaxial Cable
• Coaxial cable is very commonly used transmission media, for example, TV wire is
usually a coaxial cable.
• The name of the cable is coaxial as it contains two conductors parallel to each other.
• It has a higher frequency as compared to Twisted pair cable.
• The inner conductor of the coaxial cable is made up of copper, and the outer
conductor is made up of copper mesh. The middle core is made up of non-conductive
cover that separates the inner conductor from the outer conductor.
• The middle core is responsible for the data transferring whereas the copper mesh
prevents from the EMI(Electromagnetic interference).
• Coaxial cable is of two types:
1. Baseband transmission: It is defined as the process of transmitting a single signal at
high speed.
2. Broadband transmission: It is defined as the process of transmitting multiple signals
simultaneously.
Fibre Optic:
• Fibre optic cable is a cable that uses electrical signals for communication.
• Fibre optic is a cable that holds the optical fibres coated in plastic that are used to
send the data by pulses of light.
• The plastic coating protects the optical fibres from heat, cold, electromagnetic
interference from other types of wiring.
• Fibre optics provide faster data transmission than copper wires.
2.UnGuided Transmission
• An unguided transmission transmits the electromagnetic waves without using any
physical medium. Therefore it is also known as wireless transmission.
• In unguided media, air is the media through which the electromagnetic energy can
flow easily.
• Unguided transmission is broadly classified into three categories:
• Radio waves
• Radio waves are the electromagnetic waves that are transmitted in all the directions of
free space.
• Radio waves are omnidirectional, i.e., the signals are propagated in all the directions.
• The range in frequencies of radio waves is from 3Khz to 1 khz.
• In the case of radio waves, the sending and receiving antenna are not aligned, i.e., the
wave sent by the sending antenna can be received by any receiving antenna.
• An example of the radio wave is FM radio.
MICRO WAVES:
Characteristics of Microwave:
• Frequency range: The frequency range of terrestrial microwave is from 4-6 GHz to
21-23 GHz.
• Bandwidth: It supports the bandwidth from 1 to 10 Mbps.
• Short distance: It is inexpensive for short distance.
• Long distance: It is expensive as it requires a higher tower for a longer distance.
• Attenuation: Attenuation means loss of signal. It is affected by environmental
conditions and antenna size.
Infrared
• An infrared transmission is a wireless technology used for communication over short
ranges.
• The frequency of the infrared in the range from 300 GHz to 400 THz.
• It is used for short-range communication such as data transfer between two cell
phones, TV remote operation, data transfer between a computer and cell phone resides
in the same closed area.
Characteristics Of Infrared:
It supports high bandwidth, and hence the data rate will be very high.
• Infrared waves cannot penetrate the walls. Therefore, the infrared communication in
one room cannot be interrupted by the nearby rooms.
• An infrared communication provides better security with minimum interference.
• Infrared communication is unreliable outside the building because the sun rays will
interfere with the infrared waves.
LAN:
• A Local Area Network (LAN) is a private network that connects computers and
devices within a limited area like a residence, an office, a building or a campus. On a
small scale, LANs are used to connect personal computers to printers. However,
LANs can also extend to a few kilometers when used by companies, where a large
number of computers share a variety of resources like hardware (e.g. printers,
scanners, audiovisual devices etc), software (e.g. application programs) and data.
WIRELESS LAN(WLAN):
CONNECTING LAN:
VIRTUAL LAN(VLAN):
• Virtual LANs are a logical group of computers that appear to be on the same LAN
irrespective of the configuration of the underlying physical network. Network
administrators partition the networks to match the functional requirements of the
VLANs so that each VLAN comprise a subset of ports on a single or multiple
switches. This allows computers and devices on a VLAN to communicate in the
simulated environment as if it is a separate LAN.
• Twisted pair is a physical media made up of a pair of cables twisted with each other.
A twisted pair cable is cheap as compared to other transmission media. Installation of
the twisted pair cable is easy, and it is a lightweight cable. The frequency range for
twisted pair cable is from 0 to 3.5KHz.
A twisted pair consists of two insulated copper wires arranged in a regular spiral pattern
SWITCHING AND ENCODING ASYNCHRONOUS COMMUNICATION:
• n large networks, there can be multiple paths from sender to receiver. The switching
technique will decide the best route for data transmission.
• Switching technique is used to connect the systems for making one-to-one
communication.
Circuit Switching:
Crossbar Switch:
• The Crossbar switch is a switch that has n input lines and n output lines. The crossbar
switch has n2 intersection points known as crosspoints.
Multistage Switch:
• Multistage Switch is made by splitting the crossbar switch into the smaller units and
then interconnecting them.
• It reduces the number of crosspoints.
• If one path fails, then there will be an availability of another path
Message Switching:
• The packet switching is a switching technique in which the message is sent in one go,
but it is divided into smaller pieces, and they are sent individually.
• The message splits into smaller pieces known as packets and packets are given a
unique number to identify their order at the receiving end.
• Every packet contains some information in its headers such as source address,
destination address and sequence number.
• Packets will travel across the network, taking the shortest path as possible.
• All the packets are reassembled at the receiving end in correct order.
• If any packet is missing or corrupted, then the message will be sent to resend the
message.
• If the correct order of the packets is reached, then the acknowledgment message will
be sent.
ENCODING:
It is the process of converting the data or a given sequence of characters, symbols, alphabets
etc., into a specified format, for the secured transmission of data. Decoding is the reverse
process of encoding which is to extract the information from the converted format
Data Encoding:
Encoding Techniques:
The data encoding technique is divided into the following types, depending upon the type of
data conversion.
• Digital data to Digital signals − These are in this section. There are several ways to
map digital data to digital signals
• Digital data to Analog signals − The modulation techniques such as Amplitude Shift
Keying ASK Frequency Shift Keying FSK , fall under this category.
• Analog data to Analog signals − The modulation techniques such as Amplitude
Modulation, Frequency Modulation and Phase Modulation of analog signals, fall
under this category.
1.POLAR ENCODING:
• Polar encoding is an encoding design that needs two voltage methods — one is
positive, and the second is negative.
• An average voltage method is decreased using both techniques, and the unipolar
encoding scheme’s DC component is removed.
• In Manchester and differential encoding, each bit includes both +ve and –ve voltage.
Therefore, the DC component removed.
Manchester Code:
Biphase–M Code:
• n this coding system, there is continually a transition at the starting of the bit
interval. The mark, i.e., binary '1', has an extra transition in the bit interval
center.
• The figure shows an example of data bit 11001011 using Biphase-M code −
Biphase –S Code:
• This coding system is similar to the Biphase-M code system. There is continually
a transformation at the starting of the bit interval. The only alteration is that
space, i.e., '0', has an extra transition in the middle of the bit interval except for
'1' as in Biphase-M code.
• The figure shows an example of data bit 11001011 using BIphase-S Code −
• This coding system is continually a change in the middle of the bit interval. Space
or binary '0' has an additional transition at the starting of the bit interval.
• The figure shows an example of data bit 01001011 using differential-Manchester
code
Example 1 − Show the NRZ-L code for data byte 10110100
These are a set of communication standards for simultaneous digital transmission of voice,
video, data, and other network services over the traditional circuits of the public switched
telephone network. Before Integrated Services Digital Network (ISDN), the telephone system
was seen as a way to transmit voice, with some special services available for data. The main
feature of ISDN is that it can integrate speech and data on the same lines, which were not
available in the classic telephone system
ISDN is a circuit-switched telephone network system, but it also provides access to packet-
switched networks that allows digital transmission of voice and data. This results in
potentially better voice or data quality than an analog phone can provide. It provides a
packet-switched connection for data in increments of 64 kilobit/s. It provided a maximum of
128 kbit/s bandwidth in both upstream and downstream directions. A greater data rate was
achieved through channel bonding. Generally, ISDN B-channels of three or four BRIs (six to
eight 64 kbit/s channels) are bonded
Principle of ISDN:
• The ISDN works based on the standards defined by ITU-T (formerly CCITT).
The Telecommunication Standardization Sector (ITU-T) coordinates standards
for telecommunications on behalf of the International Telecommunication Union
(ITU) and is based in Geneva, Switzerland. The various principles of ISDN as
per ITU-T recommendation are:
• To support switched and non-switched applications
Advantages of ISDN:
• ISDN channels have a reliable connection.
• ISDN is used to facilitate the user with multiple digital channels.
• It has faster data transfer rate.
Disadvantages of ISDN:
• ISDN lines costlier than the other telephone system.
• It requires specialized digital devices.
• It is less flexible.
ATM:
• Interworking between narrow band and broad band traffic in an ATM network is
provided by a narrow band switch having a point to multipoint capability. Narrow
band channels are mapped to time slots in broad band virtual circuits by providing a
mapping between channel addresses and virtual circuit payloads. The narrow band
traffic is interfaced to the broad band ATM network via a network of adaptive virtual
junctors each of which comprises an n×64 kbit/s connection so that the cell assembly
delay is reduced by a factor of 1/n. this overcomes the assembly delay problem
without the need to resort to unproductive padding. Further, by providing dynamic
capacity adjustment of the virtual circuits between the junctors, maximum use is made
of the available capacity without the need for the permanent reservation of capacity
which may be unused for much of the time.
UNIT-II
• Error correction and error detection techniques are work on the data-link layer. The
data link layer ensures the frames are sent from the sender to the receiver with
accuracy. Error correction is more difficult than error detection.
Error:
• An error is a situation when the data send by the sender and receive by the receiver,
but that data doesn't match the sender data.
• For example, the sender sends the 0101010 data, and the receiver receives the
1101010.
Types of Error
1. Single bit error
2. Burst error
Single-bit error: In the single-bit error, only one bit is changed in the frame. For example,
the sender sends the data (01010100) in the frame, and the receiver receives the data
(11010100) in the frame
Burst error: In the burst error, one or more than one bits is changed in the frame. For
example, the sender sends the data (01010100) in the frame, and the receiver receives the
data (11010100) in the frame
Redundancy
• The main concept of error detection and error correction is redundancy. To the error
detection and error correction, redundancy adds some extra redundant bits in the bits.
The sender adds these redundant bits, and the receiver eliminates these redundant bits.
Coding
• Redundancy is achieved by way of various coding schemes. The sender introduces
redundant bits by establishing a connection between the redundant bits and the actual
data bits. The receiver checks the relationship between the redundant bits and the
actual data bits to detect the error. Coding schemes can be divided into two
categories: block coding and convolution coding. Block coding is less complex than
the convolution coding.
Error Detection:
Error detection is the method of identifying errors. To identify these errors, it uses some
redundancy codes. Redundancy codes added in actual data, and it has transmitted by the
sender. These codes are known as error detection codes
Types of error detection techniques:
1.Parity Checking
• Parity Checking is also known as the Vertical redundancy check (VRC). Parity
checking is a very simple technique. There are two cases in the parity checking
techniques:
• Even parity: If the number of 1's is even in the frame, 0 is added in the frame. The
even-parity example shown in the figure below.
• Odd parity: If the number of 1's is odd in the frame, 1 is added in the frame. The
odd-parity example shown in the figure below.
2.Cyclic Redundancy Check:
• If the remainder is non-zero arrives after doing the Binary Division, that data is not
error-free.
• If the remainder zero arrives after doing binary division, that data is error-free.
Error Correction:
• Error correction is more difficult than error detection. Error correction codes are used
to detect and correct errors when transmitting data from the sender to the receiver.
• It can be done in two ways:
1. Backward Error Correction
2. Forward Error Correction
Backward Error Correction: If the receiver receives an error in the received data, it
tells the sender to retransmit the data again.
Forward Error Correction: If the receiver finds an error in the received data, the error
correction codes correct these errors automatically
BLOCK CODING:
• In block coding, we divide our message into blocks, each of k bits, called data words.
We add r redundant bits to each block to make the length n = k + r. The resulting n-bit
blocks are called code words.
• For example, we have a set of data words, each of size k, and a set of code words,
each of size of n. With k bits, we can create a combination of 2k data words, with n
bits; we can create a combination of 2n code words. Since n > k, the number of
possible code words is larger than the number of possible data words.
• The block coding process is one-to-one; the same data word is always encoded as the
same code word. This means that we have 2n-2k code words that are not used. We
call these code words invalid or illegal. The following figure shows the situation.
Error Detection
• If the following two conditions are met, the receiver can detect a change in the
original code word by using Block coding technique.
• 1. The receiver has (or can find) a list of valid code words.
• 2. The original code word has changed to an invalid one.
• The sender creates code words out of data words by using a generator that applies the
rules and procedures of encoding (discussed later). Each code word sent to the
receiver may change during transmission. If the received code word is the same as
one of the valid code words, the word is accepted; the corresponding data word is
extracted for use.
• If the received code word is not valid, it is discarded. However, if the code word is
corrupted during transmission but the received word still matches a valid code word,
the error remains undetected. This type of coding can detect only single errors. Two
or more errors may remain undetected.
For example consider the following table of data words and Code words:
Assume the sender encodes the data word 01 as 011 and sends it to the receiver. Consider the
following cases:
1. The receiver receives O11. It is a valid code word. The receiver extracts the data word 01
from it.
2. The code word is corrupted during transmission, and 111 is received (the leftmost bit is
corrupted). This is not a valid code word and is discarded.
3. The code word is corrupted during transmission, and 000 is received (the right two bits are
corrupted). This is a valid code word. The receiver incorrectly extracts the data word 00. Two
corrupted bits have made the error undetectable
Error Correction:
• Error correction is much more difficult than error detection. In error detection, the
receiver needs to know only that the received code word is invalid, in error correction
the receiver needs to find (or guess) the original code word sent. So, we need more
redundant bits for error correction than for error detection.
• Assume the data word is 01. The sender consults the table (or uses an algorithm) to
create the code word 01011. The code word is corrupted during transmission, and
01001 is received (error in the second bit from the right). First, the receiver finds that
the received code word is not in the table. This means an error has occurred.
(Detection must come before correction.) The receiver, assuming that there is only 1
bit corrupted, uses the following strategy to guess the correct data word.
1. Comparing the received code word with the first code word in the table (01001
versus 00000), the receiver decides that the first code word is not the one that was
sent because there are two different bits.
2. By the same reasoning, the original code word cannot be the third or fourth one in
the table.
3. The original code word must be the second one in the table because this is the only
one that differs from the received code word by 1 bit. The receiver replaces 01001
with 01011 and consults the table to find the data word 01.
Hamming Distance:
• The central concepts in coding for error control are the idea of the Hamming distance.
The Hamming distance between two words (of the same size) is the number of
differences between the corresponding bits. We show the Hamming distance between
two words x and y as d(x, y).
• The Hamming distance can easily be found if we apply the XOR operation on the two
words and count the number of 1s in the result. Note that the Hamming distance is a
value greater than zero.
• 1. The Hamming distance d(000, 011) is 2 because 000 ⊕ 011 is 011 (two 1s).
• 2. The Hamming distance d(10101, 11110) is 3 because 10101 ⊕ 11110 is 01011
(three 1s).
• The minimum Hamming distance is the smallest Hamming distance between all
possible pairs. We use "dmin" to define the minimum Hamming distance in a coding
scheme. To find this value, we find the Hamming distances between all words and
select the smallest one.
When a code word is corrupted during transmission, the Hamming distance between the sent
and received code words is the number of bits affected by the error. In other words, the
Hamming distance between the received code word and the sent code word is the number of
bits that are corrupted during transmission
• For example, if the code word 00000 is sent and 01101 is received, 3 bits are in error
and the Hamming distance between the two is d(00000, 01101) =3.
• Error correction is more complex than error detection, a decision is involved. When a
received code word is not a valid code word, the receiver needs to decide which valid
code word was actually sent. The decision is based on the concept of territory, an
exclusive area surrounding the code word. Each valid code word has its own territory.
We use a geometric approach to define each territory. We assume that each valid
Code word has a circular territory with a radius of t and that the valid code word is at
the center.
EXAMPLE:
• For example, suppose a code word x is corrupted by t bits or less. Then this corrupted
code word is located either inside or on the perimeter of this circle. If the receiver
receives a code word that belongs to this territory, it decides that the original code
word is the one at the center. Note that we assume that only up to t errors have
occurred; otherwise, the decision is wrong. The following Figure shows this
geometric interpretation. Some texts use a sphere to show the distance between all
valid block codes.
Hamming Codes:
• The Hamming codes were originally designed with dmin = 3, which means that they
can detect up to two errors or correct one single error. But there are some Hamming
codes that can correct more than one error.
• First let us find the relationship between n and k in a Hamming code. We need to
choose an integer m >= 3. The values of n and k are then calculated from mas n = 2m
– 1 and k= n-m. The number of check bits r =m.
• For example, if m=3, then n= 7 and k= 4. This is a Hamming code C(7, 4) with
dmin =3. The following Table shows the data words and code words for this code.
The following figure shows the structure of the encoder and decoder for this example
Cyclic Codes:
• Cyclic codes are special linear block codes with one extra property. In a cyclic code,
if a code word is cyclically shifted (rotated), the result is another code word. For
example, if 1011000 is a code word and we cyclically left-shift, then 0110001 is also
a code word.
• In this case, if we call the bits in the first word a0 to a6 and the bits in the second
word b0 to b6, we can shift the bits by using the following:
• b1=a0 b2=a1 b3=a2 b4=a3 b5=a4 b6=a5 b0=a6
• The Cyclic Redundancy Checks (CRC) is the most powerful method for Error-
Detection and Correction. It is given as a kbit message and the transmitter creates an
(n – k) bit sequence called frame check sequence. The out coming frame, including n
bits, is precisely divisible by some fixed number. Modulo 2 Arithmetic is used in this
binary addition with no carries, just like the XOR operation.
• Redundancy means duplicacy. The redundancy bits used by CRC are changed by
splitting the data unit by a fixed divisor. The remainder is CRC.
Qualities of CRC
Example
• Message D = 1010001101 (10 bits)
• Predetermined P = 110101 (6 bits)
• FCS R = to be calculated 5 bits
• Hence, n = 15 K = 10 and (n – k) = 5
• The message is generated through 25:accommodating 1010001101000
• The product is divided by P.
• The remainder is inserted to 25D to provide T = 101000110101110 that is sent.
• Suppose that there are no errors, and the receiver gets T perfect. The received frame is
divided by P.
The following table shows an example of a CRC code which shows both the linear and cyclic
properties of this code.
PROTOCOLS:
Framing
The data link layer separates the bit-stream obtained from the network layer into usable data
units called frames
Flow control
• Flow control is one of the essential duties of the data link layer. It manages the
amount of data that can be sent before obtaining confirmation. Flow control is a set of
methods that tell the sender how much data it can transmit before the receiver is
overloaded. Any receiving device has limited speed and limited memory for the
process of incoming data and storage of the incoming data.
Error control
• Error control includes both methods of error detection and error correction. The error
control helps the receiver to notify the sender of any lost frames or damaged frames
during the transmission. It allows to retransmission of those frames by the sender. At
the data link layer, error control is often easily implemented: whenever an error is
detected at the frames, those frames are re-transmitted.
• Protocols
• The protocols usually use one of the common programming languages to execute the
software. Protocols are divided into two categories: Noiseless channel and Noisy
channel. The diagram of protocols structure is shown below
Noiseless channel
• The noiseless channel is divided into two sub-categories: Simplest protocol and Stop-
and-Wait protocol. The first protocol of this channel does not use flow control, but the
second protocol uses flow control.
1.Simplest Protocol
• In this protocol, it doesn't use the flow and error control. It is a unidirectional protocol
where data frames only travel from sender to receiver in one direction. The design of
the simplest protocol with no flow control or error control is shown below.
For example: The simplest protocol is very simple. The sender sends frames in the sequence
without really knowing about the receiver. In this protocol to send three frames, there are
three events at the sender and three events at the receiver. These events are shown below in
the figure
2.Stop-and-Wait Protocol
• The sender sends a frame in the Stop-and-Wait protocol, and it stops until when the
receiver receives the data and then sends the next frame. In this protocol, adds the
flow control. This protocol is a unidirectional protocol for data frames, but auxiliary
ACK (Acknowledgment) frames travel from other directions. The design of the Stop-
and-Wait protocol is shown below.
For example: The stop-and-wait protocol is very simple. The sender transmits a frame and
wait for the receiver response. The sender transmits the next frame after arrives the ACK of
the previous frame.
Note that sending three frames in this example involves the sender in six events and the
receiver in three events. These events are shown below in the figure
Noisy Channels
• The noisy channel is divided into three sub-categories:
1. Stop-and-Wait automatic repeat request
2. Go-back-N automatic repeat request
3. Selective repeat automatic repeat request
• Selective Repeat ARQ is also known as the Selective Repeat Automatic Repeat
Request. It is a data link layer protocol that uses a sliding window method. The Go-
back-N ARQ protocol works well if it has fewer errors. But if there is a lot of error in
the frame, lots of bandwidth loss in sending the frames again. So, we use the Selective
Repeat ARQ protocol. In this protocol, the size of the sender window is always equal
to the size of the receiver window. The size of the sliding window is always greater
than 1.
• If the receiver receives a corrupt frame, it does not directly discard it. It sends a
negative acknowledgment to the sender. The sender sends that frame again as soon as
on the receiving negative acknowledgment. There is no waiting for any time-out to
send that frame. The design of the Selective Repeat ARQ protocol is shown below.
The example of the Selective Repeat ARQ protocol is shown below in the figure
Sliding Window Protocol:
• The sliding window is a technique for sending multiple frames at a time. It controls
the data packets between the two devices where reliable and gradual delivery of data
frames is needed. It is also used in TCP (Transmission Control Protocol).
• In this technique, each frame has sent from the sequence number. The sequence
numbers are used to find the missing data in the receiver end. The purpose of the
sliding window technique is to avoid duplicate data, so it uses the sequence number.
• Types of Sliding Window Protocol
• Sliding window protocol has two types:
1. Go-Back-N ARQ
2. Selective Repeat ARQ
Piggybacking:
Multiple Access Control: The data link layer is separated into two sub-layers. The upper sub-
layer is responsible for flow control and error control that is called the logical link control
layer. The lower sub-layer is responsible for multiple access resolution that is called media
access control (MAC). The Sub-layer of the data link layer is shown in the figure below
CLASSIFICATION:
• n the Random access protocol, all systems are equal. No anyone system can depend
and control another system. However, if more than one station attempts to transmit
the data, there is an access conflict—collision, due to which the frames are either lost
or changed.
Random access protocol is divided into two categories; firstly, aloha, and second CSMA
(carrier sense multiple access). CSMA is later further divided into two parallel methods;
CSMA/CD and CSMA/CA. When a collision is detected, CSMA/CD tells the station what to
do. CSMA/CA attempts to stop a collision
1. Aloha:
ALOHA is a Multiple Access Protocol which is used for random access in the
network. Aloha was designed for the wireless local area network (WLAN), which is
also known as the radio broadcast. In this method, any user can transmit the data at
any time.
Type of Aloha
1. Pure Aloha
2. Slotted Aloha
• Pure Aloha: Pure aloha is also called the original aloha protocol. It's a simple but
elegant protocol, i.e., whenever the system has a data frame to send, it transmits the
data frame continuously. Due to which the risk of collision is very high in this aloha
method. Shown in below pure aloha.
• Slotted Aloha: Slotted aloha was developed to improve the efficiency of the Pure
Aloha. In this Aloha, the time of the systems is divided into slots so that the system
can send only one frame to a slot, and this frame can only be sent at the beginning of
the slot. If a system cannot send a frame at the beginning of the slot, then it has to
wait for the next slot to start. If two systems try to transmit the frame at the beginning
of a time slot. But it is better than pure Aloha because it has less chance of collision.
Shown in below slotted aloha.
• Persistent: The 1-persistent method is very easy and quick. In this method, after
the station finds the line empty, it immediately transmits its frame. The chances of
the collision are very high in this method because two or more stations immediately
transmit their frames as soon as the line is found empty.
• Non-Persistent: In the non-persistent method, if found the line is empty, it transmits
the frames immediately. If the line isn't clear, it waits for a random period and detects
the line again. This approach decreases the risk of a collision.
• P-Persistent: This method is a combination of 1-Persistent and Non-Persistent
advantages. The p-persistent approach decreases the risk of collision and increases
performance.
• In the P-Persistent approach, the following steps follow after the station finds the line-
empty:
1. With probability (p), the station transmits its frame.
2. With probability (q = 1 ? p), the station waits for the starting of the next time slot and
re-test the line.
3. If the line is empty, it goes to step 1.
4. If the line is not empty, it behaves as though a collision has happened, and it uses the
back-off process.
In later, CSMA is divided into two parallel methods: CSMA/CD and CSMA/CA. When a
collision is detected, CSMA/CD tells the station what to do, and CSMA/CA attempts to stop
a collision
CSMA/CD (Carrier Sense Multiple Access with Collision Detection)
• CSMA/CA is used in wireless networks because CSMA cannot detect the collision, so
CSMA/CA is the only solution to collision avoidance.
• In CSMA/CA, Collisions are avoided by the use of three techniques:
1. Interframe space
2. Contention window
3. Acknowledgment
• Interframe space: If a station detects the idle channel, the station does not send the
frame immediately. It waits for a time period. That time period is called IFS time. IFS
is often used to describe the station's priority.
• Contention window: The contention window is the sum of time that is split into
slots. When a station is ready to send a frame, it can choose a random number of slots
as the Wait time. According to the binary exponential back-off strategy, the number
of slots in the window changes. There are shown in the figure below.
• Acknowledgment: Positive acknowledgment or time-out timer helps to guarantee a
successful transmission.
UNIT-III
NETWORK LAYER
Network Layer:
Routing: When a packet reaches the router's input link, the router will move the packets to
the router's output link. For example, a packet from S1 to R1 must be forwarded to the next
router on the path to S2.
Logical Addressing: The data link layer implements the physical addressing and network
layer implements the logical addressing. Logical addressing is also used to distinguish
between source and destination system. The network layer adds a header to the packet which
includes the logical addresses of both the sender and the receiver.
Internetworking: This is the main role of the network layer that it provides the logical
connection between different types of networks.
Fragmentation: The fragmentation is a process of breaking the packets into the smallest
individual data units that travel through different networks.
• In Network layer, a router is used to forward the packets. Every router has a
forwarding table. A router forwards a packet by examining a packet's header field and
then using the header field value to index into the forwarding table. The value stored
in the forwarding table corresponding to the header field value indicates the router's
outgoing interface link to which the packet is to be forwarded.
For example, the router with a header field value of 0111 arrives at a router, and then router
indexes this header value into the forwarding table that determines the output link interface is
2. The router forwards the packet to the interface 2. The routing algorithm determines the
values that are inserted in the forwarding table. The routing algorithm can be centralized or
decentralized.
Services Provided by the Network Layer:
Guaranteed delivery: This layer provides the service which guarantees that the packet will
arrive at its destination.
Guaranteed delivery with bounded delay: This service guarantees that the packet will be
delivered within a specified host-to-host delay bound.
In-Order packets: This service ensures that the packet arrives at the destination in the order
in which they are sent.
Guaranteed max jitter: This service ensures that the amount of time taken between two
successive transmissions at the sender is equal to the time between their receipt at the
destination.
Security services: The network layer provides security by using a session key between the
source and destination host. The network layer in the source host encrypts the payloads of
datagrams being sent to the destination host. The network layer in the destination host would
then decrypt the payload. In such a way, the network layer maintains the data integrity and
source authentication services.
SWITCHING:
• When a user accesses the internet or another computer network outside their
immediate location, messages are sent through the network of transmission media.
This technique of transferring the information from one computer network to another
network is known as switching.
• Switching in a computer network is achieved by using switches. A switch is a small
hardware device which is used to join multiple computers together with one local area
network (LAN).
• Network switches operate at layer 2 (Data link layer) in the OSI model.
• Switching is transparent to the user and does not require any configuration in the
home network.
Advantages of Switching:
Switching Modes:
• The layer 2 switches are used for transmitting the data on the data link layer, and it
also performs error checking on transmitted and received frames.
• The layer 2 switches forward the packets with the help of MAC address.
• Different modes are used for forwarding the packets known as Switching modes.
• In switching mode, Different parts of a frame are recognized. The frame consists of
several parts such as preamble, destination MAC address, source MAC address, user's
data, FCS.
2.Cut-through Switching:
• Cut-through switching is a technique in which the switch forwards the packets after
the destination address has been identified without waiting for the entire frame to be
received.
• Once the frame is received, it checks the first six bytes of the frame following the
preamble, the switch checks the destination in the switching table to determine the
outgoing interface port, and forwards the frame to the destination.
• It has low latency rate as the switch does not wait for the entire frame to be received
before sending the packets to the destination.
• It has no error checking technique. Therefore, the errors can be sent with or without
errors to the receiver.
• A Cut-through switching technique has low wait time as it forwards the packets as
soon as it identifies the destination MAC address.
• In this technique, collision is not detected, if frames have collided will also be
forwarded
3.Fragment-free Switching:
Switching techniques:
• In large networks, there can be multiple paths from sender to receiver. The switching
technique will decide the best route for data transmission.
• Switching technique is used to connect the systems for making one-to-one
communication.
Circuit Switching:
Packet Switching:
• The packet switching is a switching technique in which the message is sent in one go,
but it is divided into smaller pieces, and they are sent individually.
• The message splits into smaller pieces known as packets and packets are given a
unique number to identify their order at the receiving end.
• Every packet contains some information in its headers such as source address,
destination address and sequence number.
• Packets will travel across the network, taking the shortest path as possible.
• All the packets are reassembled at the receiving end in correct order.
• If any packet is missing or corrupted, then the message will be sent to resend the
message.
• If the correct order of the packets is reached, then the acknowledgment message will
be sent
Network Layer: Logical Addressing:
IPv4 address is a 32 bit long. IPv4 is a connectionless protocol that is used in packet-switch
layer networks, such as the internet. These addresses are specific and universal. In other
words, every address defines one and only one device on the internet. In IPv4, two devices
cannot have the same address at the same time
Address Space
• The address space is the overall number of addresses used by the protocol. If N bits
are used in the protocol, that means the number of addresses is 2 N.
• For example, 32 bits are used in the IPv4 address. Which means the address space of
IPv4 is 232 or 4,294,967,296.
Notation of IPv4
• There are two types of common notation: binary notation and dotted-decimal notation,
as shown in the figure below.
Note: Each byte is 8 bits, and each byte range is 0 to 255 in the dotted decimal notation.
Let take an example to better understand binary notation and dotted decimal notation.
Example 1. Change from the binary notation to dotted-decimal notation the following IPv4
addresses.
• 10000011 00010011 00001011 10000000
• 10001110 10000001 11000011 10000001
Solution
• 131.19.11.128
• 142.129.195.129
Example 2. Change from the dotted-decimal notation to binary notation the following IPv4
addresses.
1. 128.12.12.248
2. 192.128.1.250
Solution
• 10000000 00001100 00001100 00000111
• 11000000 10000000 00000001 11111010
Classful Addressing:
• The address space is split into five classes in the classful addressing: A, B, C, D, and
E. If the address is given in the binary notation, the first few bits describe the class. If
the address is given in the dotted-decimal notation, the first byte describes the class.
Both notation figures are shown below.
Classless Addresses:
• It is the latest version of IPv4 and has better and enhanced functionality. IPv6 was
developed by the IETF (Internet-Engineering-Task-Force) in 1999. It is 128 bits long,
which has 2^128 address space, which is much more than IPv4. IPv6 is unique and
universally similar to the IPv4. In other words, every address defines only one device
on the internet.
Notation of IPv6
• IPv6 defines the hexadecimal colon notation, which 128 bits long. These bits are
divided into eight sections, which are shown below in the figure.
IPv6 Datagram Format:
Address Mapping:
Static mapping: In static mapping, it creates a table that contains a logical address with a
physical address.
Dynamic mapping: When a machine knows one of two addresses (logical or physical)
through dynamic mapping, it may use this protocol to find the other one address. There are
designed two protocols for done dynamic mapping.
Address Resolution Protocol (ARP)
Reverse Address Resolution Protocol (RARP)
• It is a dynamic mapping protocol that is used to find out the physical address
associated with the logical address and then sent it to the data link layer. The working
of ARP is shown below in the figure.
• Firstly, the client broadcasts the ARP request packet to all the hosts in the network.
• In this ARP request packet, stores the logical address and physical address of the
client and the IP address of the receiver.
• Each host receives this ARP request packet, but only the one who is the authorized
host completes the ARP service.
• Finally, the authorized host sends the ARP response packet to the client in which its
physical address is stored.
• It is a dynamic mapping protocol that is the opposite of ARP. It is used to find out the
logical address of the machine associated with the physical address. The working of
RARP is shown below in the figure
• Firstly, the client broadcasts the RARP request packet to all the hosts in the network.
• The physical address of the client is stored in this RARP request packet.
• Each host receives this RARP request packet, but only the one who is the authorized
host completes the RARP service. This authorized host is called the RARP server.
• RARP server sends the RARP response packet to the client in which its logical
address is stored.
• RARP is not used nowadays, it was replaced by BOOTP (Bootstrap protocol), and
now BOOTP has been replaced by DHCP (dynamic host configuration protocol).
BOOTP:
Working of BOOTP:
• When the Bootstrap protocol started by the client, it does not have an IP address.
Therefore, it broadcasts a message in the network, and Its MAC address is inside this
message. This message is called "BOOTP request," and takes this request by the
BOOTP server. The server then provides the following information in reply to the
client.
• It provides the IP address, subnet mask, and gateway address of the client.
• It also provides the IP address and hostname of the server.
• When the client receives the BOOTP server information, it configures and initializes
the TCP/IP protocol stack and then connects to the server that has the boot image. The
client loads this boot image and starts the operating system.
DHCP:
• DHCP stands for Dynamic Host Configuration Protocol. It is designed to provide the
static and dynamic address allocation that can be done manual or automatic. It was
designed to replace the BOOTP (Bootstrap Protocol)
• Forwarding means to place the packet in its route to its destination. Forwarding
requires a host or a router to have a routing table. When a host has a packet to send or
when a router has received a packet to be forwarded, it looks at this table to find the
route to the final destination.
Note: It uses UDP port 250 for the routings table updates.
• Step 1: Every router prepares its routing table using its information. Every table of the
router is shown below.
• At Router A
C 8 C
D 1 D
• At Router B
C 5 C
D Infinite -
• At Router C
B 5 B
C 0 C
D 3 D
• At Router D
Destination Distance Next Hop
A 1 A
B Infinite -
C 3 C
D 0 D
• Step 2:
• Every router shares its distance vector with its neighbors obtained in Step-01.
• Every router prepares a new routing table after exchanging of distance vectors.
At Router A new table
C 4 D
D 1 D
C 5 C
D 3 A
C 0 C
D 3 A
C 3 C
D 0 D
TRANSPORT LAYER
Transport layer:
o Transport Layer is the second layer in the TCP/IP model and the fourth layer in
the OSI model. It is an end-to-end layer used to deliver messages to a host. It is
termed an end-to-end layer because it provides a point-to-point connection rather
than hop-to- hop, between the source host and destination host to deliver the services
reliably. The unit of data encapsulation in the Transport Layer is a segment.
o Working of Transport Layer:
o The transport layer takes services from the Network layer and provides services to
the Application layer
o At the sender’s side: The transport layer receives data (message) from the Application
layer and then performs Segmentation, divides the actual message into segments, adds
source and destination’s port numbers into the header of the segment, and transfers
the message to the Network layer.
o At the receiver’s side: The transport layer receives data from the Network layer,
reassembles the segmented data, reads its header, identifies the port number, and
forwards the message to the appropriate port in the Application layer.
Congestion Control:
Congestion is a situation in which too many sources over a network attempt to send
data and the router buffers start overflowing due to which loss of packets occur. As a
result retransmission of packets from the sources increases the congestion further. In
this situation, the Transport layer provides Congestion Control in different ways. It
uses open loop congestion control to prevent the congestion and closed-loop
congestion control to remove the congestion in a network once it occurred. TCP
provides AIMD- additive increase multiplicative decrease, leaky bucket technique for
congestion control.
Flow control:
The transport layer provides a flow control mechanism between the adjacent layers of
the TCP/IP model. TCP also prevents data loss due to a fast sender and slow receiver
by imposing some flow control techniques. It uses the method of sliding window
protocol which is accomplished by the receiver by sending a window back to the
sender informing the size of data it can receive.
UDP:
o UDP stands for User Datagram Protocol.
o UDP is a simple protocol and it provides nonsequenced transport functionality.
o UDP is a connectionless protocol.
o This type of protocol is used when reliability and security are less important than speed
and size.
o UDP is an end-to-end transport level protocol that adds transport-level addresses,
checksum error control, and length information to the data from the upper layer.
o The packet produced by the UDP protocol is known as a user datagram.
o Source port address: It defines the address of the application process that has
delivered a message. The source port address is of 16 bits address.
o Destination port address: It defines the address of the application process that
will receive the message. The destination port address is of a 16-bit address.
o Total length: It defines the total length of the user datagram in bytes. It is a 16-bit
field.
o Checksum: The checksum is a 16-bit field which is used in error detection.
o UDP provides basic functions needed for the end-to-end delivery of a transmission.
o It does not provide any sequencing or reordering functions and does not specify the
damaged packet when reporting an error.
o UDP can discover that an error has occurred, but it does not specify which packet has been
lost as it does not contain an ID or sequencing number of a particular data segment.
o Source port address: It is used to define the address of the application program
in a source computer. It is a 16-bit field.
o Destination port address: It is used to define the address of the application
program in a destination computer. It is a 16-bit field.
o Sequence number: A stream of data is divided into two or more TCP segments.
The 32-bit sequence number field represents the position of the data in an original
data stream.
o Acknowledgement number: A 32-field acknowledgement number acknowledge
the data from other communicating devices. If ACK field is set to 1, then it specifies
the sequence number that the receiver is expecting to receive.
o Header Length (HLEN): It specifies the size of the TCP header in 32-bit words.
The minimum size of the header is 5 words, and the maximum size of the header
is 15 words. Therefore, the maximum size of the TCP header is 60 bytes, and the
minimum size of the TCP header is 20 bytes.
o Reserved: It is a six-bit field which is reserved for future use.
o Control bits: Each bit of a control field functions individually and independently.
A control bit defines the use of a segment or serves as a validity check for other
fields.
Features of SCTP:
Packets
o In TCP, a segment carries data and control information. Data is carried as a collection of
bytes; control information is defined by six control flags in the header. The design of SCTP is
totally different: data is carried as data chunks; control information is carried as control
chunks.
Flow Control
o Like TCP, SCTP implements flow control to avoid overwhelming the receiver.
o Error Control
o Like TCP, SCTP implements error control to provide reliability. TSN numbers and
acknowledgement numbers are used for error control.
Congestion Control
o Like TCP, SCTP implements congestion control to determine how many data chunks can be
injected into the network.
Leaky Bucket Algorithm mainly controls the total amount and the rate of the traffic
sent to the network.
Step 1 − Let us imagine a bucket with a small hole at the bottom where the rate at
which water is poured into the bucket is not constant and can vary but it leaks from
the bucket at a constant rate.
Step 2 − So (up to water is present in the bucket), the rate at which the water leaks
does not depend on the rate at which the water is input to the bucket.
Step 3 − If the bucket is full, additional water that enters into the bucket that spills
over the sides and is lost.
Step 4 − Thus the same concept applied to packets in the network. Consider that data
is coming from the source at variable speeds. Suppose that a source sends data at 10
Mbps for 4 seconds. Then there is no data for 3 seconds. The source again transmits
data at a rate of 8 Mbps for 2 seconds. Thus, in a time span of 8 seconds, 68 Mb data
has been transmitted.
That’s why if a leaky bucket algorithm is used, the data flow would be 8 Mbps for 9
seconds. Thus, the constant flow is maintained.
The leaky bucket algorithm enforces output patterns at the average rate, no matter
how busy the traffic is. So, to deal with the more traffic, we need a flexible algorithm
so that the data is not lost. One such approach is the token bucket algorithm.
Let us understand this algorithm step wise as given below −
• Step 1 − In regular intervals tokens are thrown into the bucket f.
• Step 2 − The bucket has a maximum capacity f.
• Step 3 − If the packet is ready, then a token is removed from the bucket, and the
packet is sent.
• Step 4 − Suppose, if there is no token in the bucket, the packet cannot be sent.
UNIT-V
APPLICATION LAYER
Application Layer:
• The application layer in the OSI model is the closest layer to the end user which
means that the application layer and end user can interact directly with the software
application.
Application layer is the top most layer in OSI and TCP/IP layered model. This layer exists in
both layered Models because of its significance, of interacting with user and user applications.
This layer is for applications which are involved in communication system.
A user may or may not directly interacts with the applications. Application layer is where the
actual communication is initiated and reflects. Because this layer is on the top of the layer stack,
it does not serve any other layers. Application layer takes the help of Transport and all layers
below it to communicate or transfer its data to the remote host.
When an application layer protocol wants to communicate with its peer application layer
protocol on remote host, it hands over the data or information to the Transport layer. The
transport layer does the rest with the help of all the layers below it
There’is an ambiguity in understanding Application Layer and its protocol. Not every user
application can be put into Application Layer. except those applications which interact with
the communication system. For example, designing software or text-editor cannot be
considered as application layer programs.
On the other hand, when we use a Web Browser, which is actually using Hyper Text Transfer
Protocol (HTTP) to interact with the network. HTTP is Application Layer protocol.
Another example is File Transfer Protocol, which helps a user to transfer text based or binary
files across the network. A user can use this protocol in either GUI based software like FileZilla
or CuteFTP and the same user can use FTP in Command Line mode.
Hence, irrespective of which software you use, it is the protocol which is considered at
Application Layer used by that software. DNS is a protocol which helps user application
protocols such as HTTP to accomplish its work.
Two remote application processes can communicate mainly in two different fashions:
Peer-to-peer: Both remote processes are executing at same level and they
exchange data using some shared resource.
Client-Server: One remote process acts as a Client and requests some resource
from another application process acting as Server.
In client-server model, any process can act as Server or Client. It is not the type of machine,
size of the machine, or its computing power which makes it server; it is the ability of serving
request that makes a machine a server.
DNS is a TCP/IP protocol used on different platforms. The domain name space is divided
into three different sections: generic domains, country domains, and inverse domain.
DDNS:
The Dynamic Domain Name System (DDNS) is a protocol that provides DNS
extensions that allow DNS servers to accept requests to dynamically add, update, and
delete entries in the DNS database.
• A DDNS server can serve both static and dynamic domains at the same time, since
DDNS is a functional superset of existing DNS servers.
• Rather than allowing any server to change its DNS records, the secure version of
DDNS authenticates update requests from DDNS hosts using critical public security
and digital signatures.
• Dynamic DNS was created to address the problem of frequent IP changes. For
example, when you search for a domain name, you'll get a dynamic IP address
mapped to that domain. The Internet Service Provider (ISP) provides this dynamic IP
address.
• When the same domain is searched again later, the ISP may be given a different IP
address from the IP address pool, resulting in a different IP address being returned.
• When the IP address changes, the DDNS system refreshes the DNS database, which is
always up to date with the domain-IP mapping. The outside world will be able to
access the domain name at all times without having to worry about IP changes.
Advantages :
1. It saves time required by static addresses updates manually when
network configuration changes.
2. It saves space as the number of addresses are used as required at one
time rather than using one for all the possible users of the IP address.
3. It is very comfortable for users point of view as any IP address
changes will not affect any of their activities.
4. It does not affect accessibility as changed IP addresses are configured
automatically against URL’s.
Disadvantages :
TELNET(Terminal Network):
• The main task of the internet is to provide services to users. For example,
users want to run different application programs at the remote site and
transfers a result to the local site. This requires a client-server program
such as FTP, SMTP. But this would not allow us to create a specific
program for each demand.
• The better solution is to provide a general client-server program that lets
the user access any application program on a remote computer.
Therefore, a program that allows a user to log on to a remote computer. A
popular client-server program Telnet is used to meet such demands.
Telnet is an abbreviation for Terminal Network.
• Telnet provides a connection to the remote computer in such a way that a
local terminal appears to be at the remote side.
i) Local Login
o When a user logs into a local computer, then it is known as local login.
o When the workstation running terminal emulator, the keystrokes entered by the
user are accepted by the terminal driver. The terminal driver then passes these
characters to the operating system which in turn, invokes the desired application
program.
o However, the operating system has special meaning to special characters. For
example, in UNIX some combination of characters have special meanings such as
control character with "z" means suspend. Such situations do not create any
problem as the terminal driver knows the meaning of such characters. But, it can
cause the problems in remote login.
2) Remote Login
The user sends the keystrokes to the terminal driver, the characters are then sent
to the TELNET client. The TELNET client which in turn, transforms the characters
to a universal character set known as network virtual terminal characters and
delivers them to the local TCP/IP stack
The commands in NVT forms are transmitted to the TCP/IP at the remote machine.
Here, the characters are delivered to the operating system and then pass to the
TELNET server. The TELNET server transforms the characters which can be
understandable by a remote computer. However, the characters cannot be directly
passed to the operating system as a remote operating system does not receive the
characters from the TELNET server. Therefore it requires some piece of software
that can accept the characters from the TELNET server. The operating system then
passes these characters to the appropriate application program.
o The network virtual terminal is an interface that defines how data and commands
are sent across the network.
o In today's world, systems are heterogeneous. For example, the operating system
accepts a special combination of characters such as end-of-file token running a
DOS operating system ctrl+z while the token running a UNIX operating system
is ctrl+d.
o TELNET solves this issue by defining a universal interface known as network
virtual interface.
o The TELNET client translates the characters that come from the local terminal into
NVT form and then delivers them to the network. The Telnet server then
translates the data from NVT form into a form which can be understandable by a
remote computer.
EMAIL:
• Electronic Mail (e-mail) is one of most widely used services of Internet. This service allows
an Internet user to send a message in formatted manner (mail) to the other Internet user in any
part of world. Message in mail not only contain text, but it also contains images, audio and
videos data. The person who is sending mail is called sender and person who receives mail is
called recipient. It is just like postal mail service.
Components of E-Mail System : The basic components of an email system are : User Agent (UA),
Message Transfer Agent (MTA), Mail Box, and Spool file
Objectives of FTP
• It provides the sharing of files.
• It is used to encourage the use of remote computers.
• It transfers the data more reliably and efficiently.
Mechanism of FTP:
• Control Connection: The control connection uses very simple rules for
communication. Through control connection, we can transfer a line of command or
line of response at a time. The control connection is made between the control
processes. The control connection remains connected during the entire interactive
FTP session.
• Data Connection: The Data Connection uses very complex rules as data types may
vary. The data connection is made between data transfer processes. The data
connection opens when a command comes for transferring the files and closes when
the file is transferred.
WWW, HTTP:
HTTP represents "Hypertext Transfer Protocol." HTTP is the protocol that can
transfer information over the network. It is the Internet protocol suite method and
defines commands and functions used for sharing web page data.
HTTP uses a server-client model. A client, for example, maybe a laptop or telephone
device. The HTTP server is frequently a web host running web server software, such
as Apache or IIS.
HTTP also represents commands such as GET and POST, which are used to handle
submissions on websites. The CONNECT command can act as a fast connection that
is encrypted using a secure socket layer (SSL).
SNMP:
Bluetooth:
• Bluetooth technology is a high speed and low powered wireless technology designed
to connect phones or other portable equipment for communication or file
transmissions.
• This is based on mobile computing technology.
FIREWALL:
Cryptography refers to the science and art of transforming messages to make them secure and
immune to attacks. It is a method of storing and transmitting data in a particular form so that
only those for whom it is intended can read and process it. Cryptography not only protects
data from theft or alteration but can also be used for user authentication
The original message, before being transformed, is called plaintext. After the message
is transformed, it is called ciphertext. An encryption algorithm transforms the
plaintext into ciphertext; a decryption algorithm transforms the ciphertext back into
plaintext
The sender uses an encryption algorithm, and the receiver uses a decryption algorithm
Cipher:
We refer to encryption and decryption algorithms as ciphers. The term cipher is also
used to refer to different categories of algorithms in cryptography. This is not to say
that every sender-receiver pair needs their very own unique cipher for secure
communication. On the contrary, one cipher can serve millions of communicating
pairs.
Key:
A key is a number (or a set of numbers) that the cipher, as an algorithm, operates on.
To encrypt a message, we need an encryption algorithm, an encryption key, and
plaintext. These create the ciphertext. To decrypt a message, we need a decryption
algorithm, a decryption key, and the ciphertext. These reveal the original plaintext.
Types of cryptography: