CS 352 Computer Networks
Faculty: Ms. Diksha Goyal
UNIT 1
 OSI & TCP/IP MODELS
 NETWORK TOPOLOGIES
 NETWORKING TYPES
 TRANSMISSION MEDIA
 NETWORKIN DEVICES
 WLAN
 MULTIPLEXING
Contents -
 Representation of data and its flow, network protocols and standards
 OSI & TCP/IP MODEL
 What is Network Topology?
• Network Topology Types
○ Bus Topology
○ Ring Topology
○ Star Topology
○ Tree Topology
○ Mesh Topology
○ Hybrid Topology
• Networking Types
○ Local Area Network (LAN)
○ Wide Area Network (WAN)
○ Metropolitan Area Network
(MAN)
○ Personal Area Network (PAN)
 Transmissions Media
• Guided Media
o Twisted pair cable
o Co-axial Cable
o Fiber Optic Cable
• Unguided Media
o Radio Waves
o Antenna
o Microwave
o Infrared
 Networking Devices
o Hub
o Switch
o Router
o Bridge
o Gateway
o Modem
o Repeater
o Access Point
 PSTN
 WLAN
 MULTIPLEXING
Representation of data
and its flow, network
protocols and standards
Data Representation
Data is collection of raw facts which is processed to deduce
information. There may be different forms in which data may be
represented. Some of the forms of data used in communication
are as follows;
1 : text
2 : numbers
3 : images
4 : audio
5 : video
Data can be represented by using different
forms as shown in figure
Text
Text includes combinations of alphabet in small case as well
as upper case. It is stored as pattern of bits.
In data communication , text is represented as a bit pattern
Unicode : 32 bits
ascii_ - first 127 characters in Unicode.
4
Numbers
Numbers include combination of digits from 0 to 9. it is stored as a
pattern of bits . prevalent encoding system : asci, Unicode.
Images
An image is worth a thousand words‖ is a very famous saying. In computers
images are digitally stored.
A Pixel is the smallest element of an image. To put it in simple terms, a picture or
image is a matrix of pixel elements.
The pixels are represented in the form of bits. Depending upon the type of image
(black n white or color ) each pixel would require different number of bits to
represent the value of a pixel.
The size of an image depends upon the number of pixels (also called resolution)
and the bit pattern used to indicate the value of each pixel.
Audio
Audio refers to the recording or broadcasting of sound or
music. Audio is by nature different from text, numbers , or
images.
It is continuous, not discrete. Even when we use a
microphone to change voice or music to an electric signal,
we create a continuous signal
Video
video refers to broadcasting of data in form of
picture or movie.
Data flow
Two devices communicate with each other by
sending and receiving data. The data can flow
between the two devices in the following ways.
1: simplex
2: half duplex
3: full duplex
Diagram pf data flow methods
Simplex
In simplex ,communication is unidirectional only one of the device sends
the data and the other one only receives the data. Example in the below
diagram : a CPU send data while a monitor only receives data.
Half duplex
In half duplex both the stations can transmit as well as receives but not at
the same time.
When one device is sending other can only receives and vice versa(as
shown below in figure)
Example: walkie - talkie
Full duplex
In full duplex mode, both stations can transmit and receives at the same
time.
Example: mobile.
Protocols
A protocol is basically a synonym for the rule. In computer networks,
basically,
Communications occurs between entities in different systems. An entity is
anything that is capable od sending or receiving information . any two
entities cannot simply send bitstreams to each other and expect to be
understood.
A protocol is a set of rules that mainly govern data communications. The
protocol mainly defines what is communicated, how it is communicated,
and when it is communicated.
Key elements of a protocol
The key elements of a protocol are as given below:
syntax This term mainly refers to the structure or format of the
data which simply means the order in which data is presented. For
example, A simple protocol might expect the first 8 bits of data to
be the address of the sender, then the second 8 bits to be the
address of the receiver, and then the rest of the stream to be the
message itself.
Key elements of a protocol
Semantics This term mainly refers to the meaning of each section
of bits. How does a particular pattern to be interpreted, and On the
basis of interpretation what action is to be taken? For example,
does an address identify the route to be taken or the final
destination of the message?
Timing This term mainly refers to two characteristics: At what time
the data should be sent and how fast data can be sent. For
example, if a sender produces data at 100 Mbps but the receiver
can process data at only 1 Mbps, the transmission will overload the
receiver and there will be some data loss.
Standard
Standards are essential in creating and maintaining an open and
competitive market for equipment manufacturers and in
guaranteeing national and international interoperability of data
and telecommunications technology and processes. Standards
provide guidelines to manufacturers, vendors, government
agencies, and other service providers to ensure the kind of
interconnectivity necessary in today's marketplace and in
international communications. Data communication standards fall
into two categories: de facto (meaning "by fact" or "by
convention") and de jure (meaning "by law" or "by regulation").
Standards are of two types :
De Facto Standard.
De Jure Standard.
De Facto Standard : The meaning of the work ” De Facto ” is ” By Fact
” or “By Convention”.
These are the standard s that have not been approved by any
Organization , but have been adopted as Standards because of it’s
widespread use. Also , sometimes these standards are often established
by Manufacturers.
For example : Apple and Google are two companies which
established their own rules on their products which are different . Also
they use some same standard rules for manufacturing for their products.
De facto standard
OSI & TCP/IP
Models
What is the OSI Model?
OSI stands for Open System Interconnection is a reference model that describes how
information from a software application in one computer moves through a physical medium
to the software application in another computer.
OSI model was developed by the International Organization for Standardization (ISO) in
1984.
it is now considered as an architectural model for the inter-computer communications.
OSI model divides the whole task into seven smaller and manageable tasks. Each layer is
assigned a particular task.
OSI consists of seven layers, and each layer performs a particular network function.
OSI Model
Different layers of OSI model-
There are the seven OSI layers :
Physical layer:
The lowest layer of the OSI reference model is the physical layer.
It is responsible for the actual physical connection between the devices.
The physical layer contains information in the form of bits.
It is responsible for transmitting individual bits from one node to the next. When receiving data, this layer
will get the signal received and convert it into 0s and 1s and send them to the Data Link layer, which will
put the frame back together.
The functions of the physical layer are :
Bit synchronization: The physical layer provides the synchronization of the bits by providing a clock. This
clock controls both sender and receiver thus providing synchronization at bit level.
Bit rate control: The Physical layer also defines the transmission rate i.e. the number of bits sent per
second.
Physical topologies: Physical layer specifies the way in which the different, devices/nodes are arranged
in a network i.e. bus, star or mesh topology.
Transmission mode: Physical layer also defines the way in which the data flows between the two
connected devices. The various transmission modes possible are: Simplex, half-duplex and full-duplex.
* Hub, Repeater, Modem, Cables are Physical Layer devices.
Data Link Layer (DLL) :
The data link layer is responsible for the node to node delivery of the message.
The main function of this layer is to make sure data transfer is error-free from one node to another, over
the physical layer. When a packet arrives in a network, it is the responsibility of DLL to transmit it to the
Host using its MAC address.
Data Link Layer is divided into two sub layers :
Logical Link Control (LLC)
Media Access Control (MAC)
The packet received from Network layer is further divided into frames depending on the frame size of
NIC(Network Interface Card). DLL also encapsulates Sender and Receiver’s MAC address in the header.
The Receiver’s MAC address is obtained by placing an ARP(Address Resolution Protocol) request onto the
wire asking “Who has that IP address?” and the destination host will reply with its MAC address
The functions of the data Link layer are -
Framing: Framing is a function of the data link layer. It provides a way for a sender to transmit a set of bits
that are meaningful to the receiver. This can be accomplished by attaching special bit patterns to the
beginning and end of the frame.
Physical addressing: After creating frames, Data link layer adds physical addresses (MAC address) of
sender and/or receiver in the header of each frame.
Error control: Data link layer provides the mechanism of error control in which it detects and retransmits
damaged or lost frames.
Flow Control: The data rate must be constant on both sides else the data may get corrupted thus , flow
control coordinates that amount of data that can be sent before receiving acknowledgement.
Access control: When a single communication channel is shared by multiple devices, MAC sub-layer of
data link layer helps to determine which device has control over the channel at a given time.
Network Layer:
Network layer works for the transmission of data from one host to the other located in different networks.
It also takes care of packet routing i.e. selection of the shortest path to transmit the packet, from the number
of routes available.
The sender & receiver’s IP address are placed in the header by the network layer.
The functions of the Network layer are -
Routing: The network layer protocols determine which route is suitable from source to destination. This
function of network layer is known as routing.
Logical Addressing: In order to identify each device on internetwork uniquely, network layer defines an
addressing scheme. The sender & receiver’s IP address are placed in the header by network layer. Such
an address distinguishes each device uniquely and universally.
**Segment in Network layer is referred as Packet.
** Network layer is implemented by networking devices such as routers
Transport Layer :
Transport layer provides services to application layer and takes services from network layer.
The data in the transport layer is referred to as Segments.
It is responsible for the End to End Delivery of the complete message.
The transport layer also provides the acknowledgement of the successful data transmission and re-transmits
the data if an error is found.
• At sender’s side:
Transport layer receives the formatted data from the upper layers, performs Segmentation and also
implements Flow & Error control to ensure proper data transmission. It also adds Source and Destination
port number in its header and forwards the segmented data to the Network Layer.
• At receiver’s side:
Transport Layer reads the port number from its header and forwards the Data which it has received to the
respective application. It also performs sequencing and reassembling of the segmented data.
The functions of the transport layer are :
Segmentation and Reassembly: This layer accepts the message from the (session) layer , breaks the
message into smaller units . Each of the segment produced has a header associated with it. The
transport layer at the destination station reassembles the message.
Service Point Addressing: In order to deliver the message to correct process, transport layer header
includes a type of address called service point address or port address. Thus by specifying this address,
transport layer makes sure that the message is delivered to the correct process
** Transport layer is operated by the Operating System. It is a part of the OS and
communicates with the Application Layer by making system calls.
Transport Layer is called as Heart of OSI model
The services provided by the transport layer :
Connection Oriented Service: It is a three-phase process which include
– Connection Establishment
– Data Transfer
– Termination / disconnection
In this type of transmission, the receiving device sends an acknowledgement, back to the source after a
packet or group of packet is received. This type of transmission is reliable and secure.
Connection less service: It is a one-phase process and includes Data Transfer. In this type of transmission,
the receiver does not acknowledge receipt of a packet. This approach allows for much faster communication
between devices. Connection-oriented service is more reliable than connectionless Service.
* Data in the Transport Layer is called as Segments
Session Layer :
This layer is responsible for establishment of connection, maintenance of sessions, authentication and also
ensures security.
The functions of the session layer are :
Session establishment, maintenance and termination: The layer allows the two processes to establish,
use and terminate a connection.
Synchronization : This layer allows a process to add checkpoints which are considered as synchronization
points into the data. These synchronization point help to identify the error so that the data is re-
synchronized properly, and ends of the messages are not cut prematurely and data loss is avoided.
Dialog Controller : The session layer allows two systems to start communication with each other in half-
duplex or full-duplex.
The functions of the Session Layer are:
Presentation Layer:
Presentation layer is also called the Translation layer.
The data from the application layer is extracted here and manipulated as per the required format to transmit
over the network.
The functions of the presentation layer are :
Translation : For example, ASCII to EBCDIC.
Encryption/ Decryption : Data encryption translates the data into another form or code. The encrypted data is
known as the cipher text and the decrypted data is known as plain text. A key value is used for encrypting as
well as decrypting data.
Compression: Reduces the number of bits that need to be transmitted on the network.
Application Layer:
At the very top of the OSI Reference Model stack of layers, we find Application layer which is implemented by
the network applications.
These applications produce the data, which has to be transferred over the network.
This layer also serves as a window for the application services to access the network and for displaying the
received information to the user.
Ex: Application – Browsers, Skype Messenger etc.
**Application Layer is also called as Desktop Layer.
The functions of the Application layer are :
Network Virtual Terminal
FTAM-File transfer access and management
Mail Services
Directory Services
OSI model acts as a reference model and is not implemented in
the Internet because of its late invention. Current model being
used is the TCP/IP model.
TCP/IP Model
TCP/IP model was designed and developed by Department of Defense (DoD) in 1960s and is based on
standard protocols.
It stands for Transmission Control Protocol/Internet Protocol.
The TCP/IP model is a concise version of the OSI model. It contains four layers, unlike seven layers in the
OSI model.
Layers of TCP/IP Model
Network Access Layer :
This layer corresponds to the combination of Data Link Layer and Physical Layer of the OSI model.
It looks out for hardware addressing and the protocols present in this layer allows for the physical
transmission of data.
We just talked about ARP being a protocol of Internet layer, but there is a conflict about declaring it as a
protocol of Internet Layer or Network access layer.
It is described as residing in layer 3, being encapsulated by layer 2 protocols
Internet Layer :
This layer parallels the functions of OSI’s Network layer. It defines the protocols which are responsible for
logical transmission of data over the entire network.
The main protocols residing at this layer are :
IP – stands for Internet Protocol and it is responsible for delivering packets from the source host to the
destination host by looking at the IP addresses in the packet headers. IP has 2 versions:
IPv4 and IPv6. IPv4 is the one that most of the websites are using currently. But IPv6 is growing as the
number of IPv4 addresses are limited in number when compared to the number of users.
ICMP – stands for Internet Control Message Protocol. It is encapsulated within IP datagrams and is
responsible for providing hosts with information about network problems.
ARP – stands for Address Resolution Protocol. Its job is to find the hardware address of a host from a
known IP address. ARP has several types: Reverse ARP, Proxy ARP, Gratuitous ARP and Inverse ARP
Host-to-Host Layer :
This layer is analogous to the transport layer of the OSI model.
It is responsible for end-to-end communication and error-free delivery of data.
It shields the upper-layer applications from the complexities of data.
The two main protocols present in this layer are :
Transmission Control Protocol (TCP) – It is known to provide reliable and error-free communication between
end systems. It performs sequencing and segmentation of data. It also has acknowledgment feature and
controls the flow of the data through flow control mechanism. It is a very effective protocol but has a lot of
overhead due to such features. Increased overhead leads to increased cost.
User Datagram Protocol (UDP) – On the other hand does not provide any such features. It is the go-to
protocol if your application does not require reliable transport as it is very cost-effective. Unlike TCP, which is
connection-oriented protocol, UDP is connectionless
Application Layer:
An application layer is the topmost layer in the TCP/IP mode
It is responsible for handling high-level protocols, issues of representation.
This layer allows the user to interact with the application.
When one application layer protocol wants to communicate with another application layer, it forwards its data
to the transport layer.
There is an ambiguity occurs in the application layer. Every application cannot be placed inside the
application layer except those who interact with the communication system.
For example: text editor cannot be considered in application layer while web browser using HTTP protocol
to interact with the network where HTTP protocol is an application layer protocol.
Following are the main protocols used in the application
layer:
HTTP: HTTP stands for Hypertext transfer protocol. This protocol allows us to access the data over the world wide web. It
transfers the data in the form of plain text, audio, video. It is known as a Hypertext transfer protocol as it has the efficiency to
use in a hypertext environment where there are rapid jumps from one document to another.
SNMP: SNMP stands for Simple Network Management Protocol. It is a framework used for managing the devices on the
internet by using the TCP/IP protocol suite.
SMTP: SMTP stands for Simple mail transfer protocol. The TCP/IP protocol that supports the e-mail is known as a Simple
mail transfer protocol. This protocol is used to send the data to another e-mail address.
DNS: DNS stands for Domain Name System. An IP address is used to identify the connection of a host to the internet
uniquely. But, people prefer to use the names instead of addresses. Therefore, the system that maps the name to the
address is known as Domain Name System.
TELNET: It is an abbreviation for Terminal Network. It establishes the connection between the local computer and remote
computer in such a way that the local terminal appears to be a terminal at the remote system.
FTP: FTP stands for File Transfer Protocol. FTP is a standard internet protocol used for transmitting the files from one
computer to another computer
Internet Layer :
This layer parallels the functions of OSI’s Network layer. It defines the protocols which are responsible for
logical transmission of data over the entire network.
The main protocols residing at this layer are :
IP – stands for Internet Protocol and it is responsible for delivering packets from the source host to the
destination host by looking at the IP addresses in the packet headers. IP has 2 versions:
IPv4 and IPv6. IPv4 is the one that most of the websites are using currently. But IPv6 is growing as the
number of IPv4 addresses are limited in number when compared to the number of users.
ICMP – stands for Internet Control Message Protocol. It is encapsulated within IP datagrams and is
responsible for providing hosts with information about network problems.
ARP – stands for Address Resolution Protocol. Its job is to find the hardware address of a host from a
known IP address. ARP has several types: Reverse ARP, Proxy ARP, Gratuitous ARP and Inverse ARP
What is Network Topology?
Network topology refers to how various nodes, devices, and connections on your network
are physically or logically arranged in relation to each other. The way a network is
arranged can make or break network functionality, connectivity, and protection from
downtime.
Categories -
Physical Network Topology
The physical network topology refers
to the actual connections (wires,
cables, etc.) of how the network is
arranged. Setup, maintenance, and
provisioning tasks require insight into
the physical network.
Logical Network Topology
Logical network topology is a little
more abstract and strategic,
referring to the conceptual
understanding of how and why the
network is arranged the way it is,
and how data moves through it.
Explanation -
● Physical topology explains the
arrangement of different nodes.
● Logical topology reflects the
communication of data between
various nodes.
● For example, in the picture, the
dotted line shows how PC-A is
connected to the server through the
switch.
Also, the data from PC-A will have
to pass through two switches & two
routers to reach PC-D.
This data flow is what logical
topology is concerned about.
NETWORK TOPOLOGY TYPES -
Bus Topology
• The bus topology is designed in such a way that all the
stations are connected through a single cable known as a
backbone cable.
• Each node is either connected to the backbone cable by
drop cable or directly connected to the backbone cable.
• When a node wants to send a message over the
network, it puts a message over the network. All the
stations available in the network will receive the message
whether it has been addressed or not.
• It is alternatively known as Line Topology.
BUS TOPOLOGY -
55
Ring Topology
Single Ring Topology
Dual - Ring Topology
• It is a type of network topology where each node is exactly connected to
two other nodes, thus forming a single continuous path for transmission.
• In a ring network, packets of data travel from one device to the next until
they reach their destination. Message transmission takes place with the help
of TOKEN.
• A number of repeaters are connected with large number of nodes.
• Single Ring Topology - Most ring topologies allow packets to travel only in
one direction, called a Unidirectional/Single Ring Topology.
• Dual Ring Topology - Others permit data to move in either direction,
called bidirectional/ Dual-Ring Topology.
56
PROS
• Only one station on the network is
permitted to send data at a time, which
greatly reduces the risk of packet
collisions.
• Additional workstations can be added
without impacting performance of the
network.
• These are cost-effective and
inexpensive to install
CONS
• All data being transferred over the
network must pass through each
workstation on the network, which can
make it slower than a star topology.
• The entire network will be impacted if
one workstation shuts down.
PROS OF DUAL-RING
• Very efficient - because each node has
two connections, information can be sent
both clockwise and counterclockwise
along the network.
• Dual ring topologies offer a little extra
security, too: if one ring fails within a
node, the other ring is still able to send
data.
Tree Topology -
• A tree topology is a special type of structure where many
connected elements are arranged like branches of tree.
• It has a parent-child hierarchy to how the nodes are
connected.
• This topology integrates various star topologies together in
a single bus, so it is known as a Star Bus topology.
PROS
• Tree topology is mainly used to provide
broadband transmission, i.e., signals are sent
over long distances without being attenuated.
• It provides high scalability as leaf nodes can
add more nodes in the hierarchical chain.
• Other nodes in network are not affected, if
one of their nodes get damaged.
• It provides easy maintenance and fault
identification.
CONS
• Large cabling is required as
compared to star and bus
topology.
• On the failure of a hub, the
entire network fails.
• Tree network is very difficult to
configure than other network
topologies.
Mesh Topology
• Mesh technology is an arrangement of the network in which
computers are interconnected with each other through various
redundant connections.
• There are multiple paths from one computer to another computer.
• It does not contain the switch, hub or any central computer which
acts as a central point of communication.
Types –
•Full Mesh Topology - Every computer in the network has a
connection to each of the other computers in that network.
•Partially – Connected Mesh Topology - At least two of the
computers in the network have connections to multiple other
computers in that network. If one of the primary computers or
connections in the network fails, the rest of the network continues to
operate normally.
PROS
CONS
• Very reliable - if any link breakdown will not affect the
communication between connected computers.
• Manages high amounts of traffic, because multiple
devices can transmit data simultaneously.
• The complex degree of interconnectivity between
nodes makes the network resistant to failure.
• Adding new devices would not disrupt the
communication between other devices.
• The cost to implement is higher than other
network topologies, making it a less desirable
option.
• Each interconnection between nodes requires
a cable and configuration once deployed, so it
can also be time-consuming to set up.
• The chance of redundant connections is high,
which adds to the high costs and potential for
reduced efficiency.
61
Hybrid Topology -
• Hybrid Topology is an integration of two or more
different topologies to form a resultant topology.
• For example, if there exist a ring topology in one branch
of ICICI bank and bus topology in another branch of ICICI
bank, connecting these two topologies will result in Hybrid
topology.
• NOTE - If similar topologies are connected with each
other will not result in Hybrid topology.
NETWORKING
TYPES
Local Area Network (LANs) -
• A local area network (LAN) is a computer network that interconnects computers within a limited
area such as a residence, school, laboratory, university campus, office etc.
• Range covered - 1km to 10km
• Cables used - Unshielded Twisted Pair (Ethernet Cables)
• Examples - Wifi & Ethernet
In the past, all nodes were connected through a common
cable, which meant that a packet sent from one host to
another was received by all hosts. The intended
recipient kept the packet; the others dropped the
packet.
Today, most LANs use a smart connecting switch, which
is able to recognize the destination address of the
packet and guide the packet to its destination without
sending it to all other hosts.
64
Metropolitan Area Network (MANs)
• A metropolitan area network (MAN) is a
computer network that connects computers within
a single large city, multiple cities and towns, or any
given large area with multiple buildings.
• A MAN is larger than a local area network (LAN)
but smaller than a wide area network (WAN).
• Range covered - 10km to 50km.
• Cables used - Fiber Optic Cables & Twisted Pair
Cables.
• Examples - Cable TV network, Telephone
networks providing high-speed DSL lines.
Wide Area Network (WANs) -
• WANs are used to connect LANs & MANs and other
types of networks together so that users and
computers in one location can communicate with users
and computers in other locations.
• WANs are often used by large businesses to connect
their office networks; each office typically has its own
local area network, or LAN, and these LANs connect
via a WAN.
• Range Covered - More than 50 kms.
• Cables Used – Fibre optic cables
• Example - Internet
Personal Area Network
• Personal Area Network (PAN) is a the computer network that connects computers/devices within the range of
an individual person. It typically involves a computer, phone, tablet, printer, PDA (Personal Digital Assistant)
etc.
• Range covered - less than 10 meters.
Types of PAN -
Wireless PAN –
WPAN is connected
through signals such as
infrared, Bluetooth and
ultra wideband etc.
Wired PAN –
Wired PAN is
connected through
cables/wires such
as USB.
NETWORKING
TRANSMISSION MEDIA
NETWORKING TRANSMISSION MEDIA-
• The transmission medium can be defined as a pathway that can transmit
information from a sender to a receiver.
• Transmission media are located below the physical layer and are controlled by
the physical layer.
• Transmission media are also called communication channels.
• Transmission media are of two types −
Guided Transmission Medium
Unguided Transmission Medium
Types Of Transmission Media -
Guided Transmission Medium-
Guided transmission media are also called bounded
media or wired media. They comprise cables or wires
through which data is transmitted. They are called guided
since they provide a physical conduit from the sender device
to the receiver device. The signal traveling through these
media are bounded by the physical limits of the medium.
The most popular guided media are −
• Twisted pair cable
• Coaxial cable
• Fiber optics
Twisted Pair -
Issues:
(1) Interference due to unwanted electrical coupling of two copper
(2) Interference due to unwanted electrical coupling between the
neighboring twisted pairs
Twisted pair is a physical media made up of a pair of cables twisted with each other. A
twisted pair cable is cheap as compared to other transmission media. Installation of the
twisted pair cable is easy, and it is a lightweight cable. The frequency range for twisted
pair cable is from 0 to 3.5KHz.
A twisted pair consists of two insulated copper wires arranged in a regular spiral
pattern.
The degree of reduction in noise interference is determined by the number of turns per
foot. Increasing the number of turns per foot decreases noise interference.
Twisted Pair
Applications
o Most commonly used medium
o Telephone network
o Between house and local exchange
(subscriber loop)
o Within buildings
o To private branch exchange (PBX)
o For local area networks (LAN)
o 10Mbps or 100Mbps
Advantages of Twisted pair cable :
•It are often wont to carry both analog and digital data.
•It’s relatively easy to implement and terminate.
•It is the smallest amount expensive media of transmission for brief distances.
•If portion of a twisted pair cable is broken it doesn’t effect the whole network.
•Less vulnerable to electrical interference caused by nearby equipment or wires.
•It cause interference themselves.
•Best performance in short distances.
•High-cost performance
Disadvantages of Twisted pair cable :
•It result signal distortion in a very effective manner.
•Attenuation is very high.
•It supports 10 mbps upto a distance of 100 meters on a 10BASE-T which are considered to be
low bandwidth.
•It provides poor security and is relatively easy to tap.
•As they a thin so can be easily breakable.
•Low durability (must be maintained regularly).
•Susceptible to electromagnetic interference (EMI).
Types of Twisted pair:
• Unshielded Twisted Pair (UTP)
—Ordinary telephone wire
—Less expensive
—Weak immunity against noise and interference
—Suffers from external EM interference
• Shielded Twisted Pair (STP)
—An extra metallic sheath on each pair
—Relatively more expensive
—Provide better performance than UTP
• Increased Data rate
• Increased Bandwidth
Unshielded and Shielded TP
Coaxial Cable
Architecture:
•Coaxial cable is very commonly used transmission media, for
example, TV wire is usually a coaxial cable.
•The name of the cable is coaxial as it contains two conductors
parallel to each other.
•It has a higher frequency as compared to Twisted pair cable.
•The inner conductor of the coaxial cable is made up of copper,
and the outer conductor is made up of copper mesh. The middle
core is made up of non-conductive cover that separates the inner
conductor from the outer conductor.
•The middle core is responsible for the data transferring whereas
the copper mesh prevents from the EMI(Electromagnetic
interference).
• Television (TV) signals distribution
• Ariel to TV
• Cable TV
• Long distance telephone transmission
• Can carry 10,000 voice calls simultaneously
• Being replaced by fiber optic
• Short distance computer systems links
• Local area networks (LAN)
• Metropolitan area network (MAN)
Coaxial Cable
Applications
Advantages Of Coaxial cable:
•The data can be transmitted at high speed.
•It has better shielding as compared to twisted pair
cable.
•It provides higher bandwidth
.
Disadvantages Of Coaxial cable:
•It is more expensive as compared to twisted pair
cable.
•If any fault occurs in the cable causes the failure in
the entire network.
Fibre Optic
•Fibre optic cable is a cable that uses electrical signals for communication.
•Fibre optic is a cable that holds the optical fibres coated in plastic that are used to send the data by pulses of light.
•The plastic coating protects the optical fibres from heat, cold, electromagnetic interference from other types of wiring.
•Fibre optics provide faster data transmission than copper wires.
Diagrammatic representation of fibre optic cable:
Basic elements of Fibre optic cable:
•Core:
The optical fibre consists of a narrow strand of glass or plastic known as
a core. A core is a light transmission area of the fibre. The more the area
of the core, the more light will be transmitted into the fibre.
•Cladding:
The concentric layer of glass is known as cladding. The main
functionality of the cladding is to provide the lower refractive index at the
core interface as to cause the reflection within the core so that the light
waves are transmitted through the fibre.
•Jacket:
•The protective coating consisting of plastic is known as a jacket. The
main purpose of a jacket is to preserve the fibre strength, absorb shock
and extra fibre protection.
Unguided Transmission Medium
Unguided transmission media are also called wireless media. They transport data in the
form of electromagnetic waves that do not require any cables for transmission. These
media are bounded by geographical boundaries. These type of communication is
commonly referred to as wireless communications.
Unguided signals can travel in three ways −
•Ground propagation
•Sky propagation
•Line – of – sight propagation
The commonly used unguided transmissions are −
•Radio transmission
•Microwave transmission
•Infrared transmission
•Light transmission
Propagation methods
Unguided signals travels from the source to destination in several ways it is
known as propagation.
They are three types:
▪ Ground propagation
▪ Sky propagation
▪ Line-of-Sight Propagation
▪ Omnidirectional Antenna
▪ Frequencies between 3 KHz and 1 GHz.
▪ Used for multicasts(multiple way) communications, such as
radio and television, and paging system.
▪ Radio waves can penetrate buildings easily, so that widely use
for indoors & outdoors communication.
Unguided Media – Radio Waves
An Antenna is a structure that is generally a metallic object may be a wire or group of wires,
used to convert high frequency current into electromagnetic waves.
Antenna are two types:
• Transmission antenna
▪ Transmit radio frequency from transmitter
▪ Radio frequency then
Convert to electromagnetic energy by antenna
▪ Then, radiate into surrounding environment
• Reception antenna
▪ Electromagnetic energy get in antenna
▪ Then Antenna convert radio frequency to electrical energy
▪ Then, Goes to receiver
same antenna can be used for both purposes
Antennas
Microwaves are ideal when large areas need to be covered and there are no obstacles in the path
Microwaves
Micro waves Transmission
• Microwaves are unidirectional
• Micro waves electromagnetic waves having frequency between 1 GHZ
and 300 GHZ.
• There are two types of micro waves data communication system
: terrestrial and satellite
• Micro waves are widely used for one to one communication
between sender and receiver,
example: cellular phone, satellite networks and in wireless
LANs(wifi), WiMAX,GPS
▪ Frequencies between 300 GHz to 400 THz.
▪ Used for short-range communication
▪ Example: Night Vision Camera,Remote control, File sharing
between two phones, Communication between a PC and peripheral
device,
INFRARED
What are network devices?
Network Devices are components used to connect computers or
other electronics devices together so that they can share files or
resources like printers or fax machine
NETWORKING DEVICES
Types of Networking Devices -
•Hub
•Switch
•Router
•Bridge
•Gateway
•Modem
•Repeater
•Access Point
HUB
• A hub is a physical layer networking device which is used to
connect multiple devices in a network. They are generally
used to connect computers in a LAN.
• A hub has many ports in it. A computer which intends to be
connected to the network is plugged in to one of these ports.
When a data frame arrives at a port, it is broadcast to every
other port, without considering whether it is destined for a
particular destination or not.
Types of Hub
1 Active hub
These hubs regenerate our signals as well as amplify the signal.
Active hubs need electricity to work.
2 Passive hub
Talking about passive hubs, it simply distributes the signal coming
from the previous ports. Passive hub neither regenerates any signal nor
amplifies, therefore it does not require electricity to work.
3 Intelligence hub
This helps the administrator to monitor network traffic, and you can
configure each port on it individually, also known as a manageable hub.
Switch
• A switch is a data link layer networking
device which connects devices in a
network and uses packet switching to
send and receive data over the network.
• Like a hub, a switch also has many ports,
to which computers are plugged in.
However, when a data frame arrives at
any port of a network switch, it examines
the destination address and sends the
frame to the corresponding device(s).
Thus, it supports both unicast and
multicast communications.
Router
• A router is a device like a switch that routes data packets
based on their IP addresses. Router is mainly a Network
Layer device. Routers normally connect LANs and WANs
together and have a dynamically updating routing table
based on which they make decisions on routing the data
packets. Router divide broadcast domains of hosts
connected through it.
• There are wired, wireless, core, edge and virtual routers
available. Routers usually select the best route to direct the
packets to reach faster. The best example is mail carrier.
Bridge
• Bridges are used to connect two or more hosts or
network segments together. The basic role of bridges in
network architecture is storing and forwarding frames
between the different segments that the bridge connects.
They use hardware Media Access Control (MAC)
addresses for transferring frames.
• Bridges can also be used to connect two physical LANs
into a larger logical LAN.
• Bridges work only at the Physical and Data Link layers of
the OSI model.
• Bridges are like hubs in many respects, including the fact
that they connect LAN components with identical
protocols. However, bridges filter incoming data packets,
known as frames, for addresses before they are
forwarded.
GATEWAY
• Gateways normally work at the Transport and
Session layers of the OSI model. At the
Transport layer and above, there are numerous
protocols and standards from different vendors;
gateways are used to deal with them.
Gateways provide translation between
networking technologies such as Open System
Interconnection (OSI) and Transmission
Control Protocol/Internet Protocol (TCP/IP).
• Gateways perform all of the functions of routers
and more. In fact, a router with added
translation functionality is a gateway.
Modem
• Modems (modulators-demodulators) are used to transmit digital signals over
analog telephone lines. Thus, digital signals are converted by the modem
into analog signals of different frequencies and transmitted to a modem at
the receiving location. The receiving modem performs the reverse
transformation and provides a digital output to a device connected to a
modem, usually a computer.
• A modem works as a Modulator and Demodulator both; that is; it modulates
and demodulates the signal between the binary data or digital data of a
computer and therefore the analog signal of a telephone line.
Repeater
A repeater is an electronic device that amplifies the signal it
receives. You can think of repeater as a device which receives a
signal and retransmits it at a higher level or higher power so that
the signal can cover longer distances, more than 100 meters for
standard LAN cables. Repeaters work on the Physical layer.
Access point
A wireless access point (WAP) is a networking
device that allows wireless-capable devices to
connect to a wired network. It is simpler and
easier to install WAPs to connect all the
computers or devices in your network than to
use wires and cables.
PSTN
(Public Switched
Telephone Network)
What is PSTN?
● The Public Switched Telephone Network(PSTN), also known as Plain Old Telephone
Service(POTS), is the wired phone system over which landline telephone calls are
made.
● The PSTN relies on circuit switching. To connect one phone to another, the phone call
is routed through numerous switches operating on a local, regional and national or
international level.
● These network of telephone lines are owned by both governments as well as
commercial organizations.
Circuit Switching Technique
Now here comes the circuit switching technique on which PSTN relies on:-Communication via circuit switching implies that
there is a dedicated communication path between the two stations. The path is connected through a sequence of links between
network nodes.
CIRCUIT ESTABLISHMENT: To establish an end-to-end connection before any transfer of data. Some segments of the circuit
may be a dedicated link, while some other segments may be shared.
DATA TRANSFER: Transfer of data is from the source to the destination. The data may be analog or digital, depending on the
nature of network. The connection is generally full-duplex.
CIRCUIT DISCONNECT: Terminate connection at the end of data transfer. Signals must be propagated to deallocate the
dedicated resources.
HISTORY
● It has evolved from the invention of telephone by Alexander Graham Bell.
● In early days phone calls traveled as analog signals across copper wire. Every
phone call needed its own dedicated copper wire connecting the two phones.
● The operators sat at a switchboard, literally connecting one piece of copper wire
to another so that the call could travel across town or across the country.
● Long-distance calls were comparatively expensive, because you were renting the
use of very long piece of copper wire every time you made a call.
● Present telephone signals are tightly coupled with WANs(Wide Area
networks) and are used for both data and voice communications.
Levels in PSTN
The switching centers used for switching are organized in different levels, namely:-
● Regional offices(Level 1)
● Section offices(Level 2)
● Primary offices(Level 3)
● Toll offices(Level 4)
● End offices(Level 5)
Level 1 is at the highest level and
Level 5 is the lowest level.
Figure:Basic organization of a Public Switched Telephone Network(PSTN)
EXPLANATION
● Subscribers or the customers are directly connected to these end offices. And each office is
connected directly to a number of offices at a level below and mostly a single office at higher
level. Subscriber Telephones are connected, through Local Loops to end offices(or central
offices).
● A small town may have only one end office, but large cities have several end offices.
● Many end offices are connected to one Toll office, which are connected to primary offices.
● Several primary offices are connected to a Section office, which normally serves more than one
state.
● All regional offices are connected using mesh topology. Accessing the switching station at the
end offices is accomplished through dialing.
● In the past, telephone featured rotary or pulse dialing, in which digital signals were sent to the
end office for each dialed digit.
● This type of dialing was prone to errors due to inconsistency in humans during dialing.
Cont…..
● Presently, dialing is accomplished by Touch-Tone technique.
● In this method the user sends a small burst of frequency called dual tone, because it is a
combination of two frequencies.
● This combination of frequencies sent depends on the row and column of the pressed pad.
● The connections are multiplexed when have to send to a switching office, which is one level
up. For example, Different connections will be multiplexed when they are to be forwarded
from an end office to Toll office. Figure shows a typical medium distance telephone circuit.
Figure:Typical medium distance telephone circuit
Structure Of The Telephone System
● Shortly after Alexander Graham Bell patented the phone in 1876 (just hours before its
competitor, Elisha Gray), his new invention became indispensable.
● As new inventions came and according to comfortability , there were many structures but
mainly 3 were there which are -
1. Fully Interconnected Network
2.Centralized switch
3.Two-level hierarchy
1. Fully Interconnected Network
● The initial market was the sale of handsets in pairs.
● It was up to the customer to connect a single cable between them.
● If the owner of the phone wanted to speak with other owners of the phone, separate
cables had to be connected to all the homes.
● During the year, the city was covered with cables that passed over homes and trees
in wild confusion.
● Once it became clear that the model to connect all phones on all the rest of the
phone, shown in the following figure.
2. Centralized switch
● The company sent a telegram to each home or office of each client.
● To make a call, the customer had to start the phone so that a call signal sounded in
the telephone company’s office to catch the operator’s attention.
● He then had to manually connect the caller to the caller using a connection cable.
● In short, to connect it. The model called Single Switching Office Model is shown in the
following figure.
3. Two-level hierarchy
● Very quickly, Bell switching centers appeared everywhere and people wanted to
make long-distance calls between cities.
● The Bell System has started to connect switching centers.
● The initial problem quickly returned: the connection of each wire center to any
other wire-connected switching center quickly became out of control, so second-
level switching centers were invented.
● After a while, it took several second-level offices, as shown in the following figure.
The Local Loop: Modems, ADSL, and Fiber
● The local loop is often called the “last mile”, although it can be several
kilometers long. It has been carrying analog information for over 100 years
and will likely continue to do so for many years due to the high cost of digital
conversion.
● Telephone modems transmit digital data between computers over a narrow
channel provided by the telephone network for voice calls. They were once
widely used, but have been largely supplanted by broadband technologies such
as ADSL. reuse the local loop to send digital data from the customer to the final
office, where it is transmitted to the Internet.
● The following local loops are often considered important:
1.Telephone Modems
● Telephone modems are used to transfer bits between two computers on a
voice phone line, rather than for a conversation, which usually occupies the
line.
● The main difficulty is that the voice telephone line is limited to 3,100 Hz,
which is enough for a conversation. This bandwidth is more than four orders
of magnitude less than the bandwidth used for Ethernet or 802.11 (WiFi). As
expected, data rates for telephone modems are also four orders of magnitude
lower than those for Ethernet and 802.11.
● Logically, a modem is inserted between the computer (digital) and the
telephone system (analog), as shown in the following figure:
Figure: The use of both analog and digital transmission for a computer-to-computer call.
2.Digital Subscriber Lines
● Initially, there were several high-speed incrustations under the general name
xDSL (digital subscriber line) for several x’s.
● Services with more bandwidth than standard telephone services are sometimes
called broadband, although this term is a marketing concept rather than a
specific technical concept.
● Unfortunately, the capacity of the local loop decreases quite rapidly with the
distance from the end office, as the signal deteriorates along the cable. It also
depends on the thickness and overall quality of the twisted pair.
● The graph of potential bandwidth versus distance is shown in the following
figure. In this figure, it is assumed that all other factors are optimal (new cables,
modest packages, etc.).
3.Fiber To The Home
● In general, fiber houses are combined so that only one fiber reaches the final office per
group of 100 houses.
● In the downward direction, the optical dividers divide the final desktop signal so that it
reaches all the homes. Encryption is necessary for security if only one house can decode a
signal.
● Upward, the optical adders combine the house signals into a single signal, which is
received in the last office. This architecture is called PON (passive optical network) and is
shown in the following figure.
● In general, for all downlink channels, the total wavelength is used for transmission in the
downstream direction and another wavelength is used for transmission in the upstream
direction.
Figure: Passive optical network for Fiber to The Home.
Trunks and Multiplexing
● The heart of the telephone network carries digital and non-analog information.
● This requires scanning in the end office for transmission over long-distance lines.
● Long-distance lines make thousands, if not millions, of calls at the same time.
● This exchange in trunks and multiplexing is important for achieving economies of
connecting
scale, as the installation and maintenance of a high-capacity backbone cost
two
essentially the same amount as the low-capacity mainline
switching offices.
● This is achieved by using some trunks and multiplexing versions.
1. Digitizing Voice Signals
2. Time Division Multiplexing
3. SONET/SDH
4. Wavelength Division Multiplexing
1.Digitizing Voice Signals
● Digitizing Voice Signals at the beginning of the development of
the telephone network, the kernel handled voice calls as analog
information.
● Wavelength Division Multiplexing methods have been used for
many years to multiplex voice channels of 4,000 Hz (composed of
3,100 Hz plus guard bands) into larger and larger blocks.
2.Time Division Multiplexing
● PCM-based Time Division Multiplexing is used to transmit multiple voice calls over
trunks by sending a sample of each call every 125 μsec.
● When digital transmission became a viable technology, the ITU (then called
CCITT) could not agree on an international standard for the MIC.
● As a result, various incompatible systems are being used in different countries
around the world.
3.SONET/SDH
● In 1985, Bell-core, RBOC’s research department, began working on a standard called
SONET/SDH (Synchronous Optical Network). Design SONET/SDH pursued four main
objectives.
● First of all, SONET/SDH had to ensure the interaction of the different operators. To
achieve this goal, it was necessary to define a common signaling standard for
wavelength, duration, frame structure, and other problems.
● Secondly, means are needed to integrate digital EE systems. The European Union,
Europe, and Japan, all based on 64 kbps PCM channels, but combined in different
(and incompatible) ways.
● Third, SONET/SDH was supposed to provide a way to multiplex several digital
channels. At the time of SONET’s design, the fastest digital operator, widely used in
the United States, was T3 at 44,736 Mbit / s. T4 has been defined, but little has been
used and nothing has been defined above the speed of T4. Part of SONET’s mission
was to continue the hierarchy up to gigabits / s and up. A standard method of
multiplexing slower channels in a SONET/SDH channel was also needed.
● Fourth, SONNET/SDH must support the operations, administration, and maintenance
(OAM) required to administer the network. The previous systems are not very good
and can’t do this very well.
4.Wavelength Division Multiplexing
● Frequency division multiplexing, as well as Time Division Multiplexing, is used to exploit
the enormous bandwidth of optical fiber channels. This is called Wavelength Division
Multiplexing (WDM ).
● Here, four fibers are combined in an optical adder, each having energy having a different
wavelength.
● Four beams are combined into a common fiber for transmission to a remote
destination.At the opposite end, the beam is divided into as many fibers as there were at
the entrance.
● Each output fiber contains a short core specially designed to filter all wavelengths minus
one.The resulting signals can be sent to the destination or can be combined in different
ways for additional multiplex transport.
Wireless Local Area
Network (WLAN)
INTRODUCTION
WLAN stands for Wireless Local Area Network or Local Area Wireless
Network (LAWN) .
Norman Abramson, a professor at the University of Hawaii, developed
the world’s first wireless computer communication network , ALOHA
net (operational in 1971).
INTRODUCTION
WLAN is a wireless computer network that link two or more devices
(using spectrum or OFDM radio) with in a limited area such as a
home, school, computer laboratory.
WLAN is marketed under the Wi-Fi brand name.
Wireless LAN’s have become popular in home due to ease of
installation and use.
ADVANTAGES OF WLAN
● Installation flexibility.
● Few transmitters/receivers for multiple of users.
● No cable to pull.
● Reduced cost-of-ownership.
● Mobile devices are less expensive than computer workstations
● No need to build wiring closets.
ADVANTAGES OF WLAN
● Mobility
• Access to real time information.
• Provides service opportunities.
• Promotes flexibility.
• Support Productivity.
DISADVANTAGES OF WLAN
● Cost
● Wireless networks card cost 4 times more than wired network card.
● The access points are more expensive than hubs and wires.
● Environmental Conditions
• Constrained by building, trees and terrain.
• Susceptible to weather and solar activity.
● Less capacity : Slower bandwidth.
TYPES OF WLAN
1) INFRASTRUCTURE
•Most Wi-Fi networks are deployed in infrastructure mode.
• In infrastructure mode, a base station acts as a wireless access point hub, and nodes
communicate through the hub. The hub usually, but not always, has a wired
or fiber network connection, and may have permanent wireless connections to other nodes.
• Wireless access points are usually fixed, and provide service to their client nodes within range.
• Wireless clients, such as laptops, smart phones etc. connect to the access point to join the
network.
TYPES OF WLAN
2) Peer to Peer
• Two PCs equipped with wireless adapter cards can be set up as an
independent network whenever they are within range of one another.
• A peer-to-peer network allows wireless devices to directly
communicate with each other.
TYPES OF WLAN
3) BRIDGE
• A bridge can be used to connect networks, typically of different types.
• A wireless Ethernet bridge allows the connection of devices on a wired
Ethernet network to a wireless network.
• The bridge acts as the connection point to the Wireless LAN.
TYPES OF WLAN
4)Wireless distribution system
• A Wireless Distribution System enables the wireless
interconnection of access points in an IEEE 802.11 network.
Wireless LAN Components
Wireless LANs consist of components similar to traditional Ethernet-wired LANs. In
fact, wireless LAN protocols are similar to Ethernet and comply with the same form
factors. The big difference, however, is that wireless LANs don't require wires.
1. User Devices
Users of wireless LANs operate a multitude of devices, such as PCs, laptops, and
PDAs. The use of wireless LANs to network stationary PCs is beneficial because of
limited needs for wiring. Laptops and PDAs, however, are commonly equipped with
wireless LAN connectivity because of their portable nature. User devices might
consist of specialized hardware as well.
Wireless LAN Components
2) Radio NICs
A major part of a wireless LAN includes a radio NIC that operates within the computer device
and provides wireless connectivity. A wireless LAN radio NIC, sometimes referred to as a
radio card, often implements the 802.11 standard. The cards generally implement one
particular physical layer, such as 802.11a or 802.11b/g. As a result, the radio card must utilize
a version of the standard that is compatible with the wireless LAN. Wireless LAN radio cards
that implement multiple versions of the standard and provide better interoperability are
becoming more common.
Radio cards come in a variety of form factors, including: ISA, PCI, PC card, mini-PCI, and CF.
PCs generally utilize ISA and PCI cards; but PDAs and laptops use PC cards, mini-PCI, and CF
adapters.
Wireless LAN Components
3) Access Points
An access point contains a radio card that communicates with
individual user devices on the wireless LAN, as well as a wired NIC that
interfaces to a distribution system, such as Ethernet. System software
within the access point bridges together the wireless LAN and
distribution sides of the access point. The system software
differentiates access points by providing varying degrees of
management, installation, and security functions. Figure 5-1 shows an
example of access-point hardware.
Wireless LAN Components
4) Routers
By definition, a router transfers packets between networks. The router chooses the next
best link to send packets on to get closer to the destination. Routers use Internet Protocol
(IP) packet headers and routing tables, as well as internal protocols, to determine the best
path for each packet.
A wireless LAN router adds a built-in access point function to a multiport Ethernet router.
This combines multiple Ethernet networks with wireless connections. A typical wireless
LAN router includes four Ethernet ports, an 802.11 access point, and sometimes a parallel
port so it can be a print server. This gives wireless users the same ability as wired users to
send and receive packets over multiple networks
Wireless LAN Components
5) Repeaters
Access points, which require interconnecting cabling, generally play a dominant
role for providing coverage in most wireless LAN deployments. Wireless
repeaters, however, are a way to extend the range of an existing wireless LAN
instead of adding more access points. There are few standalone wireless LAN
repeaters on the market, but some access points have a built-in repeater
mode.
Wireless LAN Components
6) Antennae
Most antennae for wireless LANs are omnidirectional and have low gain. Nearly
all access points, routers, and repeaters come standard with omnidirectional
antenna. Omnidirectional antenna satisfy most coverage requirements; however,
consider the use of optional directive antennae to cover a long, narrow area. In
some cases, the antenna is integrated within a radio card or access point and
there is no choice to make. If a need exists to use a directive antenna (higher gain),
ensure that the radio card or access point has an external antenna connector.
TIME DIVISION
MULTIPLEXING
• Multiplexing to refer to the combination of information streams from multiple sources for
transmission over a shared medium.
• Multiplexer is a mechanism that implements the concept
• Demultiplexing to refer to the separation of a combination back into separate information
streams.
• Demultiplexer to refer to a mechanism that implements the concept.
• Figure illustrates the concept
• each sender communicates with a single receiver
• all pairs share a single transmission medium
• multiplexor combines information from the senders for transmission in such a way that the
demultiplexor can separate the information for receivers
MULTIPLEXING:
Need of Multiplexing :-
• Transmitting two or more signals simultaneously can be accomplished by setting up one
transmitter- receiver pair for each channel, but this is an expensive approach.
• A single cable or radio link can handle multiple signals simultaneously using a technique
known as multiplexing.
• Multiplexing permits hundreds or even thousands of signals to be combined and transmitted
over a single medium.
• Cost savings can be gained by using a single channel to send multiple information
signals.
1
4
0
Multiplexingin networks -
The Basic Types of Multiplexing -
There are four basic approaches to multiplexing that each have a set of variations and
implementations
• Frequency Division Multiplexing (FDM)
• Wavelength Division Multiplexing (WDM)
• Time Division Multiplexing (TDM)
• Code Division Multiplexing (CDM)
•TDM and FDM are widely used
•WDM is a form of FDM used for optical fiber
•CDM is a mathematical approach used in cell phone mechanisms
Time Division Multiplexing (TDM) -
• Usually used with digital signals or analog signals carrying digital data
• Data from various sources are carried in repetitive frames
• Each frame consists of of a set of time slots
• Each source is assigned one or more time slots per frame.
Time Division Multiplexing -
Definition: Time Division Multiplexing (TDM) is the time interleaving of samples from several
sources so that the information from these sources can be transmitted serially over a single
communication channel.
At the Transmitter
• Simultaneous transmission of several signals on a time-sharing basis.
• Each signal occupies its own distinct time slot, for the duration of the transmission.
• Slots may be permanently assigned on demand.
At the Receiver
• Decommutator (sampler) has to be synchronized with the incoming waveform
Frame Synchronization
• Applications of TDM: Digital Telephony, Data communications, Satellite Access, Cellular radio.
TDM -
Composition of one frame of a multiplexed PAM signal incorporating four voice- signals
and a synchronizing pulse.
Synchronous TDM
• TDM is a broad concept that appears in many forms
• It is widely used throughout the Internet
• Figure shows items being sent in a round-robin fashion
• Most TDMs work this way
• No gap occurs between bits if a communication system uses synchronous transmission.
• When TDM is applied to synchronous networks, no gap occurs between items; the result is known as
Synchronous TDM
•Figure illustrates how synchronous TDM works for a system of four senders.
SynchronousTDM
•Data rate of medium exceeds data rate of digital signal to be transmitted
•Multiple digital signals interleaved in time
•May be at bit level of blocks
•Time slots preassigned to sources and fixed
•Time slots allocated even if no data
•Time slots do not have to be evenly distributed amongst sources
Synchronous Time Division Multiplexing
• Telephone systems use synchronous TDM to multiplex digital streams
from multiple phone calls
• They use the acronym TDM to refer to the specific form of TDM used to
multiplex digital telephone calls
• The phone system TDM includes an interesting technique to ensure that a
demultiplexer stays synchronised with the multiplexer
• Why is synchronisation needed?
•observe that a synchronous TDM sends one slot after another without
any indication of the output to which a given slot occurs
•A demultiplexer cannot tell where a slot begins– a slight difference in the
clocks used to time bits can cause a demultiplexer to misinterpret the bit
stream.
•To prevent misinterpretation, the version of TDM used in the phone system
includes an extra framing channel as input
•Instead of taking a complete slot, framing inserts a single bit in the stream on
each round
•A demultiplexer extracts data from the framing channel and checks for
alternating 0 and 1 bits
•If an error causes a demultiplexer to lose a bit
•it is highly likely that the framing check will detect the error and allow the
transmission to be restarted
•Figure illustrates the use of framing bits
Framing Used in the Telephone System Version of TDM -
The Problem with Synchronous TDM: Unfilled Slots
• Synchronous TDM works well if each source produces data at a uniform, fixed rate equal to 1/N of the
capacity of the shared medium
• Many sources generate data in bursts, with idle time between bursts
• To understand why, consider the example in Figure

