You are on page 1of 126

MAHARANA PRATAP GROUP OF INSTITUTIONS

KOTHI MANDHANA, KANPUR


(Approved by AICTE, New Delhi and Affiliated to Dr.AKTU, Lucknow)

Digital Notes

[Department of Computer Application]


Subject Name : Computer Network
Subject Code : KCA-303
Course : MCA
Branch :
Semester : III
Prepared by : Mr. Ayush Gupta

Reference No./MCA/Ayush/KCA-303/2/3

Page |1
INDEX
Unit-1
1.1 Data Communication
1.1.1 Component of Data Communication
1.2 Computer Network
1.2.1Local Area Network
1.2.2 Metropolitan Area Network
1.2.3 Wide Area Network
1.3 Topology
1.3.1 Mesh Topology
1.3.2 Star Topology
1.3.3 Bus Topology
1.3.4 Ring Topology
1.3.5 Hybrid Topology
1.4 Transmission mode or channel
1.4.1 Simplex Channel
1.4.2 Half Duplex Channel
1.4.3 Full Duplex Channel
1.5 Network Standards
1.5.1 Standards Organizations
1.6 OSI Model
1.6.1 Physical Layer
1.6.1.1 Bit synchronization
1.6.1.2 Bit rate control
1.6.2 Data-Link Layer
1.6.2.1 Framing
1.6.2.2 Physical addressing
1.6.3 Network Layer
1.6.3.1 Routing
1.6.4 Transport Layer
1.6.4.1 Segmentation and Reassembly
1.6.4.2 Port Addressing

Page |2
1.6.5 Session Layer
1.6.5.1 Synchronization
1.6.5.2 Dialog Controller
1.6.6 Presentation Layer
1.6.6.1 Translation
1.6.6.2 Encryption/ Decryption
1.6.7 Application Layer
1.6.7.1 Mail services
1.7 TCP/IP Model
1.7.1Network Access Layer
1.7.2 Internet Layer
1.7.3 Transport Layer
1.7.4 Application Layer
1.8 Difference between TCP/IP and OSI Model
1.9 Transmission Media
1.9.1 Types of transmission media
1.9.1.1 Guided Media
1.9.1.2 Unguided Media
1.10 Network Connecting Devices

Unit-2
2.1 Error Detection
2.1.1 Error detection Methods
2.1.1.1 Single Parity Check
2.1.1.2 Checksum
2.1.1.3 Cyclic Redundancy Check
2.2 Error Correction
2.2.1 Hamming Code
2.3 Flow Control
2.2.1 Stop and Wait ARQ
2.2.2 Go back N ARQ Protocol
2.2.3 Selective Repeat ARQ Protocol

Page |3
2.3 Multiple Access Protocol
2.3.1 Random Access Protocol
2.3.1.1 Aloha
2.3.1.2 CSMA
2.3.1.2 Controlled Access Protocol

2.3.1.3 Channel Allocation Protocols

Unit-3
3.1 Switching
3.1.1 Switching Techniques
3.1.1.1 Circuit Switching
3.1.1.2 Message Switching
3.1.1.3 Packet Switching
3.1.2 Difference between Circuit Switching and Packet Switching
3.2 IP Address
3.2.1 Private IP addresses
3.2.2 Public IP addresses
3.2.3 Classful Addressing
3.2.4 Subnetting
3.2.5 Difference b/w IPv4 and IPv6
3.2 ARP
3.3 RARP
3.4 BOOTP
3.5 DHCP
3.6 Routing algorithm

3.6.1 Adaptive Routing algorithm


3.6.2 Non-Adaptive Routing algorithm
3.6.3 Inter-Domain Routing
3.6.4 Intra-Domain Routing
3.6.4.1 RIP Protocol
3.6.4.2 OSPF

Page |4
Unit-4
4.1 INTRODUCTION
4.2 PROCESS-TO-PROCESS DELIVERY
4.3 Transport Layer Protocols
4.3.1 UDP
4.3.2 TCP
4.3.2.1 TCP Retransmission
4.3.2.2 TCP Connection Termination
4.3.2.3 Three Way Handshake
4.3.2.4 TCP Congestion Control
4.3.2.5 TCP Congestion Policy
4.3.3 SCTP
4.4 Congestion Control
4.4.1 Open Loop Congestion Control
4.4.2 Closed Loop Congestion Control
4.5 Quality of Service (QoS)

4.5.1 Techniques to Improve QoS


4.5.1.1 Scheduling
4.5.1.2 Traffic Shaping
4.5.1.3 Resource Reservation
4.5.1.4 Admission Control

Unit-5
5.1 Cryptography
5.1.1 SECURITY SERVICES
5.1.2 Encryption/Decryption

Page |5
5.1.3 Secret Key Encryption/Decryption technique
5.1.4 Symmetric Key Cryptography
5.1.1.1 Data Encryption Standard (DES)
5.1.5 Public Key Encryption/Decryption technique
5.1.5.1 RSA encryption algorithm

5.2 Application Layer Protocol

5.2.1 DNS

5.2.2 FTP

5.2.3 SMTP

5.2.4 SNMP

5.2.5 HTTP

References:
1. Behrouz Forouzan, “Data Communication and Networking”, McGraw Hill.
2. Andrew Tanenbaum “Computer Networks”, Prentice Hall.
3. Behrouz Forouzan, “TCP/IP Protocol Suite”, McGraw Hill.

Page |6
Unit-1
Data Communication
When we communicate, we are sharing information. This sharing can be local or remote.
• Local communication occurs face to face communication example -talking individual
people.
• Remote communication takes place over distance example -Telephone, Television,
Telegraph etc.
The word telecommunication means communication at a distance.
Tele is the Greek word meaning “far”.
“Data Communication is the exchange of data between two devices via some form of
transmission medium such as a wire cable.”
The communicating devices must be part of communication system made up of a combination
of hardware and software.

Characteristics -
The characteristics of data communication are delivery, Accuracy and timeliness.
• Delivery
The system must deliver data to the correct destination. Data must be received by the
intended or user.
• Accuracy
The system must deliver the data accurately. Data that have been altered in transmission
and left uncorrected are unusable.
• Timeliness
The system must deliver data in a timely manner. Data delivered late are useless.

Component of Data Communication:


A data communication system has five components.

• Message
The message is the information (data) to be communicated. It can consist of text,
number, picture, sound or video or any combination of these.
• Sender
The sender is the device that sends the message. It can be a computer, workstation,
telephone handset, television and so on.
• Receiver
The receiver is the device that receives the message. It can be a computer,
workstation, telephone handset, television and so on.

Page |7
• Medium
The transmission medium is the physical path by which a message travels from sender
to receiver. It could be a twisted-pair wire, coaxial cable, fiberoptic cable or radio wave.

• Protocol
A protocol is a set of rules that governs data communication. It represents an agreement
between the communicating devices.
Without a protocol, two devices may be connected but not communicating, just as a
person speaking French cannot be understood by a person who speaks only Japanese.

A typical example of a data communication system is sending an e-mail. The user which send
email act as sender, message is data which user wants to send, receive is one whom user wants
to send message, there are many protocols involved in this entire process, one of them is Simple
Mail Transfer Protocol (SMTP), both sender and receiver must have an internet connection
which uses a wireless medium to send and receive email.

Computer Network:

A computer network is a group of computers linked to each other that enables the computer to
communicate with another computer and share their resources, data, and applications.

A computer network can be categorized by their size. A computer network is mainly of three
types:

1. LAN (Local Area Network): covers the smallest area.


2. MAN (Metropolitan Area Network): covers an area larger than LAN.
3. WAN (Wide Area Network): comprises the largest of all.

Local Area Network -


▪ Local Area Network is a group of computers connected to each other in a small area
such as building, office.

Page |8
▪ LAN is used for connecting two or more personal computers through a communication
medium such as twisted pair, coaxial cable, etc.
▪ It is less costly as it is built with inexpensive hardware such as hubs, network adapters,
and Ethernet cables.
▪ The data is transferred at an extremely faster rate in Local Area Network.
▪ Local Area Network provides higher security.

Metropolitan Area Network -


▪ A metropolitan area network is a network that covers a larger geographic area by
interconnecting a different LAN to form a larger network.
▪ Government agencies use MAN to connect to the citizens and private industries.
▪ In MAN, various LANs are connected to each other through a telephone exchange line.
▪ The most widely used protocols in MAN are RS-232, Frame Relay, ATM, ISDN, OC-
3, ADSL, etc.
▪ It has a higher range than Local Area Network (LAN).

Uses of Metropolitan Area Network -


• MAN is used in communication between the banks in a city.
• It can be used in an Airline Reservation.
• It can be used in a college within a city.

Page |9
• It can also be used for communication in the military.

Wide Area Network -


• A Wide Area Network is a network that extends over a large geographical area such
as states or countries.
• A Wide Area Network is quite bigger network than the LAN.
• A Wide Area Network is not limited to a single location, but it spans over a large
geographical area through a telephone line, fibre optic cable or satellite links.

• The internet is one of the biggest WAN in the world.


• A Wide Area Network is widely used in the field of Business, government, and
education.

Examples of wide area network are mobile broadband and private network.

Advantages of Wide Area Network -There are following advantages of the Wide

P a g e | 10
Area Network:

1. Geographical area
2. Centralized data
3. Get updated files
4. Exchange messages
5. Sharing of software and resources
6. Global business
7. High bandwidth

Disadvantages of Wide Area Network -There are following disadvantages of the Wide Area
Network:

• Security issue
• Needs Firewall & antivirus software
• High Setup cost
• Troubleshooting problems

Internetwork -An internetwork is defined as two or more computer network LANs or WAN
or computer network segments are connected using devices, and they are configured by a local
addressing scheme. This process is known as internetworking.

• An internetworking uses the internet protocol.


• The reference model used for internetworking is OSI.

Types of Internetwork -

Extranet: An extranet is a communication network based on the internet protocol such


as TCP/IP. It is used for information sharing. The access to the extranet is restricted to only
those users who have login credentials.
An extranet cannot have a single LAN; at least it must have one connection to the external
network.

Intranet: An intranet is a private network based on the internet protocol such as TCP/IP. An
intranet belongs to an organization which is only accessible by the organization’s employee.

Topology: Topology defines the structure of the network of how all the components are
interconnected to each other. There are two types of topology: physical and logical topology.

P a g e | 11
Physical Topology -Physical topology is the geometric representation of all the nodes in
a network.

Types of Network Topology:


1. Mesh
2. Star
3. Bus
4. Ring
5. Tree
6. Hybrid

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.
• The Internet is an example of the mesh topology.
• Number of ports required by each device is n-1.
• Number of cable required by full mesh topology is :
Number of cables = (n*(n-1))/2;

Where n is the number of devices that represents the network.

Mesh topology is divided into two categories -

P a g e | 12
• Fully connected mesh topology
• Partially connected mesh topology

Full Mesh Topology: In a full mesh topology, each computer is connected to all the computers
available in the network.

Partial Mesh Topology: In a partial mesh topology, not all but certain computers are
connected to those computers with which they communicate frequently.

Advantage–

• It is robust.
• Fault is diagnosed easily. Data is reliable because data is transferred among the devices
through dedicated channels or links.
• Provides security and privacy.

Disadvantage–

• Installation and configuration is difficult.


• Cost of cables is high as bulk wiring is required, hence suitable for less number of
devices.
• Cost of maintenance is high.

Star Topology:
• Star topology is an arrangement of the network in which every node is connected to the
central hub, switch or a central computer.
• The central computer is known as a server, and the peripheral devices attached to the
server are known as clients.
• Hubs or Switches are mainly used as connection devices in a physical star topology.
• Number of cables required by star topology is n.
• Number of ports required by each device is 1.
• Hub is multiport devices.

P a g e | 13
Where n is the number of devices that represents the network.

Advantages –
• It is less expensive than mesh topology.
• It is easy to setup.

Disadvantages –
• Cost of installation is high.
• If the Hub gets damage whole transmission stop.

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

P a g e | 14
Advantage -

• It is cost effective.
• Cable required is least compared to other network topology.
• Used in small networks.
• It is easy to understand.
• Easy to expand joining two cables together.

Disadvantage -

• Cables fails then whole network fails.


• If network traffic is heavy or nodes are more the performance of the network decreases.
• Cable has a limited length.
• It is slower than the ring topology.

Ring Topology:
• Ring topology is like a bus topology, but with connected ends.
• The node that receives the message from the previous computer will retransmit to the
next node.
• The data flows in one direction, i.e., it is unidirectional.
• It has no terminated ends, i.e., each node is connected to other node and having no
termination point.
• The data in a ring topology flow in a clockwise direction.

Advantage -

P a g e | 15
▪ The possibility of collision is minimum in this type of topology.
▪ Cheap to install and expand.

Disadvantage -

▪ Troubleshooting is difficult in this topology.


▪ Addition of stations in between or removal of stations can disturb the whole topology.

Tree Topology:
• Tree topology combines the characteristics of bus topology and star topology.

• A tree topology is a type of structure in which all the computers are connected with
each other in hierarchical fashion.

• The top-most node in tree topology is known as a root node, and all other nodes are the
descendants of the root node.

• There is only one path exists between two nodes for the data transmission. Thus, it
forms a parent-child hierarchy.

Advantage -

• Extension of bus and star topologies.


• Expansion of nodes is possible and easy.
• Easily managed and maintained.
• Error detection is easily done.

Disadvantage -

• Heavily cabled.
• Costly.
• If more nodes are added maintenance is difficult.

P a g e | 16
• Central hub fails, network fails.

Hybrid Topology:
• The combination of various different topologies is known as Hybrid topology.

• A Hybrid topology is a connection between different links and nodes to transfer the
data.

• When two or more different topologies are combined together is termed as Hybrid
topology and if similar topologies are connected with each other will not result in
Hybrid topology.

Advantage -

• Reliable as Error detecting and trouble shooting is easy.


• Effective.
• Scalable as size can be increased easily.
• Flexible.

Disadvantage -
• Complex in design.
• Costly.

Transmission mode or channel:

P a g e | 17
Transmission mode refers to the mechanism of transferring of data between two devices
connected over a network. It is also called Communication Mode.

• Simplex channel
• Half duplex channel
• Full duplex channel
Simplex Channel
-
• A simplex communication channel can send the signals only in one direction.
• Thus, entire bandwidth of the channel can be used during the transmission.
Example –

• Radio station is a good example of a simplex communication channel.


• A radio station always sends signals to its audience.
• It never receives signals from the audience.

Half Duplex Channel-


• A half duplex communication channel can send signals in both the directions but in
only one direction at a time.
• It may be considered as a simplex communication channel whose transmission
direction can be switched.

Example-

• Walkie-Talkie is a good example of a half duplex channel.


• Walkie-talkie has a push-to-talk button.
• This button is used to turn on the transmitter but turn off the receiver.

P a g e | 18
• When the button is pressed, transmitter cannot hear the receiver but receiver can hear
the transmitter.

Full Duplex Channel-


• A full duplex communication channel can send signals in both the directions at the same
time.
• Full duplex communication channels greatly increases the efficiency of
communication.

