0% found this document useful (0 votes)
18 views

Notes of CN

Uploaded by

Aman Rai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Notes of CN

Uploaded by

Aman Rai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 100

Reference pages

What is computer network (types, working, goals) 2-10


Osi model 11-21
Tcp/ip model 23-28
Devices of CN 29-33
Topologies 34-43
Connectionless and connection oriented services 44-46

1
What is a computer network?

A computer network is a group of interconnected nodes or computing devices that exchange data and

resources with each other. A network connection between these devices can be established using

cable or wireless media. Once a connection is established, communication protocols -- such

as TCP/IP, Simple Mail Transfer Protocol and Hypertext Transfer Protocol -- are used to exchange

data between the networked devices.

The first example of a computer network was the Advanced Research Projects Agency Network. This

packet-switched network was created in the late 1960s by ARPA, a U.S. Department of Defense

agency.

A computer network can be as small as two laptops connected through an Ethernet cable or as

complex as the internet, which is a global system of computer networks.

How does a computer network work?

Devices attached to a computer network use IP addresses that are resolved into
hostnames through a domain name system server to communicate with each other over the
internet and on other computer networks.

Computer Network Architecture

Computer Network Architecture is defined as the physical and logical design of the software,
hardware, protocols, and media of the transmission of data. Simply we can say that how computers
are organized and how tasks are allocated to the computer.

The two types of network architectures are used:

o Peer-To-Peer network
o Client/Server network

2
Peer-To-Peer network

o Peer-To-Peer network is a network in which all the computers are linked together with equal
privilege and responsibilities for processing the data.

o Peer-To-Peer network is useful for small environments, usually up to 10 computers.

o Peer-To-Peer network has no dedicated server.

o Special permissions are assigned to each computer for sharing the resources, but this can lead
to a problem if the computer with the resource is down.

Advantages Of Peer-To-Peer Network :


o It is less costly as it does not contain any dedicated server.

o If one computer stops working but, other computers will not stop working.

o It is easy to set up and maintain as each computer manages itself.

Disadvantages Of Peer-To-Peer Network:

o In the case of Peer-To-Peer network, it does not contain the centralized system .
Therefore, it cannot back up the data as the data is different in different locations.
o It has a security issue as the device is managed itself.

Client/Server Network

3
o Client/Server network is a network model designed for the end users called clients, to
access the resources such as songs, video, etc. from a central computer known as
Server.
o The central controller is known as a server while all other computers in the network
are called clients.
o A server performs all the major operations such as security and network
management.
o A server is responsible for managing all the resources such as files, directories, printer,
etc.
o All the clients communicate with each other through a server. For example, if client1
wants to send some data to client 2, then it first sends the request to the server for
the permission. The server sends the response to the client 1 to initiate its
communication with the client 2.

Advantages Of Client/Server network:


o A Client/Server network contains the centralized system. Therefore we can back up
the data easily.
o A Client/Server network has a dedicated server that improves the overall
performance of the whole system.
o Security is better in Client/Server network as a single server administers the shared
resources.
o It also increases the speed of the sharing resources.

4
Disadvantages Of Client/Server network:
o Client/Server network is expensive as it requires the server with large memory.
o A server has a Network Operating System(NOS) to provide the resources to the
clients, but the cost of NOS is very high.
o It requires a dedicated network administrator to manage all the resources.

Advantages of using a computer network

Computer networks are ideal for the quick exchange of information and the efficient use of resources.

The following are benefits of using a computer network:

 Resource sharing. Enterprises of all sizes can use a computer network to share

resources and critical assets. Resources for sharing can include printers, files, scanners

and photocopy machines. Computer networks are especially beneficial for larger and

globally spread-out organizations, as they can use a single common network to connect

with their employees.

 Flexibility. Today's computer networks enable people to use flexible communication and

resource-sharing methods based on their needs and preferences. For example, some

people might use email or instant messaging to communicate, while others might prefer

using an app such as WhatsApp.

 Higher connectivity. Thanks to computer networks, people can stay connected

regardless of their location. For example, video calling and document-sharing apps, such

as Zoom and Google Docs, enable employees to connect and collaborate remotely.

 Data security and management. In a computer network, data is centralized on shared

servers. This helps network administrators to better manage and protect their company's

critical data assets. They can perform regular data backups and enforce security

measures, such as multifactor authentication, across all devices collectively.

 Storage capacity. Most organizations scale over time and have an abundance of data

that needs storage. Computer networks, especially those that employ cloud-based

technologies, can store massive amounts of data and backups on a centralized remote

server that's accessible to everyone, at any given time.

5
 Entertainment. Computer networks, especially the internet, offer various sources of

entertainment, ranging from computer games to streaming music and videos. Multiplayer

games, for example, can only be operated through a local or home-based LAN or a wide

area network (WAN), such as the internet.

 High reliability: high reliability can be achieved by replicating files on two or more

machines, so if one of them is unavailable due to failure of hardware/software the other

copies could be available.

 Saving money: network of devices and computers saves a lot of money .example – one

pr inter can be shared with multiple computers, so no need to buy separate printers for

each computer.

Computer Network Types

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 four types:

o LAN(Local Area Network)


o PAN(Personal Area Network)
o MAN(Metropolitan Area Network)
o WAN(Wide Area Network)

LAN(Local Area Network)

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

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

PAN(Personal Area Network)

o Personal Area Network is a network arranged within an individual person, typically


within a range of 10 meters.
o Personal Area Network is used for connecting the computer devices of personal use
is known as Personal Area Network.
o Thomas Zimmerman was the first research scientist to bring the idea of the Personal
Area Network.
o Personal Area Network covers an area of 30 feet.
o Personal computer devices that are used to develop the personal area network are
the laptop, mobile phones, media player and play stations.

7
There are two types of Personal Area Network:

o Wired Personal Area Network


o Wireless Personal Area Network

Wireless Personal Area Network: Wireless Personal Area Network is developed by


simply using wireless technologies such as WiFi, Bluetooth. It is a low range network.

Wired Personal Area Network: Wired Personal Area Network is created by using
the USB.

Examples Of Personal Area Network:

o Body Area Network: Body Area Network is a network that moves with a person. For
example, a mobile network moves with a person. Suppose a person establishes a
network connection and then creates a connection with another device to share the
information.
o Offline Network: An offline network can be created inside the home, so it is also
known as a home network. A home network is designed to integrate the devices
such as printers, computer, television but they are not connected to the internet.
o Small Home Office: It is used to connect a variety of devices to the internet and to a
corporate network using a VPN

MAN(Metropolitan Area Network)

o A metropolitan area network is a network that covers a larger geographic area by


interconnecting a different LAN to form a larger network.
o Government agencies use MAN to connect to the citizens and private industries.

8
o In MAN, various LANs are connected to each other through a telephone exchange
line.
o The most widely used protocols in MAN are RS-232, Frame Relay, ATM, ISDN, OC-3,
ADSL, etc.
o It has a higher range than Local Area Network(LAN).

Uses Of Metropolitan Area Network:

o MAN is used in communication between the banks in a city.


o It can be used in an Airline Reservation.
o It can be used in a college within a city.
o It can also be used for communication in the military.

WAN(Wide Area Network)

o A Wide Area Network is a network that extends over a large geographical area such
as states or countries.
o A Wide Area Network is quite bigger network than the LAN.
o 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.
o The internet is one of the biggest WAN in the world.
o A Wide Area Network is widely used in the field of Business, government, and
education.

9
Examples Of Wide Area Network:

o Mobile Broadband: A 4G network is widely used across a region or country.


o Last mile: A telecom company is used to provide the internet services to the
customers in hundreds of cities by connecting their home with fiber.
o Private network: A bank provides a private network that connects the 44 offices. This
network is made by using the telephone leased line provided by the telecom
company.

Advantages Of Wide Area Network:

Following are the advantages of the Wide Area Network:

o Geographical area: A Wide Area Network provides a large geographical area.


Suppose if the branch of our office is in a different city then we can connect with
them through WAN. The internet provides a leased line through which we can
connect with another branch.
o Centralized data: In case of WAN network, data is centralized. Therefore, we do not
need to buy the emails, files or back up servers.
o Get updated files: Software companies work on the live server. Therefore, the
programmers get the updated files within seconds.
o Exchange messages: In a WAN network, messages are transmitted fast. The web
application like Facebook, Whatsapp, Skype allows you to communicate with friends.

10
o Sharing of software and resources: In WAN network, we can share the software and
other resources like a hard drive, RAM.
o Global business: We can do the business over the internet globally.
o High bandwidth: If we use the leased lines for our company then this gives the high
bandwidth. The high bandwidth increases the data transfer rate which in turn
increases the productivity of our company.

Disadvantages of Wide Area Network:

The following are the disadvantages of the Wide Area Network:

o Security issue: A WAN network has more security issues as compared to LAN and
MAN network as all the technologies are combined together that creates the security
problem.
o Needs Firewall & antivirus software: The data is transferred on the internet which
can be changed or hacked by the hackers, so the firewall needs to be used. Some
people can inject the virus in our system so antivirus is needed to protect from such a
virus.
o High Setup cost: An installation cost of the WAN network is high as it involves the
purchasing of routers, switches.
o Troubleshooting problems: It covers a large area so fixing the problem is difficult.

OSI model
o 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.
o OSI consists of seven layers, and each layer performs a particular network
function.
o OSI model was developed by the International Organization for
Standardization (ISO) in 1984, and it is now considered as an architectural
model for the inter-computer communications.
o OSI model divides the whole task into seven smaller and manageable tasks.
Each layer is assigned a particular task.

11
o Each layer is self-contained, so that task assigned to each layer can be
performed independently.

Characteristics of OSI Model:

o The OSI model is divided into two layers: upper layers and lower layers.
o The upper layer of the OSI model mainly deals with the application related
issues, and they are implemented only in the software. The application layer is
closest to the end user. Both the end user and the application layer interact
with the software applications. An upper layer refers to the layer just above
another layer.
o The lower layer of the OSI model deals with the data transport issues. The
data link layer and the physical layer are implemented in hardware and
software. The physical layer is the lowest layer of the OSI model and is closest
to the physical medium. The physical layer is mainly responsible for placing
the information on the physical medium.

7 Layers of OSI Model


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

12
1. Physical Layer
2. Data-Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer

1) Physical layer

13
o It defines the transmission of data from one system to another in a computer network
o The main functionality of the physical layer is to transmit the individual bits
from one node to another node.
o It is the lowest layer of the OSI model.
o It consists of various network components such as power plugs, connectors,
receivers, cable types, etc.
o It provides physical medium through which bits are transmitted.
o It establishes, maintains and deactivates the physical connection.
o It specifies the mechanical, electrical and procedural network interface
specifications.
o The physical layer converts the data frame received from the data link layer
into bits
o It provides hardware security.
o Hub, Repeater, Modem, and Cables are Physical Layer devices.
o Network Layer, Data Link Layer, and Physical Layer are also known
as Lower Layers or Hardware Layers.
o

Functions of a Physical layer:

14
o Line Configuration: It defines the way how two or more devices can be
connected physically.( point-to-multipoint, point-to-point, or multipoint line
configurations.)

o Translation : It is responsible for the translation of data received from the


data link layer for further transmission.
o Control bit rate: Bit rate control defines how many bits per second can be
transmitted, i.e., the number of bits sent per second.
o Bit synchrinization: It performs bit synchronization, which means that only one bit
needs to be transferred from one system to another at a time. There should be no
overlapping of bits during transmission.

o Data Transmission mode: It defines the transmission mode whether it is


simplex, half-duplex or full-duplex mode between the two devices on the
network.
o Topology: It defines the way how network devices are arranged.
o Signals: It determines the type of the signal used for transmitting the
information.
o Hub, Repeater, Modem, and Cables are Physical Layer devices.
o Network Layer, Data Link Layer, and Physical Layer are also known
as Lower Layers or Hardware Layers.
Modes of Transmission Medium
o Simplex mode: In this mode, out of two devices, only one device can
transmit the data, and the other device can only receive the data.
Example- Input from keyboards, monitors, TV broadcasting, Radio
broadcasting, etc.
o Half Duplex mode: In this mode, out of two devices, both devices can
send and receive the data but only one at a time not simultaneously.
Examples- Walkie-Talkie, Railway Track, etc.
o Full-Duplex mode: In this mode, both devices can send and receive the
data simultaneously. Examples- Telephone Systems, Chatting
applications, etc.
o

2) Data-Link Layer

15
o In the OSI model, the data link layer is a 4 th layer from the top and 2 nd layer
from the bottom.
o This is considered the most complex layer of the OSI model as it hides all the underlying
complexities of the hardware from the other above layers
o This layer is responsible for the error-free transfer of data frames.
o It defines the format of the data on the network.
o It provides a reliable and efficient communication between two or more
devices.
o It is mainly responsible for the unique identification of each device that resides
on a local network.
o It contains two sub-layers:
o Logical Link Control Layer
o The main function of the logical link control layer is to act as an interface between
the lower MAC sublayer and the network layer within the OSI model during the data
transfer.
o Logical Link Control (LLC) is a sublayer in the data link layer of the OSI
model. It is responsible for providing a reliable connection between two
devices on a network, ensuring that data is transmitted accurately and without
errors.
o Media Access Control Layer