• Sources on the left produce data items at random the synchronous multiplexor leaves a
slot unfilled if the corresponding source has not produced an item by the time the slot
must be sent.
• In practice, a slot cannot be empty because the underlying system must continue
to transmit data
• the slot is assigned a value (such as zero)
• and an extra bit is set to indicate that the value is invalid
How can a multiplexing system make better use of a shared medium?
•One technique to increase the overall data rate is known as statistical TDM or
statistical multiplexing or Asynchronous TDM
•Some literature uses the term asynchronous TDM
•The technique is straightforward:
•select items for transmission in a round-robin fashion
•but instead of leaving a slot unfilled, skip any source that does not have data
ready
•By eliminating unused slots
• statistical TDM takes less time to send the same amount of data
•Figure illustrates how a statistical TDM system sends the data from Figure in only
8 slots instead of 12
Asynchronous TDM
• Statistical multiplexing incurs extra overhead shown below:
•Consider demultiplexing:
• In a synchronous TDM system a demultiplexer knows that every
N slot corresponds to a given receiver
• In a statistical multiplexing system, the data in a given slot can
correspond to any receiver.
• Each slot must contain the identification of the receiver to which
the data is being sent
• Output data rate less than aggregate input rates
• May cause problems during peak periods
• Buffer inputs
• Keep buffer size to minimum to reduce delay
4
Synchronous TDM vs. Statistical TDM
Advantages of TDM :
• Full available channel bandwidth can be utilized for each channel.
• TDM circuitry is not very complex.
• The problem of crosstalk is not severe.
• Only one carrier in the medium at any time
• Throughput high even for many users.
Disadvantages of TDM :
• Synchronization is essential for proper operation.
• Requires A/D conversions at high rate.
• Requires larger bandwidth.
• Probability of error or Bit Error Rate
UNIT 2
 ERROR DETECTION AND CORRECTION –
FUNDAMENTALS, BLOCK CODING , HAMMING
DISTANCE , CRC
 FLOW CONTROL PROTOCOLS ,STOP AND
WAIT, GO BACK N ARQ, SELECTIVE REPEAT
ARQ, SLIDING WINDOW, PIGGYBACKING
 MULTIPLE ACCESS PROTOCOL- ALOHA, CSMA,
CSMA/CA AND CSMA/CD
Error detection and
Correction –
Fundamentals, Block
coding , Hamming
distance , CRC
Fundamentals
 Networks must be able to transfer data from one device to another with
complete accuracy.
 Data can be corrupted during transmission.
 For reliable communication, errors must be detected and corrected.
 Error detection and correction are implemented either at the data link layer
or the transport layer of the OSI model.
Fundamentals-Types of errors
Fundamentals - Single Bit error
 This error occurs when only one bit in the data unit has changed
(ex : ASCII STX - ASCII LF)
Fundamentals – Multi Bit error
 This error occurs when two or more non-consecutive bits in the data unit
have changed(ex : ASCII B - ASCII LF)
Fundamentals – Burst error
 Burst error means that 2 or more consecutive bits in the data unit have
changed
Fundamentals – Redundancy
 The central concept in detecting or correcting errors is redundancy. To be
able to detect or correct errors, we need to send some extra bits with our
data.
 These redundant bits are added by the sender and removed by the
receiver. Their presence allows the receiver to detect or correct corrupted
bits.
Fundamentals – Redundancy
Types :-
They are four types of redundancy checks that are used in data
communications.
 vertical redundancy check (VRC)
 longitudinal redundancy check (LRC)
 cyclic redundancy check (CRC)
 checksum
Block Coding
 In block coding, we divide our message into blocks, each of k bits, called
datawords.
 We add r redundant bits to each block to make the length n = k + r. The
resulting n-bit blocks are called codewords.
Block Coding – Error detection
 Enough redundancy is added to detect an error.
 The receiver knows an error occurred but does not know which
bit(s) is(are) in error.
 Has less overhead than error correction
Block Coding – Error Correction
In error detection, the receiver needs to know only that the received
codeword is invalid
In error correction the receiver needs to find (or guess) the original
codeword sent.
We can say that we need more redundant bits for error correction than
for error detection.
Block Coding – Error Correction
Fig -Structure of encoder and decoder in error correction
Error detection : - Methods
Fig – error detection methods
Error detection Method :– Parity check
 A parity bit is added to every data unit so that the total number of
1s(including the parity bit) becomes even for even-parity check or
odd for odd-parity check
 1 . Simple parity check
Error detection Method :– Simple Parity check
In this Blocks of data from the sender are subjected to a check bit or parity bit
 In this a parity of 1 is added to the block if it contains odd number of 1’s, and 0 is
added if it contains even number of 1’s .
This scheme makes the total number of 1’s even, that is why it is called even parity
checking
Error detection Method :– Simple Parity check
Example :-
Suppose the sender wants to send the word world. In ASCII the five
characters are coded as
1110111 1101111 1110010 1101100 1100100
The following shows the actual bits sent
11101110 11011110 11100100 11011000 11001001
Note -A simple parity-check code can detect an odd number of errors.
Error detection Method :– Simple Parity check
Fig:- Encoder and decoder for simple parity-check code
Error detection Method :– 2D Parity check
 Parity check bits are calculated for each row, which is equivalent to a simple parity
check bit.
 Parity check bits are also calculated for all columns, then both are sent along with the
data.
 At the receiving end these are compared with the parity bits calculated on the
received data.
Error detection Methods :– 2D Parity check
Example :-
Suppose the following block is sent:
10101001 00111001 11011101 11100111 10101010
However, it is hit by a burst noise of length 8, and some bits are corrupted.
10100011 10001001 11011101 11100111 10101010
When the receiver checks the parity bits, some of the bits do not follow the even-
parity rule and the whole block is discarded.
10100011 10001001 11011101 11100111 10101010
Error detection Methods :– Cyclic redundancy check (CRC)
 Crc is based in binary division
 Given a k-bit frame or message, the transmitter generates an n-bit sequence,
known as a frame check sequence (FCS), so that the resulting frame, consisting of
(k+n) bits, is exactly divisible by some predetermined number.
 At the destination, the incoming data unit is divided by the same number. If at this
step there is no remainder, the data unit is assumed to be correct and is therefore
accepted.
Error detection Methods :– Cyclic redundancy check (CRC)
CRC Generator :-
 crc generator uses modular-2 division
Fig :- Binary Division
in a CRC Generator
Error detection Methods :– Cyclic redundancy check (CRC)
CRC checker :-
 crc checker uses modular-2 division
Fig :- Binary Division
in a CRC Checker
Error detection Methods :– Cyclic redundancy check (CRC)
Error detection Methods :– Cyclic redundancy check (CRC)
Note :- CRC generator(divisor) is most often represented not as a string of
1s and 0s, but as an algebraic polynomial. For example-
Error detection Methods :– CHECK SUM
Checksum used by the higher layer protocols
It is based on the concept of redundancy(VRC, LRC, CRC)
Fig :- Checksum
Generator
Error detection Methods :– CHECK SUM
 In checksum the data is divided into k segments each of m bits.
 The sections are added together using 1’s complement to get the sum for the senders.
 In the sum is complemented to get the checksum.
 The checksum segment is sent with the data segments.
 All received sections are added using 1’s
complement to get the sum for the receiver
 The sum is complemented. If the result is zero, the
received data is accepted; otherwise discarded
Error detection Methods :– CHECK SUM
Example :-
References
 Book - Data Communications and Networking By Behrouz A.Forouzan
 Book –Computer Networks, 5th Edition Andrew S. Tanenbaum, rije University, Amsterdam,
 Link –https://www.geeksforgeeks.org/category/computer-subject/computer-networks/
 Link - https://www.ijirem.org/search.php?searchtext=computer%20networks&type=All
ERROR CORRECTION
Need of Error Correction :
> There are numerous reasons such as noise , cross-talk etc. due to
which data gets corrupted during transmission.
> Most of the applications would not function expectedly(properly) if
they receive erroneous data from the transmitter.
> For error-free data processing , error correction techniques are used
to detect errors in transmitted messages and reconstructs the
original error-free data.
.
Error Correction Techniques :
The error correction techniques are of two types :-
> Single bit error correction : method of correcting single bit errors.
> Burst error correction : method of correcting burst errors in data
sequence.
In most of the communication networks and various digital systems ,
Hamming Distance Code technique is widely used for error correction.
Hamming Code ( for Error Correction ):
This error-correcting code technique is developed by developed by R.W
Hamming.
It is a set of error correcting codes which not only identifies the error bits in
whole data sequence but also corrects it.
For understanding the mechanism of Hamming code, the knowledge of
redundancy bits is needed..
> What are redundancy bits?
>> By the definition it is “The difference between number of bits of the actual
data sequence and the transmitted bits”.
Formally redundancy bits are extra binary bits that are added to info. carrying bits
to ensure that no bits were lost during the data transfer.
How the Hamming code
actually corrects the errors?
> Hamming code uses relation between redundancy bits and data bits.
> In Hamming code, the redundancy bits are placed at certain calculated
positions in order to eliminate errors.
And the distance between the two redundancy bits is called “Hamming
distance”.
Mechanism of Hamming Code :
To understand the mechanism of hamming code error correction , let’s go through
the following stages :
> Detection of parity bits: The number of parity bits to be added depends upon
the number of information bits of the transmitted data.
Number of parity bits will be calculated by the following relation..
2P >= n + P +1.
where n=number of data bits.
P=number of parity bits.
Mechanism of Hamming Code :
> Position of parity bits: After calculating the number of parity bits we need to
know the position of parity bits to be placed.
The ’P’ parity bits placed at bit positions of powers of 2, i.e. 1, 2, 4, 8, 16 etc.
These parity bits are referred as P1 (at position 1), P2 (at position 2), P3 (at
position 4), P4 (at position 8) and so on.
Mechanism of Hamming Code :
> Constructing a Bit Location Table: In Hamming code, we must find the value of
the parity bits to assign them a bit value.
Hamming code Example:
Let’s understand error corrections through an example:
Problem : We have to encode the data 1101 in even parity, by using Hamming code.
Soln. To solve we will go through the following steps:
Step 1 : Calculate the required number of parity bits.
Let P = 2, then
2P = 22 = 4 and n + P + 1 = 4 + 2 + 1 = 7.
2 parity bits are not sufficient for 4 bit data.
So let’s try P = 3, then 2P = 23 = 8 and n + P + 1 = 4 + 3 + 1 = 8
Therefore 3 parity bits are sufficient for 4 bit data.
The total bits in the code word are 4 + 3 = 7
Hamming code Example:
Step 2 : Constructing bit location table
Hamming code Example:
Step 3 : Determine the parity bits:
For P1 : 3, 5 and 7 bits are having three 1’s so for even parity, P1 = 1.
For P2 : 3, 6 and 7 bits are having two 1’s so for even parity, P2 = 0.
For P3 : 5, 6 and 7 bits are having two 1’s so for even parity, P3 = 0.
By inserting the parity bits code word formed is 1100101.
If the code word has all zeros , then there is no error in Hamming code.
References
Book - Data Communications and Networking By Behrouz A.Forouzan
Book – Networks, 5th Edition Andrew S. Tanenbaum, rije University, Amsterdam,
Link –https://www.geeksforgeeks.org/category/computer-subject/computer-networks/
Link - https://www.ijirem.org/search.php?searchtext=computer%20networks&type=All
FLOW CONTROL PROTOCOLS
Stop and wait
Go back N ARQ
Selective repeat ARQ
Sliding window
Piggybacking
FLOW CONTROL
● Flow control is design in Data Link Layer.
● Flow control is the process of managing the rate of data transmission between two nodes to
prevent a fast sender from overwhelming a slow receiver.
● There are two ways to control the flow of data:
1. Stop and Wait Protocol
2. Sliding Window Protocol
Stop and Wait Protocol
● It is the simplest flow control method. In this, the sender will send one frame at
a time to the receiver. Until then, the sender will stop and wait for the
acknowledgment from the receiver. When the sender gets the acknowledgment
then it will send the next data packet to the receiver and wait for the
acknowledgment again and this process will continue.
● There are four types of times while sending frames:
1. Transmission time
2. Propagation time
3. Queuing time
4. Processing time
Transmission time
● Time taken by the sender to send all the packet onto the outer going link is called
Transmission time/delay. It is denoted by (Tt).
This is calculated by dividing the data size/Length(L) which has to be sent by the
bandwidth(BW) of the link.
Tt = L / BW
Propagation time
● Time taken by the last bit of the frame to reach from one side to the other side is called
propagation time/delay. It is calculated by dividing the distance between the sender
and receiver by the wave propagation speed / velocity.
It is denoted by (Tp).
Tp = d / v
where d = distance between sender and receiver, s = wave propagation velocity
Queuing time:
Queuing delay is the sum of the delays encountered by a packet between the time of insertion into the
network and the time of delivery to the address.
This time will be very small.
It is denoted by Tq.
Processing time:
Processing time is also very small and when packet is in processing to ack,That time is called processing
time.
It is denoted by Tp.
Total Time
● The propagation delay for sending the data frame and the acknowledgment frame is the same
as distance and speed will remain the same for both frames. Hence, the total time required to
send a frame is
● Total time= Tt(Transmission Delay) + Tp(Propagation Delay for data frame) + Tp(Propagation
Delay for acknowledgment frame)
:Here Queuing time and processing time will be 0.
Total time=Tt+2Tp
The sender is doing work only for Tt time and for the rest 2Tp time the sender is waiting for the
acknowledgment.
We can find efficiency also
Efficiency = Useful Time/ Total Time
η=Tt / (Tt+2Tp) =1/(1+2(Tp/Tt))
η=1/1+2a
Where a=Tp/Tt.
Throughput
● Throughput refers to the amount of data that enters and goes through a
system. It is defines number of bits per second.
● if Tt+2Tp –L
1sec=L/ Tt+2Tp
Multiply And Divide by B.W. in L then
L/(BW)*BW/Tt+2Tp
=Tt*BW/(Tt+2Tp)
= η*BW
Advantages of Stop and Wait Protocol
1.It is very simple to implement.
Disadvantages of Stop and Wait Protocol
1.We can send only one packet at a time.
2.If the distance between the sender and the receiver is large then the propagation delay would be
more than the transmission delay. Hence, efficiency would become very low.
3.After every transmission, the sender has to wait for the acknowledgment and this time will
increase the total transmission time.
Example –
Tt=1msec
Tp=1msec
η will be
a=Tt/Tp= 1/1=1
η=1/1+2a
1/1+2(1)
=1/3
=.3333*100
=33.33%
Data Packet Lost in Stop And Wait
● Problems :
● 1. Lost Data: Deadlock condition
● Get Rid from this we need to Retransmit the packet If packet not come in the
sufficient time period called timeout timer.
● S and W + TOT
2. Lost Acknowledgement: Replicate packet problem
Get rid from this we need sequence number.
S and W + TOT + Sequence Number.
3. Delayed Acknowledgement/Data: Missing data packet problem.
After timeout on sender side, a long delayed acknowledgement might be
wrongly considered as acknowledgement of some other recent packet.
Sliding Window Protocol
● The sliding window is a technique for sending multiple frames at a time. It controls
the data packets between the two devices where reliable and gradual delivery of data
frames is needed. It is also used in TCP.
● Each frame has sent from the sequence number. The sequence numbers are used to
find the missing data in the receiver end. The purpose of the sliding window
technique is to avoid duplicate data, so it uses the sequence number.
● Types of Sliding Window Protocol:
1. Go-Back-N ARQ
2. Selective Repeat ARQ
Go-Back-N ARQ
● Go-Back-N ARQ protocol is also known as Go-Back-N Automatic Repeat Request.
It is a data link layer protocol that uses a sliding window method. In this, if any
frame is corrupted or lost, all subsequent frames have to be sent again.
● The size of the sender window is N in this protocol. For example, Go-Back-8, the
size of the sender window, will be 8. The receiver window size is always 1.
● If the receiver receives a corrupted frame, it cancels it. The receiver does not
accept a corrupted frame. When the timer expires, the sender sends the correct
frame again. The design of the Go-Back-N ARQ protocol is shown below.
Example: In Go–back 3 flow control protocol every 6th packet is lost. If we
have to send 11 packets. How many transmissions will be needed ?
-In Go back N, if we don’t receive acknowledgement for a packet, whole window of that
packet is sent again. As a packet is received window is slided.
Here, window size is 3. Initially window will contain 1,2,3 then as acknowledgement of 1 is
received window slides so 4 is transmitted. Now,when 4th packet’s acknowledgement is
received 7th packet is sent and when 5th packet’s acknowledgement is received 8th packet
is sent. Now, as acknowledgement of 6 is not received so the window of 6 i.e. 6,7,8 packets
are retransmitted.Now the 6th packet from there is 9, so 9,10 will be retransmitted.
1 2 3 4 5 6 7 8 6 7 8 9 10 11 9 10 11 .
Hence total 17 transmissions are needed.
The three main characteristic features of GBN are:
1. Sender Window Size (WS)
It is N itself. If we say the protocol is GB10, then Ws = 10. N should be always
greater than
1 in order to implement pipelining. For N = 1, it reduces to Stop and Wait
protocol.
Efficiency of GBN =N/(1+2a)
where a=Tp/Tt
If B is the bandwidth of the channel, then
Throughput and Effective Bandwidth is
=Efficiency* Bandwidth
=N/(1=2a)*BW
2.Receiver Window Size (WR): WR is Always 1 in GBN.
*we will explain with a help of example. Consider the diagram given below. We have sender
window size of 4. Assume that we have lots of sequence numbers just for the sake of
explanation. Now the sender has sent the packets 0, 1, 2 and 3. After acknowledging the packets
0 and 1, receiver is now expecting packet 2 and sender window has also slided to further
transmit the packets 4 and 5. Now suppose the packet 2 is lost in the network, Receiver will
discard all the packets which sender has transmitted after packet 2 as it is expecting sequence
number of 2. On the sender side for every packet send there is a time out timer which will expire
for packet number 2. Now from the last transmitted packet 5 sender will go back to the packet
number 2 in the current window and transmit all the packets till packet number 5. That’s why it
is called Go Back N. Go back means sender has to go back N places from the last transmitted
packet in the unacknowledged window and not from the point where the packet is lost.
3.Acknowledgements:
There are 2 kinds of acknowledgements namely:
A. Cumulative Ack: One acknowledgement is used for many packets. The main advantage is
traffic is less. A disadvantage is less reliability as if one ack is the loss that would mean that
all the packets sent are lost.
B. Independent Ack: If every packet is going to get acknowledgement independently.
Reliability is high here but a disadvantage is that traffic is also high since for every packet
we are receiving independent ack.
TO time>ACK time
GBN uses Cumulative Acknowledgement. At the receiver side, it starts a acknowledgement timer
whenever receiver receives any packet which is fixed and when it expires, it is going to send a
cumulative Ack for the number of packets received in that interval of timer. If receiver has received
N packets, then the Acknowledgement number will be N+1. Important point is Acknowledgement
timer will not start after the expiry of first timer but after receiver has received a packet.
Time out timer at the sender side should be greater than Acknowledgement timer.
Minimum sequence numbers required in GBN = N + 1
Selective Repeat ARQ
● Selective Repeat ARQ is also known as the Selective Repeat Automatic Repeat Request. It is a
data link layer protocol that uses a sliding window method. The Go-back-N ARQ protocol
works well if it has fewer errors. But if there is a lot of error in the frame, lots of bandwidth
loss in sending the frames again. So, we use the Selective Repeat ARQ protocol. In this
protocol, the size of the sender window is always equal to the size of the receiver window.
The size of the sliding window is always greater than 1.
● If the receiver receives a corrupt frame, it does not directly discard it. It sends a negative
acknowledgment to the sender. The sender sends that frame again as soon as on the
receiving negative acknowledgment. There is no waiting for any time-out to send that frame.
The design of the Selective Repeat ARQ protocol is shown below.
Efficiency of SR Protocol
● Efficiency = Sender Window Size in Protocol / (1 + 2a)
Efficiency of SR Protocol = N / (1 + 2a)
In SR protocol, sender window size is always same as receiver window size
● The receiver responses either with the positive acknowledgement(ACK) or with the
negative acknowledgement(NACK) where positive acknowledgement means that the
receiver is ready to receive the transmission and negative acknowledgement means that
the receiver is unable to accept the transmission.
Piggybacking
● Piggybacking is a method of attaching acknowledgment to the outgoing data packet in
reliable full-duplex data transmission.
● Working: The concept of piggybacking is explained as follows:
● Consider a two-way transmission between host A and host B. When host A sends a data
frame to B, then B does not send the acknowledgment of the frame sent immediately.
The acknowledgment is delayed until the next data frame of host B is available for
transmission. The delayed acknowledgment is then attached to the outgoing data frame
of B. This process of delaying acknowledgment so that it can be attached to the outgoing
frame is called piggybacking.
● Now, as we are communicating between the host A and host B, three conditions can arise:
● When the host has both data and the acknowledgment to send, then it will attach the data
along with the acknowledgment. In the above diagram, the host B will attach the data
frame along with the acknowledgment of the last frame received from host A.
● When the host does not have any data to send then it will send only the acknowledgment.
In the above diagram, when host A does not have any data frame to send. So, it will only
send the acknowledgment of the last frame received.
● When the host has only data to send then it will send the data along with the
acknowledgment of the last frame received. The duplicate acknowledgment will be
discarded by the receiver and the data would be accepted.
Reason for Piggybacking
● Communications are mostly full – duplex in nature, i.e. data transmission occurs in both
directions. A method to achieve full – duplex communication is to consider both the
communication as a pair of simplex communication. Each link comprises a forward channel for
sending data and a reverse channel for sending acknowledgments.
● However, in the above arrangement, traffic load doubles for each data unit that is
transmitted. Half of all data transmission comprise of transmission of acknowledgments.
● So, a solution that provides better utilization of bandwidth is piggybacking. Here, sending of
acknowledgment is delayed until the next data frame is available for transmission. The
acknowledgment is then hooked onto the outgoing data frame. The data frame consists of
an ack field. The size of the ack field is only a few bits, while an acknowledgment frame
comprises of several bytes. Thus, a substantial gain is obtained in reducing bandwidth
requirement.
● Advantages :
Improves the efficiency, better use of available channel bandwidth.
● Disadvantages :
The receiver can jam the service if it has nothing to send. This can be solved by enabling a
counter ( Receiver timeout ) when a data frame is received. If the count ends and there is
no data frame to send, the receiver will send an ACK control frame. The sender also adds
a counter (Emitter timeout), if the counter ends without receiving confirmation, the
sender assumes packet loss , and sends the frame again.
● Conclusion
There is a dispute as to whether this is a legal or illegal activity, but piggybacking is still a dark side
of Wi-Fi. Cyber-terrorist attacks in India are a clear reminder that we cannot control incidents
occurring anywhere in the world or control unsecured Wi-Fi networks. So it is the responsibility of
the owner and administrator to secure their wireless connection.
Multiple access protocol-
ALOHA, CSMA, CSMA/CA
and CSMA/CD
Data Link Layer
• The data link layer is used in a computer network to transmit the
data between two devices or nodes. It divides the layer into parts
such as data link control and the multiple access resolution/protocol.
The upper layer has the responsibility to flow control and the error
control in the data link layer, and hence it is termed as logical of
data link control. Whereas the lower sub-layer is used to handle and
reduce the collision or multiple access on a channel. Hence it is
termed as media access control or the multiple access resolutions.
What is a multiple access protocol?
• When a sender and receiver have a dedicated link to transmit data packets, the data link
control is enough to handle the channel. Suppose there is no dedicated path to
communicate or transfer the data between two devices. In that case, multiple stations
access the channel and simultaneously transmits the data over the channel. It may
create collision and cross talk. Hence, the multiple access protocol is required to reduce
the collision and avoid crosstalk between the channels.
For example, suppose that there is a classroom full of students. When a teacher asks a
question, all the students (small channels) in the class start answering the question at
the same time (transferring the data simultaneously). All the students respond at the
same time due to which data is overlap or data lost. Therefore it is the responsibility of
a teacher (multiple access protocol) to manage the students and make them one answer.
Random Access Protocol
In this, all stations have same superiority that is no station has more
priority than another station. Any station can send data depending on
medium’s state( idle or busy). It has two features:
• There is no fixed time for sending data
• There is no fixed sequence of stations sending data
• Following are the different methods of random-access protocols for
broadcasting frames on the channel.
• Aloha
• CSMA
• CSMA/CD
• CSMA/CA
ALOHA Random Access Protocol
• It is designed for wireless LAN (Local Area Network) but can also be
used in a shared medium to transmit data. Using this method, any
station can transmit data across a network simultaneously when a
data frameset is available for transmission.
• Aloha Rules
• Any station can transmit data to a channel at any time.
• It does not require any carrier sensing.
• Collision and data frames may be lost during the transmission of
data through multiple stations.
• Acknowledgment of the frames exists in Aloha. Hence, there is no
collision detection.
• It requires retransmission of data after some random amount of
time.
The Random access protocols are further subdivided as:
(a) ALOHA – It was designed for wireless LAN but is also applicable
for shared medium. In this, multiple stations can transmit data at
the same time and can hence lead to collision and data being
garbled
CSMA/ CD
• It is a carrier sense multiple access/ collision detection network
protocol to transmit data frames. The CSMA/CD protocol works
with a medium access control layer. Therefore, it first senses the
shared channel before broadcasting the frames, and if the channel
is idle, it transmits a frame to check whether the transmission was
successful. If the frame is successfully received, the station sends
another frame. If any collision is detected in the CSMA/CD,
• the station sends a jam/ stop signal to the shared channel to
terminate data transmission. After that, it waits for a random time
before sending a frame to a channel.
CSMA/ CA
• It is a carrier sense multiple access/collision avoidance network
protocol for carrier transmission of data frames. It is a protocol
that works with a medium access control layer. When a data frame
is sent to a channel, it receives an acknowledgment to check
whether the channel is clear. If the station receives only a single
(own) acknowledgments, that means the data frame has been
successfully transmitted to the receiver.
• But if it gets two signals (its own and one more in which the
collision of frames),a collision of the frame occurs in the shared
channel. Detects the collision of the frame when a sender receives
an acknowledgment signal.
UNIT 3
 SWITCHING
 ADDRESS MAKING –