Example-

• Telephone is a good example of a full duplex channel.


• Both the persons can speak as well as hear each other at the same time.

Network Standards:
Networking standards define the rules for data communications that are needed for
interoperability of networking technologies and processes. Standards help in creating and
maintaining open markets.
Types of Standards -Standards are of two types -

• De facto − These are the standards that are followed without any formal plan or
approval by any organization. They have come into existence due to traditions or facts.
For example, the HTTP had started as a de facto standard.
• De jure − These standards are the ones which have been adopted through legislation
by any officially recognized standards organization. Most of the communication
standards that are used today are de jure standards.

Standards Organizations:
Some of the standards organizations are
• International Standards Organization (ISO)

P a g e | 19
• International Telecommunication Union (ITU)
• Institute of Electronics and Electrical Engineers (IEEE)
• American National Standards Institute (ANSI)
• Internet Research Task Force (IETF)
• Electronic Industries Association (EIA)

International Standard Organization (ISO) -


ISO is the international organization for standardization on a wide range of subjects. It is
comprised mainly of members from the standards committee of various governments
throughout the world. It is even responsible for developing models which provides high level
of system compatibility, quality enhancement, improved productivity and reduced costs. The
ISO is also responsible for endorsing and coordinating the work of the other standards
organizations.

International Telecommunications Union-Telecommunication Sector (ITU-T)


ITU-T is one of the four permanent parts of the International Telecommunications Union based
in Geneva, Switzerland. It has developed three sets of specifications: the V series for modem
interfacing and data transmission over telephone lines, the X series for data transmission over
public digital networks, email and directory services; the I and Q series for Integrated Services
Digital Network (ISDN) and its extension Broadband ISDN. ITU-T membership consists of
government authorities and representatives from many countries and it is the present standards
organization for the United.

Institute of Electrical and Electronics Engineers (IEEE)


IEEE is an international professional organization founded in United States and is
compromised of electronics, computer and communications engineers. It is currently the
world’s largest professional society with over 200,000 members. It develops communication
and information processing standards with the underlying goal of advancing theory, creativity,
and product quality in any field related to electrical engineering.

American National Standards Institute (ANSI)


ANSI is the official standards agency for the United States and is the U.S voting representative
for the ISO. ANSI is a completely private, non-profit organization comprised of equipment
manufacturers and users of data processing equipment and services. ANSI membership is
comprised of people form professional societies, industry associations, governmental and
regulatory bodies, and consumer goods.
Internet Engineering Task Force (IETF)
The IETF is a large international community of network designers, operators, vendors and
researchers concerned with the evolution of the Internet architecture and smooth operation of
the Internet.

P a g e | 20
Electronics Industry Association (EIA)
EIA is a non-profit U.S. trade association that establishes and recommends industrial standards.
EIA activities include standards development, increasing public awareness, and lobbying and
it is responsible for developing the RS (recommended standard) series of standards for data
and communications.

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.
• OSI consists of seven layers, and each layer performs a particular network function.
• OSI model divides the whole task into seven smaller and manageable tasks. Each layer
is assigned a particular task.
• Each layer is self-contained, so that task assigned to each layer can be performed
independently.

P a g e | 21
The physical layer, data link layer and the network layer are the network support layers. Session
layer, presentation layer, and application layer are the user support layers. Transport layer links
the two groups.

There are the seven OSI layers. Each layer has different functions. Lists of seven layers are
given below:

1. Physical Layer

2. Data-Link Layer

3. Network Layer

4. Transport Layer

5. Session Layer

6. Presentation Layer

7. Application Layer

Physical Layer-It is responsible for transmitting individual bits from one node to the next
node over a physical medium.

P a g e | 22
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.
• Signals: It determines the type of the signal used for transmitting the information.
• Topology: It defines the way how network devices are arranged.

Data-Link Layer – This layer is responsible for transmitting frames from one node to the
next node.

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.
The data link layer translates the physical's raw bit stream into packets known as Frames.
• 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 two or more devices are connected to the same communication
channel, then the data link layer protocols are used to determine which device has control over
the link at a given time.

Network Layer – This layer is responsible for delivery packets from original source to
final destination.

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 known as logical addressing.

Transport Layer – This layer is responsible delivery of entire message from source host to
destination host.

The functions of the transport layer are:

P a g e | 23
• Segmentation and Reassembly: This layer accepts the message from the (session)
layer, breaks the message into smaller units. Each of the segments produced has a
header associated with it. The transport layer at the destination station reassembles the
message.
• Port 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.

Session Layer -It establishes sessions between users and offers services like dialog control
and synchronization.

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.

• Dialog Controller: The session layer allows two systems to start communication with each
other in half-duplex or full-duplex.
• Synchronization: Session adds checkpoints when transmitting the data in a sequence.
If some error occurs in the middle of the transmission of data, then the transmission
will take place again from the checkpoint. This process is known as Synchronization.

Presentation Layer -This layer was designed to handle the syntax and semantics of the
information exchanged between the two systems. It was designed for data translation,
encryption, decryption and compression.

The functions of the presentation layer are:


• Translation: The processes in two systems exchange the information in the form of
character strings, numbers and so on. 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– This layer is responsible for providing services to the user.
Such services are electronic mail, remote file access and transfer, access to the World Wide
Web.
The functions of the application layer are:

P a g e | 24
• File transfer, access, and management: An application layer allows a user to access
the files in a remote computer, to retrieve the files from a computer and to manage the
files in a remote computer.
• Mail services: An application layer provides the facility for email forwarding and
storage.

P a g e | 25
TCP/IP Model:

It 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.TCP/IP is a
suite of communication protocols used to interconnect network devices on the internet.

TCP/IP model is a concise version of the OSI model. It contains four layers, unlike seven
layers in the OSI model. The layers are:

• Process/Application Layer
• Host-to-Host/Transport Layer
• Internet Layer
• Network Access/Link Layer

Network Access Layer


• A network layer is the lowest layer of the TCP/IP model.
• A network layer is the combination of the Physical layer and Data Link layer defined
in the OSI reference model.
• It defines how the data should be sent physically through the network.
• The protocols used by this layer are Ethernet, token ring, FDDI, X.25, frame relay.

P a g e | 26
Internet Layer

• An internet layer is the second layer of the TCP/IP model.


• An internet layer is also known as the network layer.
• The main responsibility of the internet layer is to send the packets from any network, and they
arrive at the destination.
• The protocols used by this layer are IP, ARP, ICMP, IGMP, and RARP.

Transport Layer
• The transport layer is responsible for the reliability, flow control, and correction of data
which is being sent over the network.

• It divides the message received from the session layer into segments and numbers them
to make a sequence.
• Transport layer makes sure that the message is delivered to the correct process on the
destination machine.
• It also makes sure that the entire message arrives without any error else it should be
retransmitted.
• The protocols used by this layer are UDP, TCP.

Application Layer
• An application layer is the topmost layer in the TCP/IP model.
• 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.
• The protocols used by this layer are HTTP, SNMP, SMTP, DNS, and FTP.

P a g e | 27
Difference between TCP/IP and OSI Model:

OSI Model TCP/IP Model

1.OSI refers to Open Systems Interconnection 1.TCP/IP refers to Transmission Control


Protocol /Internet Protocol.

2. OSI has 7 layers. 2. TCP/IP has 4 layers.

3. OSI is less reliable. 3. TCP/IP is more reliable.

4. OSI follow vertical approach. 4. TCP/IP follow horizontal approach.

5. In network layer TCP/IP only provides 5. In network layer OSI provides both
connection less service. connection oriented and connection less
service.
6. In Transport layer TCP/IP provides both 6. In Transport layer OSI only provides
connection oriented and connection less connection oriented service.
service.
7. In OSI session and presentation layer are 7. In TCP/IP both session and presentation
different layer. layer are application layer itself.

8.In OSI transport layer guarantees the 8.In TCP/IP transport layer does not
delivery of packets guarantees delivery of packets

Transmission Media
Transmission medium is a physical path between the transmitter and the receiver i.e it is the
channel through which data is sent from one place to another.
Transmission media is a communication channel that carries the information from the sender
to the receiver. Data is transmitted through the electromagnetic signals.
The electrical signals can be sent through the copper wire, fibre optics, atmosphere, water, and
vacuum.

P a g e | 28
Types of transmission media: Transmission media are of two types −

• Guided Transmission Media


• Unguided Transmission Media

Guided Media

It is defined as the physical medium through which the signals are transmitted i.e. data travels
through cabling system that has a fixed path. It is also called as Bounded media or wired media.

Types of Guided media: There are 3 major types of Guided Media:

• Twisted Pair Cable


• Coaxial Cable
• Optical Fibre Cable

Twisted Pair Cable

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.5 KHz.

P a g e | 29
Unshielded Twisted Pair:

An unshielded twisted pair is widely used in telecommunication. Unshielded Twisted Pair


(UTP) consists of four pairs of thin, copper wires covered in color-coded plastic insulation that
are twisted together. The wire pairs are then covered with a plastic outer jacket. UTP cables
are of small diameter and it doesn’t need grounding. The connector used on a UTP cable is
called as RJ-45

Advantage:
• It is cheap.
• Installation of the unshielded twisted pair is easy.
• It can be used for high-speed LAN.
Disadvantage:
• This cable can only be used for shorter distances because of attenuation.

Shielded Twisted Pair:

A shielded twisted pair is a cable that contains the mesh surrounding the wire that allows the
higher transmission rate.
Advantage:
• An installation of STP is easy.
• It has higher capacity as compared to unshielded twisted pair cable.
• It has a higher attenuation.
• It is shielded that provides the higher data transmission rate.
Disadvantage:
• It is more expensive as compared to UTP and coaxial cable.
• It has a higher attenuation rate.

Difference between Unshielded Twisted Pair (UTP) and Shielded Twisted Pair (STP)

UTP STP

1. UTP stands for Unshielded twisted pair. 1. STP stands for Shielded twisted pair.

2. Data rate in UTP is slow compared to STP. 2. Data rate in STP is high.

P a g e | 30
3. The cost of UTP is less. 3. STP is costlier than UTP.

4. In UTP noise is high compared to STP. 4. In STP noise is less.

5. In UTP, attenuation is high in comparison to 5. In STP attenuation is low.


STP.
6. Less maintenance is required. 6. More maintenance is required.

Coaxial Cable
• Coaxial cable is very commonly used transmission media, for example, TV wire is
usually a coaxial cable.
• The name of the cable is coaxial as it contains two conductors parallel to each other.
• It has a higher frequency as compared to twisted pair cable.
• The inner conductor of the coaxial cable is made up of copper, and the outer
conductor is made up of copper mesh. The middle core is made up of non-
conductive cover that separates the inner conductor from the outer conductor.
• The middle core is responsible for the data transferring whereas the copper mesh
prevents from the EMI (Electromagnetic interference).

Coaxial cables are of two types:


1. Baseband transmission: It is defined as the process of transmitting a single signal at
high speed.
2. Broadband transmission: It is defined as the process of transmitting multiple signals
simultaneously.

Advantage:

P a g e | 31
• The data can be transmitted at high speed.
• It has better shielding as compared to twisted pair cable.
• It provides higher bandwidth.
Disadvantage:
• 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 provides faster data transmission than copper wires.

Advantages:

• Increased capacity and bandwidth


• Light weight
• Less signal attenuation

Disadvantages:

• Difficult to install and maintain


• High cost

Unguided Media

An unguided transmission transmits the electromagnetic waves without using any


physical medium i.e. data travels through free space in form of electromagnetic signal.
Therefore it is also known as wireless transmission.

P a g e | 32
Unguided signals can travel in three ways −

• Ground propagation
• Sky propagation
• Line – of – sight propagation

There are 3 major types of Unguided Media:

Radio wave

• Radio waves are the electromagnetic waves that are transmitted in all the directions
of free space.
• Radio waves are omnidirectional, i.e., the signals are propagated in all the
directions.
• The range in frequencies of radio waves is from 3 KHz to 1 kHz.
• An example of the radio wave is FM radio.

P a g e | 33
Microwave

• Microwaves are the electromagnetic waves having the frequency in the range from
1GHz to 1000 GHz.
• Microwaves are unidirectional as the sending and receiving antenna is to be aligned.
• It works on the line of sight transmission.

Infrared

• An infrared transmission is a wireless technology used for communication over


short ranges.
• The frequency of the infrared in the range from 300 GHz to 400 THz.
• It is used for short-range communication such as data transfer between two cell
phones, TV remote operation, data transfer between computers.

Network Connecting Devices:


Internetworking two or more networks from a single network is called internetworking.
Internetworking hardware are the devices used to connect two or more network from a single
network. Thus internetworking hardware includes all computers, peripherals, and other

P a g e | 34
equipment needed to perform all possible processing and data communication in between the
inter network. These connecting devices are:

Hub

A Hub is a hardware device that divides the network connection among multiple devices.
When computer requests for some information from a network, it first sends the request to the
Hub through cable. Hub will broadcast this request to the entire network. All the devices will
check whether the request belongs to them or not. If not, the request will be dropped.

The process used by the Hub consumes more bandwidth and limits the amount of
communication.

Switch

A switch is a hardware device that connects multiple devices on a computer network. A


Switch contains more advanced features than Hub. The Switch contains the updated table that
decides where the data is transmitted or not. Switch delivers the message to the correct
destination based on the physical address present in the incoming message. A Switch does
not broadcast the message to the entire network like the Hub. It determines the device to
whom the message is to be transmitted. Therefore, we can say that switch provides a direct
connection between the source and destination. It increases the speed of the network.

Router
• A router is a hardware device which is used to connect a LAN with an internet
connection. It is used to receive, analyze and forward the incoming packets to
another network.
• A router works in a Layer 3 (Network layer) of the OSI Reference model.

P a g e | 35
• A router forwards the packet based on the information available in the routing
table.
• It determines the best path from the available paths for the transmission of the
packet.

Bridge

A Bridge in the computer network is used to unite two or more network segments. The main
function of a bridge in network architecture is to store as well as transmit frames among the
various segments. Bridges use MAC (Media Access Control) hardware for transferring frames.

These are also used for connecting two physical local area networks to a larger logical local
area network. In the OSI model, bridges work at the data link & physical layers to divide the
networks from larger to smaller by controlling the data flow between the two.

Modem
• A modem is a hardware device that allows the computer to connect to the internet
over the existing telephone line.
• A modem is not integrated with the motherboard rather than it is installed on the
PCI slot found on the motherboard.
• It stands for Modulator/Demodulator. It converts the digital data into an analog
signal over the telephone lines.

P a g e | 36
Repeater

The operating of a repeater can be done at the physical layer. The main function of this device
is to reproduce the signal on a similar network before the signal gets weak otherwise damaged.
The significant point to be noted regarding these devices is that they do not strengthen the
signal. Whenever the signal gets weak, then they reproduce it at the actual strength. A repeater
is a two-port device.

Gateway

A gateway is a node or a device that servers as an entrance to another network. The gateway
routes the traffic from a workstation to the outside network that is in the network or in the
websites. The gateway is used to connect the users to the internet. The gateway also acts as a
firewall in the network.