16
o Media Access Control (MAC) is a protocol in the data link layer of the
OSI model that determines how devices on a network can access the
media (e.g. Ethernet cable) to transmit data
o In a local area network (LAN), each device has a unique MAC address
that is used to identify it on the network. When a device wants to send
data, it checks to see if the media is available to transmit. If the media
is available, the device sends its MAC address and the data to be
transmitted. If the media is not available, the device waits until it
becomes available and then sends the data.

Functions of the Data-link layer

o Framing: The data link layer translates the physical's raw bit stream into
packets known as Frames. The Data link layer adds the header and trailer to
the frame. The header which is added to the frame contains the hardware
destination and source address.

o Reliable delivery: Data Link Layer provides a reliable delivery service, i.e.,
transmits the network layer datagram without any error. A reliable delivery
service is accomplished with transmissions and acknowledgements. A data link
layer mainly provides the reliable delivery service over the links as they have
higher error rates and they can be corrected locally, link at which an error
occurs rather than forcing to retransmit the data.
o Physical Addressing: The Data link layer adds a header to the frame that
contains a destination address. The frame is transmitted to the destination
address mentioned in the header.
o Flow Control: Flow control is the main functionality of the Data-link layer. It is
the technique through which the constant data rate is maintained on both the
sides so that no data get corrupted. It ensures that the transmitting station
such as a server with higher processing speed does not exceed the receiving
station, with lower processing speed.

17
o Error Control: Error control is achieved by adding a calculated value CRC
(Cyclic Redundancy Check) that is placed to the Data link layer's trailer which
is added to the message frame before it is sent to the physical layer. If any
error seems to occurr, then the receiver sends the acknowledgment for the
retransmission of the corrupted frames.
o 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.

1. Packet in the Data Link layer is referred to as Frame.


2. Switch & Bridge are Data Link Layer devices

3) Network Layer

1. Segment in the Network layer is referred to as Packet.


2. Network layer is implemented by networking devices such as routers
and switches.

o It is a layer 3 that manages device addressing, tracks the location of devices


on the network.

18
o It determines the best path to move data from source to the destination
based on the network conditions, the priority of service, and other factors.
o The Data link layer is responsible for routing and forwarding the packets.
o Routers are the layer 3 devices, they are specified in this layer and used to
provide the routing services within an internetwork.
o The protocols used to route the network traffic are known as Network layer
protocols. Examples of protocols are IP and Ipv6.

Functions of Network Layer:

o Internetworking: An internetworking is the main responsibility of the


network layer. It provides a logical connection between different devices.
o Addressing: A Network layer adds the source and destination address to the
header of the frame. Addressing is used to identify the device on the internet.
o Routing: Routing is the major component of the network layer, and it
determines the best optimal path out of the multiple paths from source to the
destination.
o Packetizing: A Network Layer receives the packets from the upper layer and
converts them into packets. This process is known as Packetizing. It is achieved
by internet protocol (IP).

4) Transport Layer

19
o The Transport layer is a Layer 4 ensures that messages are transmitted in the
order in which they are sent and there is no duplication of data.
o The main responsibility of the transport layer is to transfer the data
completely.
o It receives the data from the upper layer and converts them into smaller units
known as segments.
o This layer can be termed as an end-to-end layer as it provides a point-to-
point connection between source and destination to deliver the data reliably.

The two protocols used in this layer are:

o Transmission Control Protocol


o It is a standard protocol that allows the systems to communicate over
the internet.
o It establishes and maintains a connection between hosts.
o When data is sent over the TCP connection, then the TCP protocol
divides the data into smaller units known as segments. Each segment
travels over the internet using multiple routes, and they arrive in
different orders at the destination. The transmission control protocol
reorders the packets in the correct order at the receiving end.
o User Datagram Protocol
o User Datagram Protocol is a transport layer protocol.
o It is an unreliable transport protocol as in this case receiver does not
send any acknowledgment when the packet is received, the sender
does not wait for any acknowledgment. Therefore, this makes a
protocol unreliable.

Functions of Transport Layer:

o Service-point addressing: Computers run several programs simultaneously


due to this reason, the transmission of data from source to the destination not
only from one computer to another computer but also from one process to
another process. The transport layer adds the header that contains the
address known as a service-point address or port address. The responsibility
of the network layer is to transmit the data from one computer to another
computer and the responsibility of the transport layer is to transmit the
message to the correct process.
20
o Segmentation and reassembly: When the transport layer receives the
message from the upper layer, it divides the message into multiple segments,
and each segment is assigned with a sequence number that uniquely
identifies each segment. When the message has arrived at the destination,
then the transport layer reassembles the message based on their sequence
numbers.
o Connection control: Transport layer provides two services Connection-
oriented service and connectionless service. A connectionless service treats
each segment as an individual packet, and they all travel in different routes to
reach the destination. A connection-oriented service makes a connection with
the transport layer at the destination machine before delivering the packets. In
connection-oriented service, all the packets travel in the single route.
o Flow control: The transport layer also responsible for flow control but it is
performed end-to-end rather than across a single link.
o Error control: The transport layer is also responsible for Error control. Error
control is performed end-to-end rather than across the single link. The sender
transport layer ensures that message reach at the destination without any
error.

Services Provided by Transport Layer


1. Connection-Oriented Service
2. Connectionless Service
1. Connection-Oriented Service: It is a three-phase process that includes
 Connection Establishment
 Data Transfer
 Termination/disconnection
In this type of transmission, the receiving device sends an acknowledgment,
back to the source after a packet or group of packets is received. This type of
transmission is reliable and secure.
2. Connectionless service: It is a one-phase process and includes Data
Transfer. In this type of transmission, the receiver does not acknowledge
receipt of a packet. This approach allows for much faster communication
between devices. Connection-oriented service is more reliable than
connectionless Service.
Note:
1. Data in the Transport Layer is called Segments.
2. Transport layer is operated by the Operating System. It is a part of
the OS and communicates with the Application Layer by making
system calls.

21
3. The transport layer is called as Heart of the OSI model.
4. Device or Protocol Use : TCP, UDP NetBIOS, PPTP

5) Session Layer

o It is a layer 3 in the OSI model.


o The Session layer is used to establish, maintain and synchronizes the
interaction between communicating devices.

Functions of Session layer:

o Dialog control: Session layer acts as a dialog controller that creates a dialog
between two processes or we can say that it allows the communication
between two processes which can be either half-duplex or full-duplex.
o Synchronization: Session layer adds some 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 and recovery.

6) Presentation Layer

22
o A Presentation layer is mainly concerned with the syntax and semantics of the
information exchanged between the two systems.
o It acts as a data translator for a network.
o This layer is a part of the operating system that converts the data from one
presentation format to another format.
o The Presentation layer is also known as the syntax layer.

Functions of Presentation layer:

o Translation: The processes in two systems exchange the information in the


form of character strings, numbers and so on. Different computers use
different encoding methods, the presentation layer handles the
interoperability between the different encoding methods. It converts the data
from sender-dependent format into a common format and changes the
common format into receiver-dependent format at the receiving end.
o Encryption: Encryption is needed to maintain privacy. Encryption is a process
of converting the sender-transmitted information into another form and sends
the resulting message over the network.
o Compression: Data compression is a process of compressing the data, i.e., it
reduces the number of bits to be transmitted. Data compression is very
important in multimedia such as text, audio, video.

7) Application Layer

23
o An application layer serves as a window for users and application processes to
access network service.
o It handles issues such as network transparency, resource allocation, etc.
o An application layer is not an application, but it performs the application layer
functions.
o This layer provides the network services to the end-users.

Functions of Application layer:

o File transfer, access, and management (FTAM): 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.
o Mail services: An application layer provides the facility for email forwarding
and storage.
o Directory services: An application provides the distributed database sources
and is used to provide that global information about various objects.

What is TCP/IP Model?


TCP/IP stands for Transmission Control Protocol/Internet Protocol.
The TCP/IP model is created to allow communication over long distances
possible between two devices. It also assists in how the data between two
devices is transmitted over the internet. TCP/IP specifies how the data should
be packetized, addressed, transmitted, routed, and received on a network by

24
providing end-to-end communication. The TCP/IP model consists of 4 layers,
i.e., the application layer, transport layer, network layer, and data link layer.
Each layer is responsible for a particular task strictly according to the protocols.
As compared to the OSI model, which is a theoretical model, TCP/IP is an
application and practical model.
TCP handles the flow of data and also handles errors in data transmission,
while IP provides a unique address to each device in the network.

TCP/IP started as one of many internet protocols created by DARPA (the


Defense Advanced Research Projects Agency in the United States) in the
1970s. The TCP/IP model was later adopted as the standard protocol for
ARPAnet, the modern internet's predecessor. TCP/IP is now the international
standard for internet communication.

How Does the TCP/IP Protocol Work?


Whenever we send things like a simple text message, a file, or a video message over the
internet, the TCP/IP model divides the data into packets, according to four-layered
architecture. The data goes in order from the sender's side, and on the receiver's side, it
follows the reverse order and is finally reassembled.

25
26
Layers in TCP/IP Model
The TCP/IP model generally consists of four essential layers

1. Application Layer
2. Host-To-Host Layer/Transport Layer
3. Internet Layer/Network Layer
4. Network Access Layer/Link Layer

Since TCP/IP is an implementable model, it can be further classified into a five-layer model
in which the data link layer and the physical layer are separated from the Link layer. It is
done to achieve the client's requirements with efficiency. To understand better, let's have a
look at the diagram given below, which compares four-layer and five-layer TCP/IP Models
with the standard OSI Model.

The 4 Layers of the TCP/IP Protocol Suite


27
The four layers of the TCP/IP protocol suite are defined below.

1. Application Layer

This layer performs the functions of the top three layers of the OSI model, i.e., the
Application, Presentation, and Session Layer. It is responsible for node-to-node
communication and controls user-interface specifications. Its protocols include HTTP, Post
Office Protocol 3, Simple Mail Transfer Protocol, and File Transfer Protocol. At the
application layer, the payload is the actual application data. Some of the protocols of the
application layer are described below.

 HTTP:- It stands for Hypertext transfer protocol. This protocol enables us to access data via
the internet. It sends data in plain text, audio, and video formats. It's called a hypertext
transfer protocol because it's efficient enough to use in a hypertext environment where
there are rapid jumps from one document to another.
 TELNET:- It establishes a connection between the local and remote computers in such a way
that the local computer seems to be a remote terminal.
 SMTP:-The Simple Mail Transfer Protocol (SMTP) is the TCP/IP protocol that handles e-mail.
The data is sent to another e-mail address using this protocol.
 FTP:- The FTP (File Transfer Protocol) is a standard internet protocol for transferring data
from one computer to another.
 DNS: DNS stands for Domain Name System. An IP address is used to identify the
connection of a host to the internet uniquely. But, people prefer to use the names
instead of addresses. Therefore, the system that maps the name to the address is
known as Domain Name System.

2.Host-to-Host/Transport Layer

This layer is similar to the OSI model's Transport layer. It specifies how much data should be
sent, when, and where at what rate. The message from the application layer is built upon this
layer. This layer ensures that data units are supplied in a timely and error-free manner.
Through error control, flow control, and segmentation or de-segmentation, the transport layer
helps to control the link's reliability. The transport layer also acknowledges the successful
data transmission and sends the next data if no errors occur. The two important protocols
present in this layer are

 Transmission Control Protocol (TCP):-It is known for offering error-free and reliable
communication between end systems. It does data segmentation and sequencing. It also
features an acknowledgment feature and uses a flow control method to govern data flow. It
is a very effective protocol, but it has a lot of overhead because of these features. Increased
overhead translates to higher costs. TCP uses three-way handshaking to establish and
acknowledge the connection between the two devices.
 User Datagram Protocol (UDP):-On the other side, it doesn't have any of these properties. If
your application does not require dependable transmission, one must use this protocol
because it is relatively cost-effective. UDP is a connectionless protocol, so it does not provide
assurance of data delivery.

28
3.Internet Layer

This layer is also known as the network layer. The Internet layer's primary function is to
send packets from the source or computer to their destination, regardless of their route. The
Internet layer or Network Layer provides a functional and procedural means for sending
variable-length data sequences between nodes across multiple networks. Message delivery at
the Internet layer does not guarantee reliable network layer protocol. The main protocols lie
in the layer are

 IP:-The Internet Protocol (IP) is in charge of sending packets from a source host to a
destination host based on the IP addresses in the packet headers. There are two variations of
IP IPv6 and IPv4.
 ARP:- Address Resolution Protocol (ARP) is a protocol for resolving conflicts between
computers. Its task is to determine a host's hardware address from an IP address. ARP's
primary function is to convert 32-bit addresses to 48-bit addresses and vice versa. ARP is
necessary because IP addresses in IP version 4 (IPv4) are 32 bits long, but MAC addresses are
48 bits long.

4. Network Access Layer/Link Layer