ARP, RARP, BOOTP and DHCP
o Circuit Switching
o Packet Switching
o Message Switching
Switching
Switched Network
Switching Methods
Circuit-Switched Network
Switch
Folded Switch
Circuit Switching
Crossbar Switch
Multistage Switch
Switching Path
Switching Path
TDM without TSI
TDM with TSI
Time-Slot Interchange
TST Switch
Packet Switching
Datagram Approach
Datagram Approach, Multiple Channels
Switched Virtual Circuit
Switched Virtual Circuit
Switched Virtual Circuit
Message Switching
ADDRESS MAKING –
ARP, RARP, BOOTP
and DHCP
ARP (Address Resolution Protocol)
o Address resolution Protocol
o Mapping Logical to Physical Address
o If a host or a router has an IP datagram to send to another host or router, it has the logical (IP)
address of the receiver.
o The logical (IP) address is obtained from the DNS.
o DNS :Domain Name System.
o But the IP datagram must be encapsulated in a frame to be able to pass through the physical
network.
o This means that the sender needs the physical address of the receiver.
o The host or the router sends an ARP query packet.
o The packet includes the physical and IP addresses of the sender and the IP address of the
receiver.
Continue..
Because the sender does not know the physical address of the receiver and the query
is broadcast over the network.
Every host or router on the network receives and processes the ARP query packet, but
only the intended recipient recognizes its IP address and sends back an ARP response
packet.
The response packet contains the recipient’s IP and physical addresses. The packet is
unicast directly to the inquirer by using the physical address received in the query
packet.
RARP (Reverse Address Resolution Protocol)
o Reverse Address Resolution Protocol
o (RARP) finds the logical address for a machine thatknows only its physical
address.
o A diskless machine is usually booted from ROM,which has minimum
booting information. The ROM isinstalled by the manufacturer.
o It cannot include the IP address because the IPaddresses on a network are
assigned by the networkadministrator.
Continue..
o The machine can get its physical address (by reading its NIC, for example), which is
unique locally. It can then use the physical address to get the logical address by using
the RARP protocol.
o A RARP request is created and broadcast on the local network.
o Broadcasting is done at Data Link Layer.
o Another machine on the local network that knows all the IP addresses will respond
with a RARP reply.
o The requesting machine must be running a RARP client program the responding
machine must be running a RARP server program.
o This is the reason that RARP is almost obsolete. Two protocols, BOOTP and DHCP,
are replacing RARP.
BOOTP (Bootstrap Protocol)
o The Bootstrap Protocol (BOOTP) is a client/server protocol designed to
provide physical address to logical address mapping.
o BOOTP is an application layer protocol.
o BOOTP messages are encapsulated in a UDP packet, and the UDP packet
itself is encapsulated in an IP packet.
o One of the advantages of BOOTP over RARP is that the client and server
are application–layer processes.
Continue..
o The BOOTP request is broadcast because the client does not know the IP
address of the server.
o A broadcast IP datagram cannot pass through any router.
o To solve the problem, there is a need for an intermediary. One of the hosts
(or a router that can be configured to operate at the application layer) can
be used as a relay.
o The host in this case is called a relay agent.
Continue..
o The relay agent knows the unicast address of a BOOTP server. When it
receives this type of packet, it encapsulates the message in a unicast
datagram and sends the request to the BOOTP server.
o The packet, carrying a unicast destination address, is routed by any router
and reaches the BOOTP server.
Continue..
o The BOOTP server knows the message comes from a relay agent because
one of the fields in the request message defines the IP address of the relay
agent.
o The relay agent, after receiving the reply, sends it to the BOOTP client.
DHCP (Dynamic Host Configuration Protocol)
o BOOTP is not a dynamic configuration protocol.
o DHCP was created by the Dynamic Host Configuration Working Group of the
Internet Engineering Task Force(IETF)
o Runs over UDP
o Utilizing ports:
o 67 – connections to server
o 68 – connections to client
o DHCP is basically used for dynamic configuration
o Uses client–server model
Continue..
o When a client requests its IP address, the BOOTP server consults a table that
matches the physical address of the client with its IP address.
o The binding is predetermined.
o The Dynamic Host Configuration Protocol (DHCP)has been devised to provide
static and dynamic address allocation that can be manual or automatic
Objectives of DHCP
o The DHCP server should be able to provide a workstation for configuration .
o The DHCP server should prevent the duplication of addresses on the network.
o The DHCP server should be able to configure clients by use of relay agent.
o DHCP clients should be able to retain their TCP/IP parameters despite a reboot of
either client or server system.
DHCP architecture
o Dynamic configuration protocol consists of two basic elements:
o A service that assigns TCP/IP configuration settings to client system
o A protocol used for communications between DHCP clients and server.
o The DHCP architecture defines the message format for the protocol and the
sequence of message exchanges that take place between the DHCP client and
server.
o The DHCP architecture defines the message format for the protocol and the
sequence of message exchanges that take place between the DHCP client and
server.
UNIT 4
 PROCESS-TO-PROCESS COMMUNICATION:
UDP, TCP, SCTP
 CONGESTION CONTROL
 LEAKY AND TOKEN BUCKET ALGORITHMS
 DOMAIN NAME SYSTEM (DNS)
 SSH & TELNET
 EMAIL ARCHITECTURE
 BLUETOOTH
 FIREWALLS
PROCESS-TO-PROCESS
COMMUNICATION:
UDP, TCP, SCTP
PROCESS TO PROCESS COMMUNICATION:
● Process to process (application to application) communication
occurs at transport layer. To complete the delivery we need to
deliver data from one of the processes running on the source host
to the corresponding process running on the destination host.
Client/server paradigm-
● It is the most common way to achieve process-to-process
communication.
● Process on local host - client
● Process on remote host - server
● Both client and server processes have same name.
● Client initiates a connection and sends requests to server, and
server listens for connections and processes requests.
Addressing-
● Here we need port number (address) as on transport layer,
which will select appropriate process on destination host
among multiple running processes.
● Client program will be define with randomly chosen port
number which will be ephemeral (temporary), by the transport
layer software on client host.
● Whereas, server port number must be the permanent port
number.
IANA Ranges-
lANA (Internet Assigned Number Authority) divides the port
numbers in three ranges:
I. Well-known ports: (0 - 1023) are assigned and controlled by lANA.
II. Registered ports: (1024 - 49,151) are not assigned or controlled
by lANA. They can only be registered with lANA to prevent
duplication.
III. Dynamic ports: (49,152 - 65,535) are neither controlled nor
registered. They can be used by any process. These are the
ephemeral ports.
Socket addresses-
● To successfully perform process-to-process delivery we need combination of IP
address and the port number which is also called Socket.
● It defines client process and server process uniquely.
Multiplexing and Demultiplexing:
Multiplexing-
● Happens at sender site.
● There may be many processes to send packets at the same time,
which will cause many to one relation and multiplexing will be
required.
● Accepts packets of different processes, differentiates by their port
numbers and adds the header, the transport layer passes the
packet to the network layer.
Demultiplexing-
● Happens at receiver site
● After receiving data form network layer
● The transport layer delivers each packet to the appropriate process
according to their port number.
Connectionless Versus Connection-Oriented
Service:
Connectionless Service-
● Here packets can be sent from one host to another without any established
connection.
● packets are not numbered; they may be delayed or lost or may arrive out of
sequence. There is no acknowledgment either. UDP, is connectionless.
Connection-Oriented Service-
● Firstly connection is established between the sender and the receiver. And then
the connection in released after the data is transferred.
● TCP and SCTP is Connection-Oriented .
Reliable Versus Unreliable:
Reliable-
● we use a reliable transport layer protocol by implementing flow and error control at
the transport layer. If reliability is needed by application layer program.
Unreliable-
● If application uses its own flow and error control or the nature of the service does not
demand flow and error control then unreliable protocol will be used .
● UDP is connectionless and unreliable
● TCP and SCTP are connection oriented and reliable.
Position of UDP, TCP AND SCTP in TCP/IP suite-
UDP (User Datagram Protocol):
● UDP is connectionless, unreliable transport protocol.
● When a process wants to send a small message and does
not care much about its reliability, it can use UDP.
● UDP takes much less interaction between sender and
receiver than using TCP or SCTP.
Well-known ports for UDP:
User Datagram:
● UDP packet, called user datagram, have a fixed-size header
of 8 bytes. Following is format of user datagram.
Source port number-
● It is used by process running on the source host.
● If the source host is the client(sending a request) the port number mostly, is an
ephemeral port number
● If the source host is the server (sending a response), the port number mostly, is a
well-known port number.
Destination port number-
● It is used by process running on the destination host.
● . If the destination host is the server (client sending a request), the port number, in
most cases, is a well-known port number.
● If the destination host is the client (a server sending a response), the port number, in
most cases, is an ephemeral port number.
● Both source and destination port number are 16 bits long.
Length-
● This is a 16-bit field that defines the total length of the user
datagram, header plus data.
● The 16 bits can define a total length of 0 to 65,535 bytes. However,
the total length needs to be much less because a UDP user
datagram is stored in an IP datagram with a total length of 65,535
bytes.
● A user datagram is encapsulated in an IP datagram. There are fields
in the IP datagram that defines the total length and length of the
header separately. So,
UDP length = IP length - IP header's length
Checksum-
● Checksum includes three sections: a pseudo header, the UDP header, and the data.
● Pseudo header is the part of the header of the IP packet in which the user datagram is to be
encapsulated with some fields filled with 0’s.
● The protocol field is added to ensure that the packet belongs to UDP, and not to other
transport-layer protocols.
Optional use of checksum-
• If checksum is not calculated the field is filled with 1’s.
• Calculated checksum can never be all I’s, because this will impact that the sum in all
o’s, which is impossible because it requires the value of the field to be 0’s.
UDP Operation:
Connectionless Services-
● There is no relationship between the different user datagrams even if they
are coming from the same source process and going to the same
destination program. The user datagrams are not numbered.
● Also, there is no connection establishment and no connection termination.
This means that each user datagram can travel on a different path.
Flow and Error Control-
● There is no flow control and hence no window mechanism. The receiver
may overflow with incoming messages.
● There is no error control mechanism in UDP except for the checksum.
Encapsulation and Decapsulation-
● To send a message from one process to another, the UDP protocol encapsulates and
decapsulates messages in an IP datagram.
Uses of UDP:
● UDP is suitable for a process that requires simple request-response communication
with little concern for reliabity.
● UDP is suitable for a process with internal flow and error control mechanisms. For
example, the Trivial File Transfer Protocol (TFTP).
● UDP is a suitable transport protocol for multicasting
● UDP is used for some route updating protocols such as Routing Information Protocol
(RIP).
● UDP is used for management processes such as SNMP.
• TCP is a connection-oriented protocol that means it establishes
the connection prior to the communication that occurs between
the computing devices in a network.
• This protocol is used with an IP protocol, so together, they are
referred to as a TCP/IP
Transmission Control Protocol
• The main functionality of the TCP is to take the data from the
application layer.
• Then it divides the data into a several packets, provides numbering
to these packets, and finally transmits these packets to the
destination.
• The TCP, on the other side, will reassemble the packets and
transmits them to the application layer.
• As we know that TCP is a connection-oriented protocol, so the
connection will remain established until the communication is not
completed between the sender and the receiver.
FUNCTIONS
FEATURES
•Transport Layer
Protocol
•TCP is a transport layer protocol as it is used in transmitting the data from the sender to the
receiver..
•Reliable
•TCP is a reliable protocol as it follows the flow and error control mechanism. It also supports the
acknowledgment mechanism, which checks the state and sound arrival of the data. In the
acknowledgment mechanism, the receiver sends either positive or negative acknowledgment to
the sender so that the sender can get to know whether the data packet has been received or
needs to resend.
•Order of the data
is maintained
•This protocol ensures that the data reaches the intended receiver in the same order in which it is
sent. It orders and numbers each segment so that the TCP layer on the destination side can
reassemble them based on their ordering.
•Connection-
oriented
•It is a connection-oriented service that means the data exchange occurs only after the
connection establishment. When the data transfer is completed, then the connection will get
terminated.
• In the layered architecture of a network model, the whole task is divided
into smaller tasks.
• Each task is assigned to a particular layer that processes the task. In
the TCP/IP model, five layers are application layer, transport
layer, network layer, data link layer, and physical layer.
• The transport layer has a critical role in providing end-to-end
communication to the directly application processes.
• It creates 65,000 ports so that the multiple applications can be
accessed at the same time.
• It takes the data from the upper layer, and it divides the data into
smaller packets and then transmits them to the network layer.
NEED
• In TCP, the connection is
established by using three-way
handshaking.
• The client sends the segment with its
sequence number.
• The server, in return, sends its
segment with its own sequence
number as well as the
acknowledgement sequence, which
is one more than the client sequence
number.
• When the client receives the
acknowledgment of its segment,
then it sends the acknowledgment to
the server.
• In this way, the connection is
established between the client and
WORKING
• It provides a connection-oriented reliable service, which means
that it guarantees the delivery of data packets. If the data packet
is lost across the network, then the TCP will resend the lost
packets.
• It provides a flow control mechanism using a sliding window
protocol.
• It provides error detection by using checksum and error control
by using Go Back or ARP protocol.
• It eliminates the congestion by using a network congestion
avoidance algorithm that includes various schemes such as
additive increase/multiplicative decrease (AIMD), slow start, and
congestion window.
ADVANTAGES
• It increases a large amount of
overhead as each segment gets its
own TCP header, so fragmentation by
the router increases the overhead.
DISADVANTAGES
•Source port: It defines the port of the application,
which is sending the data. So, this field contains the
source port address, which is 16 bits.
•Destination port: It defines the port of the application
on the receiving side. So, this field contains the
destination port address, which is 16 bits.
•Sequence number: This field contains the sequence
number of data bytes in a particular session.
•Acknowledgment number: When the ACK flag is set,
then this contains the next sequence number of the data
byte and works as an acknowledgment for the previous
data received. For example, if the receiver receives the
segment number 'x', then it responds 'x+1' as an
acknowledgment number.
•HLEN: It specifies the length of the header indicated by
the 4-byte words in the header. The size of the header
lies between 20 and 60 bytes. Therefore, the value of
this field would lie between 5 and 15.
•Reserved: It is a 4-bit field reserved for future use, and
by default, all are set to zero.
HEADER FORMAT
Flags
There are six control bits or flags:
 URG: It represents an urgent pointer. If it is set, then the data is processed urgently.
 ACK: If the ACK is set to 0, then it means that the data packet does not contain an
acknowledgment.
 PSH: If this field is set, then it requests the receiving device to push the data to the
receiving application without buffering it.
 RST: If it is set, then it requests to restart a connection.
 SYN: It is used to establish a connection between the hosts.
 FIN: It is used to release a connection, and no further data exchange will happen.
