ComputerNetwork Note - BCA - C
ComputerNetwork Note - BCA - C
NAME: ...……………….……………………….….
PHONE: ............………………………………….
COMPUTER
NETWORK
BCA 5th (TU)
PERSPECTIVE
V 1.0
Er. Sital Pd Mandal
fb.com/rockingsital
[email protected]
http://computernetwork‐mmc.blogspot.com/
Course Title: Computer Networking
Course Code: CACS303
Year/Semester: 5th Sem/ III Year
1. Introduction
1.1 Network as an infrastructure for data communication 0.5
1.2 Applications of Computer network 0.5
1.3 Network Architecture 1
1.4 Types of computer Networks 0.5
1.5 Protocols and Standards 0.5 6 Hrs.
1.6 The OSI Reference Model 1
1.7 The TCP/IP Protocol Suite 1
1.8 Comparison between OSI and TCP/IP Reference model 0.5
1.9 Critiques of OSI and TCP/IP Reference model 0.5
2. The Physical Layer
2.1 Functions of Physical Layer 1
1 5 Hrs.
7.3 Public Key Algorithm - RSA
2. PHYSICAL LAYER
Check it Spend Time
S.No. Contents Page
( if Study) in Hour
2.1 Functions of Physical Layer 22 1
Data and Signals: Analog and Digital signals,
2.2 23 1
Transmission Impairment, Data Rate Limits, Performance
Data Transmission Media: Guided Media, Unguided
2.3 31 1
Media and Satellites
2.4 Bandwidth Utilization: Multiplexing and Spreading 35 1
Switching: Circuit switching, Message switching &
2.5 40 1
Packet switching
Telephone, Mobile and Cable network for data
2.6 46 1
Communication
7. NETWORK SECURITY
6. APPLICATION LAYER
Check it Spend Time
S.No. Contents (if Study) Page
in Hour
6.1 Functions of Application layer 71 1
Application Layer Protocols: DNS, DHCP, WWW, HTTP,
6.2 71 2
HTTPs, TELNET, FTP, SMTP, POP, IMAP
Concept of traffic analyzer: MRTG, PRTG, SNMP. Packet
6.3 82 2
tracer, Wireshark.
4. NETWORK LAYER
Check it Page Time to
S.No. Contents
(if Study) No. Spend ( hrs)
4.1 Functions of Network Layer 91 1
4.2 Virtual circuits and Datagram Subnets 92 1
IPv4 Addresses: Address Space, Notations, Classful
4.3 addressing, Classless addressing, Subnetting and Network 94 1
Address Translation(NAT)
4.4 IPv4 Datagram format and fragmentation 96 1
4.5 IPv6 Address Structure and advantages over IPv4 99 1
Routing Algorithms: Distance Vector Routing, Link State
4.6 103 1
Routing
4.7 Internet Control Protocols: ARP, RARP, ICMP 112 1
Routing protocols: OSPF, BGP, Unicast, Multicast and
4.8 118 1
Broadcast
5. TRANSPORT LAYER
Study
Check it
S.No. Contents Page in
( if Study)
Hours
5.1 Functions of Transport Layer 203 1
Read M e Fir st (3 times) Assumes Basic K ey T er ms while wr iting your unit1 answer .
analog analog data analog signal attenuation bandpass channel
bandwidth baseband transmission bit length bit rate bits per second (bps)
broadband transmission composite signal cycle data decibel (dB)
digital digital data digital signal distortion Fourier analysis
frequency frequency-domain fundamental frequency harmonic Hertz (Hz)
jitter latency low-pass channel noise nonperiodic signal
Nyquist bit rate peak amplitude period periodic signal phase
processing delay propagation speed propagation time queuing time Shannon capacity
signal signal-to-noise ratio (SNR) sine wave throughput time-domain
transmission time wavelength …………. ………….. …………..etc
For data communications to occur, the communicating devices must be part of a communication system
made up of a combination of hardware (physical equipment) and software (programs).
1. Delivery: The system must deliver data to the correct destination. Data must be received by the
intended device or user and only by that device or user.
2. Accuracy: The system must deliver the data accurately. Data that have been altered in transmission
and left uncorrected are unusable.
4. Jitter: Jitter refers to the variation in the packet arrival time. It is the uneven delay in the delivery of
audio or video packets. For example, let us assume that video packets are sent every 30 millisecond. If
some of the packets arrive with 30-ms delay and others with 40-ms delay, an uneven quality in the video
is the result.
1. Message. The message is the information (data) to be communicated. Popular forms of information
include text, numbers, pictures, audio, and video.
2. Sender. The sender is the device that sends the data message. It can be a computer, workstation,
telephone handset, video camera, and so on.
3. Receiver. The receiver is the device that receives the message. It can be a computer, workstation,
telephone handset, television, and so on.
4. Transmission medium. The transmission medium is the physical path by which a message travels from
sender to receiver. Some examples of transmission media include twisted-pair wire, coaxial cable, fiber-
optic cable, and radio waves.
5. Protocol. A protocol is a set of rules that governs data communications. It represents an agreement
between the communicating devices. Without a protocol, two devices may be connected but not
communicating.
1. Business Applications
Resource Sharing
VPNs (Virtual Private Networks)
This whole arrangement is called the client-server model
Web application,
communication medium
email (electronic mail),
IP telephony
Voice over IP (VoIP)
Desktop sharing
e-commerce (electronic commerce)
Er. Sital Pd Mandal (https://computernetwork-mmc.blogspot.com) Page 4
“BE CURIOUS, NOT JUDGMENTAL.” - An up thrust for own knowledge
UNIT 1: INTRODUCTION
Answer own Innovation, Creativity & Tinkering.
2. Home Applications
Some of the most important uses of the Internet for home users are as follows:
Access to remote information
Person-to-person communication
Interactive entertainment
Electronic commerce
3. Mobile Users
• Mobile computers, such as notebook computers and Mobile phones, are one of the fastest-growing
segments of the entire computer industry.
• Although wireless networking and mobile computing are often related, they are not identical, as the
below figure shows.
In peer to peer architecture all the computers in a computer network are connected with every
computer in the network.
Every computer in the network uses the same resources as other computers.
There is no central computer that acts as a server rather all computers acts as a server for the data that is
stored in them.
Er. Sital Pd Mandal (https://computernetwork-mmc.blogspot.com) Page 5
“BE CURIOUS, NOT JUDGMENTAL.” - An up thrust for own knowledge
UNIT 1: INTRODUCTION
Answer own Innovation, Creativity & Tinkering.
Client/Server Network
In Client Server architecture a central computer acts as a hub and serves all the requests from client
computers.
All the shared data is stored in the server computer which is shared with the client computer when a
request is made by the client computer.
All the communication takes place through the server computer, for example if a client computer wants
to share the data with other client computer then it has to send the data to server first and then the server
will send the data to other client.
The central controller is known as a server while all other computers in the network are called clients.
1.4 Types of Computer Networks (by their size / area/ geographical area)
A computer network is a group of computers linked to each other that enables the computer to
communicate with another computer and share their resources, data, and applications.
A computer network can be categorized by their size.
A computer network is a group of computers linked to each other that enables the computer to
communicate with another computer and share their resources, data, and applications.
A computer network can be categorized by their size.
1. Local Area Network (LAN)
2. Metropolitan Area Network (MAN)
3. Wide area network (WAN)
Local Area Network is a group of computers connected to each other in a small area such as building,
office.
LAN is used for connecting two or more personal computers through a communication medium such as
twisted pair, etc.
It is less costly as it is built with inexpensive hardware such as hubs, network adapters, and Ethernet
cables.
The data is transferred at an extremely faster rate in Local Area Network.
Local Area Network provides higher security.
MAN network covers larger area by connections LANs to a larger network of computers.
In MAN various Local area networks are connected with each other through telephone lines.
The size of the Metropolitan area network is larger than LANs and smaller than WANs (wide area
networks), a MANs covers the larger area of a city or town.
A Wide Area Network is a network that extends over a large geographical area such as states or
countries.
A Wide Area Network is quite bigger network than the MAN.
A Wide Area Network is not limited to a single location, but it spans over a large geographical area
through a telephone line, fiber optic cable or satellite links.
The internet is one of the biggest WAN in the world.
A Wide Area Network is widely used in the field of Business, government, and education.
Elements of PROTOCOLS:
Syntax
Structure or format of the data.
Indicates how to read the bits - field delineation (border or boundary).
Syntax should be same in sender and receiver for to communicate.
The physical layer coordinates the functions required to carry a bit stream over a physical medium.
It deals with the mechanical and electrical specifications of the interface and transmission medium.
It also defines the procedures and functions that physical devices and interfaces have to perform for
transmission to occur.
The following figure shows the position of the physical layer with respect to the transmission medium
and the data link layer.
Data Link Layer
The data link layer transforms the physical layer, a raw transmission facility, to a reliable link.
It makes the physical layer appear error-free to the upper layer (network layer).
The figure shows the relationship of the data link layer to the network and physical layers.
Network Layer
Other responsibilities of the network layer include the following:
Logical addressing. The physical addressing implemented by the data link layer handles the addressing
problem locally. If a packet passes the network boundary, we need another addressing system to help the
source and destination systems. The network layer adds a header to the packet coming from the upper
layer that, among other things, includes the logical addresses of the sender and receiver.
Routing. When independent networks or links are connected to create internetworks (network of
networks) or a large network, the connecting devices (called routers or switches) route or switch the
packets to their final destination. One of the functions of the network layer is to provide this mechanism.
Session Layer
The services provided by the first three layers (physical, data link, and network) are not sufficient for
some processes.
The session layer is the network dialog controller. It establishes, maintains, and synchronizes the
interaction among communicating systems.
TCP/IP is a hierarchical protocol made up of interactive modules, each of which provides a specific
functionality; however, the modules are not necessarily interdependent.
At the transport layer, TCP/IP defines three protocols: Transmission Control Protocol (TCP), User
Datagram Protocol (UDP), and Stream Control Transmission Protocol (SCTP).
At the network layer, the main protocol defined by TCP/IP is the Internetworking Protocol (IP); there
are also some other protocols that support data movement in this layer.
1. Physical and Data Link Layers: At the physical and data link layers, TCP/IP does not define any
specific protocol. It supports all the standard and proprietary protocols. A network in a TCP/IP
internetwork can be a local-area network or a wide-area network.
2. Network Layer: At the network layer (or, more accurately, the internetwork layer), TCP/IP supports the
Internetworking Protocol. IP, in turn, uses four supporting protocols: ARP, RARP, ICMP, and IGMP.
Internetworking Protocol (IP): The Internetworking Protocol (IP) is the transmission mechanism used
by the TCP/IP protocols. It is an unreliable and connectionless protocol--a best-effort delivery service.
The term best effort means that IP provides no error checking or tracking. IP assumes the unreliability of
the underlying layers and does its best to get a transmission through to its destination, but with no
guarantees.
IP transports data in packets called datagrams, each of which is transported separately. Datagrams can
travel along different routes and can arrive out of sequence or be duplicated. IP does not keep track of
the routes and has no facility for reordering datagrams once they arrive at their destination.
Address Resolution Protocol (ARP): The ARP is used to associate a logical address with a physical
address. On a typical physical network, such as a LAN, each device on a link is identified by a physical
or station address, usually imprinted on the network interface card (NIC). ARP is used to find the
physical address of the node when its Internet address is known.
Reverse Address Resolution Protocol (RARP): Its allows a host to discover its Internet address when it
knows only its physical address. It is used when a computer is connected to a network for the first time
or when a diskless computer is booted.
Internet Control Message Protocol: The ICMP is a mechanism used by hosts and gateways to send
notification of datagram problems back to the sender. ICMP sends query and error reporting messages.
Internet Group Message Protocol: The IGMP is used to facilitate the simultaneous transmission of a
message to a group of recipients.
3. Transport Layer: Traditionally the transport layer was represented in TCP/IP by two protocols:
TCP and UDP.
IP is a host-to-host protocol, meaning that it can deliver a packet from one physical device to another.
UDP and TCP are transport level protocols responsible for delivery of a message from a process
(running program) to another process.
User Datagram Protocol: The User Datagram Protocol (UDP) is the simpler of the two standard
TCP/IP transport protocols. It is a process-to-process protocol that adds only port addresses, checksum
error control, and length information to the data from the upper layer.
Transmission Control Protocol: The TCP provides full transport-layer services to applications. TCP is
a reliable stream transport protocol. The term stream, in this context, means connection-oriented: A
connection must be established between both ends of a transmission before either can transmit data. At
the sending end of each transmission, TCP divides a stream of data into smaller units called segments.
Each segment includes a sequence number for reordering after receipt, together with an
acknowledgment number for the segments received. Segments are carried across the internet inside of IP
datagram. At the receiving end, TCP collects each datagram as it comes in and reorders the transmission
based on sequence numbers.
Stream Control Transmission Protocol: The SCTP provides support for newer applications such as
voice over the Internet. It is a transport layer protocol that combines the best features of UDP and TCP.
4. Application Layer: The application layer in TCP/IP is equivalent to the combined session, presentation,
and application layers in the OSI model. Many protocols are defined at this layer.
Following are some similarities between OSI Reference Model and TCP/IP Reference Model.
Bad timing
Bad technology
Bad implementations
Bad politics
Bad timing
Fig. The apocalypse of the two elephants. (Standard came much later)
Bad Implementation
Initial version were huge, unwieldy and slow.
Bad Politics
TCP/IP part of Unix, OSI – government pushed
Problems:
POINT TO NOTE
“NEVER GIVE UP ON A DREAM JUST BECAUSE OF THE TIME IT WILL TAKE TO ACCOMPLISH IT. THE
TIME WILL PASS ANYWAY.”
Read Me First (3 times) Assumes Basic Key Terms while writing your unit2 answer.
analog hierarchy Barker sequence channel chip
demultiplexer dense WDM digital signal (DS) direct sequence spread spectrum
(DEMUX) (DWDM) service (DSSS)
E line framing bit frequency hopping frequency-division multiplexing
spread spectrum (FDM)
(FHSS)
group guard band hopping period interleaving
jumbo group link master group multilevel multiplexing
multiple-slot multiplexer multiplexing pseudorandom code generator
allocation (MUX)
pseudorandom noise pulse stuffing spread spectrum (SS) statistical TDM
(PN)
supergroup synchronous T line time-division multiplexing (TDM)
TDM
wavelength-division
multiplexing
(WDM)
The physical layer consists of all the functions required to transmit a bitstream over a Physical medium. The
electrical and mechanical specifications of the interface and transmission medium deals by this layer.
• However, it does not deal with the actual physical medium (like fiber, copper).
• Physical Layer devices are Hub, Repeater, Modem, Cables.
Main Function
Representation of bits: The physical layer data involves a stream of bits (sequence of 0's and 1's) without any
interpretation. To be transmitted bits must be encoded into the signals - electrical or optical.
• The physical layer defines the type of encoding (how 0's and 1's are changed in signals).
• This layer is responsible for the bit by bit delivery of the data to its upper layer called the MAC
layer. Physical layer obtains data in the form of signals or the radio signals or the optical signals.
• The physical layer is responsible for delivering those signals from a cable, a Wi-Fi router or an optical
fiber.
Data Rate (Transmission Rate): The number of bits sends each second is also defined by the physical layer. In
other words, the physical layer defines the duration of a bit also.
Synchronization of bi ts: It is necessary to have synchronization between sender and receiver at the bit level
that is the clocks of the sender and the receiver must be synchronized.
Line c onfiguration: The physical layer is responsible for the connection of devices to the medium. Two
devices are connected through a dedicated link in a point-to-point configuration.
Physical topology: The Physical topology determines how devices are connected to create a network. Devices
can be using a mesh topology (every device can be connected to other devices), a star topology (all the devices
are connected through a central device), a ring topology (devices are connected to the next forming a ring), or a
bus topology (every device shared a common link).
Transmission mode: The mechanism of transferring data or information between two linked devices connected
over a network is referred to as Transmission Modes. They are simplex, half-duplex, or full-duplex.
Analog and digital signals can take one of two forms: periodic or non-periodic
• Periodic Signal: A periodic signal completes a pattern within a measurable time frame, called a period,
and repeats that pattern over subsequent identical periods. The completion of one full pattern is called a
cycle.
• Non-periodic signal: A non-periodic signal changes without exhibiting a pattern or cycle that repeats
over time.
• Period refers to the amount of time, in seconds, a signal needs to complete 1 cycle. Frequency refers to
the number of periods in I s.
f= 1/T and t= 1/F
Consequences:
o For analog signals: degradation of signal quality
o For digital signals: bit errors
The most significant impairments include
Attenuation
Distortion
Noise
Attenuation
• Attenuation refers to lose of energy by a signal time.
• When a signal, simple or composite , travels through a medium ,it loses some of its energy in
overcoming the resistance of the medium.
• It compensate for this lose, amplifier are used.
Distortion
• Distortion means signal changes its form or shape.
• Distortion can occur in a composite signal made of different frequency.
• Each signal component has its own propagation speed through a medium and therefore its own delay in
arriving at the final signal.
Noise
• The random or unwanted signal that mixes up with the original signal is called noise.
• Several type of noise as thermal noise, induced noise , crosstalk noise, Impulse noise may corrupt the
signal.
Induced noise comes from sources such as motors and appliances. These devices act as sending antenna and
transmission medium act as receiving antenna.
Thermal noise is movement of electrons in wire which creates an extra signal.
Crosstalk noise is when one wire affects the other wire.
Impulse noise is a signal with high energy that comes from lightning or power lines.
SNR = AVG SIGNAL POWER / AVG NOISE POWER
Data rate Limits
• Data rate governs the speed of data transmission.
• A very important consideration in data communication is how fast we can send data, in bits per second,
over a channel.
Data rate depends upon 3 factors:
1. The bandwidth available
2. Number of levels in digital signal
3. The quality of the channel – level of noise
Note –Increasing the levels of a signal may reduce the reliability of the system.
Q1 : Consider a noiseless channel with a bandwidth of 3000 Hz transmitting a signal with two signal levels.
What can be the maximum bit rate?
Q2 : We need to send 265 kbps over a noiseless channel with a bandwidth of 20 kHz. How many signal levels
do we need?
Output2 : 265000 = 2 * 20000 * log2(L)
=> log2(L) = 6.625
=> L = 26.625 = 98.7 levels
2. Noisy Channel: Shannon Capacity
• In reality, we cannot have a noiseless channel; the channel is always noisy.
• Shannon capacity is used, to determine the theoretical highest data rate for a noisy channel:
Capacity = Bandwidth * log2(1 + SNR)
Bandwidth is a fixed quantity, so it cannot be changed. Hence, the channel capacity is directly proportional to
the power of the signal, as SNR = (Power of signal) / (power of noise).
The signal-to-noise ratio (S/N) is usually expressed in decibels (dB) given by the formula:
10 * log10(S/N)
10 * log10(1000) = 30 dB.
Note: The Shannon capacity gives us the upper limit; the Nyquist formula tells us how many signal levels we need.
Q2 : The SNR is often given in decibels. Assume that SNR(dB) is 36 and the channel bandwidth is 2 MHz.
Calculate the theoretical channel capacity.
SNR = 10(SNR(dB)/10)
SNR = 103.6 = 3981
Hence, C = 2 * 106 * log2(3982) = 24 MHz
Q3. Consider an extremely noisy channel in which the value of the signal-to-noise ratio is almost zero. In other words, the
noise is so strong that the signal is faint. For this channel the capacity C is calculated as
B 1og 2 (l + 0)
B log2
1 => B x 0
0
This means that the capacity of this channel is zero regardless of the bandwidth. In other words, we cannot
receive any data through this channel.
PERFORMANCE:
1. Bandwidth
2. Throughput
3. Latency (Delay)
4. Bandwidth Delay Product
5. Jitter
Bandwidth
• One characteristic that measures network-performance is bandwidth.
• Bandwidth of analog and digital signals is calculated in separate ways:
(2) Bandwidth of an Analog Signal (in hz)
For example: The bandwidth of a Fast Ethernet is a maximum of 100 Mbps. (This means that this network can
send 100 Mbps).
Throughput
• The throughput is a measure of how fast we can actually send data through a network.
In other words,
1) The bandwidth is a potential measurement of a link.
2) The throughput is an actual measurement of how fast we can send data.
Example 1.18
Latency (Delay)
The latency defines how long it takes for an entire message to completely arrive at the destination from the time
the first bit is sent out from the source.
Propagation time is defined as the time required for a bit to travel from source to destination.
Example 1.19
Processing Delay Processing delay is the time taken by the routers to process the packet header.
Let us assume,
Bandwidth of the link = 1 bps Delay of the link = 5s.
From the figure 3.32, bandwidth-delay product is 1 x 5 = 5. Thus, there can be maximum 5 bits on
the line.
There can be no more than 5 bits at any time on the link.
From the figure 3.33, bandwidth-delay product is 5 x 5 = 25. Thus, there can be maximum 25 bits on the line.
Jitter
• Another performance issue that is related to delay is jitter.
• We can say that jitter is a problem
→ if different packets of data encounter different delays and
→ if the application using the data at the receiver site is time-sensitive (for ex: audio/video).
A transmission medium can be broadly defined as anything that can carry information from a source to a
destination.
In telecommunications, transmission media can be divided into two broad categories: guided and unguided.
1. Guided media include twisted-pair cable, coaxial cable, and fiber-optic cable.
2. Unguided medium is free space
1. Guided Media:
It is also referred to as Wired or Bounded transmission media. Signals being transmitted are directed and
confined in a narrow pathway by using physical links.
Features:
• High Speed
• Secure
• Used for comparatively shorter distances
There are 3 major types of Guided Media:
(i) Twisted Pair Cable –
It consists of 2 separately insulated conductor wires wound about each other. Generally, several such pairs are
bundled together in a protective sheath. They are the most widely used Transmission Media. Twisted Pair is of
two types:
1. Unshielded Twisted Pair (UTP):
This type of cable has the ability to block interference and does not depend on a physical shield for this
purpose. It is used for telephonic applications.
It has an outer plastic covering containing 2 parallel conductors each having a separate insulated protection
cover. Coaxial cable transmits information in two modes: Baseband mode(dedicated cable bandwidth) and
Broadband mode(cable bandwidth is split into separate ranges). Cable TVs and analog television networks
widely use Coaxial cables.
Advantages:
• High Bandwidth
• Better noise Immunity
• Easy to install and expand
• Inexpensive
Disadvantages:
• Single cable failure can disrupt the entire network
It uses the concept of reflection of light through a core made up of glass or plastic. The core is surrounded by a
less dense glass or plastic covering called the cladding. It is used for transmission of large volumes of data.
Advantages:
• Increased capacity and bandwidth
• Light weight
• Less signal attenuation
• Immunity to electromagnetic interference
• Resistance to corrosive materials
2. Unguided Media:
It is also referred to as Wireless or Unbounded transmission media.No physical medium is required for the
transmission of electromagnetic signals.
Features:
• Signal is broadcasted through air
• Less Secure
• Used for larger distances
There are 3 major types of Unguided Media:
(i) Radiowaves –
These are easy to generate and can penetrate through buildings. The sending and receiving antennas need not be
aligned. Frequency Range:3KHz – 1GHz. AM and FM radios and cordless phones use Radiowaves for
transmission.
Further Categorized as (i) Terrestrial and (ii) Satellite.
(ii) Microwaves –
It is a line of sight transmission i.e. the sending and receiving antennas need to be properly aligned with each
other. The distance covered by the signal is directly proportional to the height of the antenna. Frequency
Range:1GHz – 300GHz. These are majorly used for mobile phone communication and television distribution.
(iii) Infrared –
Infrared waves are used for very short distance communication. They cannot penetrate through obstacles. This
prevents interference between systems. Frequency Range:300GHz – 400THz. It is used in TV remotes, wireless
mouse, keyboard, printer, etc.
Satellites:
A satellite is an object that revolves around another object. For example, earth is a satellite of The Sun, and
moon is a satellite of earth.
A communication s atellite is a microwave rep eater s tation in a space that is used for telecommunication,
radio and television signals.
How a Satellite Works
Uplink f requency is the frequency at which ground station is communicating with satellite. The satellite
transponder converts the signal and sends it down to the second earth station, and this is called Downlink
frequency.
Earth Orbits
A satellite when launched into space, needs to be placed in certain orbit to provide a particular way for its
revolution, so as to maintain accessibility and serve its purpose whether scientific, military or commercial. Such
orbits which are assigned to satellites, with respect to earth are called as Earth Orbits.
In descriptions of satellite services, three abbreviations relate to the applications that are supported:
I. FSS—Fixed satellite services, the conventional fixed services, are offered in both the C-band and the
Ku-band allocations.
II. BSS—Broadcast satellite services include standard television and direct broadcast. These largely operate
in the Ku-band, at 18GHz. Because the general application of television so far has been one way, 18GHz
shows just the downlink frequency allocation. As we begin to move toward interactive TV, we'll start to
see the use of two different bands in BSS.
III. MSS—Mobile satellite services accommodate mobility (i.e., mobile users). They make use of either Ka-
band or L-band satellites.
i. Space segment—The space segment is the actual design of the satellite and the orbit in which it
operates. Most satellites have one of two designs: a barrel-shaped satellite, normally used to
accommodate standard communications, or a satellite with a very wide wingspan, generally used for
television. Satellites are launched into specific orbits to cover the parts of the earth for which coverage is
desired.
ii. Control segment—The control segment defines the frequency spectrum over which satellites operate
and the types of signaling techniques used between the ground station and the satellite to control those
communications.
Fig: Satellite orbits Fig: A VSAT system (private networking ) GEO Satellites
Multiplexing
Multiplexing is the set of techniques that allows the simultaneous transmission of multiple signals across a
single data link. Whenever the bandwidth of a medium linking two devices is greater than the bandwidth needs
of the devices, the link can be shared. In a multiplexed system, n lines share the bandwidth of one link.
The following figure shows the basic format of a multiplexed system. The lines on the left direct their
transmission streams to a multiplexer (MUX), which combines them into a single stream (many-toone). 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.
1. Frequency-division multiplexing
2. Time-division multiplexing.
3. Wavelength-division multiplexing
Frequency Division Multiplexing (FDM) is a networking technique in which multiple data signals are
combined for simultaneous transmission via a shared communication medium. FDM uses a carrier signal at a
discrete frequency for each data stream and then combines many modulated signals.
Detailed example is shown in above figure. There are three voice-grade telephone channels multiplexed
using FDM. When many channels are multiplexed together, 4000Hz(4KHz) is allocated per channel. The
excess is called a guard b and. It keeps the channels well separated. First the voice channels are raised in
frequency, each by a different amount. Then they can be combined because no two channels now occupy the
same portion of the spectrum. Notice that even though there are gaps between the channels thanks to the
guard bands which well separates two frequency even if there is some overlapping.
Time-Division Multiplexing.:
TDM was initially developed in 1870 for large system telegraphy implementation. Packet switching networks
use TDM for telecommunication links, i.e., packets are divided into fixed lengths and assigned fixed time slots
for transmission. Each divided signal and packet, which must be transmitted within assigned time slots, are
reassembled into a complete signal at the destination.
Wavelength-Division Multiplexing
• Wavelength-division multiplexing (WDM) is designed to use the high-data-rate capability of fiber-optic
cable.
• The optical fiber data rate is higher than the data rate of metallic transmission cable. Using a fiber-optic
cable for one single line wastes the available bandwidth. Multiplexing allows us to combine several lines
into one.
• WDM is conceptually the same as FDM, except that the multiplexing and demultiplexing involve
optical signals transmitted through fiber-optic channels.
• The following figure gives a conceptual view of a WDM multiplexer and demultiplexer. Very narrow
bands of light from different sources are combined to make a wider band of light. At the receiver, the
signals are separated by the demultiplexer.
• In this method, we combine multiple light sources into one single light at the multiplexer and do the
reverse at the demultiplexer.
• The combining and splitting of light sources are easily handled by a prism.
• Recall from basic physics that a prism bends a beam of light based on the angle of incidence and the
frequency.
• Using this technique, a multiplexer can be made to combine several input beams of light, each
containing a narrow band of frequencies, into one output beam of a wider band of frequencies.
• A demultiplexer can also be made to reverse the process.
• The f ollowing figure s hows t he i dea of s pread s pectrum. Spread s pectrum a chieves i ts g oals
through two principles:
1. The bandwidth allocated to each station needs to be, by far, larger than what is needed. This allows
redundancy.
2. The expanding of the original bandwidth B to the bandwidth Bss must be done by a process that is
independent of the original signal. In other words, the spreading process occurs after the signal is created
by the source.
• The Frequency Hopping Spread Spectrum (FHSS) technique uses M different carrier frequencies that
are modulated by the source signal.
• The bandwidth occupied by a source after spreading is BpHSS >> B.
• The following figure shows the general layout for FHSS. A pseudorandom code generator, called
pseudorandom noise (PN), creates a k-bit pattern for every hopping period
For E xample M is 8 and k is 3. The pseudorandom code generator will create eight different 3-bit patterns.
These are mapped to eight different frequencies in the frequency table as shown in the following figure.
The pattern for this station is 101, 111, 001, 000, 010, all, 100. Note that the pattern is pseudorandom it is
repeated after eight hoppings. This means that at hopping period 1, the pattern is 101. The frequency selected is
700 kHz, the source signal modulates this carrier frequency.
The second k-bit pattern selected is 111, which selects the 900-kHz carrier; the eighth pattern is 100, the
frequency is 600 kHz. After eight hoppings, the pattern repeats, starting from 101 again.
Bandwidth Sharing
If the number of hopping frequencies is M, we can multiplex M channels into one by using the same Bss
bandwidth.
The direct sequence spread spectrum (DSSS) technique also expands the bandwidth of the original signal, but
the process is different. In DSSS, we replace each data bit with n bits using a spreading code. In other words,
each bit is assigned a code of n bits, called chips, where the chip rate is n times that of the data bit.
In the figure, the spreading code is 11 chips having the pattern 10110111000 (in this case). If the original signal
rate is N, the rate of the spread signal is 11N. This means that the required bandwidth for the spread signal is 11
times larger than the bandwidth of the original signal.
Switching is process to forward packets coming in from one port to a port leading towards the
destination.
When data comes on a port it is called ingress, and when data leaves a port or goes out it is called
egress.
A communication system may include number of switches and nodes.
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
When two nodes communicate with each other over a dedicated c ommunication pat h, it is called
circuit switching.
There 'is a need of pre-specified route from which data will travels and no other data is permitted.
In circuit switching, to transfer the data, circuit must be established so that the data transfer can take
place.
Circuits can be permanent or temporary.
Circuit s witching w as de signed f or v oice appl ications. T elephone i s t he be st suitable example of c ircuit
switching. B efore a us er c an m ake a c all, a v irtual pat h be tween c aller and c aller is e stablished ov er t he
network.
o Once the dedicated path is established, the only delay occurs in the speed of data transmission.
Message Switching
o Message Switching is a switching technique in which a message is transferred as a complete unit and
routed through intermediate nodes at which it is stored and forwarded.
o In Message Switching technique, there is no establishment of a dedicated path between the sender and
receiver.
o The destination address is appended to the message. Message Switching provides a dynamic routing as
the message is routed through the intermediate nodes based on the information available in the message.
o Message switches are programmed in such a way so that they can provide the most efficient routes.
o Each and every node stores the entire message and then forward it to the next node. This type of network
is known as store and forward network.
o Message switching treats each message as an independent entity.
They provide 2 distinct and important characteristics:
Store and forward – The intermediate nodes have the responsibility of transferring the entire message
to the next node. Hence, each node must have storage capacity.
Message delivery – This implies wrapping the entire information in a single message and transferring it
from the source to the destination node.
A switch working on message switching, first receives the whole message and buffers it until there are
resources available to transfer it to the next hop. If the next hop is not having enough resource to accommodate
large size message, the message is stored and switch waits.
Applications –
The store-and-forward method was implemented in telegraph message switching centers.
Packet Switching
o 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.
o The message splits into smaller pieces known as packets and packets are given a unique number to
identify their order at the receiving end.
o Every packet contains some information in its headers such as source address, destination address and
sequence number.
o Packets will travel across the network, taking the shortest path as possible.
o All the packets are reassembled at the receiving end in correct order.
o If any packet is missing or corrupted, then the message will be sent to resend the message.
o If the correct order of the packets is reached, then the acknowledgment message will be sent.
Node takes routing decisions to forward the packets. Node does not take any routing decision.
Congestion cannot occur as all the packets travel in different Congestion can occur when the node is
directions. busy, and it does not allow other packets to
pass through.
It is more flexible as all the packets are treated as an It is not very flexible.
independent entity.
TELEPHONE NETWORK
Telephone networks use circuit switching. The telephone network had its beginnings in the late 1800s. The
entire network, network, which is referred to as the plain old t elephone s ystem (POTS), was originally an
analog system using analog signals to transmit voice.
The tasks of data transfer and signaling are separated in modern telephone network: data transfer is done by
one network, signaling by another.
After traditional modems reached their peak data rate, telephone companies developed another technology,
technology, DSL, to provide higher-speed access to the Internet. Digital subscriber lin e (DSL) technology is
one of the most promising for supporting high-speed digital communication over the existing local loops.
• ADSL
• ADSL Lite
• VDSL, etc
ADSL is an asymmetric communication technology designed for residential users; it is not suitable for businesses
CABLE NETWORKS
• The cable network started as a video service provider, but it has moved to the business of Internet
access. This network can be used to provide high -speed access to the Internet.
• Cable television, generally, any system that distributes television signals by means of coaxial or fibre-
optic cables. The term also includes systems that distribute signals solely via satellite.
• Cable-television systems originated in the United States in the late 1940s and were designed to improve
reception of commercial network broadcasts in remote and hilly areas.
• During the 1960s they were introduced in many large metropolitan areas where local television
reception is degraded by the reflection of signals from tall buildings.
• Commonly known as c ommunity ante nna television (CATV), these cable systems use a “community
antenna” to receive broadcast signals (often from communications satellites), which they then retransmit
via cables to homes and establishments in the local area subscribing to the service.
Mobile Data technology lets your key staff operate more efficiently when they are out of the office. It can help
you:
• Carry out tasks remotely, which would normally be done on a computer in the office,
• Communicate with people at remote locations,
• Work with data that is held in the office, even when you are in a different location,
• Communicate a message
• Create an electronic audit trail of messages sent/received
• Keep in touch with the office anytime and from anywhere.
The technology choices are many and varied and can be divided into two main categories
Wireless data networks exist in such number and variety as to be difficult to categories and compare.
Some wireless data networks run over wireless voice networks, such as mobile telephone
networks. GPRS and 3G are examples.
There are cost implications on the type of data network you use for you mobile data solution. The variables
involved in calculating the data transmission costs include;
GSM
GSM stands for Global System for Mobile communications. GSM is one of the most widely used digital
wireless telephony system.
GSM technology uses TDMA (Time Division Multiple Access) to support up to eight calls simultaneously. It
also uses encryption to make the data more secure.
The frequencies used by the international standard is 900 MHz to 1800 MHz However, GSM phones used in
the US use 1900 MHz frequency and hence are not compatible with the international system.
GPRS is the mobile communication protocol used by second (2G) and third generation (3G) of mobile
telephony. It pledges a speed of 56 kbps to 114 kbps, however the actual speed may vary depending on network
load.
“NEVER GIVE UP ON A DREAM JUST BECAUSE OF THE TIME IT WILL TAKE TO ACCOMPLISH IT. THE
TIME WILL PASS ANYWAY.”
Point to Note
Cryptography is a method of using advanced mathematical principles in storing and transmitting data in a
particular form so that only those whom it is intended can read and process it.
Cryptography Terms
Encryption: It is the process of locking up information using cryptography. Information that has been
locked this way is encrypted.
Decryption: The process of unlocking the encrypted information using cryptographic techniques.
Key: A secret like a password used to encrypt and decrypt information. There are a few different types of
keys used in cryptography.
Steganography: It is actually the science of hiding information from people who would snoop on you. The
difference between steganography and encryption is that the would-be snoopers may not be able to tell
there’s any hidden information in the first place.
• Some secret information shared by the two principals and, it is hoped, unknown to the opponent. An
example is an encryption key used in conjunction with the transformation to scramble the message
before transmission and unscramble it on reception.
This general model shows that there are four basic tasks in designing a particular security service:
1. Design an algorithm for performing the security-related transformation. The algorithm should be such
that an opponent cannot defeat its purpose.
2. Generate the secret information to be used with the algorithm.
3. Develop methods for the distribution and sharing of the secret information.
4. Specify a protocol to be used by the two principals that makes use of the security algorithm and the
secret information to achieve a particular security service.
A general model of these other situations is illustrated by Figure 1.5, which reflects a concern for protecting an
information system from unwanted access. Most readers are familiar with the concerns caused by the existence
of hackers, who attempt to penetrate systems that can be accessed over a network. The hacker can be someone
who, with no malign intent, simply gets satisfaction from breaking and entering a computer system. The
intruder can be a disgruntled employee who wishes to do damage or a criminal who seeks to exploit computer
assets for financial gain (e.g., obtaining credit card numbers or performing illegal money transfers).
This is the simplest kind of encryption that involves only one secret key to cipher and decipher
information.
Symmetrical encryption is an old and best-known technique.
It uses a secret key that can either be a number, a word or a string of random letters.
It is a blended with the plain text of a message to change the content in a particular way.
The sender and the recipient should know the secret key that is used to encrypt and decrypt all the
messages. AES, DES, RC5, and RC6 are examples of symmetric encryption.
The most widely used symmetric algorithm is AES-128, AES-192, and AES-256.
The main disadvantage of the symmetric key encryption is that all parties involved have to exchange the key
used to encrypt the data before they can decrypt it.
Asymmetrical Encryption
Decryption Formula
The decryption process is very straightforward and includes analytics for calculation in a systematic approach.
Considering receiver C has the private key d, the result modulus will be calculated as −
Plaintext = Cd mod n
Digital signatures are the public-key primitives of message authentication. In the physical world, it
is common to use handwritten signatures on handwritten or typed messages. They are used to bind signatory to
the message.
Similarly, a digital signature is a technique that binds a person/entity to the digital data. This binding
can be independently verified by receiver as well as any third party.
Digital signature is a cryptographic value that is calculated from the data and a secret key known only
by the signer.
However, the crypto system based on sign-then-encrypt can be exploited by receiver to spoof identity of sender
and sent that data to third party. Hence, this method is not preferred. The process of encrypt-then-sign is more
reliable and widely adopted. This is depicted in the following illustration −
The receiver after receiving the encrypted data and signature on it, first verifies the signature using sender’s
public key. After ensuring the validity of the signature, he then retrieves the data through decryption using his
private key.
• Along with having strong strength levels, the length of the signature is smaller as compared to other
digital signature standards.
• The signature computation speed is less.
• DSA requires less storage to work as compared to other digital standards.
• DSA is patent free so it can be used free of cost.
Disadvantages of Digital Signature Algorithm
• It requires a lot of time to authenticate as the verification process includes complicated remainder
operators. It requires a lot of time for computation.
• Data in DSA is not encrypted. We can only authenticate data in this.
• The digital signature algorithm firstly computes with SHA1 hash and signs it. Any drawbacks in
cryptographic security of SHA1 are reflected in DSA because implicitly of DSA is dependent on it.
• With applications in both secret and non-secret communications, DSA is of the US National Standard.
IP security (IPSec)
Internet protocol security (IPsec) is a set of protocols that provides security for Internet Protocol. It can
use cryptography to provide security. IPsec can be used for the setting up of virtual private networks (VPNs) in
a secure manner.Also known as IP Security.
The IP security (IPSec) is an Internet Engineering Task Force (IETF) standard suite of protocols between 2
communication points across the IP network that provide data authentication, integrity, and confidentiality. It
also defines the encrypted, decrypted and authenticated packets. The protocols needed for secure key exchange
and key management are defined in it.
Uses of IP Security –
IPsec can be used to do the following things:
• To encrypt application layer data.
• To provide security for routers sending routing data across the public internet.
• To provide authentication without encryption, like to authenticate that the data originates from a known
sender.
• To protect network data by setting up circuits using IPsec tunneling in which all data is being sent
between the two endpoints is encrypted, as with a Virtual Private Network(VPN) connection.
Components of IP Security –
It has the following components:
1. Encapsulating Security Payload (ESP) –
It provides data integrity, encryption, authentication and anti replay. It also provides authentication for
payload.
2. Authentication Header (AH) –
It also provides data integrity, authentication and anti replay and it does not provide encryption. The anti
replay protection, protects against unauthorized transmission of packets. It does not protect data’s
confidentiality.
It is a network security protocol designed to dynamically exchange encryption keys and find a way over
Security Association (SA) between 2 devices. The Security Association (SA) establishes shared security
attributes between 2 network entities to support secure communication. The Key Management Protocol
(ISAKMP) and Internet Security Association which provides a framework for authentication and key exchange.
ISAKMP tells how the set up of the Security Associations (SAs) and how direct connections between two hosts
that are using IPsec.
Internet Key Exchange (IKE) provides message content protection and also an open frame for implementing
standard algorithms such as SHA and MD5. The algorithm’s IP sec users produces a unique identifier for each
packet. This identifier then allows a device to determine whether a packet has been correct or not. Packets
which are not authorized are discarded and not given to receiver.
IPsec provides the following security services for traffic at the IP layer:
Applications of IPSec
As we all know to help in the security of a network the Internet community has done lot of work and developed
application-specific security mechanisms in numerous application areas, including electronic mail (Privacy
Enhanced Mail, P retty Good P rivacy [PGP]), network management (Simple N etwork M anagement P rotocol
Version 3[SNMPv3]), Web access (Secure HTTP, Secure Sockets Layer [SSL]), and others.
Benefits of IPSec
When IPSec is implemented in a firewall or router, it provides strong security whose application is to all
traffic crossing this perimeter. Traffic within a company or workgroup does not incur the overhead of security-
related processing.
IPSec is below the transport layer (TCP, UDP), and is thus transparent to applications. There is no need
to change software on a user or server system when IPSec is implemented in the firewall or router.
Even if IPSec is implemented in end systems, upper layer software, including applications is not
affected. IPSec can be transparent to end users.
VPN stands for Virtual Private Network (VPN) that allows a user to connect to a private network over the
Internet securely and privately. VPN creates an encrypted connection that is called VPN tunnel and all Internet
traffic and communication is passed through this secure tunnel.
Virtual Private Network (VPN) is basically of 2 types:
1. Remote Access VPN:
Remote Access VPN permits a user to connect to a private network and access all its services and
resources remotely. The connection between the user and the private network occurs through the Internet
and the connection is secure and private. Remote Access VPN is useful for home users and business users
both.
2. Site to Site VPN:
A Site-to-Site VPN is also called as Router-to-Router VPN and is commonly used in the large
companies. Companies or organizations, with branch offices in different locations, use Site-to-site VPN
to connect the network of one office location to the network at another office location.
• Intranet based VPN: When several offices of the same company are connected using Site-to-Site VPN
type, it is called as Intranet based VPN.
• Extranet based VPN: When companies use Site-to-site VPN type to connect to the office of another
company, it is called as Extranet based VPN.
Firewall
A firewall is a network security device, either hardware or software-based, which monitors all incoming
and outgoing traffic and based on a defined set of security rules it accepts, rejects or drops that specific traffic.
Accept : allow the traffic
Reject : block the traffic but reply with an “unreachable error”
Drop : block the traffic with no reply
A firewall establishes a barrier between secured internal networks and outside untrusted network, such
as the Internet.
A firewall is a network security device that monitors incoming and outgoing network traffic
and permits or blocks data packets based on a set of security rules. Its purpose is to establish a barrier between
your internal network and incoming traffic from external sources (such as the internet) in order to block
malicious traffic like viruses and hackers.
Types of Firewall
Firewalls are generally of two types: Host-based and Network-based.
1. Host- based Firewalls : Host-based firewall is installed on each network node which controls each
incoming and outgoing packet. It is a software application or suite of applications, comes as a part of the
operating system. Host-based firewalls are needed because network firewalls cannot provide protection
inside a trusted network. Host firewall protects each host from attacks and unauthorized access.
2. Network-based Firewalls : Network firewall function on network level. In other words, these firewalls
filter all incoming and outgoing traffic across the network. It protects the internal network by filtering the
traffic using rules defined on the firewall. A Network firewall might have two or more network interface
cards (NICs). A network-based firewall is usually a dedicated system with proprietary software installed.
Generation of Firewall
Firewalls can be categorized based on its generation.
First Generation- Packet Filtering Firewall : Packet filtering firewall is used to control network access by
monitoring outgoing and incoming packet and allowing them to pass or stop based on source and destination IP
address, protocols and ports. It analyses traffic at the transport protocol layer (but mainly uses first 3 layers).
Third Generation- Application Layer Firewall : Application layer firewall can inspect and filter the packets
on any OSI layer, up to the application layer. It has the ability to block specific content, also recognize when
certain application and protocols (like HTTP, FTP) are being misused.
Next Generation Firewalls (NGFW) : Next Generation Firewalls are being deployed these days to stop
modern security breaches like advance malware attacks and application-layer attacks.
Wireless-Security
Like the system's security and data security, keeping a sound knowledge about different wireless security
measures is also essential to know for security professionals. It is because different wireless security
mechanisms have a different level of strength and capabilities.
There are automated wireless hacking tools available that have made cybercriminals more powerful. List of
some of these tools are:
AirCrack.
AirSnort.
Cain & Able.
Wireshark.
NetStumbler etc.
Different various techniques of hacking include remote accessing, shoulder surfing, wireless router's dashboard
accessing, and brute-forcing attack that are used to penetrate wireless security.
1. What is Wireless Security?
2. Wired Equivalent Privacy (WEP)
3. Wi-Fi Protected Access (WPA)
4. Wi-Fi Protected Access II (WPA2)
5. Wi-Fi Protected Access 3 (WPA3)
1. Hardware-based: where routers and switches are fabricated with encryption measures protects all
wireless communication. So, in this case, even if the data gets compromised by the cybercriminal, they
will not be able to decrypt the data or view the traffic's content.
Wired Equivalent Privacy (WEP) is the oldest security algorithm of 1999. It uses the initialization vector (IV)
method. The very first versions of the WEP algorithm were not predominantly strong enough, even for that time
when it got released. But the reason for this weak release was because of U.S. limits on the exporting of
different cryptographic technologies, which led the manufacturing companies to restrict their devices to 64-bit
encryption only. As the limitation was withdrawn, the 128 bit and 256 bit WEP encryption were developed and
came into the wireless security market, though 128 became the standard one.
Wi-Fi Protected Access (WPA) was the next Wi-Fi Alliance's project that replaced the increasingly noticeable
vulnerabilities of WEP standard. WPA was officially adopted in the year 2003, one year before the retirement
of WEP. WPA's most common configuration is with WPA-PSK, which is abbreviated as Pre-Shared Key. WPA
uses 256-bit, which was a considerable enhancement above the 64-bit as well as 128-bit keys.
Wi-Fi Protected Access II (WPA2) became official in the year 2006 after WPA got outdated. It uses the AES
algorithms as a necessary encryption component as well as uses CCMP (Counter Cipher Mode - Block
Chaining Message Authentication Protocol) by replacing TKIP.
Wi-Fi Protected Access 3 (WPA3) is the latest, and the third iteration of this family developed under Wi-Fi
Alliance. It has personal as well as enterprise security-support feature and uses 384-bit Hashed Message
Authentication Mode, 256-bit Galois / Counter Mode Protocol (GCMP-256), as well as Broadcast/Multicast
Integrity Protocol of 256-bit. WPA3 also provides perfect forward secrecy mechanism support.
“NEVER GIVE UP ON A DREAM JUST BECAUSE OF THE TIME IT WILL TAKE TO ACCOMPLISH IT. THE
TIME WILL PASS ANYWAY.”
An application layer protocol defines how application processes (clients and servers), running on different end
systems, pass messages to each other. In particular, an application layer protocol defines:
1. DNS:
Domain N ame S ystem (DNS) − It is a naming system for devices in networks. It provides services for
translating domain names to IP addresses.
1. Name Server (DNS- Domain Name System)
• All system communicate using IP(Numbers)
• Numbers are difficult to remember for human beings than name
• Internet is very large there are millions of computer and servers
• Naming system is introduced(in 1983) for mapping of Host Name to IP address
• In DNS server, there is library procedure (program) called resolver that converts host name to IP.
• ICANN (Internet Corporation for Assigned Names and Numbers) is responsible for managing the
DNS in internet.
• Domain names are unique
• Divided into 2 :
1. Flat Structure
2. Hierarchical Structure
• Hierarchical structure is used.
• Name space have tree structure.
• Example : www.xyz.com
• Here xyz.com is managed by central authority(ICANN) and www is name
given by organization(here xyz)
1.1.3. Zone
• Zone will keep track of all nodes in domain and all sub-domains under the domain.
1.2. Servers
• Root Server
• A root server is a server whose zone consists of the whole tree
• A root server usually does not store any information about domains but delegates its authority to other
servers
• DNS defines two types of servers
1. Primary Server
• A primary server is a server
• That stores a file about the zone for which it is an authority
• It is responsible for creating, maintaining, and updating the zone file
2. Secondary Server
• A secondary server is a server that transfers the complete information about a zone from
another server (primary or secondary) and stores the file on its local disk
2. DHCP:
DHCP(Dynamic Host Configuration Protocol)
• Two possible way for configuring IP are:
1. Manually
2. Dynamically (DHCP)
• DHCP is service that provide IP addresses.
• Server that runs DHCP service is DHCP servers.
• Client that uses DHCP server for IP configuration is DHCP clients.
• DHCP server uses UDP port 67
• DHCP client uses UDP port 68
3. WWW:
This is a protocol used mainly to access data on the World Wide Web (www).
The Hypertext Transfer Protocol (HTTP) the Web's main application-layer protocol although current
browsers can access other types of servers
A respository of information spread all over the world and linked together.
The HTIP protocol transfer data in the form of plain text, hyper text, audio, video and so on.
HTTP utilizes TCP connections to send client requests and server replies.
it is a synchronous protocol which works by making both persistent and non persistent connections.
4. HTTP:
Hyper Text Transfer Protocol, HTTP − It is the underlying protocol for world wide web. It defines how
hypermedia messages are formatted and transmitted.
• The Hypertext Transfer Protocol (HTTP) is a protocol used mainly to access data on the World Wide
Web(WWW)
• It is similar to FTP because it transfers files and uses the services of TCP.
• It uses only one TCP connection
• HTTP uses the services of TCP on well-known port 80
• Accessing of web page is based on URL
7. FTP:
File Transfer Protocol, FTP − It is a client-server based protocol for transfer of files between client and
server over the network.
• File Transfer Protocol (FTP) is the standard mechanism provided by TCP/IP for copying a file from
one host to another.
• FTP establishes two connections between the hosts
• One connection is used for data transfer, the other for control information (commands and responses)
• Separation of commands and data transfer makes FTP more efficient
• FTP uses two well-known TCP ports: Port 21 is used for the control connection, and port 20 is used
for the data connection.
Q. E-mail
• Electronic mail, or more commonly email, used to communicate with different users in internet
• Email uses following protocols for storing & delivering messages, They are :
1. SMTP (Simple Mail Transfer Protocol)
2. POP (Post Office Protocol)
3. IMAP (Internet Message Access Protocol)
8. SMTP:
Simple Mail Transfer Protocol, SMTP − It lays down the rules and semantics for sending and receiving
electronic mails (e-mails).
9. POP:
9.1. POP (Post Office Protocol)
• Post Office Protocol (POP) is an application-layer Internet standard protocol used by local e-mail
clients to retrieve e-mail from a remote server over a TCP/IP connection
• POP has been developed through several versions, with version 3 (POP3) being the last standard
• E-mails are downloaded from the server's mailbox to your computer
• No copy of Email will be kept in mailbox after downloading the email
• E-mails are available when you are not connected
9.1.2.Features of POP
• POP is a much simpler protocol, making implementation easier
• POP mail moves the message from the email server onto your local computer, although there is usually
an option to leave the messages on the email server as well
• POP treats the mailbox as one store, and has no concept of folders
• POP protocol requires the currently connected client to be the only client connected to the mailbox
• When POP retrieves a message, it receives all parts of it
Simple Network Management Protocol (SNMP) is an "Internet-standard protocol for managing devices on IP
networks. Devices that typically support SNMP include routers, switches, servers, workstations, printers,
modem racks, and more. It is used mostly in network management systems to monitor network-attached devices
for conditions that warrant administrative attention.
The Simple Network Management Protocol (SNMP) is a framework for managing devices in an Internet using
the TCPIIP protocol suite. It provides a set of fundamental operations for monitoring and maintaining an
Internet.
MRTG
• The Multi Router Traffic Grapher (MRTG) is free software for monitoring and measuring the traffic
load on network links. It allows the user to see traffic load on a network over time in graphical form.
• It was originally developed by Tobias Oetiker and Dave Rand to monitor router traffic, but has
developed into a tool that can create graphs and statistics for almost anything.
• MRTG is written in Perl and can run on Windows, Linux, Unix, Mac OS and NetWare.
How it works
• SNMP
MRTG uses the Simple N etwork Man agement P rotocol (SNMP) to send requests with two object
identifiers (OIDs) to a device.
The device, which must be SNMP-enabled, will have a management information base (MIB) to look up
the OIDs specified.
After collecting the information it will send back the raw data encapsulated in an SNMP protocol.
MRTG records this data in a log on the client along with previously recorded data for the device.
The software then creates an HTML document from the logs, containing a list of graphs detailing traffic
for the selected devices in the server.
The MRTG website contains a large library of external scripts to enable monitoring of SQL database
statistics, firewall rules, CPU fan RPMs, or virtually any integer-value data.
Features
PRTG:
PRTG Network Monitor (Paessler Router Traffic Grapher until version 7) is an agentless network monitoring
software from Paessler AG. It can monitor and classify system conditions like bandwidth usage or uptime and
collect statistics from miscellaneous hosts as switches, routers, servers and other devices and applications.
1. Specifications
o PRTG Network Monitor has an auto-discovery mode that scans predefined areas of an enterprise
network and creates a device list from this data.
o In the next step, further information on the detected devices can be retrieved using various
communication protocols.
o Typical protocols are Ping, SNMP, WMI, NetFlow, jFlow, sFlow, but also communication via
DICOM or the RESTful API is possible.
o The tool is only available for Windows systems. In addition, Paessler AG offers the cloud-based
monitoring solution "PRTG hosted by Paessler"
o
1.4 Pricing
PRTG Network Monitor's licensing is based on sensors. Most devices require between
five and ten sensors to be fully monitored. A version with 100 integrated sensors is available free
of charge.
Packet Analyzer:
• A packet analyzer (also known as a packet s niffer) is a computer program or piece of computer
hardware (such as a packet capture appliance) that can intercept and log traffic that passes over a digital
network or part of a network.
• Packet capture is the process of intercepting and logging traffic.
• A packet analyzer used for intercepting traffic on wireless networks is known as a wireless analyzer or
WiFi analyzer.
• A packet analyzer can also be referred to as a network analyzer or protocol analyzer though these terms
also have other meanings.
Capabilities
o On wired shared medias networks, such as Ethernet, Token Ring, and FDDI networks, depending on the
network structure (hub or switch), it may be possible to capture all traffic on the network from a single
machine on the network.
o On modern networks, traffic can be captured using a network switch with a so-called monitoring port
that mirrors all packets that pass through designated ports of the switch.
o On wireless LANs, traffic can be captured on one channel at a time, or by using multiple adapters, on
several channels simultaneously.
Uses:
Packet sniffers can:
o Analyze network problems
o Detect network misuse by internal and external users
o Monitor WAN bandwidth utilization
o Gather and report network statistics
Wireshark
• Wireshark, a network analysis tool formerly known as Ethereal, captures packets in real time and
display them in human-readable format.
• Wireshark includes filters, color coding, and other features that let you dig deep into network
traffic and inspect individual packets.
• Wireshark is a free and open-source packet analyzer. It is used for network troubleshooting,
analysis, software and communications protocol development, and education.
Features
Wireshark i s a d ata c apturing p rogram t hat " understands" t he s tructure ( encapsulation) of d ifferent
networking protocols.
• Data can be captured "from the wire" from a live network connection or read from a file of already-
captured packets.
• Live data can be read from different types of networks, including Ethernet, IEEE 802.11, PPP, and
loopback.
• Data display can be refined using a display filter.
• Wireless connections can also be filtered as long as they traverse the monitored Ethernet.
• Various settings, timers, and filters can be set to provide the facility of filtering the output of the
captured traffic
Filtering Packets
If you’re trying to inspect something specific, such as the traffic a program sends when phoning home, it helps
to close down all other applications using the network so you can narrow down the traffic. Still, you’ll likely
have a large amount of packets to sift through. That’s where Wireshark’s filters come in.
Inspecting Packets
“NEVER GIVE UP ON A DREAM JUST BECAUSE OF THE TIME IT WILL TAKE TO ACCOMPLISH IT. THE
TIME WILL PASS ANYWAY.”
• It also breaks the messages that have to be sent into packets and to assemble incoming packets into
messages for higher levels.
• If two systems are attached to the same network, there is usually no need for a network layer.
• However, if two systems are attached connecting devices on the different networks (links), so there is
often needed for the network layer to complete the source-to-destination delivery of the message.
This figure shows the relationship of the network layer to the data link and transport layer,
• A major design issue in the network layer is to determine the packet routing that is how each packet
routed from source to destination.
• Routes can be based on static tables and also highly dynamic that is each packet has a predefined route
or it can be changed for each packet.
• If there are too many packets are available in the subnet at the particular time, they will get into one
another's way, forming bottlenecks.
• The network layer issue is the quality of service provided such as delay, transmit time, jitter, etc.
• When packet travel from one network to another to reach its destination, many problems can arise such
as:
o The addressing being used by two networks may be different from each other.
o It is necessary to have different protocols.
o 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.
o Logical A ddressing: 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.
o Internetworking: This is the main role of the network layer that it provides the logical connection
between different types of networks.
o Fragmentation: The fragmentation is a process of breaking the packets into the smallest individual data
units that travel through different networks.
1. Logical Addressing
• In the internet world, there are two kinds of addressing implemented by the data link layer, it handles
addressing problems locally.
• If the network passes through the network boundary, we need another system to distinguish source and
destination systems.
• The logical addressing at the network layer while physical addressing at the data link layer is defined by
the MAC address of a device, whereas the IP addressing is determined at the network layer of the OSI
model. This addressing is also called as logical addressing.
• The network layer adds a header to the packet which is coming from the upper layer includes the logical
addresses of the sender and receiver.
2. Routing
• When two independent networks or links are attached to create an internetwork that is the network of
networks or a large network, the connecting devices route the packets to its destination.
• The forwarding of the data request to servers is known as routing.
• The network layer must send data down to the data link layer for transmission. The data or information
that the network layer receives is in the form of a packet and the data that data link layer forwards is
called a frame.
• If I want to access some data from Facebook then I will open my laptop, type URL of Facebook and
send an HTTP request to facebook.com for some data.
• Since the server of Facebook is situated outside my local area network, my request is forwarded to
Facebook through the default gateway or router of my institution.
Virtual Circuit:
• An initial setup phase is used to set up a route between the intermediate nodes for all the packets passed
during the session between the two end nodes.
• In each intermediate node, an entry is registered in a table to indicate the route for the connection that
has been set up.
• Thus, packets passed through this route, can have short headers, containing only a virtual ci rcuit
identifier (VCI), and not their destination.
• Each intermediate node passes the packets according to the information that was stored in it, in the setup
phase.
• In this way, packets arrive at the destination in the correct sequence, and it is guaranteed that essentially
there will not be errors.
• This approach is slower than Circuit Switching, since different virtual circuits may compete over the
same resources, and an initial setup phase is needed to initiate the circuit. As in Circuit Switching, if an
intermediate node fails, all virtual circuits that pass through it are lost.
• The most common forms of Virtual Circuit networks are X.25 and Frame Relay, which are commonly
used for public data networks (PDN).
Virtual Circuit
Datagram:
This approach uses a different, more dynamic scheme, to determine the route through the network links. Each
packet is treated as an independent entity, and its header contains full information about the destination of the
packet. The intermediate nodes examine the header of the packet, and decide to which node to send the packet
so that it will reach its destination.
In this method, the packets don't follow a pre-established route, and the intermediate nodes (the routers) don't
have pre-defined knowledge of the routes that the packets should be passed through. Packets can follow
different routes to the destination, and delivery is not guaranteed . Due to the nature of this method, the packets
can reach the destination in a different order than they were sent, thus they must be sorted at the destination to
form the original message. This approach is time consuming since every router has to decide where to send each
packet. The main implementation of Datagram Switching network is the Internet, which uses the IP network
protocol.
Restriction
• To simplify the handling of addresses, the Internet authorities impose three restrictions on classless
address blocks:
1. The addresses in a block must be contiguous, one after another.
2. The number of addresses in a block must be a power of 2 (I, 2, 4, 8, ..)
3. The first address must be evenly divisible by the number of addresses.
1.4.1 Subnetting
1.4.2. Supernetting
• Supernetting means creating bigger network from smaller one
• Supernetting means decreasing networks bits(i.e. 1s) in subnet mask
• If network bit is decreased host bits will be increased, so number of host will be decreased
• A Class C network have 24 bits for network (28 IP address available) if you wanted bigger block IP
from class C decrease the network bits / increasing host bits
• Supernetting just opposite of subnetting
Address Translation : Replace outgoing packets Source IP address as NAT router public IP and replaces
incoming packet Destination IP with private (Private to public and public to private)
• Translation is done with help of translation table which consist of IP address of private range and
public range and port address
Below table showing Translation table in NAT
Packets in the IPv4 layer are called datagrams. A datagram is a variable-length packet consisting of two parts:
header and data. The header is 20 to 60 bytes in length and contains information essential to routing.
• Version ( VER): This 4-bit field defines the version of the IPv4 protocol. Currently, the version is 4.
However, version 6 (or IPng) may totally replace version 4 in the future.
• Header l ength ( HLEN): This 4-bit field defines the total length of the datagram header in 4-byte
words. This field is needed because the length of the header is variable (between 20 and 60 bytes).
• Services: IETF has changed the interpretation and name of this 8-bit field. This field, previously called
service type, is now called differentiated services.
• Total L ength: Length of header + Data (16 bits), which has a minimum value 20 bytes and the
maximum is 65,535 bytes
• Identification: Unique Packet Id for identifying the group of fragments of a single IP datagram (16 bits)
• Flags: 3 flags of 1 bit each: reserved bit (must be zero), do not fragment flag, more fragments flag (same
order)
• Time to live: Datagram’s lifetime (8 bits), It prevents the datagram to loop in the network
• Header Checksum: 16 bits header checksum for checking errors in the datagram header
• Option: Optional information such as source route. Due to the presence of options, the size of the
datagram header can be of variable length (20 bytes to 60 bytes).
Fragmentation
Data field of a large IP packet is fragmented.
The fragments are sent into a series of smaller IP packets fitting a network’s MTU.
Fragmentation is done by routers
Fragmentation may be done multiple times along the route.
If IP packet is longer than the MTU, the router breaks packet into smaller packets.
Called IP fragments.
Fragments are still IP packets.
IPv6 fixed header is 40 bytes long and contains the following information.
Traffic Class (8-bits): These 8 bits are divided into two parts. The most significant 6 bits are
2 used for Type of Service to let the Router Known what services should be provided to this
packet. The least significant 2 bits are used for Explicit Congestion Notification (ECN).
Flow L abel (20-bits): This label is used to maintain the sequential flow of the packets
3 belonging to a communication. The source labels the sequence to help the router identify that a
particular packet belongs to a specific flow of information. This field helps avoid re-ordering
of data packets. It is designed for streaming/real-time media.
Payload L ength (16-bits): This field is used to tell the routers how much information a
particular packet contains in its payload. Payload is composed of Extension Headers and
4 Upper Layer data. With 16 bits, up to 65535 bytes can be indicated; but if the Extension
Headers contain Hop-by-Hop Extension Header, then the payload may exceed 65535 bytes
and this field is set to 0.
Next Header (8-bits): This field is used to indicate either the type of Extension Header, or if
5 the Extension Header is not present then it indicates the Upper Layer PDU. The values for the
type of Upper Layer PDU are same as IPv4’s.
Hop Limit (8-bits): This field is used to stop packet to loop in the network infinitely. This is
6 same as TTL in IPv4. The value of Hop Limit field is decremented by 1 as it passes a link
(router/hop). When the field reaches 0 the packet is discarded.
7 Source Address (128-bits): This field indicates the address of originator of the packet.
8 Destination A ddress (128-bits): This field provides the address of intended recipient of the
packet.
Address Structure
An IPv6 address is made of 128 bits divided into eight 16-bits blocks. Each block is then converted into 4-digit
Hexadecimal numbers separated by colon symbols.
For example, given below is a 128 bit IPv6 address represented in binary format and divided into eight 16-bits
blocks:
0010000000000001 0000000000000000 0011001000111000 1101111111100001 0000000001100011 0000000000000000
0000000000000000 1111111011111011
Each block is then converted into Hexadecimal and separated by ‘:’ symbol:
2001:0000:3238:DFE1:0063:0000:0000:FEFB
Even after converting into Hexadecimal format, IPv6 address remains long. IPv6 provides some rules to
shorten the address. The rules are as follows:
Rule.1: Discard leading Zero(es):
In Block 5, 0063, the leading two 0s can be omitted, such as (5th block):
2001:0000:3238:DFE1:63:0000:0000:FEFB
Rule.2: If two of more blocks contain consecutive zeroes, omit them all and replace with double colon sign ::,
such as (6th and 7th block):
2001:0000:3238:DFE1:63::FEFB
Consecutive blocks of zeroes can be replaced only on ce by : : so if there are still blocks of zeroes in the
address, they can be shrunk down to a single zero, such as (2nd block):
2001:0:3238:DFE1:63::FEFB
Tunneling
Er. Sital Pd Mandal (https://computernetwork-mmc.blogspot.com) Page 101
“BE CURIOUS, NOT JUDGMENTAL.” - An up thrust for own knowledge
UNIT 4: NETWORK LAYER
Answer own Innovation, Creativity & Tinkering.
In a scenario where different IP versions exist on intermediate path or transit networks, tunneling provides a
better solution where user’s data can pass through a non-supported IP version.
Routing algorithm
o In order to transfer the packets from source to the destination, the network layer must determine the best
route through which packets can be transmitted.
o Whether the network layer provides datagram service or virtual circuit service, the main job of the
network layer is to provide the best route. The routing protocol provides this job.
o The routing protocol is a routing algorithm that provides the best path from the source to the destination.
The best path is the path that has the "least-cost path" from source to the destination.
o Routing is the process of forwarding the packets from source to the destination but the best route to send
the packets is determined by the routing algorithm.
o Centralized al gorithm: It is also known as global routing algorithm as it computes the least-cost path
between source and destination by using complete and global knowledge about the network. This
algorithm takes the connectivity between the nodes and link cost as input, and this information is
obtained before actually performing any calculation. Link state algorithm is referred to as a centralized
algorithm since it is aware of the cost of each link in the network.
o Isolation al gorithm: It is an algorithm that obtains the routing information by using local information
rather than gathering information from other nodes.
o Distributed al gorithm: It is also known as decentralized algorithm as it computes the least-cost path
between source and destination in an iterative and distributed manner. In the decentralized algorithm, no
node has the knowledge about the cost of all the network links. In the beginning, a node contains the
information only about its own directly attached links and through an iterative process of calculation
computes the least-cost path to the destination. A Distance vector algorithm is a decentralized algorithm
as it never knows the complete path from source to the destination, instead it knows the direction
through which the packet is to be forwarded along with the least cost path.
Flooding: In case of flooding, every incoming packet is sent to all the outgoing links except the one from it has
been reached. The disadvantage of flooding is that node may contain several copies of a particular packet.
Random w alks: In case of random walks, a packet sent by the node to one of its neighbors randomly. An
advantage of using random walks is that it uses the alternative routes very efficiently.
Routing Routing decisions are made based on Routing decisions are the static
decision topology and network traffic. tables.
Categorization The types of adaptive routing The types of Non Adaptive routing
algorithm, are Centralized, isolation algorithm are flooding and random
and distributed algorithm. walks.
1. A router transmits its distance vector to each of its neighbors in a routing packet.
2. Each router receives and saves the most recently received distance vector from each of its neighbors.
3. A router recalculates its distance vector when:
• It receives a distance vector from a neighbor containing different information than before.
• It discovers that a link to a neighbor has gone down.
The DV calculation is based on minimizing the cost to each destination
Dx(y) = Estimate of least cost from x to y
C(x,v) = Node x knows cost to each neighbor v
Dx = [Dx(y): y ∈ N ] = Node x maintains distance vector
Node x also maintains its neighbors' distance vectors
– For each neighbor v, x maintains Dv = [Dv(y): y ∈ N ]
Note – Distance Vector routing uses UDP(User datagram protocol) for transportation.
Example – Consider 3-routers X, Y and Z as shown in figure. Each router have their routing table.
Every routing table will contain distance to the destination nodes.
Link state routing is a technique in which each router shares the knowledge of its neighborhood with every
other router in the internetwork.
o Knowledge ab out t he ne ighborhood: Instead of sending its routing table, a router sends the
information about its neighborhood only. A router broadcast its identities and cost of the directly
attached links to other routers.
o Flooding: Each router sends the information to every other router on the internetwork except its
neighbors. This process is known as Flooding. Every router that receives the packet sends the copies
to all its neighbors. Finally, each and every router receives a copy of the same information.
o Information s haring: A router sends the information to every other router only when the change
occurs in the information.
Link state routing is the second family of routing protocols. While distance vector routers use a distributed
algorithm to compute their routing tables, link-state routing uses link-state routers to exchange messages that
allow each router to learn the entire network topology. Based on this learned topology, each router is then able
to compute its routing table by using a shortest path computation.
Disadvantage:
Heavy traffic is created in Line state routing due to Flooding. Flooding can cause an infinite looping, this
problem can be solved by using Time-to-leave field
o Each device on the network is recognized by the MAC address imprinted on the NIC. Therefore, we can
say that devices need the MAC address for communication on a local area network. MAC address can
be changed easily. For example, if the NIC on a particular machine fails, the MAC address changes but
IP address does not change. ARP is used to find the MAC address of the node when an internet address
is known.
o Dynamic entry: It is an entry which is created automatically when the sender broadcast its message to
the entire network. Dynamic entries are not permanent, and they are removed periodically.
o Static entry: It is an entry where someone manually enters the IP to MAC address association by using
the ARP command utility.
o If the host wants to know its IP address, then it broadcast the RARP query packet that contains its
physical address to the entire network.
o A RARP server on the network recognizes the RARP packet and responds back with the host IP address.
o The protocol which is used to obtain the IP address from a server is known as Reverse A ddress
Resolution Protocol.
o The message format of the RARP protocol is similar to the ARP protocol.
o Like ARP frame, RARP frame is sent from one machine to another encapsulated in the data portion of a
frame.
• LAN t echnologies l ike E thernet, E thernet I I, Token R ing an d F iber D istributed D ata I nterface
(FDDI) support the Address Resolution Protocol.
• RARP i s n ot be ing u sed i n t oday’s n etworks. Because w e h ave m uch gr eat f eatured pr otocols l ike
BOOTP (Bootstrap Protocol) and DHCP( Dynamic Host Configuration Protocol).
o The ICMP is a network layer protocol used by hosts and routers to send the notifications of IP datagram
problems back to the sender.
o ICMP uses echo test/reply to check whether the destination is reachable and responding.
o ICMP handles both control and error messages, but its main function is to report the error but not to
correct them.
o An IP datagram contains the addresses of both source and destination, but it does not know the address
of the previous router through which it has been passed. Due to this reason, ICMP can only send the
messages to the source, but not to the immediate routers.
o ICMP protocol communicates the error messages to the sender. ICMP messages cause the errors to be
returned back to the user processes.
o Destination u nreachable: The message of "Destination Unreachable" is sent from receiver to the
sender when destination cannot be reached, or packet is discarded when the destination is not reachable.
o Source Q uench: The purpose of the source quench message is congestion control. The message sent
from the congested router to the source host to reduce the transmission rate. ICMP will take the IP of the
discarded packet and then add the source quench message to the IP datagram to inform the source host
to reduce its transmission rate. The source host will reduce the transmission rate so that the router will
be free from congestion.
o Time E xceeded: Time Exceeded is also known as "Time-To-Live". It is a parameter that defines how
long a packet should live before it would be discarded.
There are two ways when Time Exceeded message can be generated:
o Parameter problems: When a router or host discovers any missing value in the IP
datagram, the router discards the datagram, and the "parameter problem" message is sent
back to the source host.
o Redirection: Redirection message is generated when host consists of a small routing
table. When the host consists of a limited number of entries due to which it sends the
datagram to a wrong router. The router that receives a datagram will forward a datagram
to a correct router and also sends the "Redirection message" to the host to update its
routing table.
The protocol can connect together any internetwork of autonomous system using an arbitrary topology.
Route Selection
• For 2 or more routes to the same prefix, the following elimination-rules are invoked sequentially:
1) Routes are assigned a local preference value as one of their attributes.
2) The local preference of a route
→ will be set by the router or
→ will be learned by another router in the same AS.
3) From the remaining routes, the route with the shortest AS-PATH is selected.
4) From the remaining routes, the route with the closest NEXT-HOP router is selected.
5) If more than one route still remains, the router uses BGP identifiers to select the route.
Routing Policy
• Routing policy is illustrated as shown in Figure 3.30.
• Let A, B, C, W, X & Y = six interconnected autonomous-systems.
W, X & Y = three stub-networks.
A, B & C = three backbone provider networks.
• All traffic entering a stub-network must be destined for that network.
All traffic leaving a stub-network must have originated in that network.
• Clearly, W and Y are stub-networks.
• X is a multihomed stub-network, since X is connected to the rest of the n/w via 2 different providers
• X itself must be the source/destination of all traffic leaving/entering X.
• X will function as a stub-network if X has no paths to other destinations except itself.
• There are currently no official standards that govern how backbone ISPs route among themselves.
Unicast
In unicast mode of addressing, an IPv6 interface (host) is uniquely identified in a network segment. The IPv6
packet contains both source and destination IP addresses. A host interface is equipped with an IP address
which is unique in that network segment.When a network switch or a router receives a unicast IP packet,
destined to a single host, it sends out one of its outgoing interface which connects to that particular host.
Multicast
The IPv6 multicast mode is same as that of IPv4. The packet destined to multiple hosts is sent on a special
multicast address. All the hosts interested in that multicast information, need to join that multicast group first.
All the interfaces that joined the group receive the multicast packet and process it, while other hosts not
interested in multicast packets ignore the multicast information. Hence the r outer j ust h as t o l ook u p t he
routing table and forward the packet to next hop.
Anycast
IPv6 has introduced a new type of addressing, which is called Anycast addressing. In this addressing mode,
multiple interfaces (hosts) are assigned same Anycast IP address. When a host wishes to communicate with a
host equipped with an Anycast IP address, it sends a Unicast message. With the help of complex routing
mechanism, that Unicast message is delivered to the host closest to the Sender in terms of Routing cost.
Let’s take an example of Tu.edu.np Web Servers, located in all continents. Assume that all the Web Servers
are assigned a single IPv6 Anycast IP Address. Now when a user from Europe wants to reach Tu.edu.np the
DNS points to the server that is physically located in Europe itself. If a user from Nepal tries to reach
Tu.edu.np, the DNS will then point to the Web Server physically located in Asia. Nearest or Closest terms are
used in terms of Routing Cost.
In the above picture, when a client computer tries to reach a server, the request is forwarded to the server with
the lowest Routing Cost.
Broadcast Routing
By default, the broadcast packets are not routed and forwarded by the routers on any network. Routers create
broadcast domains. But it can be configured to forward broadcasts in some special cases. A broadcast message
is destined to all network devices. Flooding is simplest method packet forwarding.
Broadcast routing can be done in two ways (algorithm):
• A router creates a data packet and then sends it to each host one by one. In this case, the router creates
multiple copies of single data packet with different destination addresses. All packets are sent as unicast
but because they are sent to all, it simulates as if router is broadcasting.
This method consumes lots of bandwidth and router must destination address of each node.
• Secondly, when router receives a packet that is to be broadcasted, it simply floods those packets out of
all interfaces. All routers are configured in the same way.
This method is easy on router's CPU but may cause the problem of duplicate packets received from peer
routers.
Reverse path forwarding is a technique, in which router knows in advance about its predecessor from where it
should receive broadcast. This technique is used to detect and discard duplicates.
Read M e Fir st (3 times) Assumes Basic K ey T er ms while wr iting your unit 3 answer .
Address Resolution Protocol data link control (DLC) media access control (MAC) block coding
(ARP)
burst error check bit checksum codeword
cyclic code cyclic redundancy check (CRC) dataword forward error correction (FEC)
generator polynomial minimum Hamming distance parity-check code single-bit error
bit stuffing byte stuffing Challenge Handshake Protocol (CHAP)
Authentication
data link control (DLC) finite state machine (FSM) Internet Protocol Control Protocol Link Control Protocol (LCP)
(IPCP)
Password Authentication Protocol piggybacking sequence number 1-persistent method
(PAP)
ALOHA carrier sense multiple access with avoidance (CSMA/CA) carrier sense multiple access
collision with collision
detection (CSMA/CD) code-division multiple access contention window controlled access
(CDMA)
DCF interframe space (DIFS) frequency-division multiple (FDMA) interface space (IFS)
access
jamming signal media access control (MAC) multiple access (MA) nonpersistent method
p-persistent method polling primary station propagation time
pure ALOHA random access secondary station slotted ALOHA
time-division multiple access token passing vulnerable time frame bursting
(TDMA)
full-duplex switched Ethernet logical link control (LLC) media access control (MAC) network interface card (NIC)
Standard Ethernet direct sequence spread spectrum distributed coordination function distributed interframe space
(DSSS) (DCF) (DIFS)
extended service set (ESS) frequency-hopping spread high-rate direct-sequence spread (HR-DSSS)
spectrum (FHSS) spectrum
Parts of a Frame
• Frame Header − It contains the source and the destination addresses of the frame.
• Payload field − It contains the message to be delivered.
• Trailer − It contains the error detection and error correction bits.
• Flag − It marks the beginning and end of the frame.
Destination Service Access Point (DSAP) -- IEEE 802.2 header begins with a 1 byte field, which identifies the
receiving upper-layer process.
Source Service Access Point (SSAP) -- Following the DSAP address is the 1-byte address, which identifies the
sending upper-layer process. Control -- The Control field employs three different formats, depending on the
type of LLC frame used:
• Information (I) frame -- Carries upper-layer information and some control information.
• Supervisory (S) f rame -- Provides control information. An S frame can request and suspend
transmission, reports on status, and acknowledge receipt of I frames. S frames do not have an
Information field.
• Unnumbered (U) frame -- Used for control purposes and is not sequenced. A U frame can be used to
initialize secondaries. Depending on the function of the U frame, its Control field is 1 or 2 bytes. Some
U frames have an Information field.
Data -- Variable-length field bounded by the MAC format implemented. Usually contains IEEE 802.2
Subnetwork Access Protocol (SNAP) header information, as well as application-specific data.
Problems in Framing –
1. Fixed size – The frame is of fixed size and there is no need to provide boundaries to the frame, length of the
frame itself acts as delimiter.
Drawback: It suffers from internal fragmentation if data size is less than frame size
Solution: Padding
2. Variable size – In this there is need to define end of frame as well as beginning of next frame to distinguish.
Length f ield – We can introduce a length field in the frame to indicate the length of the frame. Used in
Ethernet(802.3). The problem with this is that sometimes the length field might get corrupted.
End Delimeter (ED) – We can introduce an ED(pattern) to indicate the end of the frame. Used in Token Ring.
The problem with this is that ED can occur in the data. This can be solved by:
1. Byte (character) – Stuffing − A byte is stuffed in the message to differentiate from the delimiter. This
is also called character-oriented framing.
The following figure shows an example of communication using this protocol. It is very simple. The sender
sends a sequence of frames without even thinking about the receiver. To send three frames, three events occur at
the sender site and three events at the receiver site. Note that the data frames are shown by tilted boxes; the
height of the box defines the transmission time difference between the first bit and the last bit in the frame.
Go-Back-N ARQ
• Pipelining improves the efficiency of the transmission
• In the Go-Back-N Protocol, the sequence numbers are modulo 2m, where m is the size of the sequence
number field in bits
• The send window is an abstract concept defining an imaginary box of size 2m− 1 with three variables:
Sf, Sn, and S size
• The send window can slide one or more slots when a valid acknowledgment arrives
Example-1
Design
We can now show why the size of the sender and receiver windows must be at most one half of 2m. For an
example, we choose m = 2, which means the size of the window is 2m/2, or 2. The following figure compares a
window size of 2 with a window size of 3.
Example:
Piggybacking Protocol
• To improve the efficiency of the bidirectional protocols.
• Piggybacking in Go-Back-N ARQ
Error Control-
When bits are transmitted over the computer network, they are subject to get corrupted due to interference and
network problems. The corrupted bits leads to spurious data being received by the receiver and are called
errors.
Error detection techniques are responsible for checking whether any error has occurred or not in the frame that
has been transmitted via network. It does not take into account the number of error bits and the type of error.
When s ender t ransmits d ata to t he receiver, t he d ata might g et s crambled b y noise o r d ata might ge t
corrupted during the transmission.
Single-Bit Error:
The only one bit of a given data unit is changed from 1 to 0 or from 0 to 1.
Burst Error:
The two or more bits are changed from 0 to 1 or from 1 to 0 is known as Burst Error.
The Burst Error is determined from the first corrupted bit to the last corrupted bit.
(Shortly Concept)
This scheme makes the total number of 1’s even, that is why it is called even parity checking.
2. Checksum
• In checksum error detection scheme, the data is divided into k segments each of m bits.
• In the sender’s end the segments are added using 1’s complement arithmetic to get the sum. The sum is
complemented to get the checksum.
• The checksum segment is sent along with the data segments.
• At the receiver’s end, all received segments are added using 1’s complement arithmetic to get the sum.
The sum is complemented.
• If the result is zero, the received data is accepted; otherwise discarded.
At Receiver Side-
Er. Sital Pd Mandal (https://computernetwork-mmc.blogspot.com) Page 144
“BE CURIOUS, NOT JUDGMENTAL.” - An up thrust for own knowledge
UNIT 3: DATALINK LAYER
Answer own Innovation, Creativity & Tinkering.
• After receiving the code word, total number of 1’s in the code word is counted.
• Consider receiver receives the correct code word = 10010011.
• Even parity is used and total number of 1’s is even.
• So, receiver assumes that no error occurred in the data during the transmission.
Advantage-
• This technique is guaranteed to detect an odd number of bit errors (one, three, five and so on).
• If odd number of bits flip during transmission, then receiver can detect by counting the number of 1’s.
Limitation-
• This technique can not detect an even number of bit errors (two, four, six and so on).
• If even number of bits flip during transmission, then receiver can not catch the error.
Example-
Consider the CRC generator is x7 + x6 + x4 + x3 + x + 1.
The corresponding binary pattern is obtained as-
Thus, for the given CRC generator, the corresponding binary pattern is 11011011.
Properties Of CRC Generator-
The algebraic polynomial chosen as a CRC generator should have at least the following properties-
Rule-01:
• It should not be divisible by x.
• This condition guarantees that all the burst errors of length equal to the length of polynomial are
detected.
Rule-02:
• It should be divisible by x+1.
• This condition guarantees that all the burst errors affecting an odd number of bits are detected.
Important Notes-
If the CRC generator is chosen according to the above rules, then-
• CRC can detect all single-bit errors
Illustration:
Example 1 (No error in transmission):
Er. Sital Pd Mandal (https://computernetwork-mmc.blogspot.com) Page 146
“BE CURIOUS, NOT JUDGMENTAL.” - An up thrust for own knowledge
UNIT 3: DATALINK LAYER
Answer own Innovation, Creativity & Tinkering.
Data word to be sent - 100100
Key - 1101 [ Or generator polynomial x3 + x2 + 1]
Sender Side:
Sender Side:
Now,
• The code word to be transmitted is obtained by replacing the last 4 zeroes of 11010110110000 with the
CRC.
• Thus, the code word transmitted to the receiver = 11010110111110.
Problem-02:
A bit stream 10011101 is transmitted using the standard CRC method. The generator polynomial is x3+1.
Er. Sital Pd Mandal (https://computernetwork-mmc.blogspot.com) Page 149
“BE CURIOUS, NOT JUDGMENTAL.” - An up thrust for own knowledge
UNIT 3: DATALINK LAYER
Answer own Innovation, Creativity & Tinkering.
1. What is the actual bit string transmitted?
2. Suppose the third bit from the left is inverted during transmission. How will receiver detect this error?
Solution-
Part-01:
• The generator polynomial G(x) = x3 + 1 is encoded as 1001.
• Clearly, the generator polynomial consists of 4 bits.
• So, a string of 3 zeroes is appended to the bit stream to be transmitted.
• The resulting bit stream is 10011101000.
Now, the binary division is performed as-
Now,
• The code word to be transmitted is obtained by replacing the last 3 zeroes of 10011101000 with the
CRC.
• Thus, the code word transmitted to the receiver = 10011101100.
Part-02:
According to the question,
From here,
Example: Suppose the original data is 11100 and divisor is 1001 CRC.
Solution
o A CRC generator uses a modulo-2 division. Firstly, three zeroes are appended at the end of the data as
the length of the divisor is 4 and we know that the length of the string 0s to be appended is always one
less than the length of the divisor.
Sender Receiver
Checksum
A Checksum is an error detection technique based on the concept of redundancy.
Step-02:
• The data along with the checksum value is transmitted to the receiver.
Step-03:
At receiver side,
• If m bit checksum is being used, the received data unit is divided into segments of m bits.
• All the m bit segments are added along with the checksum value.
• The value so obtained is complemented and the result is checked.
Case-01: Result = 0
Case-02: Result ≠ 0
• Receiver assumes that error occurred in the data during the transmission.
• Receiver discards the data and asks the sender for retransmission.
Checksum Example-
Step-01:
At sender side,
The given data unit is divided into segments of 8 bits as-
Now, all the segments are added and the result is obtained as-
• 10011001 + 11100010 + 00100100 + 10000100 = 1000100011
• Since the result consists of 10 bits, so extra 2 bits are wrapped around.
• 00100011 + 10 = 00100101 (8 bits)
• Now, 1’s complement is taken which is 11011010.
• Thus, checksum value = 11011010
Step-02:
• The data along with the checksum value is transmitted to the receiver.
Step-03:
At receiver side,
• The received data unit is divided into segments of 8 bits.
• All the segments along with the checksum value are added.
• Sum of all segments + Checksum value = 00100101 + 11011010 = 11111111
• Complemented value = 00000000
• Since the result is 0, receiver assumes no error occurred in the data and therefore accepts it.
Example 2:
Suppose that the sender wants to send 4 frames each of 8 bits, where the frames are 11001100, 10101010,
11110000 and 11000011.
The sender adds the bits using 1s complement arithmetic. While adding two numbers using 1s complement
arithmetic, if there is a carry over, it is added to the sum.
After adding all the 4 frames, the sender complements the sum to get the checksum, 11010011, and sends it
along with the data frames.
The receiver performs 1s complement arithmetic sum of all the frames including the checksum. The result is
complemented and found to be 0. Hence, the receiver assumes that no error has occurred.
Example 3:
Error-Detecting codes
Whenever a message is transmitted, it may get scrambled by noise or data may get corrupted. To avoid this, we
use error-detecting codes which are additional data added to a given digital message to help us detect if an
error occurred during transmission of the message. A simple example of error-detecting code is parity check.
Error-Correcting codes
Along with error-detecting code, we can also pass some data to figure out the original message from the
corrupt message that we received. This type of code is called an error-correcting code. Error-correcting codes
also deploy the same strategy as error-detecting codes but additionally, such codes also detect the exact
location of the corrupt bit.
In error-correcting codes, parity check has a simple way to detect errors along with a sophisticated mechanism
to determine the corrupt bit location. Once the corrupt bit is located, its value is reverted (from 0 to 1 or 1 to 0)
to get the original message.
Even parity -- Even parity means the number of 1's in the given word including the parity bit should be even
(2,4,6,....).
Odd par ity -- Odd parity means the number of 1's in the given word including the parity bit should be odd
(1,3,5,....).
More research
https://computernetwork-mmc.blogspot.com/2020/04/error-correction-hamming-code-in_15.html
Hamming Code
Parity bits: The bit which is appended to the original data of binary bits so that the
total number of 1s is even or odd.
Even parity: To check for even parity, if the total number of 1s is even, then the value
of the parity bit is 0. If the total number of 1s occurrences is odd, then the value of the
parity bit is 1.
Odd Parity: To check for odd parity, if the total number of 1s is even, then the value of
parity bit is 1. If the total number of 1s is odd, then the value of parity bit is 0.
General Algorithm of Hamming code –
The Hamming Code is simply the use of extra parity bits to allow the identification of an error.
1. Write the bit positions starting from 1 in binary form (1, 10, 11, 100, etc).
2. All the bit positions that are a power of 2 are marked as parity bits (1, 2, 4, 8, etc).
3. All the other bit positions are marked as data bits.
4. Each data bit is included in a unique set of parity bits, as determined its bit position in binary form.
a. Parity bit 1 covers all the bits positions whose binary representation includes a 1 in the least significant
position (1, 3, 5, 7, 9, 11, etc).
b. Parity bit 2 covers all the bits positions whose binary representation includes a 1 in the second position
from the least significant bit (2, 3, 6, 7, 10, 11, etc).
c. Parity bit 4 covers all the bits positions whose binary representation includes a 1 in the third position
from the least significant bit (4–7, 12–15, 20–23, etc).
d. Parity bit 8 covers all the bits positions whose binary representation includes a 1 in the fourth position
from the least significant bit bits (8–15, 24–31, 40–47, etc).
e. In general, each parity bit covers all bits where the bitwise AND of the parity position and the bit
position is non-zero.
5. Since we check for even parity set a parity bit to 1 if the total number of ones in the positions it checks is
odd.
6. Set a parity bit to 0 if the total number of ones in the positions it checks is even.
Determining the position of redundant bits – (problem in Class notes)
These redundancy bits are placed at the positions which correspond to the power of 2.
As in the above example:
Suppose the data to be transmitted is 1011001, the bits will be placed as follows:
R4: bits 4, 5, 6, 7
1's is odd the value of R4(parity bit’s value) = 1
The bits give the binary number as 0110 whose decimal representation is 6. Thus, the bit 6 contains
an error. To correct the error the 6th bit is changed from 1 to 0.
HDLC provides two common transfer modes that can be used in different configurations: normal response
mode (NRM) and asynchronous balanced mode (ABM).
Normal Response Mode:
Here, two types of stations are there, a primary station that send commands and secondary station that can
respond to received commands. It is used for both point - to - point and multipoint communications.
P/F= Poll/Final
2. S-frame − S-frames or Supervisory frames do not contain information field. They are used for flow and
error control when piggybacking is not required. The first two bits of control field of S-frame is 10.
• Flag − marks the beginning and the end of the frame. The bit pattern of the flag is 01111110.
• Address – it is set to 11111111 in case of broadcast.
• Control − set to a constant value of 11000000.( No need bec ause P PP has no flow co ntrol
and limited error control)
• Protocol − 1 or 2 bytes that define the type of data contained in the payload field.
• Payload − This carries the data from the network layer. T he maximum length of the payload
field is 1500 bytes. However, this may be negotiated between the endpoints of communication.
• FCS − It is a 2 byte or 4 bytes frame check sequence for error detection. The standard code
used is CRC (cyclic redundancy code)
PPP is a byte-oriented protocol using byte stuffing with the escape byte 01111101
T(FDM) = N*T(1/U(C/N)-L/N)
Where,
T = mean time delay,
C = capacity of channel,
L = arrival rate of frames,
1/U = bits/frame,
N = number of sub channels,
T(FDM) = Frequency Division Multiplexing Time
• In this allocation scheme, there is no interference between the users since each user is assigned a fixed
channel. However, it is not suitable in case of a large number of users with variable bandwidth
requirements.
3. Collision Assumption:
If two frames overlap in time-wise, then that’s collision. Any collision is an error, and both frames must
re transmitted. Collisions are only possible error.
4. Time can be divided into Slotted or Continuous.
5. Stations can sense a channel is busy before they try it.
Multiple Access:
1. Radom Access(ALOHA, CSMA,
CSMN CD, CSMA/CA),
3.6 2. Controlled Access(Reservation, 1
Polling, Token Passing),
3. Channelization(FDMA, TOMA,
CDMA)
Media Access(Multiple Access)
• In random access or contention methods, no station is superior to another station and none is assigned the
control over another
• No station permits, or does not permit, another station to send(Randomly send if medium is free)
1. Pure Aloha
• In pure ALOHA, the stations simply transmit frames whenever they want data to send.
• It does not check whether the channel is busy or not before transmitting.
• In case, two or more stations transmit simultaneously, the collision occurs and frames are destroyed.
• Whenever any station transmits a frame, it expects the acknowledgment from the receiver. If it is not
received within a specified time, the station assumes that the frame or acknowledgment has been
destroyed.
• Then, the station waits for a random amount of time and sends the frame again.
• This scheme works well in small networks where the load is not much.
• To assure pure aloha: Its throughput and rate of transmission of the frame to be predicted.
Figure 4-1. In pure ALOHA, frames are transmitted at completely arbitrary times.
Overlapping frames in the pure ALOHA protocol. Frame-time is equal to 1 for all frames.
Vulnerable Time = 2 * Tt
Efficiency of Pure ALOHA:
Spure= G * e^-2G
where G is number of stations wants to transmit in Tt slot.
Maximum Efficiency:
Maximum Efficiency will be obtained when G=1/2
Which means, in Pure ALOHA, only about 18.4% of the time is used for
successful transmissions.
Collision is possible for only the current slot. Therefore, Vulnerable Time is Tt.
Maximum Efficiency:
(Sslotted)max = 1 * e^-1
= 1/e = 0.368
Maximum Efficiency, in Slotted ALOHA, is 36.8%.
Pros (advantage)
• single active node can continuously transmit at full rate of channel
• simple
Cons (disadvantage)
• collisions, wasting slots
• idle slots
• nodes may be able to detect collision in less than time to transmit packet
• clock synchronization
This method was developed to decrease the chances of collisions when two or more stations start
sending their signals over the datalink layer. Carrier Sense multiple access requires that each
station first check the state of the medium before sending.
Er. Sital Pd Mandal (https://computernetwork-mmc.blogspot.com) Page 173
“BE CURIOUS, NOT JUDGMENTAL.” - An up thrust for own knowledge
UNIT 3: DATALINK LAYER
Answer own Innovation, Creativity & Tinkering.
Vulnerable Time –
Vulnerable time = Propagation time (Tp)
Carrier Sense Multiple Access (CSMA) is a probabilistic Media Access Control (MAC) protocol in which a
node verifies the absence of other traffic before transmitting on a shared transmission medium, such as an
electrical bus, or a band of the electromagnetic spectrum.
"Carrier Sense" describes the fact that a transmitter uses feedback from a receiver that detects a carrier wave
before trying to send. That is, it tries to detect the presence of an encoded signal from another station before
attempting to transmit. If a carrier is sensed, the station waits for the transmission in progress to finish before
initiating its own transmission.
"Multiple Access" describes the fact that multiple stations send and receive on the medium. Transmissions by
one node are generally received by all other stations using the medium.
The persistence methods can be applied to help the station take action when the channel is busy/idle.
ADVANTAGES
Fairly simple to implement
DISADVANTAGES
Cannot recover from a collision (inefficient waste of medium time)
In CSMA/CD Channel can be in one of the three states: contention, transmission, and idle.
In the diagram, A starts send the first bit of its frame at t 1 and since C sees the channel idle at t2,
starts sending its frame at t2. C detects A’s frame at t3 and aborts transmission. A detects C’s frame
at t 4 a nd aborts its t ransmission. Transmission t ime for C ’s frame i s therefore t3 – t2 and f or A’s
frame is t4- t1.
So, the frame transmission time (Tfr) should be at least twice the maximum propagation time
(Tp). This can be deduced when the two stations involved in collision are maximum distance apart.
Process –
The entire process of collision detection can be explained as follows:
Er. Sital Pd Mandal (https://computernetwork-mmc.blogspot.com) Page 175
“BE CURIOUS, NOT JUDGMENTAL.” - An up thrust for own knowledge
UNIT 3: DATALINK LAYER
Answer own Innovation, Creativity & Tinkering.
Throughput and Efficiency – The t hroughput o f C SMA/CD i s much greater t han pur e or sl otted
ALOHA.
• For 1-persistent method throughput is 50% when G=1.
• For non-persistent method throughput can go upto 90%.
JAM SIGNAL
The jam signal is a signal that carries a 32-bit binary pattern sent by a data station to inform the
other stations that they must not transmit.
ADVANTAGES
DISADVANTAGES
The basic idea behind CSMA/CA is that the station should be able to receive while transmitting to detect a
collision from different stations. In wired networks, if a collision has occurred then the energy of received
signal almost doubles and the station can sense the possibility of collision. In case of wireless networks, most of
the energy is used for transmission and the energy of received signal increases by only 5-10% if collision
occurs. It can’t be used by station to sense collision. Therefore CSMA/CA has been specially designed for
wireless networks.
These are three type of strategies:
1. InterFrame Space (IFS) – When a station finds the channel busy, it waits for a period of time called
IFS time. IFS can also be used to define the priority of a station or a frame. Higher the IFS lower is the
priority.
2. Contention Window – It is the amount of time divided into slots.A station which is ready to send frames
chooses random number of slots as wait time.
3. Acknowledgements – The positive acknowledgements and time-out timer can help guarantee a
successful transmission of the frame.
Process –
The entire process for collision avoidance can be explained as follows:
4. CSMA / CD resend the data frame Whereas CSMA / CA will first transmit the
whenever a conflict occurs. intent to send for data transmission.
CONTROLLED ACCESS
In controlled access, the stations consults each other to find which station has right to send.
Controlled access protocols grants permission to send only one node at a time, to avoid collision of
messages on the shared medium.
In the reservation method, a station needs to make a reservation before sending data.
Time is divided into intervals.
In each interval, a reservation frame precedes the data frames sent in that interval
If there are N stations in the system, there are exactly N reservation mini slots in the reservation
frame.
Each mini slot belongs to a station. When a station needs to send a data frame, it makes a reservation
in its own mini slot.
The stations that have made reservations can send their data frames after the reservation frame a
situation with five stations and a five minislot reservation frame.
a situation with five stations and a five minislot reservation frame.
• In the reservation method, a station needs to make a reservation before sending data.
• The time line has two kinds of periods:
1. Reservation interval of fixed time length
2. Data transmission period of variable frames.
• If there are M stations, the reservation interval is divided into M slots, and each station has one
slot.
• Suppose if station 1 has a frame to send, it transmits 1 bit during the slot 1. No other station is
allowed to transmit during this slot.
• In general, i th station may announce that it has a frame to send by inserting a 1 bit into i th slot.
After all N slots have been checked, each station knows which stations wish to transmit.
• The stations which have reserved their slots transfer their frames in that order.
• After data transmission period, next reservation interval begins.
• Since everyone agrees on who goes next, there will never be any collisions.
2.POLLING
To impose order on a network of independent users and to establish one station in the network as a
controller that periodically polls all other stations which is called Polling.
Exchange of data must be made through the primary device even though the final destination is secondary.
• Polling process is similar to the roll-call performed in class. Just like the teacher, a controller
sends a message to each node in turn.
• In this, one acts as a primary station(controller) and the others are secondary stations. All data
exchanges must be made through the controller.
• The message sent by the controller contains the address of the node being selected for
granting access.
• Although all nodes receive the message but the addressed one responds to it and sends data,
if any. If there is no data, usually a “poll reject”(NAK) message is sent back.
• Problems include high overhead of the polling messages and high dependence on the reliability
of the controller.
Efficiency
Let Tpoll be the time for polling and Tt be the time required for transmission of data. Then,
Efficiency = Tt/(Tt + Tpoll)
SELECT FUNCTION:
Whenever primary has something to send, it sends the message to each node.
While sending, the primary should know whether the target device is ready to receive or not.
Hence, it alerts the secondary for the upcoming transmission and wait for an acknowledgement (ACK) of
secondary’s status.
POLL FUNCTION:
When the primary is ready to receive data, it must ask (poll) each device if it has anything to send.
If the secondary has data to transmit, it sends the data frame. Otherwise, it sends a negative
acknowledgement(NAK) .
The primary then polls the next secondary. When the response is positive (a data frame), the primary reads
the frame and returns an acknowledgment (ACK).
There are two possibilities to terminate the transmission: either the secondary sends all data, finishing with
an EOT frame, or the primary says timer is up.
3.TOKEN PASSING
A Station is authorized to send data when it receives a special frame called a Token.
The Station captures the token and sends one or more frames as long as the allocated time has not expired
o Listen state: Listen to the arriving bits and check the destination address to see if it is its own address. If yes
the frame is copied to the station otherwise it is passed through the output port to the next station.
o Transmit state: station captures a special frame called free token and transmits its frames. Sending station
is responsible for reinserting the free token into the ring medium and for removing the transmitted frame
from the medium.
Performance
Performance of token ring can be concluded by 2 parameters:-
1. Delay, which is a measure of time between when a packet is ready and when it is delivered.So,
the average time (delay) required to send a token to the next station = a/N.
2. Throughput, which is a measure of the successful traffic.
Throughput, S = 1/(1 + a/N) for a<1
and
S = 1/{a(1 + 1/N)} for a>1.
where N = number of stations
a = Tp/Tt
(Tp = propagation delay and Tt = transmission delay)
Token Management :
We need token management , if there is a loss of token or it is destroyed when a station fails
We can assign priorities as which station can receive the token. Network Topology : o The way in which
different systems and nodes are connected and communicate with each other is determined by topology of
the network.
STAR TOPOLOGY :
BUS RING TOPOLOGY :
3. Channelization:
In this, the available bandwidth of the link is shared in time, frequency and code to multiple stations to access
channel simultaneously.
Frequency Division Multiple Access (FDMA) – The available bandwidth is divided into equal
bands so that each station can be allocated its own band. Guard bands are also added so that no to bands
overlap to avoid crosstalk and noise.
• Frequency-division multiplexing (FDM) is an analog technique that can be applied when the bandwidth
of a link (in hertz) is greater than the combined bandwidths of the signals to be transmitted.
• In this illustration, the transmission path is divided into three parts, each representing a channel that
carries one transmission.
Multiplexing Process:
The following figure is a conceptual illustration of the multiplexing process. Each source generates a signal of a
similar frequency range. Inside the multiplexer, these similar signals modulates different carrier frequencies (f1,
f2 and f3). The resulting modulated signals are then combined into a single composite signal that is sent out
over a media link that has enough bandwidth to accommodate it.
Demultiplexing Process:
The demultiplexer uses a series of filters to decompose the multiplexed signal into its constituent component
signals. The individual signals are then passed to a demodulator that separates them from their carriers and
passes them to the output lines.
Applications of FDM:
To maximize the efficiency of their infrastructure, telephone companies have traditionally multiplexed
signals from lower-bandwidth lines onto higher-bandwidth lines.
A very common application of FDM is AM and FM radio broadcasting.
The first generation of cellular telephones (still in operation) also uses FDM.
Implementation:
FDM can be implemented very easily. In many cases, such as radio and television broadcasting, there is no need
for a physical multiplexer or demultiplexer. As long as the stations agree to send their broadcasts to the air using
different carrier frequencies, multiplexing is achieved. In other cases, such as the cellular telephone system, a
base station needs to assign a carrier frequency to the telephone user. There is not enough bandwidth in a cell to
permanently assign a bandwidth range to every telephone user. When a user hangs up, her or his bandwidth is
assigned to another caller.
Time Division Multiple Access (TDMA) – In this, the bandwidth is shared between
multiple stations. To avoid collision time is divided into slots and stations are allotted these slots to
transmit data. However there is a overhead of synchronization as each station needs to know its time
slot. This is resolved by adding synchronization bits to each slot. Another issue with TDMA is
propagation delay which is resolved by addition of guard bands.
We can divide TDM into two different schemes: synchronous and statistical.
In synchronous TDM, each input connection has an allotment in the output even if it is not sending data.
In synchronous TDM, the data flow of each input connection is divided into units, where each input
occupies one input time slot.
Time slots are grouped into frames. A frame consists of one complete cycle of time slots, with one slot
dedicated to each sending device. In a system with n input lines, each frame has n slots, with each slot allocated
to carrying data from a specific input line.
Different Factor:
• Empty Slots
• Interleaving
In statistical multiplexing, the number of slots in each frame is less than the number of input lines. The
multiplexer checks each input line in round robin fashion.
The different standards with their numbers are outlined in the table below:
Basic frame format which is required for all MAC implementation is defined in IEEE 802.3
standard. Though several optional formats are being used to extend the protocol’s basic capability.
Fiber Distributed Data Interface (FDDI) is a set of ANSI and ISO standards for transmission of
data in local area network (LAN) over fiber optic cables. It is applicable in large LANs that can extend up to
200 kilometers in diameter.
Features
• FDDI uses optical fiber as its physical medium.
• It operates in the physical and medium access control (MAC layer) of the Open Systems Interconnection
(OSI) network model.
Frame Format
The frame format of FDDI is similar to that of token bus as shown in the following diagram −
Frame Control: 1 byte that specifies whether this is a data frame or control frame.
Payload: A variable length field that carries the data from the network layer.
• It refers to the common flavors of Wi-Fi, most notably 802.11a, 802.11b, 802.11g, and 802.11n.
2. D . It stands for duration and is of 2 bytes. This field defines the duration for which the frame and its
acknowledgement will occupy the channel. It is also used to set the value of NA V for other stations.
3. Addresses. There are 4 address fields of 6 bytes length. These four addresses represent source, destination,
source base station and destination base station.
4. Sequence Control (SC). This 2 byte field defines the sequence number of frame to be used in flow control.
5. Frame body. This field can be between 0 and 2312 bytes. It contains the information.
6. Frame Check Sequence (FCS). This field is 4 bytes long and contains error detection sequence.
Piconet
Er. Sital Pd Mandal (https://computernetwork-mmc.blogspot.com) Page 196
“BE CURIOUS, NOT JUDGMENTAL.” - An up thrust for own knowledge
UNIT 3: DATALINK LAYER
Answer own Innovation, Creativity & Tinkering.
Scatternet
Figure : Scatternet ( combine of Piconet)
Bluetooth Link Security
Elements:
Authentication – verify claimed identity
Encryption – privacy
Key management and usage
Security algorithm parameters:
Unit address
Secret authentication key (128 bits key)
Secret privacy key (4-128 bits secret key)
Random number
Figure : Token Bus Network ( Red Arrow Indicates Token Passing Sequence)
Figure : Token Bus Network ( Red Arrow Indicates Token Passing Sequence)
• The 802.5 IEEE standard defines the Token Ring protocol which, like Token Bus, is another token-
passing access method, but for a ring topology
• A ring topology consists of a series of individual point-to-point links that form a circle
• A token is passed from station to station in one direction around the ring, and only the station holding
the token can transmit packets onto the ring
• Data packets travel in only one direction around the ring
• When a station receives a packet addressed to it, it copies the packet and puts it back on the ring
• When the originating station receives the packet, it removes the packet.
Virtual LANs
• A VLAN is a switched network that is logically segmented by functions, project teams, or applications
without regard to the physical location of users.
• For example, several end stations might be grouped as a department, such as engineering or
accounting.
• When the end stations are physically located close to one another, you can group them into a LAN
segment.
• If any of the end stations are in different buildings (not the same physical LAN segment), you can then
group them into a VLAN.
Types:
1.Static VLAN
are called port-based and port-centric membership VLANs.
Ports on a switch are manually assigned to a VLAN.
This is the most common method of assigning ports to VLANs.
As a device enters the network, it automatically assumes the VLAN membership of the port to which
it is attached.
2. Dynamic VLAN
allow membership based on the MAC address of the device connected to the switch port.
As a device enters the network, it queries a database within the switch for a VLAN membership.
membership is configured using a special server called a VLAN Membership Policy Server (VMPS).
• VLANs provide the following features:
Simplification of end-station moves, adds and changes
• When an end station is physically moved to a new location, its attributes can be reassigned from
a network management station through Simple Network Management Protocol (SNMP) or
through the user interface menus.
• When an end station is moved within the same VLAN, it retains its previously assigned attributes
in its new location. When an end station is moved to a different VLAN, the attributes of the new
VLAN are applied to the end station.
Controlled traffic activity
• VLANs allow ports on the same or different switches to be grouped so that traffic is confined to
members of only that group.
• This feature restricts broadcast, unicast, and multicast traffic (flooding) only to ports included in
a certain VLAN.
• The management domain is a group of VLANs that are managed by a single administrative
authority.
Workgroup and network security
• You can increase security by segmenting the network into distinct broadcast domains.
• To this end, VLANs can restrict the number of users in a broadcast domain.
• You can also control the size and composition of the broadcast domain by controlling the size
and composition of a VLAN.
Components
Er. Sital Pd Mandal (https://computernetwork-mmc.blogspot.com) Page 200
“BE CURIOUS, NOT JUDGMENTAL.” - An up thrust for own knowledge
UNIT 3: DATALINK LAYER
Answer own Innovation, Creativity & Tinkering.
• Networks that have VLANs contain one or more of the following components:
Switches that logically segment connected end stations
Routers that provide VLAN communications between workgroups
Transport protocols that carry VLAN traffic across shared LAN and ATM backbones
Interoperability with previously installed LAN systems
Disadvantage:
Costly
Software based
Human labor to program
Depending on variety switches
Management complexity
Advantages:
More Security
Ease of administration
Broadcast control
Reduction in network traffic
Read M e Fir st (3 t imes) Assumes Basic K ey T er ms while wr iting your unit 5 answer .
bandwidth-delay product client-server paradigm congestion
congestion control demultiplexing ephemeral port number
finite state machine (FSM) Go-Back-N protocol (GBN) multiplexing
piggybacking pipelining port number
process-to-process communication Selective-Repeat (SR) protocol sequence number
sliding window socket address Stop-and-Wait protocol
well-known port number congestion-avoidance cookie
deadlock denial of service attack fast-recovery
fast retransmission fragmentation half-close
initial sequence number (ISN) keepalive timer persistence timer
primary address retransmission time-out (RTO) round-trip time (RTT)
silly window syndrome slow-start algorithm socket address
Stream Control Transmission Protocol (SCTP) stream identifier (SI)
stream sequence number (SSN) SYN flooding attack three-way handshaking
Transmission Control Protocol (TCP) transmission sequence number (TSN) user datagram
User Datagram Protocol (UDP)
• This layer treats each packet independently because each packet belongs to a different message.
• The transport l ayer ensures that each message should reach its destination completely and in order so
that it maintains error and flow control to the source to destination to ensure proper data transmission.
• The transport l ayer establishes a connection between two end ports. A connection is a single logical
path from source to destination which is associated with all the packets in a message.
• Transport L ayer uses some standard protocols to enhance its functionalities are TCP(Transmission
Control Protocol), UDP( User Datagram Protocol), DCCP( Datagram Congestion Control Protocol), etc.
This figure shows the relationship of the transport layer to the network and session layer.
1. Service-point addressing
• Computers often run many programs at the same time. Due to this, source-to-destination delivery means
delivery from a specific job (currently running program) on one computer to a specific job (currently
running program) on the other system not only one computer to the next.
• For this reason, the transport l ayer added a specific type of address to its header, it is referred to as a
service point address or port address.
• By this address each packet reaches the correct computer and also the transport layer gets the complete
message to the correct process on that computer.
• In segmentation, a message is divided into transmittable segments; each segment containing a sequence
number. This number enables this layer to reassemble the message.
• Upon arriving at its destination system message is reassembled correctly, identify and replaces packets
that were lost in transmission.
3. Connection Control
• This Transport Layer treats each packet as an individual and delivers it to the destination machine.
• In this type of transmission, the receiver does not send an acknowledgment to the sender about the
receipt of a packet. This is a faster communication technique.
• This Transport Layer creates a connection with the Transport Layer at the destination machine before
transmitting the packets to the destination.
• To Create a connection following three steps are possible:
o Connection establishment
o Data transfer
o Connection termination
When all the data are transmitted connection is terminated. Connectionless Service is less reliable than
connection Oriented Service.
• Multiple packets from diverse applications are transmitted across a network needs very dedicated
control mechanisms, which are found in the transport layer.
• The transport layer accepts packets from different processes. These packets are differentiated by their
port numbers and pass them to the network layer after adding proper headers.
• In Demultiplexing, at the receiver's side to obtain the data coming from various processes. It receives the
segments of data from the network layer and delivers it to the appropriate process running on the
receiver's machine.
5. Flow control
• The transport layer also responsible for the flow control mechanism between the adjacent layers of the
TCP/IP model.
• It does not perform across a single link even it performs an end-to-end node.
• By imposing flow control techniques data loss can be prevented from the cause of the sender and slow
receiver.
Er. Sital Pd Mandal (https://computernetwork-mmc.blogspot.com) Page 204
“BE CURIOUS, NOT JUDGMENTAL.” - An up thrust for own knowledge
Unit 5 : Transport Layer
Answer own Innovation, Creativity & Tinkering.
• For instance, it uses the method of sliding window protocol in this method receiver sends a window back
to the sender to inform the size of the data is received.
6. Error Control
• Error Control is also performed end to end like the data link layer.
• In this layer to ensure that the entire message arrives at the receiving transport layer without any
error(damage, loss or duplication). Error Correction is achieved through retransmission of the packet.
• The data has arrived or not and checks for the integrity of data, it uses the ACK and NACK services to
inform the sender.
Transport Protocol
The transport layer transmits the entire message to the destination. Therefore, it ensures the end-to-end delivery
of an entire message from a source to the destination.
Reliable delivery:
The transport layer provides reliability services by retransmitting the lost and damaged packets.
o Error control
o Sequence control
o Loss control
o Duplication control
Error Control
o The primary role of reliability is Error C ontrol. In reality, no transmission will be 100 percent error-
free delivery. Therefore, transport layer protocols are designed to provide error-free transmission.
o The data link layer also provides the error handling mechanism, but it ensures only node-to-node error-
free delivery. However, node-to-node reliability does not ensure the end-to-end reliability.
o The data link layer checks for the error between each network. If an error is introduced inside one of the
routers, then this error will not be caught by the data link layer. It only detects those errors that have
been introduced between the beginning and end of the link. Therefore, the transport layer performs the
checking for the errors end-to-end to ensure that the packet has arrived correctly.
Duplication Control
Duplication Control is the fourth aspect of reliability. The transport layer guarantees that no duplicate data
arrive at the destination. Sequence numbers are used to identify the lost packets; similarly, it allows the receiver
to identify and discard duplicate segments.
Flow Control
Flow control is used to prevent the sender from overwhelming the receiver. If the receiver is overloaded with
too much data, then the receiver discards the packets and asking for the retransmission of packets. This
increases network congestion and thus, reducing the system performance. The transport layer is responsible for
flow control. It uses the sliding window protocol that makes the data transmission more efficient as well as it
controls the flow of data so that the receiver does not become overwhelmed. Sliding window protocol is byte
oriented rather than frame oriented.
Addressing
o According to the layered model, the transport layer interacts with the functions of the session layer.
Many protocols combine session, presentation, and application layer protocols into a single layer known
as the application layer. In these cases, delivery to the session layer means the delivery to the application
layer. Data generated by an application on one machine must be transmitted to the correct application on
another machine. In this case, addressing is provided by the transport layer.
o The transport layer provides the user address which is specified as a station or port. The port variable
represents a particular TS user of a specified station known as a Transport Service access point (TSAP).
Each station has only one transport entity.
o The transport layer protocols need to know which upper-layer protocols are communicating.
Connection Establishment
Three protocol scenarios for establishing a connection using a three-way handshake. CR denotes
CONNECTION REQUEST.
(a)Normal operation,
Connection Release
CONNECTION RELEASE Connection at transport can be released in two way.
1. asymmetric: if one of host terminates connection, then in both the direction, data communication will be
terminated.
2. symmetric: if one of the host disconnects connection, then it can not send the data but it can receive it.
Asymmetric Release
(c)Response lost.
TCP Connection Release uses symmetric approach. It is called Four Way handshaking for connection
termination.
Transport layer manages end to end to flow. If the receiver is not able to cope with the flow of data, then data
flow should be control from sender side, that part is done on Transport layer.
Data link layer is also doing flow control, but it controls flow of data between adjacent nodes in path from
source to destination.
Reasons of packet loss at receiver is slow processing speed or insufficient buffer to store the data.
Buffer are allocated at sender and receiver side. If the network service is reliable, so every send TPDU sent will
be delivered to receiver and will be buffered and processes at receiver, so no need to keep buffer at sender.
But if network service is unreliable and receiver may not able to handle every incoming TPDU then sender
should also keep a buffer, where copy of TPDU resides until it’s ACK comes.
Buffers can be allocate in fixed size when connection sets up or buffer can be varied dynamically according to
free memory. First case is called static buffer allocation.
Dynamic Buffer Allocation: as connection are opened and closed, memory available changes, so sender and
receiver dynamically adjust buffer allocations.
In dynamic buffer allocation, initially sender will request certain number of buffers based on perceive need.
receiver will grant as many buffers as it can.
Sender Receiver
<Req. 8 buffers>
<Seq.:0, data=m0>
<Ack:2, Buf:2>
<Seq.:3, data=m3>
<Seq.:4, data=m4>
Multiplexing
1.1.1. Multiplexing
• At the sender site, there may be several processes that need to send packets. However, there is only one
transport layer protocol at any time. This is a many-to-one relationship and requires multiplexing.
• The protocol accepts messages from different processes, differentiated by their assigned port numbers.
After adding the header, the transport layer passes the packet to the network layer
1.1.2. De-multiplexing
• At the receiver site, the relationship is one-to-many and requires Demultiplexing.
The transport layer receives datagrams from the network layer.
• After error checking and dropping of the header, the transport layer delivers each message to the
appropriate process based on the port number
CRASH RECOVERY
• Hosts and routers are subject to crash.
• router crash is easier to handle since transport entities are alive at the host, routers are only intermediate
nodes which forwards packet, they do not have transport layer entity.
One client(host) is sending a file to server(receiver host). Transport layer at server simply passes TPDU to
transport layer. While transmission was on going, server crashes.
Server sends a broadcast TPDU to all host, announcing that it had just crashed and requesting that its clients
inform it about status of all open connection.
Now it seems that if TPDU is outstanding, client should transmit it, but there are can be different hidden
situations.
1. if server has first sent ACK and before it can send TPDU to next layer, server crashes. In this case,
client will get ACK so it will not retransmit, and TPDU is lost by server.
2. if server first sends packet to next layer, then it crashes before it can send ACK. In this case though
server has already received TPDU, client thinks TPDU is lost and it will retransmit.
Server(Receiving host) can be programmed in two ways, 1. ACK first 2. write first
Three events are possible at server, sending ACK(A), sending packet to next layer(W), crashing (C).
Three event can occur in six different case: AC(W) AWC C(AW), C(WA) WAC WC(A)
4. retransmit only
Though Transmission Control Protocol (TCP) is the dominant transport layer protocol used with most of
Internet services; provides assured delivery, reliability and much more but all these services cost us with
additional overhead and latency. Here, UDP comes into picture. For the realtime services like computer gaming,
voice or video communication, live conferences; we need UDP. Since high performance is needed, UDP
permits packets to be dropped instead of processing delayed packets. There is no error checking in UDP, so it
also save bandwidth.
User Datagram Protocol (UDP) is more efficient in terms of both latency and bandwidth.
• UDP is used when acknowledgement of data does not hold any significance.
• UDP is good protocol for data flowing in one direction.
• UDP is simple and suitable for query based communications.
• UDP is not connection oriented.
• UDP does not provide congestion control mechanism.
• UDP does not guarantee ordered delivery of data.
• UDP is stateless.
Notes – Unlike TCP, Checksum calculation is not mandatory in UDP. No Error control or flow control is
provided by UDP. Hence UDP depends on IP and ICMP for error reporting.
UDP Application
Here are few applications where UDP is used to transmit data:
• Domain Name Services
• Simple Network Management Protocol
• Trivial File Transfer Protocol
• Routing Information Protocol
• Kerberos
UDP's only real task is to take data from higher-layer protocols and place it in UDP messages, which are then
passed down to the Internet Protocol for transmission. The basic steps for transmission using UDP are:
2. UDP Message Encapsulation: The higher-layer message is encapsulated into the Data field of a UDP
message. The headers of the UDP message are filled in, including the Source Port of the application that
sent the data to UDP, and the Destination Port of the intended recipient. The checksum value may also
be calculated.
And that's about it. Of course, on reception at the destination device this short procedure is reversed.
In fact, UDP is so simple, that its operation is very often described in terms of what it does not do, instead of
what it does. As a transport protocol, some of the most important things UDP does not do include the following:
o UDP does not establish connections before sending data. It just packages it and… off it goes.
o UDP does not provide acknowledgments to show that data was received.
o UDP does not provide any guarantees that its messages will arrive.
o UDP does not ensure that data is received in the same order that they were sent.
o UDP does not provide any mechanism to manage the flow of data between devices, or handle
congestion.
11.7.3 Serialization
11.7.4 Refinements
A very different communications model, usually but not always implemented over UDP, is that of Remote
Procedure Call, or RPC. The name comes from the idea that a procedure call is being made over the network; host
A packages up a request, with parameters, and sends it to host B, which returns a reply. The term request/reply
protocol is also used for this. The side making the request is known as the client, and the other side the server.
common example is that of DNS, Other examples include password verification, system information retrieval,
database queries and file I/O (below).
Length
The number of bytes in the packet. This includes the UDP header and the data (RPC packet in this case).
Checksum
The checksum is the 16-bit one's complement of the one's complement sum of all 16-bit words in the
pseudo-header, UDP header and raw data.
The UDP pseudo-header consists of the source and destination IP addresses, the Internet Protocol
Number for UDP (17 decimal) and the UDP length (see RFC 768). An implementation may choose not
to compute a UDP checksum when transmitting a packet, in which case it must set the checksum field to
zero.
Data Octets
Provided by the protocol layer above UDP. In this case, this is the RPC request itself.
The original simple model above is quite serviceable. However, in the RPC implementation developed by Sun
Microsystems and documented in RFC 1831 (and officially known as Open Network Computing, or ONC, RPC),
the final acknowledgment was omitted.
11.7.3 Serialization
In some RPC systems, even those with explicit ACKs, requests are executed serially by the server.
11.7.4 Refinements
One basic network-level improvement to RPC concerns the avoidance of IP-level fragmentation. While
fragmentation is not a major performance problem on a single LAN, it may have difficulties over longer distances.
One possible refinement is an RPC-level large-message protocol, that fragments at the RPC layer and which
supports a mechanism for retransmission, if necessary, only of those fragments that are actually lost.
• The sending side of the data transfer protocol will be invoked from above by a call to rdt_send().
• On the receiving side, rdt_rcv() will be called when a packet arrives from the receiving side of the channel.
• When the rdt protocol wants to deliver data to the upper layer, it will do so by calling deliver_data().
• Both the send and receive sides of rdt send packets to the other side by a call to udt_send().
The finite state machine (FSM) definitions for the rdt1.0 sender and receiver are shown in Figure
Fundamentally, two ad ditional protocol c apabilities are required in ARQ protocols to handle
the presence of bit errors:
• Error detection
• Receiver feedback.
Figure 3.4-3 shows the FSM representation of rdt2.0, a data transfer protocol employing error
detection, positive acknowledgements (ACKs), and negative acknowledgements (NAKs).
• For the first p ossibility, consider what a human might do in the message dictation scenario. If the
speaker didn't understand the ``OK'' or ``Please repeat that'' reply from the receiver, the speaker would
probably ask ``What did you say?'' (thus introducing a new type of sender-to-receiver packet to our
protocol).
• A second alternative i s t o add e nough c hecksum bi ts t o allow t he s ender t o not on ly detect, but
recover f rom, bit errors. This solves the immediate problem for a channel which can corrupt packets
but not lose them.
• A third approach i s for t he s ender t o simply resend t he cu rrent d ata packet when i t recei ves a
garbled ACK or NAK packet. This, however, introduces duplicate packets into the sender-to-receiver
channel.
Figures 3.4-4 and 3.4-5 show the FSM description for rdt2.1, our fixed version of rdt2.0. The rdt2.1 sender and
receiver FSM's each now have twice as many states as before.
Our NAK-free reliable data transfer protocol for a channel with bit errors is rdt2.2, shown in Figure 3.4-6 and
3.4-7.
Reliable Data Transfer over a Lossy Channel with Bit Errors: rdt3.0
Suppose now that in addition to corrupting bits, the underlying channel can lose packets as well, a not
uncommon event in today's computer networks (including the Internet).
Two additional concerns must now be addressed by the protocol: how to detect packet loss and what to
do when this occurs.
The use of checksumming, sequence numbers, ACK packets, and retransmissions - the techniques
already developed in rdt 2.2 - will allow us to answer the latter concern. Handling the first concern will
require adding a new protocol mechanism.
Figure 3.4-8 shows the sender FSM for rdt3.0, a protocol that reliably transfers data over a channel that can
corrupt or lose packets.
In Figures 3.4-9(b)-(d), the send-side brackets indicate the times at which a timer is set and later times out.
Several of the more subtle aspects of this protocol are explored in the exercises at the end of this chapter.
Because packet sequence numbers alternate between 0 and 1, protocol rdt3.0 is sometimes known as
the alternating bit protocol.
Go-Back-N (GBN)
Retransmits all the frames that sent after the frame which suspects to be damaged or lost.
If error rate is high, it wastes a lot of bandwidth.
Less complicated.
Window size N-1
Sorting is neither required at sender side nor at receiver side.
Receiver do not store the frames received after the damaged frame until the damaged frame is
retransmitted.
No searching of frame is required neither on sender side nor on receiver
NAK number refer to the next expected frame number.
It more often used.
In a Go-Back-N (GBN) protocol, the sender is allowed to transmit multiple packets (when available) without
waiting for an acknowledgment, but no more than some maximum allowable number, N, of unacknowledged
packets in the pipeline. finite state machines(FSM)
Figure 3.4-19: SR receiver dilemma(a difficult situation or problem) with too large windows: a new
packet or a retransmission
It works together with IP and provides a reliable transport service between processes using the network layer
service provided by the IP protocol.
TCP Services to the application layer are as follows:
1. Process-to-Process Communication –
TCP provides process to process communication, i.e, the transfer of data takes place between individual
processes executing on end systems. This is done using port numbers or port addresses. Port numbers are
16 bit long that help identify which process is sending or receiving data on a host.
2. Stream oriented –
This means that the data is sent and received as a stream of bytes(unlike UDP or IP that divides the bits
into datagrams or packets).
3. Full duplex service –
This means that the communication can take place in both directions at the same time.
4. Connection oriented service –
Unlike UDP, TCP provides connection oriented service. It defines 3 different phases:
• Connection establishment
• Data transfer
• Connection termination
5. Reliability –
TCP is reliable as it uses checksum for error detection, attempts to recover lost or corrupted packets by re-
transmission, acknowledgement policy and timers. It uses features like byte number and sequence number
and acknowledgement number so as to ensure reliability. Also, it uses congestion control mechanisms.
6. Multiplexing –
TCP does multiplexing and de-multiplexing at the sender and receiver ends respectively as a number of
logical connections can be established between port numbers over a physical connection.
The length of TCP header is minimum 20 bytes long and maximum 60 bytes.
• Source Port (16-bits) - It identifies source port of the application process on the sending device.
• Destination Port (16-bits) - It identifies destination port of the application process on the receiving device.
• Sequence Number (32-bits) - Sequence number of data bytes of a segment in a session.
• Acknowledgement Number (32-bits) - When ACK flag is set, this number contains the next sequence number of the
data byte expected and works as acknowledgement of the previous data received.
• Data Offset (4-bits) - This field implies both, the size of TCP header (32-bit words) and the offset of data in current
packet in the whole TCP segment.
• Reserved (3-bits) - Reserved for future use and all are set zero by default.
• Flags (1-bit each)
o NS - Nonce Sum bit is used by Explicit Congestion Notification signaling process.
o CWR - When a host receives packet with ECE bit set, it sets Congestion Windows Reduced to acknowledge
that ECE received.
o ECE -It has two meanings:
If SYN bit is clear to 0, then ECE means that the IP packet has its CE (congestion experience) bit set.
If SYN bit is set to 1, ECE means that the device is ECT capable.
o URG - It indicates that Urgent Pointer field has significant data and should be processed.
o ACK - It indicates that Acknowledgement field has significance. If ACK is cleared to 0, it indicates that
packet does not contain any acknowledgement.
Figure 5.6-1: Congestion scenario 1: two connections sharing a single hop with infinte buffers
If a packet containing a transport-level segment is dropped at the router, it will eventually be retransmitted by
the sender. Because packets can be retransmitted, the term "sending rate."
Figure 3.6-3: Scenario 2: two hosts (with retransmissions) and a router with finite buffers
Scenario 3: Four senders, routers with finite buffers, and multihop paths
In our final congestion scenario, four hosts transmit packets, each over overlapping two-hop paths, as shown in
Figure 5.6-5. We again assume that each host uses a timeout/retransmission mechanism to implement a reliable
data transfer service, that all hosts have the same value of in , and that all router links have capacity C
bytes/sec.
Figure 5.6-5: Four senders, routers with finite buffers, and multihop paths
• End-end con gestion co ntrol. In an end-end approach towards congestion control, the network layer
provides no explicit support to the transport layer for congestion control purposes. Even the presence of
congestion in the network must be inferred by the end systems based only on observed network behavior
(e.g., packet loss and delay).
• Network-assisted c ongestion c ontrol. With network-assisted congestion control, network-layer
components (i.e., routers) provide explicit feedback to the sender regarding the congestion state in the
network. This feedback may be as simple as a single bit indicating congestion at a link .
For network-assisted congestion control, congestion information is typically fed back from the
network to the sender in one of two ways, as shown in Figure 5.6-7.
Direct feedback may be sent from a network router to the sender. This form of notification typically
takes the form of a choke packet (essentially saying, "I'm congested!").
Adopt ATM terminology (e.g., using the term "switch" rather than "router," and the term "call" rather
than "packet).
With ATM ABR service, data cells are transmitted from a source to a destination through a series of
intermediate switches.
Interspersed (between other things)with the data cells are so-called RM (Resource Management) cells;
RM cells can be used to convey congestion-related information among the hosts and switches.
RM cells can thus be used to provide both direct network feedback and network-feedback-via-the-
receiver, as shown in Figure 3.6-8.
ATM ABR congestion control is a rate-based ap proach. That is, the sender explicitly computes a
maximum rate at which it can send and regulates itself accordingly.
ABR provides three mechanisms for signaling congestion-related information from the siwtches to the
receiver:
An ATM ABR source adjusts the rate at which it can send cells as a function of the CI, NI and ER
values in a returned RM cell. The rules for making this rate adjustment are rather complicated and
tedious(too long, slow,).
Congestion Control
What is congestion?
A state occurring in network layer when the message traffic is so heavy that it slows down network response
time.
Effects of Congestion
• As delay increases, performance decreases.
• If delay increases, retransmission occurs, making situation worse.
When the host has to send a In this leaky bucket holds tokens
packet , packet is thrown in generated at regular intervals of
bucket. time.
In the figure, we assume that the network has committed a bandwidth of 3 Mbps for a host. The use of the leaky
bucket shapes the input traffic to make it conform to this commitment. In Figure the host sends a burst of data at
a rate of 12 Mbps for 2 s, for a total of 24 Mbits of data. The host is silent for 5 s and then sends data at a rate of
2 Mbps for 3 s, for a total of 6 Mbits of data. In all, the host has sent 30 Mbits of data in 10 s. The leaky bucket
smooths the traffic by sending out data at a rate of 3 Mbps during the same 10 s.
Packet=
Since n> front of Queue i.e. n>200
Therefore, n=1000-200=800
Packet size of 200 is sent to the network.
Example:
For a ho st machine that use s t he t oken buc ket al gorithm for co ngestion co ntrol, the token bu cket has a
capacity of 1 megabyte and the maximum output rate is 20 megabytes per second. Tokens arrive at a rate to
sustain output at a rate of 10 megabytes per second. The token bucket is currently full and the machine needs
to send 12 m egabytes of data. T he m inimum t ime r equired to transmit t he dat a i s _________________
seconds.
S = C / (M - P)
Where,
M = Maximum burst rate,
P = Rate of arrival of a token,
C = capacity of the bucket
M = 20 MB
P = 10 MB
C = 1 MB
S = 1 / (20- 10) = 0.1 sec
Since, the bucket is initially full, it already has 1 MB to transmit so it will be transmitted instantly. So, we are left
with only (12 – 1), i.e. 11 MB of data to be transmitted.
Time required to send the 11 MB will be 11 * 0.1 = 1.1 sec
Some advantage of token Bucket over leaky bucket –
• If bucket is full in token Bucket , tokens are discard not packets. While in leaky bucket, packets are
discarded.
• Token Bucket can send Large bursts at a faster rate while leaky bucket always sends packets at constant
rate.
192.168.10.121/27
Find
a. Subnet mask
b. No. of IP
c. Valid IP addresses
d. Network IP
e. First IP
f. Last IP
g. Broadcast IP
h. Position of given host
Solution:
On bit = 27
= 255.255.255.224
b. No of IP = 2n = 25 = 32
Now,
192.168.10.0
192.168.10.31
192.168.10.32
192.168.10.63
192.168.10.64
192.168.10.95
192.168.10.96
192.168.10.127
d. Network IP = 192.168.10.96
e. Broadcast IP = 192.168.10.127
f. First IP = 192.168.10.97
g. Last IP = 192.168.10.126
h. Position of given host = 25 [count from 96-121]
Q. 192.168.5.83/28
Find
a. Subnet mask
b. No. of IP
c. Valid IP addresses
d. Network IP
e. First IP
f. Last IP
g. Broadcast IP
h. Position of given host
Solution:
On bit = 28
= 255.255.255.240
b. No of IP = 2n = 24 = 16
192.168.5.0
192.168.5.15
192.168.10.16
192.168.5.31
192.168.5.32
192.168.5.47
192.168.5.48
192.168.5.63
192.168.5.64
192.168.5.79
192.168.5.80
192.168.5.95
d. Network IP = 192.168.5.80
e. Broadcast IP = 192.168.5.95
f. First IP = 192.168.5.81
g. Last IP = 192.168.5.94
An application layer protocol defines how application processes (clients and servers), running on different end
systems, pass messages to each other. In particular, an application layer protocol defines:
1. DNS:
Domain Name System (DNS) − It is a naming system for devices in networks. It provides services for
translating domain names to IP addresses.
1. Name Server (DNS- Domain Name System)
• All system communicate using IP(Numbers)
• Numbers are difficult to remember for human beings than name
• Internet is very large there are millions of computer and servers
• Naming system is introduced(in 1983) for mapping of Host Name to IP address
• In DNS server, there is library procedure (program) called resolver that converts host name to IP.
• ICANN (Internet Corporation for Assigned Names and Numbers) is responsible for managing the
DNS in internet.
• Domain names are unique
• Divided into 2 :
1. Flat Structure
2. Hierarchical Structure
• Hierarchical structure is used.
• Name space have tree structure.
• Example : www.xyz.com
• Here xyz.com is managed by central authority(ICANN) and www is name
given by organization(here xyz)
1.1.3. Zone
• Zone will keep track of all nodes in domain and all sub-domains under the domain.
1.2. Servers
• Root Server
• A root server is a server whose zone consists of the whole tree
• A root server usually does not store any information about domains but delegates its authority to other
servers
• DNS defines two types of servers
1. Primary Server
• A primary server is a server
• That stores a file about the zone for which it is an authority
• It is responsible for creating, maintaining, and updating the zone file
2. Secondary Server
• A secondary server is a server that transfers the complete information about a zone from
another server (primary or secondary) and stores the file on its local disk
2. DHCP:
DHCP(Dynamic Host Configuration Protocol)
• Two possible way for configuring IP are:
1. Manually
2. Dynamically (DHCP)
• DHCP is service that provide IP addresses.
• Server that runs DHCP service is DHCP servers.
• Client that uses DHCP server for IP configuration is DHCP clients.
• DHCP server uses UDP port 67
• DHCP client uses UDP port 68
3. WWW:
This is a protocol used mainly to access data on the World Wide Web (www).
The Hypertext Transfer Protocol (HTTP) the Web's main application-layer protocol although current
browsers can access other types of servers
A respository of information spread all over the world and linked together.
The HTIP protocol transfer data in the form of plain text, hyper text, audio, video and so on.
HTTP utilizes TCP connections to send client requests and server replies.
it is a synchronous protocol which works by making both persistent and non persistent connections.
4. HTTP:
Hyper Text Transfer Protocol, HTTP − It is the underlying protocol for world wide web. It defines how
hypermedia messages are formatted and transmitted.
• The Hypertext Transfer Protocol (HTTP) is a protocol used mainly to access data on the World Wide
Web(WWW)
• It is similar to FTP because it transfers files and uses the services of TCP.
• It uses only one TCP connection
• HTTP uses the services of TCP on well-known port 80
• Accessing of web page is based on URL
7. FTP:
File Transfer Protocol, FTP − It is a client-server based protocol for transfer of files between client and
server over the network.
• File Transfer Protocol (FTP) is the standard mechanism provided by TCP/IP for copying a file from
one host to another.
• FTP establishes two connections between the hosts
• One connection is used for data transfer, the other for control information (commands and responses)
• Separation of commands and data transfer makes FTP more efficient
• FTP uses two well-known TCP ports: Port 21 is used for the control connection, and port 20 is used
for the data connection.
Q. E-mail
• Electronic mail, or more commonly email, used to communicate with different users in internet
• Email uses following protocols for storing & delivering messages, They are :
1. SMTP (Simple Mail Transfer Protocol)
2. POP (Post Office Protocol)
3. IMAP (Internet Message Access Protocol)
8. SMTP:
Simple Mail Transfer Protocol, SMTP − It lays down the rules and semantics for sending and receiving
electronic mails (e-mails).
9. POP:
9.1. POP (Post Office Protocol)
• Post Office Protocol (POP) is an application-layer Internet standard protocol used by local e-mail
clients to retrieve e-mail from a remote server over a TCP/IP connection
• POP has been developed through several versions, with version 3 (POP3) being the last standard
• E-mails are downloaded from the server's mailbox to your computer
• No copy of Email will be kept in mailbox after downloading the email
• E-mails are available when you are not connected
9.1.2.Features of POP
• POP is a much simpler protocol, making implementation easier
• POP mail moves the message from the email server onto your local computer, although there is usually
an option to leave the messages on the email server as well
• POP treats the mailbox as one store, and has no concept of folders
• POP protocol requires the currently connected client to be the only client connected to the mailbox
• When POP retrieves a message, it receives all parts of it
Simple Network Management Protocol (SNMP) is an "Internet-standard protocol for managing devices on IP
networks. Devices that typically support SNMP include routers, switches, servers, workstations, printers,
modem racks, and more. It is used mostly in network management systems to monitor network-attached devices
for conditions that warrant administrative attention.
The Simple Network Management Protocol (SNMP) is a framework for managing devices in an Internet using
the TCPIIP protocol suite. It provides a set of fundamental operations for monitoring and maintaining an
Internet.
MRTG
• The Multi Router Traffic Grapher (MRTG) is free software for monitoring and measuring the traffic
load on network links. It allows the user to see traffic load on a network over time in graphical form.
• It was originally developed by Tobias Oetiker and Dave Rand to monitor router traffic, but has
developed into a tool that can create graphs and statistics for almost anything.
• MRTG is written in Perl and can run on Windows, Linux, Unix, Mac OS and NetWare.
How it works
• SNMP
MRTG uses the Simple Network Management Protocol (SNMP) to send requests with two object
identifiers (OIDs) to a device.
The device, which must be SNMP-enabled, will have a management information base (MIB) to look up
the OIDs specified.
After collecting the information it will send back the raw data encapsulated in an SNMP protocol.
MRTG records this data in a log on the client along with previously recorded data for the device.
The software then creates an HTML document from the logs, containing a list of graphs detailing traffic
for the selected devices in the server.
The MRTG website contains a large library of external scripts to enable monitoring of SQL database
statistics, firewall rules, CPU fan RPMs, or virtually any integer-value data.
Features
PRTG:
PRTG Network Monitor (Paessler Router Traffic Grapher until version 7) is an agentless network monitoring
software from Paessler AG. It can monitor and classify system conditions like bandwidth usage or uptime and
collect statistics from miscellaneous hosts as switches, routers, servers and other devices and applications.
1. Specifications
o PRTG Network Monitor has an auto-discovery mode that scans predefined areas of an enterprise
network and creates a device list from this data.
o In the next step, further information on the detected devices can be retrieved using various
communication protocols.
o Typical protocols are Ping, SNMP, WMI, NetFlow, jFlow, sFlow, but also communication via
DICOM or the RESTful API is possible.
o The tool is only available for Windows systems. In addition, Paessler AG offers the cloud-based
monitoring solution "PRTG hosted by Paessler"
o
1.4 Pricing
PRTG Network Monitor's licensing is based on sensors. Most devices require between
five and ten sensors to be fully monitored. A version with 100 integrated sensors is available free
of charge.
Packet Analyzer:
• A packet analyzer (also known as a packet sniffer) is a computer program or piece of computer
hardware (such as a packet capture appliance) that can intercept and log traffic that passes over a digital
network or part of a network.
• Packet capture is the process of intercepting and logging traffic.
• A packet analyzer used for intercepting traffic on wireless networks is known as a wireless analyzer or
WiFi analyzer.
• A packet analyzer can also be referred to as a network analyzer or protocol analyzer though these terms
also have other meanings.
Capabilities
o On wired shared medias networks, such as Ethernet, Token Ring, and FDDI networks, depending on the
network structure (hub or switch), it may be possible to capture all traffic on the network from a single
machine on the network.
o On modern networks, traffic can be captured using a network switch with a so-called monitoring port
that mirrors all packets that pass through designated ports of the switch.
o On wireless LANs, traffic can be captured on one channel at a time, or by using multiple adapters, on
several channels simultaneously.
Uses:
Packet sniffers can:
o Analyze network problems
o Detect network misuse by internal and external users
o Monitor WAN bandwidth utilization
o Gather and report network statistics
Wireshark
• Wireshark, a network analysis tool formerly known as Ethereal, captures packets in real time and
display them in human-readable format.
• Wireshark includes filters, color coding, and other features that let you dig deep into network
traffic and inspect individual packets.
• Wireshark is a free and open-source packet analyzer. It is used for network troubleshooting,
analysis, software and communications protocol development, and education.
Features
Wireshark is a data capturing program that "understands" the structure (encapsulation) of different
networking protocols.
• Data can be captured "from the wire" from a live network connection or read from a file of already-
captured packets.
• Live data can be read from different types of networks, including Ethernet, IEEE 802.11, PPP, and
loopback.
• Data display can be refined using a display filter.
• Wireless connections can also be filtered as long as they traverse the monitored Ethernet.
• Various settings, timers, and filters can be set to provide the facility of filtering the output of the
captured traffic
Filtering Packets
If you’re trying to inspect something specific, such as the traffic a program sends when phoning home, it helps
to close down all other applications using the network so you can narrow down the traffic. Still, you’ll likely
have a large amount of packets to sift through. That’s where Wireshark’s filters come in.
Inspecting Packets
“NEVER GIVE UP ON A DREAM JUST BECAUSE OF THE TIME IT WILL TAKE TO ACCOMPLISH IT. THE
TIME WILL PASS ANYWAY.”
Point to Note
Cryptography is a method of using advanced mathematical principles in storing and transmitting data in a
particular form so that only those whom it is intended can read and process it.
Cryptography Terms
Encryption: It is the process of locking up information using cryptography. Information that has been
locked this way is encrypted.
Decryption: The process of unlocking the encrypted information using cryptographic techniques.
Key: A secret like a password used to encrypt and decrypt information. There are a few different types of
keys used in cryptography.
Steganography: It is actually the science of hiding information from people who would snoop on you. The
difference between steganography and encryption is that the would-be snoopers may not be able to tell
there’s any hidden information in the first place.
• Some secret information shared by the two principals and, it is hoped, unknown to the opponent. An
example is an encryption key used in conjunction with the transformation to scramble the message
before transmission and unscramble it on reception.
This general model shows that there are four basic tasks in designing a particular security service:
1. Design an algorithm for performing the security-related transformation. The algorithm should be such
that an opponent cannot defeat its purpose.
2. Generate the secret information to be used with the algorithm.
3. Develop methods for the distribution and sharing of the secret information.
4. Specify a protocol to be used by the two principals that makes use of the security algorithm and the
secret information to achieve a particular security service.
A general model of these other situations is illustrated by Figure 1.5, which reflects a concern for protecting an
information system from unwanted access. Most readers are familiar with the concerns caused by the existence
of hackers, who attempt to penetrate systems that can be accessed over a network. The hacker can be someone
who, with no malign intent, simply gets satisfaction from breaking and entering a computer system. The
intruder can be a disgruntled employee who wishes to do damage or a criminal who seeks to exploit computer
assets for financial gain (e.g., obtaining credit card numbers or performing illegal money transfers).
This is the simplest kind of encryption that involves only one secret key to cipher and decipher
information.
Symmetrical encryption is an old and best-known technique.
It uses a secret key that can either be a number, a word or a string of random letters.
It is a blended with the plain text of a message to change the content in a particular way.
The sender and the recipient should know the secret key that is used to encrypt and decrypt all the
messages. AES, DES, RC5, and RC6 are examples of symmetric encryption.
The most widely used symmetric algorithm is AES-128, AES-192, and AES-256.
The main disadvantage of the symmetric key encryption is that all parties involved have to exchange the key
used to encrypt the data before they can decrypt it.
Asymmetrical Encryption
Decryption Formula
The decryption process is very straightforward and includes analytics for calculation in a systematic approach.
Considering receiver C has the private key d, the result modulus will be calculated as −
Plaintext = Cd mod n
Digital signatures are the public-key primitives of message authentication. In the physical world, it
is common to use handwritten signatures on handwritten or typed messages. They are used to bind signatory to
the message.
Similarly, a digital signature is a technique that binds a person/entity to the digital data. This binding
can be independently verified by receiver as well as any third party.
Digital signature is a cryptographic value that is calculated from the data and a secret key known only
by the signer.
However, the crypto system based on sign-then-encrypt can be exploited by receiver to spoof identity of sender
and sent that data to third party. Hence, this method is not preferred. The process of encrypt-then-sign is more
reliable and widely adopted. This is depicted in the following illustration −
The receiver after receiving the encrypted data and signature on it, first verifies the signature using sender’s
public key. After ensuring the validity of the signature, he then retrieves the data through decryption using his
private key.
• Along with having strong strength levels, the length of the signature is smaller as compared to other
digital signature standards.
• The signature computation speed is less.
• DSA requires less storage to work as compared to other digital standards.
• DSA is patent free so it can be used free of cost.
Disadvantages of Digital Signature Algorithm
• It requires a lot of time to authenticate as the verification process includes complicated remainder
operators. It requires a lot of time for computation.
• Data in DSA is not encrypted. We can only authenticate data in this.
• The digital signature algorithm firstly computes with SHA1 hash and signs it. Any drawbacks in
cryptographic security of SHA1 are reflected in DSA because implicitly of DSA is dependent on it.
• With applications in both secret and non-secret communications, DSA is of the US National Standard.
IP security (IPSec)
Internet protocol security (IPsec) is a set of protocols that provides security for Internet Protocol. It can
use cryptography to provide security. IPsec can be used for the setting up of virtual private networks (VPNs) in
a secure manner.Also known as IP Security.
The IP security (IPSec) is an Internet Engineering Task Force (IETF) standard suite of protocols between 2
communication points across the IP network that provide data authentication, integrity, and confidentiality. It
also defines the encrypted, decrypted and authenticated packets. The protocols needed for secure key exchange
and key management are defined in it.
Uses of IP Security –
IPsec can be used to do the following things:
• To encrypt application layer data.
• To provide security for routers sending routing data across the public internet.
• To provide authentication without encryption, like to authenticate that the data originates from a known
sender.
• To protect network data by setting up circuits using IPsec tunneling in which all data is being sent
between the two endpoints is encrypted, as with a Virtual Private Network(VPN) connection.
Components of IP Security –
It has the following components:
1. Encapsulating Security Payload (ESP) –
It provides data integrity, encryption, authentication and anti replay. It also provides authentication for
payload.
2. Authentication Header (AH) –
It also provides data integrity, authentication and anti replay and it does not provide encryption. The anti
replay protection, protects against unauthorized transmission of packets. It does not protect data’s
confidentiality.
It is a network security protocol designed to dynamically exchange encryption keys and find a way over
Security Association (SA) between 2 devices. The Security Association (SA) establishes shared security
attributes between 2 network entities to support secure communication. The Key Management Protocol
(ISAKMP) and Internet Security Association which provides a framework for authentication and key exchange.
ISAKMP tells how the set up of the Security Associations (SAs) and how direct connections between two hosts
that are using IPsec.
Internet Key Exchange (IKE) provides message content protection and also an open frame for implementing
standard algorithms such as SHA and MD5. The algorithm’s IP sec users produces a unique identifier for each
packet. This identifier then allows a device to determine whether a packet has been correct or not. Packets
which are not authorized are discarded and not given to receiver.
IPsec provides the following security services for traffic at the IP layer:
Applications of IPSec
As we all know to help in the security of a network the Internet community has done lot of work and developed
application-specific security mechanisms in numerous application areas, including electronic mail (Privacy
Enhanced Mail, Pretty Good Privacy [PGP]), network management (Simple Network Management Protocol
Version 3[SNMPv3]), Web access (Secure HTTP, Secure Sockets Layer [SSL]), and others.
Benefits of IPSec
When IPSec is implemented in a firewall or router, it provides strong security whose application is to all
traffic crossing this perimeter. Traffic within a company or workgroup does not incur the overhead of security-
related processing.
IPSec is below the transport layer (TCP, UDP), and is thus transparent to applications. There is no need
to change software on a user or server system when IPSec is implemented in the firewall or router.
Even if IPSec is implemented in end systems, upper layer software, including applications is not
affected. IPSec can be transparent to end users.
VPN stands for Virtual Private Network (VPN) that allows a user to connect to a private network over the
Internet securely and privately. VPN creates an encrypted connection that is called VPN tunnel and all Internet
traffic and communication is passed through this secure tunnel.
Virtual Private Network (VPN) is basically of 2 types:
1. Remote Access VPN:
Remote Access VPN permits a user to connect to a private network and access all its services and
resources remotely. The connection between the user and the private network occurs through the Internet
and the connection is secure and private. Remote Access VPN is useful for home users and business users
both.
2. Site to Site VPN:
A Site-to-Site VPN is also called as Router-to-Router VPN and is commonly used in the large
companies. Companies or organizations, with branch offices in different locations, use Site-to-site VPN
to connect the network of one office location to the network at another office location.
• Intranet based VPN: When several offices of the same company are connected using Site-to-Site VPN
type, it is called as Intranet based VPN.
• Extranet based VPN: When companies use Site-to-site VPN type to connect to the office of another
company, it is called as Extranet based VPN.
Firewall
A firewall is a network security device, either hardware or software-based, which monitors all incoming
and outgoing traffic and based on a defined set of security rules it accepts, rejects or drops that specific traffic.
Accept : allow the traffic
Reject : block the traffic but reply with an “unreachable error”
Drop : block the traffic with no reply
A firewall establishes a barrier between secured internal networks and outside untrusted network, such
as the Internet.
A firewall is a network security device that monitors incoming and outgoing network traffic
and permits or blocks data packets based on a set of security rules. Its purpose is to establish a barrier between
your internal network and incoming traffic from external sources (such as the internet) in order to block
malicious traffic like viruses and hackers.
Types of Firewall
Firewalls are generally of two types: Host-based and Network-based.
1. Host- based Firewalls : Host-based firewall is installed on each network node which controls each
incoming and outgoing packet. It is a software application or suite of applications, comes as a part of the
operating system. Host-based firewalls are needed because network firewalls cannot provide protection
inside a trusted network. Host firewall protects each host from attacks and unauthorized access.
2. Network-based Firewalls : Network firewall function on network level. In other words, these firewalls
filter all incoming and outgoing traffic across the network. It protects the internal network by filtering the
traffic using rules defined on the firewall. A Network firewall might have two or more network interface
cards (NICs). A network-based firewall is usually a dedicated system with proprietary software installed.
Generation of Firewall
Firewalls can be categorized based on its generation.
First Generation- Packet Filtering Firewall : Packet filtering firewall is used to control network access by
monitoring outgoing and incoming packet and allowing them to pass or stop based on source and destination IP
address, protocols and ports. It analyses traffic at the transport protocol layer (but mainly uses first 3 layers).
Third Generation- Application Layer Firewall : Application layer firewall can inspect and filter the packets
on any OSI layer, up to the application layer. It has the ability to block specific content, also recognize when
certain application and protocols (like HTTP, FTP) are being misused.
Next Generation Firewalls (NGFW) : Next Generation Firewalls are being deployed these days to stop
modern security breaches like advance malware attacks and application-layer attacks.
Wireless-Security
Like the system's security and data security, keeping a sound knowledge about different wireless security
measures is also essential to know for security professionals. It is because different wireless security
mechanisms have a different level of strength and capabilities.
There are automated wireless hacking tools available that have made cybercriminals more powerful. List of
some of these tools are:
AirCrack.
AirSnort.
Cain & Able.
Wireshark.
NetStumbler etc.
Different various techniques of hacking include remote accessing, shoulder surfing, wireless router's dashboard
accessing, and brute-forcing attack that are used to penetrate wireless security.
1. What is Wireless Security?
2. Wired Equivalent Privacy (WEP)
3. Wi-Fi Protected Access (WPA)
4. Wi-Fi Protected Access II (WPA2)
5. Wi-Fi Protected Access 3 (WPA3)
1. Hardware-based: where routers and switches are fabricated with encryption measures protects all
wireless communication. So, in this case, even if the data gets compromised by the cybercriminal, they
will not be able to decrypt the data or view the traffic's content.
Wired Equivalent Privacy (WEP) is the oldest security algorithm of 1999. It uses the initialization vector (IV)
method. The very first versions of the WEP algorithm were not predominantly strong enough, even for that time
when it got released. But the reason for this weak release was because of U.S. limits on the exporting of
different cryptographic technologies, which led the manufacturing companies to restrict their devices to 64-bit
encryption only. As the limitation was withdrawn, the 128 bit and 256 bit WEP encryption were developed and
came into the wireless security market, though 128 became the standard one.
Wi-Fi Protected Access (WPA) was the next Wi-Fi Alliance's project that replaced the increasingly noticeable
vulnerabilities of WEP standard. WPA was officially adopted in the year 2003, one year before the retirement
of WEP. WPA's most common configuration is with WPA-PSK, which is abbreviated as Pre-Shared Key. WPA
uses 256-bit, which was a considerable enhancement above the 64-bit as well as 128-bit keys.
Wi-Fi Protected Access II (WPA2) became official in the year 2006 after WPA got outdated. It uses the AES
algorithms as a necessary encryption component as well as uses CCMP (Counter Cipher Mode - Block
Chaining Message Authentication Protocol) by replacing TKIP.
Wi-Fi Protected Access 3 (WPA3) is the latest, and the third iteration of this family developed under Wi-Fi
Alliance. It has personal as well as enterprise security-support feature and uses 384-bit Hashed Message
Authentication Mode, 256-bit Galois / Counter Mode Protocol (GCMP-256), as well as Broadcast/Multicast
Integrity Protocol of 256-bit. WPA3 also provides perfect forward secrecy mechanism support.
“NEVER GIVE UP ON A DREAM JUST BECAUSE OF THE TIME IT WILL TAKE TO ACCOMPLISH IT. THE
TIME WILL PASS ANYWAY.”