Network access or Link layer specifies the physical transmission of data over the network.
This layer handles data transmission between two adjacent devices on the same network. It
also determines how bits should be optically signaled by hardware devices that interface
directly with a network media such as coaxial, optical, fiber, or twisted-pair cables.The
protocols used by this layer are ethernet, token ring, FDDI, X.25, frame relay.

Highlights:

 Application Layer is responsible for node-to-node communication and controls user-


interface specifications. HTTP, SMTP, TELNET, etc., are some of its essential protocols.
 Host-To-Host Layer specifies how much data should be sent, when, and where at what rate.
TCP and UDP are two significant protocols of this Layer.
 The Internet layer's primary function is to send packets from the source or computer to their
destination, regardless of their route. IP and ARP are two significant protocols of this layer.
 Network Acess Layer handles data transmission between two adjacent devices on the same
network.

Uses Of TCP/IP Model


The various uses of the TCP/IP Model are described below.

1. It provides a suite of communication protocols that allows data exchange between two
devices possible or in general we can say that it makes the internet possible.
2. We all are aware of the importance of text communication in today's environment. For text
communication, flow control, and error control are mandatory because the text message's
size is minimal, and it must be delivered with minimal error to the right person. A small
mistake in the text message can change the meaning of the whole message. So TCP/IP model
handles the following operations to ensure the transition between sender and receiver is in

29
order and error-free. Examples of text communication are WhatsApp, Instagram, Google
Chat, and iMessage.
3. Internet banking is possible due to this model because it provides reliability, efficiency, and
security, making it possible for users to use such facilities online.
4. Online gaming and video streaming are also possible because TCP/IP model provides
flexibility in choosing connection-oriented or connectionless transmission. Due to this
flexibility, broadcasting sports and events to a mass audience is possible.
5. TCP/IP provides various functions like DNS, DHCP, Virtual Private Networking, Piggybacking,
Error control, etc. This feature allows end-user to use the internet without fear of losing their
privacy and integrity.

Advantages of TCP/IP Model


1. It's a set of open protocols. As any one institution does not own it, it can be used by anybody
or any group.
2. It's a client-server architecture and highly scalable. It allows the addition of new networks
without disrupting existing services.
3. It's an industry-standard model that can be used to solve real-world networking problems.
4. It is interoperable, allowing two different systems to communicate via a heterogeneous
network.
5. It assigns a unique IP address to each device in a network such that each device has its own
unique identity over the internet.
6. It is challenging for humans to remember numerical values compared to alphabetical names.
So to solve this, TCP/IP models also provide DNS service to provide resolution between
alphabetical domain names and IP addresses.

Disadvantages of the TCP/IP Model


1. Concepts like "services," "interfaces," and "protocols" are not distinguished. As a result,
describing new technologies in new networks is not appropriate.
2. This model was created to be used in wide-area networks. It is not designed for tiny
networks such as LANs and PANs (pervasive area networks) (personal area networks).
3. It's not generic. As a result, it can't represent any protocol stack other than TCP/IP. It cannot,
for example, define a Bluetooth connection.
4. It is not easy to replace protocols.

30
NETWORK DEVICES
Network devices are physical devices that allow hardware on a computer network to interact
and communicate with one another. In layman’s terms, we can describe network devices
in computer networks as the devices that connect fax machines, computers, printers,
and other electronic devices to the network.

In other words, they're connectors that allow devices on a network to


communicate with one another. Enabling communication on a network means
anything that helps data get from source to destination.
For example Repeater, Hub, Bridge, Switch, Routers, Gateway, Brouter, and NIC,
etc.

Types of Network Devices


Hub
A hub is one of the simplest networking devices that connects several computers or
other network devices when referring to networking (network devices hub). In
layman’s terms, a hub is a hardware device that allows multiple devices or
connections to connect to a computer.
A USB hub, for example, allows multiple USB devices to connect with one computer,
even if that computer only has one USB connection. Depending on the hub, the
number of ports on a USB hub can range from 4 to over 100, and it operates at the
Physical layer (Layer 1) of the Open Systems Interconnection (OSI) model.

Advantages of Hub

 Due to its low cost, anyone can utilize it.


 Easy to install
 It supports various types of Network Media.
 The presence of a hub does not affect network performance.

Disadvantages of Hub

 It is unable to select the best network path.


 It has no mechanism for reducing network traffic.
 It is unable to filter information because it sends packets to all connected segments.

Switch
A switch is a physical circuitry part that controls the flow of signals in
networking (network devices switch). A switch enables you to open or close a
connection. When the switch is opened, a signal or power can pass through the
connection. When the switch is closed, the flow is stopped, and the circuit
connection is broken.
Early computers, such as the Altair, used switches as input. A network switch is
much more advanced than a hub, but it isn’t as advanced as a router and operates
at the Data Link layer (Layer 2) of the OSI model.

31
The top three advantages of the switch network device are:
 Increases the available bandwidth of the network.
 It helps in reducing the workload on individual host PCs
 Increases the performance of the network
The top three disadvantages of the switch network device are:
 They are more costly than network bridges.
 Broadcast traffic can be problematic.
 Network connectivity problems are challenging to track down via the network
switch.

Router
In regards to networking (network devices router), a router is a piece of hardware
that receives, analyses, and forwards incoming packets to another
network. Routers examine incoming packets to determine the correct target IP
address and send the packet to that address.
Routers typically connect LANs and WANs and use a rapidly updating routing table
to make routing decisions for data packets. Edge routers, core routers, virtual
routers, wireless routers, and various other types of routers are available, and
they operate at the Network layer (Layer 3) of the OSI model.

Types of Routers

There are various types of routers used in networking as follows :

 Wireless Router :
These routers can generate a wireless signal in your home or office, allowing
computers to connect to routers within a specific range and access the internet. When

32
connected indoors, the wireless router's range is approximately 150 feet, when
connected outdoors, the range is up to 300 feet.

 Brouter :
A brouter is a hybrid of a bridge and a router. It acts as a bridge, allowing data to be
transferred between networks, and it can also route data within a network to
individual systems, much like a router. As a result, it combines the functions of a
bridge and a router by routing some incoming data to the appropriate systems while
transferring the rest to another network.

 Core Router :
A core router is a kind of router that can route data within a network but cannot route
data between networks. It is a computer communication system device that serves as
the backbone of networks by connecting all network devices. It is used by internet
service providers and offers a variety of fast and powerful data communication
interfaces.

 Edge Router :
An edge router is a low-capacity device that sits at the network's edge. It enables an
internal network to communicate with external networks. For internet-based
connectivity with distant networks, it uses an external BGP (Border Gateway
Protocol).

 Broadband Router :
Broadband routers are primarily used to provide computers with high-speed internet
access. It is required when connecting to the internet via phone and using Voice over
IP technology (VoIP). All broadband routers have three or four Ethernet ports for
connecting laptop and desktop computers.

The top three advantages of the router network device are:


 Connects various network architectures such as ethernet and token ring,
among others.
 Reduces network traffic by establishing collision domains as well as
broadcast domains.
 Chooses the best path across the internetwork using dynamic routing
algorithms.
The top three disadvantages of the router network device are:
 They work with routable network protocols.
 More expensive than other network devices.
 They are slower because they must analyze data from layer 1 to layer 3.

Bridge
In regards to networking (network devices bridge), a bridge is a device that connects
two LANs or two segments of the same LAN. Networking bridges are also known
as network bridges and bridging. There are two types of bridges: the Transparent
bridge and the Source Routing bridge.

33
Bridges, unlike routers, are protocol independent in that they can forward packets
without analyzing and re-routing messages. Bridging, in a nutshell, connects two
smaller networks to form a more extensive network.
Bridges’ primary function in network architecture is to store and forward frames
between the various segments that the bridge connects. They transfer frames using
hardware Media Access Control (MAC) addresses. Bridges can forward or prevent
data crossing by analyzing the MAC addresses. A bridge operates at the OSI
model’s Data Link layer (Layer 2).
The top three advantages of the bridge network device are:
 Reduces collisions
 Reduces network traffic with minor segmentation
 Connects similar network types with different cabling
The top three disadvantages of the bridge network device are:
 Does not filter broadcasts
 More expensive compared to repeaters
 Slower compare to repeaters due to the filtering process

Gateway
When referring to networking (network devices gateway), a gateway is a networked
device that serves as an entry point into another network. A wireless router, for
example, is frequently used as the default gateway in a home network. In short, a
gateway acts as a messenger agent, taking data from one network, interpreting it,
and transferring it to another. Gateways, also known as protocol converters,
can operate at any OSI model layer.
The top three advantages of the gateway network device are:
 Allows to broaden the network
 Handles traffic issues effectively
 Permits to link two different kinds of networks
The top three disadvantages of the gateway network device are:
 Never filter data
 Costly and difficult to manage
 Protocol conversion is performed, thus resulting in a slower transmission rate.

Modem (stands for modulator and demodulator)


Modem is define as a networking device that is used to connect devices connected in a network to
the internet.

In regards to networking (network devices modem), a modem is a piece of hardware


that enables a computer to transmit and receive data over telephone lines. In a
nutshell, a modem is a piece of hardware that connects a computer or router to a
broadband network.
function

34
-When a signal is sent, the device converts digital data to an analog audio signal and
sends it over a phone line. Similarly, when an analog signal is received, it is
converted back to a digital signal by the modem. Onboard modems, internal
modems, external modems, and removable modems are all examples of modems. A
modem operates at the OSI model’s physical layer (Layer 1) or Data link layer
(Layer 2), depending on the type.

Depending on direction of data transmission, modem can be of these types −

 Simplex − A simplex modem can transfer data in only one direction, from digital
device to network (modulator) or network to digital device (demodulator).
 Half duplex − A half-duplex modem has the capacity to transfer data in both the
directions but only one at a time.
 Full duplex − A full duplex modem can transmit data in both the directions
simultaneously.

The top three advantages of the modem network device are:


 Easily allows connecting LAN to internet
 Converts digital signal into an analog signal
 When compared to the hub, the speed is slow
 Perform modulation and demodulation simultameously.
The top three disadvantages of the modem network device are:
 It only serves as a bridge between the LAN and the internet.
 It cannot maintain its network traffic.
 High security risk.
 The modem is unaware of its destination path.

Repeater
With regards to networking (network devices repeater), a repeater is an item that
boosts the strength of a signal so that it can travel longer distances without losing
quality. These devices are commonly used in networks to help data reach further
destinations.
A range extender or wireless repeater, for example, is a repeater that extends the
range and strength of a Wi-Fi signal. A repeater is effective in office buildings,
schools, and factories where a single wireless router cannot reach all areas. A
repeater operates at the OSI model’s physical layer (Layer 1).
The top three advantages of the repeater network device are:
 Repeaters are simple to set up and inexpensive.
 Repeaters do not necessitate any additional processing.
 They can connect signals with various types of cables.
The top three disadvantages of the repeater network device are:
 Repeaters are unable to connect disparate networks.
 They are unable to distinguish between actual signals and noise.

35
 They will not be able to reduce network traffic.

Access Point
In terms of networking, an access point (AP) is a wireless network device that acts
as a portal for devices to connect to a local area network. Access points can extend
an existing network’s wireless coverage and increase the number of users who can
connect. Wireless access points (WAPs) are devices that combine a transmitter and
receiver (transceiver) to form a wireless LAN (WLAN). The access point operates at
the OSI model’s Data Link layer (Layer 2).
The top three advantages of the access point network device are:
 Installing is easier and faster.
 Allows data transmission even when the user is moving.
 It is simple to extend to places where wires and cables are inaccessible.
The top three disadvantages of the access point network device are:
 The range of network devices is limited, which causes issues for many users.
 Installing this network device is difficult and time-consuming.
 Because these network devices are susceptible to interference, fog and radiation
can cause them to malfunction.

What is Network 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.

Types of Network Topology


Physical topology is the geometric representation of all the nodes in a network.
There are six types of network topology which are Bus Topology, Ring Topology, Tree
Topology, Star Topology, Mesh Topology, and Hybrid Topology.

Physical network topologies can be classified as follows:

36
1. Point to Point

Point to Point is the simplest of all other network topologies. In this topology, two network
nodes (e.g., computers) are directly connected to one another by LAN cables or another type
of data transmission media.

Advantages

 Network operating system not required.


 The direct connection makes this connection faster and much more reliable than other
connections.
 It does not require an expensive server as individual workstations are used to access the
files.
 No dedicated network technicians are needed because each user manages their permissions.

Disadvantages

37
 The main drawback is that it can only be used in smaller areas where computers are in close
proximity.
 Centralized file and folder backups are not possible.
 Apart from permissions, there is no security. Users usually do not need to log onto their
workstations.

2. Bus network

All nodes in a bus topology are connected to a central shared cable known as a bus.
Additionally, the bus connects these nodes to the Taps and Drop Lines. Drop Lines are the
connection between the central wire or bus with the nodes. Taps are the 3-way connector that
helps to attach the drop line to the main central cable.

Advantages

 Although the cable is less expensive than other topologies, it is only utilized to build small