Window size
It is a 16-bit field. It contains the size of data that the receiver can accept. This field is used
for the flow control between the sender and receiver and also determines the amount of
buffer allocated by the receiver for a segment. The value of this field is determined by the
receiver.
STREAM CONTROL TRANSMISSION PROTOCOL
• Stream Transmission Control Protocol (SCTP) is a connection-
oriented protocol, similar to TCP, but provides message-oriented data
transfer, similar to UDP.
• It provides a full-duplex association i.e., transmitting multiple streams
of data between two end points at the same time that have established
a connection in network.
• SCTP may provide more flexibility for certain applications, like Voice
over IP (VoIP), that require the reliable but message-oriented data
transfer. For this category of applications, SCTP is most likely better-
suited than TCP or UDP.
• It is sometimes referred to as next generation TCP or TCPng.
Unicast with
Multiple
properties
• It is a point-to-point protocol which can use different paths to
reach end host.
Message
oriented
• Each message can be framed and we can keep order of data
stream and tabs on structure. For this, In TCP, we need a
different layer for abstraction.
Reliable
Transmission
• It uses SACK and checksums to detect damaged, corrupted,
discarded, duplicate and reordered data. It is similar to TCP but
SCTP is more efficient when it comes to reordering of data.
Multi-homing
• It can establish multiple connection paths between two end
points and does not need to rely on IP layer for resilience.
Characteristics of SCTP :
• It is a full- duplex connection i.e. users can
send and receive data simultaneously.
• It allows half- closed connections.
• The message’s boundaries are maintained
and application doesn’t have to split
messages.
• It has properties of both TCP and UDP
protocol.
• It doesn’t rely on IP layer for resilience of
paths.
ADVANTAGES
• One of key challenges is that it requires
changes in transport stack on node.
• Applications need to be modified to use SCTP
instead of TCP/UDP.
• Applications need to be modified to handle
multiple simultaneous streams.
DISADVANTAGES
Attribute TCP UDP SCTP
Reliability Reliable Unreliable Reliable
Connection
Management
Connection-
oriented
Connectionless Connection-
oriented
Transmission Byte-oriented Message-oriented Message-oriented
Flow Control Yes No Yes
Congestion
Control
Yes No Yes
Fault Tolerance No No Yes
Data Delivery Strictly Ordered Unordered Partially ordered
Security Yes Yes Improved
Differences in behavior between SCTP and
existing transport protocols, TCP and UDP
Congestion Control
What is congestion?
• When a network node or link
is carrying more data than it
can handle.
• No. of packets sent to the
network > No. of packets a
network can handle.
Reasons that generates congestion ?
1. Too many hosts in broadcast
domain.
2. Low Bandwidth.
3. Packet transfer at same time
in Multicasting.
4. Outdated Hardware that
creates bottleneck.
5. Border Gateway Protocol due
to shortest logical path.
Congestion window
Previously, We said that the sender window size is determined by
the available buffer space in the receiver (rwnd).
But We totally ignored another entity the network.
If the network cannot deliver the data as fast as they are created
by the sender, it must tell the sender to slow down.
From Today, the sender's window size is determined not only by
the receiver window but also by congestion in the
network(network window).
Actual window size= minimum (receiver window,network
window);
RW=4 MSS
NW=2 MSS
So,
SW= 2 MSS
Congestion Control
Techniques and mechanisms that can either prevent congestion,
before it happens, or remove congestion, after it has happened.
There are two technique to avoid congestion :-
1. Prevention(open loop) 2. Removal(closed loop)
Three Policies of congestion control in Internet(TCP)
1. Slow Start 2. Congestion avoidance 3. Congestion
Detection
➔ TCP Handling congestion is based on three phases:
In the slow-start phase, the sender starts with a
very slow rate of transmission(1 MSS), but
increases the rate rapidly to reach a threshold.
When the threshold is reached, the data rate is
reduced to avoid congestion.
Finally if congestion is detected, the sender goes
back to the slow-start(TCP Tahoe) or congestion
avoidance phase(TCP Reno) based on how the
congestion is detected.
1. Slow Start
The idea that the size of the
congestion window (cwnd) starts with
one maximum segment size (1 MSS).
As the name implies, the window
starts slowly, but grows exponentially.
Slow start cannot continue
indefinitely. There must be a
threshold(benchmark) to stop this
phase.
When the size of window in bytes
reaches this threshold, slow start
stops and the next phase(congestion
avoidance) starts.
2. Congestion Avoidance
We start with the slow-start, the size of the congestion window
increases exponentially. To avoid congestion before it happens,
one must slow down this exponential growth.
When the size of the congestion window reaches the slow-start
threshold, the exponential growth stops and the additive
growth(add 1 MSS each time) begins.
In the congestion avoidance algorithm, the size of the congestion
window increases additively until congestion is detected.
Start cwnd=l
After round 1 cwnd= 1+ 1 =2
After round 2 cwnd=2+ 1 =3
After round 3 cwnd=3+ 1 =4
3. Congestion Detection
After the avoidance when When a sender detects the loss of
segments, it reacts in different ways depending on how the loss is
detected-
Case-01: Detection On Time Out
(Stronger possibility) (TCP tahoe)
◆ Time Out Timer expires before receiving the
acknowledgement for a segment.
◆ There are chances that a segment has been
dropped in the network.
Reaction of sender in this case-
1. Setting the slow start threshold to half of the current
congestion window size.
2. Decreasing the congestion window size to 1 MSS.
3. Resuming the slow start phase.
3. Congestion Detection
Case-02: Detection On Receiving 3 Duplicate
Acknowledgements -
(TCP Reno) (Weaker possibility)
◆ Sender receives 3 duplicate acknowledgements
attached for a segment.
◆ There are chances that a segment has been
dropped but few segments sent later may have
reached.
Reaction of a sender
1. Setting the slow start threshold to half of the current
congestion window size.
2. Decreasing the congestion window size to slow start
threshold.
3. Resuming the congestion avoidance phase.
Data Traffic
★ Average Data Rate-
★ Peak Data Rate - max. data rate of traffic
★ Maximum Burst Size - max. length of time
the traffic is generated at peak rate.
★ Effective Bandwidth(allocated in real-time)
Average data rate=amount of data
time
Traffic Profiles
Constant Bit Rate(CBR) -
data rate that does not change.
the average data rate and the peak data rate are the same.
The network knows in advance how much bandwidth to
allocate for this type of flow.
Variable Bit Rate (VBR)-
the rate of the data flow changes in time, with smooth
instead of sudden and sharp.
the average data rate and the peak data rate are different.
Bursty -
the data rate changes suddenly in a very short time.
the network profile is very unpredictable.
Bursty traffic is one of the main causes of congestion in a
network.
Congestion Control Techniques
We have already discussed that there are two techniques of
congestion control.
(Prevention and Removal)
Open Loop Control : Prevention
Retransmission policy and timers must to be designed to optimize efficiency and at
same time prevent congestion.
Window policy : Selective Repeat is better than Go-back-N.
Acknowledgement policy : does not ACK every packet.(Cumulative Ack)
Discard policy : Discards less sensitive packets by sender.
Admission policy : Switch first check the resource requirement before admitting it to the
network.
Closed -Loop Congestion Control : Removal
Back pressure : inform the previous upstream router to reduce the rate of
outgoing if congested.
Choke point : a packet sent by a router to the source to inform it of congestion.
Implicit signaling : slow down its sending rate by detecting an implicit signal
concerning congestion.
Explicit signaling : Backward signaling OR Forward signaling.
Open Loop Control : Prevention
Retransmission policy and timers must to be designed to optimize efficiency and at same time
prevent congestion.
Window policy : Selective Repeat is better than Go-back-N.
Acknowledgement policy : does not ACK every packet.(Cumulative Ack)
Discard policy : Discards less sensitive packets by sender.
Admission policy : Switch first check the resource requirement before admitting it to the network.
S R
Let the size of congestion window of a TCP connection be 32 KB
when a timeout occurs. The round trip time of the connection is
100 msec and the maximum segment size used is 2 KB. The
time taken (in msec) by the TCP connection to get back to 32 KB
congestion window is _________.
When Time Out occurs, for the next round of Slow
Start,
Threshold = size of congestion window/2
Threshold = 16KB
So the transfer proceeds as
1MSS (2KB) 2MSS (4KB)
4MSS (8KB)
8MSS (16KB) <--- threshold 9MSS (18KB)
10MSS (20KB)
11MSS (22KB) 12MSS (24KB)
13MSS (26KB)
14MSS (28KB) 15MSS (30KB)
16MSS (32KB)
1 2
3
4 5
6
7 8
9
10 11
References
❖ Data communications and Networking By Behrouz A. Forouzan
❖ https://www.geeksforgeeks.org/congestion-control-techniques-in-computer-networks/
❖ https://datapath.io/resources/blog/10-causes-of-network-congestion-you-should-know-about/
❖ https://www.gatevidyalay.com/tcp-congestion-control-tcp-protocol-tcp/
❖ https://smallbiztrends.com/2013/09/what-makes-my-application-slow.html
❖ https://www.techtud.com/short-notes/congestion-control-and-its-prevention-policies
LEAKY AND TOKEN
BUCKET ALGORITHMS
BACKGROUND OF STUDY
QUALITY OF SERVICE (QoS)
It is the overall performance measure of the computer network.
Flow Characteristics of the QoS:
● Reliability
● Delay
● Jitter
● Bandwidth
Flow Characteristics
Reliability Delay Jitter Bandwidth
If a packet gets lost or
acknowledgement is not
received, the re-
transmission of data will
be needed.
This decreases the
reliability.
Eg: Email and File
Transfer
Delay of a message from
source to destination is a
very important
characteristic.
Eg:
Time delay can’t be
tolerated in audio
conferencing (minimum
time delay)
It is the variation in delay.
Eg:
Packet ST RT Delay
1 0 10 10
2 1 11 10
3 2 12 10
(Low Jitter)
Packet ST RT Delay
1 0 31 31
2 1 34 33
3 2 39 37
(High Jitter)
Different applications
need different
bandwidth.
Eg:
Video Conferencing
needs more bandwidth
as compared to Email or
File Transfer
Techniques to achieve good QoS
Traffic
Shaping
Resource
Reservation
Admission
Control
Scheduling
Weighted Fair
Queuing
Priority
Queuing
FIFO
Queuing
Token
Bucket
Leaky
Bucket
Mechanism to control the
amount and the rate of the
traffic sent to the network.
Leaky Bucket Algorithm
Bursty Flow
Fixed Flow
Bursty chunks are stored in the bucket
and sent out at an average rate.
Input rate may vary, but output rate
remains constant.
Thus leaky bucket can smooth out
bursty traffic.
Implementation
Arrival Full ?
N
Y
Processor Departure
Discard
Removes packet at
a constant rate.
Leaky Bucket Algorithm
Queue
Leaky Bucket Algorithm
Algorithm for Variable-length Packets
Step 1: Initialize a counter to n at the tick of the clock.
Step 2: If n is greater than the size of the packet, send the
packet and decrement the counter by the packet size. Repeat
this step until n is smaller than the packet size.
Step 3: Reset the counter and go to step 1.
Example
200 700 500 450 400 200
Let n = 1000
n>200
200 700 500 450 400
n = 1000-200 = 800
n>400
200 700 500 450
n = 800-400 = 400
n<450
200 700 500 450
Let n = 1000
n>450
200 700 500
n = 1000-450 = 550
n>500
200 700
n = 550-500 = 50
n<700
200 700
Let n = 1000
n>700
200
n = 1000-700 = 300
n>200
Question
In a leaky bucket used to control liquid flow, how many gallons
of liquid are left in the bucket if the output rate is 5 gal/min,
there is an input burst of 100 gal/min for 15 s, and there is no
input for 33 s?
Solution
Input rate = 100 gal/min = 100/60 gal/sec = 5/3 gal/sec
Water filled in the bucket in 15 sec = 5/3 * 15 = 25 gallons
Output rate = 5 gal/min = 5/60 gal/sec = 1/12 gal/sec
Output continues for 15 + 33 secs => 48 secs.
Water emptied from the bucket = 1/12 * 48 = 4 gallons
∴ Water left in the bucket = 25 - 4 = 21 gallons
Limitation of Leaky Bucket Algorithm
It doesn’t credit an idle host.
For example, if a host doesn’t send for a while, it’s bucket becomes
empty.
Now, if the host has bursty data, leaky bucket allows an average rate.
The time when the host was idle is not taken into account.
Token Bucket Algorithm
● Token bucket algorithm allows idle hosts to accumulate credit for
the future in the form of tokens.
● Tokens are generated by a clock at the rate of one token every ∆t
sec.
● The system removes one token for every cell of data sent.
● Output may vary depending on the size of the burst.
● Idle hosts can capture and save up tokens (up to max. size of the
bucket) in order to send larger bursts later.
Implementation
Arrival Full ?
N
Y
Processor Departure
Discard
Queue
--------
One token is
removed and
discarded per cell
transmitted.
Tokens are added at the rate of r
per second; tokens are discarded if
bucket is full.
Bucket capacity: c tokens
Token Bucket Algorithm
Algorithm for Token Bucket
Step 1: A token is added at every ∆t time.
Step 2: The bucket can hold at most c tokens. If a token arrives when the bucket is full, it is
discarded.
Step 3: When a packet of m bytes arrives, m tokens are removed from the bucket and the
packet is sent to the network.
Step 4: If less than m tokens are available then no tokens are removed from the bucket and
packet is considered to be non conformant.
The non conformant packet may be enqueued for subsequent transmission when sufficient
tokens have been accumulated in the bucket.
Maximum packets formula
c: capacity of bucket
r: rate at which tokens enter the bucket
The maximum number of packets that can enter the
network during any time interval of length t is,
Maximum no. of packets = r*t + c
Maximum average rate = (r*t + c)/t packets per second
Bucket capacity formula
M: Output rate
P: Input rate of tokens
C: Maximum capacity of buckets
Then,
(Outflow - Inflow) * Time = Bucket Capacity
(M - P) * t = C
Question
A computer on 5 Mbps network is regulated by token bucket. The
token bucket filled with a rate of 3 Mbps. The bucket is initially filled
to capacity with 2 Mb. The time for which the computer transmit at
the full 5 Mbps is_____________?
Solution
Output rate = M = 5 Mbps
Input rate = P = 3 Mbps
Bucket capacity = C = 2 Mb
∴ Time = C / (M - P) = 2 / (5 - 3) = 1 second
Difference between Leaky and Token bucket
Leaky Bucket Token Bucket
Token independent. Token dependent.
If bucket is full, packets are
discarded.
If bucket is full, tokens are discarded.
Packets are transmitted continuously. Packets can only be transmitted when
there are enough tokens.
It sends the packets at constant rate. It allows large bursts to be sent at a
faster rate after that constant rate.
It does not save tokens. It saves token to send larger bursts.
References:
https://www.tutorialride.com/computer-network/quality-of-service-qos-in-
computer-network.htm
https://www.ques10.com/p/11071/explain-techniques-to-improve-qos-in-
multimedia-1/
https://www.geeksforgeeks.org/leaky-bucket-algorithm/
https://www.slideshare.net/vimal25792/leaky-bucket-tocken-buckettraffic-
shaping
Domain Name
System (DNS)
DNS resolves domain name to IP addresses
What is the need of supportive applications like
DNS?
❖ To identify an entity, TCP/IP uses IP address, which uniquely
identifies the connection of a host to the Internet.
However, people prefer to use names instead of numeric addresses
like our smartphone contact list.
Therefore, we need a system that can map a name to an address or
an address to a name i.e. DNS
A simple yet sophisticated system, the DNS handles more than 700 million address
translation or “look-up” requests per day.
How things were managed before DNS ?
Host file method
❖ When the Internet was small, mapping was done by using a host file
❖ The host file had only two columns: name and address.
❖ Every host could store the host file on its disk and update it
periodically from a master host file.
❖ When a program or a user wanted to map a name to an address, the
host consulted the host file and found the mapping.
How things were managed before DNS ?
❖ When ARPANET moved to TCP/IP in 1983 and became known as the
Internet, the population of networks exploded.
❖ The centrally maintained HOSTS.TXT file became plagued with problems,
such as traffic and load, name collisions, and consistency anomalies.
❖ It was clear that HOSTS.TXT no longer met the needs of the rapidly
expanding Internet, and that a more robust system was needed.
Is centralized DNS feasible?
NO,
➔ Single point of Failure
➔ Traffic Volume, storing information at one server requires huge space.
➔ Maintenance (if required, service needs to be stopped)
➔ Distant centralized database
A group composed of Jon Postel, Paul Mockapetris, Craig Partridge, and
others [Harvard University] met the need when they published RFC 882
in 1984 which resulted in the creation of the distributed naming
system known as the DNS.
Using Distributed DNS since 1984
Distributed DNS system
➢ Every time someone wishes to access a website, the request is handled by one of
the thirteen core servers known as the “root” servers, or a server lower on the
Internet hierarchy that takes the bulk of the requests, the DNS is the key to
correct completion of that request.
Distributed,Hierarchical DNS
How DNS Works - Building Blocks of DNS
● DNS Resolver
● DNS Root Server
● Top-Level Domain (TLD) Name Server
● Authoritative Name Server
DNS Resolver (Recursive Name Server)
● A software designed to receive DNS queries from web browsers and other applications.
● The DNS resolver might be operated by the local network, an Internet Service Provider (IP), a
mobile carrier, a WIFI network, or other third party.
● The resolver starts by looking in its local cache or that of the operating system on the local
device - if the hostname is found, it is resolved immediately.
● If not found, the resolver contacts a DNS Root Server. There is a list of well-known and rarely
changed root server IP addresses, and every DNS resolver has that list of IP addresses included
with the software.
DNS : Root Servers
● It is a server whose zone consist of whole tree. These servers are distributed all around the
world.
● In total, there are 13 main DNS root servers, each of which is named with the letters ‘A’ to
‘M’ operated by organizations such as Verisign, Cogent, the University of Maryland and the
U.S. Army Research Lab.
● They all have a IPv4 address and most have an IPv6 address.
● Managing the root server is ICANN’s responsibility, however, operated by different
institutions that ensure that data exchange in the root zone always remains correct, available,
and secure.
● The root servers won’t actually know where the domain is hosted. They will, however, be able
to direct the requester to the name servers that handle the specifically requested top-level
domain.
DNS : TLD Servers
● The TLD Name Server takes the domain name provided in the query - for
example www.example.com - and provides the IP of an Authoritative Name
Server.
● This is a DNS server that contains DNS records for the specific domain.
● There are currently over 1500 valid top level domains, including the original
TLDs like .com and .org, country codes such as co.uk and co.fr, and new TLDs
such as .biz.
DNS : Authoritative Servers
● The Authoritative Name Server is the last stop in the name server query. The
Authoritative Name Server takes the domain name and subdomain, and if it has
access to the DNS records, it returns the correct IP address to the DNS Resolver.
Local Name Server
Types of Resolution/ DNS Lookup Process
❏ Recursive resolution
❏ Iterative resolution
Recursive Resolution
❖ A recursive query is a kind of query, in which the DNS server, who received
your query will do all the job of fetching the answer, and giving it back to you.
❖ During this process, the DNS server might also query other DNS server's in
the internet on your behalf, for the answer.
RESOLVER
BROWSER
DNS
SERVER
TLD
SERVER
request
response
request
response
request
response
response
request
DNS
ROOT
SERVER
Required
SERVER
Iterative Resolution
In an iterative query, the name server, will not go and fetch the complete answer
for your query, but will give back a referral to other DNS servers, which might
have the answer.
BROWSER RESOLVER
DNS
Server
DNS
root
Server
TLD
Server
Required
Server
request
response
request
response
request
response
request
response
DNS Lookup Process
➢ Different ISP use different DNS servers. By default, if you don’t set up specific DNS
servers on your computer (or your router), default DNS servers from your ISP will
be used.
➢ If these DNS servers aren’t stable, you might be having a few problems while using
the Internet on your computer. Such as can’t load websites completely or unable to
access the Internet.
➢ To avoid unwanted DNS errors, switch to public DNS servers like Google’s DNS and
OpenDNS. These servers will help to improve the speed of your Internet and
stability.
Public DNS
➢ Google DNS service is free to use and can be used by anyone who has access
to the Internet. You can use Google DNS IP instead of your ISP’s DNS
servers to improve the resolve time and provide security.
➢ It represents two IP addresses for IPv4 – 8.8.8.8 and 8.8.4.4.
➢ 8.8.8.8 is the primary DNS, 8.8.4.4 is the secondary one.
Google Public DNS
➢ The benefits of caching are pretty obvious:
○ This speeds up your Internet experience when visiting a site you go to often and
also helps lower the load on DNS servers around the world.
➢ What happens when the DNS record changes? This is where the potential
downside of caching becomes evident.
➢ If a DNS record is cached, then a new lookup is not done until that cache expires.
➢ Thus that resolver that has the cached record won’t have any way to find out about the
changed record until its cache expires.
DNS caching
➢ The DNS records are stored in cache for a period of time called time to live, defined in
the configuration of each DNS record.
➢ Time to live is very significant because it determines the “freshness” of DNS records.
➢ TTL is a setting for each DNS record that specifies how long a resolver is supposed to
cache (or remember) the DNS query before the query expires and a new one needs to
be done.
TTL
NAME SPACE
❖ A name space maps each address to a unique name .
❖ It can be organized in two ways :-
1) Flat Name Space
2) Hierarchical Name Space
DNS Structure
FLAT NAME SPACE
❖ Name is assigned to an address and name is a sequence of
characters without structure.
❖ It can not be used in large system because of centralized control for
ambiguity and duplicacy.
Hierarchical Name Space
❖ In a hierarchical name space, each name is made of several parts,
each part having a particular meaning.
❖ The authority to assign and control the name spaces is decentralized.
❖ A central authority can assign the part of the name that defines the
nature of the organization and the name of the organization.
❖ The responsibility of the rest of the name can be given to the
organization itself.
❖ For example: challenger.berkley.com.
Domain Name Space
❖ To have a hierarchical name space, a domain name space was
designed. In this design the names are defined in an inverted-tree
structure with the root at the top. The tree can have only 128 levels:
level 0 (root) to 127 .
Domain Name Space
LABEL:
❖ Each node in the tree has a label, which is a string with a maximum of
63 characters.
❖ The root label is a null string (empty string).
DOMAIN NAME:
❖ Each node in the tree has a domain name. A full domain name is a
sequence of labels separated by dots (.).
❖ The domain names starts from the node up to the root.
❖ The last label is the label of the root (null).
There are two types of domain name.
FULLY QUALIFIED DOMAIN NAME(FQDN):
❖ It contains the full name of host.
❖ A label is terminated by a null string.
PARTIALLY QUALIFIED DOMAIN NAME(PQDN):
❖ It starts from a node but doesn’t reaches root.
❖ A label is not terminated by null string.
DOMAIN:
❖ A domain is a subtree of the domain name space.
❖ The name of the domain is the domain name of the node at the top of
the subtree.
❖ A domain may itself be divided into domains (subdomains).
Zone :-
❖ Region over which server has the responsibility and authority.
❖ Zone is a part of entire tree.
DNS In Internet
DNS is divided into three domains :-
GENERIC DOMAINS :-
❖ It contains registered hosts according to generic behaviors.
COUNTRY DOMAINS :-
❖ The country domains section uses two-character country abbreviations (e.g.,
in for INDIA).
INVERSE DOMAINS :-
● Inverse domain is used to map an address to a name.
● For example, a client send a request to the server for performing a
particular task, server finds a list of authorized client. The list
contains only IP addresses of the client.
● The server sends a query to the DNS server to map an address to a
name to determine if the client is on the authorized list.
● This query is called an inverse query.
● This query is handled by first level node called arpa.
DNS Message
❖ DNS has two types of messages: query and response.
HEADER
❖ The identification subfield is used by the client to match the response
with the query.
❖ The client uses a different identification number each time it sends a
query.
❖ The server duplicates this number in the corresponding response.
❖ The flags subfield is a collection of subfields that define the type of the
message, the type of answer requested, the type of desired resolution
etc.
DDNS
❖ In DNS , when there is a change , such as adding a new host, removing a
host or changing an IP address, change must be made to the DNS
master file.
❖ Manual updating is not possible due to large size of Internet.
❖ Therefore, DDNS is used to update DNS master file automatically.
❖ Information is sent to primary server first and it notifies the secondary
servers.
❖ Therefore, the changes are updated in every server.
DNS Spoofing
❖ Domain Name Server spoofing (a.k.a. DNS cache poisoning) is an attack in
which altered DNS records are used to redirect online traffic to a fraudulent
website that resembles its intended destination.
❖ Once there, users are prompted to login into (what they believe to be) their
account, giving the perpetrator the opportunity to steal their access
credentials and other types of sensitive information.
❖ Furthermore, the malicious website is often used to install worms or viruses
on a user’s computer, giving the perpetrator long-term access to it and the
data it stores.
Methods for executing a DNS spoofing attack include:
❖ Man in the middle (MITM) – The interception of communications between
users and a DNS server in order to route users to a different/malicious IP
address.
❖ DNS server compromise – The direct hijacking of a DNS server, which is
configured to return a malicious IP address.
https://www.slideserve.com/ardice/dns-domain-name-system
https://ns1.com/resources/what-is-dns
https://tunecomp.net/google-dns-8-8-8-8/
https://www.netnod.se/i-root/what-are-root-name-servers
DNS Records: https://www.liquidweb.com/kb/understanding-the-dns-process/
https://www.digitalocean.com/community/tutorials/an-introduction-to-dns-terminology-components-and-concepts
DNS Provider : https://www.g2.com/categories/managed-dns-providers
DNS Provider: https://whatsabyte.com/internet/best-public-dns-servers/
DNS Spoofing: https://www.imperva.com/learn/application-security/dns-spoofing/
References
TELNET AND SSH
Protocol DEEP DIVE
EVER TRIED TO CLONE A REPO FROM GITHUB USING
SSH??
EVER TRIED CONNECTING TO A REMOTE
SERVER??
WHAT IS .SSH DIRECTORY ?? WHAT IS SSH??
WHAT 'S THIS .pem FILE??
 ssh is a hidden folder which can only be listed by $ls –a whenever we set up our first remote
connection or want to generate keys using "keygen" command this folder came up in use
WHAT IS SSH
(Basically)
SECURE SHELL
COMMUNICATION PROTOCOL(LIKE HTTP ,HTTPS,FTP ETC)
DO JUST ANYTHING ON THE REMOTE COMPUTER
TRAFFIC IS ENCRYPTED
MOSTLY USED IN TERMINAL /COMMAND LINE
PRIMARY ADVANTAGE -> SESSION IS ENCRYPTED IF
ANYONE WHO MIGHT BE WAITING AT ANY POINT B/W U AND
REMOTE HOST WILL SEE ONLY UNREADABLE TEXT
TELNET
(BASIC)
For TCP / IP networks like the Internet, Telnet is a
terminal emulation program.
The software Telnet runs on your system and links your
Personal Computer to a network server.
The fact that Telnet converts all data into plain text is
considered vulnerable. This means if a user sniffs a
network, you can record your username and password
during transmission.
Telnet allows a user to remotely access an account or
computer.
A consumer, for example, can telnet to a website host
computer to remotely control their files.
REMOTE LOGIN USING TELNET
 When a user wants to access an