P a g e | 37
Wired LAN
A wired network uses cables to connect devices, such as laptop or desktop computers, to the
Internet or another network. A wired network has some disadvantages when compared to a
wireless network. The biggest disadvantage is that your device is tethered to a router. The
most common wired networks use cables connected at one end to an Ethernet port on the
network router and at the other end to a computer or other device.
“An electronic circuit or hardware grouping in which the configuration is determined by the
physical interconnection of the components”

Wireless LAN
Wireless LAN ƒ Communications that take place without the use of interconnecting wires
or cables, such as by radio, microwave, or infrared light ƒ Wireless networks can be installed:
o Peer-to-peer “Ad hoc” mode—wireless devices can communicate with each other o
"Infrastructure" mode—allows wireless devices to communicate with a central node that can
communicate with wired nodes on that LAN

Benefits -
• Convenience: Access your network resources from any location within your wireless
network's coverage area or from any Wi-Fi hotspot.
• Mobility: You're not tied to your desk, as you are with a wired connection. You and
your employees can go online in conference room meetings, for example.

P a g e | 38
• Productivity: Wireless access to the Internet and to your company's key applications
and resources helps your staff get the job done and encourages collaboration.
• Easy setup: You don't have to string cables, so installation can be quick and cost
effective.
• Expandability: You can easily expand wireless networks with existing equipment,
whereas a wired network might require additional wiring.
• Security: Advances in wireless networks provide robust security protections.
• Reduced cost: Because wireless networks eliminate or reduce wiring expenses, they
can cost less to operate than wired networks.

Unit-2
Error Detection

When sender transmits data to the receiver, the data might get scrambled by noise or data might
get corrupted during the transmission.
Error detection is a technique that is used to check if any error occurred in the data during the
transmission.

Error detection Methods

P a g e | 39
1. Single Parity Check
2. Cyclic Redundancy Check (CRC)
3. Checksum

Single Parity Check-


In this technique,
• One extra bit called as parity bit is sent along with the original data bits.
• Parity bit helps to check if any error occurred in the data during the transmission.
• Total number of 1’s in the data unit to be transmitted is counted.
• The total number of 1’s in the data unit is made even in case of even parity.
• The total number of 1’s in the data unit is made odd in case of odd parity.
• This is done by adding an extra bit called as parity bit.

Advantage-

• This technique is guaranteed to detect an odd number of bit errors (one, three, five
and so on).

Disadvantage-
• This technique cannot detect an even number of bit errors (two, four, six and so on).

Vertical Redundancy Check -:

Vertical redundancy check is maintenance of parity bit. An additional bit is added with
original block to ensure that data transmitted correctly. It is also known as parity check
technique.
In VRC there are two types of parity bit “Even parity bit” and “Odd parity bit“.

P a g e | 40
Example Even Parity Bit:

Consider data” 1 1 0 0 0 0 1” if we passed this data to Even parity generator.


1. Count the number of 1’s which are 3 so ODD ( 1 1 0 0 0 0 1 ).
2. Now add bit 1 as parity bit so numbers will become ( 1 1 0 0 0 0 1 1).
3. Again count the number we alter the data now number of 1’s are 4 so even.

Two-Dimensional Parity Check (LRC)


• Performance can be improved by using Two-Dimensional Parity Check which
organizes the data in the form of a table.
• Parity check bits are computed for each row, which is equivalent to the single-parity
check.
• In Two-Dimensional Parity check, a block of bits is divided into rows, and the
redundant row of bits is added to the whole block.
• At the receiving end, the parity bits are compared with the parity bits computed from
the received data.

P a g e | 41
Checksum
Error detection using checksum method involves the following steps-
Step-01:
At sender side,
• If m bit checksum is used, the data unit to be transmitted is divided into segments of m
bits.
• All the m bit segments are added.
• The result of the sum is then complemented using 1’s complement arithmetic.
• The value so obtained is called as checksum.
Step-02:
• The data along with the checksum value is transmitted to the receiver.
Step-03:
At receiver side,
• If m bit checksum is being used, the received data unit is divided into segments of m
bits.
• All the m bit segments are added along with the checksum value.
• The value so obtained is complemented and the result is checked.

Then, following two cases are possible-


Case-01:
If the result is zero,
• Receiver assumes that no error occurred in the data during the transmission.
• Receiver accepts the data.

Case-02:
If the result is non-zero,
• Receiver assumes that error occurred in the data during the transmission.
• Receiver discards the data and asks the sender for retransmission.

Example-

Consider the data unit to be transmitted is-


10011001111000100010010010000100
Consider 8 bit checksum is used.

P a g e | 42
Step-01:
At sender side,
The given data unit is divided into segments of 8 bits as-

Now, all the segments are added and the result is obtained as-
• 10011001 + 11100010 + 00100100 + 10000100 = 1000100011
• Since the result consists of 10 bits, so extra 2 bits are wrapped around.
• 00100011 + 10 = 00100101 (8 bits)
• Now, 1’s complement is taken which is 11011010.
• Thus, checksum value = 11011010

Step-02:
• The data along with the checksum value is transmitted to the receiver.

Step-03:
At receiver side,
• The received data unit is divided into segments of 8 bits.
• All the segments along with the checksum value are added.
• Sum of all segments + Checksum value = 00100101 + 11011010 = 11111111
• Complemented value = 00000000
• Since the result is 0, receiver assumes no error occurred in the data and therefore
accepts it.

Cyclic Redundancy Check-


• Cyclic Redundancy Check (CRC) is an error detection method.
• It is based on binary division.

CRC Generator-
• CRC generator is an algebraic polynomial represented as a bit pattern.

P a g e | 43
• Bit pattern is obtained from the CRC generator using the following rule-

The power of each term gives the position of the bit and the coefficient gives the value of the
bit.
Example-

Consider the CRC generator is x7 + x6 + x4 + x3 + x + 1.


The corresponding binary pattern is obtained as-

Then given CRC generator, the corresponding binary pattern is 11011011.

Properties of CRC Generator-

The algebraic polynomial chosen as a CRC generator should have at least the following
properties-

Rule-01:

• It should not be divisible by x.


• This condition guarantees that all the burst errors of length equal to the length of
polynomial are detected.

Rule-02:

• It should be divisible by x+1.


• This condition guarantees that all the burst errors affecting an odd number of bits are
detected.

P a g e | 44
Important Notes-

If the CRC generator is chosen according to the above rules, then-


• CRC can detect all single-bit errors
• CRC can detect all double-bit errors provided the divisor contains at least three logic
1’s.
• CRC can detect any odd number of errors provided the divisor is a factor of x+1.
• CRC can detect all burst error of length less than the degree of the polynomial.
• CRC can detect most of the larger burst errors with a high probability.

Step 1: Calculation of CRC at sender side-

• A string of n 0’s is appended to the data unit to be transmitted.


• Here, n is one less than the number of bits in CRC generator.
• Binary division is performed of the resultant string with the CRC generator.
• After division, the remainder so obtained is called as CRC.
• It may be noted that CRC also consists of n bits.

Step 2: Transmission to Receiver-

• The newly formed code word (Original data + CRC) is transmitted to the receiver.

Step3: Checking at Receiver Side-

At receiver side,
• The transmitted code word is received.
• The received code word is divided with the same CRC generator.
• On division, the remainder so obtained is checked.

The following two cases are possible-

Case-01: Remainder = 0

If the remainder is zero,


• Receiver assumes that no error occurred in the data during the transmission.

P a g e | 45
• Receiver accepts the data.

Case-02: Remainder ≠ 0

If the remainder is non-zero,


• Receiver assumes that some error occurred in the data during the transmission.
• Receiver rejects the data and asks the sender for retransmission.

Problem-01:

A bit stream 1101011011 is transmitted using the standard CRC method. The generator
polynomial is x4+x+1. What is the actual bit string transmitted?

Solution-

• The generator polynomial G(x) = x4 + x + 1 is encoded as 10011.


• Clearly, the generator polynomial consists of 5 bits.

P a g e | 46
• So, a string of 4 zeroes is appended to the bit stream to be transmitted.
• The resulting bit stream is 11010110110000.

Now, the binary division is performed as-

Here, CRC = 1110.

Now,
• The code word to be transmitted is obtained by replacing the last 4 zeroes of
11010110110000 with the CRC.
• Thus, the code word transmitted to the receiver = 11010110111110.

P a g e | 47
Error Correction

Error Correction codes are used to detect and correct the errors when data is transmitted from
the sender to the receiver.

Error Correction can be handled in two ways:

• Backward error correction: Once the error is discovered, the receiver requests the
sender to retransmit the entire data unit.
• Forward error correction: In this case, the receiver uses the error-correcting code
which automatically corrects the errors.

A single additional bit can detect the error, but cannot correct it.

Suppose r is the number of redundant bits and d is the total number of the data bits. The number
of redundant bits r can be calculated by using the formula:

2r>=d+r+1

The value of r is calculated by using the above formula. For example, if the value of d is 4,
then the possible smallest value that satisfies the above relation would be 3.

To determine the position of the bit which is in error, a technique developed by R.W Hamming
is Hamming code.

Hamming Code

Parity bits: The bit which is appended to the original data of binary bits so that the total
number of 1s is even or odd.

Even parity: To check for even parity, if the total number of 1s is even, then the value of the
parity bit is 0. If the total number of 1s occurrences is odd, then the value of the parity bit is
1.

Odd Parity: To check for odd parity, if the total number of 1s is even, then the value of
parity bit is 1. If the total number of 1s is odd, then the value of parity bit is 0.

Algorithm of Hamming code:


• An information of 'd' bits are added to the redundant bits 'r' to form d+r.
• The location of each of the (d+r) digits is assigned a decimal value.
• The 'r' bits are placed in the positions 1,2,.....2k-1.
• At the receiving end, the parity bits are recalculated. The decimal value of the
parity bits determines the position of an error.

P a g e | 48
Relationship b/w Error position & binary number

Let's understand the concept of Hamming code through an example:

Suppose the original data is 1010 which is to be sent.

Total number of data bits ’d’ = 4


Number of redundant bits r: 2r >= d+r+1
2r>= 4+r+1
Therefore, the value of r is 3 that satisfy the above relation.
Total number of bits = d+r = 4+3 = 7;
Determining the position of the redundant bits

The number of redundant bits is 3. The three bits are represented by r1, r2, r4. The position of
the redundant bits is calculated with corresponds to the raised power of 2. Therefore, their
corresponding positions are 1, 21, 22.

1. The position of r1 = 1
2. The position of r2 = 2
3. The position of r4 = 4

Representation of Data on the addition of parity bits:

Determining the Parity bits


Determining the r1 bit

The r1 bit is calculated by performing a parity check on the bit positions whose binary
representation includes 1 in the first position.

P a g e | 49
We observe from the above figure that the bit positions that include 1 in the first position are
1, 3, 5, 7. Now, we perform the even-parity check at these bit positions. The total number of 1
at these bit positions corresponding to r1 is even, therefore, the value of the r1 bit is 0.

Determining r2 bit

The r2 bit is calculated by performing a parity check on the bit positions whose binary
representation includes 1 in the second position.

We observe from the above figure that the bit positions that include 1 in the second position
are 2, 3, 6, 7. Now, we perform the even-parity check at these bit positions. The total number
of 1 at these bit positions corresponding to r2 is odd; therefore, the value of the r2 bit is 1.

Determining r4 bit

The r4 bit is calculated by performing a parity check on the bit positions whose binary
representation includes 1 in the third position.

P a g e | 50
We observe from the above figure that the bit positions that include 1 in the third position
are 4, 5, 6, 7. Now, we perform the even-parity check at these bit positions. The total number
of 1 at these bit positions corresponding to r4 is even, therefore, the value of the r4 bit is 0.

Data transferred is given below:

Suppose the 4th bit is changed from 0 to 1 at the receiving end, then parity bits are recalculated.

R1 bit

The bit positions of the r1 bit are 1,3,5,7

We observe from the above figure that the binary representation of r1 is 1100. Now, we
perform the even-parity check, the total number of 1s appearing in the r1 bit is an even
number. Therefore, the value of r1 is 0.

R2 bit

The bit positions of r2 bit are 2,3,6,7.

We observe from the above figure that the binary representation of r2 is 1001. Now, we
perform the even-parity check, the total number of 1s appearing in the r2 bit is an even
number. Therefore, the value of r2 is 0.

P a g e | 51
R4 bit

The bit positions of r4 bit are 4,5,6,7.

We observe from the above figure that the binary representation of r4 is 1011. Now, we
perform the even-parity check, the total number of 1s appearing in the r4 bit is an odd
number. Therefore, the value of r4 is 1.

The binary representation of redundant bits, i.e., r4r2r1 is 100, and its corresponding decimal
value is 4. Therefore, the error occurs in a 4th bit position. The bit value must be changed
from 1 to 0 to correct the error.

Flow Control-

Flow control tells the sender how much data should be sent to the receiver so that it is not
lost. This mechanism makes the sender wait for an acknowledgment before sending the next
data. Flow control restricts the number of frames the sender can send before it waits for an
acknowledgment from the receiver.

There are two ways to control the flow of data:

1. Stop and Wait Protocol


2. Sliding Window Protocol

P a g e | 52
Stop and Wait Protocol-

Stop and Wait Protocol is the simplest flow control protocol.It works under the following
conditions-
• Communication channel is perfect.
• No error occurs during transmission.

Working- The working of a stop and wait protocol are as follows-


• Sender sends a data packet to the receiver.
• Sender stops and waits for the acknowledgement for the sent packet from the receiver.
• Receiver receives and processes the data packet.
• Receiver sends an acknowledgement to the sender.
• After receiving the acknowledgement, sender sends the next data packet to the receiver.

Advantages-
The advantages of stop and wait protocol are-
• It is very simple to implement.
• The incoming packet from receiver is always an acknowledgement.

Disadvantages-
The disadvantages of stop and wait protocol are-
1. It is extremely inefficient because-
• It makes the transmission process extremely slow.

P a g e | 53
2. If the data packet sent by the sender gets lost, then-
• Sender will keep waiting for the acknowledgement for infinite time.

Stop and Wait ARQ-


Stop and Wait ARQ assumes-
• The communication channel is noisy.
• Errors may get introduced in the data during the transmission.

Stop and wait ARQ is a one bit sliding window protocol where-
• Sender window size = 1
• Receiver window size = 1

1. Lost Data Packet-

• Time out timer helps to solve the problem of lost data packet.
• After sending a data packet to the receiver, sender starts the time out timer.
• If the data packet gets acknowledged before the timer expires, sender stops the time out
timer.
• If the timer goes off before receiving the acknowledgement, sender retransmits the same
data packet.
• After retransmission, sender resets the timer.
• This prevents the occurrence of deadlock.

2. Lost Acknowledgement-

• Sequence number on data packets help to solve the problem of delayed


acknowledgement.
• Consider the acknowledgement sent by the receiver gets lost.
• Then, sender retransmits the same data packet after its timer goes off.