networks.
 It is famous for LAN (Local Area Network) because it is inexpensive and easy to install.
 It is frequently used when a network installation is small, simple, or temporary.

Disadvantages

 The entire system will crash down if the common cable fails.
 Collisions occur in the network when network traffic is high.
 The length of cables is always limited.
 There could also be security issues because every node in the network can hear what data is
transmitting to the other nodes.

38
3. Star network

In star topology, all the nodes (e.g., computers) are connected to a central hub with point-
to-point communication links. In this case, a point-to-point connection indicates that there is
a cable connecting each node to the main hub. Data transfers between these nodes take place
through the central device. It is most widely used on LAN networks since they are
inexpensive and easy to install.

Advantages

 By just checking the specific node that isn't working, it becomes easy to identify the faulty
nodes.
 The failure of a single node has no impact on the network as a whole. Therefore, such fault
can be tolerated and addressed later.
 Device addition, deletion, and movement are simple under a star topology.
 It has fast performance with few nodes and very low network traffic.

Disadvantages

 The greatest drawback of star topology is this. The entire network would be down if the
HUB/SWITCH itself experienced a problem.
 The number of physical ports offered by HUB/SWITCH limits the nodes linked to the star
topology.
 The installation of a star topology is expensive.

39
4. Ring network

There are many nodes in the Ring network, and each node is connected to two of its
neighbor nodes. It is referred to as a ring topology because of its ring-like structure. Every
computer in this topology is connected to every other computer. The last node and the first
node are connected in this topology. This topology uses tokens to pass the information
between the computers. All of the messages in this topology travel in the same direction
through a ring. Advantages

 Due to the simplicity of identifying defects in either nodes or cables, it is easier to manage
and install.
 In this type of topology, the possibility of collision is minimum.
 Only two connections need to be moved to add or remove a device from a ring topology.
 Less cabling is required because each node manages the cable to its nearest neighbor.

Disadvantages

 In this topology, troubleshooting is difficult.


 By removing or adding stations between other stations, the topology as a whole might be
affected.
 It is less secure because the data packet passes through every workstation connected.
 Topology signals flow continuously in the ring, resulting in unwanted power consumption.

5. Mesh network

40
Every node in a mesh topology is connected to as many other nodes as possible. It is done
to prevent network failure in case of any of the one node or cable failure. There are two
different types of mesh topology.

 Partial Mesh Topology


 Full Mesh Topology

1. Partial Mesh Topology: In a partial mesh topology, all nodes may not be directly
connected to every other node. Still, perhaps most nodes are connected by a point-to-
point connection.

2. Full Mesh Topology: In Full Mesh Topology, every node or device has a direct
point-to-point connection with all the other nodes in the network. Due to the direct
connections between all the other nodes, it almost eliminates the possibility of

41
network failure.

Advantages

 There are so many links, so there is minimal or no chance of network failure in the mesh
topology.
 Due to each node's separate links, each node can transfer data privately to any other node
within the network.
 This topology has no traffic problem because each node has a dedicated link.
 Point-to-point connections make the fault identification isolation process easy.

Disadvantages

 The cost of cables is high because it requires extra cables compared with other LAN
topologies.
 There is a lot of cabling to handle, so mesh topology implementation might be challenging.
 More space is required for dedicated links.

42
6. Tree network

In tree topology, all nodes are connected in such a way that they form a structure like a
tree. These node structures are used when a network needs to be divided into a subnetwork.
All nodes in the network tree are forming a tree structure, and Node A is the parent node of
all other nodes in the network, as can be seen by simply looking at the images below. Each
node in a tree topology is connected to the root node to form a hierarchy. Therefore, tree
topology is also referred to as hierarchical topology.

Advantages

 Every node has access to the large and intermediate network.


 Expansion of nodes is fast and easy.
 The network as a whole is never affected when one node (leaf nodes) affects.
 It is easy to manage and maintain.

Disadvantages

 It is possible that all the other nodes will become disconnected if the main central node
experiences a failure.
 When more nodes are added, maintaining it becomes difficult.
 The topology is highly cabled, which increases the cost.

43
7. Hybrid network

The combination of all the different types of topologies we have seen is known as hybrid
technology. This structure is used in which the nodes can take any form. This means that it
can only be a tree topology, a ring topology, or a star topology. Additionally, it may combine
all the types of network topology we have seen.

Advantages

 It is scalable, so you can expand the size of your network.


 It provides the simplest technique for identifying and resolving errors.
 It is a highly effective and flexible networking topology.

Disadvantages

 The design of hybrid topology is complex.


 It is one of the most expensive processes.

44
Logical Network Topology

In networking, a logical topology defines the architecture of the communication mechanism


for all nodes in a network. In other words, a logical topology describes the way how the data
flow from one node (e.g., computer) to another. Logical topology differs from physical
topology. A logical topology is how network devices appear connected to one another, while
a physical topology is how they are physically connected with wires and cables.

45
Difference between Connection-Oriented and
Connectionless Service

Both Connection-oriented service and Connection-less service are used for the
connection establishment between two or more two devices. These types of services
are offered by the network layer.
Connection-oriented service is related to the telephone system. It includes
connection establishment and connection termination. In a connection-oriented
service, the Handshake method is used to establish the connection between sender
and receiver.

Connection-less service is related to the postal system. It does not include any
connection establishment and connection termination. Connection-less Service does
not give a guarantee of reliability. In this, Packets do not follow the same path to
reach their destination.

S. Comparison Connection- Connection


N Parameter oriented Less Service
o Service

1. Related It is designed It is service


System and developed based on the
based on the postal system.
telephone
system.

2. Definition It is used to It is used to


create an end transfer the
to end data packets
connection between
between the senders to the
senders to the receiver
receiver before without
transmitting the creating any
data over the connection.
same or
different
network.

3. Virtual path It creates a It does not


virtual path create any

46
between the virtual
sender and the connection or
receiver. path between
the sender
and the
receiver.

4. Authenticatio It requires It does not


n authentication require
before authentication
transmitting the before
data packets to transferring
the receiver. data packets.

5. Data Packets All data packets Not all data


Path are received in packets are
the same order received in
as those sent by the same
the sender. order as those
sent by the
sender.

6. Bandwidth It requires a It requires low


Requirement higher bandwidth to
bandwidth to transfer the
transfer the data packets.
data packets.

7. Data It is a more It is not a


Reliability reliable reliable
connection connection
service because service
it guarantees because it
data packets does not
transfer from guarantee the
one end to the transfer of
other end with data packets
a connection. from one end
to another for
establishing a
connection.

8. Congestion There is no There may be

47
congestion as it congestion
provides an due to not
end-to-end providing an
connection end-to-end
between sender connection
and receiver between the
during source and
transmission of receiver to
data. transmit of
data packets.

9. Examples Transmission User


Control Datagram
Protocol (TCP) Protocol
is an example (UDP),
of a Internet
connection- Protocol (IP),
oriented and Internet
service. Control
Message
Protocol
(ICMP) are
examples of
connectionles
s service.

10. Application in Text Video


the real-world Communication Conferencing
, HyperText apps like
Transfer Zoom, Skype,
Protocol (HTTP), Gmeet, etc.
Simple Mail
Transfer
Protocol(SMTP),
etc.

48
Design issues with data link layer are :
1. Services provided to the network layer –
The data link layer act as a service interface to the network layer. The principle
service is transferring data from network layer on sending machine to the network
layer on destination machine. This transfer also takes place via DLL (Data link-
layer).
It provides three types of services:
1. Unacknowlwdged and connectionless services.
2. Acknowledged and connectionless services.
3. Acknowledged and connection-oriented services
Unacknowledged and connectionless services.
 Here the sender machine sends the independent frames without any
acknowledgement from the sender.
 There is no logical connection established.
Acknowledged and connectionless services.
 There is no logical connection between sender and receiver established.
 Each frame is acknowledged by the receiver.
 If the frame didn’t reach the receiver in a specific time interval it has to be
sent again.
 It is very useful in wireless systems.
Acknowledged and connection-oriented services
 A logical connection is established between sender and receiver before
data is trimester.
 Each frame is numbered so the receiver can ensure all frames have arrived
and exactly once.
2. Frame synchronization –
The source machine sends data in the form of blocks called frames to the destination
machine. The starting and ending of each frame should be identified so that the
frame can be recognized by the destination machine.
3. Flow control –
Flow control is done to prevent the flow of data frame at the receiver end. The
source machine must not send data frames at a rate faster than the capacity of
destination machine to accept them.
4. Error control –
Error control is done to prevent duplication of frames. The errors introduced during
transmission from source to destination machines must be detected and corrected at
the destination machine.

Data Link Layer is responsible for reliable point-to-point data transfer over a physical
medium. To implement this data link layer provides three functions :

 Line Discipline:
Line discipline is the functionality used to establish coordination between link systems. It
decides which device sends data and when.(who should send the data ?)

49
 Flow Control:
Flow control is an essential function that coordinates the amount of data the sender can
send before waiting for acknowledgment from the receiver.(how much data should be sent?)
 Error Control:
Error control is functionality used to detect erroneous transmissions in data frames and
retransmit them. (how can errors be detected and corrected)

What is Flow Control in the Data Link Layer?


Flow control is a set of procedures that restrict the amount of data a sender should send
before it waits for some acknowledgment from the receiver.

 Flow Control is an essential function of the data link layer.


 It determines the amount of data that a sender can send.
 It makes the sender wait until an acknowledgment is received from the receiver’s end.
 Methods of Flow Control are Stop-and-wait , and Sliding window.

Purpose of Flow Control


The device on the receiving end has a limited amount of memory (to store incoming data)
and limited speed (to process incoming data). The receiver might get overwhelmed if the rate
at which the sender sends data is faster or the amount of data sent is more than its capacity.

Buffers are blocks in the memory that store data until it is processed. If the buffer is
overloaded and there is more incoming data, then the receiver will start losing frames.

The flow control mechanism was devised to avoid this loss and wastage of frames.
Following this mechanism, the receiver, as per its capacity, sends an acknowledgment to send
fewer frames or temporarily halt the transmission until it can receive again.

Thus, flow control is the method of controlling the rate of transmission of data to a value that
the receiver can handle.

Methods to Control the Flow of Data

50
Stop-and-wait Protocol

Stop-and-wait protocol works under the assumption that the communication channel
is noiseless and transmissions are error-free.

Working:

 The sender sends data to the receiver.


 The sender stops and waits for the acknowledgment.
 The receiver receives the data and processes it.
 The receiver sends an acknowledgment for the above data to the sender.
 The sender sends data to the receiver after receiving the acknowledgment of previously sent
data.
 The process is unidirectional and continues until the sender sends the End of Transmission
(EoT) frame.

Sliding Window Protocol

The sliding window protocol is the flow control protocol for noisy channels that allows the
sender to send multiple frames even before acknowledgments are received. It is called
a Sliding window because the sender slides its window upon receiving the acknowledgments
for the sent frames.

Working:

 The sender and receiver have a “window” of frames. A window is a space that consists of
multiple bytes. The size of the window on the receiver side is always 1.
 Each frame is sequentially numbered from 0 to n - 1, where n is the window size at the
sender side.

51
 The sender sends as many frames as would fit in a window.
 After receiving the desired number of frames, the receiver sends an acknowledgment. The
acknowledgment (ACK) includes the number of the next expected frame.

Example:

1. The sender sends the frames 0 and 1 from the first window (because the window size
is 2).
2. The receiver after receiving the sent frames, sends an acknowledgment for frame 2 (as
frame 2 is the next expected frame).
3. The sender then sends frames 2 and 3. Since frame 2 is lost on the way, the receiver
sends back a “NAK” signal (a non-acknowledgment) to inform the sender that
frame 2 has been lost. So, the sender retransmits frame 2.

What is Error Control in the Data Link Layer?


Error Control is a combination of both error detection and error correction. It ensures that
the data received at the receiver end is the same as the one sent by the sender.

52
Error detection is the process by which the receiver informs the sender about any erroneous
frame (damaged or lost) sent during transmission.

Error correction refers to the retransmission of those frames by the


sender.

Purpose of Error Control


Error control is a vital function of the data link layer that detects errors in transmitted
frames and retransmits all the erroneous frames. Error discovery and amendment deal with
data frames damaged or lost in transit and the acknowledgment frames lost during
transmission. The method used in noisy channels to control these errors
is ARQ or Automatic Repeat Request.

Categories of Error Control


Stop-and-wait ARQ

 In the case of stop-and-wait ARQ after the frame is sent, the sender maintains a timeout
counter.
 If acknowledgment of the frame comes in time, the sender transmits the next frame in the
queue.
 Else, the sender retransmits the frame and starts the timeout counter.
 In case the receiver receives a negative acknowledgment, the sender retransmits the frame.

53
Sliding Window ARQ

To deal with the retransmission of lost or damaged frames, a few changes are made to the
sliding window mechanism used in flow control.

Two protocols used in sliding window ARQ:

Go-Back-N ARQ :

In Go-Back-N ARQ, if the sent frames are suspected or damaged, all the frames are re-
transmitted from the lost packet to the last packet

54
transmitted.

Selective Repeat ARQ:

Selective repeat ARQ/ Selective Reject ARQ is a type of Sliding Window ARQ in which
only the suspected or damaged frames are re-

55
transmitted.

Differences between Flow Control and Error Control


Flow control Error control

Flow control refers to the


Error control refers to the transmission of error-free and
transmission of data frames
reliable data frames from sender to receiver.
from sender to receiver.

Approaches for error detection are Checksum, Cyclic


Approaches for Flow Control :
Redundancy Check, and Parity Checking. Approaches for error
Feedback-based Flow Control
correction are Hamming code, Binary Convolution codes, Reed-
and Rate-based Flow Control.
Solomon code, and Low-Density Parity-Check codes.

Flow control focuses on the


proper flow of data and data Error control focuses on the detection and correction of errors.
loss prevention.

Examples of Flow Control


Examples of Error Control techniques are :
techniques are :
1. Stop and Wait for ARQ,
1. Stop and Wait for Protocol,
2. Sliding Window ARQ.
2. Sliding Window Protocol.

56
What is ARP?
ARP stands for Address Resolution Protocol which is a LAN protocol. It is a
process that links the Internet Protocol (IP) address to the media access
control (MAC) address, often known as a fixed physical machine address in a
local area network (LAN).

Types of ARP
They are divided into different types, namely

Proxy ARP

Proxy ARP is a method for responding to an ARP request for an IP address


that is not on the same network as the proxy device. The proxy gives its own
MAC address as the destination because it is aware of the traffic's final
destination's location.

Reverse ARP (RARP)

The Reverse Address Resolution Protocol (RARP) is a protocol for address


discovery that can be used by hosts that are unaware of their IP address.

Inverse ARP (IARP)

IARP uses a MAC address to find an IP address as opposed to ARP, which


uses an IP address.

Gratuitous ARP

This ARP is used by hosts on networks as a mechanism to publish or change


their IP to MAC addresses and is almost like an administrative procedure. An
ARP request to convert an IP address to a MAC address does not trigger
gratuitous ARP.

What is RARP?
A TCP/IP protocol called RARP is in charge of converting physical addresses
(MAC addresses) into IP addresses. For example, Diskless Workstations have

57
only the MAC address but do not have IP addresses. So using the RARP
protocol one can find the IP address via any external source.

Key differences between ARP and RARP


Protocol
There are various key differences between ARP and RARP Protocols. Some of the
key differences between ARP and RARP Protocols are as follows:

1. The ARP protocol obtains the receiver's physical address. In contrast, the RARP
protocol obtains the protocol's logical (IP) address.
2. ARP protocol translates a 32-bit logical (IPv4) address to a receiver's 48-bit
physical address. In contrast, the RARP protocol transfers the receiver's 48-bit
physical address to its 32-bit logical address.
3. ARP protocol is utilized by the router or host to determine the address
(physical address) of another router/host in the LAN network. In contrast, the
RARP protocol is operated by small clients with low resources.
4. The local host manages or handles the ARP protocol table. In contrast, the
RARP server administers or handles the RARP protocol table.
5. ARP protocol is utilized by hosts and routers to determine the other host's
and router's MAC addresses in the network. In contrast, the RARP protocol is
utilized by small users with limited facilities.
6. The ARP protocol reply is mostly utilized to update or modify the ARP table. In
contrast, the RARP protocol reply is primarily utilized to set the local host's IP
address.
7. The client broadcasts its IP address and asks for a MAC address through ARP
protocol, and the server answers with the associated MAC address. In contrast,

58
in the RARP protocol, the client broadcasts its MAC address and asks for an IP
address, and the server answers with the associated IP address.
8. The ARP protocol utilizes the value 1 for requests or asks and the value
2 for answers. In contrast, the RARP protocol utilizes the value
3 for requests or asks and the value 4 for answers.

Head-to-head comparison between ARP


and RARP Protocol
Here, you will learn head-to-head comparisons between ARP and RARP Protocol. The
main differences between ARP and RARP Protocol are as follows:

Features ARP Protocol RARP Protocol

Full Form The ARP is commonly known as an Address The RARP is commonly known
Resolution Protocol. as a Reverse Address
Resolution Protocol.

Basics It achieves the receiver's physical address. It achieves the protocol's


logical (IP) address.

Definition The MAC address of the user or server is The client's IP address is
converted to the IP address of the host. mapped from the server's
MAC address.

Broadcast The nodes utilize broadcast MAC addresses Broadcast IP address is


MAC/IP to employ the ARP protocol broadcast in a utilized by the RARP protocol.
LAN network.

Table The local host maintains and handles the ARP The RARP server maintains
Maintained table. and handles the RARP table.

Utilization It is utilized by the router or host to It is utilized by thin clients


determine the address (physical address) of with low resources.
another router/host in the LAN network.

Mapping It translates a 32-bit logical (IPv4) address to It maps the receiver's 48-bit
a receiver's 48-bit physical address. physical address to its 32-bit
logical address.

Reply Its reply is mostly utilized to update or modify Its reply is primarily utilized to
Information the ARP table. set the local host's IP address.

59
Values It utilizes the value 1 for requests or asks and It utilizes the value 3 for
the value 2 for answers. requests or asks and the value
4 for answers.

IP address It will help to identify the IP address of several It will assist in identifying the
systems. IP address of the same
system.

Multiple Access Protocols in Computer


Network


The Data Link Layer is responsible for transmission of data between two nodes. Its
main functions are-
 Data Link Control
 Multiple Access Control
Multiple Access Control –
If there is a dedicated link between the sender and the receiver then data link control
layer is sufficient, however if there is no dedicated link present then multiple stations
can access the channel simultaneously. Hence multiple access protocols are required
to decrease collision and avoid crosstalk. For example, in a classroom full of
students, when a teacher asks a question and all the students (or stations) start
answering simultaneously (send data at same time) then a lot of chaos is
created( data overlap or data lost) then it is the job of the teacher (multiple access
protocols) to manage the students and make them answer one at a time.
Thus, protocols are required for sharing data on non dedicated channels. Multiple
access protocols can be subdivided further as –

60
1. Random Access Protocol: In this, all stations have same superiority that is no
station has more priority than another station. Any station can send data depending
on medium’s state( idle or busy). It has two features:
1. There is no fixed time for sending data
2. There is no fixed sequence of stations sending data
The Random access protocols are further subdivided as:

o Aloha
o CSMA
o CSMA/CD
o CSMA/CA

(a) ALOHA – It was designed for wireless LAN but is also applicable for
shared medium. In this, multiple stations can transmit data at the same
time and can hence lead to collision and data being garbled.

Pure Aloha

61
 Pure Aloha:
When a station sends data it waits for an acknowledgement. If the
acknowledgement doesn’t come within the allotted time then the
station waits for a random amount of time called back-off time (Tb)
and re-sends the data. Since different stations wait for different
amount of time, the probability of further collision decreases.
Vulnerable Time = 2* Frame transmission time
Throughput = G exp{-2*G}
Maximum throughput = 0.184 for G=0.5
 Slotted Aloha:
The slotted Aloha is designed to overcome the pure Aloha's efficiency because
pure Aloha has a very high possibility of frame hitting. 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.
Vulnerable Time = Frame transmission time
Throughput = G exp{-*G}
Maximum throughput = 0.368 for G=1

Difference between Pure Aloha and Slotted Aloha


The following table highlights the important differences between Pure Aloha
and Slotted Aloha.

Key Pure Aloha Slotted Aloha

Time Slot In Pure Aloha, any In Slotted Aloha,


station can transmit any station can
data at any time. transmit data only
at the beginning of
a time slot.

Time In Pure Aloha, time In Slotted Aloha,


is continuous and is time is discrete and
not globally is globally
synchronized. synchronized.

62
Key Pure Aloha Slotted Aloha

Vulnerable The vulnerable time In Slotted Aloha,


time or susceptible time the vulnerable time
in Pure Aloha is is equal to (Tt).
equal to (2×Tt).

Probability The probability of The probability of


successful successful
transmission of a transmission of
data data
packet S=G×e−2G packet S=G×e−G

Maximum Maximum efficiency Maximum efficiency


efficiency = 18.4%. = 36.8%.

Number of Does not reduce the Slotted Aloha


collisions number of reduces the number
collisions. of collisions to half,
thus doubles the
efficiency.

b)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.

63
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.

CSMA/ CD

It is a carrier sense multiple access/ collision detection network protocol to


transmit data frames. The CSMA/CD protocol works with a medium access control
layer. Therefore, it first senses the shared channel before broadcasting the frames,
and if the channel is idle, it transmits a frame to check whether the transmission was
successful. If the frame is successfully received, the station sends another frame. If
any collision is detected in the CSMA/CD, the station sends a jam/ stop signal to the

64
shared channel to terminate data transmission. After that, it waits for a random time
before sending a frame to a channel.

(c)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.

Following are the methods used in the CSMA/ CA to avoid the collision:

Interframe space: In this method, the station waits for the channel to become idle,
and if it gets the channel is idle, it does not immediately send the data. Instead of
this, it waits for some time, and this time period is called the Interframe space or IFS.
However, the IFS time is often used to define the priority of the station.

Contention window: In the Contention window, the total time is divided into
different slots. When the station/ sender is ready to transmit the data frame, it
chooses a random slot number of slots as wait time. If the channel is still busy, it
does not restart the entire process, except that it restarts the timer only to send data
packets when the channel is inactive.

Acknowledgment: In the acknowledgment method, the sender station sends the


data frame to the shared channel if the acknowledgment is not received ahead of
time.

2. Controlled Access:
In this, the data is sent by that station which is approved by all other stations.
3. Channelization:
In this, the available bandwidth of the link is shared in time, frequency and
code to multiple stations to access channel simultaneously.

(b)

65
High-level Data Link Control (HDLC)

High-level Data Link Control (HDLC) is a group of communication protocols of


the data link layer for transmitting data between network points or nodes.
Since it is a data link protocol, data is organized into frames. A frame is
transmitted via the network to the destination that verifies its successful
arrival. It is a bit - oriented protocol that is applicable for both point - to -
point and multipoint communications.
HDLC is the most widely used protocol and offers reliability, efficiency, and a high level of
Flexibility.

Transfer Modes
HDLC supports two types of transfer modes, normal response mode and
asynchronous balanced mode.

 Normal Response Mode (NRM) − Here, two types of stations are there, a primary
station that send commands and secondary station that can respond to received
commands. It is used for both point - to - point and multipoint communications.

 Asynchronous Balanced Mode (ABM) − Here, the configuration is balanced, i.e. each
station can both send commands and respond to commands. It is used for only point - to -
point communications.

66
HDLC Frame format
HDLC is a bit - oriented protocol where each frame contains up to six fields.
There is a beginning flag field, the address field then, a control field, an information
field, a frame check sequence field(FCS), and an ending field. The structure varies
according to the type of frame. The fields of a HDLC frame are −

 Flag − It is an 8-bit sequence that marks the beginning and the end of the frame. The bit
pattern of the flag is 01111110.
 Address − It contains the address of the receiver. If the frame is sent by the primary
station, it contains the address(es) of the secondary station(s). If it is sent by the
secondary station, it contains the address of the primary station. The address field may be
from 1 byte to several bytes.
 Control − It is 1 or 2 bytes containing flow and error control information.
 Payload − This carries the data from the network layer. Its length may vary from one
network to another.
 FCS − It is a 2 byte or 4 bytes frame check sequence for error detection. The standard
code used is CRC (cyclic redundancy code)

67
Types of HDLC Frames
There are three types of HDLC frames. The type of frame is determined by
the control field of the frame −

 I-frame − I-frames or Information frames carry user data from the network layer. They
also include flow and error control information that is piggybacked on user data. The first
bit of control field of I-frame is 0.
 S-frame − S-frames or Supervisory frames do not contain information field. They are
used for flow and error control when piggybacking is not required. The first two bits of
control field of S-frame is 10.
 U-frame − U-frames or Un-numbered frames are used for myriad miscellaneous
functions, like link management. It may contain an information field, if required. The first
two bits of control field of U-frame is 11.

Features of HDLC Protocol


Some of the HDLC protocol's characteristics are listed below:
1. In this protocol, bits are used to stuff flags in the data

2. This protocol is used to access both point-to-point and multipoint links

3. HDLC is one of the most widely used data link layer protocols

68
4. HDLC is a protocol that is based on bits

5. Error control and flow control are both implemented in this protocol

What is the importance of HDLC protocol?


The HDLC protocol (High-Level Data Link Control) is vital because it provides a
dependable and efficient method of delivering data via point-to-point and multipoint
communication systems. It is commonly utilized in data transfer applications that are
both synchronous and asynchronous.

Difference between MAC Address and IP Address

Both MAC Address and IP Address are used to uniquely identify a machine on
the internet. MAC address is provided by the chip maker while IP Address is
provided by the Internet Service Provider.

Mac Address
Media Access Control (MAC) address is a physical address that works at the
data link layer of the OSI model.

 A MAC address is a 48 or 64-bit address associated with a network adapter.


 MAC addresses are linked to the hardware of the network adapters, hence they are also