application program or utility located on a
remote machine, he or she performs
remote login.
Here the TELNET client and server
programs come into use, the user sends the
keystrokes to the terminal driver.
ii. Where the local operating system
accepts the characters but does not
interpret them.
iii. The characters are sent to the TELNET
client, which transforms the characters to a
universal
iv. Character set called Network Virtual
Terminal (NVT) characters and delivers
them to the local TCP/IP stack (
REMOTE LOGIN USING TELNET(Cont.)
 v. The commands or text, in NVT form, travel
through the Internet and arrive at the TCP/IP
stack at the remote machine.
 vi. Here the characters are delivered to the
operating system and passed to the TELNET
server, which changes the characters to the
corresponding characters understandable by the
remote computer.
 vii. However, the characters cannot be passed
directly to the operating system because the
remote operating system is not designed to
receive characters from a TELNET server:
 viii. It is designed to receive characters from a
terminal driver.
 ix. The solution is to add a piece of software called
a pseudo terminal driver, which pretends that the
characters are coming from a terminal.
 x. The operating system then passes the
characters to the appropriate application
program.
SSH
SSH stands for
'Secure Shell' and it
first appeared in the
mid 90's as a sort of
replacement for/way
of connecting to a
remote machine over
the internet.
Up until that time the
technologies you had
to connect to a
remote machine,
Telnet, rlogin, RSH
and so on, worked
fine
But they transmitted
all the data in the
clear over the
network. So if you
logged into a remote
machine
Anyone with a packet
sniffer between you
and the remote
machine could see
everything you were
doing on there.
When these protocols first
appeared that wasn't a problem
because the machines were
probably only networked
within their computer
department of a university or a
company so the people that had
access to do that were people
who worked there and
probably the system
administrators who had access
to these things.
Anyway, but as the machines got
networked to other networks and
you started to build the internet, if
you had access to the network any
network that the data was
travelling over you could sniff the
packets.
And see any of
the data that was
being
transmitted,
including
passwords and
IF USING TELNET
Tatu Ylonen
 In 1995, Tatu Ylonen in Finland was
concerned about the privacy of data
 So he developed a protocol SSH 'Secure
Shell' to sort of encrypt the data so that
you couldn't sort of see how/what was being sent
over the wire
ENCRYPTED MESSAGE
USING SSH
MAJOR ADVANTAGE OF
USING SSH OVER OTHER
PROTOCOLS
You could see that data was being transmitted across
and..
You could see how much data and ..
You could see the frequency of it to a certain
extent ..
But you couldn't see what the data was, so you
could do certain types of analysis to see what's
happening, but you couldn't see the actual data.
WORKING OF SSH
So SSH was developed as a way of encrypting the
connection between two machines
But it actually does a lot more than that, because when
you SSH to another machine the first thing that happens
is that you open up a TCP connection between those two
machines like any standard things.
Although it doesn't have to be a TCP connection. You
can actually specify that SSH uses any sort of reliable
network connection to make that, so you could
theoretically run it over an RS-232 connection.
You could run it over the top of web sockets and things
like that.
So you've got a reliable transport between the two
machines and so SSH is sending data over there. and
what SSH does is it breaks the data down into a series of
packets.
PACKET OF SSH
 At top we have 4 byte of packet length
 Another bytes for padding
 Then the data which is payload
 Another small amount of padding just random bits to
force encryption to sort of make it harder to detect whats
going on
 After that a message authentication code so that we
can know that our data hasn't been monkied around
 We can also apply a compression if we want
ENCRYPTING THE PACKET
Packet length is unencrypted because we need to
know how much data is coming.
Encrypt the padding length.
Encrypt the payload.
Encrypt the padding.
Then send the packet out over the network.
 At the other end, that's decrypted by the server, and
it then knows it's got the packet of data.
CLIENT/SERVER
COMMUNICATION
SSH IS THE CLIENT
SSHD IS THE
SERVER(OPEN SSH
DAEMON)
THE SERVER MUST
HAVE SSHD
INSTALLED AND
RUNNING OR U WILL
NOT BE ABLE TO
CONNECT SSH
AUTHENTICATION
METHODS
FOR EXAMPLE :- I
want to connect to
192.168.1.129
$SSH
MUDIT@192.168.1.29
PASSWORD
PUBLIC/PRIVATE
KEY PAIR
HOST BASED
GENERATING KEYS >ssh-
keygen
~/.ssh/id_rsa(
Private Key)
01
~/.ssh/id_rsa.pu
b(Public Key)
02
Public key goes
into server
"authorized_keys"
file
03
WHat ABOUT WINDOWS???
WIndows 10 now
support native
SSH
1
Putty is used in
older versions of
Windows
2
Git Bash &
terminal programs
include the ssh
command & other
Unix tools
3
Electronic Mail
Need of electronic mail
1. Reliability and Security?
2. Speed?
3. Leverage?
4. Environment Friendly?
5. Forwarding?
History
 1965: MIT developed a program called “MAILBOX”
 1969: the US Department of Defense implemented ARPANET (Advanced
Research Projects Agency Network)
 1971: Ray Tomlinson invented and developed electronic mail, as we know it
today
In fig. First message sent via
ARPANET
What is Electronic Mail?
● Method of exchanging messages ("mail") between people using
electronic devices.
● Today's email systems are based on a store-and-forward model.
● Email servers accept, forward, deliver, and store messages
● Neither the users nor their computers are required to be online
simultaneously
● E-mail systems consist of two subsystems. They are:-
○ User Agents, which allow people to read and send e-mail
○ Message Transfer Agents, which move messages from
source to destination
Architecture
 First Scenario:
 The sender and the receiver of the e-mail are users (or
application programs) on the same system.
 Need only two user agents
 Second Scenario:
 The sender and the receiver of the e-mail are users (or
application programs) on two different systems
 When the sender and the receiver of an e-mail are on
different systems, we need two VAs and a pair of MTAs
(client and server).
 Third Scenario:
 When the sender is connected to the mail server via a LAN or a
WAN
 We need two VAs and two paIrs of MTAs (clIent and server).
 Fourth Scenario:
 When both sender and receiver are connected to the mail server
via a LAN or a WAN
 We need two VAs, two pairs of MTAs (client and server), and a
pair of MAAs (client and server)
Points to consider
 Receiver cannot bypass the mail server and
use the MTA server directly.
 Receiver needs another pair of client/server
programs: message access programs.
 Because an MTA client/server program is a
push program: the client pushes the message
to the server
 Receiver here needs a pull program. The
client needs to pull the message from the
server.
User Agent
 It provides service to the user to make the process of
sending and receiving a message easier.
 User Agent types:
 Command-Driven: pine and elm
 GUI-Based: Gmail, Outlook
Format of Mail
 Envelope
 Message
 Header
 Body
Addresses
 To deliver mail, a mail handling system must use an addressing system with
unique addresses
 The address consists of two parts:
 Local Part
 Domain Name
 Example: xyz@domainname.com
Multipurpose Internet Mail Extensions (MIME)
 Electronic mail can send messages only in NVT 7-bit ASCII format
 Cannot support all languages and media.
 MIME transforms non-ASCII data at the sender site to NVT ASCII data and delivers
them to the client MTA to be sent through the Internet. The message at the
receiving side is transformed back to the original data.
 MIME defines five headers that can be added to the original e-mail header section
to define the transformation parameters:
 1. MIME-Version
 2. Content-Type
 3. Content-Transfer-Encoding
 4. Content-Id
 5. Content-Description
MIME
E-mail Protocols
 E-mail Protocols are set of rules that help the client to properly transmit the
information to or from the mail server.
 Protocols that we will discuss:
 SMTP (Simple Mail Transfer Protocol)
 POP (Post Office Protocol)
 IMAP (Internet Mail Access Protocol)
Simple Mail Transfer Protocol (SMTP)
 SMTP is an application layer protocol
 It is a push protocol and is used to send the mail
 The client who wants to send the mail opens a TCP connection to the SMTP server
 SMTP server is always on listening mode.
 After successfully establishing the TCP connection the client process sends the mail
instantly.
 The formal protocol that defines the MTA client and server in the Internet is called
the Simple Mail Transfer Protocol (SMTP)
 The standard port for SMTP is 25
Concept of SMTP
 The user agent (UA) prepares the
message, creates the envelope and then
puts the message in the envelope.
 The mail transfer agent (MTA) transfers
this mail across the internet.
 Instead of just having one MTA at
sending side and one at receiving side,
more MTAs can be added
Commands and Responses
 SMTP uses commands and responses to transfer messages between an MTA
client and an MTA server
 Each command or reply is terminated by a two-character end-of-line token
 Commands: Commands are sent from the client to the server. It consists of a
keyword followed by zero or more arguments.
 Responses: Responses are sent from the server to the client. A response is a
three digit code that may be followed by additional textual information.
SMTP Commands
SMTP Responses
All SMTP response status codes are separated into five classes
 1xx (Informational): The request was received, continuing process
 2xx (Successful): The request was successfully received, understood, and
accepted
 3xx (Redirection): Further action needs to be taken in order to complete the
request
 4xx (Client Error): The request contains bad syntax or cannot be fulfilled
 5xx (Server Error): The server failed to fulfill an apparently valid request
Responses(Contd.)
Mail Transfer Phases
Occurs in three phases:
 connection
establishment,
 mail transfer,
 and connection
termination.
SMTP Example
Post Office Protocol (POP)
 Post Office Protocol version 3 (POP3) is a message access protocol that
enables the client to fetch an e-mail from the remote mail server.
 It is a pull protocol; the client must pull messages from the server.
 The direction of the bulk data is from the server to the client.
 The client POP3 software is installed on the recipient computer; the server
POP3 software is installed on the mail server.
 History:
 1984: POP1
 1985: POP2
 1988: POP3
Points to remember
 POP3 begins when user starts the mail reader.
 The mail reader calls up the ISP (or mail server) and establishes a TCP connection with
the message transfer agent at port 110.
 Once the connection has been established, the POP3 protocol goes through three
states in sequence
 1. Authorization
 2. Transactions
 3. Update
 The user can then list and retrieve the mail messages, one by one.
 POP3 has two modes:
 the delete mode
 and the keep mode
Advantages and Disadvantages
➔ Advantages:
 Useful for receiving emails on one single
device
 Doesn’t require an internet connection for
accessing the downloaded mails
➔ Disadvantages:
 Limited to downloading messages and
keeping a copy on server
 Not possible to access the same email from
multiple devices
 Does not allow the user to organize one’s mail
on the server
 POP3 does not allow the user to partially
check the contents of the mail before
downloading
Internet Message Access Protocol (IMAP)
 Standard email protocol that stores email messages on a mail server
 Allows the end user to view and manipulate the messages as though they were stored
locally on the end user's computing device(s).
 While POP3 can be thought of as a "store-and-forward" service, IMAP can be thought
of as a remote file server.
 There exist five versions of IMAP as follows:
 Original IMAP
 IMAP2
 IMAP3
 IMAP2bis
 IMAP4
 The well-known port address for IMAP is 143.
Features IMAP
IMAP4 provides the following extra functions:
 A user can check the e-mail header prior to downloading.
 A user can search the contents of the e-mail for a specific string of characters
prior to downloading.
 A user can partially download e-mail. This is especially useful if bandwidth is
limited and the e-mail contains multimedia with high bandwidth requirements.
 A user can create, delete, or rename mailboxes on the mail server.
 A user can create a hierarchy of mailboxes in a folder for e-mail storage.
Differences
References
 Data Communications and Networking By Behrouz A. Forouzan
 https://www.tutorialspoint.com/internet_technologies/e_mail_protocols.htm
 https://www.geeksforgeeks.org/differences-between-pop3-and-imap/
 https://www.geeksforgeeks.org/simple-mail-transfer-protocol-smtp/
BLUETOOTH
- Parikshit SinghRathore
- VedantMehta
Bluetooth
 The name was adopted because
Bluetooth wireless technology is
expected to unify the
telecommunications and
computing industries.
 The name ‘Bluetooth’ was named
after 10th century Viking king in
Denmark Harald Bluetooth who
united and controlled Denmark and
Norway.
What’s With the Name?
HISTORY
 In 1994, the L. M. Ericsson company became interested in connecting
its mobile phonestootherdevices(e.g.,laptops)withoutcables.
 Together with four other companies (IBM, Intel, Nokia, and
Toshiba)in 1998 they developed a wireless standard for
interconnectingcomputing
 Thefirstversioni.e.bluetooth 1.0wasreleasedin1999
using
INTRODUCTION:
● It is a Wireless Personal Area Network (WPAN) technology and is
usedforexchangingdataoversmallerdistances
● It operates in the unlicensed, industrial, scientific and medical (ISM)
bandat2.4GHzto2.485GHz.
● Bluetooth ranges upto 10 meters. It provides data rates upto 1 Mbps or
3Mbpsdependingupontheversion
ARCHITECTURE
The architecture of bluetooth defines two types of
networks:
1.Piconet
2.Scatternet
M-master
S-slave
 An arcitecture of bluetooth is calledPICONET.
 It offerstechnologybywhichtransmission occursbasedonits nodesi.e.
 master nodeandslavenode
 Themasternodeisanodefromwhichdataisbeingsentandthesave nodeisa
nodewhichrecievesit.
 Master-node ->information -> Slave-node (possible) Slave-node
->information -> Slave-node (not possible)
 PICONETconsistof1primary(master)nodeand7secondary(slave) nodes.So
themaximum number ofnodesinPICONETare8.
PICONET
 There are five phases of Simple Pairing:
 · Phase 1: Public key exchange
 · Phase 2: Authentication Stage 1
 · Phase 3: Authentication Stage 2
 · Phase 4: Link key calculation
 · Phase 5: LMP Authentication and Encryption
 Phases 1, 3, 4 and 5 are the same for all protocols whereas phase 2
(Authentication Stage 1) is different depending on the protocol used.
Security Protocol
Security Protocol
 Has been set aside by the ISM( industrial ,sientific and medical ) for exclusive
use of Bluetooth wireless products.
Security Protocol
Bluetooth Frequency
 Communicates on the 2.45 GHz frequency.
Security Protocol
Bluetooth Chip
RF
Baseband
Controller
Link
Manager
SCATTERNET
 It isformedbycombinationofPICONETs
 SlaveinonePICONETcanact asaMasterinotherPICONET
 Such node receives information and acts as a slave node in the first
PICONET and deliver this message to other devices and will act as master
tothat PICONET.
 Thisnodeiscalledbridge-nodeorstation.
 AstationcannotbeamasterinbothPICONETs
Ad-HOC
 is a network connection method which is most often associated with
wireless devices.
 The connection is established for the duration of one session and
requires no base station.
 Instead, devices discover others within range to form a network for
those computers.
 Devices may search for target nodes that are out of range by flooding the
network with broadcasts that are forwarded by each node.
 Connections are possible over multiple nodes (multihop ad hoc network).
 Routing protocols then provide stable connections even if nodes are
moving around
BLUETOOTH PROTOCOLSTACK
● Radio (RF)layer:
 It performs modulation/demodulation of the data into RF signals. It
defines the physical characteristics of bluetooth transceiver. It
defines two types of physical link: connection-less and connection-
oriented.
● Baseband Linklayer:
 It performs the connection establishment within
apiconet.
● Link Manager protocollayer:
 It performs the management of the already established links. It
also includes authenticationand encryption processes.
● LogicalLinkControl andAdaptionprotocollayer:
 It is also known as the heart of the bluetooth protocol stack. It allows the
communication between upper and lower layers ofthe bluetooth protocol stack.
It packages the data packets received from upper layers into the form
expected by lowerlayers.Italsoperforms thesegmentationandmultiplexing.
● SDPlayer:
 It is short for Service Discovery Protocol. It allows to discover the services
availableonanotherbluetoothenableddevice.
● RF commlayer:
 It is short for Radio Frontend Component. It provides serial interface with WAP an
OBEX.
● OBEX:
 short for Object Exchange. It is a communication protocol to exchange
objects between 2devices.
● WAP:
 It isshortfor WirelessAccessProtocol. It isusedfor internetaccess.
● TCS:
 Itisshort forTelephonyControl Protocol. Itprovidestelephonyservice.
● Applicationlayer:
 It enablestheusertointeract withtheapplication.
Ways By Which Bluetooth Technology Makes Wireless
Connections Reliable
 Channels that are noisy and busy are dynamically tracked and
avoidedwhichlowersthechancesofcollision.
 When trying to avoid collisions, it’s best to be small and fast. For example,
when compared to other low–power wireless mesh networking
technologies, Bluetooth packets are typically half the size and four times
faster.
 Having small, fast packets enables more efficient use of spectrum and
significantly lowers the probability of collisions or we can say bluetooth
packetsarehard to hit.
Advantages
 Low cost.
 Easy to use.
 It can also penetrate through walls.
 It creates an adhoc connection immediately without any
wires.
 It is used for voice and data transfer.
Disadvantages
 It canbehacked andhence,less secure.
 It hasslowdata transfer rate:3Mbps.
 It has small range:10meters.
BIBLIOGRAPHY
 https://www.bluetooth.com/blog/2-ways-bluetooth-technology-ma kes-wireless-
connections-reliable/
 https://www.geeksforgeeks.org/bluetooth/
 https://www.youtube.com/watch?v=FWJddwcpYw8
 Computer networks-Tanenbaum,Wetherall
Firewall
Overview
 What is Firewall?
 Why do we have need of Firewall?
 What are the types of Firewall?
 Packet Filtering Firewall
 Application-level Firewall (Proxy)
 Differences between Firewall and Antivirus
 Conclusion
A short introduction to Firewall!!
What is Firewall?
 Monitoring and Control Incoming and
Outgoing traffic based on pre-defined rules.
 Acts like a barrier
 Host based Firewall (Which is based in
our local machine/computer) and
Network based Firewall (Hardware
Based).
Why do we have need of Firewall?
 A Firewall Protects Your Computer From Unauthorized Remote
Access
 Firewalls Can Block Messages Linking to Unwanted Content
 Firewalls Make Online Gaming Safer
 You Can Block Unsuitable or Immoral Content With a Firewall
 Firewalls Can Be Hardware or Software
What are the type so
Firewall?
 Packet filtering firewall
 Circuit-level gateway
 Stateful inspection firewall
 Application-level gateway (aka proxy
firewall)
 Next-generation firewall (NGFW)
Packet Filtering
Firewall (Layer-4)
Check IP Header & TCP
Header
Works on Network and
Transport Layer
Can block IP address & Full
network.
Can block a service (http,
ftp, etc.)
Application-level Firewall (Proxy)
 Monitors Control Incoming and
Outgoing
 Traffic based on pre-defined rules.
 Acts like a barrier.
 Host based and Network based
Firewall.
 Application (Proxy Firewall) Layer-5
Differences between Firewall and Antivirus
● Firewall
 Firewall is implemented in both
hardware and software.
 Firewall deals with external threats
only.
 In firewall counter attacks are possible
such as IP Spoofing and routing attacks.
 Firewall works on monitoring and
filtering.
 Firewall checks the threat from
incoming packets.
● Antivirus
 Antivirus is implemented in software
only.
 Antivirus deals with both external
threats and internal threats.
 In antivirus no counter attacks are
possible after removing the malware.
 Antivirus works on Scanning of infected
files and software.
 Antivirus checks the threat from
malicious software.
Conclusion
 One of the best things about a
firewall from a security standpoint is
that it stops anyone on the outside
from logging onto a computer in your
private network.
 While this is a big deal for businesses,
most home networks will probably
not be threatened in this manner.
Still, putting a firewall in place
provides some peace of mind.
References
 Gate Smashers: https://www.youtube.com/channel/UCJihyK0A38SZ6SdJirEdIOw
 Google Search Engine: https://www.google.com
 Types of firewall and possible attacks: https://www.geeksforgeeks.org/types-of-firewall-and-possible-
attacks/
 Introduction of Firewall in Computer Network: https://www.geeksforgeeks.org/introduction-of-
firewall-in-computer- network/
 Firewall methodologies: https://www.geeksforgeeks.org/firewall-methodologies/
 Difference between Firewall and Antivirus: https://www.geeksforgeeks.org/difference-between-
firewall-and-antivirus/
 H. Abie, CORBA Firewall Security: Increasing the Security of CORBA Applications, January 2000.
 F. M. Avolio, Firewalls: Are We Asking Too Much?, http://www.crossnodes.com/icsa/perimeter.html
 D. B. Chapman and E. D. Zwicky, Building Internet Firewalls, O'Reilly & Associates, Inc., November 1995.
 D. Newman, Super Firewalls, Data Communications, Lab Tests, May 21, 1999, http://www.data.com/
FORE Systems, Firewall Switching Agent White Paper, October 1998.
Thank you

CS-324 Computer Networks.pdf

  • 1.
    CS 352 ComputerNetworks Faculty: Ms. Diksha Goyal
  • 2.
    UNIT 1  OSI& TCP/IP MODELS  NETWORK TOPOLOGIES  NETWORKING TYPES  TRANSMISSION MEDIA  NETWORKIN DEVICES  WLAN  MULTIPLEXING
  • 3.
    Contents -  Representationof data and its flow, network protocols and standards  OSI & TCP/IP MODEL  What is Network Topology? • Network Topology Types ○ Bus Topology ○ Ring Topology ○ Star Topology ○ Tree Topology ○ Mesh Topology ○ Hybrid Topology • Networking Types ○ Local Area Network (LAN) ○ Wide Area Network (WAN) ○ Metropolitan Area Network (MAN) ○ Personal Area Network (PAN)
  • 4.
     Transmissions Media •Guided Media o Twisted pair cable o Co-axial Cable o Fiber Optic Cable • Unguided Media o Radio Waves o Antenna o Microwave o Infrared  Networking Devices o Hub o Switch o Router o Bridge o Gateway o Modem o Repeater o Access Point  PSTN  WLAN  MULTIPLEXING
  • 5.
    Representation of data andits flow, network protocols and standards
  • 6.
    Data Representation Data iscollection of raw facts which is processed to deduce information. There may be different forms in which data may be represented. Some of the forms of data used in communication are as follows; 1 : text 2 : numbers 3 : images 4 : audio 5 : video
  • 7.
    Data can berepresented by using different forms as shown in figure
  • 8.
    Text Text includes combinationsof alphabet in small case as well as upper case. It is stored as pattern of bits. In data communication , text is represented as a bit pattern Unicode : 32 bits ascii_ - first 127 characters in Unicode. 4
  • 9.
    Numbers Numbers include combinationof digits from 0 to 9. it is stored as a pattern of bits . prevalent encoding system : asci, Unicode. Images An image is worth a thousand words‖ is a very famous saying. In computers images are digitally stored. A Pixel is the smallest element of an image. To put it in simple terms, a picture or image is a matrix of pixel elements. The pixels are represented in the form of bits. Depending upon the type of image (black n white or color ) each pixel would require different number of bits to represent the value of a pixel. The size of an image depends upon the number of pixels (also called resolution) and the bit pattern used to indicate the value of each pixel.
  • 10.
    Audio Audio refers tothe recording or broadcasting of sound or music. Audio is by nature different from text, numbers , or images. It is continuous, not discrete. Even when we use a microphone to change voice or music to an electric signal, we create a continuous signal Video video refers to broadcasting of data in form of picture or movie.
  • 11.
    Data flow Two devicescommunicate with each other by sending and receiving data. The data can flow between the two devices in the following ways. 1: simplex 2: half duplex 3: full duplex
  • 12.
    Diagram pf dataflow methods
  • 13.
    Simplex In simplex ,communicationis unidirectional only one of the device sends the data and the other one only receives the data. Example in the below diagram : a CPU send data while a monitor only receives data.
  • 14.
    Half duplex In halfduplex both the stations can transmit as well as receives but not at the same time. When one device is sending other can only receives and vice versa(as shown below in figure) Example: walkie - talkie
  • 15.
    Full duplex In fullduplex mode, both stations can transmit and receives at the same time. Example: mobile.
  • 16.
    Protocols A protocol isbasically a synonym for the rule. In computer networks, basically, Communications occurs between entities in different systems. An entity is anything that is capable od sending or receiving information . any two entities cannot simply send bitstreams to each other and expect to be understood. A protocol is a set of rules that mainly govern data communications. The protocol mainly defines what is communicated, how it is communicated, and when it is communicated.
  • 17.
    Key elements ofa protocol The key elements of a protocol are as given below: syntax This term mainly refers to the structure or format of the data which simply means the order in which data is presented. For example, A simple protocol might expect the first 8 bits of data to be the address of the sender, then the second 8 bits to be the address of the receiver, and then the rest of the stream to be the message itself.
  • 18.
    Key elements ofa protocol Semantics This term mainly refers to the meaning of each section of bits. How does a particular pattern to be interpreted, and On the basis of interpretation what action is to be taken? For example, does an address identify the route to be taken or the final destination of the message? Timing This term mainly refers to two characteristics: At what time the data should be sent and how fast data can be sent. For example, if a sender produces data at 100 Mbps but the receiver can process data at only 1 Mbps, the transmission will overload the receiver and there will be some data loss.
  • 19.
    Standard Standards are essentialin creating and maintaining an open and competitive market for equipment manufacturers and in guaranteeing national and international interoperability of data and telecommunications technology and processes. Standards provide guidelines to manufacturers, vendors, government agencies, and other service providers to ensure the kind of interconnectivity necessary in today's marketplace and in international communications. Data communication standards fall into two categories: de facto (meaning "by fact" or "by convention") and de jure (meaning "by law" or "by regulation").
  • 20.
    Standards are oftwo types : De Facto Standard. De Jure Standard.
  • 21.
    De Facto Standard: The meaning of the work ” De Facto ” is ” By Fact ” or “By Convention”. These are the standard s that have not been approved by any Organization , but have been adopted as Standards because of it’s widespread use. Also , sometimes these standards are often established by Manufacturers. For example : Apple and Google are two companies which established their own rules on their products which are different . Also they use some same standard rules for manufacturing for their products. De facto standard
  • 22.
  • 23.
    What is theOSI Model? OSI stands for Open System Interconnection is a reference model that describes how information from a software application in one computer moves through a physical medium to the software application in another computer. OSI model was developed by the International Organization for Standardization (ISO) in 1984. it is now considered as an architectural model for the inter-computer communications. OSI model divides the whole task into seven smaller and manageable tasks. Each layer is assigned a particular task. OSI consists of seven layers, and each layer performs a particular network function. OSI Model
  • 24.
    Different layers ofOSI model- There are the seven OSI layers :
  • 26.
    Physical layer: The lowestlayer of the OSI reference model is the physical layer. It is responsible for the actual physical connection between the devices. The physical layer contains information in the form of bits. It is responsible for transmitting individual bits from one node to the next. When receiving data, this layer will get the signal received and convert it into 0s and 1s and send them to the Data Link layer, which will put the frame back together.
  • 27.
    The functions ofthe physical layer are : Bit synchronization: The physical layer provides the synchronization of the bits by providing a clock. This clock controls both sender and receiver thus providing synchronization at bit level. Bit rate control: The Physical layer also defines the transmission rate i.e. the number of bits sent per second. Physical topologies: Physical layer specifies the way in which the different, devices/nodes are arranged in a network i.e. bus, star or mesh topology. Transmission mode: Physical layer also defines the way in which the data flows between the two connected devices. The various transmission modes possible are: Simplex, half-duplex and full-duplex. * Hub, Repeater, Modem, Cables are Physical Layer devices.
  • 28.
  • 29.
    The data linklayer is responsible for the node to node delivery of the message. The main function of this layer is to make sure data transfer is error-free from one node to another, over the physical layer. When a packet arrives in a network, it is the responsibility of DLL to transmit it to the Host using its MAC address. Data Link Layer is divided into two sub layers : Logical Link Control (LLC) Media Access Control (MAC) The packet received from Network layer is further divided into frames depending on the frame size of NIC(Network Interface Card). DLL also encapsulates Sender and Receiver’s MAC address in the header. The Receiver’s MAC address is obtained by placing an ARP(Address Resolution Protocol) request onto the wire asking “Who has that IP address?” and the destination host will reply with its MAC address
  • 30.
    The functions ofthe data Link layer are - Framing: Framing is a function of the data link layer. It provides a way for a sender to transmit a set of bits that are meaningful to the receiver. This can be accomplished by attaching special bit patterns to the beginning and end of the frame. Physical addressing: After creating frames, Data link layer adds physical addresses (MAC address) of sender and/or receiver in the header of each frame. Error control: Data link layer provides the mechanism of error control in which it detects and retransmits damaged or lost frames. Flow Control: The data rate must be constant on both sides else the data may get corrupted thus , flow control coordinates that amount of data that can be sent before receiving acknowledgement. Access control: When a single communication channel is shared by multiple devices, MAC sub-layer of data link layer helps to determine which device has control over the channel at a given time.
  • 31.
    Network Layer: Network layerworks for the transmission of data from one host to the other located in different networks. It also takes care of packet routing i.e. selection of the shortest path to transmit the packet, from the number of routes available. The sender & receiver’s IP address are placed in the header by the network layer.
  • 32.
    The functions ofthe Network layer are - Routing: The network layer protocols determine which route is suitable from source to destination. This function of network layer is known as routing. Logical Addressing: In order to identify each device on internetwork uniquely, network layer defines an addressing scheme. The sender & receiver’s IP address are placed in the header by network layer. Such an address distinguishes each device uniquely and universally. **Segment in Network layer is referred as Packet. ** Network layer is implemented by networking devices such as routers
  • 33.
    Transport Layer : Transportlayer provides services to application layer and takes services from network layer. The data in the transport layer is referred to as Segments. It is responsible for the End to End Delivery of the complete message. The transport layer also provides the acknowledgement of the successful data transmission and re-transmits the data if an error is found.
  • 34.
    • At sender’sside: Transport layer receives the formatted data from the upper layers, performs Segmentation and also implements Flow & Error control to ensure proper data transmission. It also adds Source and Destination port number in its header and forwards the segmented data to the Network Layer. • At receiver’s side: Transport Layer reads the port number from its header and forwards the Data which it has received to the respective application. It also performs sequencing and reassembling of the segmented data.
  • 35.
    The functions ofthe transport layer are : Segmentation and Reassembly: This layer accepts the message from the (session) layer , breaks the message into smaller units . Each of the segment produced has a header associated with it. The transport layer at the destination station reassembles the message. Service Point Addressing: In order to deliver the message to correct process, transport layer header includes a type of address called service point address or port address. Thus by specifying this address, transport layer makes sure that the message is delivered to the correct process ** Transport layer is operated by the Operating System. It is a part of the OS and communicates with the Application Layer by making system calls. Transport Layer is called as Heart of OSI model
  • 36.
    The services providedby the transport layer : Connection Oriented Service: It is a three-phase process which include – Connection Establishment – Data Transfer – Termination / disconnection In this type of transmission, the receiving device sends an acknowledgement, back to the source after a packet or group of packet is received. This type of transmission is reliable and secure. Connection less service: It is a one-phase process and includes Data Transfer. In this type of transmission, the receiver does not acknowledge receipt of a packet. This approach allows for much faster communication between devices. Connection-oriented service is more reliable than connectionless Service. * Data in the Transport Layer is called as Segments
  • 37.
  • 38.
    This layer isresponsible for establishment of connection, maintenance of sessions, authentication and also ensures security. The functions of the session layer are : Session establishment, maintenance and termination: The layer allows the two processes to establish, use and terminate a connection. Synchronization : This layer allows a process to add checkpoints which are considered as synchronization points into the data. These synchronization point help to identify the error so that the data is re- synchronized properly, and ends of the messages are not cut prematurely and data loss is avoided. Dialog Controller : The session layer allows two systems to start communication with each other in half- duplex or full-duplex. The functions of the Session Layer are:
  • 39.
    Presentation Layer: Presentation layeris also called the Translation layer. The data from the application layer is extracted here and manipulated as per the required format to transmit over the network.
  • 40.
    The functions ofthe presentation layer are : Translation : For example, ASCII to EBCDIC. Encryption/ Decryption : Data encryption translates the data into another form or code. The encrypted data is known as the cipher text and the decrypted data is known as plain text. A key value is used for encrypting as well as decrypting data. Compression: Reduces the number of bits that need to be transmitted on the network.
  • 41.
    Application Layer: At thevery top of the OSI Reference Model stack of layers, we find Application layer which is implemented by the network applications. These applications produce the data, which has to be transferred over the network. This layer also serves as a window for the application services to access the network and for displaying the received information to the user. Ex: Application – Browsers, Skype Messenger etc. **Application Layer is also called as Desktop Layer.
  • 42.
    The functions ofthe Application layer are : Network Virtual Terminal FTAM-File transfer access and management Mail Services Directory Services OSI model acts as a reference model and is not implemented in the Internet because of its late invention. Current model being used is the TCP/IP model.
  • 43.
    TCP/IP Model TCP/IP modelwas designed and developed by Department of Defense (DoD) in 1960s and is based on standard protocols. It stands for Transmission Control Protocol/Internet Protocol. The TCP/IP model is a concise version of the OSI model. It contains four layers, unlike seven layers in the OSI model.
  • 44.
  • 45.
    Network Access Layer: This layer corresponds to the combination of Data Link Layer and Physical Layer of the OSI model. It looks out for hardware addressing and the protocols present in this layer allows for the physical transmission of data. We just talked about ARP being a protocol of Internet layer, but there is a conflict about declaring it as a protocol of Internet Layer or Network access layer. It is described as residing in layer 3, being encapsulated by layer 2 protocols
  • 46.
    Internet Layer : Thislayer parallels the functions of OSI’s Network layer. It defines the protocols which are responsible for logical transmission of data over the entire network. The main protocols residing at this layer are : IP – stands for Internet Protocol and it is responsible for delivering packets from the source host to the destination host by looking at the IP addresses in the packet headers. IP has 2 versions: IPv4 and IPv6. IPv4 is the one that most of the websites are using currently. But IPv6 is growing as the number of IPv4 addresses are limited in number when compared to the number of users. ICMP – stands for Internet Control Message Protocol. It is encapsulated within IP datagrams and is responsible for providing hosts with information about network problems. ARP – stands for Address Resolution Protocol. Its job is to find the hardware address of a host from a known IP address. ARP has several types: Reverse ARP, Proxy ARP, Gratuitous ARP and Inverse ARP
  • 47.
    Host-to-Host Layer : Thislayer is analogous to the transport layer of the OSI model. It is responsible for end-to-end communication and error-free delivery of data. It shields the upper-layer applications from the complexities of data. The two main protocols present in this layer are : Transmission Control Protocol (TCP) – It is known to provide reliable and error-free communication between end systems. It performs sequencing and segmentation of data. It also has acknowledgment feature and controls the flow of the data through flow control mechanism. It is a very effective protocol but has a lot of overhead due to such features. Increased overhead leads to increased cost. User Datagram Protocol (UDP) – On the other hand does not provide any such features. It is the go-to protocol if your application does not require reliable transport as it is very cost-effective. Unlike TCP, which is connection-oriented protocol, UDP is connectionless
  • 48.
    Application Layer: An applicationlayer is the topmost layer in the TCP/IP mode It is responsible for handling high-level protocols, issues of representation. This layer allows the user to interact with the application. When one application layer protocol wants to communicate with another application layer, it forwards its data to the transport layer. There is an ambiguity occurs in the application layer. Every application cannot be placed inside the application layer except those who interact with the communication system. For example: text editor cannot be considered in application layer while web browser using HTTP protocol to interact with the network where HTTP protocol is an application layer protocol.
  • 49.
    Following are themain protocols used in the application layer: HTTP: HTTP stands for Hypertext transfer protocol. This protocol allows us to access the data over the world wide web. It transfers the data in the form of plain text, audio, video. It is known as a Hypertext transfer protocol as it has the efficiency to use in a hypertext environment where there are rapid jumps from one document to another. SNMP: SNMP stands for Simple Network Management Protocol. It is a framework used for managing the devices on the internet by using the TCP/IP protocol suite. SMTP: SMTP stands for Simple mail transfer protocol. The TCP/IP protocol that supports the e-mail is known as a Simple mail transfer protocol. This protocol is used to send the data to another e-mail address. DNS: DNS stands for Domain Name System. An IP address is used to identify the connection of a host to the internet uniquely. But, people prefer to use the names instead of addresses. Therefore, the system that maps the name to the address is known as Domain Name System. TELNET: It is an abbreviation for Terminal Network. It establishes the connection between the local computer and remote computer in such a way that the local terminal appears to be a terminal at the remote system. FTP: FTP stands for File Transfer Protocol. FTP is a standard internet protocol used for transmitting the files from one computer to another computer
  • 50.
    Internet Layer : Thislayer parallels the functions of OSI’s Network layer. It defines the protocols which are responsible for logical transmission of data over the entire network. The main protocols residing at this layer are : IP – stands for Internet Protocol and it is responsible for delivering packets from the source host to the destination host by looking at the IP addresses in the packet headers. IP has 2 versions: IPv4 and IPv6. IPv4 is the one that most of the websites are using currently. But IPv6 is growing as the number of IPv4 addresses are limited in number when compared to the number of users. ICMP – stands for Internet Control Message Protocol. It is encapsulated within IP datagrams and is responsible for providing hosts with information about network problems. ARP – stands for Address Resolution Protocol. Its job is to find the hardware address of a host from a known IP address. ARP has several types: Reverse ARP, Proxy ARP, Gratuitous ARP and Inverse ARP
  • 51.
    What is NetworkTopology? Network topology refers to how various nodes, devices, and connections on your network are physically or logically arranged in relation to each other. The way a network is arranged can make or break network functionality, connectivity, and protection from downtime. Categories - Physical Network Topology The physical network topology refers to the actual connections (wires, cables, etc.) of how the network is arranged. Setup, maintenance, and provisioning tasks require insight into the physical network. Logical Network Topology Logical network topology is a little more abstract and strategic, referring to the conceptual understanding of how and why the network is arranged the way it is, and how data moves through it.
  • 52.
    Explanation - ● Physicaltopology explains the arrangement of different nodes. ● Logical topology reflects the communication of data between various nodes. ● For example, in the picture, the dotted line shows how PC-A is connected to the server through the switch. Also, the data from PC-A will have to pass through two switches & two routers to reach PC-D. This data flow is what logical topology is concerned about.
  • 53.
  • 54.
    Bus Topology • Thebus topology is designed in such a way that all the stations are connected through a single cable known as a backbone cable. • Each node is either connected to the backbone cable by drop cable or directly connected to the backbone cable. • When a node wants to send a message over the network, it puts a message over the network. All the stations available in the network will receive the message whether it has been addressed or not. • It is alternatively known as Line Topology. BUS TOPOLOGY -
  • 55.
    55 Ring Topology Single RingTopology Dual - Ring Topology • It is a type of network topology where each node is exactly connected to two other nodes, thus forming a single continuous path for transmission. • In a ring network, packets of data travel from one device to the next until they reach their destination. Message transmission takes place with the help of TOKEN. • A number of repeaters are connected with large number of nodes. • Single Ring Topology - Most ring topologies allow packets to travel only in one direction, called a Unidirectional/Single Ring Topology. • Dual Ring Topology - Others permit data to move in either direction, called bidirectional/ Dual-Ring Topology.
  • 56.
    56 PROS • Only onestation on the network is permitted to send data at a time, which greatly reduces the risk of packet collisions. • Additional workstations can be added without impacting performance of the network. • These are cost-effective and inexpensive to install CONS • All data being transferred over the network must pass through each workstation on the network, which can make it slower than a star topology. • The entire network will be impacted if one workstation shuts down. PROS OF DUAL-RING • Very efficient - because each node has two connections, information can be sent both clockwise and counterclockwise along the network. • Dual ring topologies offer a little extra security, too: if one ring fails within a node, the other ring is still able to send data.
  • 57.
    Tree Topology - •A tree topology is a special type of structure where many connected elements are arranged like branches of tree. • It has a parent-child hierarchy to how the nodes are connected. • This topology integrates various star topologies together in a single bus, so it is known as a Star Bus topology.
  • 58.
    PROS • Tree topologyis mainly used to provide broadband transmission, i.e., signals are sent over long distances without being attenuated. • It provides high scalability as leaf nodes can add more nodes in the hierarchical chain. • Other nodes in network are not affected, if one of their nodes get damaged. • It provides easy maintenance and fault identification. CONS • Large cabling is required as compared to star and bus topology. • On the failure of a hub, the entire network fails. • Tree network is very difficult to configure than other network topologies.
  • 59.
    Mesh Topology • Meshtechnology is an arrangement of the network in which computers are interconnected with each other through various redundant connections. • There are multiple paths from one computer to another computer. • It does not contain the switch, hub or any central computer which acts as a central point of communication. Types – •Full Mesh Topology - Every computer in the network has a connection to each of the other computers in that network. •Partially – Connected Mesh Topology - At least two of the computers in the network have connections to multiple other computers in that network. If one of the primary computers or connections in the network fails, the rest of the network continues to operate normally.
  • 60.
    PROS CONS • Very reliable- if any link breakdown will not affect the communication between connected computers. • Manages high amounts of traffic, because multiple devices can transmit data simultaneously. • The complex degree of interconnectivity between nodes makes the network resistant to failure. • Adding new devices would not disrupt the communication between other devices. • The cost to implement is higher than other network topologies, making it a less desirable option. • Each interconnection between nodes requires a cable and configuration once deployed, so it can also be time-consuming to set up. • The chance of redundant connections is high, which adds to the high costs and potential for reduced efficiency.
  • 61.
    61 Hybrid Topology - •Hybrid Topology is an integration of two or more different topologies to form a resultant topology. • For example, if there exist a ring topology in one branch of ICICI bank and bus topology in another branch of ICICI bank, connecting these two topologies will result in Hybrid topology. • NOTE - If similar topologies are connected with each other will not result in Hybrid topology.
  • 62.
  • 63.
    Local Area Network(LANs) - • A local area network (LAN) is a computer network that interconnects computers within a limited area such as a residence, school, laboratory, university campus, office etc. • Range covered - 1km to 10km • Cables used - Unshielded Twisted Pair (Ethernet Cables) • Examples - Wifi & Ethernet In the past, all nodes were connected through a common cable, which meant that a packet sent from one host to another was received by all hosts. The intended recipient kept the packet; the others dropped the packet. Today, most LANs use a smart connecting switch, which is able to recognize the destination address of the packet and guide the packet to its destination without sending it to all other hosts.
  • 64.
    64 Metropolitan Area Network(MANs) • A metropolitan area network (MAN) is a computer network that connects computers within a single large city, multiple cities and towns, or any given large area with multiple buildings. • A MAN is larger than a local area network (LAN) but smaller than a wide area network (WAN). • Range covered - 10km to 50km. • Cables used - Fiber Optic Cables & Twisted Pair Cables. • Examples - Cable TV network, Telephone networks providing high-speed DSL lines.
  • 65.
    Wide Area Network(WANs) - • WANs are used to connect LANs & MANs and other types of networks together so that users and computers in one location can communicate with users and computers in other locations. • WANs are often used by large businesses to connect their office networks; each office typically has its own local area network, or LAN, and these LANs connect via a WAN. • Range Covered - More than 50 kms. • Cables Used – Fibre optic cables • Example - Internet
  • 66.
    Personal Area Network •Personal Area Network (PAN) is a the computer network that connects computers/devices within the range of an individual person. It typically involves a computer, phone, tablet, printer, PDA (Personal Digital Assistant) etc. • Range covered - less than 10 meters. Types of PAN - Wireless PAN – WPAN is connected through signals such as infrared, Bluetooth and ultra wideband etc. Wired PAN – Wired PAN is connected through cables/wires such as USB.
  • 67.
  • 68.
    NETWORKING TRANSMISSION MEDIA- •The transmission medium can be defined as a pathway that can transmit information from a sender to a receiver. • Transmission media are located below the physical layer and are controlled by the physical layer. • Transmission media are also called communication channels. • Transmission media are of two types − Guided Transmission Medium Unguided Transmission Medium
  • 69.
  • 70.
    Guided Transmission Medium- Guidedtransmission media are also called bounded media or wired media. They comprise cables or wires through which data is transmitted. They are called guided since they provide a physical conduit from the sender device to the receiver device. The signal traveling through these media are bounded by the physical limits of the medium. The most popular guided media are − • Twisted pair cable • Coaxial cable • Fiber optics
  • 71.
    Twisted Pair - Issues: (1)Interference due to unwanted electrical coupling of two copper (2) Interference due to unwanted electrical coupling between the neighboring twisted pairs Twisted pair is a physical media made up of a pair of cables twisted with each other. A twisted pair cable is cheap as compared to other transmission media. Installation of the twisted pair cable is easy, and it is a lightweight cable. The frequency range for twisted pair cable is from 0 to 3.5KHz. A twisted pair consists of two insulated copper wires arranged in a regular spiral pattern. The degree of reduction in noise interference is determined by the number of turns per foot. Increasing the number of turns per foot decreases noise interference.
  • 72.
    Twisted Pair Applications o Mostcommonly used medium o Telephone network o Between house and local exchange (subscriber loop) o Within buildings o To private branch exchange (PBX) o For local area networks (LAN) o 10Mbps or 100Mbps
  • 73.
    Advantages of Twistedpair cable : •It are often wont to carry both analog and digital data. •It’s relatively easy to implement and terminate. •It is the smallest amount expensive media of transmission for brief distances. •If portion of a twisted pair cable is broken it doesn’t effect the whole network. •Less vulnerable to electrical interference caused by nearby equipment or wires. •It cause interference themselves. •Best performance in short distances. •High-cost performance Disadvantages of Twisted pair cable : •It result signal distortion in a very effective manner. •Attenuation is very high. •It supports 10 mbps upto a distance of 100 meters on a 10BASE-T which are considered to be low bandwidth. •It provides poor security and is relatively easy to tap. •As they a thin so can be easily breakable. •Low durability (must be maintained regularly). •Susceptible to electromagnetic interference (EMI).
  • 74.
  • 75.
    • Unshielded TwistedPair (UTP) —Ordinary telephone wire —Less expensive —Weak immunity against noise and interference —Suffers from external EM interference • Shielded Twisted Pair (STP) —An extra metallic sheath on each pair —Relatively more expensive —Provide better performance than UTP • Increased Data rate • Increased Bandwidth Unshielded and Shielded TP
  • 76.
    Coaxial Cable Architecture: •Coaxial cableis very commonly used transmission media, for example, TV wire is usually a coaxial cable. •The name of the cable is coaxial as it contains two conductors parallel to each other. •It has a higher frequency as compared to Twisted pair cable. •The inner conductor of the coaxial cable is made up of copper, and the outer conductor is made up of copper mesh. The middle core is made up of non-conductive cover that separates the inner conductor from the outer conductor. •The middle core is responsible for the data transferring whereas the copper mesh prevents from the EMI(Electromagnetic interference).
  • 77.
    • Television (TV)signals distribution • Ariel to TV • Cable TV • Long distance telephone transmission • Can carry 10,000 voice calls simultaneously • Being replaced by fiber optic • Short distance computer systems links • Local area networks (LAN) • Metropolitan area network (MAN) Coaxial Cable Applications
  • 78.
    Advantages Of Coaxialcable: •The data can be transmitted at high speed. •It has better shielding as compared to twisted pair cable. •It provides higher bandwidth . Disadvantages Of Coaxial cable: •It is more expensive as compared to twisted pair cable. •If any fault occurs in the cable causes the failure in the entire network.
  • 79.
    Fibre Optic •Fibre opticcable is a cable that uses electrical signals for communication. •Fibre optic is a cable that holds the optical fibres coated in plastic that are used to send the data by pulses of light. •The plastic coating protects the optical fibres from heat, cold, electromagnetic interference from other types of wiring. •Fibre optics provide faster data transmission than copper wires. Diagrammatic representation of fibre optic cable:
  • 80.
    Basic elements ofFibre optic cable: •Core: The optical fibre consists of a narrow strand of glass or plastic known as a core. A core is a light transmission area of the fibre. The more the area of the core, the more light will be transmitted into the fibre. •Cladding: The concentric layer of glass is known as cladding. The main functionality of the cladding is to provide the lower refractive index at the core interface as to cause the reflection within the core so that the light waves are transmitted through the fibre. •Jacket: •The protective coating consisting of plastic is known as a jacket. The main purpose of a jacket is to preserve the fibre strength, absorb shock and extra fibre protection.
  • 81.
    Unguided Transmission Medium Unguidedtransmission media are also called wireless media. They transport data in the form of electromagnetic waves that do not require any cables for transmission. These media are bounded by geographical boundaries. These type of communication is commonly referred to as wireless communications. Unguided signals can travel in three ways − •Ground propagation •Sky propagation •Line – of – sight propagation The commonly used unguided transmissions are − •Radio transmission •Microwave transmission •Infrared transmission •Light transmission
  • 82.
    Propagation methods Unguided signalstravels from the source to destination in several ways it is known as propagation. They are three types: ▪ Ground propagation ▪ Sky propagation ▪ Line-of-Sight Propagation
  • 83.
    ▪ Omnidirectional Antenna ▪Frequencies between 3 KHz and 1 GHz. ▪ Used for multicasts(multiple way) communications, such as radio and television, and paging system. ▪ Radio waves can penetrate buildings easily, so that widely use for indoors & outdoors communication. Unguided Media – Radio Waves
  • 84.
    An Antenna isa structure that is generally a metallic object may be a wire or group of wires, used to convert high frequency current into electromagnetic waves. Antenna are two types: • Transmission antenna ▪ Transmit radio frequency from transmitter ▪ Radio frequency then Convert to electromagnetic energy by antenna ▪ Then, radiate into surrounding environment • Reception antenna ▪ Electromagnetic energy get in antenna ▪ Then Antenna convert radio frequency to electrical energy ▪ Then, Goes to receiver same antenna can be used for both purposes Antennas
  • 85.
    Microwaves are idealwhen large areas need to be covered and there are no obstacles in the path Microwaves
  • 86.
    Micro waves Transmission •Microwaves are unidirectional • Micro waves electromagnetic waves having frequency between 1 GHZ and 300 GHZ. • There are two types of micro waves data communication system : terrestrial and satellite • Micro waves are widely used for one to one communication between sender and receiver, example: cellular phone, satellite networks and in wireless LANs(wifi), WiMAX,GPS
  • 87.
    ▪ Frequencies between300 GHz to 400 THz. ▪ Used for short-range communication ▪ Example: Night Vision Camera,Remote control, File sharing between two phones, Communication between a PC and peripheral device, INFRARED
  • 88.
    What are networkdevices? Network Devices are components used to connect computers or other electronics devices together so that they can share files or resources like printers or fax machine
  • 89.
  • 90.
    Types of NetworkingDevices - •Hub •Switch •Router •Bridge •Gateway •Modem •Repeater •Access Point
  • 91.
    HUB • A hubis a physical layer networking device which is used to connect multiple devices in a network. They are generally used to connect computers in a LAN. • A hub has many ports in it. A computer which intends to be connected to the network is plugged in to one of these ports. When a data frame arrives at a port, it is broadcast to every other port, without considering whether it is destined for a particular destination or not.
  • 92.
    Types of Hub 1Active hub These hubs regenerate our signals as well as amplify the signal. Active hubs need electricity to work. 2 Passive hub Talking about passive hubs, it simply distributes the signal coming from the previous ports. Passive hub neither regenerates any signal nor amplifies, therefore it does not require electricity to work. 3 Intelligence hub This helps the administrator to monitor network traffic, and you can configure each port on it individually, also known as a manageable hub.
  • 93.
    Switch • A switchis a data link layer networking device which connects devices in a network and uses packet switching to send and receive data over the network. • Like a hub, a switch also has many ports, to which computers are plugged in. However, when a data frame arrives at any port of a network switch, it examines the destination address and sends the frame to the corresponding device(s). Thus, it supports both unicast and multicast communications.
  • 94.
    Router • A routeris a device like a switch that routes data packets based on their IP addresses. Router is mainly a Network Layer device. Routers normally connect LANs and WANs together and have a dynamically updating routing table based on which they make decisions on routing the data packets. Router divide broadcast domains of hosts connected through it. • There are wired, wireless, core, edge and virtual routers available. Routers usually select the best route to direct the packets to reach faster. The best example is mail carrier.
  • 95.
    Bridge • Bridges areused to connect two or more hosts or network segments together. The basic role of bridges in network architecture is storing and forwarding frames between the different segments that the bridge connects. They use hardware Media Access Control (MAC) addresses for transferring frames. • Bridges can also be used to connect two physical LANs into a larger logical LAN. • Bridges work only at the Physical and Data Link layers of the OSI model. • Bridges are like hubs in many respects, including the fact that they connect LAN components with identical protocols. However, bridges filter incoming data packets, known as frames, for addresses before they are forwarded.
  • 96.
    GATEWAY • Gateways normallywork at the Transport and Session layers of the OSI model. At the Transport layer and above, there are numerous protocols and standards from different vendors; gateways are used to deal with them. Gateways provide translation between networking technologies such as Open System Interconnection (OSI) and Transmission Control Protocol/Internet Protocol (TCP/IP). • Gateways perform all of the functions of routers and more. In fact, a router with added translation functionality is a gateway.
  • 97.
    Modem • Modems (modulators-demodulators)are used to transmit digital signals over analog telephone lines. Thus, digital signals are converted by the modem into analog signals of different frequencies and transmitted to a modem at the receiving location. The receiving modem performs the reverse transformation and provides a digital output to a device connected to a modem, usually a computer. • A modem works as a Modulator and Demodulator both; that is; it modulates and demodulates the signal between the binary data or digital data of a computer and therefore the analog signal of a telephone line.
  • 98.
    Repeater A repeater isan electronic device that amplifies the signal it receives. You can think of repeater as a device which receives a signal and retransmits it at a higher level or higher power so that the signal can cover longer distances, more than 100 meters for standard LAN cables. Repeaters work on the Physical layer.
  • 99.
    Access point A wirelessaccess point (WAP) is a networking device that allows wireless-capable devices to connect to a wired network. It is simpler and easier to install WAPs to connect all the computers or devices in your network than to use wires and cables.
  • 100.
  • 101.
    What is PSTN? ●The Public Switched Telephone Network(PSTN), also known as Plain Old Telephone Service(POTS), is the wired phone system over which landline telephone calls are made. ● The PSTN relies on circuit switching. To connect one phone to another, the phone call is routed through numerous switches operating on a local, regional and national or international level. ● These network of telephone lines are owned by both governments as well as commercial organizations.
  • 102.
    Circuit Switching Technique Nowhere comes the circuit switching technique on which PSTN relies on:-Communication via circuit switching implies that there is a dedicated communication path between the two stations. The path is connected through a sequence of links between network nodes. CIRCUIT ESTABLISHMENT: To establish an end-to-end connection before any transfer of data. Some segments of the circuit may be a dedicated link, while some other segments may be shared. DATA TRANSFER: Transfer of data is from the source to the destination. The data may be analog or digital, depending on the nature of network. The connection is generally full-duplex. CIRCUIT DISCONNECT: Terminate connection at the end of data transfer. Signals must be propagated to deallocate the dedicated resources.
  • 103.
    HISTORY ● It hasevolved from the invention of telephone by Alexander Graham Bell. ● In early days phone calls traveled as analog signals across copper wire. Every phone call needed its own dedicated copper wire connecting the two phones. ● The operators sat at a switchboard, literally connecting one piece of copper wire to another so that the call could travel across town or across the country. ● Long-distance calls were comparatively expensive, because you were renting the use of very long piece of copper wire every time you made a call. ● Present telephone signals are tightly coupled with WANs(Wide Area networks) and are used for both data and voice communications.
  • 104.
    Levels in PSTN Theswitching centers used for switching are organized in different levels, namely:- ● Regional offices(Level 1) ● Section offices(Level 2) ● Primary offices(Level 3) ● Toll offices(Level 4) ● End offices(Level 5) Level 1 is at the highest level and Level 5 is the lowest level. Figure:Basic organization of a Public Switched Telephone Network(PSTN)
  • 105.
    EXPLANATION ● Subscribers orthe customers are directly connected to these end offices. And each office is connected directly to a number of offices at a level below and mostly a single office at higher level. Subscriber Telephones are connected, through Local Loops to end offices(or central offices). ● A small town may have only one end office, but large cities have several end offices. ● Many end offices are connected to one Toll office, which are connected to primary offices. ● Several primary offices are connected to a Section office, which normally serves more than one state. ● All regional offices are connected using mesh topology. Accessing the switching station at the end offices is accomplished through dialing. ● In the past, telephone featured rotary or pulse dialing, in which digital signals were sent to the end office for each dialed digit. ● This type of dialing was prone to errors due to inconsistency in humans during dialing.
  • 106.
    Cont….. ● Presently, dialingis accomplished by Touch-Tone technique. ● In this method the user sends a small burst of frequency called dual tone, because it is a combination of two frequencies. ● This combination of frequencies sent depends on the row and column of the pressed pad. ● The connections are multiplexed when have to send to a switching office, which is one level up. For example, Different connections will be multiplexed when they are to be forwarded from an end office to Toll office. Figure shows a typical medium distance telephone circuit. Figure:Typical medium distance telephone circuit
  • 107.
    Structure Of TheTelephone System ● Shortly after Alexander Graham Bell patented the phone in 1876 (just hours before its competitor, Elisha Gray), his new invention became indispensable. ● As new inventions came and according to comfortability , there were many structures but mainly 3 were there which are - 1. Fully Interconnected Network 2.Centralized switch 3.Two-level hierarchy
  • 108.
    1. Fully InterconnectedNetwork ● The initial market was the sale of handsets in pairs. ● It was up to the customer to connect a single cable between them. ● If the owner of the phone wanted to speak with other owners of the phone, separate cables had to be connected to all the homes. ● During the year, the city was covered with cables that passed over homes and trees in wild confusion. ● Once it became clear that the model to connect all phones on all the rest of the phone, shown in the following figure.
  • 109.
    2. Centralized switch ●The company sent a telegram to each home or office of each client. ● To make a call, the customer had to start the phone so that a call signal sounded in the telephone company’s office to catch the operator’s attention. ● He then had to manually connect the caller to the caller using a connection cable. ● In short, to connect it. The model called Single Switching Office Model is shown in the following figure.
  • 110.
    3. Two-level hierarchy ●Very quickly, Bell switching centers appeared everywhere and people wanted to make long-distance calls between cities. ● The Bell System has started to connect switching centers. ● The initial problem quickly returned: the connection of each wire center to any other wire-connected switching center quickly became out of control, so second- level switching centers were invented. ● After a while, it took several second-level offices, as shown in the following figure.
  • 111.
    The Local Loop:Modems, ADSL, and Fiber ● The local loop is often called the “last mile”, although it can be several kilometers long. It has been carrying analog information for over 100 years and will likely continue to do so for many years due to the high cost of digital conversion. ● Telephone modems transmit digital data between computers over a narrow channel provided by the telephone network for voice calls. They were once widely used, but have been largely supplanted by broadband technologies such as ADSL. reuse the local loop to send digital data from the customer to the final office, where it is transmitted to the Internet. ● The following local loops are often considered important:
  • 112.
    1.Telephone Modems ● Telephonemodems are used to transfer bits between two computers on a voice phone line, rather than for a conversation, which usually occupies the line. ● The main difficulty is that the voice telephone line is limited to 3,100 Hz, which is enough for a conversation. This bandwidth is more than four orders of magnitude less than the bandwidth used for Ethernet or 802.11 (WiFi). As expected, data rates for telephone modems are also four orders of magnitude lower than those for Ethernet and 802.11. ● Logically, a modem is inserted between the computer (digital) and the telephone system (analog), as shown in the following figure: Figure: The use of both analog and digital transmission for a computer-to-computer call.
  • 113.
    2.Digital Subscriber Lines ●Initially, there were several high-speed incrustations under the general name xDSL (digital subscriber line) for several x’s. ● Services with more bandwidth than standard telephone services are sometimes called broadband, although this term is a marketing concept rather than a specific technical concept. ● Unfortunately, the capacity of the local loop decreases quite rapidly with the distance from the end office, as the signal deteriorates along the cable. It also depends on the thickness and overall quality of the twisted pair. ● The graph of potential bandwidth versus distance is shown in the following figure. In this figure, it is assumed that all other factors are optimal (new cables, modest packages, etc.).
  • 114.
    3.Fiber To TheHome ● In general, fiber houses are combined so that only one fiber reaches the final office per group of 100 houses. ● In the downward direction, the optical dividers divide the final desktop signal so that it reaches all the homes. Encryption is necessary for security if only one house can decode a signal. ● Upward, the optical adders combine the house signals into a single signal, which is received in the last office. This architecture is called PON (passive optical network) and is shown in the following figure. ● In general, for all downlink channels, the total wavelength is used for transmission in the downstream direction and another wavelength is used for transmission in the upstream direction. Figure: Passive optical network for Fiber to The Home.
  • 115.
    Trunks and Multiplexing ●The heart of the telephone network carries digital and non-analog information. ● This requires scanning in the end office for transmission over long-distance lines. ● Long-distance lines make thousands, if not millions, of calls at the same time. ● This exchange in trunks and multiplexing is important for achieving economies of connecting scale, as the installation and maintenance of a high-capacity backbone cost two essentially the same amount as the low-capacity mainline switching offices. ● This is achieved by using some trunks and multiplexing versions. 1. Digitizing Voice Signals 2. Time Division Multiplexing 3. SONET/SDH 4. Wavelength Division Multiplexing
  • 116.
    1.Digitizing Voice Signals ●Digitizing Voice Signals at the beginning of the development of the telephone network, the kernel handled voice calls as analog information. ● Wavelength Division Multiplexing methods have been used for many years to multiplex voice channels of 4,000 Hz (composed of 3,100 Hz plus guard bands) into larger and larger blocks.
  • 117.
    2.Time Division Multiplexing ●PCM-based Time Division Multiplexing is used to transmit multiple voice calls over trunks by sending a sample of each call every 125 μsec. ● When digital transmission became a viable technology, the ITU (then called CCITT) could not agree on an international standard for the MIC. ● As a result, various incompatible systems are being used in different countries around the world.
  • 118.
    3.SONET/SDH ● In 1985,Bell-core, RBOC’s research department, began working on a standard called SONET/SDH (Synchronous Optical Network). Design SONET/SDH pursued four main objectives. ● First of all, SONET/SDH had to ensure the interaction of the different operators. To achieve this goal, it was necessary to define a common signaling standard for wavelength, duration, frame structure, and other problems. ● Secondly, means are needed to integrate digital EE systems. The European Union, Europe, and Japan, all based on 64 kbps PCM channels, but combined in different (and incompatible) ways. ● Third, SONET/SDH was supposed to provide a way to multiplex several digital channels. At the time of SONET’s design, the fastest digital operator, widely used in the United States, was T3 at 44,736 Mbit / s. T4 has been defined, but little has been used and nothing has been defined above the speed of T4. Part of SONET’s mission was to continue the hierarchy up to gigabits / s and up. A standard method of multiplexing slower channels in a SONET/SDH channel was also needed. ● Fourth, SONNET/SDH must support the operations, administration, and maintenance (OAM) required to administer the network. The previous systems are not very good and can’t do this very well.
  • 119.
    4.Wavelength Division Multiplexing ●Frequency division multiplexing, as well as Time Division Multiplexing, is used to exploit the enormous bandwidth of optical fiber channels. This is called Wavelength Division Multiplexing (WDM ). ● Here, four fibers are combined in an optical adder, each having energy having a different wavelength. ● Four beams are combined into a common fiber for transmission to a remote destination.At the opposite end, the beam is divided into as many fibers as there were at the entrance. ● Each output fiber contains a short core specially designed to filter all wavelengths minus one.The resulting signals can be sent to the destination or can be combined in different ways for additional multiplex transport.
  • 120.
  • 121.
    INTRODUCTION WLAN stands forWireless Local Area Network or Local Area Wireless Network (LAWN) . Norman Abramson, a professor at the University of Hawaii, developed the world’s first wireless computer communication network , ALOHA net (operational in 1971).
  • 122.
    INTRODUCTION WLAN is awireless computer network that link two or more devices (using spectrum or OFDM radio) with in a limited area such as a home, school, computer laboratory. WLAN is marketed under the Wi-Fi brand name. Wireless LAN’s have become popular in home due to ease of installation and use.
  • 123.
    ADVANTAGES OF WLAN ●Installation flexibility. ● Few transmitters/receivers for multiple of users. ● No cable to pull. ● Reduced cost-of-ownership. ● Mobile devices are less expensive than computer workstations ● No need to build wiring closets.
  • 124.
    ADVANTAGES OF WLAN ●Mobility • Access to real time information. • Provides service opportunities. • Promotes flexibility. • Support Productivity.
  • 125.
    DISADVANTAGES OF WLAN ●Cost ● Wireless networks card cost 4 times more than wired network card. ● The access points are more expensive than hubs and wires. ● Environmental Conditions • Constrained by building, trees and terrain. • Susceptible to weather and solar activity. ● Less capacity : Slower bandwidth.
  • 126.
    TYPES OF WLAN 1)INFRASTRUCTURE •Most Wi-Fi networks are deployed in infrastructure mode. • In infrastructure mode, a base station acts as a wireless access point hub, and nodes communicate through the hub. The hub usually, but not always, has a wired or fiber network connection, and may have permanent wireless connections to other nodes. • Wireless access points are usually fixed, and provide service to their client nodes within range. • Wireless clients, such as laptops, smart phones etc. connect to the access point to join the network.
  • 127.
    TYPES OF WLAN 2)Peer to Peer • Two PCs equipped with wireless adapter cards can be set up as an independent network whenever they are within range of one another. • A peer-to-peer network allows wireless devices to directly communicate with each other.
  • 128.
    TYPES OF WLAN 3)BRIDGE • A bridge can be used to connect networks, typically of different types. • A wireless Ethernet bridge allows the connection of devices on a wired Ethernet network to a wireless network. • The bridge acts as the connection point to the Wireless LAN.
  • 129.
    TYPES OF WLAN 4)Wirelessdistribution system • A Wireless Distribution System enables the wireless interconnection of access points in an IEEE 802.11 network.
  • 130.
    Wireless LAN Components WirelessLANs consist of components similar to traditional Ethernet-wired LANs. In fact, wireless LAN protocols are similar to Ethernet and comply with the same form factors. The big difference, however, is that wireless LANs don't require wires. 1. User Devices Users of wireless LANs operate a multitude of devices, such as PCs, laptops, and PDAs. The use of wireless LANs to network stationary PCs is beneficial because of limited needs for wiring. Laptops and PDAs, however, are commonly equipped with wireless LAN connectivity because of their portable nature. User devices might consist of specialized hardware as well.
  • 131.
    Wireless LAN Components 2)Radio NICs A major part of a wireless LAN includes a radio NIC that operates within the computer device and provides wireless connectivity. A wireless LAN radio NIC, sometimes referred to as a radio card, often implements the 802.11 standard. The cards generally implement one particular physical layer, such as 802.11a or 802.11b/g. As a result, the radio card must utilize a version of the standard that is compatible with the wireless LAN. Wireless LAN radio cards that implement multiple versions of the standard and provide better interoperability are becoming more common. Radio cards come in a variety of form factors, including: ISA, PCI, PC card, mini-PCI, and CF. PCs generally utilize ISA and PCI cards; but PDAs and laptops use PC cards, mini-PCI, and CF adapters.
  • 132.
    Wireless LAN Components 3)Access Points An access point contains a radio card that communicates with individual user devices on the wireless LAN, as well as a wired NIC that interfaces to a distribution system, such as Ethernet. System software within the access point bridges together the wireless LAN and distribution sides of the access point. The system software differentiates access points by providing varying degrees of management, installation, and security functions. Figure 5-1 shows an example of access-point hardware.
  • 133.
    Wireless LAN Components 4)Routers By definition, a router transfers packets between networks. The router chooses the next best link to send packets on to get closer to the destination. Routers use Internet Protocol (IP) packet headers and routing tables, as well as internal protocols, to determine the best path for each packet. A wireless LAN router adds a built-in access point function to a multiport Ethernet router. This combines multiple Ethernet networks with wireless connections. A typical wireless LAN router includes four Ethernet ports, an 802.11 access point, and sometimes a parallel port so it can be a print server. This gives wireless users the same ability as wired users to send and receive packets over multiple networks
  • 134.
    Wireless LAN Components 5)Repeaters Access points, which require interconnecting cabling, generally play a dominant role for providing coverage in most wireless LAN deployments. Wireless repeaters, however, are a way to extend the range of an existing wireless LAN instead of adding more access points. There are few standalone wireless LAN repeaters on the market, but some access points have a built-in repeater mode.
  • 135.
    Wireless LAN Components 6)Antennae Most antennae for wireless LANs are omnidirectional and have low gain. Nearly all access points, routers, and repeaters come standard with omnidirectional antenna. Omnidirectional antenna satisfy most coverage requirements; however, consider the use of optional directive antennae to cover a long, narrow area. In some cases, the antenna is integrated within a radio card or access point and there is no choice to make. If a need exists to use a directive antenna (higher gain), ensure that the radio card or access point has an external antenna connector.
  • 136.
  • 137.
    • Multiplexing torefer to the combination of information streams from multiple sources for transmission over a shared medium. • Multiplexer is a mechanism that implements the concept • Demultiplexing to refer to the separation of a combination back into separate information streams. • Demultiplexer to refer to a mechanism that implements the concept. • Figure illustrates the concept • each sender communicates with a single receiver • all pairs share a single transmission medium • multiplexor combines information from the senders for transmission in such a way that the demultiplexor can separate the information for receivers MULTIPLEXING:
  • 139.
    Need of Multiplexing:- • Transmitting two or more signals simultaneously can be accomplished by setting up one transmitter- receiver pair for each channel, but this is an expensive approach. • A single cable or radio link can handle multiple signals simultaneously using a technique known as multiplexing. • Multiplexing permits hundreds or even thousands of signals to be combined and transmitted over a single medium. • Cost savings can be gained by using a single channel to send multiple information signals.
  • 140.
  • 141.
  • 142.
    The Basic Typesof Multiplexing - There are four basic approaches to multiplexing that each have a set of variations and implementations • Frequency Division Multiplexing (FDM) • Wavelength Division Multiplexing (WDM) • Time Division Multiplexing (TDM) • Code Division Multiplexing (CDM) •TDM and FDM are widely used •WDM is a form of FDM used for optical fiber •CDM is a mathematical approach used in cell phone mechanisms
  • 143.
    Time Division Multiplexing(TDM) - • Usually used with digital signals or analog signals carrying digital data • Data from various sources are carried in repetitive frames • Each frame consists of of a set of time slots • Each source is assigned one or more time slots per frame.
  • 144.
    Time Division Multiplexing- Definition: Time Division Multiplexing (TDM) is the time interleaving of samples from several sources so that the information from these sources can be transmitted serially over a single communication channel. At the Transmitter • Simultaneous transmission of several signals on a time-sharing basis. • Each signal occupies its own distinct time slot, for the duration of the transmission. • Slots may be permanently assigned on demand. At the Receiver • Decommutator (sampler) has to be synchronized with the incoming waveform Frame Synchronization • Applications of TDM: Digital Telephony, Data communications, Satellite Access, Cellular radio.
  • 145.
    TDM - Composition ofone frame of a multiplexed PAM signal incorporating four voice- signals and a synchronizing pulse.
  • 146.
    Synchronous TDM • TDMis a broad concept that appears in many forms • It is widely used throughout the Internet • Figure shows items being sent in a round-robin fashion • Most TDMs work this way • No gap occurs between bits if a communication system uses synchronous transmission. • When TDM is applied to synchronous networks, no gap occurs between items; the result is known as Synchronous TDM •Figure illustrates how synchronous TDM works for a system of four senders.
  • 147.
  • 148.
    •Data rate ofmedium exceeds data rate of digital signal to be transmitted •Multiple digital signals interleaved in time •May be at bit level of blocks •Time slots preassigned to sources and fixed •Time slots allocated even if no data •Time slots do not have to be evenly distributed amongst sources Synchronous Time Division Multiplexing
  • 149.
    • Telephone systemsuse synchronous TDM to multiplex digital streams from multiple phone calls • They use the acronym TDM to refer to the specific form of TDM used to multiplex digital telephone calls • The phone system TDM includes an interesting technique to ensure that a demultiplexer stays synchronised with the multiplexer • Why is synchronisation needed? •observe that a synchronous TDM sends one slot after another without any indication of the output to which a given slot occurs •A demultiplexer cannot tell where a slot begins– a slight difference in the clocks used to time bits can cause a demultiplexer to misinterpret the bit stream.
  • 150.
    •To prevent misinterpretation,the version of TDM used in the phone system includes an extra framing channel as input •Instead of taking a complete slot, framing inserts a single bit in the stream on each round •A demultiplexer extracts data from the framing channel and checks for alternating 0 and 1 bits •If an error causes a demultiplexer to lose a bit •it is highly likely that the framing check will detect the error and allow the transmission to be restarted •Figure illustrates the use of framing bits
  • 151.
    Framing Used inthe Telephone System Version of TDM -
  • 152.
    The Problem withSynchronous TDM: Unfilled Slots • Synchronous TDM works well if each source produces data at a uniform, fixed rate equal to 1/N of the capacity of the shared medium • Many sources generate data in bursts, with idle time between bursts • To understand why, consider the example in Figure  • Sources on the left produce data items at random the synchronous multiplexor leaves a slot unfilled if the corresponding source has not produced an item by the time the slot must be sent. • In practice, a slot cannot be empty because the underlying system must continue to transmit data • the slot is assigned a value (such as zero) • and an extra bit is set to indicate that the value is invalid
  • 155.
    How can amultiplexing system make better use of a shared medium? •One technique to increase the overall data rate is known as statistical TDM or statistical multiplexing or Asynchronous TDM •Some literature uses the term asynchronous TDM •The technique is straightforward: •select items for transmission in a round-robin fashion •but instead of leaving a slot unfilled, skip any source that does not have data ready •By eliminating unused slots • statistical TDM takes less time to send the same amount of data •Figure illustrates how a statistical TDM system sends the data from Figure in only 8 slots instead of 12 Asynchronous TDM
  • 157.
    • Statistical multiplexingincurs extra overhead shown below: •Consider demultiplexing: • In a synchronous TDM system a demultiplexer knows that every N slot corresponds to a given receiver • In a statistical multiplexing system, the data in a given slot can correspond to any receiver. • Each slot must contain the identification of the receiver to which the data is being sent • Output data rate less than aggregate input rates • May cause problems during peak periods • Buffer inputs • Keep buffer size to minimum to reduce delay
  • 158.
    4 Synchronous TDM vs.Statistical TDM
  • 159.
    Advantages of TDM: • Full available channel bandwidth can be utilized for each channel. • TDM circuitry is not very complex. • The problem of crosstalk is not severe. • Only one carrier in the medium at any time • Throughput high even for many users.
  • 160.
    Disadvantages of TDM: • Synchronization is essential for proper operation. • Requires A/D conversions at high rate. • Requires larger bandwidth. • Probability of error or Bit Error Rate
  • 161.
    UNIT 2  ERRORDETECTION AND CORRECTION – FUNDAMENTALS, BLOCK CODING , HAMMING DISTANCE , CRC  FLOW CONTROL PROTOCOLS ,STOP AND WAIT, GO BACK N ARQ, SELECTIVE REPEAT ARQ, SLIDING WINDOW, PIGGYBACKING  MULTIPLE ACCESS PROTOCOL- ALOHA, CSMA, CSMA/CA AND CSMA/CD
  • 162.
    Error detection and Correction– Fundamentals, Block coding , Hamming distance , CRC
  • 163.
    Fundamentals  Networks mustbe able to transfer data from one device to another with complete accuracy.  Data can be corrupted during transmission.  For reliable communication, errors must be detected and corrected.  Error detection and correction are implemented either at the data link layer or the transport layer of the OSI model.
  • 164.
  • 165.
    Fundamentals - SingleBit error  This error occurs when only one bit in the data unit has changed (ex : ASCII STX - ASCII LF)
  • 166.
    Fundamentals – MultiBit error  This error occurs when two or more non-consecutive bits in the data unit have changed(ex : ASCII B - ASCII LF)
  • 167.
    Fundamentals – Bursterror  Burst error means that 2 or more consecutive bits in the data unit have changed
  • 168.
    Fundamentals – Redundancy The central concept in detecting or correcting errors is redundancy. To be able to detect or correct errors, we need to send some extra bits with our data.  These redundant bits are added by the sender and removed by the receiver. Their presence allows the receiver to detect or correct corrupted bits.
  • 169.
    Fundamentals – Redundancy Types:- They are four types of redundancy checks that are used in data communications.  vertical redundancy check (VRC)  longitudinal redundancy check (LRC)  cyclic redundancy check (CRC)  checksum
  • 170.
    Block Coding  Inblock coding, we divide our message into blocks, each of k bits, called datawords.  We add r redundant bits to each block to make the length n = k + r. The resulting n-bit blocks are called codewords.
  • 171.
    Block Coding –Error detection  Enough redundancy is added to detect an error.  The receiver knows an error occurred but does not know which bit(s) is(are) in error.  Has less overhead than error correction
  • 172.
    Block Coding –Error Correction In error detection, the receiver needs to know only that the received codeword is invalid In error correction the receiver needs to find (or guess) the original codeword sent. We can say that we need more redundant bits for error correction than for error detection.
  • 173.
    Block Coding –Error Correction Fig -Structure of encoder and decoder in error correction
  • 174.
    Error detection :- Methods Fig – error detection methods
  • 175.
    Error detection Method:– Parity check  A parity bit is added to every data unit so that the total number of 1s(including the parity bit) becomes even for even-parity check or odd for odd-parity check  1 . Simple parity check
  • 176.
    Error detection Method:– Simple Parity check In this Blocks of data from the sender are subjected to a check bit or parity bit  In this a parity of 1 is added to the block if it contains odd number of 1’s, and 0 is added if it contains even number of 1’s . This scheme makes the total number of 1’s even, that is why it is called even parity checking
  • 177.
    Error detection Method:– Simple Parity check Example :- Suppose the sender wants to send the word world. In ASCII the five characters are coded as 1110111 1101111 1110010 1101100 1100100 The following shows the actual bits sent 11101110 11011110 11100100 11011000 11001001 Note -A simple parity-check code can detect an odd number of errors.
  • 178.
    Error detection Method:– Simple Parity check Fig:- Encoder and decoder for simple parity-check code
  • 179.
    Error detection Method:– 2D Parity check  Parity check bits are calculated for each row, which is equivalent to a simple parity check bit.  Parity check bits are also calculated for all columns, then both are sent along with the data.  At the receiving end these are compared with the parity bits calculated on the received data.
  • 180.
    Error detection Methods:– 2D Parity check Example :- Suppose the following block is sent: 10101001 00111001 11011101 11100111 10101010 However, it is hit by a burst noise of length 8, and some bits are corrupted. 10100011 10001001 11011101 11100111 10101010 When the receiver checks the parity bits, some of the bits do not follow the even- parity rule and the whole block is discarded. 10100011 10001001 11011101 11100111 10101010
  • 181.
    Error detection Methods:– Cyclic redundancy check (CRC)  Crc is based in binary division  Given a k-bit frame or message, the transmitter generates an n-bit sequence, known as a frame check sequence (FCS), so that the resulting frame, consisting of (k+n) bits, is exactly divisible by some predetermined number.  At the destination, the incoming data unit is divided by the same number. If at this step there is no remainder, the data unit is assumed to be correct and is therefore accepted.
  • 182.
    Error detection Methods:– Cyclic redundancy check (CRC) CRC Generator :-  crc generator uses modular-2 division Fig :- Binary Division in a CRC Generator
  • 183.
    Error detection Methods:– Cyclic redundancy check (CRC) CRC checker :-  crc checker uses modular-2 division Fig :- Binary Division in a CRC Checker
  • 184.
    Error detection Methods:– Cyclic redundancy check (CRC)
  • 185.
    Error detection Methods:– Cyclic redundancy check (CRC) Note :- CRC generator(divisor) is most often represented not as a string of 1s and 0s, but as an algebraic polynomial. For example-
  • 186.
    Error detection Methods:– CHECK SUM Checksum used by the higher layer protocols It is based on the concept of redundancy(VRC, LRC, CRC) Fig :- Checksum Generator
  • 187.
    Error detection Methods:– CHECK SUM  In checksum the data is divided into k segments each of m bits.  The sections are added together using 1’s complement to get the sum for the senders.  In the sum is complemented to get the checksum.  The checksum segment is sent with the data segments.  All received sections are added using 1’s complement to get the sum for the receiver  The sum is complemented. If the result is zero, the received data is accepted; otherwise discarded
  • 188.
    Error detection Methods:– CHECK SUM Example :-
  • 189.
    References  Book -Data Communications and Networking By Behrouz A.Forouzan  Book –Computer Networks, 5th Edition Andrew S. Tanenbaum, rije University, Amsterdam,  Link –https://www.geeksforgeeks.org/category/computer-subject/computer-networks/  Link - https://www.ijirem.org/search.php?searchtext=computer%20networks&type=All
  • 190.
  • 191.
    Need of ErrorCorrection : > There are numerous reasons such as noise , cross-talk etc. due to which data gets corrupted during transmission. > Most of the applications would not function expectedly(properly) if they receive erroneous data from the transmitter. > For error-free data processing , error correction techniques are used to detect errors in transmitted messages and reconstructs the original error-free data. .
  • 192.
    Error Correction Techniques: The error correction techniques are of two types :- > Single bit error correction : method of correcting single bit errors. > Burst error correction : method of correcting burst errors in data sequence. In most of the communication networks and various digital systems , Hamming Distance Code technique is widely used for error correction.
  • 193.
    Hamming Code (for Error Correction ): This error-correcting code technique is developed by developed by R.W Hamming. It is a set of error correcting codes which not only identifies the error bits in whole data sequence but also corrects it. For understanding the mechanism of Hamming code, the knowledge of redundancy bits is needed.. > What are redundancy bits? >> By the definition it is “The difference between number of bits of the actual data sequence and the transmitted bits”. Formally redundancy bits are extra binary bits that are added to info. carrying bits to ensure that no bits were lost during the data transfer.
  • 194.
    How the Hammingcode actually corrects the errors? > Hamming code uses relation between redundancy bits and data bits. > In Hamming code, the redundancy bits are placed at certain calculated positions in order to eliminate errors. And the distance between the two redundancy bits is called “Hamming distance”.
  • 195.
    Mechanism of HammingCode : To understand the mechanism of hamming code error correction , let’s go through the following stages : > Detection of parity bits: The number of parity bits to be added depends upon the number of information bits of the transmitted data. Number of parity bits will be calculated by the following relation.. 2P >= n + P +1. where n=number of data bits. P=number of parity bits.
  • 196.
    Mechanism of HammingCode : > Position of parity bits: After calculating the number of parity bits we need to know the position of parity bits to be placed. The ’P’ parity bits placed at bit positions of powers of 2, i.e. 1, 2, 4, 8, 16 etc. These parity bits are referred as P1 (at position 1), P2 (at position 2), P3 (at position 4), P4 (at position 8) and so on.
  • 197.
    Mechanism of HammingCode : > Constructing a Bit Location Table: In Hamming code, we must find the value of the parity bits to assign them a bit value.
  • 198.
    Hamming code Example: Let’sunderstand error corrections through an example: Problem : We have to encode the data 1101 in even parity, by using Hamming code. Soln. To solve we will go through the following steps: Step 1 : Calculate the required number of parity bits. Let P = 2, then 2P = 22 = 4 and n + P + 1 = 4 + 2 + 1 = 7. 2 parity bits are not sufficient for 4 bit data. So let’s try P = 3, then 2P = 23 = 8 and n + P + 1 = 4 + 3 + 1 = 8 Therefore 3 parity bits are sufficient for 4 bit data. The total bits in the code word are 4 + 3 = 7
  • 199.
    Hamming code Example: Step2 : Constructing bit location table
  • 200.
    Hamming code Example: Step3 : Determine the parity bits: For P1 : 3, 5 and 7 bits are having three 1’s so for even parity, P1 = 1. For P2 : 3, 6 and 7 bits are having two 1’s so for even parity, P2 = 0. For P3 : 5, 6 and 7 bits are having two 1’s so for even parity, P3 = 0. By inserting the parity bits code word formed is 1100101. If the code word has all zeros , then there is no error in Hamming code.
  • 201.
    References Book - DataCommunications and Networking By Behrouz A.Forouzan Book – Networks, 5th Edition Andrew S. Tanenbaum, rije University, Amsterdam, Link –https://www.geeksforgeeks.org/category/computer-subject/computer-networks/ Link - https://www.ijirem.org/search.php?searchtext=computer%20networks&type=All
  • 202.
    FLOW CONTROL PROTOCOLS Stopand wait Go back N ARQ Selective repeat ARQ Sliding window Piggybacking
  • 203.
    FLOW CONTROL ● Flowcontrol is design in Data Link Layer. ● Flow control is the process of managing the rate of data transmission between two nodes to prevent a fast sender from overwhelming a slow receiver. ● There are two ways to control the flow of data: 1. Stop and Wait Protocol 2. Sliding Window Protocol
  • 204.
    Stop and WaitProtocol ● It is the simplest flow control method. In this, the sender will send one frame at a time to the receiver. Until then, the sender will stop and wait for the acknowledgment from the receiver. When the sender gets the acknowledgment then it will send the next data packet to the receiver and wait for the acknowledgment again and this process will continue. ● There are four types of times while sending frames: 1. Transmission time 2. Propagation time 3. Queuing time 4. Processing time
  • 205.
    Transmission time ● Timetaken by the sender to send all the packet onto the outer going link is called Transmission time/delay. It is denoted by (Tt). This is calculated by dividing the data size/Length(L) which has to be sent by the bandwidth(BW) of the link. Tt = L / BW Propagation time ● Time taken by the last bit of the frame to reach from one side to the other side is called propagation time/delay. It is calculated by dividing the distance between the sender and receiver by the wave propagation speed / velocity. It is denoted by (Tp). Tp = d / v where d = distance between sender and receiver, s = wave propagation velocity
  • 207.
    Queuing time: Queuing delayis the sum of the delays encountered by a packet between the time of insertion into the network and the time of delivery to the address. This time will be very small. It is denoted by Tq. Processing time: Processing time is also very small and when packet is in processing to ack,That time is called processing time. It is denoted by Tp.
  • 208.
    Total Time ● Thepropagation delay for sending the data frame and the acknowledgment frame is the same as distance and speed will remain the same for both frames. Hence, the total time required to send a frame is ● Total time= Tt(Transmission Delay) + Tp(Propagation Delay for data frame) + Tp(Propagation Delay for acknowledgment frame) :Here Queuing time and processing time will be 0. Total time=Tt+2Tp The sender is doing work only for Tt time and for the rest 2Tp time the sender is waiting for the acknowledgment. We can find efficiency also Efficiency = Useful Time/ Total Time η=Tt / (Tt+2Tp) =1/(1+2(Tp/Tt)) η=1/1+2a Where a=Tp/Tt.
  • 209.
    Throughput ● Throughput refersto the amount of data that enters and goes through a system. It is defines number of bits per second. ● if Tt+2Tp –L 1sec=L/ Tt+2Tp Multiply And Divide by B.W. in L then L/(BW)*BW/Tt+2Tp =Tt*BW/(Tt+2Tp) = η*BW
  • 210.
    Advantages of Stopand Wait Protocol 1.It is very simple to implement. Disadvantages of Stop and Wait Protocol 1.We can send only one packet at a time. 2.If the distance between the sender and the receiver is large then the propagation delay would be more than the transmission delay. Hence, efficiency would become very low. 3.After every transmission, the sender has to wait for the acknowledgment and this time will increase the total transmission time.
  • 211.
    Example – Tt=1msec Tp=1msec η willbe a=Tt/Tp= 1/1=1 η=1/1+2a 1/1+2(1) =1/3 =.3333*100 =33.33%
  • 212.
    Data Packet Lostin Stop And Wait ● Problems : ● 1. Lost Data: Deadlock condition ● Get Rid from this we need to Retransmit the packet If packet not come in the sufficient time period called timeout timer. ● S and W + TOT
  • 214.
    2. Lost Acknowledgement:Replicate packet problem Get rid from this we need sequence number. S and W + TOT + Sequence Number.
  • 216.
    3. Delayed Acknowledgement/Data:Missing data packet problem. After timeout on sender side, a long delayed acknowledgement might be wrongly considered as acknowledgement of some other recent packet.
  • 217.
    Sliding Window Protocol ●The sliding window is a technique for sending multiple frames at a time. It controls the data packets between the two devices where reliable and gradual delivery of data frames is needed. It is also used in TCP. ● Each frame has sent from the sequence number. The sequence numbers are used to find the missing data in the receiver end. The purpose of the sliding window technique is to avoid duplicate data, so it uses the sequence number. ● Types of Sliding Window Protocol: 1. Go-Back-N ARQ 2. Selective Repeat ARQ
  • 218.
    Go-Back-N ARQ ● Go-Back-NARQ protocol is also known as Go-Back-N Automatic Repeat Request. It is a data link layer protocol that uses a sliding window method. In this, if any frame is corrupted or lost, all subsequent frames have to be sent again. ● The size of the sender window is N in this protocol. For example, Go-Back-8, the size of the sender window, will be 8. The receiver window size is always 1. ● If the receiver receives a corrupted frame, it cancels it. The receiver does not accept a corrupted frame. When the timer expires, the sender sends the correct frame again. The design of the Go-Back-N ARQ protocol is shown below.
  • 221.
    Example: In Go–back3 flow control protocol every 6th packet is lost. If we have to send 11 packets. How many transmissions will be needed ? -In Go back N, if we don’t receive acknowledgement for a packet, whole window of that packet is sent again. As a packet is received window is slided. Here, window size is 3. Initially window will contain 1,2,3 then as acknowledgement of 1 is received window slides so 4 is transmitted. Now,when 4th packet’s acknowledgement is received 7th packet is sent and when 5th packet’s acknowledgement is received 8th packet is sent. Now, as acknowledgement of 6 is not received so the window of 6 i.e. 6,7,8 packets are retransmitted.Now the 6th packet from there is 9, so 9,10 will be retransmitted. 1 2 3 4 5 6 7 8 6 7 8 9 10 11 9 10 11 . Hence total 17 transmissions are needed.
  • 222.
    The three maincharacteristic features of GBN are: 1. Sender Window Size (WS) It is N itself. If we say the protocol is GB10, then Ws = 10. N should be always greater than 1 in order to implement pipelining. For N = 1, it reduces to Stop and Wait protocol. Efficiency of GBN =N/(1+2a) where a=Tp/Tt If B is the bandwidth of the channel, then Throughput and Effective Bandwidth is =Efficiency* Bandwidth =N/(1=2a)*BW
  • 223.
    2.Receiver Window Size(WR): WR is Always 1 in GBN. *we will explain with a help of example. Consider the diagram given below. We have sender window size of 4. Assume that we have lots of sequence numbers just for the sake of explanation. Now the sender has sent the packets 0, 1, 2 and 3. After acknowledging the packets 0 and 1, receiver is now expecting packet 2 and sender window has also slided to further transmit the packets 4 and 5. Now suppose the packet 2 is lost in the network, Receiver will discard all the packets which sender has transmitted after packet 2 as it is expecting sequence number of 2. On the sender side for every packet send there is a time out timer which will expire for packet number 2. Now from the last transmitted packet 5 sender will go back to the packet number 2 in the current window and transmit all the packets till packet number 5. That’s why it is called Go Back N. Go back means sender has to go back N places from the last transmitted packet in the unacknowledged window and not from the point where the packet is lost.
  • 225.
    3.Acknowledgements: There are 2kinds of acknowledgements namely: A. Cumulative Ack: One acknowledgement is used for many packets. The main advantage is traffic is less. A disadvantage is less reliability as if one ack is the loss that would mean that all the packets sent are lost. B. Independent Ack: If every packet is going to get acknowledgement independently. Reliability is high here but a disadvantage is that traffic is also high since for every packet we are receiving independent ack.
  • 226.
  • 227.
    GBN uses CumulativeAcknowledgement. At the receiver side, it starts a acknowledgement timer whenever receiver receives any packet which is fixed and when it expires, it is going to send a cumulative Ack for the number of packets received in that interval of timer. If receiver has received N packets, then the Acknowledgement number will be N+1. Important point is Acknowledgement timer will not start after the expiry of first timer but after receiver has received a packet. Time out timer at the sender side should be greater than Acknowledgement timer. Minimum sequence numbers required in GBN = N + 1
  • 228.
    Selective Repeat ARQ ●Selective Repeat ARQ is also known as the Selective Repeat Automatic Repeat Request. It is a data link layer protocol that uses a sliding window method. The Go-back-N ARQ protocol works well if it has fewer errors. But if there is a lot of error in the frame, lots of bandwidth loss in sending the frames again. So, we use the Selective Repeat ARQ protocol. In this protocol, the size of the sender window is always equal to the size of the receiver window. The size of the sliding window is always greater than 1. ● If the receiver receives a corrupt frame, it does not directly discard it. It sends a negative acknowledgment to the sender. The sender sends that frame again as soon as on the receiving negative acknowledgment. There is no waiting for any time-out to send that frame. The design of the Selective Repeat ARQ protocol is shown below.
  • 231.
    Efficiency of SRProtocol ● Efficiency = Sender Window Size in Protocol / (1 + 2a) Efficiency of SR Protocol = N / (1 + 2a) In SR protocol, sender window size is always same as receiver window size ● The receiver responses either with the positive acknowledgement(ACK) or with the negative acknowledgement(NACK) where positive acknowledgement means that the receiver is ready to receive the transmission and negative acknowledgement means that the receiver is unable to accept the transmission.
  • 232.
    Piggybacking ● Piggybacking isa method of attaching acknowledgment to the outgoing data packet in reliable full-duplex data transmission. ● Working: The concept of piggybacking is explained as follows: ● Consider a two-way transmission between host A and host B. When host A sends a data frame to B, then B does not send the acknowledgment of the frame sent immediately. The acknowledgment is delayed until the next data frame of host B is available for transmission. The delayed acknowledgment is then attached to the outgoing data frame of B. This process of delaying acknowledgment so that it can be attached to the outgoing frame is called piggybacking.
  • 234.
    ● Now, aswe are communicating between the host A and host B, three conditions can arise: ● When the host has both data and the acknowledgment to send, then it will attach the data along with the acknowledgment. In the above diagram, the host B will attach the data frame along with the acknowledgment of the last frame received from host A. ● When the host does not have any data to send then it will send only the acknowledgment. In the above diagram, when host A does not have any data frame to send. So, it will only send the acknowledgment of the last frame received. ● When the host has only data to send then it will send the data along with the acknowledgment of the last frame received. The duplicate acknowledgment will be discarded by the receiver and the data would be accepted.
  • 235.
    Reason for Piggybacking ●Communications are mostly full – duplex in nature, i.e. data transmission occurs in both directions. A method to achieve full – duplex communication is to consider both the communication as a pair of simplex communication. Each link comprises a forward channel for sending data and a reverse channel for sending acknowledgments. ● However, in the above arrangement, traffic load doubles for each data unit that is transmitted. Half of all data transmission comprise of transmission of acknowledgments. ● So, a solution that provides better utilization of bandwidth is piggybacking. Here, sending of acknowledgment is delayed until the next data frame is available for transmission. The acknowledgment is then hooked onto the outgoing data frame. The data frame consists of an ack field. The size of the ack field is only a few bits, while an acknowledgment frame comprises of several bytes. Thus, a substantial gain is obtained in reducing bandwidth requirement.
  • 236.
    ● Advantages : Improvesthe efficiency, better use of available channel bandwidth. ● Disadvantages : The receiver can jam the service if it has nothing to send. This can be solved by enabling a counter ( Receiver timeout ) when a data frame is received. If the count ends and there is no data frame to send, the receiver will send an ACK control frame. The sender also adds a counter (Emitter timeout), if the counter ends without receiving confirmation, the sender assumes packet loss , and sends the frame again.
  • 237.
    ● Conclusion There isa dispute as to whether this is a legal or illegal activity, but piggybacking is still a dark side of Wi-Fi. Cyber-terrorist attacks in India are a clear reminder that we cannot control incidents occurring anywhere in the world or control unsecured Wi-Fi networks. So it is the responsibility of the owner and administrator to secure their wireless connection.
  • 238.
    Multiple access protocol- ALOHA,CSMA, CSMA/CA and CSMA/CD
  • 239.
    Data Link Layer •The data link layer is used in a computer network to transmit the data between two devices or nodes. It divides the layer into parts such as data link control and the multiple access resolution/protocol. The upper layer has the responsibility to flow control and the error control in the data link layer, and hence it is termed as logical of data link control. Whereas the lower sub-layer is used to handle and reduce the collision or multiple access on a channel. Hence it is termed as media access control or the multiple access resolutions.
  • 240.
    What is amultiple access protocol? • When a sender and receiver have a dedicated link to transmit data packets, the data link control is enough to handle the channel. Suppose there is no dedicated path to communicate or transfer the data between two devices. In that case, multiple stations access the channel and simultaneously transmits the data over the channel. It may create collision and cross talk. Hence, the multiple access protocol is required to reduce the collision and avoid crosstalk between the channels. For example, suppose that there is a classroom full of students. When a teacher asks a question, all the students (small channels) in the class start answering the question at the same time (transferring the data simultaneously). All the students respond at the same time due to which data is overlap or data lost. Therefore it is the responsibility of a teacher (multiple access protocol) to manage the students and make them one answer.
  • 242.
    Random Access Protocol Inthis, all stations have same superiority that is no station has more priority than another station. Any station can send data depending on medium’s state( idle or busy). It has two features: • There is no fixed time for sending data • There is no fixed sequence of stations sending data • Following are the different methods of random-access protocols for broadcasting frames on the channel. • Aloha • CSMA • CSMA/CD • CSMA/CA
  • 243.
    ALOHA Random AccessProtocol • It is designed for wireless LAN (Local Area Network) but can also be used in a shared medium to transmit data. Using this method, any station can transmit data across a network simultaneously when a data frameset is available for transmission. • Aloha Rules • Any station can transmit data to a channel at any time. • It does not require any carrier sensing. • Collision and data frames may be lost during the transmission of data through multiple stations.
  • 244.
    • Acknowledgment ofthe frames exists in Aloha. Hence, there is no collision detection. • It requires retransmission of data after some random amount of time. The Random access protocols are further subdivided as: (a) ALOHA – It was designed for wireless LAN but is also applicable for shared medium. In this, multiple stations can transmit data at the same time and can hence lead to collision and data being garbled
  • 246.
    CSMA/ CD • Itis a carrier sense multiple access/ collision detection network protocol to transmit data frames. The CSMA/CD protocol works with a medium access control layer. Therefore, it first senses the shared channel before broadcasting the frames, and if the channel is idle, it transmits a frame to check whether the transmission was successful. If the frame is successfully received, the station sends another frame. If any collision is detected in the CSMA/CD, • the station sends a jam/ stop signal to the shared channel to terminate data transmission. After that, it waits for a random time before sending a frame to a channel.
  • 247.
    CSMA/ CA • Itis a carrier sense multiple access/collision avoidance network protocol for carrier transmission of data frames. It is a protocol that works with a medium access control layer. When a data frame is sent to a channel, it receives an acknowledgment to check whether the channel is clear. If the station receives only a single (own) acknowledgments, that means the data frame has been successfully transmitted to the receiver. • But if it gets two signals (its own and one more in which the collision of frames),a collision of the frame occurs in the shared channel. Detects the collision of the frame when a sender receives an acknowledgment signal.
  • 248.
    UNIT 3  SWITCHING ADDRESS MAKING – ARP, RARP, BOOTP and DHCP
  • 249.
    o Circuit Switching oPacket Switching o Message Switching Switching
  • 250.
  • 251.
  • 252.
  • 253.
  • 254.
  • 255.
  • 256.
  • 257.
  • 258.
  • 259.
  • 260.
  • 261.
  • 262.
  • 263.
  • 264.
  • 265.
  • 266.
  • 267.
  • 268.
  • 269.
  • 270.
  • 271.
    ADDRESS MAKING – ARP,RARP, BOOTP and DHCP
  • 272.
    ARP (Address ResolutionProtocol) o Address resolution Protocol o Mapping Logical to Physical Address o If a host or a router has an IP datagram to send to another host or router, it has the logical (IP) address of the receiver. o The logical (IP) address is obtained from the DNS. o DNS :Domain Name System. o But the IP datagram must be encapsulated in a frame to be able to pass through the physical network. o This means that the sender needs the physical address of the receiver. o The host or the router sends an ARP query packet. o The packet includes the physical and IP addresses of the sender and the IP address of the receiver.
  • 273.
    Continue.. Because the senderdoes not know the physical address of the receiver and the query is broadcast over the network. Every host or router on the network receives and processes the ARP query packet, but only the intended recipient recognizes its IP address and sends back an ARP response packet. The response packet contains the recipient’s IP and physical addresses. The packet is unicast directly to the inquirer by using the physical address received in the query packet.
  • 275.
    RARP (Reverse AddressResolution Protocol) o Reverse Address Resolution Protocol o (RARP) finds the logical address for a machine thatknows only its physical address. o A diskless machine is usually booted from ROM,which has minimum booting information. The ROM isinstalled by the manufacturer. o It cannot include the IP address because the IPaddresses on a network are assigned by the networkadministrator.
  • 276.
    Continue.. o The machinecan get its physical address (by reading its NIC, for example), which is unique locally. It can then use the physical address to get the logical address by using the RARP protocol. o A RARP request is created and broadcast on the local network. o Broadcasting is done at Data Link Layer. o Another machine on the local network that knows all the IP addresses will respond with a RARP reply. o The requesting machine must be running a RARP client program the responding machine must be running a RARP server program. o This is the reason that RARP is almost obsolete. Two protocols, BOOTP and DHCP, are replacing RARP.
  • 277.
    BOOTP (Bootstrap Protocol) oThe Bootstrap Protocol (BOOTP) is a client/server protocol designed to provide physical address to logical address mapping. o BOOTP is an application layer protocol. o BOOTP messages are encapsulated in a UDP packet, and the UDP packet itself is encapsulated in an IP packet. o One of the advantages of BOOTP over RARP is that the client and server are application–layer processes.
  • 278.
    Continue.. o The BOOTPrequest is broadcast because the client does not know the IP address of the server. o A broadcast IP datagram cannot pass through any router. o To solve the problem, there is a need for an intermediary. One of the hosts (or a router that can be configured to operate at the application layer) can be used as a relay. o The host in this case is called a relay agent.
  • 279.
    Continue.. o The relayagent knows the unicast address of a BOOTP server. When it receives this type of packet, it encapsulates the message in a unicast datagram and sends the request to the BOOTP server. o The packet, carrying a unicast destination address, is routed by any router and reaches the BOOTP server.
  • 281.
    Continue.. o The BOOTPserver knows the message comes from a relay agent because one of the fields in the request message defines the IP address of the relay agent. o The relay agent, after receiving the reply, sends it to the BOOTP client.
  • 282.
    DHCP (Dynamic HostConfiguration Protocol) o BOOTP is not a dynamic configuration protocol. o DHCP was created by the Dynamic Host Configuration Working Group of the Internet Engineering Task Force(IETF) o Runs over UDP o Utilizing ports: o 67 – connections to server o 68 – connections to client o DHCP is basically used for dynamic configuration o Uses client–server model
  • 283.
    Continue.. o When aclient requests its IP address, the BOOTP server consults a table that matches the physical address of the client with its IP address. o The binding is predetermined. o The Dynamic Host Configuration Protocol (DHCP)has been devised to provide static and dynamic address allocation that can be manual or automatic
  • 284.
    Objectives of DHCP oThe DHCP server should be able to provide a workstation for configuration . o The DHCP server should prevent the duplication of addresses on the network. o The DHCP server should be able to configure clients by use of relay agent. o DHCP clients should be able to retain their TCP/IP parameters despite a reboot of either client or server system.
  • 285.
    DHCP architecture o Dynamicconfiguration protocol consists of two basic elements: o A service that assigns TCP/IP configuration settings to client system o A protocol used for communications between DHCP clients and server. o The DHCP architecture defines the message format for the protocol and the sequence of message exchanges that take place between the DHCP client and server. o The DHCP architecture defines the message format for the protocol and the sequence of message exchanges that take place between the DHCP client and server.
  • 287.
    UNIT 4  PROCESS-TO-PROCESSCOMMUNICATION: UDP, TCP, SCTP  CONGESTION CONTROL  LEAKY AND TOKEN BUCKET ALGORITHMS  DOMAIN NAME SYSTEM (DNS)  SSH & TELNET  EMAIL ARCHITECTURE  BLUETOOTH  FIREWALLS
  • 288.
  • 289.
    PROCESS TO PROCESSCOMMUNICATION: ● Process to process (application to application) communication occurs at transport layer. To complete the delivery we need to deliver data from one of the processes running on the source host to the corresponding process running on the destination host.
  • 290.
    Client/server paradigm- ● Itis the most common way to achieve process-to-process communication. ● Process on local host - client ● Process on remote host - server ● Both client and server processes have same name. ● Client initiates a connection and sends requests to server, and server listens for connections and processes requests.
  • 291.
    Addressing- ● Here weneed port number (address) as on transport layer, which will select appropriate process on destination host among multiple running processes. ● Client program will be define with randomly chosen port number which will be ephemeral (temporary), by the transport layer software on client host. ● Whereas, server port number must be the permanent port number.
  • 292.
    IANA Ranges- lANA (InternetAssigned Number Authority) divides the port numbers in three ranges: I. Well-known ports: (0 - 1023) are assigned and controlled by lANA. II. Registered ports: (1024 - 49,151) are not assigned or controlled by lANA. They can only be registered with lANA to prevent duplication. III. Dynamic ports: (49,152 - 65,535) are neither controlled nor registered. They can be used by any process. These are the ephemeral ports.
  • 293.
    Socket addresses- ● Tosuccessfully perform process-to-process delivery we need combination of IP address and the port number which is also called Socket. ● It defines client process and server process uniquely.
  • 294.
    Multiplexing and Demultiplexing: Multiplexing- ●Happens at sender site. ● There may be many processes to send packets at the same time, which will cause many to one relation and multiplexing will be required. ● Accepts packets of different processes, differentiates by their port numbers and adds the header, the transport layer passes the packet to the network layer.
  • 295.
    Demultiplexing- ● Happens atreceiver site ● After receiving data form network layer ● The transport layer delivers each packet to the appropriate process according to their port number.
  • 296.
    Connectionless Versus Connection-Oriented Service: ConnectionlessService- ● Here packets can be sent from one host to another without any established connection. ● packets are not numbered; they may be delayed or lost or may arrive out of sequence. There is no acknowledgment either. UDP, is connectionless. Connection-Oriented Service- ● Firstly connection is established between the sender and the receiver. And then the connection in released after the data is transferred. ● TCP and SCTP is Connection-Oriented .
  • 297.
    Reliable Versus Unreliable: Reliable- ●we use a reliable transport layer protocol by implementing flow and error control at the transport layer. If reliability is needed by application layer program. Unreliable- ● If application uses its own flow and error control or the nature of the service does not demand flow and error control then unreliable protocol will be used . ● UDP is connectionless and unreliable ● TCP and SCTP are connection oriented and reliable.
  • 298.
    Position of UDP,TCP AND SCTP in TCP/IP suite-
  • 299.
    UDP (User DatagramProtocol): ● UDP is connectionless, unreliable transport protocol. ● When a process wants to send a small message and does not care much about its reliability, it can use UDP. ● UDP takes much less interaction between sender and receiver than using TCP or SCTP.
  • 300.
  • 301.
    User Datagram: ● UDPpacket, called user datagram, have a fixed-size header of 8 bytes. Following is format of user datagram.
  • 302.
    Source port number- ●It is used by process running on the source host. ● If the source host is the client(sending a request) the port number mostly, is an ephemeral port number ● If the source host is the server (sending a response), the port number mostly, is a well-known port number. Destination port number- ● It is used by process running on the destination host. ● . If the destination host is the server (client sending a request), the port number, in most cases, is a well-known port number. ● If the destination host is the client (a server sending a response), the port number, in most cases, is an ephemeral port number. ● Both source and destination port number are 16 bits long.
  • 303.
    Length- ● This isa 16-bit field that defines the total length of the user datagram, header plus data. ● The 16 bits can define a total length of 0 to 65,535 bytes. However, the total length needs to be much less because a UDP user datagram is stored in an IP datagram with a total length of 65,535 bytes. ● A user datagram is encapsulated in an IP datagram. There are fields in the IP datagram that defines the total length and length of the header separately. So, UDP length = IP length - IP header's length
  • 304.
    Checksum- ● Checksum includesthree sections: a pseudo header, the UDP header, and the data. ● Pseudo header is the part of the header of the IP packet in which the user datagram is to be encapsulated with some fields filled with 0’s. ● The protocol field is added to ensure that the packet belongs to UDP, and not to other transport-layer protocols.
  • 305.
    Optional use ofchecksum- • If checksum is not calculated the field is filled with 1’s. • Calculated checksum can never be all I’s, because this will impact that the sum in all o’s, which is impossible because it requires the value of the field to be 0’s.
  • 306.
    UDP Operation: Connectionless Services- ●There is no relationship between the different user datagrams even if they are coming from the same source process and going to the same destination program. The user datagrams are not numbered. ● Also, there is no connection establishment and no connection termination. This means that each user datagram can travel on a different path. Flow and Error Control- ● There is no flow control and hence no window mechanism. The receiver may overflow with incoming messages. ● There is no error control mechanism in UDP except for the checksum.
  • 307.
    Encapsulation and Decapsulation- ●To send a message from one process to another, the UDP protocol encapsulates and decapsulates messages in an IP datagram. Uses of UDP: ● UDP is suitable for a process that requires simple request-response communication with little concern for reliabity. ● UDP is suitable for a process with internal flow and error control mechanisms. For example, the Trivial File Transfer Protocol (TFTP). ● UDP is a suitable transport protocol for multicasting ● UDP is used for some route updating protocols such as Routing Information Protocol (RIP). ● UDP is used for management processes such as SNMP.
  • 308.
    • TCP isa connection-oriented protocol that means it establishes the connection prior to the communication that occurs between the computing devices in a network. • This protocol is used with an IP protocol, so together, they are referred to as a TCP/IP Transmission Control Protocol
  • 309.
    • The mainfunctionality of the TCP is to take the data from the application layer. • Then it divides the data into a several packets, provides numbering to these packets, and finally transmits these packets to the destination. • The TCP, on the other side, will reassemble the packets and transmits them to the application layer. • As we know that TCP is a connection-oriented protocol, so the connection will remain established until the communication is not completed between the sender and the receiver. FUNCTIONS
  • 310.
    FEATURES •Transport Layer Protocol •TCP isa transport layer protocol as it is used in transmitting the data from the sender to the receiver.. •Reliable •TCP is a reliable protocol as it follows the flow and error control mechanism. It also supports the acknowledgment mechanism, which checks the state and sound arrival of the data. In the acknowledgment mechanism, the receiver sends either positive or negative acknowledgment to the sender so that the sender can get to know whether the data packet has been received or needs to resend. •Order of the data is maintained •This protocol ensures that the data reaches the intended receiver in the same order in which it is sent. It orders and numbers each segment so that the TCP layer on the destination side can reassemble them based on their ordering. •Connection- oriented •It is a connection-oriented service that means the data exchange occurs only after the connection establishment. When the data transfer is completed, then the connection will get terminated.
  • 311.
    • In thelayered architecture of a network model, the whole task is divided into smaller tasks. • Each task is assigned to a particular layer that processes the task. In the TCP/IP model, five layers are application layer, transport layer, network layer, data link layer, and physical layer. • The transport layer has a critical role in providing end-to-end communication to the directly application processes. • It creates 65,000 ports so that the multiple applications can be accessed at the same time. • It takes the data from the upper layer, and it divides the data into smaller packets and then transmits them to the network layer. NEED
  • 312.
    • In TCP,the connection is established by using three-way handshaking. • The client sends the segment with its sequence number. • The server, in return, sends its segment with its own sequence number as well as the acknowledgement sequence, which is one more than the client sequence number. • When the client receives the acknowledgment of its segment, then it sends the acknowledgment to the server. • In this way, the connection is established between the client and WORKING
  • 313.
    • It providesa connection-oriented reliable service, which means that it guarantees the delivery of data packets. If the data packet is lost across the network, then the TCP will resend the lost packets. • It provides a flow control mechanism using a sliding window protocol. • It provides error detection by using checksum and error control by using Go Back or ARP protocol. • It eliminates the congestion by using a network congestion avoidance algorithm that includes various schemes such as additive increase/multiplicative decrease (AIMD), slow start, and congestion window. ADVANTAGES
  • 314.
    • It increasesa large amount of overhead as each segment gets its own TCP header, so fragmentation by the router increases the overhead. DISADVANTAGES
  • 315.
    •Source port: Itdefines the port of the application, which is sending the data. So, this field contains the source port address, which is 16 bits. •Destination port: It defines the port of the application on the receiving side. So, this field contains the destination port address, which is 16 bits. •Sequence number: This field contains the sequence number of data bytes in a particular session. •Acknowledgment number: When the ACK flag is set, then this contains the next sequence number of the data byte and works as an acknowledgment for the previous data received. For example, if the receiver receives the segment number 'x', then it responds 'x+1' as an acknowledgment number. •HLEN: It specifies the length of the header indicated by the 4-byte words in the header. The size of the header lies between 20 and 60 bytes. Therefore, the value of this field would lie between 5 and 15. •Reserved: It is a 4-bit field reserved for future use, and by default, all are set to zero. HEADER FORMAT
  • 316.
    Flags There are sixcontrol bits or flags:  URG: It represents an urgent pointer. If it is set, then the data is processed urgently.  ACK: If the ACK is set to 0, then it means that the data packet does not contain an acknowledgment.  PSH: If this field is set, then it requests the receiving device to push the data to the receiving application without buffering it.  RST: If it is set, then it requests to restart a connection.  SYN: It is used to establish a connection between the hosts.  FIN: It is used to release a connection, and no further data exchange will happen. Window size It is a 16-bit field. It contains the size of data that the receiver can accept. This field is used for the flow control between the sender and receiver and also determines the amount of buffer allocated by the receiver for a segment. The value of this field is determined by the receiver.
  • 317.
    STREAM CONTROL TRANSMISSIONPROTOCOL • Stream Transmission Control Protocol (SCTP) is a connection- oriented protocol, similar to TCP, but provides message-oriented data transfer, similar to UDP. • It provides a full-duplex association i.e., transmitting multiple streams of data between two end points at the same time that have established a connection in network. • SCTP may provide more flexibility for certain applications, like Voice over IP (VoIP), that require the reliable but message-oriented data transfer. For this category of applications, SCTP is most likely better- suited than TCP or UDP. • It is sometimes referred to as next generation TCP or TCPng.
  • 318.
    Unicast with Multiple properties • Itis a point-to-point protocol which can use different paths to reach end host. Message oriented • Each message can be framed and we can keep order of data stream and tabs on structure. For this, In TCP, we need a different layer for abstraction. Reliable Transmission • It uses SACK and checksums to detect damaged, corrupted, discarded, duplicate and reordered data. It is similar to TCP but SCTP is more efficient when it comes to reordering of data. Multi-homing • It can establish multiple connection paths between two end points and does not need to rely on IP layer for resilience. Characteristics of SCTP :
  • 319.
    • It isa full- duplex connection i.e. users can send and receive data simultaneously. • It allows half- closed connections. • The message’s boundaries are maintained and application doesn’t have to split messages. • It has properties of both TCP and UDP protocol. • It doesn’t rely on IP layer for resilience of paths. ADVANTAGES
  • 320.
    • One ofkey challenges is that it requires changes in transport stack on node. • Applications need to be modified to use SCTP instead of TCP/UDP. • Applications need to be modified to handle multiple simultaneous streams. DISADVANTAGES
  • 321.
    Attribute TCP UDPSCTP Reliability Reliable Unreliable Reliable Connection Management Connection- oriented Connectionless Connection- oriented Transmission Byte-oriented Message-oriented Message-oriented Flow Control Yes No Yes Congestion Control Yes No Yes Fault Tolerance No No Yes Data Delivery Strictly Ordered Unordered Partially ordered Security Yes Yes Improved Differences in behavior between SCTP and existing transport protocols, TCP and UDP
  • 322.
  • 323.
    What is congestion? •When a network node or link is carrying more data than it can handle. • No. of packets sent to the network > No. of packets a network can handle.
  • 324.
    Reasons that generatescongestion ? 1. Too many hosts in broadcast domain. 2. Low Bandwidth. 3. Packet transfer at same time in Multicasting. 4. Outdated Hardware that creates bottleneck. 5. Border Gateway Protocol due to shortest logical path.
  • 325.
    Congestion window Previously, Wesaid that the sender window size is determined by the available buffer space in the receiver (rwnd). But We totally ignored another entity the network. If the network cannot deliver the data as fast as they are created by the sender, it must tell the sender to slow down. From Today, the sender's window size is determined not only by the receiver window but also by congestion in the network(network window). Actual window size= minimum (receiver window,network window); RW=4 MSS NW=2 MSS So, SW= 2 MSS
  • 326.
    Congestion Control Techniques andmechanisms that can either prevent congestion, before it happens, or remove congestion, after it has happened. There are two technique to avoid congestion :- 1. Prevention(open loop) 2. Removal(closed loop)
  • 327.
    Three Policies ofcongestion control in Internet(TCP) 1. Slow Start 2. Congestion avoidance 3. Congestion Detection ➔ TCP Handling congestion is based on three phases: In the slow-start phase, the sender starts with a very slow rate of transmission(1 MSS), but increases the rate rapidly to reach a threshold. When the threshold is reached, the data rate is reduced to avoid congestion. Finally if congestion is detected, the sender goes back to the slow-start(TCP Tahoe) or congestion avoidance phase(TCP Reno) based on how the congestion is detected.
  • 328.
    1. Slow Start Theidea that the size of the congestion window (cwnd) starts with one maximum segment size (1 MSS). As the name implies, the window starts slowly, but grows exponentially. Slow start cannot continue indefinitely. There must be a threshold(benchmark) to stop this phase. When the size of window in bytes reaches this threshold, slow start stops and the next phase(congestion avoidance) starts.
  • 329.
    2. Congestion Avoidance Westart with the slow-start, the size of the congestion window increases exponentially. To avoid congestion before it happens, one must slow down this exponential growth. When the size of the congestion window reaches the slow-start threshold, the exponential growth stops and the additive growth(add 1 MSS each time) begins. In the congestion avoidance algorithm, the size of the congestion window increases additively until congestion is detected. Start cwnd=l After round 1 cwnd= 1+ 1 =2 After round 2 cwnd=2+ 1 =3 After round 3 cwnd=3+ 1 =4
  • 330.
    3. Congestion Detection Afterthe avoidance when When a sender detects the loss of segments, it reacts in different ways depending on how the loss is detected- Case-01: Detection On Time Out (Stronger possibility) (TCP tahoe) ◆ Time Out Timer expires before receiving the acknowledgement for a segment. ◆ There are chances that a segment has been dropped in the network. Reaction of sender in this case- 1. Setting the slow start threshold to half of the current congestion window size. 2. Decreasing the congestion window size to 1 MSS. 3. Resuming the slow start phase.
  • 331.
    3. Congestion Detection Case-02:Detection On Receiving 3 Duplicate Acknowledgements - (TCP Reno) (Weaker possibility) ◆ Sender receives 3 duplicate acknowledgements attached for a segment. ◆ There are chances that a segment has been dropped but few segments sent later may have reached. Reaction of a sender 1. Setting the slow start threshold to half of the current congestion window size. 2. Decreasing the congestion window size to slow start threshold. 3. Resuming the congestion avoidance phase.
  • 333.
    Data Traffic ★ AverageData Rate- ★ Peak Data Rate - max. data rate of traffic ★ Maximum Burst Size - max. length of time the traffic is generated at peak rate. ★ Effective Bandwidth(allocated in real-time) Average data rate=amount of data time
  • 334.
    Traffic Profiles Constant BitRate(CBR) - data rate that does not change. the average data rate and the peak data rate are the same. The network knows in advance how much bandwidth to allocate for this type of flow. Variable Bit Rate (VBR)- the rate of the data flow changes in time, with smooth instead of sudden and sharp. the average data rate and the peak data rate are different. Bursty - the data rate changes suddenly in a very short time. the network profile is very unpredictable. Bursty traffic is one of the main causes of congestion in a network.
  • 335.
    Congestion Control Techniques Wehave already discussed that there are two techniques of congestion control. (Prevention and Removal)
  • 336.
    Open Loop Control: Prevention Retransmission policy and timers must to be designed to optimize efficiency and at same time prevent congestion. Window policy : Selective Repeat is better than Go-back-N. Acknowledgement policy : does not ACK every packet.(Cumulative Ack) Discard policy : Discards less sensitive packets by sender. Admission policy : Switch first check the resource requirement before admitting it to the network.
  • 337.
    Closed -Loop CongestionControl : Removal Back pressure : inform the previous upstream router to reduce the rate of outgoing if congested. Choke point : a packet sent by a router to the source to inform it of congestion. Implicit signaling : slow down its sending rate by detecting an implicit signal concerning congestion. Explicit signaling : Backward signaling OR Forward signaling.
  • 338.
    Open Loop Control: Prevention Retransmission policy and timers must to be designed to optimize efficiency and at same time prevent congestion. Window policy : Selective Repeat is better than Go-back-N. Acknowledgement policy : does not ACK every packet.(Cumulative Ack) Discard policy : Discards less sensitive packets by sender. Admission policy : Switch first check the resource requirement before admitting it to the network. S R
  • 339.
    Let the sizeof congestion window of a TCP connection be 32 KB when a timeout occurs. The round trip time of the connection is 100 msec and the maximum segment size used is 2 KB. The time taken (in msec) by the TCP connection to get back to 32 KB congestion window is _________. When Time Out occurs, for the next round of Slow Start, Threshold = size of congestion window/2 Threshold = 16KB
  • 340.
    So the transferproceeds as 1MSS (2KB) 2MSS (4KB) 4MSS (8KB) 8MSS (16KB) <--- threshold 9MSS (18KB) 10MSS (20KB) 11MSS (22KB) 12MSS (24KB) 13MSS (26KB) 14MSS (28KB) 15MSS (30KB) 16MSS (32KB) 1 2 3 4 5 6 7 8 9 10 11
  • 341.
    References ❖ Data communicationsand Networking By Behrouz A. Forouzan ❖ https://www.geeksforgeeks.org/congestion-control-techniques-in-computer-networks/ ❖ https://datapath.io/resources/blog/10-causes-of-network-congestion-you-should-know-about/ ❖ https://www.gatevidyalay.com/tcp-congestion-control-tcp-protocol-tcp/ ❖ https://smallbiztrends.com/2013/09/what-makes-my-application-slow.html ❖ https://www.techtud.com/short-notes/congestion-control-and-its-prevention-policies
  • 342.
  • 343.
    BACKGROUND OF STUDY QUALITYOF SERVICE (QoS) It is the overall performance measure of the computer network. Flow Characteristics of the QoS: ● Reliability ● Delay ● Jitter ● Bandwidth
  • 344.
    Flow Characteristics Reliability DelayJitter Bandwidth If a packet gets lost or acknowledgement is not received, the re- transmission of data will be needed. This decreases the reliability. Eg: Email and File Transfer Delay of a message from source to destination is a very important characteristic. Eg: Time delay can’t be tolerated in audio conferencing (minimum time delay) It is the variation in delay. Eg: Packet ST RT Delay 1 0 10 10 2 1 11 10 3 2 12 10 (Low Jitter) Packet ST RT Delay 1 0 31 31 2 1 34 33 3 2 39 37 (High Jitter) Different applications need different bandwidth. Eg: Video Conferencing needs more bandwidth as compared to Email or File Transfer
  • 345.
    Techniques to achievegood QoS Traffic Shaping Resource Reservation Admission Control Scheduling Weighted Fair Queuing Priority Queuing FIFO Queuing Token Bucket Leaky Bucket Mechanism to control the amount and the rate of the traffic sent to the network.
  • 346.
    Leaky Bucket Algorithm BurstyFlow Fixed Flow Bursty chunks are stored in the bucket and sent out at an average rate. Input rate may vary, but output rate remains constant. Thus leaky bucket can smooth out bursty traffic.
  • 347.
    Implementation Arrival Full ? N Y ProcessorDeparture Discard Removes packet at a constant rate. Leaky Bucket Algorithm Queue
  • 348.
  • 349.
    Algorithm for Variable-lengthPackets Step 1: Initialize a counter to n at the tick of the clock. Step 2: If n is greater than the size of the packet, send the packet and decrement the counter by the packet size. Repeat this step until n is smaller than the packet size. Step 3: Reset the counter and go to step 1.
  • 350.
    Example 200 700 500450 400 200 Let n = 1000 n>200 200 700 500 450 400 n = 1000-200 = 800 n>400 200 700 500 450 n = 800-400 = 400 n<450 200 700 500 450 Let n = 1000 n>450 200 700 500 n = 1000-450 = 550 n>500 200 700 n = 550-500 = 50 n<700 200 700 Let n = 1000 n>700 200 n = 1000-700 = 300 n>200
  • 351.
    Question In a leakybucket used to control liquid flow, how many gallons of liquid are left in the bucket if the output rate is 5 gal/min, there is an input burst of 100 gal/min for 15 s, and there is no input for 33 s?
  • 352.
    Solution Input rate =100 gal/min = 100/60 gal/sec = 5/3 gal/sec Water filled in the bucket in 15 sec = 5/3 * 15 = 25 gallons Output rate = 5 gal/min = 5/60 gal/sec = 1/12 gal/sec Output continues for 15 + 33 secs => 48 secs. Water emptied from the bucket = 1/12 * 48 = 4 gallons ∴ Water left in the bucket = 25 - 4 = 21 gallons
  • 353.
    Limitation of LeakyBucket Algorithm It doesn’t credit an idle host. For example, if a host doesn’t send for a while, it’s bucket becomes empty. Now, if the host has bursty data, leaky bucket allows an average rate. The time when the host was idle is not taken into account.
  • 354.
    Token Bucket Algorithm ●Token bucket algorithm allows idle hosts to accumulate credit for the future in the form of tokens. ● Tokens are generated by a clock at the rate of one token every ∆t sec. ● The system removes one token for every cell of data sent. ● Output may vary depending on the size of the burst. ● Idle hosts can capture and save up tokens (up to max. size of the bucket) in order to send larger bursts later.
  • 355.
    Implementation Arrival Full ? N Y ProcessorDeparture Discard Queue -------- One token is removed and discarded per cell transmitted. Tokens are added at the rate of r per second; tokens are discarded if bucket is full. Bucket capacity: c tokens
  • 356.
  • 357.
    Algorithm for TokenBucket Step 1: A token is added at every ∆t time. Step 2: The bucket can hold at most c tokens. If a token arrives when the bucket is full, it is discarded. Step 3: When a packet of m bytes arrives, m tokens are removed from the bucket and the packet is sent to the network. Step 4: If less than m tokens are available then no tokens are removed from the bucket and packet is considered to be non conformant. The non conformant packet may be enqueued for subsequent transmission when sufficient tokens have been accumulated in the bucket.
  • 358.
    Maximum packets formula c:capacity of bucket r: rate at which tokens enter the bucket The maximum number of packets that can enter the network during any time interval of length t is, Maximum no. of packets = r*t + c Maximum average rate = (r*t + c)/t packets per second
  • 359.
    Bucket capacity formula M:Output rate P: Input rate of tokens C: Maximum capacity of buckets Then, (Outflow - Inflow) * Time = Bucket Capacity (M - P) * t = C
  • 360.
    Question A computer on5 Mbps network is regulated by token bucket. The token bucket filled with a rate of 3 Mbps. The bucket is initially filled to capacity with 2 Mb. The time for which the computer transmit at the full 5 Mbps is_____________?
  • 361.
    Solution Output rate =M = 5 Mbps Input rate = P = 3 Mbps Bucket capacity = C = 2 Mb ∴ Time = C / (M - P) = 2 / (5 - 3) = 1 second
  • 362.
    Difference between Leakyand Token bucket Leaky Bucket Token Bucket Token independent. Token dependent. If bucket is full, packets are discarded. If bucket is full, tokens are discarded. Packets are transmitted continuously. Packets can only be transmitted when there are enough tokens. It sends the packets at constant rate. It allows large bursts to be sent at a faster rate after that constant rate. It does not save tokens. It saves token to send larger bursts.
  • 363.
  • 364.
  • 365.
    DNS resolves domainname to IP addresses
  • 366.
    What is theneed of supportive applications like DNS? ❖ To identify an entity, TCP/IP uses IP address, which uniquely identifies the connection of a host to the Internet. However, people prefer to use names instead of numeric addresses like our smartphone contact list. Therefore, we need a system that can map a name to an address or an address to a name i.e. DNS A simple yet sophisticated system, the DNS handles more than 700 million address translation or “look-up” requests per day.
  • 367.
    How things weremanaged before DNS ? Host file method ❖ When the Internet was small, mapping was done by using a host file ❖ The host file had only two columns: name and address. ❖ Every host could store the host file on its disk and update it periodically from a master host file. ❖ When a program or a user wanted to map a name to an address, the host consulted the host file and found the mapping.
  • 368.
    How things weremanaged before DNS ? ❖ When ARPANET moved to TCP/IP in 1983 and became known as the Internet, the population of networks exploded. ❖ The centrally maintained HOSTS.TXT file became plagued with problems, such as traffic and load, name collisions, and consistency anomalies. ❖ It was clear that HOSTS.TXT no longer met the needs of the rapidly expanding Internet, and that a more robust system was needed.
  • 369.
    Is centralized DNSfeasible? NO, ➔ Single point of Failure ➔ Traffic Volume, storing information at one server requires huge space. ➔ Maintenance (if required, service needs to be stopped) ➔ Distant centralized database
  • 370.
    A group composedof Jon Postel, Paul Mockapetris, Craig Partridge, and others [Harvard University] met the need when they published RFC 882 in 1984 which resulted in the creation of the distributed naming system known as the DNS. Using Distributed DNS since 1984
  • 371.
    Distributed DNS system ➢Every time someone wishes to access a website, the request is handled by one of the thirteen core servers known as the “root” servers, or a server lower on the Internet hierarchy that takes the bulk of the requests, the DNS is the key to correct completion of that request.
  • 372.
  • 373.
    How DNS Works- Building Blocks of DNS ● DNS Resolver ● DNS Root Server ● Top-Level Domain (TLD) Name Server ● Authoritative Name Server
  • 374.
    DNS Resolver (RecursiveName Server) ● A software designed to receive DNS queries from web browsers and other applications. ● The DNS resolver might be operated by the local network, an Internet Service Provider (IP), a mobile carrier, a WIFI network, or other third party. ● The resolver starts by looking in its local cache or that of the operating system on the local device - if the hostname is found, it is resolved immediately. ● If not found, the resolver contacts a DNS Root Server. There is a list of well-known and rarely changed root server IP addresses, and every DNS resolver has that list of IP addresses included with the software.
  • 377.
    DNS : RootServers ● It is a server whose zone consist of whole tree. These servers are distributed all around the world. ● In total, there are 13 main DNS root servers, each of which is named with the letters ‘A’ to ‘M’ operated by organizations such as Verisign, Cogent, the University of Maryland and the U.S. Army Research Lab. ● They all have a IPv4 address and most have an IPv6 address. ● Managing the root server is ICANN’s responsibility, however, operated by different institutions that ensure that data exchange in the root zone always remains correct, available, and secure. ● The root servers won’t actually know where the domain is hosted. They will, however, be able to direct the requester to the name servers that handle the specifically requested top-level domain.
  • 378.
    DNS : TLDServers ● The TLD Name Server takes the domain name provided in the query - for example www.example.com - and provides the IP of an Authoritative Name Server. ● This is a DNS server that contains DNS records for the specific domain. ● There are currently over 1500 valid top level domains, including the original TLDs like .com and .org, country codes such as co.uk and co.fr, and new TLDs such as .biz.
  • 379.
    DNS : AuthoritativeServers ● The Authoritative Name Server is the last stop in the name server query. The Authoritative Name Server takes the domain name and subdomain, and if it has access to the DNS records, it returns the correct IP address to the DNS Resolver.
  • 380.
  • 381.
    Types of Resolution/DNS Lookup Process ❏ Recursive resolution ❏ Iterative resolution
  • 382.
    Recursive Resolution ❖ Arecursive query is a kind of query, in which the DNS server, who received your query will do all the job of fetching the answer, and giving it back to you. ❖ During this process, the DNS server might also query other DNS server's in the internet on your behalf, for the answer.
  • 383.
  • 384.
    Iterative Resolution In aniterative query, the name server, will not go and fetch the complete answer for your query, but will give back a referral to other DNS servers, which might have the answer.
  • 385.
  • 386.
  • 387.
    ➢ Different ISPuse different DNS servers. By default, if you don’t set up specific DNS servers on your computer (or your router), default DNS servers from your ISP will be used. ➢ If these DNS servers aren’t stable, you might be having a few problems while using the Internet on your computer. Such as can’t load websites completely or unable to access the Internet. ➢ To avoid unwanted DNS errors, switch to public DNS servers like Google’s DNS and OpenDNS. These servers will help to improve the speed of your Internet and stability. Public DNS
  • 388.
    ➢ Google DNSservice is free to use and can be used by anyone who has access to the Internet. You can use Google DNS IP instead of your ISP’s DNS servers to improve the resolve time and provide security. ➢ It represents two IP addresses for IPv4 – 8.8.8.8 and 8.8.4.4. ➢ 8.8.8.8 is the primary DNS, 8.8.4.4 is the secondary one. Google Public DNS
  • 389.
    ➢ The benefitsof caching are pretty obvious: ○ This speeds up your Internet experience when visiting a site you go to often and also helps lower the load on DNS servers around the world. ➢ What happens when the DNS record changes? This is where the potential downside of caching becomes evident. ➢ If a DNS record is cached, then a new lookup is not done until that cache expires. ➢ Thus that resolver that has the cached record won’t have any way to find out about the changed record until its cache expires. DNS caching
  • 390.
    ➢ The DNSrecords are stored in cache for a period of time called time to live, defined in the configuration of each DNS record. ➢ Time to live is very significant because it determines the “freshness” of DNS records. ➢ TTL is a setting for each DNS record that specifies how long a resolver is supposed to cache (or remember) the DNS query before the query expires and a new one needs to be done. TTL
  • 391.
    NAME SPACE ❖ Aname space maps each address to a unique name . ❖ It can be organized in two ways :- 1) Flat Name Space 2) Hierarchical Name Space DNS Structure
  • 392.
    FLAT NAME SPACE ❖Name is assigned to an address and name is a sequence of characters without structure. ❖ It can not be used in large system because of centralized control for ambiguity and duplicacy.
  • 393.
    Hierarchical Name Space ❖In a hierarchical name space, each name is made of several parts, each part having a particular meaning. ❖ The authority to assign and control the name spaces is decentralized. ❖ A central authority can assign the part of the name that defines the nature of the organization and the name of the organization. ❖ The responsibility of the rest of the name can be given to the organization itself. ❖ For example: challenger.berkley.com.
  • 394.
    Domain Name Space ❖To have a hierarchical name space, a domain name space was designed. In this design the names are defined in an inverted-tree structure with the root at the top. The tree can have only 128 levels: level 0 (root) to 127 .
  • 395.
    Domain Name Space LABEL: ❖Each node in the tree has a label, which is a string with a maximum of 63 characters. ❖ The root label is a null string (empty string). DOMAIN NAME: ❖ Each node in the tree has a domain name. A full domain name is a sequence of labels separated by dots (.). ❖ The domain names starts from the node up to the root. ❖ The last label is the label of the root (null).
  • 397.
    There are twotypes of domain name. FULLY QUALIFIED DOMAIN NAME(FQDN): ❖ It contains the full name of host. ❖ A label is terminated by a null string. PARTIALLY QUALIFIED DOMAIN NAME(PQDN): ❖ It starts from a node but doesn’t reaches root. ❖ A label is not terminated by null string.
  • 398.
    DOMAIN: ❖ A domainis a subtree of the domain name space. ❖ The name of the domain is the domain name of the node at the top of the subtree. ❖ A domain may itself be divided into domains (subdomains).
  • 399.
    Zone :- ❖ Regionover which server has the responsibility and authority. ❖ Zone is a part of entire tree.
  • 400.
    DNS In Internet DNSis divided into three domains :-
  • 401.
    GENERIC DOMAINS :- ❖It contains registered hosts according to generic behaviors.
  • 402.
    COUNTRY DOMAINS :- ❖The country domains section uses two-character country abbreviations (e.g., in for INDIA).
  • 403.
    INVERSE DOMAINS :- ●Inverse domain is used to map an address to a name. ● For example, a client send a request to the server for performing a particular task, server finds a list of authorized client. The list contains only IP addresses of the client. ● The server sends a query to the DNS server to map an address to a name to determine if the client is on the authorized list. ● This query is called an inverse query. ● This query is handled by first level node called arpa.
  • 405.
    DNS Message ❖ DNShas two types of messages: query and response.
  • 406.
    HEADER ❖ The identificationsubfield is used by the client to match the response with the query. ❖ The client uses a different identification number each time it sends a query. ❖ The server duplicates this number in the corresponding response. ❖ The flags subfield is a collection of subfields that define the type of the message, the type of answer requested, the type of desired resolution etc.
  • 407.
    DDNS ❖ In DNS, when there is a change , such as adding a new host, removing a host or changing an IP address, change must be made to the DNS master file. ❖ Manual updating is not possible due to large size of Internet. ❖ Therefore, DDNS is used to update DNS master file automatically. ❖ Information is sent to primary server first and it notifies the secondary servers. ❖ Therefore, the changes are updated in every server.
  • 408.
    DNS Spoofing ❖ DomainName Server spoofing (a.k.a. DNS cache poisoning) is an attack in which altered DNS records are used to redirect online traffic to a fraudulent website that resembles its intended destination. ❖ Once there, users are prompted to login into (what they believe to be) their account, giving the perpetrator the opportunity to steal their access credentials and other types of sensitive information. ❖ Furthermore, the malicious website is often used to install worms or viruses on a user’s computer, giving the perpetrator long-term access to it and the data it stores.
  • 409.
    Methods for executinga DNS spoofing attack include: ❖ Man in the middle (MITM) – The interception of communications between users and a DNS server in order to route users to a different/malicious IP address. ❖ DNS server compromise – The direct hijacking of a DNS server, which is configured to return a malicious IP address.
  • 411.
  • 412.
  • 413.
    EVER TRIED TOCLONE A REPO FROM GITHUB USING SSH??
  • 414.
    EVER TRIED CONNECTINGTO A REMOTE SERVER?? WHAT IS .SSH DIRECTORY ?? WHAT IS SSH?? WHAT 'S THIS .pem FILE??  ssh is a hidden folder which can only be listed by $ls –a whenever we set up our first remote connection or want to generate keys using "keygen" command this folder came up in use
  • 415.
    WHAT IS SSH (Basically) SECURESHELL COMMUNICATION PROTOCOL(LIKE HTTP ,HTTPS,FTP ETC) DO JUST ANYTHING ON THE REMOTE COMPUTER TRAFFIC IS ENCRYPTED MOSTLY USED IN TERMINAL /COMMAND LINE PRIMARY ADVANTAGE -> SESSION IS ENCRYPTED IF ANYONE WHO MIGHT BE WAITING AT ANY POINT B/W U AND REMOTE HOST WILL SEE ONLY UNREADABLE TEXT
  • 416.
    TELNET (BASIC) For TCP /IP networks like the Internet, Telnet is a terminal emulation program. The software Telnet runs on your system and links your Personal Computer to a network server. The fact that Telnet converts all data into plain text is considered vulnerable. This means if a user sniffs a network, you can record your username and password during transmission. Telnet allows a user to remotely access an account or computer. A consumer, for example, can telnet to a website host computer to remotely control their files.
  • 417.
    REMOTE LOGIN USINGTELNET  When a user wants to access an application program or utility located on a remote machine, he or she performs remote login. Here the TELNET client and server programs come into use, the user sends the keystrokes to the terminal driver. ii. Where the local operating system accepts the characters but does not interpret them. iii. The characters are sent to the TELNET client, which transforms the characters to a universal iv. Character set called Network Virtual Terminal (NVT) characters and delivers them to the local TCP/IP stack (
  • 418.
    REMOTE LOGIN USINGTELNET(Cont.)  v. The commands or text, in NVT form, travel through the Internet and arrive at the TCP/IP stack at the remote machine.  vi. Here the characters are delivered to the operating system and passed to the TELNET server, which changes the characters to the corresponding characters understandable by the remote computer.  vii. However, the characters cannot be passed directly to the operating system because the remote operating system is not designed to receive characters from a TELNET server:  viii. It is designed to receive characters from a terminal driver.  ix. The solution is to add a piece of software called a pseudo terminal driver, which pretends that the characters are coming from a terminal.  x. The operating system then passes the characters to the appropriate application program.
  • 419.
    SSH SSH stands for 'SecureShell' and it first appeared in the mid 90's as a sort of replacement for/way of connecting to a remote machine over the internet. Up until that time the technologies you had to connect to a remote machine, Telnet, rlogin, RSH and so on, worked fine But they transmitted all the data in the clear over the network. So if you logged into a remote machine Anyone with a packet sniffer between you and the remote machine could see everything you were doing on there. When these protocols first appeared that wasn't a problem because the machines were probably only networked within their computer department of a university or a company so the people that had access to do that were people who worked there and probably the system administrators who had access to these things. Anyway, but as the machines got networked to other networks and you started to build the internet, if you had access to the network any network that the data was travelling over you could sniff the packets. And see any of the data that was being transmitted, including passwords and
  • 420.
  • 421.
    Tatu Ylonen  In1995, Tatu Ylonen in Finland was concerned about the privacy of data  So he developed a protocol SSH 'Secure Shell' to sort of encrypt the data so that you couldn't sort of see how/what was being sent over the wire
  • 422.
  • 423.
    MAJOR ADVANTAGE OF USINGSSH OVER OTHER PROTOCOLS You could see that data was being transmitted across and.. You could see how much data and .. You could see the frequency of it to a certain extent .. But you couldn't see what the data was, so you could do certain types of analysis to see what's happening, but you couldn't see the actual data.
  • 424.
    WORKING OF SSH SoSSH was developed as a way of encrypting the connection between two machines But it actually does a lot more than that, because when you SSH to another machine the first thing that happens is that you open up a TCP connection between those two machines like any standard things. Although it doesn't have to be a TCP connection. You can actually specify that SSH uses any sort of reliable network connection to make that, so you could theoretically run it over an RS-232 connection. You could run it over the top of web sockets and things like that. So you've got a reliable transport between the two machines and so SSH is sending data over there. and what SSH does is it breaks the data down into a series of packets.
  • 425.
    PACKET OF SSH At top we have 4 byte of packet length  Another bytes for padding  Then the data which is payload  Another small amount of padding just random bits to force encryption to sort of make it harder to detect whats going on  After that a message authentication code so that we can know that our data hasn't been monkied around  We can also apply a compression if we want
  • 426.
    ENCRYPTING THE PACKET Packetlength is unencrypted because we need to know how much data is coming. Encrypt the padding length. Encrypt the payload. Encrypt the padding. Then send the packet out over the network.  At the other end, that's decrypted by the server, and it then knows it's got the packet of data.
  • 427.
    CLIENT/SERVER COMMUNICATION SSH IS THECLIENT SSHD IS THE SERVER(OPEN SSH DAEMON) THE SERVER MUST HAVE SSHD INSTALLED AND RUNNING OR U WILL NOT BE ABLE TO CONNECT SSH
  • 428.
    AUTHENTICATION METHODS FOR EXAMPLE :-I want to connect to 192.168.1.129 $SSH MUDIT@192.168.1.29 PASSWORD PUBLIC/PRIVATE KEY PAIR HOST BASED
  • 429.
    GENERATING KEYS >ssh- keygen ~/.ssh/id_rsa( PrivateKey) 01 ~/.ssh/id_rsa.pu b(Public Key) 02 Public key goes into server "authorized_keys" file 03
  • 430.
    WHat ABOUT WINDOWS??? WIndows10 now support native SSH 1 Putty is used in older versions of Windows 2 Git Bash & terminal programs include the ssh command & other Unix tools 3
  • 431.
  • 432.
    Need of electronicmail 1. Reliability and Security? 2. Speed? 3. Leverage? 4. Environment Friendly? 5. Forwarding?
  • 433.
    History  1965: MITdeveloped a program called “MAILBOX”  1969: the US Department of Defense implemented ARPANET (Advanced Research Projects Agency Network)  1971: Ray Tomlinson invented and developed electronic mail, as we know it today In fig. First message sent via ARPANET
  • 434.
    What is ElectronicMail? ● Method of exchanging messages ("mail") between people using electronic devices. ● Today's email systems are based on a store-and-forward model. ● Email servers accept, forward, deliver, and store messages ● Neither the users nor their computers are required to be online simultaneously ● E-mail systems consist of two subsystems. They are:- ○ User Agents, which allow people to read and send e-mail ○ Message Transfer Agents, which move messages from source to destination
  • 435.
    Architecture  First Scenario: The sender and the receiver of the e-mail are users (or application programs) on the same system.  Need only two user agents
  • 436.
     Second Scenario: The sender and the receiver of the e-mail are users (or application programs) on two different systems  When the sender and the receiver of an e-mail are on different systems, we need two VAs and a pair of MTAs (client and server).
  • 437.
     Third Scenario: When the sender is connected to the mail server via a LAN or a WAN  We need two VAs and two paIrs of MTAs (clIent and server).
  • 438.
     Fourth Scenario: When both sender and receiver are connected to the mail server via a LAN or a WAN  We need two VAs, two pairs of MTAs (client and server), and a pair of MAAs (client and server)
  • 439.
    Points to consider Receiver cannot bypass the mail server and use the MTA server directly.  Receiver needs another pair of client/server programs: message access programs.  Because an MTA client/server program is a push program: the client pushes the message to the server  Receiver here needs a pull program. The client needs to pull the message from the server.
  • 440.
    User Agent  Itprovides service to the user to make the process of sending and receiving a message easier.  User Agent types:  Command-Driven: pine and elm  GUI-Based: Gmail, Outlook
  • 441.
    Format of Mail Envelope  Message  Header  Body
  • 442.
    Addresses  To delivermail, a mail handling system must use an addressing system with unique addresses  The address consists of two parts:  Local Part  Domain Name  Example: xyz@domainname.com
  • 443.
    Multipurpose Internet MailExtensions (MIME)  Electronic mail can send messages only in NVT 7-bit ASCII format  Cannot support all languages and media.  MIME transforms non-ASCII data at the sender site to NVT ASCII data and delivers them to the client MTA to be sent through the Internet. The message at the receiving side is transformed back to the original data.  MIME defines five headers that can be added to the original e-mail header section to define the transformation parameters:  1. MIME-Version  2. Content-Type  3. Content-Transfer-Encoding  4. Content-Id  5. Content-Description
  • 444.
  • 445.
    E-mail Protocols  E-mailProtocols are set of rules that help the client to properly transmit the information to or from the mail server.  Protocols that we will discuss:  SMTP (Simple Mail Transfer Protocol)  POP (Post Office Protocol)  IMAP (Internet Mail Access Protocol)
  • 446.
    Simple Mail TransferProtocol (SMTP)  SMTP is an application layer protocol  It is a push protocol and is used to send the mail  The client who wants to send the mail opens a TCP connection to the SMTP server  SMTP server is always on listening mode.  After successfully establishing the TCP connection the client process sends the mail instantly.  The formal protocol that defines the MTA client and server in the Internet is called the Simple Mail Transfer Protocol (SMTP)  The standard port for SMTP is 25
  • 447.
    Concept of SMTP The user agent (UA) prepares the message, creates the envelope and then puts the message in the envelope.  The mail transfer agent (MTA) transfers this mail across the internet.  Instead of just having one MTA at sending side and one at receiving side, more MTAs can be added
  • 448.
    Commands and Responses SMTP uses commands and responses to transfer messages between an MTA client and an MTA server  Each command or reply is terminated by a two-character end-of-line token  Commands: Commands are sent from the client to the server. It consists of a keyword followed by zero or more arguments.  Responses: Responses are sent from the server to the client. A response is a three digit code that may be followed by additional textual information.
  • 449.
  • 450.
    SMTP Responses All SMTPresponse status codes are separated into five classes  1xx (Informational): The request was received, continuing process  2xx (Successful): The request was successfully received, understood, and accepted  3xx (Redirection): Further action needs to be taken in order to complete the request  4xx (Client Error): The request contains bad syntax or cannot be fulfilled  5xx (Server Error): The server failed to fulfill an apparently valid request
  • 451.
  • 452.
    Mail Transfer Phases Occursin three phases:  connection establishment,  mail transfer,  and connection termination.
  • 453.
  • 454.
    Post Office Protocol(POP)  Post Office Protocol version 3 (POP3) is a message access protocol that enables the client to fetch an e-mail from the remote mail server.  It is a pull protocol; the client must pull messages from the server.  The direction of the bulk data is from the server to the client.  The client POP3 software is installed on the recipient computer; the server POP3 software is installed on the mail server.  History:  1984: POP1  1985: POP2  1988: POP3
  • 455.
    Points to remember POP3 begins when user starts the mail reader.  The mail reader calls up the ISP (or mail server) and establishes a TCP connection with the message transfer agent at port 110.  Once the connection has been established, the POP3 protocol goes through three states in sequence  1. Authorization  2. Transactions  3. Update  The user can then list and retrieve the mail messages, one by one.  POP3 has two modes:  the delete mode  and the keep mode
  • 456.
    Advantages and Disadvantages ➔Advantages:  Useful for receiving emails on one single device  Doesn’t require an internet connection for accessing the downloaded mails ➔ Disadvantages:  Limited to downloading messages and keeping a copy on server  Not possible to access the same email from multiple devices  Does not allow the user to organize one’s mail on the server  POP3 does not allow the user to partially check the contents of the mail before downloading
  • 457.
    Internet Message AccessProtocol (IMAP)  Standard email protocol that stores email messages on a mail server  Allows the end user to view and manipulate the messages as though they were stored locally on the end user's computing device(s).  While POP3 can be thought of as a "store-and-forward" service, IMAP can be thought of as a remote file server.  There exist five versions of IMAP as follows:  Original IMAP  IMAP2  IMAP3  IMAP2bis  IMAP4  The well-known port address for IMAP is 143.
  • 458.
    Features IMAP IMAP4 providesthe following extra functions:  A user can check the e-mail header prior to downloading.  A user can search the contents of the e-mail for a specific string of characters prior to downloading.  A user can partially download e-mail. This is especially useful if bandwidth is limited and the e-mail contains multimedia with high bandwidth requirements.  A user can create, delete, or rename mailboxes on the mail server.  A user can create a hierarchy of mailboxes in a folder for e-mail storage.
  • 459.
  • 461.
    References  Data Communicationsand Networking By Behrouz A. Forouzan  https://www.tutorialspoint.com/internet_technologies/e_mail_protocols.htm  https://www.geeksforgeeks.org/differences-between-pop3-and-imap/  https://www.geeksforgeeks.org/simple-mail-transfer-protocol-smtp/
  • 462.
  • 463.
    Bluetooth  The namewas adopted because Bluetooth wireless technology is expected to unify the telecommunications and computing industries.  The name ‘Bluetooth’ was named after 10th century Viking king in Denmark Harald Bluetooth who united and controlled Denmark and Norway. What’s With the Name?
  • 464.
    HISTORY  In 1994,the L. M. Ericsson company became interested in connecting its mobile phonestootherdevices(e.g.,laptops)withoutcables.  Together with four other companies (IBM, Intel, Nokia, and Toshiba)in 1998 they developed a wireless standard for interconnectingcomputing  Thefirstversioni.e.bluetooth 1.0wasreleasedin1999 using
  • 465.
    INTRODUCTION: ● It isa Wireless Personal Area Network (WPAN) technology and is usedforexchangingdataoversmallerdistances ● It operates in the unlicensed, industrial, scientific and medical (ISM) bandat2.4GHzto2.485GHz. ● Bluetooth ranges upto 10 meters. It provides data rates upto 1 Mbps or 3Mbpsdependingupontheversion
  • 466.
    ARCHITECTURE The architecture ofbluetooth defines two types of networks: 1.Piconet 2.Scatternet M-master S-slave
  • 467.
     An arcitectureof bluetooth is calledPICONET.  It offerstechnologybywhichtransmission occursbasedonits nodesi.e.  master nodeandslavenode  Themasternodeisanodefromwhichdataisbeingsentandthesave nodeisa nodewhichrecievesit.  Master-node ->information -> Slave-node (possible) Slave-node ->information -> Slave-node (not possible)  PICONETconsistof1primary(master)nodeand7secondary(slave) nodes.So themaximum number ofnodesinPICONETare8. PICONET
  • 468.
     There arefive phases of Simple Pairing:  · Phase 1: Public key exchange  · Phase 2: Authentication Stage 1  · Phase 3: Authentication Stage 2  · Phase 4: Link key calculation  · Phase 5: LMP Authentication and Encryption  Phases 1, 3, 4 and 5 are the same for all protocols whereas phase 2 (Authentication Stage 1) is different depending on the protocol used. Security Protocol Security Protocol
  • 469.
     Has beenset aside by the ISM( industrial ,sientific and medical ) for exclusive use of Bluetooth wireless products. Security Protocol Bluetooth Frequency  Communicates on the 2.45 GHz frequency.
  • 470.
  • 472.
    SCATTERNET  It isformedbycombinationofPICONETs SlaveinonePICONETcanact asaMasterinotherPICONET  Such node receives information and acts as a slave node in the first PICONET and deliver this message to other devices and will act as master tothat PICONET.  Thisnodeiscalledbridge-nodeorstation.  AstationcannotbeamasterinbothPICONETs
  • 473.
    Ad-HOC  is anetwork connection method which is most often associated with wireless devices.  The connection is established for the duration of one session and requires no base station.  Instead, devices discover others within range to form a network for those computers.  Devices may search for target nodes that are out of range by flooding the network with broadcasts that are forwarded by each node.  Connections are possible over multiple nodes (multihop ad hoc network).  Routing protocols then provide stable connections even if nodes are moving around
  • 474.
  • 475.
    ● Radio (RF)layer: It performs modulation/demodulation of the data into RF signals. It defines the physical characteristics of bluetooth transceiver. It defines two types of physical link: connection-less and connection- oriented. ● Baseband Linklayer:  It performs the connection establishment within apiconet. ● Link Manager protocollayer:  It performs the management of the already established links. It also includes authenticationand encryption processes.
  • 476.
    ● LogicalLinkControl andAdaptionprotocollayer: It is also known as the heart of the bluetooth protocol stack. It allows the communication between upper and lower layers ofthe bluetooth protocol stack. It packages the data packets received from upper layers into the form expected by lowerlayers.Italsoperforms thesegmentationandmultiplexing. ● SDPlayer:  It is short for Service Discovery Protocol. It allows to discover the services availableonanotherbluetoothenableddevice. ● RF commlayer:  It is short for Radio Frontend Component. It provides serial interface with WAP an OBEX.
  • 477.
    ● OBEX:  shortfor Object Exchange. It is a communication protocol to exchange objects between 2devices. ● WAP:  It isshortfor WirelessAccessProtocol. It isusedfor internetaccess. ● TCS:  Itisshort forTelephonyControl Protocol. Itprovidestelephonyservice. ● Applicationlayer:  It enablestheusertointeract withtheapplication.
  • 478.
    Ways By WhichBluetooth Technology Makes Wireless Connections Reliable  Channels that are noisy and busy are dynamically tracked and avoidedwhichlowersthechancesofcollision.  When trying to avoid collisions, it’s best to be small and fast. For example, when compared to other low–power wireless mesh networking technologies, Bluetooth packets are typically half the size and four times faster.  Having small, fast packets enables more efficient use of spectrum and significantly lowers the probability of collisions or we can say bluetooth packetsarehard to hit.
  • 479.
    Advantages  Low cost. Easy to use.  It can also penetrate through walls.  It creates an adhoc connection immediately without any wires.  It is used for voice and data transfer.
  • 480.
    Disadvantages  It canbehackedandhence,less secure.  It hasslowdata transfer rate:3Mbps.  It has small range:10meters.
  • 481.
    BIBLIOGRAPHY  https://www.bluetooth.com/blog/2-ways-bluetooth-technology-ma kes-wireless- connections-reliable/ https://www.geeksforgeeks.org/bluetooth/  https://www.youtube.com/watch?v=FWJddwcpYw8  Computer networks-Tanenbaum,Wetherall
  • 482.
  • 483.
    Overview  What isFirewall?  Why do we have need of Firewall?  What are the types of Firewall?  Packet Filtering Firewall  Application-level Firewall (Proxy)  Differences between Firewall and Antivirus  Conclusion
  • 484.
    A short introductionto Firewall!!
  • 485.
    What is Firewall? Monitoring and Control Incoming and Outgoing traffic based on pre-defined rules.  Acts like a barrier  Host based Firewall (Which is based in our local machine/computer) and Network based Firewall (Hardware Based).
  • 486.
    Why do wehave need of Firewall?  A Firewall Protects Your Computer From Unauthorized Remote Access  Firewalls Can Block Messages Linking to Unwanted Content  Firewalls Make Online Gaming Safer  You Can Block Unsuitable or Immoral Content With a Firewall  Firewalls Can Be Hardware or Software
  • 487.
    What are thetype so Firewall?  Packet filtering firewall  Circuit-level gateway  Stateful inspection firewall  Application-level gateway (aka proxy firewall)  Next-generation firewall (NGFW)
  • 488.
    Packet Filtering Firewall (Layer-4) CheckIP Header & TCP Header Works on Network and Transport Layer Can block IP address & Full network. Can block a service (http, ftp, etc.)
  • 489.
    Application-level Firewall (Proxy) Monitors Control Incoming and Outgoing  Traffic based on pre-defined rules.  Acts like a barrier.  Host based and Network based Firewall.  Application (Proxy Firewall) Layer-5
  • 490.
    Differences between Firewalland Antivirus ● Firewall  Firewall is implemented in both hardware and software.  Firewall deals with external threats only.  In firewall counter attacks are possible such as IP Spoofing and routing attacks.  Firewall works on monitoring and filtering.  Firewall checks the threat from incoming packets. ● Antivirus  Antivirus is implemented in software only.  Antivirus deals with both external threats and internal threats.  In antivirus no counter attacks are possible after removing the malware.  Antivirus works on Scanning of infected files and software.  Antivirus checks the threat from malicious software.
  • 491.
    Conclusion  One ofthe best things about a firewall from a security standpoint is that it stops anyone on the outside from logging onto a computer in your private network.  While this is a big deal for businesses, most home networks will probably not be threatened in this manner. Still, putting a firewall in place provides some peace of mind.
  • 492.
    References  Gate Smashers:https://www.youtube.com/channel/UCJihyK0A38SZ6SdJirEdIOw  Google Search Engine: https://www.google.com  Types of firewall and possible attacks: https://www.geeksforgeeks.org/types-of-firewall-and-possible- attacks/  Introduction of Firewall in Computer Network: https://www.geeksforgeeks.org/introduction-of- firewall-in-computer- network/  Firewall methodologies: https://www.geeksforgeeks.org/firewall-methodologies/  Difference between Firewall and Antivirus: https://www.geeksforgeeks.org/difference-between- firewall-and-antivirus/  H. Abie, CORBA Firewall Security: Increasing the Security of CORBA Applications, January 2000.  F. M. Avolio, Firewalls: Are We Asking Too Much?, http://www.crossnodes.com/icsa/perimeter.html  D. B. Chapman and E. D. Zwicky, Building Internet Firewalls, O'Reilly & Associates, Inc., November 1995.  D. Newman, Super Firewalls, Data Communications, Lab Tests, May 21, 1999, http://www.data.com/ FORE Systems, Firewall Switching Agent White Paper, October 1998.
  • 493.