P a g e | 54
• This prevents the occurrence of deadlock.
• The sequence number on the data packet helps the receiver to identify the duplicate data
packet.
• Receiver discards the duplicate packet and re-sends the same acknowledgement.

3. Delayed Acknowledgement-
• Sequence number on acknowledgements help to solve the problem of delayed
acknowledgement.

P a g e | 55
4. Damaged Packet-
• If receiver receives a corrupted data packet from the sender, it sends a negative
acknowledgement (NAK) to the sender.
• NAK requests the sender to send the data packet again.

Advantages-
• Stop and Wait ARQ support half duplex.
• Only one packet or frame can be sent at a time.
Disadvantages-
• There is no pipelining, channel utilization is very low.

Sliding Window Protocol-

• Sliding window protocol is a flow control protocol.


• It allows the sender to send multiple frames before needing the acknowledgements.
• Sender slides its window on receiving the acknowledgements for the sent frames.
• This allows the sender to send more frames.

Maximum number of frames that sender can send without acknowledgement = Sender window
size.
A window is a buffer where we store the frames. Each frame in a window is numbered. If
the window size is n then the frames are numbered from the number 0 to n-1.

P a g e | 56
Suppose the size of the window is 4. So, the frames would be numbered as
0,1,2,3,0,1,2,3,0,… so on.

Advantages –
• It performs much better than stop-and-wait flow control.
• This method increases efficiency.
• Multiples frames can be sent one after another.

Disadvantages-
• The main issue is complexity at the sender and receiver due to the transferring of
multiple frames.
• The receiver might receive data frames or packets out the sequence.

Go back N ARQ Protocol-

• In Go back N, sender window size is N and receiver window size is always 1.


• Go back N uses cumulative acknowledgements.
• Go back N may use independent acknowledgements
• Go back N does not accept the corrupted frames and silently discards them.
• Go back N does not accept out of order frames and silently discards them.
• Go back N leads to retransmission of entire window if for any frame, no ACK is
received by the sender.
• Go back N leads to retransmission of lost frames after expiry of time out timer.

Selective Repeat ARQ Protocol-

• In SR protocol, sender window size is always same as receiver window size.


Sender window size = Receiver window size = 2n/2 = 2n-1
• SR protocol uses independent acknowledgements only.
• SR protocol does not accept the corrupted frames but does not silently discard them.

P a g e | 57
• SR protocol accepts the out of order frames.
• SR protocol requires sorting at the receiver’s side.
• SR protocol requires searching at the sender’s side.
• SR protocol leads to retransmission of lost frames after expiry of time out timer.

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 transmit 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 -

All the station has the equal priority to send the data over a channel. In random access
protocol, one or more stations cannot depend on another station nor any station control
another station. Depending on the channel's state (idle or busy), each station transmits the
data frame.
If more than one station sends the data over a channel, there may be a collision or data
conflict. Due to the collision, the data frame packets may be lost or changed.
There are the different methods of random-access protocols such as-

P a g e | 58
• Aloha
• CSMA
• CSMA/CD
• CSMA/CA

Aloha

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

1. Any station can transmit data to a channel at any time.


2. It does not require any carrier sensing.
3. Collision and data frames may be lost during the transmission of data through multiple
stations.
4. Acknowledgment of the frames exists in Aloha. Hence, there is no collision detection.
5. It requires retransmission of data after some random amount of time.

Pure Aloha
In pure Aloha, when each station transmits data to a channel without checking whether the
channel is idle or not, the chances of collision may occur, and the data frame can be lost.
When any station transmits the data frame to a channel, the pure Aloha waits for the
receiver's acknowledgment. If it does not acknowledge the receiver end within the specified
time, the station waits for a random amount of time, called the backoff time (Tb).

1. The total vulnerable time of pure Aloha is 2 * Tfr.


2. Maximum throughput occurs when G = 1/ 2 that is 18.4%.
3. Successful transmission of data frame is S = G * e ^ - 2 G.

P a g e | 59
Slotted Aloha

In slotted Aloha, the shared channel is divided into a fixed time interval called slots. So that, if
a station wants to send a frame to a shared channel, the frame can only be sent at the beginning
of the slot, and only one frame is allowed to be sent to each slot. And if the stations are unable
to send data to the beginning of the slot, the station will have to wait until the beginning of the
slot for the next time. However, the possibility of a collision remains when trying to send a
frame at the beginning of two or more station time slot.

1. Maximum throughput occurs in the slotted Aloha when G = 1 that is 37%.


2. The probability of successfully transmitting the data frame in the slotted Aloha is S =
G * e ^ - 2 G.
3. The total vulnerable time required in slotted Aloha is Tfr.

P a g e | 60
CSMA (Carrier Sense Multiple Access)

It is a carrier sense multiple access based on media access protocol to sense the traffic on a
channel (idle or busy) before transmitting the data. It means that if the channel is idle, the
station can send data to the channel. Otherwise, it must wait until the channel becomes idle.
Hence, it reduces the chances of a collision on a transmission medium.

CSMA Access Modes

1-Persistent: In the 1-Persistent mode of CSMA that defines each node, first sense the shared
channel and if the channel is idle, it immediately sends the data. Else it must wait and keep
track of the status of the channel to be idle and broadcast the frame unconditionally as soon as
the channel is idle.

Non-Persistent: It is the access mode of CSMA that defines before transmitting the data, each
node must sense the channel, and if the channel is inactive, it immediately sends the data.
Otherwise, the station must wait for a random time (not continuously), and when the channel
is found to be idle, it transmits the frames.

P-Persistent: It is the combination of 1-Persistent and Non-persistent modes. The P-Persistent


mode defines that each node senses the channel, and if the channel is inactive, it sends a frame
with a P probability. If the data is not transmitted, it waits for a (q = 1-p probability) random
time and resumes the frame with the next time slot.

O- Persistent: It is an O-persistent method that defines the superiority of the station before the
transmission of the frame on the shared channel. If it is found that the channel is inactive, each
station waits for its turn to retransmit the data.

P a g e | 61
CSMA/ CD

It is a carrier sense multiple access/ collision detection network protocol to transmit data
frames. 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.

Controlled Access Protocol

It is a method of reducing data frame collision on a shared channel. In the controlled access
method, each station interacts and decides to send a data frame by a particular station approved
by all other stations. It means that a single station cannot send the data frames unless all other
stations are not approved. It has three types of controlled access: Reservation, Polling,
and Token Passing.

Channel Allocation Protocols

It is a channelization protocol that allows the total usable bandwidth in a shared channel to be
shared across multiple stations based on their time, distance and codes. It can access all the
stations at the same time to send the data frames to the channel.

Following are the various methods to access the channel based on their time, distance and
codes:

P a g e | 62
FDMA

It is a frequency division multiple access (FDMA) method used to divide the available
bandwidth into equal bands so that multiple users can send data through a different frequency
to the sub channel. Each station is reserved with a particular band to prevent the crosstalk
between the channels and interferences of stations.

TDMA

Time Division Multiple Access (TDMA) is a channel access method. It allows the same
frequency bandwidth to be shared across multiple stations. And to avoid collisions in the shared
channel, it divides the channel into different frequency slots that allocate stations to transmit
the data frames. The same frequency bandwidth into the shared channel by dividing the signal
into various time slots to transmit it. However, TDMA has an overhead of synchronization that
specifies each station's time slot by adding synchronization bits to each slot.

CDMA

Code Division Multiple Access is a channel access method. In CDMA, all stations can
simultaneously send the data over the same channel. It means that it allows each station to
transmit the data frames with full frequency on the shared channel at all times. It does not
require the division of bandwidth on a shared channel based on time slots. If multiple stations
send data to a channel simultaneously, their data frames are separated by a unique code
sequence. Each station has a different unique code for transmitting the data over a shared
channel. For example, there are multiple users in a room that are continuously speaking. Data
is received by the users if only two-person interact with each other using the same language.

P a g e | 63
Unit-3
Switching
The process of moving the data packets towards their destination by forwarding them from one
port to the other port is called as switching.

Switching Techniques-
Various switching techniques are-

1. Circuit Switching
2. Message Switching
3. Packet Switching

Circuit Switching-

This switching technique operates in the following three phases-


1. Establishing a circuit
2. Transferring the data
3. Disconnecting the circuit

Establishing a Circuit-
In this phase,
• A circuit is established between the two ends.
• Circuit provides a dedicated path for data to travel from one to the other end.
• Resources are reserved at intermediate switches which are used during the
transmission.
• The intermediate switches are connected by the physical links.

P a g e | 64
Transferring the Data-
After the circuit is established,
• The entire data travels over the dedicated path from one end to the other end.

Disconnecting the Circuit-

After the data transfer is completed,

• The circuit is disconnected.

Advantages-Circuit switching has the following advantages-

• A well defined and dedicated path exists for the data to travel.
• There is no waiting time at any switch and the data is transmitted without any delay.
• Data always reaches the other end in order.
• No re ordering is required.

Disadvantage- Circuit switching has the following disadvantages-


• The channel is blocked for two ends only.
• It is inefficient in terms of utilization of system resources.
• The time required for establishing the circuit between the two ends is too long.
• Dedicated channels require more bandwidth.
• It is more expensive than other switching techniques.
• Routing decisions cannot be changed once the circuit is established.

P a g e | 65
Message Switching-
In message switching,

• There exists no dedicated path to transfer data.


• The entire message is treated as a single data unit.
• The message is then forwarded from hop to hop.
• Store and Forward is an important characteristic of message switching.
• The message carries a header that contains the full information about the destination.
• When any intermediate switch receives the message, it stores the entire message.
• The message is stored until sufficient resources become available to transfer it to the
next switch.
• When resources become available, the switch forwards the message to the next
switch.

Advantage-
• It is helpful in reducing traffic congestion.
• It is helpful in setting the message priorities due to store and forward technique.

Disadvantage-
• It requires enough storage at every switch to accommodate the entire message during
the transmission.
• It is extremely slow due to store and forward technique.

P a g e | 66
Packet Switching-

In packet switching,
• This process of dividing a single message into smaller size packets is called
as packetization.
• These smaller packets are sent after the other.
• It gives the advantage of pipelining and reduces the total time taken to transmit the
message.

Types of Packet Switching-

Packet switching may be carried out in the following 2 ways-

Virtual Circuit Switching-


Virtual Circuit Switching is also known as connection-oriented switching.
Virtual circuit switching operates in the following three phases-
1. Establishing a circuit
2. Transferring the data
3. Disconnecting the circuit

Establishing a Circuit-

In this phase,
• A logical connection is established between the two ends.
• It provides a dedicated path for data to travel from one to the other end.
• Resources are reserved at intermediate switches which are used during the
transmission.

P a g e | 67
Transferring the Data-

After the connection is established,


• The entire data travels over the dedicated path from one end to the other end.

Disconnecting the Circuit-

After the data transfer is completed,


• The connection is disconnected.
Let's understand the concept of virtual circuit switching through a diagram:

Datagram Switching-

In datagram switching,

P a g e | 68
• It is a packet switching technology in which packet is known as a datagram, is
considered as an independent entity. Each packet contains the information about the
destination and switch uses this information to forward the packet to the correct
destination.

• The packets are reassembled at the receiving end in correct order.

• In Datagram Packet Switching technique, the path is not fixed.

• Intermediate nodes take the routing decisions to forward the packets.

• Datagram Packet Switching is also known as connectionless switching.

Difference between Circuit Switching and Packet Switching

Circuit Switching Packet Switching


1. It is connection oriented. 1. It is connection less.
2. It is initially designed for voice 2. It is initially designed for data
communication transmission
3. It is inflexible, because once a path is 3. It is flexible, because a route is
set all parts of a transmission follows the created for each packet travel to the
same path destination
4. Message is received in the same order 4. Packet of a message are received out
of order
5. Circuit switching is implemented at 5. Packet switching is implemented at
physical layer network layer
6. Circuit switching can be achieved 6. Packet switching can be achieved
through space division switching or time through datagram approach and virtual
division switching circuit approach
7. It is not a store and forward technique 7. It is a store and forward technique
8. Circuit switching is more reliable 8. Packet switching is less reliable
9. There is a dedicated path to 9. There is no dedicated path to
established between the source and the established from the source to the
destination before transfer of data destination

IP Address (Logical Address) –

P a g e | 69
An IP address represents a unique address that distinguishes any device on the internet or any
network from another. IP or Internet Protocol defines the set of commands directing the setup
of data transferred through the internet or any other local network.
An IP address is represented by a series of numbers segregated by periods (.). They are
expressed in the form of four pairs - an example address might be 255.255.255.255 wherein
each set can range from 0 to 255.

Types of IP addresses

Private IP addresses

All the devices that are linked with your internet network are allocated a private IP address. It
holds computers, desktops, laptops, smart phones, tablets, or even Wi-Fi-enabled gadgets such
as speakers, printers, or smart Televisions.

Public IP addresses
A public IP address or primary address represents the whole network of devices associated
with it. Every device included within with your primary address contains their own private IP
address. ISP is responsible to provide your public IP address to your router.

Public IP addresses are further classified into two categories- dynamic and static.

• Dynamic IP addresses
As the name suggests, Dynamic IP addresses change automatically and frequently.
With these types of IP address, ISPs already purchase a bulk stock of IP addresses and
allocate them in some order to their customers. Periodically, they re-allocate the IP
addresses and place the used ones back into the IP addresses pool so they can be used
later for another client. The foundation for this method is to make cost savings profits
for the ISP.
• Static IP addresses
In comparison to dynamic IP addresses, static addresses are constant in nature. The
network assigns the IP address to the device only once and, it remains consistent.
Though most firms or individuals do not prefer to have a static IP address, it is
essential to have a static IP address for an organization that wants to host its network
server. It protects websites and email addresses linked with it with a constant IP
address.

Classful Addressing

An IP address is 32-bit long. An IP address is divided into sub-classes:

• Class A

P a g e | 70
• Class B
• Class C
• Class D
• Class E

An IP address is divided into two parts:

• Network ID: It represents the number of networks.


• Host ID: It represents the number of hosts.

In the above diagram, we observe that each class have a specific range of IP addresses. The
class of IP address is used to determine the number of bits used in a class and number of
networks and hosts available in the class.

Class A

In Class A, an IP address is assigned to those networks that contain a large number of hosts.

• The network ID is 8 bits long.


• The host ID is 24 bits long.

In Class A, the first bit in higher order bits of the first octet is always set to 0 and the remaining
7 bits determine the network ID. The 24 bits determine the host ID in any network.

The total number of networks in Class A = 27 = 128 network address

The total number of hosts in Class A = 224 - 2 = 16,777,214 host address

Class B

In Class B, an IP address is assigned to those networks that range from small-sized to large-
sized networks.

P a g e | 71
• The Network ID is 16 bits long.
• The Host ID is 16 bits long.

In Class B, the higher order bits of the first octet are always set to 10, and the remaining14
bits determine the network ID. The other 16 bits determine the Host ID.

The total number of networks in Class B = 214 = 16384 network address

The total number of hosts in Class B = 216 - 2 = 65534 host address

Class C

In Class C, an IP address is assigned to only small-sized networks.