known as the "hardware address" or "physical address."
 MAC addresses uniquely identify the adapter on the LAN.
 MAC addresses are expressed in hexadecimal notation. For example, "01-23-45-67-89-
AB" in a 48-bit address or "01-23-45-67-89-AB-CD-EF" in a 64-bit address. Sometimes,
colons (:) are used instead of dashes (-).
 MAC addresses are often considered permanent, but in some conditions, they can be
changed.

There are three types of MAC addresses −

 Unicast MAC Address


 Multicast MAC address
 Broadcast MAC address
MAC Address Format

69
A 48-bit MAC address is represented as a string of six octets,
"MM:MM:MM:SS:SS:SS".

 The first half (24 bits) of the MAC address contains the ID number of the adapter
manufacturer. These IDs are regulated by an Internet standards organization.
 The second half (24 more bits) of the MAC address represents the serial number assigned
to the adapter by the manufacturer.

IP address
An IP address represents a unique address that distinguishes any device on the internet
or any network from another.

An IP address is the identifier that enables your device to send or receive data
packets across the internet. It holds information related to your location and
therefore making devices available for two-way communication.

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.

Need

if someone wants to send you a mail then he/she must have your home address.
Similarly, your computer too needs an address so that other computers on the
internet can communicate with each other without the confusion of delivering
information to someone else’s computer. And that is why each computer in this
world has a unique IP Address.

Types of IP address
There are mainly four types of IP addresses:

 Public (each of the connected devices has the same IP address)


 Private (unique IP number assigned to every device)
 Static (an IP address that cannot be changed)
 Dynamic (Dynamic IP addresses always keep changing)

Version of IP address

70
Two types of IP addresses are 1)IPV4 and 2) IPV6.

1. IPv4: Internet Protocol version 4. It consists of 4 numbers separated by


the dots. Each number can be from 0-255 in decimal numbers. But
computers do not understand decimal numbers, they instead change
them to binary numbers which are only 0 and 1. Therefore, in binary,
this (0-255) range can be written as (00000000 – 11111111). Since
each number N can be represented by a group of 8-digit binary digits.
So, a whole IPv4 binary address can be represented by 32-bits of
binary digits.
 IPv4 can be written as:
189.123.123.90
IPv4 was the first version of IP. It was deployed for production in the
ARPANET in 1983. Today it is the most widely used IP version. It is used
to identify devices on a network using an addressing system.

The IPv4 uses a 32-bit address scheme allowing to store 2^32 addresses,
which is more than 4 billion addresses. To date, it is considered the
primary Internet Protocol and carries 94% of Internet traffic.

2.IPv6

This new IP address version is being deployed to fulfill the need for
more Internet addresses. It was aimed to resolve issues which are
associated with IPv4. With 128-bit address space, it allows 340
undecillion unique address space.

there is a problem with the IPv4 address. With IPv4, we can connect only the above
number of 4 billion devices uniquely, and apparently, there are much more devices
in the world to be connected to the internet. So, gradually we are making our way
to IPv6 Address which is a 128-bit IP address. In human-friendly form, IPv6 is
written as a group of 8 hexadecimal numbers separated with colons(:). But in the
computer-friendly form, it can be written as 128 bits of 0s and 1s. Since, a unique
sequence of binary digits is given to computers, smartphones, and other devices to
be connected to the internet. So, via IPv6 a total of (2^128) devices can be assigned
with unique addresses which are actually more than enough for upcoming future
generations.

IPv6 can be written as:


71
Ipv6
Ipv4

Address length IPv4 is a 32-bit address. IPv6 is a 128-bit address.

Fields IPv4 is a numeric address that consists IPv6 is an alphanumeric address


of 4 fields which are separated by dot that consists of 8 fields, which
(.). are separated by colon.

Classes IPv4 has 5 different classes of IP IPv6 does not contain classes of
address that includes Class A, Class B, IP addresses.
Class C, Class D, and Class E.

Number of IP IPv4 has a limited number of IP IPv6 has a large number of IP


address addresses. addresses.

VLSM It supports VLSM (Virtual Length It does not support VLSM.


Subnet Mask). Here, VLSM means that
Ipv4 converts IP addresses into a
subnet of different sizes.

Address It supports manual and DHCP It supports manual, DHCP, auto-


configuration configuration. configuration, and renumbering.

Address space It generates 4 billion unique It generates 340 undecillion


addresses unique addresses.

End-to-end In IPv4, end-to-end connection In the case of IPv6, end-to-end


connection integrity is unachievable. connection integrity is
integrity achievable.

Security features In IPv4, security depends on the In IPv6, IPSEC is developed for
application. This IP address is not security purposes.
developed in keeping the security
feature in mind.

Address In IPv4, the IP address is represented In IPv6, the representation of the


representation in decimal. IP address in hexadecimal.

Fragmentation Fragmentation is done by the senders Fragmentation is done by the


and the forwarding routers. senders only.

Packet flow It does not provide any mechanism It uses flow label field in the

72
identification for packet flow identification. header for the packet flow
identification.

Checksum field The checksum field is available in IPv4. The checksum field is not
available in IPv6.

Transmission IPv4 is broadcasting. On the other hand, IPv6 is


scheme multicasting, which provides
efficient network operations.

Encryption and It does not provide encryption and It provides encryption and
Authentication authentication. authentication.

Number of octets It consists of 4 octets. It consists of 8 fields, and each


field contains 2 octets. Therefore,
the total number of octets in
IPv6 is 16.

Difference between Unicast, Broadcast and


Multicast in Computer Network
Feature Unicast Broadcast Multicast

A communication
A communication A communication
where a message is
where a message is where a message is
Definition sent from one sender
sent from one sender sent from one sender
to a group of
to one receiver. to all receivers.
receivers

Data is sent to all


Data is sent to a Data is sent to a
Transmission recipients in a
single recipient group of recipients
network

Uses a unique Uses a special Uses a special


Addressing
destination address broadcast address multicast address

Not all devices may Not all devices may


Delivery Guaranteed delivery be interested in the be interested in the
data data

Network Generates the least Generates the most Generates moderate

73
amount of network amount of network
Traffic network traffic
traffic traffic

Less secure because Moderately secure


More secure because
data is sent to all because data is sent
Security data is sent to a
devices in the to a specific group of
specific recipient
network devices

DHCP requests, Video streaming,


Examples Email, file transfer
ARP requests online gaming

Destination Single receiver All receivers Grop of receivers

Bandwidth
Moderate High Moderate
usage

Latency Low High Moderate

1. Unicast:

This type of information transfer is useful when there is a participation of a single


sender and a single recipient. So, in short, you can term it a one-to-one transmission.
For example, if a device having IP address 10.1.2.0 in a network wants to send the
traffic stream(data packets) to the device with IP address 20.12.4.2 in the other
network, then unicast comes into the picture. This is the most common form of data
transfer over networks.

74
2. Broadcast:

Broadcasting transfer (one-to-all) techniques can be classified into two types:


Limited Broadcasting: Suppose you have to send a stream of packets to all the
devices over the network that your reside, this broadcasting comes in handy. For this
to achieve, it will append 255.255.255.255 (all the 32 bits of IP address set to 1)
called Limited Broadcast Address in the destination address of the datagram
(packet) header which is reserved for information transfer to all the recipients from a
single client (sender) over the network.

75
Direct Broadcasting: This is useful when a device in one network wants to transfer
packet stream to all the devices over the other network. This is achieved by
translating all the Host ID part bits of the destination address to 1, referred to
as Direct Broadcast Address in the datagram header for information transfer.

This mode is mainly utilized by television networks for video and audio
distribution. One important protocol of this class in Computer Networks is Address
Resolution Protocol (ARP) which is used for resolving an IP address into a physical
address which is necessary for underlying communication.

3. Multicast:

In multicasting, one/more senders and one/more recipients participate in data


transfer traffic. In this method traffic recline between the boundaries of unicast (one-
to-one) and broadcast (one-to-all). Multicast lets servers direct single copies of data
streams that are then simulated and routed to hosts that request it. IP multicast
requires the support of some other protocols like IGMP (Internet Group
Management Protocol), Multicast routing for its work. Also in Classful IP
addressing Class D is reserved for multicast groups.

Routing
o A Router is a process of selecting path along which the data can be transferred from
source to the destination. Routing is performed by a special device known as a router.
o A Router works at the network layer in the OSI model and internet layer in TCP/IP
model
o A router is a networking device that forwards the packet based on the information
available in the packet header and forwarding table.

76
o The routing algorithms are used for routing the packets. The routing algorithm is
nothing but a software responsible for deciding the optimal path through which
packet can be transmitted.
o The routing protocols use the metric to determine the best path for the packet
delivery. The metric is the standard of measurement such as hop count, bandwidth,
delay, current load on the path, etc. used by the routing algorithm to determine the
optimal path to the destination.
o The routing algorithm initializes and maintains the routing table for the process of
path determination.

IP Routing:

IP routing is the process that defines the shortest path through which data travels to
reach from source to destination. It determines the shortest path to send the data
from one computer to another computer in the same or different network.

How does IP routing work?

When the data is sent from the source to the destination the TCP and other protocols
of the source work and form an IP packet that is sent to the network. When an IP
packet is sent to the network from the source it has to pass through multiple routers
to reach the destination. The router in the network gets the destination address from
the packet and through its routing table identifies the next router information to
which the data packet has to be passed. The routing table of the router includes
various information about the next router, its cost, and other necessary information.
The router takes the routing decision with the help of routing protocols and a routing
table to which next router the packet has to be sent to find the best route to reach the
destination. Different packets can be sent through different paths but all the packets
reach their intended destination. When the packets reach the destination through
different routers it sends them to the TCP for further processing.

Different Types of Routing:

There are three different types of routing:


1. Static Routing
2. Dynamic Routing
3. Default Routing
Static Routing: In this type of routing the routing table is updated by the network
administrator.
Dynamic Routing: In this type of routing the routing table is automatically updated
using routing protocols.

77
Default Routing: In this type of routing the router is configured to send all the data
towards a specific router. This routing is generally used with the stub routers.

Routing Protocols:
For taking routing decisions router needs various routing protocols and a routing
table. The routing protocols are divided into two domains:
1. Interdomain Routing protocols
2. Intradomain Routing protocols

Routing Algorithm
The network layers give a routing protocol, which may be a routing algorithm in
computer networking that decides the best possible and minimum cost pathway
for data communication from the supply to the destination location.

Types of Routing Algorithms


Routing algorithms can be broadly categorized into two types, adaptive and
nonadaptive routing algorithms. They can be further categorized as shown in
the following diagram −

78
Adaptive Routing Algorithms
Adaptive routing algorithms, also known as dynamic routing algorithms,
makes routing decisions dynamically depending on the network conditions. It
constructs the routing table depending upon the network traffic and topology.
They try to compute the optimized route depending upon the hop count,
transit time and distance.

The three popular types of adaptive routing algorithms are −

 Centralized algorithm − It finds the least-cost path between source and destination
nodes by using global knowledge about the network. So, it is also known as global
routing algorithm.
 Isolated algorithm − This algorithm procures the routing information by using local
information instead of gathering information from other nodes.
 Distributed algorithm − This is a decentralized algorithm that computes the least-cost
path between source and destination iteratively in a distributed manner.

Non – Adaptive Routing Algorithms


Non-adaptive Routing algorithms, also known as static routing algorithms,
construct a static routing table to determine the path through which packets
are to be sent. The static routing table is constructed based upon the routing
information stored in the routers when the network is booted up.

79
The two types of non – adaptive routing algorithms are −

 Flooding − In flooding, when a data packet arrives at a router, it is sent to all the
outgoing links except the one it has arrived on. Flooding may be uncontrolled, controlled
or selective flooding.
 Random walks − This is a probabilistic algorithm where a data packet is sent by the
router to any one of its neighbours randomly.

Dijkstra's Algorithm
(least cost routing algo.)
Dijkstra's Algorithm. Dijkstra's Algorithm is a Graph algorithm that finds the shortest
path from a source vertex to all other vertices in the Graph (single source shortest path). It is
a type of Greedy Algorithm that only works on Weighted Graphs having positive weights.
The time complexity of Dijkstra's Algorithm is O(V2) with the help of the adjacency matrix
representation of the graph. This time complexity can be reduced to O((V + E) log V) with
the help of an adjacency list representation of the graph, where V is the number of vertices
and E is the number of edges in the graph.

Understanding the Working of Dijkstra's Algorithm


A graph and source vertex are requirements for Dijkstra's Algorithm. This Algorithm
is established on Greedy Approach and thus finds the locally optimal choice (local
minima in this case) at each step of the Algorithm.

Understanding Dijkstra's Algorithm with an


Example
The following is the step that we will follow to implement Dijkstra's Algorithm:

Step 1: First, we will mark the source node with a current distance of 0 and set the
rest of the nodes to INFINITY.

Step 2: We will then set the unvisited node with the smallest current distance as the
current node, suppose X.

80
Step 3: For each neighbor N of the current node X: We will then add the current
distance of X with the weight of the edge joining X-N. If it is smaller than the current
distance of N, set it as the new current distance of N.