• The Network ID is 24 bits long.


• The host ID is 8 bits long.

In Class C, the higher order bits of the first octet are always set to 110, and the remaining 21
bits determine the network ID. The 8 bits of the host ID determine the host in a network.

The total number of networks = 221 = 2097152 network address

The total number of hosts = 28 - 2 = 254 host address

Class D

In Class D, an IP address is reserved for multicast addresses. It does not possess subnetting.
The higher order bits of the first octet are always set to 1110, and the remaining bits
determine the host ID in any network.

Class E

In Class E, an IP address is used for the future use or for the research and development
purposes. It does not possess any subnetting. The higher order bits of the first octet are
always set to 1111, and the remaining bits determine the host ID in any network.

P a g e | 72
Rules for assigning Host ID:

The Host ID is used to determine the host within any network. The Host ID is assigned based
on the following rules:

• The Host ID must be unique within any network.


• The Host ID in which all the bits are set to 0 cannot be assigned as it is used to
represent the network ID of the IP address.
• The Host ID in which all the bits are set to 1 cannot be assigned as it is reserved for
the multicast address.

Rules for assigning Network ID:

If the hosts are located within the same local network, then they are assigned with the same
network ID. The following are the rules for assigning Network ID:

• The network ID cannot start with 127 as 127 are used by Class A.
• The Network ID in which all the bits are set to 0 cannot be assigned as it is used to
specify a particular host on the local network.
• The Network ID in which all the bits are set to 1 cannot be assigned as it is reserved for
the multicast address.

Classful Network Architecture

Class Higher NET HOST No.of No.of hosts Range


bits ID bits ID bits networks per
network

A 0 8 24 27 224 0.0.0.0 to
127.255.255.255

B 10 16 16 214 216 128.0.0.0 to


191.255.255.255

C 110 24 8 221 28 192.0.0.0 to


223.255.255.255

P a g e | 73
D 1110 Not Not Not Defined Not Defined 224.0.0.0 to
Defined Defined 239.255.255.255

E 1111 Not Not Not Defined Not Defined 240.0.0.0 to


Defined Defined 255.255.255.255

Subnetting
• The process of dividing a single network into multiple sub networks is called
as subnetting.
• The sub networks so created are called as subnets.

Example-

Following diagram shows the subnetting of a big single network into 4 smaller subnets-

Advantages-

The two main advantages of subnetting a network are-


• It improves the security.
• The maintenance and administration of subnets is easy.

Subnet ID-

• Each subnet has its unique network address known as its Subnet ID.
• The subnet ID is created by borrowing some bits from the Host ID part of the IP
Address.
• The number of bits borrowed depends on the number of subnets created.

Types of Subnetting-

P a g e | 74
Subnetting of a network may be carried out in the following two ways-

1. Fixed Length Subnetting


2. Variable Length Subnetting

1. Fixed Length Subnetting-

Fixed length subnetting also called as classful subnetting divides the network into subnets
where-
• All the subnets are of same size.
• All the subnets have equal number of hosts.
• All the subnets have same subnet mask.

2. Variable Length Subnetting-

Variable length subnetting also called as classless subnetting divides the network into
subnets where-
• All the subnets are not of same size.
• All the subnets do not have equal number of hosts.
• All the subnets do not have same subnet mask.

IPv4 Structure

Internet Protocol being a layer-3 protocol (OSI) takes data Segments from layer-4 (Transport)
and divides it into packets. IP packet encapsulates data unit received from above layer and
add to its own header information.

P a g e | 75
The encapsulated data is referred to as IP Payload. IP header contains all the necessary
information to deliver the packet at the other end.

IP header includes many relevant information including Version Number, which, in this
context, is 4. Other details are as follows −
• Version − Version no. of Internet Protocol used (e.g. IPv4).
• IHL − Internet Header Length; Length of entire IP header.
• DSCP − Differentiated Services Code Point; this is Type of Service.
• ECN − Explicit Congestion Notification; It carries information about the congestion
seen in the route.
• Total Length − Length of entire IP Packet (including IP header and IP Payload).
• Identification − If IP packet is fragmented during the transmission, all the fragments
contain same identification number. to identify original IP packet they belong to.
• Flags − As required by the network resources, if IP Packet is too large to handle,
these ‘flags’ tells if they can be fragmented or not. In this 3-bit flag, the MSB is
always set to ‘0’.
• Fragment Offset − This offset tells the exact position of the fragment in the original
IP Packet.
• Time to Live − To avoid looping in the network, every packet is sent with some TTL
value set, which tells the network how many routers (hops) this packet can cross. At
each hop, its value is decremented by one and when the value reaches zero, the
packet is discarded.

P a g e | 76
• Protocol − Tells the Network layer at the destination host, to which Protocol this
packet belongs to, i.e. the next level Protocol. For example protocol number of ICMP
is 1, TCP is 6 and UDP is 17.
• Header Checksum − This field is used to keep checksum value of entire header
which is then used to check if the packet is received error-free.
• Source Address − 32-bit address of the Sender (or source) of the packet.
• Destination Address − 32-bit address of the Receiver (or destination) of the packet.
• Options − This is optional field, which is used if the value of IHL is greater than 5.
These options may contain values for options such as Security, Record Route, Time
Stamp, etc.

IPv6

All IPv6 addresses are 128-bit hexadecimal addresses, written in 8 separate sections having
each of them have 16 bits. As the IPv6 addresses are represented in a hexadecimal format,
their sections range from 0 to FFFF. Each section is separated by colons (:). It also allows to
removes the starting zeros (0) of each 16-bit section. If two or more consecutive sections 16-
bit contains all zeros (0 : 0), they can be compressed using double colons (::).

IPv6 addresses are consist of 8 different sections, each section has a 16-bit hexadecimal
values separated by colon (:). IPv6 addresses are represented as following format:

xxxx : xxxx : xxxx : xxxx : xxxx : xxxx : xxxx : xxxx

Each "xxxx" group contains a 16-bit hexadecimal value, and each "x" is a 4-bit hexadecimal
value. For example:

FDEC: BA98: 0000: 0000: 0600: BDFF: 0004: FFFF

You can also remove the starting zeros (0) of each 16-bit section. For example, the above
IPv6 can be rewritten by omitting starting zeros (0) as follow:

FDEC: BA98: 0: 0: 600: BDFF: 4: FFFF

You can also compress the consecutive sections 16-bit zeros (0 : 0) using double colons (::).
But keep in mind that you can do it only once per IP address.

FDEC: BA98: : 600 : BDFF : 4 : FFFF

P a g e | 77
IPv6

IPv6 fixed header is 40 bytes long and contains the following information.

S.N. Field & Description

1 Version (4-bits): It represents the version of Internet Protocol, i.e. 0110.

2 Traffic Class (8-bits): These 8 bits are divided into two parts. The most significant 6 bits
are used for Type of Service to let the Router Known what services should be provided
to this packet. The least significant 2 bits are used for Explicit Congestion Notification
(ECN).

3 Flow Label (20-bits): This label is used to maintain the sequential flow of
the packets belonging to a communication. The source labels the sequence to
help the router identify that a particular packet belongs to a specific flow of
information. This field helps avoid re-ordering of data packets. It is designed
for streaming/real-time media.

4 Payload Length (16-bits): This field is used to tell the routers how much
information a particular packet contains in its payload. Payload is composed
of Extension Headers and Upper Layer data. With 16 bits, up to 65535 bytes
can be indicated; but if the Extension Headers contain Hop-by-Hop
Extension Header, then the payload may exceed 65535 bytes and this field is
set to 0.

5 Next Header (8-bits): This field is used to indicate either the type of
Extension Header, or if the Extension Header is not present then it indicates

P a g e | 78
the Upper Layer PDU. The values for the type of Upper Layer PDU are same
as IPv4’s.

6 Hop Limit (8-bits): This field is used to stop packet to loop in the network
infinitely. This is same as TTL in IPv4. The value of Hop Limit field is
decremented by 1 as it passes a link (router/hop). When the field reaches 0
the packet is discarded.

7 Source Address (128-bits): This field indicates the address of originator of


the packet.

8 Destination Address (128-bits): This field provides the address of intended


recipient of the packet.

Difference b/w IPv4 and IPv6

IPv4 IPv6

IPv4 has a 32-bit address length IPv6 has a 128-bit address length

It Supports Manual and DHCP It supports Auto and renumbering address


address configuration configuration

In IPv4 end to end, connection In IPv6 end to end, connection integrity is


integrity is Unachievable Achievable

It can generate 4.29×10 9 address Address space of IPv6 is quite large it can produce
space 3.4×1038 address space

The Security feature is dependent on IPSEC is an inbuilt security feature in the IPv6
application protocol

Address representation of IPv4 is in


decimal Address Representation of IPv6 is in hexadecimal

Fragmentation performed by Sender In IPv6 fragmentation performed only by the


and forwarding routers sender

In IPv4 Packet flow identification is In IPv6 packet flow identification are Available
not available and uses the flow label field in the header

P a g e | 79
IPv4 IPv6

In IPv4 checksum field is available In IPv6 checksum field is not available

ARP
• ARP stands for Address Resolution Protocol.
• It is used to associate an IP address with the MAC address.
• Each device on the network is recognized by the MAC address imprinted on the NIC.
Therefore, we can say that devices need the MAC address for communication on a local
area network. MAC address can be changed easily. For example, if the NIC on a
particular machine fails, the MAC address changes but IP address does not change.
ARP is used to find the MAC address of the node when an internet address is known.

Note: MAC address: The MAC address is used to identify the actual device.
IP address: It is an address used to locate a device on the network.

How ARP works

If the host wants to know the physical address of another host on its network, then it sends an
ARP query packet that includes the IP address and broadcast it over the network. Every host
on the network receives and processes the ARP packet, but only the intended recipient
recognizes the IP address and sends back the physical address. The host holding the datagram
adds the physical address to the cache memory and to the datagram header, then sends back
to the sender.

RARP
• RARP stands for Reverse Address Resolution Protocol.
• If the host wants to know its IP address, then it broadcast the RARP query packet that
contains its physical address to the entire network. A RARP server on the network
recognizes the RARP packet and responds back with the host IP address.

P a g e | 80
• The protocol which is used to obtain the IP address from a server is known as Reverse
Address Resolution Protocol.
• The message format of the RARP protocol is similar to the ARP protocol.
• Like ARP frame, RARP frame is sent from one machine to another encapsulated in the
data portion of a frame.

BOOTP
• Bootstrap Protocol (BOOTP) is a basic protocol that automatically provides each
participant in a network connection with a unique IP address for identification and
authentication as soon as it connects to the network. This helps the server to speed up
data transfers and connection requests.
• BOOTP uses a unique IP address algorithm to provide each system on the network
with a completely different IP address in a fraction of a second.
• This shortens the connection time between the server and the client. It starts the
process of downloading and updating the source code even with very little
information.
• BOOTP uses a combination of DHCP (Dynamic Host Configuration Protocol)
and UDP (User Datagram Protocol) to request and receive requests from various
network-connected participants and to handle their responses.

DHCP

Dynamic Host Configuration Protocol (DHCP) is a network management protocol used to


dynamically assign an IP address to nay device, or node, on a network so they can
communicate using IP (Internet Protocol). DHCP automates and centrally manages these
configurations. There is no need to manually assign IP addresses to new devices. Therefore,
there is no requirement for any user configuration to connect to a DHCP based network.

DHCP can be implemented on local networks as well as large enterprise networks. DHCP is
the default protocol used by the most routers and networking equipment. DHCP is also called
RFC (Request for comments) 2131.

P a g e | 81
DHCP does the following:
• DHCP manages the provision of all the nodes or devices added or dropped from the
network.
• DHCP maintains the unique IP address of the host using a DHCP server.
• It sends a request to the DHCP server whenever a client/node/device, which is
configured to work with DHCP, connects to a network. The server acknowledges by
providing an IP address to the client/node/device.

DHCP is also used to configure the proper subnet mask, default gateway and DNS server
information on the node or device.

There are many versions of DCHP are available for use in IPV4 (Internet Protocol Version 4)
and IPV6 (Internet Protocol Version 6).

How DHCP works

DHCP runs at the application layer of the TCP/IP protocol stack to dynamically assign IP
addresses to DHCP clients/nodes and to allocate TCP/IP configuration information to the
DHCP clients. Information includes subnet mask information, default gateway, IP addresses
and domain name system addresses.

DHCP is based on client-server protocol in which servers manage a pool of unique IP


addresses, as well as information about client configuration parameters, and assign addresses
out of those address pools.

The DHCP lease process works as follows:


• First of all, a client (network device) must be connected to the internet.
• DHCP clients request an IP address. Typically, client broadcasts a query for this
information.
• DHCP server responds to the client request by providing IP server address and other
configuration information. This configuration information also includes time period,
called a lease, for which the allocation is valid.
• When refreshing an assignment, a DHCP clients request the same parameters, but the
DHCP server may assign a new IP address. This is based on the policies set by the
administrator.

Routing algorithm
• In order to transfer the packets from source to the destination, the network layer must
determine the best route through which packets can be transmitted.

P a g e | 82
• Whether the network layer provides datagram service or virtual circuit service, the main
job of the network layer is to provide the best route. The routing protocol provides this
job.
• The routing protocol is a routing algorithm that provides the best path from the source
to the destination. The best path is the path that has the "least-cost path" from source to
the destination.
• Routing is the process of forwarding the packets from source to the destination but the
best route to send the packets is determined by the routing algorithm.

Classification of a Routing algorithm

The Routing algorithm is divided into two categories:

• Adaptive Routing algorithm


• Non-adaptive Routing algorithm

Adaptive Routing algorithm


• An adaptive routing algorithm is also known as dynamic routing algorithm.
• This algorithm makes the routing decisions based on the topology and network traffic.
• The main parameters related to this algorithm are hop count, distance and estimated
transit time.

An adaptive routing algorithm can be classified into three parts:

• Centralized algorithm: It is also known as global routing algorithm as it computes the


least-cost path between source and destination by using complete and global knowledge
about the network. Link state algorithm is referred to as a centralized algorithm since
it is aware of the cost of each link in the network.
• Isolation algorithm: It is an algorithm that obtains the routing information by using
local information rather than gathering information from other nodes.
• Distributed algorithm: It is also known as decentralized algorithm as it computes the
least-cost path between source and destination in an iterative and distributed manner.
A Distance vector algorithm is a decentralized algorithm as it never knows the complete

P a g e | 83
path from source to the destination, instead it knows the direction through which the
packet is to be forwarded along with the least cost path.

Non-Adaptive Routing algorithm


• Non Adaptive routing algorithm is also known as a static routing algorithm.
• When booting up the network, the routing information stores to the routers.
• Non Adaptive routing algorithms do not take the routing decision based on the network
topology or network traffic.

The Non-Adaptive Routing algorithm is of two types:

Flooding: In case of flooding, every incoming packet is sent to all the outgoing links except
the one from it has been reached. The disadvantage of flooding is that node may contain several
copies of a particular packet.

Random walks: In case of random walks, a packet sent by the node to one of its neighbors
randomly. An advantage of using random walks is that it uses the alternative routes very
efficiently.

Inter-Domain Routing
When routing performed between autonomous systems (domains) is known as inter-domain
routing protocol. Example BGP.

Border Gateway Protocol

It is an inter-domain routing protocol, and it uses the path-vector routing. It is a gateway


protocol that is used to exchange routing information among the autonomous system on the
internet. Border Gateway Protocol works on different autonomous systems

P a g e | 84
An autonomous system is a collection of networks that comes under the single common
administrative domain. Or we can say that it is a collection of routers under the single
administrative domain. For example, an organization can contain multiple routers having
different locations, but the single autonomous number system will recognize them.

BGP Features

The following are the features of a BGP protocol:

• Open standard

It is a standard protocol which can run on any window device.

• Exterior Gateway Protocol

It is an exterior gateway protocol that is used to exchange the routing information between two
or more autonomous system numbers.

• InterAS-domain routing

It is specially designed for inter-domain routing, where interAS-domain routing means


exchanging the routing information between two or more autonomous number system.

• Supports internet

It is the only protocol that operates on the internet backbone.

• Classless

It is a classless protocol.

• Path vector protocol

The BGP is a path vector protocol. Path vector is a method of sending the routes along with
routing information.

Intra-Domain Routing
When routing performed within autonomous system (domains) is known as intra-domain
routing protocol. Example RIP and OSPF.

RIP Protocol

RIP stands for Routing Information Protocol. RIP is an intra-domain routing protocol used
within an autonomous system. Here, intra-domain means routing the packets in a defined
domain, for example, web browsing within an institutional area. To understand the RIP
protocol, our main focus is to know the structure of the packet, how many fields it contains,
and how these fields determine the routing table.

P a g e | 85
• RIP is based on the distance vector-based strategy.
• In RIP, infinity is defined as 16, which means that the RIP is useful for smaller networks
or small autonomous systems. The maximum number of hops that RIP can contain is
15 hops, i.e., it should not have more than 15 hops as 16 is infinity.

Distance Vector Routing Algorithm


The Distance vector algorithm is iterative, asynchronous and distributed.

• Distributed: It is distributed in that each node receives information from one or more
of its directly attached neighbours performs calculation and then distributes the result
back to its neighbours.
• Iterative: It is iterative in that its process continues until no more information is
available to be exchanged between neighbours.
• Asynchronous: It does not require that all of its nodes operate in the lock step with
each other.
• The Distance vector algorithm is a dynamic algorithm.
• It is mainly used in ARPANET, and RIP.
• Each router maintains a distance table known as Vector.

Three Keys to understand the working of Distance Vector Routing Algorithm:


• Knowledge about the whole network: Each router shares its knowledge through the
entire network. The Router sends its collected knowledge about the network to its
neighbours.
• Routing only to neighbours: The router sends its knowledge about the network to only
those routers which have direct links. The router sends whatever it has about the
network through the ports. The information is received by the router and uses the
information to update its own routing table.
• Information sharing at regular intervals: Within 30 seconds, the router sends the
information to the neighbouring routers.

P a g e | 86
Link State Routing

Link state routing is a technique in which each router shares the knowledge of its
neighbourhood with every other router in the internetwork.

The three keys to understand the Link State Routing algorithm:

• Knowledge about the neighbourhood: Instead of sending its routing table, a router
sends the information about its neighbourhood only. A router broadcast its identities
and cost of the directly attached links to other routers.
• Flooding: Each router sends the information to every other router on the internetwork
except its neighbours. This process is known as Flooding. Every router that receives
the packet sends the copies to all its neighbours. Finally, each and every router receives
a copy of the same information.
• Information sharing: A router sends the information to every other router only when
the change occurs in the information.

OSPF
The OSPF stands for Open Shortest Path First. It is a widely used and supported routing
protocol. It is an intra-domain protocol, which means that it is used within an area or a network.
It is an interior gateway protocol that has been designed within a single autonomous system. It
is based on a link-state routing algorithm in which each router contains the information of every
domain, and based on this information, it determines the shortest path. It is based on dijkastra
algorithm.

OSPF divides the autonomous systems into areas where the area is a collection of networks,
hosts, and routers. Like internet service providers divide the internet into a different
autonomous system for easy management and OSPF further divides the autonomous systems
into Areas.

P a g e | 87
Types of links in OSPF

A link is basically a connection, so the connection between two routers is known as a link.
There are four types of links in OSPF:

1. Point-to-point link: The point-to-point link directly connects the two routers without
any host or router in between.
2. Transient link: When several routers are attached in a network, they are known as a
transient link.
3. Stub link: It is a network that is connected to the single router. Data enters to the
network through the single router and leaves the network through the same router.
4. Virtual link: If the link between the two routers is broken, the administration creates
the virtual path between the routers, and that path could be a long one also.

Difference b/w Inter-domain and Intra-domain Routing

S.No Intra-domain Routing Inter-domain Routing


Routing algorithm works only Routing algorithm works within
1. within domains. and between domains.

It need to know only about It need to know only about other


other routers within their routers within and between their
2. domain. domain.

Protocols used in intra-


domain routing are known Protocols used in inter-domain
as Interior-gateway routing are known as Exterior-
3. protocols. gateway protocols.

In this Routing, routing takes In this Routing, routing takes


place within an autonomous place between the autonomous
4. network. networks.

Inter-domain routing protocol


Intra-domain routing assumes that the internet
protocols ignores the internet contains the collection of
outside the AS (autonomous interconnected AS (autonomous
5. system). systems).

Some Popular Protocols of


this routing are RIP (resource Popular Protocols of this routing
information protocol) and is BGP (Border Gateway
OSPF (open shortest path Protocol) used to connect two or
6. first). more AS (autonomous system).

P a g e | 88
Unit-4
INTRODUCTION
• The transport layer is responsible for the delivery of a message from one process to
another.
• The transport layer header must include a service – point –address in the OSI model or
port number in the TCP/IP (internet model).
• The Internet model has three protocols at the transport layer: UDP, TCP, and SCTP.
• UDP: Is the simplest of the three.
• TCP: A complex transport layer protocol.
• SCTP: The new transport layer protocol that is designed for specific applications such
as multimedia. A new reliable, message-oriented transport layer protocol that combines
the best features of UDP and TCP.
PROCESS-TO-PROCESS DELIVERY
• The Data link layer is responsible for delivery of frames between nodes over a link node
to node delivery using a MAC address to choose one node among several.
• The Network layer is responsible for delivery of datagram between two hosts host to
host delivery using an IP address to choose one host among millions.
• Real communication takes place between two processes (application programs). We
need process-to-process delivery.
• We need a mechanism to deliver data from one of process running on the source host
to the corresponding process running on the destination host.
• The Transport layer is responsible for process-to-process. We need a port number, to
choose among multiple processes running on the destination host.

Transport Layer Protocols-


There are mainly two transport layer protocols that are used on the Internet-

UDP

• UDP stands for User Datagram Protocol.


• UDP is a simple protocol and it provides non sequenced transport functionality.
• UDP is a connectionless protocol.

P a g e | 89
• This type of protocol is used when reliability and security are less important than
speed and size.
• UDP is an end-to-end transport level protocol that adds transport-level addresses,
checksum error control, and length information to the data from the upper layer.
• The packet produced by the UDP protocol is known as a user datagram.

UDP Format

The user datagram has a 16-byte header which is shown below:

Where,

• Source port address: It defines the address of the application process that has
delivered a message. The source port address is of 16 bits address.
• Destination port address: It defines the address of the application process that will
receive the message. The destination port address is of a 16-bit address.
• Total length: It defines the total length of the user datagram in bytes. It is a 16-bit
field.
• Checksum: The checksum is a 16-bit field which is used in error detection.

Characteristics of UDP

• It is a connectionless protocol.
• It is a stateless protocol.
• It is an unreliable protocol.
• It is a fast protocol.
• It offers the minimal transport service.
• It is almost a null protocol.
• It does not guarantee in order delivery.
• It does not provide congestion control mechanism.
• It is a good protocol for data flowing in one direction.

P a g e | 90
Disadvantages of UDP protocol

• UDP provides basic functions needed for the end-to-end delivery of a transmission.
• It does not provide any sequencing or reordering functions and does not specify the
damaged packet when reporting an error.
• UDP can discover that an error has occurred, but it does not specify which packet
has been lost as it does not contain an ID or sequencing number of a particular data
segment.

Important Point-
• Size of UDP Header= 8 bytes.
• UDP is almost a null protocol.
• UDP is an unreliable protocol.
• Checksum calculation is not mandatory in UDP.
• UDP does not guarantee in order delivery.

TCP

• TCP stands for Transmission Control Protocol.


• It provides full transport layer services to applications.
• It is a connection-oriented protocol means the connection established between both
the ends of the transmission. For creating the connection, TCP generates a virtual
circuit between sender and receiver for the duration of a transmission.

Characteristics of TCP-
• TCP is a reliable protocol.
• TCP is a connection oriented protocol.
• TCP handles both congestion and flow control.
• TCP ensures in-order delivery.
• TCP connections are full duplex.
• TCP can use both selective & cumulative acknowledgements.
• TCP is a byte stream protocol.
• TCP provides error checking & recovery mechanism.

P a g e | 91
TCP Segment Format

Where,

• Source port address: It is used to define the address of the application program in a
source computer. It is a 16-bit field.
• Destination port address: It is used to define the address of the application program
in a destination computer. It is a 16-bit field.
• Sequence number: A stream of data is divided into two or more TCP segments. The
32-bit sequence number field represents the position of the data in an original data
stream.
• Acknowledgement number: A 32-field acknowledgement number acknowledge the
data from other communicating devices. If ACK field is set to 1, then it specifies the
sequence number that the receiver is expecting to receive.
• Header Length (HLEN): It specifies the size of the TCP header in 32-bit words. The
minimum size of the header is 5 words, and the maximum size of the header is 15 words.
Therefore, the maximum size of the TCP header is 60 bytes, and the minimum size of
the TCP header is 20 bytes.
• Reserved: It is a six-bit field which is reserved for future use.
• Control bits: Each bit of a control field functions individually and independently. A
control bit defines the use of a segment or serves as a validity check for other fields.

There are total six types of flags in control field:

• URG: The URG field indicates that the data in a segment is urgent.
• ACK: When ACK field is set, then it validates the acknowledgement number.
• PSH: The PSH field is used to inform the sender that higher throughput is needed so if
possible, data must be pushed with higher throughput.

P a g e | 92
• RST: The reset bit is used to reset the TCP connection when there is any confusion
occurs in the sequence numbers.
• SYN: The SYN field is used to synchronize the sequence numbers in three types of
segments: connection request, connection confirmation ( with the ACK bit set ), and
confirmation acknowledgement.
• FIN: The FIN field is used to inform the receiving TCP module that the sender has
finished sending data. It is used in connection termination in three types of segments:
termination request, termination confirmation, and acknowledgement of termination
confirmation.

• Window Size: The window is a 16-bit field that defines the size of the window.
• Checksum: The checksum is a 16-bit field used in error detection.
• Urgent pointer: If URG flag is set to 1, then this 16-bit field is an offset from
the sequence number indicating that it is a last urgent data byte.
• Options and padding: It defines the optional fields that convey the additional
information to the receiver.

TCP Retransmission-

After establishing the connection,


• Sender starts transmitting TCP segments to the receiver.
• A TCP segment sent by the sender may get lost on the way before reaching the receiver.
• This causes the receiver to send the acknowledgement with same ACK number to the
sender.
• As a result, sender retransmits the same segment to the receiver.
• This is called as TCP retransmission.

1. Retransmission after Time out Timer Expiry-

• Each time sender transmits a TCP segment to the receiver, it starts a Time Out Timer.
• Sender does not receive any acknowledgement for the sent segment and the timer goes
off.
• Sender retransmits the same segment to the receiver and resets the timer.

P a g e | 93
2. Retransmission after Receiving 3 Duplicate Acknowledgements-

• Consider sender receives three duplicate acknowledgements for a TCP segment sent by
it.
• Then, sender assumes that the corresponding segment is lost.
• So, sender retransmits the same segment without waiting for its time out timer to expire.
• This is known as early retransmission or Fast retransmission.

P a g e | 94
TCP Connection Termination-

A TCP connection is terminated using FIN segment where FIN bit is set to 1.

Consider-
• There is a well established TCP connection between the client and server.
• Client wants to terminate the connection.
The following steps are followed in terminating the connection-
After receiving the FIN segment,
• Server frees up its buffers.
• Server sends an acknowledgement to the client.
• Server enters the CLOSE_WAIT state.

After receiving the acknowledgement, client enters the FIN_WAIT_2 state.


Now, suppose server wants to close the connection with the client.

For terminating the connection,


After receiving the FIN segment,
• Client frees up its buffers.
• Client sends an acknowledgement to the server (not mandatory).
• Client enters the TIME_WAIT state.

P a g e | 95
Three Way Handshake-

Three Way Handshake is a process used for establishing a TCP connection.


Consider-
• Client wants to establish a connection with the server.
• Before Three Way Handshake, both client and server are in closed state.
TCP Handshake involves the following steps in establishing the connection-

Step-01: SYN-

For establishing a connection,


• Client sends a request segment to the server.
• Request segment consists only of TCP Header with an empty payload.
• Then, it waits for a reply segment from the server.

Step-02: SYN + ACK-

After receiving the request segment,


• Server responds to the client by sending the reply segment.
• It informs the client of the parameters at the server side.

P a g e | 96
Step-03: ACK-

After receiving the reply segment,


• Client acknowledges the response of server.
• It acknowledges the server by sending a pure acknowledgement.

TCP Congestion Control-

TCP reacts to congestion by reducing the sender window size.


The size of the sender window is determined by the following two factors-
1. Receiver window size
2. Congestion window size

P a g e | 97
Receiver Window Size-
Receiver window size is an advertisement of-
“How much data (in bytes) the receiver can receive without acknowledgement?”
• Sender should not send data greater than receiver window size.
• Otherwise, it leads to dropping the TCP segments which causes TCP Retransmission.
• So, sender should always send data less than or equal to receiver window size.
• Receiver dictates its window size to the sender through TCP Header.

Congestion Window-

• Sender should not send data greater than congestion window size.
• Otherwise, it leads to dropping the TCP segments which causes TCP Retransmission.
• So, sender should always send data less than or equal to congestion window size.
• Different variants of TCP use different approaches to calculate the size of congestion
window.
• Congestion window is known only to the sender and is not sent over the links.

So, always-
Sender window size = Minimum (Receiver window size, Congestion window size)

TCP Congestion Policy-

TCP’s general policy for handling congestion consists of following three phases-

1. Slow Start
2. Congestion Avoidance
3. Congestion Detection

P a g e | 98
1. Slow Start Phase-

• Initially, sender sets congestion window size = Maximum Segment Size (1 MSS).
• After receiving each acknowledgment, sender increases the congestion window size by
1 MSS.
• In this phase, the size of congestion window increases exponentially.

The followed formula is-


Congestion window size = Congestion window size + Maximum segment size
This is shown below-