Step 4: We will then mark the current node X as visited.

Step 5: We will repeat the process from 'Step 2' if there is any node unvisited left in
the graph.

Let us now understand the implementation of the algorithm with the help of an
example:

Figure 6: The Given Graph

1. We will use the above graph as the input, with node A as the source.
2. First, we will mark all the nodes as unvisited.
3. We will set the path to 0 at node A and INFINITY for all the other nodes.
4. We will now mark source node A as visited and access its neighboring nodes.
Note: We have only accessed the neighboring nodes, not visited them.
5. We will now update the path to node B by 4 with the help of relaxation
because the path to node A is 0 and the path from node A to B is 4, and
the minimum((0 + 4), INFINITY) is 4.
6. We will also update the path to node C by 5 with the help of relaxation
because the path to node A is 0 and the path from node A to C is 5, and
the minimum((0 + 5), INFINITY) is 5. Both the neighbors of node A are now
relaxed; therefore, we can move ahead.
7. We will now select the next unvisited node with the least path and visit it.
Hence, we will visit node B and perform relaxation on its unvisited neighbors.
After performing relaxation, the path to node C will remain 5, whereas the
path to node E will become 11, and the path to node D will become 13.

81
8. We will now visit node E and perform relaxation on its neighboring nodes B,
D, and F. Since only node F is unvisited, it will be relaxed. Thus, the path to
node B will remain as it is, i.e., 4, the path to node D will also remain 13, and
the path to node F will become 14 (8 + 6).
9. Now we will visit node D, and only node F will be relaxed. However, the path
to node F will remain unchanged, i.e., 14.
10. Since only node F is remaining, we will visit it but not perform any relaxation
as all its neighboring nodes are already visited.
11. Once all the nodes of the graphs are visited, the program will end.

Hence, the final paths we concluded are:

1. A = 0
2. B = 4 (A -> B)
3. C = 5 (A -> C)
4. D = 4 + 9 = 13 (A -> B -> D)
5. E = 5 + 3 = 8 (A -> C -> E)
6. F = 5 + 3 + 6 = 14 (A -> C -> E -> F

Some Applications of Dijkstra's Algorithm


Digital Mapping Services in Google Maps: There are various times when we have
tried to find the distance in Google Maps either from our location to the nearest
preferred location or from one city to another, which comprises multiple
routes/paths connecting them; however, the application must display the minimum
distance. This is only possible because Dijkstra's algorithm helps the application find
the shortest between two given locations along the path.

Social Networking Applications: In many applications like Facebook, Twitter,


Instagram, and more, many of us might have observed that these apps suggest the
list of friends that a specific user may know. The standard Dijkstra's Algorithm is
generally used to estimate the shortest distance between the users measured
through the connections or mutuality among them.

Robotic Path: These days, drones and robots have come into existence, some
operated manually and some automatically. The drones and robots which are
operated automatically and used to deliver the packages to a given location or used
for any certain task are configured with Dijkstra's Algorithm module so that
whenever the source and destination are known, the drone and robot will move in

82
the ordered direction by following the shortest path keeping the time taken to a
minimum in order to deliver the packages

~It is used in the telephone network

Designate the File Server: Dijkstra's Algorithm is also used to designate a file server in a
Local Area Network (LAN).

Bellman Ford Algorithm


(Distance vector routing algorithm)
Bellman ford algorithm is a single-source shortest path algorithm. This algorithm is used to
find the shortest distance from the single vertex to all the other vertices of a weighted graph.
There are various other algorithms used to find the shortest path like Dijkstra algorithm, etc.
If the weighted graph contains the negative weight values, then the Dijkstra algorithm does
not confirm whether it produces the correct answer or not. In contrast to Dijkstra algorithm,
bellman ford algorithm guarantees the correct answer even if the weighted graph contains
the negative weight values.

The Bellman-Ford algorithm is an example of Dynamic Programming


The Bellman-Ford algorithm follows the bottom-up approach.

 Complexity of Bellman Ford Algorithm


o Time complexity O(V.E).

 How Bellman Ford's algorithm works


 Bellman Ford algorithm works by overestimating the length of the path from the

starting vertex to all other vertices. Then it iteratively relaxes those estimates by

finding new paths that are shorter than the previously overestimated paths.

 By doing this repeatedly for all vertices, we can guarantee that the result is

optimized.

83

Step-1 for Bellman Ford's algorithm

Step-2 for Bellman Ford's algorithm

Step-3 for Bellman Ford's algorithm

84
Step-4 for Bellman Ford's algorithm

Step-5 for Bellman Ford's algorithm

Step-6 for Bellman Ford's algorithm

Bellman Ford’s Algorithm Applications:

85
 Network Routing: Bellman-Ford is used in computer networking to find the shortest paths in
routing tables, helping data packets navigate efficiently across networks.
 GPS Navigation: GPS devices use Bellman-Ford to calculate the shortest or fastest routes
between locations, aiding navigation apps and devices.
 Transportation and Logistics: Bellman-Ford’s algorithm can be applied to determine the
optimal paths for vehicles in transportation and logistics, minimizing fuel consumption and
travel time.
 Game Development: Bellman-Ford can be used to model movement and navigation within
virtual worlds in game development, where different paths may have varying costs or obstacles.
 Robotics and Autonomous Vehicles: The algorithm aids in path planning for robots or
autonomous vehicles, considering obstacles, terrain, and energy consumption.
Drawback of Bellman Ford’s Algorithm:
 Bellman-Ford algorithm will fail if the graph contains any negative edge cycle.

TCP and UDP


Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) both are protocols of the Transport
Layer. TCP is a connection-oriented protocol where as UDP is a part of the Internet Protocol suite, referred to
as the UDP/IP suite. Unlike TCP, it is an unreliable and connectionless protocol.

Transmission Control Protocol (TCP)


TCP (Transmission Control Protocol) is one of the main protocols of the Internet protocol suite. It lies
between the Application and Network Layers which are used in providing reliable delivery services. It is a
connection-oriented protocol for communications that helps in the exchange of messages between different
devices over a network. The Internet Protocol (IP), which establishes the technique for sending data packets
between computers, works with TCP.

Transmission Control Protocol

86
Features of TCP

 TCP keeps track of the segments being transmitted or received by assigning numbers to every
single one of them.
 Flow control limits the rate at which a sender transfers data. This is done to ensure reliable
delivery.
 TCP implements an error control mechanism for reliable data transfer.
 TCP takes into account the level of congestion in the network.

Advantages of TCP

 It is reliable for maintaining a connection between Sender and Receiver.


 It is responsible for sending data in a particular sequence.
 Its operations are not dependent on OS.
 It allows and supports many routing protocols.
 It can reduce the speed of data based on the speed of the receiver.

Disadvantages of TCP

 It is slower than UDP and it takes more bandwidth.


 Slower upon starting of transfer of a file.
 Not suitable for LAN and PAN Networks.
 It does not have a multicast or broadcast category.
 It does not load the whole page if a single data of the page is missing.
User Datagram Protocol (UDP)
User Datagram Protocol (UDP) is a Transport Layer protocol. UDP is a part of the Internet Protocol suite,
referred to as the UDP/IP suite. Unlike TCP, it is an unreliable and connectionless protocol. So, there is no
need to establish a connection before data transfer. The UDP helps to establish low-latency and loss-
tolerating connections establish over the network. The UDP enables process-to-process communication.

User Datagram Protocol

Features of UDP

 Used for simple request-response communication when the size of data is less and hence there is
lesser concern about flow and error control.
 It is a suitable protocol for multicasting as UDP supports packet switching.
 UDP is used for some routing update protocols like RIP(Routing Information Protocol).

87
 Normally used for real-time applications which can not tolerate uneven delays between sections
of a received message.

Advantages of UDP

 It does not require any connection for sending or receiving data.


 Broadcast and Multicast are available in UDP.
 UDP can operate on a large range of networks.
 UDP has live and real-time data.
 UDP can deliver data if all the components of the data are not complete.

Disadvantages of UDP

 We can not have any way to acknowledge the successful transfer of data.
 UDP cannot have the mechanism to track the sequence of data.
 UDP is connectionless, and due to this, it is unreliable to transfer data.
 In case of a Collision, UDP packets are dropped by Routers in comparison to TCP.
 UDP can drop packets in case of detection of errors.
Which Protocol is Better: TCP or UDP?
The answer to this question is difficult because it totally depends on what work we are doing and what type
of data is being delivered. UDP is better in the case of online gaming as it allows us to work lag-free. TCP is
better if we are transferring data like photos, videos, etc. because it ensures that data must be correct has to be
sent.
In general, both TCP and UDP are useful in the context of the work assigned by us. Both have advantages
upon the works we are performing, that’s why it is difficult to say, which one is better.

Difference Between TCP and UDP

Where TCP is Used?


 Sending Emails
 Transferring Files
 Web Browsing
Where UDP is Used?
 Gaming
 Video Streaming

88
 Online Video Chats
Differences between TCP and UDP
The main differences between TCP (Transmission Control Protocol) and UDP (User
Datagram Protocol) are:

Transmission Control User Datagram


Basis Protocol (TCP) Protocol (UDP)

UDP is the
Datagram-oriented
protocol. This is
because
TCP is a connection-oriented there is no overhead
protocol. Connection for opening a
orientation means that the connection,
communicating devices should maintaining a
Type of Service
establish a connection before connection, or
transmitting data and should terminating a
close the connection after connection. UDP is
transmitting the d ata. efficient for
broadcast and
multicast types of
network
transmission.

The delivery of data


TCP is reliable as it guarantees
to the destination
Reliability the delivery of data to the
cannot be
destination router.
guaranteed in UDP.

TCP provides extensive error- UDP has only the


checking mechanisms. basic error-
Error checking mechanism It is because it provides flow checking
control and acknowledgment of mechanism using
data. checksums.

No
An acknowledgment segment is
Acknowledgment acknowledgment
present.
segment.

89
Transmission Control User Datagram
Basis Protocol (TCP) Protocol (UDP)

There is no
Sequencing of data is a feature
sequencing of data
of Transmission Control
in UDP. If the order
Sequence Protocol (TCP). this means that is required, it has to
packets arrive in order at the be managed by the
receiver.
application layer.

UDP is faster,
TCP is comparatively slower
Speed simpler, and more
than UDP.
efficient than TCP.

There is no
Retransmission of lost packets retransmission of
Retransmission is possible in TCP, but not in lost packets in the
UDP. User Datagram
Protocol (UDP).

TCP has a (20-60) bytes variable UDP has an 8 bytes


Header Length
length header. fixed-length header.

Weight TCP is heavy-weight. UDP is lightweight.

It’s a
Uses handshakes such as SYN, connectionless
Handshaking Techniques
ACK, SYN-ACK protocol i.e. No
handshake

TCP doesn’t support UDP supports


Broadcasting
Broadcasting. Broadcasting.

Protocols TCP is used by HTTP, UDP is used


HTTPs, FTP, SMTP and Telnet. by DNS, DHCP,

90
Transmission Control User Datagram
Basis Protocol (TCP) Protocol (UDP)

TFTP, SNMP, RIP,


and VoIP.

The TCP connection is a byte UDP connection is a


Stream Type
stream. message stream.

Overhead Low but higher than UDP. Very low.

This protocol is
used in situations
where quick
This protocol is primarily
communication is
utilized in situations when a
necessary but
safe and trustworthy
where
Applications communication procedure is
dependability is not
necessary, such as in email, on
a concern, such as
the web surfing, and in military
VoIP, game
services.
streaming, video,
and music
streaming, etc.

Example: Suppose there are two houses, H1 and H2, and a letter has to be sent from H1 to H2. But there is a
river in between those two houses. Now how can we send the letter?
Solution 1: Make a bridge over the river and then it can be delivered.
Solution 2: Get it delivered by a pigeon.

 Consider the first solution as TCP. A connection has to be made (bridge) to get the data (letter)
delivered. The data is reliable because it will directly reach another end without loss of data or
error.
 The second solution is UDP. No connection is required for sending the data. The process is fast
as compared to TCP, where we need to set up a connection(bridge). But the data is not reliable:
we don’t know whether the pigeon will go in the right direction, will drop the letter on the way,
or some issue is encountered mid-travel.

91
Working of TCP

To make sure that each message reaches its target location intact, the TCP/IP model breaks down the data into
small bundles and afterward reassembles the bundles into the original message on the opposite end. Sending
the information in little bundles of information makes it simpler to maintain efficiency as opposed to sending
everything in one go.

After a particular message is broken down into bundles, these bundles may travel along multiple routes if one
route is jammed but the destination remains the same.

What is the Application Layer?

The application layer is the topmost layer of the OSI model and the TCP/IP model.
In TCP/IP model, the application layer is formed by combining the top three layers, i.e., the
application layer, the presentation layer, and the session layer. In the OSI model, the
application layer is the layer closest to the end-user, implying that the application
layer and the end-user can interact directly with the software application.

What are the Services Provided by the Application Layer?

The application provides the following services.