• After 1 round trip time, congestion window size = (2)1 = 2 MSS


• After 2 round trip time, congestion window size = (2)2 = 4 MSS
• After 3 round trip time, congestion window size = (2)3 = 8 MSS and so on.

P a g e | 99
Threshold
= Maximum number of TCP segments that receiver window can accommodate / 2
= (Receiver window size / Maximum Segment Size) / 2

Congestion Avoidance Phase-

After reaching the threshold,


• Sender increases the congestion window size linearly to avoid the congestion.
• On receiving each acknowledgement, sender increments the congestion window size by 1.
Congestion window size = Congestion window size + 1

Congestion Detection Phase-

When sender detects the loss of segments, it reacts in different ways depending on how the loss
is detected-
• Detection On Time Out
• Detection on Receiving 3 Duplicate Acknowledgements.

Differences b/w TCP & UDP

Basis for TCP UDP


Comparison

P a g e | 100
Definition TCP establishes a virtual UDP transmits the data directly to
circuit before transmitting the destination computer without
the data. verifying whether the receiver is
ready to receive or not.

Connection Type It is a Connection-Oriented It is a Connectionless protocol


protocol

Speed slow high

Reliability It is a reliable protocol. It is an unreliable protocol.

Header size 20 bytes 8 bytes

acknowledgement It waits for the


It neither takes the
acknowledgement of data
acknowledgement, nor it
and has the ability to resend
retransmits the damaged frame.
the lost packets.

SCTP
SCTP stands for Stream Control Transmission Protocol.
It is a connection- oriented protocol in computer networks which 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. It is sometimes referred to as next
generation TCP. SCTP makes it easier to support telephonic conversation on Internet. A
telephonic conversation requires transmitting of voice along with other data at the same time
on both ends; SCTP protocol makes it easier to establish reliable connection.
“SCTP is a message-oriented, reliable protocol that combines the best features of UDP and
TCP”.

Characteristics of SCTP

1. Unicast with Multiple properties –


It is a point-to-point protocol which can use different paths to reach end host.
2. 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.
3. Message oriented –
Each message can be framed and we can keep order of datastream and tabs on structure.
For this, In TCP, we need a different layer for abstraction.
4. Multi-homing –
It can establish multiple connection paths between two end points and does not need to
rely on IP layer for resilience.

Advantages of SCTP

P a g e | 101
1. It is a full- duplex connection i.e. users can send and receive data simultaneously.
2. It allows half- closed connections.
3. The message’s boundaries are maintained and application doesn’t have to split
messages.
4. It has properties of both TCP and UDP protocol.
5. It doesn’t rely on IP layer for resilience of paths.

Disadvantages of SCTP
1. One of key challenges is that it requires changes in transport stack on node.
2. Applications need to be modified to use SCTP instead of TCP/UDP.

Congestion Control
Congestion control refers to the techniques used to control or prevent congestion.
Congestion control techniques can be broadly classified into two categories:

Open Loop Congestion Control


Open loop congestion control policies are applied to prevent congestion before it happens.
The congestion control is handled either by the source or the destination.

Several techniques are used by different protocols; some of them are:


1. Retransmission Policy
It is the policy in which retransmission of the packets are taken care of. If the sender
feels that a sent packet is lost or corrupted, the packet needs to be retransmitted. This
transmission may increase the congestion in the network.
To prevent congestion, retransmission timers must be designed to prevent congestion
and also able to optimize efficiency.

2. Window Policy
The type of window at the sender’s side may also affect the congestion. Several packets
in the Go-back-n window are re-sent, although some packets may be received
successfully at the receiver side. This duplication may increase the congestion in the
network and make it worse.
Therefore, Selective repeat window should be adopted as it sends the specific packet that

P a g e | 102
may have been lost.

3. Discarding Policy
A good discarding policy adopted by the routers is that the routers may prevent
congestion and at the same time partially discard the corrupted or less sensitive packages
and also be able to maintain the quality of a message.
In case of audio file transmission, routers can discard less sensitive packets to prevent
congestion and also maintain the quality of the audio file.

4. Acknowledgment Policy
Since acknowledgements are also the part of the load in the network, the
acknowledgment policy imposed by the receiver may also affect congestion. Several
approaches can be used to prevent congestion related to acknowledgment.
The receiver should send acknowledgement for N packets rather than sending
acknowledgement for a single packet. The receiver should send an acknowledgment
only if it has to send a packet or a timer expires.

5. Admission Policy
In admission policy a mechanism should be used to prevent congestion. Switches in a
flow should first check the resource requirement of a network flow before transmitting it
further. If there is a chance of a congestion or there is a congestion in the network, router
should deny establishing a virtual network connection to prevent further congestion.

Closed Loop Congestion Control


Closed loop congestion control techniques are used to treat or alleviate congestion after it
happens. Several techniques are used by different protocols; some of them are:

1. Backpressure
Backpressure is a technique in which a congested node stops receiving packets from
upstream node. This may cause the upstream node or nodes to become congested and
reject receiving data from above nodes. Backpressure is a node-to-node congestion control
technique that propagates in the opposite direction of data flow. The backpressure
technique can be applied only to virtual circuit where each node has information of its
above upstream node.

In above diagram the 3rd node is congested and stops receiving packets as a result 2nd
node may be get congested due to slowing down of the output data flow. Similarly 1st
node may get congested and inform the source to slow down.

P a g e | 103
2. Choke Packet Technique
Choke packet technique is applicable to both virtual networks as well as datagram
subnets. A choke packet is a packet sent by a node to the source to inform it of
congestion. Each router monitors its resources and the utilization at each of its
output lines. Whenever the resource utilization exceeds the threshold value which is
set by the administrator, the router directly sends a choke packet to the source
giving it a feedback to reduce the traffic. The intermediate nodes through which the
packets has traveled are not warned about congestion.

3. Implicit Signaling
In implicit signaling, there is no communication between the congested nodes and the
source. The source guesses that there is congestion in a network. For example when
sender sends several packets and there is no acknowledgment for a while, one
assumption is that there is congestion.

4. Explicit Signaling

In explicit signaling, if a node experiences congestion it can explicitly sends a packet to


the source or destination to inform about congestion. The difference between choke
packet and explicit signaling is that the signal is included in the packets that carry data
rather than creating a different packet as in case of choke packet technique.
Explicit signaling can occur in either forward or backward direction.
Forward Signaling: In forward signaling, a signal is sent in the direction of the
congestion. The destination is warned about congestion. The receiver in this case
adopts policies to prevent further congestion.
Backward Signaling: In backward signaling, a signal is sent in the opposite
direction of the congestion. The source is warned about congestion and it needs to
slow down.

Quality of Service (QoS)

A stream of packets from a source to destination is called a flow. Quality of Service is


defined as something a flow seeks to attain. In connection oriented network, all the packets
belonging to a flow follow the same order. In a connectionless network, all the packets may
follow different routes.

Flow Characteristics

P a g e | 104
• Reliability, Lack of reliability means losing a packet or acknowledgement which
entertains retransmission.

• Delay, Increase in delay means destination will find the packet later than expected,
Importance of delay changes according to the various application.

• Jitter, Variation of the delay is jitter, if the delay is not at a constant rate, it may
result in poor quality.

• Bandwidth, Increase in bandwidth means increase in the amount of data which can
be transferred in given amount of time, Importance of bandwidth also varies
according to various applications.

Techniques to Improve QoS


Some techniques that can be used to improve the quality of service. The four common methods:
scheduling, traffic shaping, admission control, and resource reservation.

Scheduling

Packets from different flows arrive at a switch or router for processing. A good scheduling
technique treats the different flows in a fair and appropriate manner. Several scheduling
techniques are designed to improve the quality of service i.e. FIFO queuing, priority queuing,
and weighted fair queuing.

i. FIFO Queuing

In first-in, first-out (FIFO) queuing, packets wait in a buffer (queue) until the node (router or
switch) is ready to process them. If the average arrival rate is higher than the average processing
rate, the queue will fill up and new packets will be discarded. A FIFO queue is familiar to those
who have had to wait for a bus at a bus stop.

ii. Priority Queuing

In priority queuing, packets are first assigned to a priority class. Each priority class has its own
queue. The packets in the highest-priority queue are processed first. Packets in the lowest-
priority queue are processed last.
A priority queue can provide better QoS than the FIFO queue because higher priority traffic,
such as multimedia, can reach the destination with less delay. However, there is a potential

P a g e | 105
drawback. If there is a continuous flow in a high-priority queue, the packets in the lower-
priority queues will never have a chance to be processed. This is a condition called starvation

iii. Weighted Fair Queuing

A better scheduling method is weighted fair queuing. In this technique, the packets are still
assigned to different classes and admitted to different queues. The queues, however, are
weighted based on the priority of the queues; higher priority means a higher weight. The
system processes packets in each queue in a round-robin fashion with the number of packets
selected from each queue based on the corresponding weight. For example, if the weights are
3, 2, and 1, three packets are processed from the first queue, two from the second queue, and
one from the third queue. If the system does not impose priority on the classes, all weights
can be equal. In this way, we have fair queuing with priority.

Traffic Shaping

Traffic shaping is a mechanism to control the amount and the rate of the traffic sent to the
network. Two techniques can shape traffic: leaky bucket and token bucket
P a g e | 106
i. Leaky Bucket

If a bucket has a small hole at the bottom, the water leaks from the bucket at a constant rate
as long as there is water in the bucket. The rate at which the water leaks does not depend on
the rate at which the water is input to the bucket unless the bucket is empty. The input rate
can vary, but the output rate remains constant. Similarly, in networking, a technique called
leaky bucket can smooth out bursty traffic. Bursty chunks are stored in the bucket and sent
out at an average rate.

A FIFO queue holds the packets. If the traffic consists of fixed-size packets (e.g., cells in
ATM networks), the process removes a fixed number of packets from the queue at each tick
of the clock. If the traffic consists of variable-length packets, the fixed output rate must be
based on the number of bytes or bits.

The following is an algorithm for variable-length packets:


Initialize a counter to n at the tick of the clock.

· 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.
Reset the counter and go to step 1.

P a g e | 107
“A leaky bucket algorithm shapes bursty traffic into fixed-rate traffic by averaging the data
rate. It may drop the packets if the bucket is full”.

ii. Token Bucket

The leaky bucket is very restrictive. It does not credit an idle host. For example, if a host is
not sending for a while, its bucket becomes empty. Now if the host has bursty data, the leaky
bucket allows only an average rate. The time when the host was idle is not taken into account.
On the other hand, the token bucket algorithm allows idle hosts to accumulate credit for the
future in the form of tokens. For each tick of the clock, the system sends n tokens to the
bucket. The system removes one token for every cell (or byte) of data sent. For example, if n
is 100 and the host is idle for 100 ticks, the bucket collects 10,000 tokens.

The token bucket can easily be implemented with a counter. The token is initialized to zero.
Each time a token is added, the counter is incremented by 1. Each time a unit of data is sent,
the counter is decremented by 1. When the counter is zero, the host cannot send data.
“The token bucket allows bursty traffic at a regulated maximum rate”.

Resource Reservation

A flow of data needs resources such as a buffer, bandwidth, CPU time, and so on. The quality
of service is improved if these resources are reserved beforehand. We discuss in this section
one QoS model called Integrated Services, which depends heavily on resource reservation to
improve the quality of service.

Admission Control

Admission control refers to the mechanism used by a router, or a switch, to accept or reject a
flow based on predefined parameters called flow specifications. Before a router accepts a flow
for processing, it checks the flow specifications to see if its capacity (in terms of bandwidth,

P a g e | 108
buffer size, CPU speed, etc.) and its previous commitments to other flows can handle the new
flow.

Unit-5
Cryptography
The art or science encompassing the principles and methods of transforming an intelligible
message into one that is unintelligible, and then retransforming that message back to its
original form.
“Cryptographic was derived from the Greek word which means secret writing.”
SECURITY SERVICES
The classification of security services are as follows:
Confidentiality - Ensures that the information in a computer system and transmitted
information are accessible only for reading by authorized parties. E.g. Printing, displaying
and other forms of disclosure.
Authentication- Ensures that the origin of a message or electronic document is correctly
identified, with an assurance that the identity is not false.
Integrity- Ensures that only authorized parties are able to modify computer system assets and
transmitted information. Modification includes writing, changing status, deleting, creating
and delaying or replaying of transmitted messages.
Non repudiation- Requires that neither the sender nor the receiver of a message be able to
deny the transmission.

Encryption/Decryption

Encryption: Encryption means that the sender converts the original information into another
form and sends the unintelligible message over the network.

Decryption: Decryption reverses the Encryption process in order to transform the message
back to the original form.

The data which is to be encrypted at the sender site is known as plaintext, and the encrypted
data is known as ciphertext. The data is decrypted at the receiver site.

P a g e | 109
There are two types of Encryption/Decryption techniques:

• Privacy with secret key Encryption/Decryption


• Privacy with public key Encryption/Decryption

Secret Key Encryption/Decryption technique

• In Secret Key Encryption/Decryption technique, the same key is used by both the
parties, i.e., the sender and receiver.
• The sender uses the secret key and encryption algorithm to encrypt the data; the
receiver uses this key and decryption algorithm to decrypt the data.
• In Secret Key Encryption/Decryption technique, the algorithm used for encryption
is the inverse of the algorithm used for decryption. It means that if the encryption
algorithm uses a combination of addition and multiplication, then the decryption
algorithm uses a combination of subtraction and division.
• The secret key encryption algorithm is also known as symmetric encryption
algorithm because the same secret key is used in bidirectional communication.
• In secret key encryption/decryption algorithm, the secret code is used by the
computer to encrypt the information before it is sent over the network to another
computer.
• The secret key requires that we should know which computers are talking to each
other so that we can install the key on each computer.

Symmetric Key Cryptography


An encryption system in which the sender and receiver of a message share a single,
common key that is used to encrypt and decrypt the message. The most popular symmetric–
key system is the Data Encryption Standard (DES).

P a g e | 110
Transposition Ciphers
In Cryptography, a transposition cipher is a method of encryption by which the positions held
by units of plaintext (which are commonly characters or groups of characters) are shifted
according to a regular system, so that the ciphertext constitutes a permutation of the
plaintext.
That is, the order of the units is changed (the plaintext is reordered). Mathematically, a
bijective function is used on the characters’ positions to encrypt and an inverse function to
decrypt.

Substitution Cipher

Method of encryption by which units of plaintext are replaced with ciphertext, according to a
fixed system; the “units” may be single letters (the most common), pairs of letters, triplets of
letters, mixtures of the above, and so forth.

Example:
Consider this example shown on the slide: Using the system just discussed, the keyword
“zebras” gives us the following alphabets:

P a g e | 111
Stream Cipher

Symmetric or secret-key encryption algorithm that encrypts a single bit at a time. With a Stream
Cipher, the same plaintext bit or byte will encrypt to a different bit or byte every time it is
encrypted.

Block Cipher
An encryption method that applies a deterministic algorithm along with a symmetric key to
encrypt a block of text, rather than encrypting one bit at a time as in stream ciphers

Example: A common block cipher, AES, encrypts 128-bit blocks with a key of predetermined
length: 128, 192, or 256 bits. Block ciphers are pseudorandom permutation (PRP) families that
operate on the fixed size block of bits

Data Encryption Standard (DES)


• The Data Encryption Standard (DES) was designed by IBM and adopted by the
U.S. government as the standard encryption method for nonmilitary and
nonclassified use.
• The Data Encryption Standard is a standard used for encryption, and it is a form of
Secret Key Cryptography.

P a g e | 112
Advantage

Efficient: The secret key algorithms are more efficient as it takes less time to encrypt the
message than to encrypt the message by using a public key encryption algorithm. The reason
for this is that the size of the key is small. Due to this reason, Secret Key Algorithms are mainly
used for encryption and decryption.

Disadvantages

The Secret Key Encryption/Decryption has the following disadvantages:

• Each pair of users must have a secret key. If the number of people wants to use
this method in the world is N, then there are N (N-1)/2 secret keys. For example,
for one million people, then there are half billion secret keys.
• The distribution of keys among different parties can be very difficult. This
problem can be resolved by combining the Secret Key Encryption/Decryption
with the Public Key Encryption/Decryption algorithm.

Public Key Encryption/Decryption technique


• There are two keys in public key encryption: a private key and a public key.
• The private key is given to the receiver while the public key is provided to the
public.

In the above figure, we see that A is sending the message to user B. 'A' uses the public key to
encrypt the data while 'B' uses the private key to decrypt the data.

• In public key Encryption/Decryption, the public key used by the sender is different
from the private key used by the receiver.
• The public key is available to the public while the private key is kept by each
individual.
• The most commonly used public key algorithm is known as RSA.

P a g e | 113
Advantages of Public Key Encryption
• The main restriction of private key encryption is the sharing of a secret key. A third
party cannot use this key. In public key encryption, each entity creates a pair of
keys, and they keep the private one and distribute the public key.
• The number of keys in public key encryption is reduced tremendously. For example,
for one million users to communicate, only two million keys are required, not a
half-billion keys as in the case of secret key encryption.

Disadvantages of Public Key Encryption


• Speed: One of the major disadvantages of the public-key encryption is that it is
slower than secret-key encryption. In secret key encryption, a single shared key is
used to encrypt and decrypt the message which speeds up the process while in
public key encryption, different two keys are used.
• Authentication: A public key encryption does not have a built-in authentication.
Without authentication, the message can be interpreted or intercepted without the
user's knowledge.
• Inefficient: The public key encryption algorithms are efficient for short messages
not for long messages.

Differences b/w Secret Key Encryption & Public Key Encryption

Secret Key Encryption Public Key Encryption

Define Secret Key Encryption is defined Public Key Encryption is defined as


as the technique that uses a single the technique that uses two different
shared key to encrypt and decrypt keys for encryption and decryption.
the message.

Efficieny It is efficient as this technique is It is inefficient as this technique is


recommended for large amounts used only for short messages.
of text.

Other It is also known as Symmetric It is also known as Asymmetric Key


name Key encryption. Encryption.

Speed Its speed is high as it uses a single Its speed is slow as it uses two
key for encryption and different keys; both keys are related to
decryption. each other through the complicated
mathematical process.

P a g e | 114
Algorithms The Secret key algorithms are The Public key algorithms are Diffie-
DES, 3DES, AES & RCA. Hellman, RSA.

RSA encryption algorithm:

RSA is the most common public-key algorithm, named after its inventors Rivest, Shamir,
and Adelman (RSA).

RSA algorithm uses the following procedure to generate public and private keys:

• Select two large prime numbers, p and q.


• Multiply these numbers to find n = p x q, where n is called the modulus for
encryption and decryption.
• Choose a number e less than n, such that n is relatively prime to (p - 1) x (q -1). It
means that e and (p - 1) x (q - 1) have no common factor except 1. Choose "e"
such that 1<e < φ (n),e is prime to φ (n),
gcd (e,d(n)) =1
• If n = p x q, then the public key is <e, n>. A plaintext message m is encrypted
using public key <e, n>. To find ciphertext from the plain text following formula
is used to get ciphertext C.
C = me mod n
Here, m must be less than n. A larger message (>n) is treated as a concatenation
of messages, each of which is encrypted separately.
• To determine the private key, we use the following formula to calculate the d such
that:
De mod {(p - 1) x (q - 1)} = 1
Or
De mod φ (n) = 1
• The private key is <d, n>. A ciphertext message c is decrypted using private key
<d, n>. To calculate plain text m from the ciphertext c following formula is used

P a g e | 115
to get plain text m.
m = cd mod n

Some example of RSA encryption algorithm:


Example 1:

This example shows how we can encrypt plaintext 9 using the RSA public-key encryption
algorithm. This example uses prime numbers 7 and 11 to generate the public and private keys.

Explanation:

Step 1: Select two large prime numbers, p, and q.

p=7

q = 11

Step 2: Multiply these numbers to find n = p x q, where n is called the modulus for encryption
and decryption.

First, we calculate

n=pxq

n = 7 x 11

n = 77

Step 3: Choose a number e less that n, such that n is relatively prime to (p - 1) x (q -1). It
means that e and (p - 1) x (q - 1) have no common factor except 1. Choose "e" such that 1<e <
φ (n), e is prime to φ (n), gcd (e, d (n)) =1.

Second, we calculate

P a g e | 116
φ (n) = (p - 1) x (q-1)

φ (n) = (7 - 1) x (11 - 1)

φ (n) = 6 x 10

φ (n) = 60

Let us now choose relative prime e of 60 as 7.

Thus the public key is <e, n> = (7, 77)

Step 4: A plaintext message m is encrypted using public key <e, n>. To find ciphertext from
the plain text following formula is used to get ciphertext C.

To find ciphertext from the plain text following formula is used to get ciphertext C.

C = me mod n

C = 97 mod 77

C = 37

Step 5: The private key is <d, n>. To determine the private key, we use the following formula
d such that:

De mod {(p - 1) x (q - 1)} = 1

7d mod 60 = 1, which gives d = 43

The private key is <d, n> = (43, 77)

Step 6: A ciphertext message c is decrypted using private key <d, n>. To calculate plain
text m from the ciphertext c following formula is used to get plain text m.

m = cd mod n

m = 3743 mod 77

m=9

In this example, Plain text = 9 and the ciphertext = 37

Example 2:

In an RSA cryptosystem, a particular A uses two prime numbers, 13 and 17, to generate the
public and private keys. If the public of A is 35. Then the private key of A is ……………?.

P a g e | 117
Explanation:

Step 1: in the first step, select two large prime numbers, p and q.
p = 13
q = 17
Step 2: Multiply these numbers to find n = p x q, where n is called the modulus for encryption
and decryption.
First, we calculate
n=pxq
n = 13 x 17
n = 221
Step 3: Choose a number e less that n, such that n is relatively prime to (p - 1) x (q -1). It
means that e and (p - 1) x (q - 1) have no common factor except 1. Choose "e" such that 1<e <
φ (n), e is prime to φ (n), gcd (e, d (n)) =1.
Second, we calculate
φ (n) = (p - 1) x (q-1)
φ (n) = (13 - 1) x (17 - 1)
φ (n) = 12 x 16
φ (n) = 192
g.c.d (35, 192) = 1
Step 3: To determine the private key, we use the following formula to calculate the d such that:
Calculate d = de mod φ (n) = 1
d = d x 35 mod 192 = 1
d = (1 + k.φ (n))/e [let k =0, 1, 2, 3………………]
Put k = 0
d = (1 + 0 x 192)/35
d = 1/35
Put k = 1
d = (1 + 1 x 192)/35
d = 193/35
Put k = 2
d = (1 + 2 x 192)/35
d = 385/35
d = 11
The private key is <d, n> = (11, 221)
Hence, private key i.e. d = 11
Example 3:

A RSA cryptosystem uses two prime numbers 3 and 13 to generate the public key= 3 and the
private key = 7. What is the value of cipher text for a plain text?

Explanation:
Step 1: In the first step, select two large prime numbers, p and q.
p=3
q = 13

P a g e | 118
Step 2: Multiply these numbers to find n = p x q, where n is called the modulus for encryption
and decryption.
First, we calculate
n=pxq
n = 3 x 13
n = 39
Step 3: If n = p x q, then the public key is <e, n>. A plaintext message m is encrypted using
public key <e, n>. Thus the public key is <e, n> = (3, 39).
To find ciphertext from the plain text following formula is used to get ciphertext C.
C = me mod n
C = 53 mod 39
C = 125 mod 39
C=8
Hence, the ciphertext generated from plain text, C = 8.

Application Layer Protocol:


DNS

An application layer protocol defines how the application processes running on different
systems pass the messages to each other.

• DNS stands for Domain Name System.


• DNS is a directory service that provides a mapping between the name of a host on
the network and its numerical address.
• Each node in a tree has a domain name, and a full domain name is a sequence of
symbols specified by dots.
• DNS is a service that translates the domain name into IP addresses.
• For example, suppose the FTP site at EduSofthad an IP address of 132.147.165.50,
most people would reach this site by specifying ftp.EduSoft.com. Therefore, the
domain name is more reliable than IP address.

DNS is a TCP/IP protocol used on different platforms. The domain name space is divided into
three different sections: generic domains, country domains, and inverse domain.

Generic Domains

• It defines the registered hosts according to their generic behaviour.


• Each node in a tree defines the domain name, which is an index to the DNS
database.
• It uses three-character labels, and these labels describe the organization type.
P a g e | 119
Country Domain

The format of country domain is same as a generic domain, but it uses two-character country
abbreviations (e.g., us for the United States) in place of three character organizational
abbreviations.

Inverse Domain

The inverse domain is used for mapping an address to a name. When the server has received a
request from the client, and the server contains the files of only authorized clients. To determine
whether the client is on the authorized list or not, it sends a query to the DNS server and ask
for mapping an address to the name.

Working of DNS

• DNS is a client/server network communication protocol. DNS clients send requests


to the. server while DNS servers send responses to the client.
• Client requests contain a name which is converted into an IP address known as a
forward DNS lookups while requests containing an IP address which is converted
into a name known as reverse DNS lookups.
• DNS implements a distributed database to store the name of all the hosts available
on the internet.
• If a client like a web browser sends a request containing a hostname, then a piece
of software such as DNS resolver sends a request to the DNS server to obtain the
IP address of a hostname. If DNS server does not contain the IP address associated
with a hostname, then it forwards the request to another DNS server.

FTP
• FTP stands for File transfer protocol.
• FTP is a standard internet protocol provided by TCP/IP used for transmitting the
files from one host to another.
• It is mainly used for transferring the web page files from their creator to the
computer that acts as a server for other computers on the internet.
• It is also used for downloading the files to computer from other servers.

P a g e | 120
Mechanism of FTP

The above figure shows the basic model of the FTP. The FTP client has three components: the
user interface, control process, and data transfer process. The server has two components: the
server control process and the server data transfer process.

There are two types of connections in FTP:

• Control Connection: The control connection uses very simple rules for
communication. Through control connection, we can transfer a line of command or line
of response at a time. The control connection is made between the control processes.
The control connection remains connected during the entire interactive FTP session.
• Data Connection: The Data Connection uses very complex rules as data types may
vary. The data connection is made between data transfer processes. The data connection
opens when a command comes for transferring the files and closes when the file is
transferred.

SMTP

• SMTP stands for Simple Mail Transfer Protocol.

P a g e | 121
• SMTP is a set of communication guidelines that allow software to transmit an electronic
mail over the internet is called Simple Mail Transfer Protocol.
• It is a program used for sending messages to other computer users based on e-mail
addresses.
• It provides a mail exchange between users on the same or different computers, and it
also supports:
• It can send a single message to one or more recipients.
• Sending message can include text, voice, video or graphics.
• It can also send the messages on networks outside the internet.

Components of SMTP

First, we will break the SMTP client and SMTP server into two components such as user
agent (UA) and mail transfer agent (MTA). 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.

P a g e | 122
• SMTP allows a more complex system by adding a relaying system. Instead of just
having one MTA at sending side and one at receiving side, more MTAs can be added,
acting either as a client or server to relay the email.

SNMP
• SNMP stands for Simple Network Management Protocol.
• SNMP is a framework used for managing devices on the internet.
• It provides a set of operations for monitoring and managing the internet.

• SNMP has two components Manager and agent.


• The manager is a host that controls and monitors a set of agents such as routers.
• It is an application layer protocol in which a few manager stations can handle a set of
agents.

HTTP
• HTTP stands for Hypertext Transfer Protocol.
• It is a protocol used to access the data on the World Wide Web (www).
• The HTTP protocol can be used to transfer the data in the form of plain text, hypertext,
audio, video, and so on.
• This protocol is known as Hypertext Transfer Protocol because of its efficiency that
allows us to use in a hypertext environment where there are rapid jumps from one
document to another document.
• HTTP is similar to the FTP as it also transfers the files from one host to another host.
But, HTTP is simpler than FTP as HTTP uses only one connection, i.e., no control
connection to transfer the files.
• HTTP is used to carry the data in the form of MIME-like format.
P a g e | 123
• HTTP is similar to SMTP as the data is transferred between client and server. The
HTTP differs from the SMTP in the way the messages are sent from the client to the
server and from server to the client.

Features of HTTP:

Connectionless protocol: HTTP is a connectionless protocol. HTTP client initiates a request


and waits for a response from the server.

Stateless: HTTP is a stateless protocol as both the client and server know each other only
during the current request.

The client initiates a transaction by sending a request message to the server. The server
replies to the request message by sending a response message.

Messages

HTTP messages are of two types: request and response. Both the message types follow the
same message format.

Request Message: The request message is sent by the client that consists of a request line,
headers, and sometimes a body.

Response Message: The response message is sent by the server to the client that consists of a
status line, headers, and sometimes a body.
Uniform Resource Locator (URL)

• A client that wants to access the document in an internet needs an address and to
facilitate the access of documents, the HTTP uses the concept of Uniform Resource
Locator (URL).

P a g e | 124
• The Uniform Resource Locator (URL) is a standard way of specifying any kind of
information on the internet.
• The URL defines four parts: method, host computer, port, and path.

• Method: The method is the protocol used to retrieve the document from a server. For
example, HTTP.
• Host: The host is the computer where the information is stored, and the computer is
given an alias name. Web pages are mainly stored in the computers and the computers
are given an alias name that begins with the characters "www". This field is not
mandatory.
• Port: The URL can also contain the port number of the server, but it's an optional field.
If the port number is included, then it must come between the host and path and it should
be separated from the host by a colon.
• Path: Path is the pathname of the file where the information is stored. The path itself
contains slashes that separate the directories from the subdirectories and files.

P a g e | 125
References:
1. Behrouz Forouzan, “Data Communication and Networking”, McGraw Hill.
2. Andrew Tanenbaum “Computer Networks”, Prentice Hall.
3. Behrouz Forouzan, “TCP/IP Protocol Suite”, McGraw Hill.

P a g e | 126

You might also like