1. The application layer guarantees that the receiver is recognized, accessible, and
ready to receive data from the sender.
2. It enables authentication between devices for an extra layer of network security.
3. It determines the protocol and data syntax rules at the application level.
4. The protocols of the application layer also define the basic syntax of the message
being forwarded or retrieved.
5. It also checks whether the sender's computer has the necessary communication
interfaces, such as an Ethernet or Wi-Fi interface.
6. Finally, the data on the receiving end is presented to the user application.

Functions of the Application Layer

The application layer provides the following functions.

1. The Application Layer provides protocols that allow the software to communicate and
receive data and finally present it to users in a meaningful way.
2. This layer allows users to log on as a remote host.
3. The Application Layer provides various facilities for users to forward multiple emails
and a storage facility.
4. This layer acts as a window via which users and application processes can access
network resources.
5. This layer provides services such as email, file transfer, results distribution, directory
services, network resources, etc.

92
6. The application layer communicates with the operating system and guarantees that
data is properly saved.
7. This layer allows users to interact with other software applications.
8. This application layer generally performs host initialization followed by remote login
to hosts.
9. This layer visualizes data, allowing individuals to grasp it rather than memorize it or
see it in binary format (1s or 0s).

Application Layer Protocols

The various protocols used in the application layer make the communication between the
sender and receiver faster, efficient, reliable, and safe. These protocols are discussed below.

HTTP

Hypertext transfer protocol enables us to access data via the internet. It sends data in plain
text, audio, and video formats. Client and servers exchange resources over the internet using
the HTTP protocol. Client devices request servers for the resources required to load a web
page, and the servers respond by sending responses to the client.

SMTP

The SMTP (Simple Mail Transfer Protocol) is the TCP/IP protocol that handles email. The
data is sent to another email address using this protocol. SMTP uses a procedure known
as "store and forward" to transmit user emails on and across networks. It works with the
Mail Transfer Agent to ensure that your message is sent to the correct computer and email
mailbox. The port number for SMTP is 25.

TELNET

It's a tool that allows you to save and manage files over the internet. This protocol can be
used to set up equipment for the first time, such as switches. The Telnet protocol is used by
telnet command to communicate with a remote device or system. The port number
for Telnet is 23.

FTP

The FTP (File Transfer Protocol) is a standard internet protocol for transferring data from
one computer to another. FTP uses TCP to transmit data because TCP provides reliability and
error-free data transmission. It facilitates file sharing via remote computer devices while
ensuring dependable and efficient data delivery. For data control, FTP utilizes port 21, and
for data access, it uses port 20.

TFTP

The TFTP (Trivial File Transfer Protocol) is a simple file transfer protocol. The TFTP uses
User Datagram Protocol (UDP) to transmit data from one end to the other. The most common
usage of TFTP is to read and write files/mail to and from a distant server. Compared to File
Transfer Protocol, Trivial File Transfer Protocol is straightforward in design and has
limited functionalities. While transmitting files, TFTP does not provide any authentication or
93
security. As a result, it's commonly used to transfer boot files or configuration information
between workstations in a local setup. Users in a computer network rarely use it due to its
simplistic architecture. It is also unsafe to use the internet due to its lack of security.
The TFTP port number is 69.

NFS

It's known as a NFS (network file system). It enables remote computers to mount file
systems over a network and interact with them as if they were mounted locally. System
administrators can combine resources on the network's centralized servers as a result of this.
Port number for the NFS is 2049.

DNS

DNS stands for (Domain Name System). Similar to how a phone's contacts list matches
names to numbers, the domain name system is a naming database that locates and translates
internet domain names to their unique IP addresses. DNS was created because it is more
difficult for humans to recall numerical numbers than alphabetic names. DNS is used in a
variety of internet activities to swiftly discover an IP address to connect to and access
content.

DHCP

The Dynamic Host Configuration Protocol is a network management protocol that


dynamically allocates a unique IP address to any device or node on a network so that they can
communicate using IP. DHCP is used to automate and maintain these setups from a central
location. There is no need to manually assign IP addresses to new devices. As a result,
connecting to a DHCP-based network requires no user configuration.

Following services are provided by the Data Link


Layer:

94
o Framing & Link access: Data Link Layer protocols encapsulate each network frame
within a Link layer frame before the transmission across the link. A frame consists of a
data field in which network layer datagram is inserted and a number of data fields. It
specifies the structure of the frame as well as a channel access protocol by which
frame is to be transmitted over the link.
o Reliable delivery: Data Link Layer provides a reliable delivery service, i.e., transmits
the network layer datagram without any error. A reliable delivery service is
accomplished with transmissions and acknowledgements. A data link layer mainly
provides the reliable delivery service over the links as they have higher error rates and
they can be corrected locally, link at which an error occurs rather than forcing to
retransmit the data.
o Flow control: A receiving node can receive the frames at a faster rate than it can
process the frame. Without flow control, the receiver's buffer can overflow, and
frames can get lost. To overcome this problem, the data link layer uses the flow
control to prevent the sending node on one side of the link from overwhelming the
receiving node on another side of the link.
o Error detection: Errors can be introduced by signal attenuation and noise. Data Link
Layer protocol provides a mechanism to detect one or more errors. This is achieved
by adding error detection bits in the frame and then receiving node can perform an
error check.
o Error correction: Error correction is similar to the Error detection, except that
receiving node not only detect the errors but also determine where the errors have
occurred in the frame.
o Half-Duplex & Full-Duplex: In a Full-Duplex mode, both the nodes can transmit the
data at the same time. In a Half-Duplex mode, only one node can transmit the data at
the same time.

Some Common Data Link Protocols are:

 Synchronous Data Link Protocol (SDLC): SDLC is a protocol for transmitting


synchronous, code-transparent, serial-by-bit data across a communications line.
 High-Level Data Link Protocol (HDLC): HDLC is a series of data link layer
communication protocols for sending data between network points or nodes.
 Serial Line Interface Protocol (SLIP): SLIP is an Internet protocol that allows users to
connect to the Internet via a computer modem.
 Point to Point Protocol (PPP): PPP is used to connect two computer systems. Computers use
PPP to communicate through a telephone network or the Internet.
 Link Control Protocol (LCP): LCP is a component of (PPP) that is in charge of establishing,
configuring, testing, managing, and terminating transmission lines. It also imparts negotiation
for option setup and features used by the two endpoints of the links.

95
 Link Access Procedure (LAP): LAP protocols are Data Link Layer protocols that are used
to frame and transfer data via point-to-point lines.
 Network Control Protocol (NCP): NCP is a mechanism for establishing and configuring
various Network Layer protocols for Point-to-Point Protocol (PPP) connections.

DNS
o DNS stands for Domain Name System.

o DNS is a directory service that provides a mapping between the name of a host on the
network and its numerical address.

o DNS is required for the functioning of the internet.

o DNS is a service that translates the domain name into IP addresses. This allows the users of
networks to utilize user-friendly names when looking for other hosts instead of remembering
the IP addresses.

o For example, suppose the FTP site at EduSoft had 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.

o 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.

Working of DNS

o DNS is a client/server network communication protocol. DNS clients send requests to the.
server while DNS servers send responses to the client.

o 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.

o DNS implements a distributed database to store the name of all the hosts available on the
internet.

o 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. If IP address has arrived at the resolver, which in
turn completes the request over the internet protocol .

o SERVICES

96
o Name Resolution:
o Hostname to IP Address: DNS translates human-friendly domain names (e.g.,
www.example.com) into IP addresses that computers use to locate each other on the
network.
o IP Address to Hostname: DNS can also perform reverse lookups, converting IP
addresses back into domain names.
o Domain Name Distribution:
o DNS distributes domain names across a hierarchical structure of authoritative name
servers. This hierarchy helps in efficient and scalable management of the domain
name space.
o Domain Name Registration:
o DNS facilitates the registration of domain names through accredited registrars. Users
and organizations can register unique domain names for their websites or services.
o Caching:
o DNS servers cache resolved queries to improve efficiency. Cached information reduces
the need to repeatedly query authoritative servers for the same domain name,
thereby speeding up the resolution process.
o Load Balancing:
o DNS can be used for load balancing by distributing traffic across multiple servers or IP
addresses associated with a single domain name. This helps optimize resource
utilization and improve service availability.
o Redirection:
o DNS can be configured to redirect requests for a domain to a different domain or
server. This is often used for load balancing, content delivery networks (CDNs), or
when migrating services to different locations.
o Mail Server Configuration (MX Records):
o DNS includes Mail Exchange (MX) records that specify the mail servers responsible for
receiving emails for a specific domain. This ensures that emails are routed to the
correct mail servers.
o Security (DNS Security Extensions - DNSSEC):
o DNSSEC is a suite of extensions to DNS that adds an additional layer of security by
signing DNS data with cryptographic signatures. This helps prevent various types of
attacks, such as DNS spoofing or man-in-the-middle attacks.
o Dynamic Host Configuration Protocol (DHCP) Integration:
o DNS can work in conjunction with DHCP to automatically assign and update IP
addresses for devices on a network. This integration is particularly useful in dynamic
network environments.
o Global Distribution:
o DNS operates globally, providing a decentralized and distributed system. This ensures
redundancy and fault tolerance, improving the overall reliability of the Internet.

IEEE
IEEE standards in computer networks are a set of guidelines and protocols developed
by the Institute of Electrical and Electronics Engineers (IEEE) to ensure compatibility

97
and interoperability in networking technologies. These standards help different
devices and systems communicate with each other effectively.

The IEEE 802 family of standards specifically deals with local area networks (LANs)
and metropolitan area networks (MANs). Each substandard within the 802 family
focuses on a specific aspect of network communication. Let's break down some key
standards in simple language:

98
1. IEEE 802.1 - Network Architecture and Management:
 Key Aspects: It deals with things like how devices find and recognize
each other on a network, how data traffic is managed, and how
potential issues are addressed. It's like the supervisor that ensures
everyone is doing their job correctly and the network is running
smoothly.
2. IEEE 802.2 - Logical Link Control:
 Key Aspects: This standard governs how devices communicate over a
network. It ensures that data is formatted properly into frames before
being sent and manages the flow of these frames between devices.
Think of it as the language interpreter that makes sure everyone speaks
the same network language.
3. IEEE 802.3 - Ethernet:
 Key Aspects: Ethernet is the most widely used standard for wired local
area networks (LANs). It specifies how data is packaged into frames,
how devices on the network access the communication medium (like a
cable), and how collisions are handled. It's the rulebook for talking over
wires.
4. IEEE 802.4 - Token Bus:
 Key Aspects: Token Bus networks use a token-passing method, where
devices take turns sending data. This standard defines how devices gain
access to the token, pass it along, and communicate in an orderly
fashion. It's like a scheduled talking system to prevent chaos.
5. IEEE 802.5 - Token Ring:
 Key Aspects: Similar to Token Bus, but here devices are arranged in a
physical ring. The token circulates, and only the device holding the
token can send data. It's like a speaking order in a roundtable
discussion, ensuring fair communication in a ring-shaped network.
6. IEEE 802.11 - Wireless LAN (Wi-Fi):
 Key Aspects: Wi-Fi is all about wireless communication. It defines how
devices communicate over the airwaves, addressing issues like signal
strength, interference, and security. It's like the conductor orchestrating
a symphony of wireless devices, making sure everyone plays in
harmony.

99
FDDI stands for Fiber Distributed Data Interface. It is a set of ANSI and ISO
guidelines for information transmission on fiber-optic lines in Local Area Network
(LAN) that can expand in run upto 200 km (124 miles). The FDDI convention is
based on the token ring protocol.

In expansion to being expansive geographically, an FDDI neighborhood region


arranges can support thousands of clients. FDDI is habitually utilized on the spine
for a Wide Area Network(WAN).
An FDDI network contains two token rings, one for possible backup in case the
essential ring falls flat.
The primary ring offers up to 100 Mbps capacity. In case the secondary ring isn’t
required for backup, it can also carry information, amplifying capacity to 200 Mbps.
The single ring can amplify the most extreme remove; a double ring can expand 100
km (62 miles).
Characteristics of FDDI
 FDDI gives 100 Mbps of information throughput.
 FDDI incorporates two interfaces.
 It is utilized to associate the equipment to the ring over long distances.
 FDDI could be a LAN with Station Management.
 Allows all stations to have broken even with the sum of time to transmit
information.
 FDDI defines two classes of traffic viz. synchronous and asynchronous.
Advantages of FDDI
 Fiber optic cables transmit signals over more noteworthy separations of
approximately 200 km.
 It is conceivable to supply the need to the work stations associated within
the chain. Consequently, based on the prerequisite a few stations are
bypassed to supply speedier benefit to the rest.
 FDDI employments different tokens to make strides organize speed.
 It offers a higher transmission capacity (up to 250 Gbps). Thus, it can
handle information rates up to 100 Mbps.
 It offers tall security because it is troublesome to spy on the fiber-optic
link.
 Fiber optic cable does not break as effectively as other sorts of cables.
Disadvantages of FDDI
 FDDI is complex. Thus establishment and support require an incredible
bargain of expertise.
 FDDI is expensive. Typically since fiber optic cable, connectors and
concentrators are exceptionally costly.

100

You might also like