KEMBAR78
Full Notes Computer Networks | PDF | Internet Protocols | Transmission Control Protocol
0% found this document useful (0 votes)
10 views197 pages

Full Notes Computer Networks

The document outlines the communication model and components of data communication, including messages, senders, receivers, transmission mediums, and protocols. It explains types of data communication (simplex, half-duplex, full-duplex) and introduces the TCP/IP model, detailing its layers, protocols, and functionalities. Additionally, it discusses the characteristics, benefits, and challenges of TCP/IP as a foundational protocol for internet communication.

Uploaded by

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

Full Notes Computer Networks

The document outlines the communication model and components of data communication, including messages, senders, receivers, transmission mediums, and protocols. It explains types of data communication (simplex, half-duplex, full-duplex) and introduces the TCP/IP model, detailing its layers, protocols, and functionalities. Additionally, it discusses the characteristics, benefits, and challenges of TCP/IP as a foundational protocol for internet communication.

Uploaded by

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

UNIT-1

COMMUNICATION MODEL

Communication is defined as a process in which more than one computer transfers


information, instructions to each other and for sharing resources.

Components of Data Communication

A communication system is made up of the following components:

1. Message: A message is a piece of information that is to be transmitted

from one person to another. It could be a text file, an audio file, a video

file, etc.

2. Sender: It is simply a device that sends data messages. It can be a

computer, mobile, telephone, laptop, video camera, or workstation, etc.

3. Receiver: It is a device that receives messages. It can be a computer,

telephone mobile, workstation, etc.

4. Transmission Medium / Communication Channels: Communication

channels are the medium that connect two or more workstations.

Workstations can be connected by either wired media or wireless media.

5. Set of rules (Protocol): When someone sends the data (The sender), it

should be understandable to the receiver also otherwise it is meaningless.

For example, Sonali sends a message to Chetan. If Sonali writes in Hindi

and Chetan cannot understand Hindi, it is a meaningless conversation.


Type of data communication

Data communication is a process to send or receive data from one device to another.
The data communication is divided into three types:

● Simplex Communication: It is one-way communication or unidirectional

communication in which one device only receives and another device only

sends data and devices uses their entire capacity in transmission.

For example, IoT, entering data using a keyboard, listing music using a

speaker, etc.

● Half Duplex communication: It is a two-way communication, or

bidirectional communication in which both the devices can send and

receive data but not at the same time. When one device is sending data

then another device is only receiving and vice-versa.

For example, walkie-talkie.


● Full-duplex communication: It is a two-way communication or we can say

that it is a bidirectional communication in which both the devices can send

and receive data at the same time.

For example, mobile phones, landlines, etc

Need For Protocol Architecture

• Typical task to be performed are as follows(E.g. File transfer)

– Source must activate communications Path or inform network of desired


destination system.

– Source must check if destination is prepared to receive data.

– File transfer application on source must check if destination file management


system will accept and store sender’s file

– May need file format translation

• Task broken into subtasks

• Implemented separately in layers in stack

• Each layer performs a related subset of functions needed in both systems

• Enable peer layers to communicate.

• The peer layers communicate by means of formatted blocks of data that obey a set
of rules known as protocol.
Key Elements of a Protocol

• Syntax :– Creates a data block format understood by all


• Semantics: - Control information for coordinating and error handling
• Timing: – Synchronizes timing for functions such as speed matching and sequencing
TCP/IP MODEL

○ TCP/IP stands for Transmission Control Protocol/ Internet Protocol. It is a set of


conventions or rules and methods that are used to interconnect network devices on
the Internet.
○ The internet protocol suite is commonly known as TCP/IP, as the foundational
protocols in the suite are Transmission Control Protocol and Internet Protocol.
○ It chooses how the information will be traded over the web through end-to-end
communications that incorporate how the information ought to be organized into
bundles (bundles of data), addressed, sent, and received at the goal.
○ This communication protocol can also be utilized to interconnect organize devices in
a private network such as an intranet or an extranet.
○ The TCP/IP model consists of five layers: the application layer, transport layer, network
layer, data link layer and physical layer.
○ The first four layers provide physical standards, network interface, internetworking, and
transport functions that correspond to the first four layers of the OSI model and these four
layers are represented in TCP/IP model by a single layer called the application layer.
○ TCP/IP is a hierarchical protocol made up of interactive modules, and each of them provides
specific functionality. Here, hierarchical means that each upper-layer protocol is supported
by two or more lower-level protocols.
○ The TCP/IP protocol is the foundation of the internet and enables devices to
communicate with each other using a common language.
○ The TCP/IP protocol is divided into two layers: the Transport layer and the Internet
layer. The Transport layer is responsible for ensuring that data is transmitted
reliably from one device to another. This layer is comprised of two protocols: the
Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP). TCP is
used for reliable data transmission, while UDP is used for fast transmission of data
that can tolerate some packet loss.
○ The Internet layer is responsible for transmitting data packets between devices. This
layer is comprised of two protocols: the Internet Protocol (IP) and the Address
Resolution Protocol (ARP). IP is responsible for routing data packets between
devices, while ARP is used to map IP addresses to physical addresses.
Operations of TCP/IP layers:

Network Access Layer

○ A network layer is the lowest layer of the TCP/IP model.


○ A network layer is the combination of the Physical layer and Data Link layer defined in the
OSI reference model.
○ It defines how the data should be sent physically through the network.
○ This layer is mainly responsible for the transmission of the data between two devices on the
same network.
○ The functions carried out by this layer are encapsulating the IP datagram into frames
transmitted by the network and mapping of IP addresses into physical addresses.
○ The protocols used by this layer are ethernet, token ring, FDDI, X.25, frame relay.

Internet Layer

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


○ An internet layer is also known as the network layer.
○ The main responsibility of the internet layer is to send the packets from any network, and
they arrive at the destination irrespective of the route they take.

Following are the protocols used in this layer are:

IP Protocol: IP protocol is used in this layer, and it is the most significant part of the entire TCP/IP
suite.

Following are the responsibilities of this protocol:

○ IP Addressing: This protocol implements logical host addresses known as IP addresses.


The IP addresses are used by the internet and higher layers to identify the device and to
provide internetwork routing.
○ Host-to-host communication: It determines the path through which the data is to be
transmitted.
○ Data Encapsulation and Formatting: An IP protocol accepts the data from the transport
layer protocol. An IP protocol ensures that the data is sent and received securely, it
encapsulates the data into message known as IP datagram.
○ Fragmentation and Reassembly: The limit imposed on the size of the IP datagram by data
link layer protocol is known as Maximum Transmission unit (MTU). If the size of IP
datagram is greater than the MTU unit, then the IP protocol splits the datagram into smaller
units so that they can travel over the local network. Fragmentation can be done by the
sender or intermediate router. At the receiver side, all the fragments are reassembled to
form an original message.
○ Routing: When IP datagram is sent over the same local network such as LAN, MAN, WAN, it
is known as direct delivery. When source and destination are on the distant network, then
the IP datagram is sent indirectly. This can be accomplished by routing the IP datagram
through various devices such as routers.

ARP Protocol

○ ARP stands for Address Resolution Protocol.


○ ARP is a network layer protocol which is used to find the physical address from the IP
address.
○ The two terms are mainly associated with the ARP Protocol:
○ ARP request: When a sender wants to know the physical address of the device, it
broadcasts the ARP request to the network.
○ ARP reply: Every device attached to the network will accept the ARP request and
process the request, but only recipient recognize the IP address and sends back its
physical address in the form of ARP reply. The recipient adds the physical address
both to its cache memory and to the datagram header
ICMP Protocol

○ ICMP stands for Internet Control Message Protocol.


○ It is a mechanism used by the hosts or routers to send notifications regarding datagram
problems back to the sender.
○ A datagram travels from router-to-router until it reaches its destination. If a router is unable
to route the data because of some unusual conditions such as disabled links, a device is on
fire or network congestion, then the ICMP protocol is used to inform the sender that the
datagram is undeliverable.
○ An ICMP protocol mainly uses two terms:
○ ICMP Test: ICMP Test is used to test whether the destination is reachable or not.
○ ICMP Reply: ICMP Reply is used to check whether the destination device is
responding or not.
○ The core responsibility of the ICMP protocol is to report the problems, not correct them. The
responsibility of the correction lies with the sender.
○ ICMP can send the messages only to the source, but not to the intermediate routers because
the IP datagram carries the addresses of the source and destination but not of the router
that it is passed to.

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

The two protocols used in the transport layer are User Datagram protocol and Transmission
control protocol.

○ User Datagram Protocol (UDP)


○ It provides connectionless service and end-to-end delivery of transmission.
○ It is an unreliable protocol as it discovers the errors but not specify the error.
○ User Datagram Protocol discovers the error, and ICMP protocol reports the error to
the sender that user datagram has been damaged.
○ UDP consists of the following fields:
Source port address: The source port address is the address of the application
program that has created the message.
Destination port address: The destination port address is the address of the
application program that receives the message.
Total length: It defines the total number of bytes of the user datagram in bytes.
Checksum: The checksum is a 16-bit field used in error detection.
○ UDP does not specify which packet is lost. UDP contains only checksum; it does not
contain any ID of a data segment.

○ Transmission Control Protocol (TCP)


○ It provides a full transport layer services to applications.
○ It creates a virtual circuit between the sender and receiver, and it is active for the
duration of the transmission.
○ TCP is a reliable protocol as it detects the error and retransmits the damaged
frames. Therefore, it ensures all the segments must be received and acknowledged
before the transmission is considered to be completed and a virtual circuit is
discarded.
○ At the sending end, TCP divides the whole message into smaller units known as
segment, and each segment contains a sequence number which is required for
reordering the frames to form an original message.
○ At the receiving end, TCP collects all the segments and reorders them based on
sequence numbers.

Application Layer

○ An application layer is the topmost layer in the TCP/IP model.


○ It is responsible for handling high-level protocols, issues of representation.
○ This layer allows the user to interact with the application.
○ When one application layer protocol wants to communicate with another application layer,
it forwards its data to the transport layer.
○ There is an ambiguity occurs in the application layer. Every application cannot be placed
inside the application layer except those who interact with the communication system. For
example: text editor cannot be considered in application layer while web browser using
HTTP protocol to interact with the network where HTTP protocol is an application layer
protocol.

Following are the main protocols used in the application layer:

○ HTTP: HTTP stands for Hypertext transfer protocol. This protocol allows us to access the
data over the world wide web. It transfers the data in the form of plain text, audio, video. It
is known as a Hypertext transfer protocol as it has the efficiency to use in a hypertext
environment where there are rapid jumps from one document to another.
○ SNMP: SNMP stands for Simple Network Management Protocol. It is a framework used for
managing the devices on the internet by using the TCP/IP protocol suite.
○ SMTP: SMTP stands for Simple mail transfer protocol. The TCP/IP protocol that supports
the e-mail is known as a Simple mail transfer protocol. This protocol is used to send the data
to another e-mail address.
○ DNS: DNS stands for Domain Name System. An IP address is used to identify the connection
of a host to the internet uniquely. But, people prefer to use the names instead of addresses.
Therefore, the system that maps the name to the address is known as Domain Name System.
○ TELNET: It is an abbreviation for Terminal Network. It establishes the connection between
the local computer and remote computer in such a way that the local terminal appears to be
a terminal at the remote system.
○ FTP: FTP stands for File Transfer Protocol. FTP is a standard internet protocol used for
transmitting the files from one computer to another computer.
Characteristics of TCP/IP:

● Share Data Transfer: The TCP allows applications to create channels of


communications across a network. It also permits a message to be separated into
smaller packets before they are transmitted over the web and after that collected
in the right order at the destination address. So, it guarantees the solid
transmission of data across the channel.
● Internet Protocol: The IP address tells the packets the address and route so that
they reach the proper destination. It includes a strategy that empowers portal
computers on the internet-connected to arrange forward the message after
checking the IP address.
● Reliability: The most vital feature of TCP is solid data delivery. In arrange to
supply unwavering quality, TCP must recover information that’s harmed,
misplaced, copied, or conveyed out of arranging by the Arrange Layer.
● Multiplexing: Multiplexing can be achieved through the number of ports.
● Connections: Before application forms can send information by utilizing TCP,
the devices must set up a connection. The associations are made between the
harbor numbers of the sender and the collector devices.
● Compatibility: TCP/IP is designed to be compatible with a wide range of
hardware and software platforms. This makes it a versatile protocol suite that
can be used in a variety of network environments.
● Scalability: TCP/IP is highly scalable, which means that it can be used in
networks of any size, from small home networks to large enterprise networks.
● Open standards: TCP/IP is based on open standards, which means that the
protocol specifications are publicly available and can be implemented by anyone.
This fosters innovation and competition in the networking industry.
● Modular architecture: TCP/IP is designed with a modular architecture, which
means that different protocols can be added or removed as needed. This allows
network administrators to tailor their networks to specific needs.
● Reliability: TCP/IP is designed to be highly reliable, with built-in error checking
and correction mechanisms that ensure data is transmitted accurately and
reliably.
● Flexibility: TCP/IP is a flexible protocol suite that can be used for a wide range
of applications, including web browsing, email, file sharing, and more.
● End-to-end connectivity: TCP/IP provides end-to-end connectivity between
devices, which means that data can be transmitted directly from the source
device to the destination device without being routed through intermediate
devices.

Benefits of TCP/IP

● It is an industry–standard demonstrate that can be viably deployed in


commonsense organizing problems.
● It is interoperable, i.e., it permits cross-platform communications among
heterogeneous networks.
● It is an open convention suite. It isn’t claimed by any specific established and so
can be utilized by any individual or organization.
● It may be versatile, client-server engineering. This permits systems to be
included without disturbing the current services.
● It allots an IP address to each computer on the organize, hence making each
device to be identifiable over the arrange. It allots each location a space title. It
gives the title and addresses determination administrations.

Challenges of TCP/IP:
● It is not generic in nature. So, it comes up short to represent any protocol stack
other than the TCP/IP suite. For the case, it cannot depict the Bluetooth
connection.
● It does not clearly isolate the concepts of services, interfacing, and protocols.
So, it isn’t appropriate to portray unused advances in modern networks.
● It does not recognize between the data link and the physical layers, which
has exceptionally distinctive functionalities.
● The information interface layer ought to concern with the transmission of
outlines. On the other hand, the physical layer ought to lay down the physical
characteristics of the transmission.
● In this, model the transport layer does not guarantee delivery of packets.
● Security: TCP/IP was originally designed for an open and trusting environment,
and as a result, it is not inherently secure. This has led to a range of security
challenges, including attacks such as DDoS, man-in-the-middle attacks, and other
types of network-based attacks.
● Complexity: The TCP/IP protocol suite is highly complex, with many different
protocols and layers that interact with each other. This complexity can make it
difficult to troubleshoot network issues and can increase the likelihood of errors
and misconfigurations.
● Scalability: While TCP/IP is highly scalable, there are limits to its scalability. As
networks grow larger and more complex, it can become more difficult to manage
and optimize TCP/IP-based networks.
● Congestion: TCP/IP was not designed with congestion management in mind,
which can lead to issues such as network congestion and packet loss. This can
result in reduced network performance and reliability.
● Legacy systems: TCP/IP is based on legacy technology that was designed in the
1970s and 1980s. While the protocol has been updated over the years, it can still
struggle to support modern networking needs, such as real-time applications,
mobile devices, and the Internet of Things.
● IPv4 address depletion: The IPv4 address space is limited and has been depleted
in many regions, which has led to the widespread adoption of IPv6. However, the
transition from IPv4 to IPv6 has been slow, and many networks still rely on IPv4.
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 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


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)


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

● There is no 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.
Differences between TCP and UDP

Transmission Control Protocol User Datagram


Basis
(TCP) Protocol (UDP)

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

The delivery of data


TCP is reliable as it guarantees the
to the destination
Reliability delivery of data to the destination
cannot be
router.
guaranteed in UDP.
TCP provides extensive
error-checking mechanisms.
UDP has only the
Error checking basic error-checking
mechanism It is because it provides flow mechanism using
control and acknowledgment of checksums.
data.

An acknowledgment segment is No acknowledgment


Acknowledgment
present. segment.

Sequencing of data is a feature of


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

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

Retransmission of lost packets is There is no


Retransmission
possible in TCP, but not in UDP. retransmission of
lost packets in the
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 connectionless
Handshaking Uses handshakes such as SYN, ACK,
protocol i.e. No
Techniques SYN-ACK
handshake

UDP supports
Broadcasting TCP doesn’t support Broadcasting.
Broadcasting.

UDP is used by DNS,


TCP is used by HTTP, HTTPs, FTP,
Protocols DHCP, TFTP, SNMP,
SMTP and Telnet.
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 utilized
communication is
in situations when a safe and
necessary but where
trustworthy communication
Applications dependability is not
procedure is necessary, such as in
a concern, such as
email, on the web surfing, and in
VoIP, game
military services.
streaming, video,
and music
streaming, etc.

TCP/IP Applications

Dynamic Host Configuration Protocol (DHCP)


The dynamic host configuration protocol (DHCP) is the application responsible for requesting and offering IP
addresses. A DHCP client automatically requests an IP address from a DHCP server when a network is detected. A
DHCP server typically runs in a router and offers IP addresses to DHCP clients.
DNS (Domain Name System)
A Domain Name System (DNS) enables us to browse a website by providing the website or domain name instead of
the website’s IP address.

It maps domain names to IP addresses. A network host needs the IP address (not the domain or hostname) of the
webserver to generate a packet.

Hypertext Transfer Protocol (HTTP)


The Hypertext Transfer Protocol (HTTP) is the most commonly used TCP/IP application as it transfers web pages
from a web server to a web browser.

Web pages are written using HTML, which stands for Hypertext Markup Language. In other words, the HTTP is used
to transfer HTML files.
NetBIOS Name Service (NBNS)
NBNS stands for NetBIOS Name Service. It is used to translate host names on a local network to local IP addresses.
This is similar to what DNS does on the Internet.

In this example, the name “Board_A” has been assigned to a network host. NBNS allows us to access this host by
typing its host name into a browser instead of typing its IP address. It maps host names to IP addresses.

Simple Mail Transfer Protocol (SMTP)


Your embedded device can be configured to send emails. SMTP would be used for this.

Simple Network Management Protocol (SNMP)


SNMP stands for Simple Network Management Protocol which manages network devices. It is primarily used to
monitor network devices for conditions that may need a user's attention.

Simple Network Time Protocol (SNTP)


SNTP stands for Simple Network Time Protocol, which is a service that provides the time of day to network devices.
Typical accuracy is in the range of hundreds of milliseconds.
Telnet (Bi-directional Serial Text Communication)
Telnet is an application that enables bi-directional text communication via a terminal application like HyperTerm or
Tera Term.

Trivial File Transfer Protocol (TFTP)


TFTP is used to transfer files on a local network. It can be used to update firmware on an embedded device with a
boot loader.

TFTP is a stripped-down version of FTP. TFTP has no provisions for security, so it is only used on local networks.
Files are transferred in blocks of 512 bytes with a maximum file transfer size of 4 GB.

SMTP

Simple Mail Transfer Protocol (SMTP) is still the current standard to send emails over the Internet. This is used for
mail delivery in either a spooled or queue fashion. A destination server regularly checks for spooled or queued
messages and when it detects any, the messages get delivered to the destination (mailbox). SMTP is used for
sending emails whereas POP3 is used for receiving. By default, SMTP uses the TCP protocol on port 25.

POP

Post Office Protocol (POP) is a protocol used to check for incoming mail. An email client connects to the POP3 server
and downloads all messages that are addressed to that client. This method is different from IMAP, where the
messages reside on the server until the client deletes them. By default, POP3 uses the TCP protocol on port 110.

SIP (VoIP)

Session Initiation protocol (SIP) is utilized to construct and deconstruct multimedia communication sessions. These
sessions include voice and video conferencing, streaming, instant messaging, and online gaming. By default, SIP
uses the UDP protocol on port 5060.

RTP

Real-Time Transport Protocol (RTP) is a packet-formatting standard for video and audio transmission over the
Internet. It was designed as a multicast protocol but now it’s also leveraged for unicast communication. You’ll see
this for streaming, video conferencing and push to talk applications. By default, RTP uses the UDP protocol on an
unprivileged port (1024 and above).

SNMP

Simple Network Management Protocol (SNMP) collects and manipulates network information by pooling the data
from devices on the network at fixed or random intervals. This is useful for a very basic network monitoring system
as it can send an alert called a trap when aberrations occur. SNMP uses a mix of TCP and UDP protocol and ports.
SSH

Secure Shell (SSH) is a telnet session setup over an SSL encrypted connection. This is utilized to log into other
remote systems and check logs, perform troubleshooting, and more. By default, SSH uses the TCP protocol on port
22.

HTTP

Hypertext Transfer Protocol (HTTP) is a standard that is used to transfer web pages, formatted in HTML format.
Web browsers such as Internet Explorer and Chrome download and render HTML pages. HTTP data is passed in
cleartext: for this reason it’s now replaced by HTTPS, its secure version. By default, HTTP uses the TCP protocol on
port 80.

HTTPS

Hypertext Transfer Protocol Secure (HTTPS) is the secure version of HTTP by adding additional layers of security
(SSL) to the transactions between a web browser and a server. It is required to fill out forms, sign in, authenticate
and encrypt HTTP transactions or messages. By default, HTTPS uses the TCP protocol on port 443.

NTP

Network Time Protocol (NTP) is the protocol used to synchronize the clock of a host. NTP ensures that all devices
on a given network are synchronized within a few milliseconds, which is a requirement for some distributed
services to function correctly. By default, RTP uses the UDP protocol on port 123.

DNS

Domain name Server (DNS) DNS is a protocol used to translate a Fully Qualified Domain Name (FQDN) into an IP
address. This service is used because while humans use words to communicate, computers use IP addresses. When
we type a URL in a web browser, the operating system translates that into an IP address by performing a DNS query
to a server. DNS failures or misconfigurations will prevent a user from accessing web pages. For this reason, a
running joke in the networking world is that DNS is always the root cause of any user issues.

OSI Model – Layers of OSI Model

OSI stands for Open Systems Interconnection. It was developed by ISO – ‘International
Organization for Standardization’, in the year 1984. It is a 7-layer architecture with each layer
having specific functionality to perform. All these 7 layers work collaboratively to transmit the data
from one person to another across the globe.
7 layers of the OSI Model

The OSI model consists of seven abstraction layers arranged in a top-down order:

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

Physical Layer – Layer 1

The lowest layer of the OSI reference model is the physical layer. It is responsible for the actual
physical connection between the devices. The physical layer contains information in the form of
bits. It is responsible for transmitting individual bits from one node to the next. When receiving
data, this layer will get the signal received and convert it into 0s and 1s and send them to the Data
Link layer, which will put the frame back together.
Functions of the Physical Layer

● Bit synchronization: The physical layer provides the synchronization of the bits by
providing a clock. This clock controls both sender and receiver thus providing
synchronization at the bit level.
● Bit rate control: The Physical layer also defines the transmission rate i.e. the
number of bits sent per second.
● Physical topologies: Physical layer specifies how the different, devices/nodes
are arranged in a network i.e. bus, star, or mesh topology.
● Transmission mode: Physical layer also defines how the data flows between the
two connected devices. The various transmission modes possible are Simplex,
half-duplex and full-duplex.

Note:

1. Hub, Repeater, Modem, and Cables are Physical Layer devices.


2. Network Layer, Data Link Layer, and Physical Layer are also known as Lower
Layers or Hardware Layers.

Data Link Layer (DLL) – Layer 2


The data link layer is responsible for the node-to-node delivery of the message. The main
function of this layer is to make sure data transfer is error-free from one node to another,
over the physical layer. When a packet arrives in a network, it is the responsibility of the
DLL to transmit it to the Host using its MAC address.
The Data Link Layer is divided into two sublayers:

1. Logical Link Control (LLC) : Logical Link Control (LLC) is a sublayer that
generally provides the logic for the data link as it controls the
synchronization, multiplexing, flow control, and even error-checking
functions of DLL (Data Link Layer).
functions of LLC Sublayer are –

2. It is responsible to manage and to ensure the integrity of data

transmissions.

3. They provide the logic for the data link.

4. It also controls the synchronization, multiplexing, error checking or

correcting functions, flow control of the DLL.

5. It also allows multipoint communication over a range of computer

networks.

2.Media Access Control (MAC) :layer. A MAC address, which stands for Media
Access Control Address, is a physical address that works at the Data Link Layer

The packet received from the Network layer is further divided into frames depending on
the frame size of the NIC(Network Interface Card). DLL also encapsulates Sender and
Receiver’s MAC address in the header.

The Receiver’s MAC address is obtained by placing an ARP(Address Resolution Protocol)


request onto the wire asking “Who has that IP address?” and the destination host will reply
with its MAC address.

Functions of the Data Link Layer

● Framing: Framing is a function of the data link layer. It provides a way for a
sender to transmit a set of bits that are meaningful to the receiver. This can be
accomplished by attaching special bit patterns to the beginning and end of the
frame.
● Physical addressing: After creating frames, the Data link layer adds physical
addresses (MAC addresses) of the sender and/or receiver in the header of each
frame.
● Error control: The data link layer provides the mechanism of error control in
which it detects and retransmits damaged or lost frames.
● Flow Control: The data rate must be constant on both sides else the data may
get corrupted thus, flow control coordinates the amount of data that can be sent
before receiving an acknowledgment.
● Access control: When a single communication channel is shared by multiple
devices, the MAC sub-layer of the data link layer helps to determine which device
has control over the channel at a given time.

Note:

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


2. Data Link layer is handled by the NIC (Network Interface Card) and device drivers
of host machines.
3. Switch & Bridge are Data Link Layer devices.

Network Layer – Layer 3


The network layer works for the transmission of data from one host to the other located in
different networks. It also takes care of packet routing i.e. selection of the shortest path to
transmit the packet, from the number of routes available. The sender & receiver’s IP
addresses are placed in the header by the network layer.

Functions of the Network Layer

● Routing: The network layer protocols determine which route is suitable from
source to destination. This function of the network layer is known as routing.
● Logical Addressing: To identify each device on Internetwork uniquely, the
network layer defines an addressing scheme. The sender & receiver’s IP
addresses are placed in the header by the network layer. Such an address
distinguishes each device uniquely and universally.

Note:

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


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

Transport Layer – Layer 4


The transport layer provides services to the application layer and takes services from the
network layer. The data in the transport layer is referred to as Segments. It is responsible
for the End to End Delivery of the complete message. The transport layer also provides the
acknowledgment of the successful data transmission and re-transmits the data if an error is
found.

At the sender’s side: The transport layer receives the formatted data from the upper
layers, performs Segmentation, and also implements Flow & Error control to ensure
proper data transmission. It also adds Source and Destination port numbers in its header
and forwards the segmented data to the Network Layer.

Note: The sender needs to know the port number associated with the receiver’s application.

Generally, this destination port number is configured, either by default or manually. For
example, when a web application requests a web server, it typically uses port number 80,
because this is the default port assigned to web applications. Many applications have default
ports assigned.

At the receiver’s side: Transport Layer reads the port number from its header and forwards
the Data which it has received to the respective application. It also performs sequencing and
reassembling of the segmented data.

Functions of the Transport Layer


● Segmentation and Reassembly: This layer accepts the message from the
(session) layer, and breaks the message into smaller units. Each of the segments
produced has a header associated with it. The transport layer at the destination
station reassembles the message.
● Service Point Addressing: To deliver the message to the correct process, the
transport layer header includes a type of address called service point address or
port address. Thus by specifying this address, the transport layer makes sure
that the message is delivered to the correct process.

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.
3. The transport layer is called as Heart of the OSI model.
4. Device or Protocol Use : TCP, UDP NetBIOS, PPTP
Session Layer – Layer 5
This layer is responsible for the establishment of connection, maintenance of sessions, and
authentication, and also ensures security.

Functions of the Session Layer

● Session establishment, maintenance, and termination: The layer allows the


two processes to establish, use and terminate a connection.
● Synchronization: This layer allows a process to add checkpoints that are
considered synchronization points in the data. These synchronization points
help to identify the error so that the data is re-synchronized properly, and ends
of the messages are not cut prematurely and data loss is avoided.
● Dialog Controller: The session layer allows two systems to start communication
with each other in half-duplex or full-duplex.

Presentation Layer – Layer 6


The presentation layer is also called the Translation layer. The data from the application
layer is extracted here and manipulated as per the required format to transmit over the
network.

Functions of the Presentation Layer

● Translation: For example, ASCII to EBCDIC.


● Encryption/ Decryption: Data encryption translates the data into another form
or code. The encrypted data is known as the ciphertext and the decrypted data is
known as plain text. A key value is used for encrypting as well as decrypting data.
● Compression: Reduces the number of bits that need to be transmitted on the
network.

Note: Device or Protocol Use : JPEG, MPEG, GIF

Application Layer – Layer 7


At the very top of the OSI Reference Model stack of layers, we find the Application layer
which is implemented by the network applications. These applications produce the data,
which has to be transferred over the network. This layer also serves as a window for the
application services to access the network and for displaying the received information to
the user.

Example: Application – Browsers, Skype Messenger, etc.

Note: 1. The application Layer is also called Desktop Layer.

2. Device or Protocol Use : SMTP

Functions of the Application Layer

The main functions of application layer are given below.

● Network Virtual Terminal: It allows a user to log on to a remote host.


● FTAM- File transfer access and management : This application allows a user to
access file in a remote host, retrieve files in remote host and manage or
control files from a remote computer.
● Mail Services : Provide email service.
● Directory Services : This application provides distributed database sources
and access for global information about various objects and services.

Note: OSI model acts as a reference model and is not implemented on the Internet because of
its late invention. The current model being used is the TCP/IP model.

OSI Model in a Nutshell

Information
Layer Device or
Layer Name Responsibility Form(Data
No Protocol
Unit)
Helps in identifying the
Application client and
7 Message SMTP
Layer synchronizing
communication.

Data from the


application layer is
Presentation extracted and JPEG, MPEG,
6 Message
Layer manipulated in the GIF
required format for
transmission.

Establishes Connection,
Maintenance, Ensures
5 Session Layer Message Gateway
Authentication, and
Ensures security.

Take Service from


Transport Network Layer and
4 Segment Firewall
Layer provide it to the
Application Layer.
Transmission of data
Network from one host to
3 Packet Router
Layer another, located in
different networks.

Data Link Node to Node Delivery Switch,


2 Frame
Layer of Message. Bridge

Hub,
Establishing Physical
Repeater,
1 Physical Layer Connections between Bits
Modem,
Devices.
Cables

Protocol and Standard in Computer Networks


Computer networks are dependent on protocols and standards which plays a vital role,
which enables communication between different devices and systems with one another and
share data seamlessly. Network protocol ensures that different technologies and
components of the network are compatible with one another, reliable, and able to function
together.

Overview of Protocol
In Order to make communication successful between devices , some rules and procedures
should be agreed upon at the sending and receiving ends of the system. Such rules and
procedures are called as Protocols . Different types of protocols are used for different types
of communication.
In above diagrams Protocols are shown as set of rules . Such that Communication between
Sender and Receiver is not possible without Protocol.

Key Element of Protocol


● Syntax : syntax refers to the structure or the format of the data that gets
exchanged between the devices. Syntax of message includes the type of data,
composition of message and sequencing of message. The starting 8 bits of data is
considered as the address of the sender. The next 8 bits is considered to be the
address of the receiver. The remaining bits are considered as the message itself.
● Semantics : Semantics defines data transmitted between devices. It provides
rules and norms for understanding message or data element values and actions.
● Timing : Timing refers to the synchronization and coordination between devices
while transferring the data. Timing ensures at what time data should be sent and
how fast data can be sent. For example, If a sender sends 100 Mbps but the
receiver can only handle 1 Mbps, the receiver will overflow and lose data. Timing
ensures preventing data loss, collisions and other timing related issues.
● Sequence control : Sequence control ensures the proper ordering of data
packets. The main responsibility of sequence control is to acknowledge the data
while it get received, and the retransmission of lost data. Through this
mechanism the data is delivered in correct order.
● Flow Control : Flow control regulates device data delivery. It limits the sender’s
data or asks the receiver if it’s ready for more. Flow control prevents data
congestion and loss.
● Error Control : Error control mechanisms detect and fix data transmission
faults. They include error detection codes, data resend, and error recovery. Error
control detects and corrects noise, interference, and other problems to maintain
data integrity.
● Security : Network security safeguards data confidentiality, integrity, and
authenticity. which includes encryption, authentication, access control, and other
security procedures. Network communication’s privacy and trustworthiness are
protected by security standards.
Standards
Standards are the set of rules for data communication that are needed for exchange of
information among devices. It is important to follow Standards which are created by
various Standard Organization like IEEE , ISO , ANSI etc.

Types of Standards

Standards are of two types :

● De Facto Standard.
● De Jure Standard.

De Facto Standard : The meaning of the work ” De Facto ” is ” By Fact ” or “By


Convention”.These are the standard s that have not been approved by any Organization , but
have been adopted as Standards because of it’s widespread use. Also , sometimes these
standards are often established by Manufacturers.

For example : Apple and Google are two companies which established their own rules on
their products which are different . Also they use some same standard rules for
manufacturing for their products.

De Jure Standard : The meaning of the word “De Jure” is “By Law” or “By
Regulations”.Thus , these are the standards that have been approved by officially
recognized body like ANSI , ISO , IEEE etc. These are the standard which are important to
follow if it is required or needed.

For example : All the data communication standard protocols like SMTP , TCP , IP , UDP
etc. are important to follow the same when we needed them.

Types of Protocol
● Network Layer Protocols : Network layer protocols operate in the network
layer which is also known as the Layer 3 of the network architecture. Network
layer protocols are responsible for packet routing, forwarding and addressing of
data packets throughout the network . IP and ICMP are the network layer
protocols.
● Transport layer Protocols : Transport layer protocols works in transport layer
which provides end-to-end service ensuring data transfer across apps on
different devices. TCP and UDP are the most popular transport layer protocols.
● Application Layer Protocol : Application layer protocol working in the
application layer of the network architecture provides communication between
applications running on different devices. The application layer protocols enable
cross-device communication. They format, exchange, and interpret application
data. HTTP, FTP, and SMTP are examples.
● Wireless Protocols : Wireless protocols basically used in wireless
communication which enables data transfer through wireless networks.
Bluetooth, Wi-Fi, and LTE protocols are examples.
● Routing Protocols : Routing protocol establishes the best/optimal network
pathways throughout the network for fastest data transmission. Routers share
information to develop and maintain routing tables. RIP, OSPF, and BGP are
examples.
● Security Protocols : security protocol protects data confidentiality, integrity,
and authenticity while transmission of data over the network. They include SSL
and TLS, encryption methods, and authentication protocols for providing data
security.
● Internet Protocols : IP identifies devices uniquely. Internet protocol provides
data communication through routing and forwarding data packets from one
device to another by unique addressing scheme.

Protocol and Standard Compliance in Network Security


Protocol and standard compliance protects data, resources, and networks. Protocol and
standard compliance are crucial to network security for these reasons:

● Interoperability : Protocols and standards allow devices and systems to


communicate. These protocols ensure network components can function
together, avoiding risks and security gaps produced by incompatible or
unsupported systems.
● Security Baseline : Protocols and standards contain security principles and best
practices that help secure network infrastructure. These protocols allow
organizations to protect sensitive data via encryption, authentication, and access
controls.
● Vulnerability Management : Network security protocols and standards help
organizations find and fix vulnerabilities. Many standards requires regular
security assessments, vulnerability scanning, and penetration testing to discover
network infrastructure flaws. Organizations can prevent cyberattacks and
address vulnerabilities by following these compliance criteria.
Service Primitives
Service generally includes set of various primitives. A primitive simply means Operations.
A Service is specified by set of primitives that are available and given to user or other
various entities to access the service. All these primitives simply tell the service to perform
some action or to report on action that is taken by peer entity. Each of the protocol that
communicates in layered architecture also communicates in peer-to-peer manner with
some of its remote protocol entity. Primitives are called calling functions between the layers
that are used to manage communication among the adjacent protocol layers i.e., among the
same communication node. The set of primitives that are available generally depends upon
the nature of the service that is being provided.

Classification of Service Primitives :

Primitive Meaning

It represent entity that wants or request service to perform some


Request action or do some work (requesting for connection to remote
computer).

It represent entity that is to be informed about event (receiver just


Indication
have received request of connection).

It represents entity that is responding to event (receiver is simply


Response
sending the permission or allowing to connect).
It represent entity that acknowledges the response to earlier
Confirm request that has come back (sender just acknowledge the
permission to get connected to the remote host).

In the above diagram, these four primitives work as following :

● Request – This primitive is transferred or sent to Layer N by Layer (N+1) to just


request for service.
● Indication – This primitive is returned by Layer N to Layer (N+1) to just advise
of activation of service that is being requested or of action that is initiated by the
service of Layer N.
● Response – This primitive is simply provided by Layer (N+1) in reply to
indication primitive. It might acknowledge or complete action that is previously
invoked by indication primitive.
● Confirm – This primitive is returned by the Nth layer to the requesting (N+1)st
layer to simply acknowledge or complete action that is previously invoked by
request primitive.
Parameters of Service Primitives : Some of the Service Primitives need parameters.
These are given below :

● Connect. Request – The initiating entity does this Connect.Request. It just


specifies and determines machine that we want to get connected to, type of
service that is being desired, and maximum size of packet or message that is
used on connection.
● Connect. Indication – The receiver gets this Connect.Indication. It just specifies
caller’s identity service that we want to use like FTP and Telnet, etc., and
maximum size of packets that are exchanged.
● Connect. Response – It just specifies whether or not it wants to accept or simply
reject connection that is being requested.
● Connect. Confirm – It just finds out or determines what happened using the
entity that is issuing the initial Connect. Request.

Primitives of Connection-Oriented Service :

Primitive Meaning

When server is ready to accept request of incoming connection, it


Listen simply put this primitive into action. Listen primitive simply
waiting for incoming connection request.

This primitive is used to connect the server simply by creating or


Connect
establishing connection with waiting peer.

Accept This primitive simply accepts incoming connection from the peer.
These primitive afterwards block the server. Receive primitive
Receive
simply waits for incoming message.

This primitive is put into action by the client to transmit its


request that is followed by putting receive primitive into action to
Send
get the reply. Send primitive simply sends or transfer the message
to the peer.

This primitive is simply used to terminate or end the connection


Disconnect
after which no one will be able to send any of the message.

Primitives of Connectionless Service :

Primitive Meaning

Unitdata primitive is simply required to send packet of data or


Unitdata
information.

This primitive is required for getting details about the


Facility,
performance and working of the network such as delivery
Report
statistics or report.
TRADITIONAL INTERNET APPLICATIONS

● Web Protocols

Three key standards associated with the world wide web:


■ HyperText Markup Language (HTML) - spec for content and layout of web
pages
■ Uniform Resource Locator (URL) - specs format and meaning of web page
identifiers
■ HyperText Transfer Protocol (HTTP) - specs how data is transferred between
browser (client) and server.

Web Document Transfer with HTTP

Web browsers and servers communicate according to the HyperText Transfer Protocol
(HTTP)

The four basic operations available to HTTP clients are

GET (to get status information and an item (e.g. an HTML document),

HEAD (to get only status information about an item),

POST (to add to an item stored on the server -- e.g. a list of messages), and

PUT (to replace an item stored on the server).


Simple Mail Transfer Protocol (SMTP):

"Simple" is in the name because there was a complex predecessor that SMTP replaced.

SMTP is the (TCP/IP) protocol used in client-server mode by e-mail transfer software.

SMTP handles reliable delivery details.

SMTP allows sender to ask the receiving host if the intended recipient mailbox exists.

SMTP follows a stream paradigm

SMTP control messages are plain text

SMTP is only for transfer of plain text messages

ISPs, Mail Servers, and Mail Access

● The typical ISP runs email server and email transfer software on its computers, and
provides email transfer service for subscribers
● ISP computers provide email mailboxes for ISP subscribers
● Subscribers access their email using a web interface provided by the ISP or a
special-purpose email interface application.
● The advantage of the web interface is that one can read mail using a browser on any
computer connected to the Internet
● The advantage of the special-purpose application is that users with laptops can download all
their email and interact with it while offline.
Mail Access Protocols (POP3, IMAP)

● POP3 and IMAP are protocols for providing an interface to email


● Typically an ISP runs POP3 and/or IMAP server software, and subscribers run clients
● The software is designed to allow a single user to access a single mailbox
● The access allows viewing mail headers, downloading messages, deleting email, and sending
email.

● POP3 is essentially just a protocol that allows to download a copy of mail from the mail
host to personal computer. POP3 asks you for the password on the mail host -- to insure
that only have access to your private e-mail.

● IMAP is similar except that it can keep the primary copies of the messages on the mail host
and allow to organize the mail into sets of folders on the mail host. That is handy to read
the mail from several different personal computers, workstations, and what-have-you.

Email Representation Standards (RFC2822, MIME)


RFC 2822 specifies the mail message format. A message is a plain text file consisting of:

○ header
○ blank line
○ body
● Header lines have the form: keyword: information
● Keywords include: From, To, Subject, CC
● Arbitrary keywords starting with X can be used - never considered bad syntax
● MIME is the Multi-purpose Internet Mail Extension.
● Internet e-mail was designed only to transmit printable ASCII characters (plain text).
● Nowadays e-mail software encodes arbitrary kinds of data as sequences of printable ASCII
characters and transmits it.

The sender puts lines such as:

MIME-Version: 1.0

Content-Type: Multipart/Mixed; Boundary=Mime_separator

● in the header to tell the receiver that MIME conventions are used in the message and that
the message consists of different parts separated by the string "Mime_separator."
● The sender is free to choose any string for a separator. (Of course one must choose
something that is not used elsewhere in the body of the message.)
● The sender can put directives in the message that tell the recipient how to decode each part
of the message.
● Using MIME we can send attachments such as a photograph, word processor document, or
spreadsheet.
● MIME is very flexible: one can add new message types and encoding schemes without any
need to change the software that transmits the mail. Everything that is transmitted is
encoded as printable ASCII so old e-mail software has no problems -- the MIME message is
transmitted exactly the same way as "old-fashioned" plain text.
● (The glitch with MIME is that often senders and receivers do not use the same e-mail
software and so conventions understood by one "end" may not be understood by the other
"end." When in doubt just send plain text -- and not as an "attachment." It may not be "fancy"
but it usually works because all e-mail software is supposed to understand plain text
messages.)

Domain Name System (DNS)

Domain name service (DNS) is provided over the Internet

● There are several forms of service but mainly DNS translates hostnames like cs.csustan.edu
into an IP addresses like 130.17.70.80.
● Most applications that use Internet services utilize DNS.
● DNS is a distributed database service - there is a hierarchical network of servers in locations
all over the Internet, each of which is responsible for answering questions about a portion of
the database.
● DNS can work in a recursive mode: if a client asks a server for information that it doesn't
have, then the server may ask another server, obtain the answer, and pass it along to the
client.
● A DNS server has to know the address of at least one root server
● Top level domains names like .edu and .com are controlled by the Internet Corporation for
Assigned Names and Numbers (ICANN)
● ICANN authorizes domain registrars, to which organizations must apply for approval of the
domain names that they request.
● Once an organization has been approved to use a domain name like csustan.edu, it can
create a naming hierarchy for the hosts in its network -- with names like
dijkstra.cs.csustan.edu and muon.physics.csustan.edu.
● Except for the rightmost two, the segments of a domain name need not correspond to
domains, sub-domains, or networks.
● File Transfer Protocol (FTP)

○ In the early days of networking it quickly became apparent that there was a need for
general file transfer software - to transfer various types of files between various
types of computers.

○ Complications:
■ conventions for naming files vary.
■ file formats, protection methods, and data representation vary.

○ FTP:
■ deals well with differences between computing systems,
■ transfers files in both directions
■ permits transfer of arbitrary data, and
■ deals well with file permissions and ownership.
■ allows browsing through file systems
■ utilizes plain text control messages

○ FTP has been around longer than IP or TCP.
○ Users are often not aware of it but FTP is used for almost all the downloading done
with web browsers and other network applications.

FTP Communication Paradigm


The client does not just pass all the characters typed by the user to the server.

○ The client interprets what the user types and sends commands to the server (when
necessary) that achieve the result desired by the user.
○ The client and server communicate using the language of FTP -- the protocol.
○ For each file transfer the client and the server form a separate connection -- distinct
from the original control connection.
○ The control connection persists for the duration of a session (what happens between
an open and a close) but each data connection is terminated after transferring one
file.
○ The FTP server on the remote host acts as a client when it opens a data connection
back to the local host.
○ This paradigm is not compatible with the network address translation "routers"
used in home networking. The workaround is for the NAT router to rewrite values in
the PORT commands that FTP clients send to FTP servers.
UNIT-2
TRANSMISSION TERMINOLOGY

Spectrum

Spectrum refers to the entire range of frequencies right from the starting frequency (the
lowest frequency) to the ending frequency (the highest frequency).

Spectrum basically refers to the entire group of frequencies.

Bandwidth

● Wireless communications are normally carried out over a limited range of


frequencies, known as a frequency band. This frequency band is known as the
bandwidth.
● Bandwidth measures the amount of data that can be transferred in a given amount
of time over a data channel.
● It’s the difference between the highest and the lowest frequencies of a data channel.
● In technical terms, bandwidth is frequency range within a given band that is
typically used for signal transmission.
● The measurement unit of frequency is cycles per second i.e. hertz.

The following formula to calculate the bandwidth is as follow:

B = [f(max) - f(min)] bits/sec

Here, bandwidth is denoted by B, and f(max) and f(min) are the frequency.

Frequency:
● The term "frequency" defines the number of oscillations that happen in a data
transmission per second.
● In terms of networking, the data is transmitted in the form of signals, which are
composed of waves. The number of oscillations per second specifies the signal
frequency.
● It is commonly measured in Hertz (Hz).
● Frequency is also significant in wireless communication, where a signal's frequency
is mathematically connected to its wavelength.

The following formula to calculate the frequency is as follow:

f = (1 / T) Hz

Here, f is the frequency of the signal wave, and T is the time of the oscillation in seconds

Key Differences between the Bandwidth and Frequency

Features Bandwidth Frequency

Definition It is a networking term that It refers to the number of oscillations


refers to the maximum that happen in a data transmission per
quantity of data that may be second.
transmitted per unit of time.

Measures Its measure unit is bits/sec. Its measure unit is Hertz.


Unit

Time The frequency of a signal is It is often specified in bits per second.


measuremen given in cycles per second.
t
Usage It is mainly utilized in It is mainly utilized in science and
computing and signal engineering to define the rate of
processing. oscillatory and vibratory phenomena,
like radio waves, audio signals,
mechanical vibrations, and light.

Denote It is denoted by the upper It is denoted by the lowercase letter "f".


case letter "B".

Larger Units Its larger units are kilohertz, Its larger units are kilohertz, terahertz,
terahertz, megahertz, and megahertz, and gigahertz
gigahertz.

Signal:

A Signal is an electromagnetic wave that is used to communicate system-to-system by


sending data from one network to another network is basically known as “Signal”.

In a computer network there are mainly two types of signals are:

1. Analog Signal
2. Digital Signal

Analog Signal:

An analog signal is defined as a continuous signal in which one time-varying quantity (such
as voltage, pressure, etc.) represents another time-based variable. In simple terms, n an
analog signal one variable is analog over the other.

Examples of analog signals are analog phones, human voice, etc.


Characteristics of an Analog Signal

These are the following characteristics of an analog signal:

● It works on continuous data.


● It helps you to live natural or physical values.
● It is either periodic or non-periodic.
● The minimum and maximum values are either positive or negative.
● These sorts of electronic signals are time-varying.
● It has low accuracy.
● It helps to measure natural or physical values.

Advantages of Analog Signal

These are the following benefits of an analog signal:

● It is best suited for audio and video transmission.


● It is low cost and portable.
● It uses less bandwidth than digital sounds.
● These signals are easier to process.
● It posses a higher density.
● It offers a more accurate representation of a sound.
● It is the natural form of a sound.
● These systems are less sensitive in terms of electrical tolerance.

Disadvantages of Analog Signal


These are the following drawbacks of an analog signal:

● It possesses a lower quality signal than digital.


● The analog wires are quite expensive and are not easily portable.
● It has low availability of models with digital interfaces.
● It offers limitations in editing.
● Recording analog sound on the tape becomes expensive if the tape is broken.
● Tape is becoming hard to find.
● There is a chance of data corruption.
● It offers poor multi-user interfaces.
● It is difficult to synchronize analog sound.
● The cables are sensitive to external influences

Digital Signal

A digital signal is defined as a signal that is used to represent data as a sequence of discrete
values at any given time. It can only take on, at most, one of a finite number of values.

Examples of digital signals are computers, digital phones, etc.

Characteristics of a Digital Signal

These are the following characteristics of digital signal:


● These are continuous signals.
● As digital signals are versatile, so it is widely used.
● These signals are often processed and transmitted better compared to analog
signals.
● It has higher accuracy.

Advantages of Digital Signal

These are the following benefits of digital signal:

● Digital signals convey information with less noise, distortion, and interference.
● These signals can be transmitted over long distances.
● These signals can be compressed easily.
● Equipment that uses digital signals is more common and less expensive.
● It can be reproduced easily in mass quantities at comparatively low costs.
● These signals are easily encrypted.
● Digital signal processing is more flexible.
● The probability of error occurrence is often reduced by employing error detection
and correction codes.
● It makes running instruments free from errors.
● It offers a lot of editing tools.

Disadvantages of Digital Signal:

These are the following drawbacks of digital signal:

● Sampling causes loss of information.


● Processor speed is limited.
● Digital systems and processing are more complex.
● Higher bandwidth is required for data communication

Difference between the Analog signals and Digital signals

Analog signals Digital signals


Analog signals are difficult to get analysed at Digital signals are easy to analyse.
first.

Analog signals are more accurate than Digital signals are less accurate.
digital signals.

Analog signals take time to be stored. It has Digital signals can be easily stored.
infinite memory.

To record an analog signal, the technique In recording digital signal, the sample
used, preserves the original signals. signals are taken and preserved.

There is a continuous representation of There is a discontinuous representation


signals in analog signals. of signals in digital signals.

Analog signals produce too much noise. Digital signals do not produce noise.

Examples of analog signals are Human voice, Examples of digital signals are Computers,
Thermometer, Analog phones etc. Digital Phones, Digital pens, etc.

Analog And Digital Data


Data can be analog or digital. The term analog data refers to information that is continuous;
digital data refers to information that has discrete states. Analog data take on continuous
values. Digital data take on discrete values.

Example:
Analog Data : Analog clock, Sounds made by a human voice etc.

Digital Data : Data are stored in computer memory in the form of 0's and 1's.
Transmission Impairment in Data Communication
In communication system, analog signals travel through transmission media, which tends
to deteriorate the quality of analog signal, which means that the signal at the beginning of
the medium is not the same as the signal at the end of the medium. The imperfection
causes signal impairment. Below are the causes of the impairment.

Causes of impairment –

● Attenuation – It means loss of energy. The strength of signal decreases with


increasing distance which causes loss of energy in overcoming resistance of
medium. This is also known as attenuated signal. Amplifiers are used to amplify
the attenuated signal which gives the original signal back and compensate for
this loss.
Attenuation is measured in decibels(dB). It measures the relative strengths of two signals
or one signal at two different point.

Attenuation(dB) = 10log10(P2/P1)

P1 is the power at sending end and P2 is the power at receiving end.

Distortion – It means changes in the form or shape of the signal. This is generally seen in
composite signals made up with different frequencies. Each frequency component has its
own propagation speed traveling through a medium. And thats why it delay in arriving at
the final destination Every component arrive at different time which leads to distortion.
Therefore, they have different phases at receiver end from what they had at senders end.
Noise – The random or unwanted signal that mixes up with the original signal is called
noise. There are several types of noise such as induced noise, crosstalk noise, thermal noise
and impulse noise which may corrupt the signal.
Induced noise comes from sources such as motors and appliances. These devices act as
sending antenna and transmission medium act as receiving antenna.

Thermal noise is movement of electrons in wire which creates an extra signal. Crosstalk
noise is when one wire affects the other wire.

Impulse noise is a signal with high energy that comes from lightning or power lines
Transmission Medium:

● The transmission medium is a physical path between the transmitter and the
receiver i.e. it is the channel through which data is sent from one place to another.
● Transmission media is a communication channel that transmits information from
the source/transmitter to the receiver.
● It is a physical path for data transfer through electromagnetic signals. Information is
carried over in the form of bits.
● It can mediate the propagation of signals for telecommunication. Signals are
imposed on a wave that is suitable for the chosen medium.
● These media lie underneath the physical layer that regulates them.
○ Guided Transmission Media

○ UnGuided Transmission Media

Guided Transmission Media

● It is defined as the physical medium through which the signals are transmitted. It is
also known as Bounded media.
● These media consist of wires through which the data is transferred.
● Guided media is a physical link between transmitter and recipient devices.
● Signals are directed in a narrow pathway using physical links.
● These media types are used for shorter distances since physical limitation limits the
signal that flows through these transmission media.

Types Of Guided media:

Twisted pair:
In this type of transmission media, two insulated conductors of a single circuit are twisted
together to improve electromagnetic compatibility. These are the most widely used
transmission medium cables. These are packed together in protective sheaths.A twisted
pair consists of two insulated copper wires arranged in a regular spiral pattern.
The degree of reduction in noise interference is determined by the number of turns per
foot. Increasing the number of turns per foot decreases noise interference.

They reduce electromagnetic radiation from pairs and crosstalk between the neighbouring
pair. Overall, it improves the rejection of external electromagnetic interference.

Twisted pair is a physical media made up of a pair of cables twisted with each other. A
twisted pair cable is cheap as compared to other transmission media. Installation of the
twisted pair cable is easy, and it is a lightweight cable. The frequency range for twisted pair
cable is from 0 to 3.5KHz.

Types of Twisted pair:

Unshielded Twisted Pair:

An unshielded twisted pair is widely used in telecommunication.

These consist of two insulated copper wires that are coiled around one another

These types of transmission media block interference without depending on any physical
shield.

The unshielded twisted pair are very affordable and are simple to set up. These provide a
high-speed link. :
Advantages Of Unshielded Twisted Pair:

○ It is cheap.

○ Installation of the unshielded twisted pair is easy.

○ It can be used for high-speed LAN.

Disadvantage:

○ This cable can only be used for shorter distances because of attenuation.

Shielded Twisted Pair

● A shielded twisted pair is a cable that contains the mesh surrounding the wire that
allows the higher transmission rate.
● This twisted cable consisted of a foil shield to block external interference.
● The insulation within these types of twisted cable allow greater data transmission
rate.
● These are used in fast-data-rate Ethernet and in data and voice channels of
telephone lines.

Characteristics Of Shielded Twisted Pair:

○ The cost of the shielded twisted pair cable is not very high and not very low.

○ An installation of STP is easy.

○ It has higher capacity as compared to unshielded twisted pair cable.

○ It has a higher attenuation.

○ It is shielded that provides the higher data transmission rate.

Disadvantages

○ It is more expensive as compared to UTP and coaxial cable.

○ It has a higher attenuation rate.

Applications of Twisted pair cables :


● Twisted Pair cables are used in telephone lines to provide data and voice
channels.
● The DSL lines make use of these cables.
● Local Area Networks (LAN) also make use of twisted pair cables.
● They can be used for both analog and digital transmission.
● RJ-45 is a very common application of twisted pair cables.

Coaxial Cable
A coaxial cable is an electrical cable with a copper conductor and an insulator shielding
around it and a braided metal mesh that prevents signal interference and cross talk. Coaxial
cable is also known as coax.

The core copper conductor is used for the transmission of signals and the insulator is used
to provide insulation to the copper conductor and the insulator is surrounded by a braided
metal conductor which helps to prevent the interference of electrical signals and prevent
cross talk. This entire setup is again covered with a protective plastic layer to provide extra
safety to the cable.

Structure of Coaxial Cable

Coaxial Cable
Copper conductor: A central conductor, which consists of copper. The conductor is the
point at which data transmits.

Insulator: Dielectric plastic insulation around the copper conductor. it is used to maintain
the spacing between the center conductor and shield.

Braided mesh: A braided mesh of copper helps to shield from electromagnetic


interference, The braid provides a barrier against EMI moving into and out of the coaxial
cable.

Protective plastic layer: An external polymer layer, which has a plastic coating. It is used
to protect internal layers from damages.

Types of Coaxial cables

1. Hardline coaxial cable: Hardline coaxial cable’s center conductor is made of

copper, silver and has a larger diameter when compared to other coaxial cables.
2. Flexible coaxial cable: The flexible coaxial cables are very flexible and the inner

conductor is surrounded by a flexible polymer.


3. Semi-rigid coaxial cable: Semi-rigid coaxial cable uses a solid copper outer

sheath with a dielectric of Polytetrafluoroethylene.


4. Formable coaxial cable: It is an alternative to semi-rigid cable, instead of a rigid

copper outer sheath a flexible metal sheath is utilized.


5. Twinaxial cable: It has two central conductors in the core and a single outer

core and dielectric. these cables are best for low-frequency digital and video
transmission.
6. Triaxial cable: It is also known as Triax. It is very much similar to a coaxial cable

but with an additional copper braid added to it, the braid works as a shield and
protects from noise. Triaxial cables offer more bandwidth.
7. Rigid coaxial cable: Rigid coaxial cable is made up of two copper tubes

supported at cable ends and fixed intervals across the length of the cable using
PTFE supports or disk insulators. The rigid coaxial cable cannot be bent. It is
mainly used in TV and FM broadcasting systems.
Applications of Coaxial cable

The coaxial cables are used in Ethernet LANs and also used in MANs

1. Television: Coaxial cable used for television would be 75 Ohm and RG-6 coaxial

cable.
2. Internet: Coaxial cables are also used for carrying internet signals, RG-6 cables

are used for this.


3. CCTV: The coaxial cables are also used in CCTV systems and both RG-59 AND

RG-6 cables can be used.


4. Video: The coaxial cables are also used in video Transmission the RG-6 is used

for better digital signals and RG-59 for lossless transmission of video signals.
5. HDTV: The HDTV uses RG-11 as it provides more space for signals to transfer.

Advantages

1. Coaxial cables support high bandwidth.


2. It is easy to install coaxial cables.
3. coaxial cables have better cut-through resistance so they are more reliable and
durable.
4. Less affected by noise or cross-talk or electromagnetic inference.
5. Coaxial cables support multiple channels

Disadvantages

1. Coaxial cables are expensive.


2. The coaxial cable must be grounded in order to prevent any crosstalk.
3. As a Coaxial cable has multiple layers it is very bulky.
4. There is a chance of breaking the coaxial cable and attaching a “t-joint” by
hackers, this compromises the security of the data.
5.
Coaxial cable is of two types:

1. Baseband transmission: It is defined as the process of transmitting a single signal


at high speed.

2. Broadband transmission: It is defined as the process of transmitting multiple


signals simultaneously.

Advantages Of Coaxial cable:

○ The data can be transmitted at high speed.

○ It has better shielding as compared to twisted pair cable.

○ It provides higher bandwidth.

Disadvantages Of Coaxial cable:

○ It is more expensive as compared to twisted pair cable.

○ If any fault occurs in the cable causes the failure in the entire network.

Fibre Optic Cable

○ Fibre optic cable is a cable that uses electrical signals for communication.

○ Fibre optic is a cable that holds the optical fibres coated in plastic that are used to
send the data by pulses of light.
○ The plastic coating protects the optical fibres from heat, cold, electromagnetic
interference from other types of wiring.

○ Fibre optics provide faster data transmission than copper wires.

○ fiber optic cable, these are thin strands of glass that guide light along their length.
These contain multiple optical fibers and are very often used for long-distance
communications. Compared to other materials, these cables can carry huge amounts
of data and run for miles without using signal repeaters. Due to lesser requirements,
they have less maintenance costs and it improves the reliability of the
communication system. These can be unidirectional as well as bidirectional in
nature.

Diagrammatic representation of fibre optic cable:

Basic elements of Fibre optic cable:

An Optical Fiber is a cylindrical fiber of glass which is hair thin size or any transparent
dielectric medium. The fiber which is used for optical communication is waveguides made
of transparent dielectrics.
Main element of Fiber Optics
● Core: It is the central tube of very thin size made of optically transparent
dielectric medium and carries the light transmitter to receiver and the core
diameter may vary from about 5um to 100 um.
● Cladding: It is outer optical material surrounding the core having reflecting
index lower than core and cladding helps to keep the light within the core
throughout the phenomena of total internal reflection.
● Buffer Coating: It is a plastic coating that protects the fiber made of silicon
rubber. The typical diameter of the fiber after the coating is 250-300 um.

Types of Fiber optics

On the basis of the Number of Modes:

● Single-mode fiber: In single-mode fiber, only one type of ray of light can
propagate through the fiber. This type of fiber has a small core diameter (5um)
and high cladding diameter (70um) and the difference between the refractive
index of core and cladding is very small. There is no dispersion i.e. no
degradation of the signal during traveling through the fiber. The light is passed
through it through a laser diode.

● Multi-mode fiber: Multimode fiber allows a large number of modes for the light
ray traveling through it. The core diameter is generally (40um) and that of
cladding is (70um). The relative refractive index difference is also greater than
single mode fiber. There is signal degradation due to multimode dispersion. It is
not suitable for long-distance communication due to large dispersion and
attenuation of the signal. There are two categories on the basis of Multi-mode
fiber i.e. Step Index Fiber and Graded Index Fiber. Basically these are
categories under the types of optical fiber on the basis of Refractive Index

On the basis of Refractive Index:

● Step-index optical fiber: The refractive index of core is constant. The refractive
index of the cladding is also constant. The rays of light propagate through it in
the form of meridional rays which cross the fiber axis during every reflection at
the core-cladding boundary.

● Graded index optical fiber: In this type of fiber, the core has a non-uniform
refractive index that gradually decreases from the centre towards the
core-cladding interface. The cladding has a uniform refractive index. The light
rays propagate through it in the form of skew rays or helical rays. it is not cross
the fiber axis at any time.

On the basis of Material Used:


○ Plastic Optical Fibres: For transmission of light, polymethylmethacrylate is used as
core material
○ Glass Fibres: It is an extremely fine glass fibres, core and cladding of the optical
fibre is made of plastic.

○ Core: The optical fibre consists of a narrow strand of glass or plastic known as a
core. A core is a light transmission area of the fibre. The more the area of the core,
the more light will be transmitted into the fibre.

○ Cladding: The concentric layer of glass is known as cladding. The main functionality
of the cladding is to provide the lower refractive index at the core interface as to
cause the reflection within the core so that the light waves are transmitted through
the fibre.

○ Jacket: The protective coating consisting of plastic is known as a jacket. The main
purpose of a jacket is to preserve the fibre strength, absorb shock and extra fibre
protection.

Following are the advantages of fibre optic cable over copper:

○ Greater Bandwidth: The fibre optic cable provides more bandwidth as compared
copper. Therefore, the fibre optic carries more data as compared to copper cable.

○ Faster speed: Fibre optic cable carries the data in the form of light. This allows the
fibre optic cable to carry the signals at a higher speed.

○ Longer distances: The fibre optic cable carries the data at a longer distance as
compared to copper cable.

○ Better reliability: The fibre optic cable is more reliable than the copper cable as it
is immune to any temperature changes while it can cause obstruct in the
connectivity of copper cable.

○ Thinner and Sturdier: Fibre optic cable is thinner and lighter in weight so it can
withstand more pull pressure than copper cable.
UnGuided Transmission

○ An unguided transmission transmits the electromagnetic waves without using any


physical medium. Therefore it is also known as wireless transmission.

○ In unguided media, air is the media through which the electromagnetic energy can
flow easily.unbounded or wireless media, they help in transmitting electromagnetic
signals without using a physical medium. Here, air is the medium. There is no
physical connectivity between transmitter and receiver. These types of transmission
media are used for longer distances however they are less secure than guided media.

○ unbounded or wireless media, they help in transmitting electromagnetic signals


without using a physical medium. Here, air is the medium. There is no physical
connectivity between transmitter and receiver. These types of transmission media
are used for longer distances however they are less secure than guided media.

Unguided transmission is broadly classified into three categories:

Radio waves
Radio waves are transmitted in every direction throughout free space. Since these are
omnidirectional, sent waves can be received by any antenna. These waves are useful when
the data is to multicasted from one sender to multiple receivers. Radio waves can cover
large areas and even penetrate obstacles such as buildings and walls. The frequency of
these waves ranges between 3 kHz to 1GHz. Due to its omnidirectional nature, issues such
as interference might arise when another signal with the same bandwidth or frequency is
sent.

Radio waves are transmitted in every direction throughout free space. Since these are
omnidirectional, sent waves can be received by any antenna. These waves are useful when
the data is to multicasted from one sender to multiple receivers. Radio waves can cover
large areas and even penetrate obstacles such as buildings and walls. The frequency of
these waves ranges between 3 kHz to 1GHz. Due to its omnidirectional nature, issues such
as interference might arise when another signal with the same bandwidth or frequency is
sent.

○ Radio waves are the electromagnetic waves that are transmitted in all the directions
of free space.

○ Radio waves are omnidirectional, i.e., the signals are propagated in all the directions.

○ The range in frequencies of radio waves is from 3Khz to 1 khz.

○ In the case of radio waves, the sending and receiving antenna are not aligned, i.e., the
wave sent by the sending antenna can be received by any receiving antenna.

○ An example of the radio wave is FM radio.

Applications Of Radio waves:

○ A Radio wave is useful for multicasting when there is one sender and many
receivers.

○ An FM radio, television, cordless phones are examples of a radio wave.

Advantages Of Radio transmission:


○ Radio transmission is mainly used for wide area networks and mobile cellular
phones.

○ Radio waves cover a large area, and they can penetrate the walls.

○ Radio transmission provides a higher transmission rate.

Microwaves

For these waves, it is important for the transmitter and receiver antenna to be aligned. This
is why it is known as line-of-sight transmission. Due to this, they are suitable for shorter
distances. They comprise of electromagnetic waves with frequencies ranging between
1-400 GHz. Microwaves provide bandwidth between the range of 1 to 10 Mbps. Distance
covered by the signal is proportional to the height of the antenna. For travelling to longer
distances, the height of the tower should be increased. These are further sub categorized as
terrestrial and satellite type microwave transmission.

Microwaves are of two types:

○ Terrestrial microwave

○ Satellite microwave communication.


Terrestrial type microwave transmission: In this type, high directional antennas are used
for line of sight propagation paths that use frequency between 4-12 GHz. These are
parabolic antennas having diameters that range from 12 inches to feet depending on their
spacing.

Satellite type microwave transmission: Signals are transmitted to those spaces where
satellites are positioned and they retransmit the signal to appropriate locations. Since they
only receive and retransmit the signal, they act as repeaters. It is a much more flexible and
reliable method of communication in comparison with cables and fiber systems.

Terrestrial Microwave Transmission

○ Terrestrial Microwave transmission is a technology that transmits the focused beam


of a radio signal from one ground-based microwave transmission antenna to
another.

○ Microwaves are the electromagnetic waves having the frequency in the range from
1GHz to 1000 GHz.

○ Microwaves are unidirectional as the sending and receiving antenna is to be aligned,


i.e., the waves sent by the sending antenna are narrowly focussed.

○ In this case, antennas are mounted on the towers to send a beam to another antenna
which is km away.

○ It works on the line of sight transmission, i.e., the antennas mounted on the towers
are the direct sight of each other.

Characteristics of Microwave:

○ Frequency range: The frequency range of terrestrial microwave is from 4-6 GHz to
21-23 GHz.

○ Bandwidth: It supports the bandwidth from 1 to 10 Mbps.

○ Short distance: It is inexpensive for short distance.


○ Long distance: It is expensive as it requires a higher tower for a longer distance.

○ Attenuation: Attenuation means loss of signal. It is affected by environmental


conditions and antenna size.

Advantages Of Microwave:

○ Microwave transmission is cheaper than using cables.

○ It is free from land acquisition as it does not require any land for the installation of
cables.

○ Microwave transmission provides an easy communication in terrains as the


installation of cable in terrain is quite a difficult task.

○ Communication over oceans can be achieved by using microwave transmission.

Disadvantages of Microwave transmission:

○ Eavesdropping: An eavesdropping creates insecure communication. Any malicious


user can catch the signal in the air by using its own antenna.

○ Out of phase signal: A signal can be moved out of phase by using microwave
transmission.

○ Susceptible to weather condition: A microwave transmission is susceptible to


weather condition. This means that any environmental change such as rain, wind
can distort the signal.

○ Bandwidth limited: Allocation of bandwidth is limited in the case of microwave


transmission.

Satellite Microwave Communication

○ A satellite is a physical object that revolves around the earth at a known height.

○ Satellite communication is more reliable nowadays as it offers more flexibility than


cable and fibre optic systems.
○ It can communicate with any point on the globe by using satellite communication.

○ The satellite accepts the signal that is transmitted from the earth station, and it
amplifies the signal. The amplified signal is retransmitted to another earth station.

Advantages Of Satellite Microwave Communication:

○ The coverage area of a satellite microwave is more than the terrestrial microwave.

○ The transmission cost of the satellite is independent of the distance from the centre
of the coverage area.

○ Satellite communication is used in mobile and wireless communication applications.

○ It is easy to install.

○ It is used in a wide variety of applications such as weather forecasting, radio/TV


signal broadcasting, mobile communication, etc.

Disadvantages Of Satellite Microwave Communication:

○ Satellite designing and development requires more time and higher cost.

○ The Satellite needs to be monitored and controlled on regular periods so that it


remains in orbit.

○ The life of the satellite is about 12-15 years. Due to this reason, another launch of the
satellite has to be planned before it becomes non-functional.

Infrared

These waves are useful for only very short distance communication. Unlike radio waves,
they do not have the ability to penetrate barriers. Their range varies between 300GHz –
400THz. Since they have larger bandwidth, the data rate is very high for infrared waves.
These have less interference and are more secure

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


short ranges.
○ The frequency of the infrared in the range from 300 GHz to 400 THz.

○ It is used for short-range communication such as data transfer between two cell
phones, TV remote operation, data transfer between a computer and cell phone
resides in the same closed area.

Characteristics Of Infrared:

○ It supports high bandwidth, and hence the data rate will be very high.

○ Infrared waves cannot penetrate the walls. Therefore, the infrared communication in
one room cannot be interrupted by the nearby rooms.

○ An infrared communication provides better security with minimum interference.

○ Infrared communication is unreliable outside the building because the sun rays will
interfere with the infrared waves.

Pros and Cons of Transmission Media in Computer Networks

The following table summarises the advantages and disadvantages of transmission media:

Type Advantages Disadvantages

Unshielded Less expensive, Attenuation leads to


Twisted Pair short-distance
Easy to install, communication,
High speed Susceptible to external
interference

Shielded Twisted Reduced crosstalk, Bulky and expensive,


Pair
Faster than UTP Difficult to install

Optical Fibre Increased bandwidth, High-cost, Fragile


Cable
Immunity to interference
Coaxial Cable High bandwidth, Complete disruption due to
single cable failure
Noise immunity

Radio Easy to generate, More interference

Can penetrate obstacles

Infrared Less interference Cannot penetrate obstacles

Applications of Transmission Media in Computer Networks

Type Uses

Unshielded Twisted Pair Telephonic applications

Shielded Twisted Pair Fast data rate ethernet

Optical Fibre Cable For transferring large volume of data

Coaxial Cable Cable TVs, Analog TV

Radio Cordless phones, AM/FM radios

Infrared Wireless mouse, printers, keyboards

Microwave Mobile phones, televisions


UNIT 3

1. Synchronous Transmission And Asynchronous Transmission

Synchronous Transmission: In Synchronous Transmission, data is sent in form


of blocks or frames. This transmission is the full-duplex type. Between
sender and receiver, synchronization is compulsory. In Synchronous
transmission, There is no time-gap present between data. It is more efficient
and more reliable than asynchronous transmission to transfer a large amount
of data.

Example:

● Chat Rooms

● Telephonic Conversations

● Video Conferencing

Advantages and Disadvantages of Synchronous Transmission

There are various advantages and disadvantages of synchronous transmission. Some


advantages and disadvantages of synchronous transmission are as follows:

Advantages

1. It aids the user in transferring a huge amount of data.

2. Every byte is sent without a pause before the next.


3. It also helps to reduce timing errors.

4. It allows connected devices to communicate in real-time.

Disadvantages

1. The sender and receiver must operate at the same clock frequency
simultaneously.

2. The accuracy of the received data is determined by the receiver's capacity to


count the received bits precisely.

Asynchronous Transmission: In Asynchronous Transmission, data is sent in


form of byte or character. This transmission is the half-duplex type
transmission. In this transmission start bits and stop bits are added with
data. It does not require synchronization.

Example:

● Email

● Forums
● Letters

Advantages and Disadvantages of Asynchronous Transmission

There are various advantages and disadvantages of Asynchronous transmission.


Some advantages and disadvantages of Asynchronous transmission are as follows:

Advantages

1. It doesn't require synchronizing the receiver and transmitter.

2. It is a very flexible technique of data transmission.

3. This kind of transmission is simple to implement.

Disadvantages

1. The timing errors may occur because synchronization is difficult to determine.

2. These bits could be mistakenly recognized due to the noise on the channel.

3. The start and stop bits are extra bits that must be utilized in asynchronous
transmission.
4. It transmits information at a slower rate.

Difference between Synchronous Transmission and Asynchronous


Transmission:

Synchronous Asynchronous
S. No.
Transmission Transmission

In Synchronous In Asynchronous
transmission, data is transmission, data is
1.
sent in form of blocks sent in form of bytes or
or frames. characters.

Synchronous Asynchronous
2.
transmission is fast. transmission is slow.

Asynchronous
Synchronous
3. transmission is
transmission is costly.
economical.
In Synchronous In Asynchronous
transmission, the time transmission, the time
4. interval of interval of
transmission is transmission is not
constant. constant, it is random.

In this transmission, Here, users do not


users have to wait till have to wait for the
the transmission is completion of
5.
complete before transmission in order
getting a response to get a response from
back from the server. the server.

In Synchronous In Asynchronous
transmission, there is transmission, there is a
6.
no gap present gap present between
between data. data.

While in Asynchronous
7. Efficient use of transmission, the
transmission lines is transmission line
remains empty during
done in synchronous a gap in character
transmission. transmission.

The start and stop bits


The start and stop bits are used in
8. are not used in transmitting data that
transmitting data. imposes extra
overhead.

Asynchronous
Synchronous transmission does not
transmission needs need synchronized
precisely synchronized clocks as parity bit is
9.
clocks for the used in this
information of new transmission for
bytes. information of new
bytes.

Errors are detected Errors are detected and


10. and corrected in real corrected when the
time. data is received.
High latency due to
Low latency due to
processing time and
11. real-time
waiting for data to
communication.
become available.

Examples: Telephonic
conversations, Video Examples: Email, File
12.
conferencing, Online transfer,Online forms.
gaming.

2. Types of Errors

Error is a condition when the receiver’s information does not match the sender’s
information. During transmission, digital signals suffer from noise that can
introduce errors in the binary bits traveling from sender to receiver. That means
a 0 bit may change to 1 or a 1 bit may change to 0.

Errors are introduced into the binary data transmitted from the sender to the receiver
due to noise during transmission. The error can be a single-bit error, multi-bit error, or
burst error. Error detection methods are used to check whether the receiver has
received correct data or corrupted data. And error correction is used to correct the
detected errors during the transmission of data from sender to receiver.

Types of Errors

Single-Bit Error
A single-bit error refers to a type of data transmission error that occurs when
one bit (i.e., a single binary digit) of a transmitted data unit is altered during
transmission, resulting in an incorrect or corrupted data unit.

Single bit errors are least likely type of errors in serial data transmission. To see why,
imagine a sender sends data at 10 Mbps. This means that each bit lasts only for 0.1 μs
(micro-second). For a single bit error to occur noise must have duration of only 0.1 μs
(micro-second), which is very rare. However, a single-bit error can happen if we are
having a parallel data transmission. For example, if 16 wires are used to send all 16 bits
of a word at the same time and one of the wires is noisy, one bit is corrupted in each
word.

Single-Bit Error

Multiple-Bit Error

A multiple-bit error is an error type that arises when more than one bit in a data
transmission is affected. Although multiple-bit errors are relatively rare when
compared to single-bit errors, they can still occur, particularly in high-noise or
high-interference digital environments.
Multiple-Bit Error

Burst Error

The term burst error means that two or more bits in the data unit have changed from 0
to 1 or vice-versa. Note that burst error doesn’t necessarily mean that error occurs in
consecutive bits. The length of the burst error is measured from the first corrupted bit to
the last corrupted bit. Some bits in between may not be corrupted.

Burst errors are mostly likely to happen in serial transmission. The duration of the noise
is normally longer than the duration of a single bit, which means that the noise affects
data; it affects a set of bits. The number of bits affected depends on the data rate and
duration of noise.

3. Error Detection Techniques

To detect errors, a common technique is to introduce redundancy bits that


provide additional information. Various techniques for error detection include::

1. Simple Parity Check

2. Two-dimensional Parity Check

3. Checksum

4. Cyclic Redundancy Check (CRC)

Single-Bit Error

Multiple-Bit Error
A multiple-bit error is an error type that arises when more than one bit in a data
transmission is affected. Although multiple-bit errors are relatively rare when
compared to single-bit errors, they can still occur, particularly in high-noise or
high-interference digital environments.

Multiple-Bit Error

Burst Error

When several consecutive bits are flipped mistakenly in digital transmission, it


creates a burst error. This error causes a sequence of consecutive incorrect
values.
Burst Error

Error Detection Techniques

To detect errors, a common technique is to introduce redundancy bits that


provide additional information. Various techniques for error detection include::

1. Simple Parity Check

2. Two-dimensional Parity Check

3. Checksum

4. Cyclic Redundancy Check (CRC)

Simple Parity Check


Data sent from the sender undergoes parity check :

● 1 is added as a parity bit to the data block if the data block has an odd number of
1's.
● 0 is added as a parity bit to the data block if the data block has an even number
of 1's.
This procedure is used for making the number of 1's even. This is commonly known as
even parity checking.

Refer to the below image for the simple parity-checking method:

Disadvantage:

● Only single-bit error is detected by this method, it fails in multi-bit error detection.
● It can not detect an error in case of an error in two bits.

Refer to the below image for the disadvantage simple parity checking method
Two-Dimensional Parity Check
For every row and column, parity check bits are calculated by a simple method of parity
check. Parity for both rows and columns is transmitted with the data sent from sender to
receiver. At the receiver’s side, parity bits are compared with the calculated parity of the
data received.

Disadvantages:

● If 2 bits are corrupted in 1 data unit and another data unit exactly at the same
position is corrupted then this method is not able to detect the error.
● Sometimes this method is not used for **detecting 4-bit **errors or more than
4-bit errors.

Checksum
Checksum is an error detection which detects the error by dividing the data into
segments of equal size and then use 1's complement to find the sum of the segments
and then the sum is transmitted with the data to the receiver and same process is done
by the receiver and at the receiver side, all zeros in the sum indicates the correctness of
the data.

1. First of all data is divided into k segments in a checksum error detection scheme
and each segment has m bits.
2. For finding out the sum at the sender’s side, all segments are added through 1's
complement arithmetic. And for determining the checksum we complement the
sum.
3. Along with data segments, the checksum segments are also transferred.
4. All the segments that are received on the receiver's side are added through 1S
complement arithmetic to determine the sum. Then complement the sum.
5. The received data is accepted only on the condition that the result is found to be
0. And if the result is not 0 then it will be discarded.

Refer to the below image for the checksum method


Disadvantages: In checksum error is not detected, if one sub-unit of the data has one or
more corrupted bits and corresponding bits of the opposite value are also corrupted in
another sub-unit. Error is not detected in this situation because in this case the sum of
columns is not affected by corrupted bits.

Cyclic Redundancy Check


● The checksum scheme uses the addition method but CRC uses binary division.
● A bit sequence commonly known as cyclic redundancy check is added to the end
of the bits in CRC. This is done so that the resulting data unit will be divisible by
the second binary number that is predetermined.
● The receiving data units on the receiver's side need to be divided by the same
number. These data units are accepted and found to be correct only on the
condition that the remainder of this division is zero. The remainder shows that the
data is not correct. So, they need to be discarded.
Disadvantages: Cyclic Redundancy Check may lead to overflow of data.
Error Correction
When the data is sent from the sender side to the receiver's side it needs to be detected
and corrected. So an error correction method is used for this purpose. Following are the
two ways through which error correction can be handled:

Backward Error Correction


In this method, When any error is found in the data at the receiver's end. Then the
request for resending the whole data unit is sent by the receiver.

Forward Error Correction


In this method, an error-correcting code is used by the receiver that automatically
corrects the errors.

Error Correction Techniques


We can detect the error using a single additional bit but we cannot use this bit for the
correction purpose. It is important to know the exact location of the error if we want to
correct that error. For example, for finding out the single-bit error, the error detection
code checks out that the error is actually in one of the seven bits. Let d represents the
number of data bits and r represents the number of redundant bits. The formula below is
used for finding the r number of redundant bits :

2r>=d+r+1

The above formula is used to find out the value of r. For example, suppose 4 will be the
value of d, then 3 will be the only and smallest value that satisfies this particular relation.
A hamming code is a technique developed by R.W Hamming for finding out the position
of the error bit. This Hamming code is based on the relationship between the redundant
bits and data units and its main advantage is that it can be applied to data units of any
length.

Hamming Code
Parity bits: The parity bits are the special type of bits that are added to the original data
of binary bits to make the total 1s either even or odd.
Even parity: For checking the even parity, the following concept is used: The value of
the even parity bit will be 0 if the total occurrence of 1s is even and the value of the
parity bit can be 1 if the total occurrence of 1s is odd.

Odd Parity: For checking the even parity, the following concept is used: The value of the
parity bit will be 1 if the total occurrence of 1s is even and the value of the parity bit can
be 0 if the total occurrence of 1s is odd.

Algorithm of Hamming code:

1. Add the information in 'd' bits to the redundant bits 'r' to make data as d+r.
2. A decimal value will be assigned by the position of each (d+r) digit.
3. In positions 1,2…2k, the 'r' bits will be placed.
4. The parity bits are again calculated on the receiver's end. The position of an error
defines the parity bit's decimal value.

Relationship b/w Error position & binary number:

Error Position Binary Number

0 000

1 001

2 010
3 011

4 100

5 101

6 110

7 111

We take this example for a detailed explanation of the concept of hamming code. 1010
is supposed to be the original data that needs to be transferred.

d' total number of data bits= 4

Redundant bits number=

2r>=d+r+1

2r>=4+r+1

So, the above-given relation is completely satisfied when 3 will be the value of r.

Determining the position of the redundant bits: 3 is the number of redundant bits. r1, r2,
and r4 are used to show these three bits. We can find out the position of these bits for
the raised power of 2. So according to this, their positions will be
1,21,22

● r1 position is 1
● r2 position is 2
● r4 position is 4

Refer to the below image for the data with redundant bits

Determining the Parity Bits


Determining the r1 bit

The r1 bit value is calculated based on a parity check performed on the bits available at
the position whose binary conversion contains 1 at the first position.

Refer to the below image for the finding r1 bit value


From the above figure, we can find the position having 1 as its first bit in binary
representation is 1,3,5,6. Now the even-parity check method is applied to these bit
positions. The number of 1’s at these bit positions 2 which is an even number so the 0 is
the value of the r1 bit.

Determining r2 bit The r2 bit value is calculated based on a parity check performed on
the bits available at the position whose binary conversion contains 1 at the second
position.

Refer to the below image for the finding r2 bit value


From the above figure, we can find the position having 1 as its second bit in binary
representation is 2, 3, 6, 7. Now the even-parity check method is applied to these bit
positions. The number of 1’s at these bit positions is 1 which is an odd number so 1 is
the value of the r2 bit.

Determining r4 bit The r4 bit value is calculated based on a parity check performed on
the bits available at the position whose binary conversion contains 1 at the third
position.

Refer to the below image for the finding r4 bit value


From the above figure, we can find the position having 1 as its third bit in binary
representation is 4, 5, 6, 7. Now the even-parity check method is applied to these bit
positions. The number of 1’s at these bit positions 2 which is an even number so the 0 is
the value of the r4 bit.

Data to be transmitted is given below:

Refer to the below image for the data to be transmitted.

Suppose when the data is received at the receiver end the value of the 4th bit is
changed to 1 from 0. Now parity bits are calculated again to find the position of the
error.
R1 bit 1, 3, 5 and 7 are the positions of the bits for the r1 bit.

Refer to the below image for calculating the r1 bit parity

We can find from the above figure that the r1 binary representation is 1100. After
applying the even-parity check method on the bits appearing in the r4 bits we get an
even number of totals 1’s. So 0 is the value for the r1.

R2 bit 2, 3, 6, and 7 are the positions of the bits for the r2 bit.

Refer to the below image for calculating the r2 bit parity


We can find from the above figure that the r2 binary representation is 1001. After
applying the even-parity check method on the bits appearing in the r4 bits we get an
even number of totals 1’s. So 0 is the value for the r2.

R4 bit 4, 5, 6 and 7 are the positions of the bits for the r4 bit.

Refer to the below image for calculating the r4-bit parity


We can find from the above figure that the r4 binary representation is 1011. After
applying the even-parity check method on the bits appearing in the r4 bits we get an
odd number of totals 1’s. So 1 is the value for the r4.

Redundant bits r4r2r1 binary representation is 100 which is represented as 4 in decimal


value. So there is an error in the data at the 4th position and the value of the bit
corresponding to the 4th position must be changed from 1 to 0 for error correction.

Flow Control and Error Control


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.
● 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.
● Error Control:
Error control is functionality used to detect erroneous transmissions in data
frames and retransmit them.
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.

Methods to Control the Flow of Data


To maintain the rate of data transmission between sender and receiver, it is required to
use flow control protocol. The data link layer provides us with the protocol for controlling
the data transmission rate. So here we are going to discuss one of the flow control
protocols named stop and wait protocol.

The stop-and-wait protocol is a simple protocol that allows the sender to send the next
packet when the acknowledgment of the previous packet is received from the receiver.

What is the Stop and Wait Protocol?


● While transmitting data from sender to receiver, the flow of data is required to be
controlled.
● It uses a link between sender and receiver as a half-duplex link.
● Suppose there is a situation where the sender is sending the data at a rate
higher than the rate of the receiver to process and receive the data. Flow Control
protocol ensures that the data does not get lost.
● The flow control protocols ensure that the sender sends the data only at a rate
that the receiver can receive and process it.
● This is a flow control protocol that works in a noiseless channel.
● Noiseless channel is an idealistic channel in which no data frames are lost,
corrupted, or duplicated.
● After sending the data, the sender will stop and wait until he receives an
acknowledgment from the receiver.
● Flow control service is provided by the data link layer of the OSI suite.

Primitives of Stop and Wait Protocol


Sender Side
Rule 1: Sender will send one packet at a time Rule 2: Sender will send the next packet
to the receiver only when it receives the acknowledgment of the previous packet from
the receiver. So, in the stop-and-wait protocol, the sender-side process is very simple.

Note: The sender sends one packet at a time and does not send the next packet until it
receives an acknowledgment of the previous packet from the receiver.

Receiver Side
Rule 1: The receiver receives the data packet and then consumes the data packet. Rule
2: The receiver sends acknowledgment when the data packet is consumed. So, in this
protocol, the receiver-side process is also very simple.

Working of Stop and Wait Protocol


● If there is a communication between sender and receiver, then the sender sends
the packet to the receiver, and the packet is called a data packet.
● The sender will not send the second packet to the receiver until acknowledgment
of the first packet is received.
● The receiver will send the acknowledgment for the packet that the receiver has
received.
● When the sender receives the acknowledgment, it sends the next packet to the
receiver.
● This process of sending data and receiving acknowledgment continues until all
the packets are not sent.
● The main benefit of stop and wait protocol is its simplicity
● But this protocol has some disadvantages, too; for example, if the sender wants
to send 10,000 data packets, and the sender can not send all 10,000 packets at
a time in this protocol, one packet is allowed to be sent at a time.

Refer to the below image to see the working of data transmission in the stop-and-wait
protocol

Advantages of Stop and Wait Protocol


● This protocol provides flow control.
● One of the main advantages of the stop-and-wait protocol is its simplicity.
● Stop and wait protocol is useful in LAN as its efficiency decreases with the
increasing distance between sender and receiver.
● If we increase the data packet size, the efficiency is going to increase. Hence, it
is suitable for transmitting big data packets.
● Stop & wait protocol is accurate as the sender sends the next frame to the
receiver only when the acknowledgment of the previous packet is received. So
there is less chance of the frame being lost.

Disadvantages of Stop and Wait Protocol


Problems Occur Due to Lost Data
Suppose the sender sends the data packet, but the data packet is lost due to some
reason. Since the receiver has not received the packet for a long time, the sender does
not receive any acknowledgment from the receiver, so it will not send the next packet.

In this case, two problems occur in data transmission:

● For an acknowledgment, the sender has to wait for an infinite amount of time.
● The receiver will also have to wait for an infinite amount of time to receive the
data.

Refer to the below image to see data loss in the stop-and-wait protocol

Problems Occur Due to Lost Acknowledgment


Suppose the sender sends the packet, and the receiver will send an acknowledgment.
But the acknowledgment sent by the receiver will be lost in the network, therefore
sender will not send the next packet as the acknowledgment is not received In this
case, one problem occurs in data transmission:

● The sender has to wait for an infinite amount of time due to acknowledgment loss
in the network.

Refer to the below image to see acknowledgment loss in the stop-and-wait protocol

Problem Due to the Delay in Data or Acknowledgment


Suppose the sender sends the data packet, and the receiver will also send the
acknowledgment, but the acknowledgment is received by the sender after the timeout
period. So sender will not consider this acknowledgement as there may be a situation
that the sender will retransmit the packet after time out.

Refer to the below image to see delayed data and acknowledgment in the stop-and-wait
protocol
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.
● 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.

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.

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.
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 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-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
transmission of data frames and reliable data frames from sender to receiver.
from sender to receiver.

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

Flow control focuses on the Error control focuses on the detection and correction of
proper flow of data and data 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 2. Sliding Window ARQ.
Protocol,
2. Sliding Window Protocol.

What Is HDLC and Its Stations?

The High-Level Data Link Control (HDLC) is part of the data link layer protocol in the
OSI Model. HDLC is applied for point-to-point and multipoint link structures based on
the bit-oriented data format.
It also applies the Automatic Repeat Request (ARQ) for performing full-duplex
communication between network channels due to its high flexibility and reliable
network structure.

To efficiently integrate and use the HDLC protocols, different stations are to be
effectively applied in the channel:

● Primary Station - It handles establishing and de-establishing the primary


data channel to share frames in the network, known as commands.
● Secondary Station - They work under the command of the primary station,
and the frames transmitted by this station are known as responses.
● Combined Station - This network station can work as both the primary and
secondary stations and handle commands and responses.

HDLC Transfer Models

The HDLC primarily supports two types of transfer models, which are:

● Normal Response Model (NRM) - This transfer model combines primary and
secondary stations in point-to-point or multipoint network configurations to
exchange commands from primary stations and responses from secondary
stations.
● Asynchronous Balanced Model (ABM) - In this transfer model, combined
stations are installed in a point-to-point configuration for exchange
commands and responses in a balanced format.

Characteristics

The HDLC protocol in computer networks is a widely used data link protocol for

reliable and efficient data transmission.

● It operates at the data link layer of the OSI (Open Systems Interconnection)

model. HDLC is used for point-to-point connections between two devices.

● HDLC is a bit-oriented protocol that uses a frame structure to transmit data.

● Each frame consists of a start flag. It is used to indicate the beginning of a

frame. Also, HDLC has an end flag, which indicates the end of a frame.
● HDLC consists of a control field, which contains information about the type of

data being transmitted, and a cyclic redundancy check (CRC) code, which

detects errors in the transmitted data.

● The control field in HDLC also contains information about the type of control

being performed, such as whether the data is a command or a response.

● HDLC supports both unidirectional and bidirectional communication.

● HDLC provides flow control mechanisms during the communication process to

ensure that the transmitted data does not overload the receiving node.

● It also supports both asynchronous and synchronous transmission modes in a

computer networking channel.

● HDLC can be used with various physical layer technologies, including serial

links and point-to-point protocols.

● In case of redundancy, HDLC will retransmit the erroneous frame, ensuring that

the data is transmitted correctly.

HDLC Frames and Fields


Frames are a crucial component of HDLC and play a critical role in modern-day

computer networks. Being a networking professional, you should know the frames

and types of HDLC. Let’s raise the curtains from it.

To have a count on frames and types of HDLC, there are six types of fields present in

HDLC and three types of HDLC frames. Firstly we are going with the types of fields.

● Start Flag: The start flag is a predefined sequence of bits that indicates the

beginning of an HDLC frame. The start flag serves as a synchronization

mechanism and allows the receiving device to identify the start of the frame.

● Address Field: The address field contains the destination and source

addresses of the HDLC frame. This field allows the receiving device to identify

the intended recipient of the frame and determine if it should process the

frame.

● Control Field: The control field contains information about the type of data

being transmitted and the type of control being performed. The control field

can indicate whether the frame is an information frame, a supervisory frame, or

a control frame.

● Information Field: The information field contains the data being transmitted.

This field can be used for unidirectional data transfer or for transmitting data

between two devices.

● Frame Check Sequence (FCS): The Frame Check Sequence (FCS) is a cyclic

redundancy check (CRC) code used to detect errors in the transmitted data.

The FCS allows the receiving device to detect and correct errors that may

occur during transmission.


● End Flag: The end flag is a predefined sequence of bits that indicates the end

of an HDLC frame. The end flag allows the receiving device to identify the end

of the frame and determine if the transmission was successful.

Size of Different Fields :


Field Name Size (bits)

Flag Field 8 bits

Address Field 8 bits

Control Field 8 or 16 bits

Information Field Variable (not used in some


type of HDLC frames)

FCS (Frame Check 16 or 32 bits


Sequence) Field

Closing Flag Field 8 bits

1.
Each HDLC frame has a specific format, including a start flag, end flag, control field,

and cyclic redundancy check (CRC) code. The start flag is used to indicate the

beginning, while the end flag indicates the end of a frame. The control field contains

information about the type of data being transmitted. The CRC code is used to detect

errors in the transmitted data and ensure that it is transmitted accurately.

● Information Frame (I-Frame) – Information frames contain the data to be

transmitted and are used for unidirectional data transfer. They include an

information field, which holds the data, as well as a control field, which

contains information about the type of data being transmitted. The first bit of

the control field is 0.

● Supervisory Frame (S-Frame) – It is a type of HDLC frame, used for flow control

and error detection and correction. They include a control field, which contains

information about the type of control being performed, such as flow control,

error detection, and retransmission of lost or damaged frames. The very first

bit of the control field is 10.

● Unnumbered Frame (U – Frame) – U-frames, also known as unnumbered

frames, are used for system management and communication between

interconnected network nodes. U-frame’s first two bits are 11.


What is Multiplexing?
Multiplexing is the process of sharing a medium or bandwidth. It combines
several signals from many sources and transmits them across a single
communication/physical line. In simple words, multiplexing simply means
multiple sources but one link.

When multiple senders attempt to send over the same medium, a device known
as a Multiplexer divides the physical channel and assigns one to each. On the
other hand, a De-multiplexer receives data from a single medium, recognizes it,
and distributes it to different recipients.

The process of combining data streams or input is called Multiplexing, and the
hardware used for multiplexing is known as a Multiplexer. A Multiplexer (MUX) is
a device that is used to combine n input lines to produce a single output line.
Multiplexing is done in a many-to-one approach, with n input and one output line.

Demultiplexing is performed at the receiving end using a device known as a


Demultiplexer (DEMUX). Demultiplexer divides a signal into its constituent
signals (one input and n outputs). As a result, demultiplexing follows the
one-to-many approach.

Why Do We Need Multiplexing?


● When multiple signals need to be sent simultaneously from the sender
side, a multiplexer is used to combine multiple signals into one so that they
can be received simultaneously at the receiving end.
● Multiplexing minimizes the number of physical connections or wireless
channels required to transmit numerous signals by combining them and
transmitting them over a single transmission medium.
● It is costly to send multiple diverse signals separately and requires more
wires, which increases the network's overall cost. As a result, multiplexing
is required. Let's take a TV cable distributor as an example, which
transmits numerous channels via a single wire.
● Bandwidth is effectively utilized. For instance, if there are ten signals and
the medium's bandwidth is 100, each signal shares ten units.

Types of Multiplexing Techniques


There are primarily four types of Multiplexing techniques, and they are as follows:

Frequency Division and Time Division Multiplexing


● Frequency division Multiplexing is a sort of multiplexing in which the
bandwidth of a single physical medium is divided into several smaller,
independent frequency channels.
● It is mainly used when the link's bandwidth is greater than the combined
bandwidths of the signals to be sent.
● Frequency Division Multiplexing (FDM) is an analog technology.
● Each signal in FDM has a different frequency.
● If the input signal for frequency division multiplexing is digital, it must be
converted to analog before being sent to the modulator.
● The modulation process splits the input signals into frequency bands, which are
then combined to generate a composite signal.
● We can see a lot of inter-channel cross-talk in FDM since the bandwidth is
divided into frequency channels. So to prevent inter-channel cross-talk, we must
place some unused bandwidth strips between every channel. These unused
bandwidth strips are called guard bands. These guard bands are shown in the
figure given below.

If there are 20 signals to be transmitted from the sender to the receiver and the
bandwidth of the communication medium is 100 units then each of the signals will use 5
units of bandwidth (100/20).

Now as there are multiple signals to be shared from the same common medium the
possibility of collision is increased and as we know transmission is an expensive thing
so we must avoid the collision.

Hence, we need multiplexing so that multiple signals can be transmitted over a single
medium without the collision of data.
Advantages of Frequency-division Multiplexing

● The FDM modulation process is relatively simple and straightforward.


● It is simple to send a large number of signals at the same time.
● It does not require any synchronization between the transmitter and receiver.
● Slow narrowband fading affects only one channel.
● The demodulation of FDM multiplexing is simple.

Disadvantages of Frequency-division Multiplexing

● When employing FDM, the problem of cross-talk arises.


● The bandwidth of communication channels must be quite large.
● FDM is only utilized when low-speed channels are required.
● A significant number of filters and modulators are required.
● Wideband fading affects all FDM channels.

Applications of Frequency-division Multiplexing


● It is utilized in FM and AM radio broadcasts. Each FM radio station broadcasts at
a different frequency, which is multiplexed to generate a composite signal. The
multiplexed signal is broadcast over the air.
● FDM is also used in television broadcasting.
● FDM is utilized by first-generation cellular phones.

Wavelength Division Multiplexing (WDM)

● Wavelength Division Multiplexing (WDM) is used in fiber optics to increase the


capacity of a single fiber.
● In Wavelength Division Multiplexing, various light waves from different sources
are merged into a composite light signal, and then transmitted across the
channel to the receiver.
● It is an analog multiplexing approach and very much similar to FDM.
● Using multiplexers, optical signals from many sources are combined to generate
a larger range of light. The demultiplexer differentiates the signals at the
receiving end before sending them to their respective destinations.
● In WDM, Prisms are used to combine and split light waves. This prism assists in
bending the light beam according to the angle of incidence and frequency of the
light.
● Prism primarily serves as the multiplexer in the WDM technology. It then
combines the multiple optical signals to create a composite signal, which is
subsequently transmitted through an optical fiber connection.
Time Division Multiplexing (TDM)

● Time Division Multiplexing (TDM) divides the shared channel among its users
using time slots. Each user can only send data during the time slot allotted to
them.
● TDM is primarily used with digital signals but can also be used with analog
signals.
● Digital signals are split into frames, similar to time slots

1. Synchronous Time Division Multiplexing

As the name suggests, in the synchronous time division multiplexing the time slot for
transmission is pre-assigned to each sender device. Even if the sender device has the
data to transmit or not, the time is allocated to the device. As we have discussed we
send the data in the form of frames so in the case when there is no data to be sent, only
the time slot is sent in the form of the frame.
2. Asynchronous Time-Division Multiplexing or Statistical Time-Division Multiplexing

In the asynchronous time division multiplexing, the allocated time slot is not fixed and
pre-assigned but we only provide the time slot to those devices which have the data to
be sent. So, we can conclude that in asynchronous time division multiplexing, the data
is only sent from the active senders and hence the frame contains the data as well at
the time slot.
Time Division Multiplexing Advantages and Disadvantages
Advantages

● We divide the time slot only so the user gets full bandwidth to be utilized by the
user.
● The user gets more flexible usage as the user is independent in his/her allocated
time slot.
● There is very little chance of cross-talk due to independence in the allocated time
slot.
● The modulation and demodulation (in particular) are easier as compared to the
frequency division multiplexing.
● It is more efficient and the cost of implementation is also lesser than the
frequency division multiplexing.
● It can support both analog and digital signals.

Disadvantages

● There is a need for synchronization in case of time division multiplexing.


● It is more complex to implement than the frequency division multiplexing.

Time Division Multiplexing Applications

● The time division multiplexing is widely used in ISDN (Indian Deep Space
Network) telephone lines.
● It is also used in the PSTN (Public Switched Telephone Network) networks.

Difference between Frequency Division and Time Division Multiplexing


Let us know the differences between the Frequency division and Time-division
multiplexing techniques.

Time-division multiplexing (TDM) Frequency division multiplexing


(FDM)

TDM stands for Time Division Multiplexing. FDM stands for Frequency Division
Multiplexing.

In TDM we divide the time slot. In FDM we divide the frequency.

TDM can be divided into two types. There is no division of FDM.

In TDM the division of time is known as In FDM the frequency division is done
Time Slot. using Guard Bands.

TDM can work with both digital and analog FDM can only work with analog signals.
signals.
The chance of conflict is low in the case of The chance of conflict is high in the case
TDM. of FDM.

TDM is more efficient than FDM. FDM is less efficient than TDM.

In TDM, there is a need for In FDM, there is no need for


synchronization. synchronization.

The chip or the wiring of the TDM is The chip or the wiring of the FDM is
simpler. complex.

The chances of cross-talk are quite low in There are chances of cross-talk in FDM.
the case of TDM.

There is some chance of propagation There is no propagation delay in the


delay in the case of TDM. case of FDM.

Circuit Switching in Computer Network


What is Circuit Switching?
Circuit switching is a connection-oriented switching method used in computer networks
where a dedicated communication path is established, maintained, and terminated for
each communication session between two stations.
A complete end-to-end path in the circuit switch network is required before any
communication may take place. When a user wants to send data, audio, or video, a
request signal is sent to the receiver, and the receiver responds with an
acknowledgment to ensure that the dedicated path is available. After receiving
acknowledgment, the data is sent along a predefined path. Previously circuit switching
was used in public telephone networks for voice transmission, but in the current
scenario, it is replaced by virtual circuits.

However, it is considered inefficient compared to packet switching, as the channel


capacity is fully dedicated for the duration of the connection. This means that if no data
is being transmitted, the channel capacity is wasted.

Phases of Circuit Switching


Circuit switching involves three phases:

Circuit Establishment
● This phase is also called as setup phase.
● In this phase, a dedicated connection is established directly between two nodes
or from the source to the destination using a series of switching centres.
● The sender at the source and the receiver at the destination send communication
signals to request and acknowledge the establishment of the circuit.
Data Transfer
● The data transfer phase continues for the duration of the communication.
● Once the circuit is established, data (voice or other signals) is transmitted over
the dedicated circuit between the sender and receiver.
● During this phase, the resources are exclusively allocated to ongoing
communication, ensuring a constant quality of service.

Circuit Disconnect
This phase is also called the teardown phase. During this phase, one of the two
endpoints sends a message to initiate disconnection, resulting in the termination of the
communication path, which includes the intermediate links.

Types of Switches in Circuit Switching


There are two types of switches used in circuit switching:

Space Division Switches


Space Division Switching is a form of circuit switching in which separate sets of
crosspoints are used to establish transmission paths. This technique leverages crossbar
switches, which can be metallic crosspoints or semiconductor gates that can be enabled
or disabled by a control unit. One significant advantage of Space Division Switching is
its high speed, high capacity, and ability to provide nonblocking switches. However, the
blocking level depends on the number of crosspoints used.

Time Division Switches


The time-division switching is a technique that involves routing multiple connections
along a common trunk line. This method utilizes time-division multiplexing to divide the
connections into segments, ensuring that these segments are transmitted at predefined
intervals.

Advantages of Circuit Switching

● Simple Network Design:


Circuit-switched networks offer simpler network structure
● Security:
The dedicated nature of the circuit can provide a certain amount of security by
lowering the risk of eavesdropping or data interception.
● Reliability:
Since the dedicated communication line is reserved for the duration of the
connection, circuit switching offers a high level of reliability. This guarantees that
the data will be sent without loss or deterioration.
● Fixed Bandwidth:
The dedicated circuit ensures that the available resources are reserved and
guaranteed for that particular connection by offering a defined amount of
bandwidth for the duration of the communication.
● Quality of Service (QoS):
Circuit switching ensures quality of service, which implies that the network can
prioritize specific types of traffic, such as audio and video, over others, such as
email and web browsing.
● Low Latency:
Circuit switching often offers lower latency due to the dedicated circuit. This is
especially important for real-time applications such as voice conversations and
interactive communication.

Disadvantages of Circuit Switching


● Inefficient use of resources:
Circuit switching creates a dedicated communication path between two nodes,
which leads to the allocation of resources like bandwidth and switch ports
exclusively for the duration of the communication. However, this approach can be
inefficient since the reserved resources may go unused during downtime or no
communication.
● Vulnerability to failures:
The use of dedicated communication paths in circuit switching exposes the
network to possible failures like cable cuts or switch malfunctions. If such failures
occur, the communication path needs to be re-established, which can lead to
delays and potential data loss.
● High setup time:
Circuit switching necessitates a large amount of setup time to establish a
dedicated communication link between two nodes. This can lead to
communication delays.
● Limited scalability:
Circuit switching is not easily scaled. As the number of users and communication
demands grow, the network infrastructure must be expanded to handle more
dedicated circuits, which can be costly and complex.
● High Cost:
The dedicated nature of circuits and the need for specialized equipment
contribute to higher costs than more efficient packet-switching technologies.
● Limited Features:
Circuit-switched networks have limited features beyond simple point-to-point
voice communication, making them less adaptable for multimedia, data, and
interactive applications.

Packet Switching
Packet Switching in computer networks is a method of transferring data to a
network in the form of packets. In order to transfer the file fast and efficiently over
the network and minimize the transmission latency, the data is broken into small
pieces of variable length, called Packet. At the destination, all these small parts
(packets) have to be reassembled, belonging to the same file.
Packet Switching uses the Store and Forward technique while switching the
packets; while forwarding the packet each hop first stores that packet then
forwards. This technique is very beneficial because packets may get discarded at
any hop for some reason. More than one path is possible between a pair of
sources and destinations. Each packet contains the Source and destination
address using which they independently travel through the network. In other
words, packets belonging to the same file may or may not travel through the
same path. If there is congestion at some path, packets are allowed to choose
different paths possible over an existing network.

Diagram of Packet Switching

In packet switching the data is divided into small packets which allow faster
movement of data. Each packet contains two parts that are Header and Payload,
the header on each packet contains information.

Packet Switching

Advantages of Packet Switching over Circuit


Switching

● More efficient in terms of bandwidth, since the concept of reserving a


circuit is not there.
● Minimal transmission latency.
● More reliable as a destination can detect the missing packet.
● More fault tolerant because packets may follow a different path in case
any link is down, Unlike Circuit Switching.
● Cost-effective and comparatively cheaper to implement.

Disadvantage of Packet Switching over Circuit


Switching

● Packet Switching doesn’t give packets in order, whereas Circuit


Switching provides ordered delivery of packets because all the packets
follow the same path.
● Since the packets are unordered, we need to provide sequence
numbers for each packet.
● Complexity is more at each node because of the facility to follow
multiple paths.
● Transmission delay is more because of rerouting.
● Packet Switching is beneficial only for small messages, but for bursty
data (large messages) Circuit Switching is better.

Types of Packet Switching

1. Connection-oriented Packet Switching (Virtual Circuit)

Before starting the transmission, it establishes a logical path or virtual


connection between sender and receiver and all packets belonging to this flow
will follow this predefined route.

Virtual Circuit ID is provided by switches/routers to uniquely identify this virtual


connection.
Data is divided into small units and all these small units are appended with the
help of sequence numbers.

Packets arrive in order at the destination. Overall, three phases take place here-
The setup, data transfer and tear-down phases.

Virtual Circuit

All address information is only transferred during the setup phase. Once the
route to a destination is discovered, entry is added to the switching table of each
intermediate node.

During data transfer, packet header may contain information such as length,
timestamp, sequence number, etc.
2. Connectionless Packet Switching (Datagram)

In Connectionless Packet Switching each packet contains all necessary


addressing information such as source address, destination address, port
numbers, etc.
Packets belonging to one flow may take different routes because routing
decisions are made dynamically, so the packets that arrive at the destination
might be out of order.

It has no connection setup and teardown phase, like Virtual Circuits.


Packet delivery is not guaranteed in connectionless packet switching, so reliable
delivery must be provided by end systems using additional protocols.

Frame Relay Protocol

Frame Relay is a packet-switching network protocol that is designed to work at

the data link layer of the network. It is used to connect Local Area Networks

(LANs) and transmit data across Wide Area Networks (WANs). It allows
transmission of different size packets and dynamic bandwidth allocation. Also, it

provides a congestion control mechanism to reduce the network overheads due

to congestion. It does not have an error control and flow management

mechanism.

Frame Relay Network

Working:

Frame relay switches set up virtual circuits to connect multiple LANs to build a
WAN. Frame relay transfers data between LANs across WAN by dividing the
data in packets known as frames and transmitting these packets across the
network. It supports communication with multiple LANs over the shared physical
links or private lines.
Each LAN has an access link that connects routers of LAN to the service
provider network terminated by the frame relay switch.

For data transmission, LAN’s router sends the data packets over the access link.
The packet sent by LAN is examined by a frame relay switch to get the Data Link
Connection Identifier (DLCI) which indicates the destination of the packet. Frame

relay switch already has the information about addresses of the LANs

connected to the network hence it identifies the destination LAN by looking at

DLCI of the data packet.

DLCI basically identifies the virtual circuit (i.e. logical path between nodes that
doesn’t really exist) between source and destination network. It configures and
transmits the packet to the frame relay switch of destination LAN which in turn
transfers the data packet to destination LAN by sending it over its respective
access link.

Hence, in this way, a LAN is connected with multiple other LANs by sharing a
single physical link for data transmission.

Frame relay also deals with congestion within a network. Following methods are
used to identify congestion within a network:

1. Forward Explicit Congestion Network (FECN) – FECN is a part of


the frame header that is used to notify the destination about the
congestion in the network. Whenever a frame experiences congestion
while transmission, the frame relay switch of the destination network
sets the FECN bit of the packet that allows the destination to identify
that packet has experienced some congestion while transmission.
2. Backward Explicit Congestion Network (BECN) – BECN is a part of
the frame header that is used to notify the source about the congestion
in the network. Whenever a frame experiences congestion while
transmission, the destination sends a frame back to the source with a
set BECN bit that allows the source to identify that packet that was
transmitted had experienced some congestion while reaching out to the
destination. Once, source identifies congestion in the virtual circuit, it
slows down transmission to avoid network overhead.
3. Discard Eligibility (DE) – DE is a part of the frame header that is used
to indicate the priority for discarding the packets. If the source is
generating a huge amount of traffic on the certain virtual network then it
can set DE bits of less significant packets to indicate the high priority for
discarding the packets in case of network overhead.

Types:

1. Permanent Virtual Circuit (PVC) – These are the permanent


connections between frame relay nodes that exist for long durations.
They are always available for communication even if they are not in
use. These connections are static and do not change with time.
2. Switched Virtual Circuit (SVC) – These are the temporary
connections between frame relay nodes that exist for the duration for
which nodes are communicating with each other and are closed/
discarded after the communication.

Advantages:

1. High speed
2. Scalable
3. Reduced network congestion
4. Cost-efficient
5. Secured connection

Disadvantages:

1. Lacks error control mechanism


2. Delay in packet transfer
3. Less reliable

Routing in Switched Network

Routing algorithms are a fundamental part of computer networks. Without them,


data would not be able to flow between different parts of the network. In this
article, we will take a look at the different types of routing algorithms and how
they work.

Routing algorithms are the set of rules that dictate how data is routed through a
network. There are many different routing algorithms, each with its own strengths
and weaknesses. Selecting the right routing algorithm for a given network is a
critical task, as the algorithm can have a significant impact on the performance of
the network.

Types of Routing Algorithms in Computer Networks


The general classification of Routing algorithms in a computer network is into
two types: adaptive and nonadaptive routing algorithms.

Adaptive Routing Algorithms


There are many different types of routing algorithms that can be used in computer
networks, but one type that is particularly well-suited for adaptive networks is the
adaptive routing algorithm. This algorithm adjusts its route based on changes in network
conditions, making it an ideal choice for networks that are constantly changing.

One of the benefits of using an adaptive routing algorithm is that it can help to improve
network performance. By constantly adjusting its route, the algorithm can avoid
congestion and find the most efficient path through the network. This can lead to faster
overall performance and reduced latency.

Another plus point of adaptive routing algorithms is that they can be more resilient to
changes in network conditions. If one part of the network becomes unavailable, the
algorithm can automatically reroute traffic around it. This can keep the network running
even in the face of unexpected outages or failures.

Types of Adaptive Routing Algorithms

Centralised Algorithm:

In a centralised routing algorithm, there is a single entity that is responsible for


determining the best route for data to take through a network. This entity, typically a
router, has full knowledge of the network and can make decisions based on factors such
as congestion, bandwidth, and cost.

One advantage of using a centralised routing algorithm is that it can be easier to


implement and manage than a distributed algorithm. Additionally, centralised algorithms
can often be more efficient since the router has complete knowledge of the network.

However, there are some disadvantages to using a centralised routing algorithm. First, if
the router fails, the entire network may fail. Additionally, centralised algorithms can be
slow to react to changes in the network since the router must recalculate routes every
time there is a change.

Isolated Algorithm:
In computer networking, an isolated algorithm is a routing algorithm that does not take
into account the topology of the network. The algorithm simply selects the next hop for a
packet based on the destination address. This type of algorithm is typically used in
small networks where the topology is not complex.

Distributed Algorithm

Routing algorithms are used in computer networks to determine the best path for data to
travel from one point to another. There is a variety of routing algorithms that can be
used, and each has its own advantages and disadvantages.

One type of routing algorithm is the distributed algorithm. This algorithm is typically used
in large networks as it can provide scalability and flexibility. With this algorithm, each
node in the network is responsible for calculating the best path for data to travel. This
can be done by exchanging information with other nodes in the network.

The advantage of using a distributed algorithm is that it can handle changes in the
network more effectively. If a link goes down, for example, the algorithm can quickly
recalculate the best path. The disadvantage of using a distributed algorithm is that it can
be more complex to implement and manage.

Non–Adaptive Routing Algorithms


Non-adaptive routing algorithms are also known as static routing algorithms. Static
routing is a type of routing that does not change the route taken based on network
conditions. This means that the same route is always taken, regardless of whether there
are any changes in network conditions. Static routing is usually used in small networks,
where there are only a few nodes and the conditions are relatively stable.

One advantage of static routing is that it is simpler than adaptive routing. This is
because there is no need to constantly monitor and adjust the route based on changing
conditions. Static routes can also be pre-calculated, which can further simplify the
process. Another advantage is that static routes are more predictable since the same
route is always taken. This can be beneficial in some situations, such as when real-time
data transfer is required.
Routing in Circuit Switched
Network
• Many connections will need paths through more
than one switch
• Need to find a route
—Efficiency
—Resilience
• Public telephone switches are a tree structure
—Static routing uses the same approach all the time
• Dynamic routing allows for changes in routing
depending on traffic
—Uses a peer structure for nodes
Alternate Routing
• Possible routes between end offices predefined
• Originating switch selects appropriate route
• Routes listed in preference order
• Different sets of routes may be used at different
times
Alternate
Routing
Diagram
Routing in Packet Switched
Network
• Complex, crucial aspect of packet switched
networks
• Characteristics required
—Correctness
—Simplicity
—Robustness
—Stability
—Fairness
—Optimality
—Efficiency
Performance Criteria
• Used for selection of route
• Minimum hop
• Least cost
—See Stallings appendix 10A for routing algorithms
Example Packet Switched
Network
Decision Time and Place
• Time
—Packet or virtual circuit basis
• Place
—Distributed
• Made by each node
—Centralized
—Source
Network Information Source
and Update Timing
• Routing decisions usually based on knowledge of
network (not always)
• Distributed routing
— Nodes use local knowledge
— May collect info from adjacent nodes
— May collect info from all nodes on a potential route
• Central routing
— Collect info from all nodes
• Update timing
— When is network info held by nodes updated
— Fixed - never updated
— Adaptive - regular updates
Routing Strategies
• Fixed
• Flooding
• Random
• Adaptive
Fixed Routing
• Single permanent route for each source to
destination pair
• Determine routes using a least cost algorithm
(appendix 10A)
• Route fixed, at least until a change in network
topology
Fixed Routing
Tables
Flooding
• No network info required
• Packet sent by node to every neighbor
• Incoming packets retransmitted on every link except
incoming link
• Eventually a number of copies will arrive at destination
• Each packet is uniquely numbered so duplicates can be
discarded
• Nodes can remember packets already forwarded to keep
network load in bounds
• Can include a hop count in packets
Flooding
Example
Properties of Flooding
• All possible routes are tried
—Very robust
• At least one packet will have taken minimum
hop count route
—Can be used to set up virtual circuit
• All nodes are visited
—Useful to distribute information (e.g. routing)
Random Routing
• Node selects one outgoing path for
retransmission of incoming packet
• Selection can be random or round robin
• Can select outgoing path based on probability
calculation
• No network info needed
• Route is typically not least cost nor minimum
hop
What is a network topology?

A network topology is the physical and logical arrangement of nodes


and connections in a network. Nodes usually include devices such as
switches, routers and software with switch and router features. Network
topologies are often represented as a graph.

Network topologies describe the arrangement of networks and the


relative location of traffic flows. Administrators can use network
topology diagrams to determine the best placements for each node and
the optimal path for traffic flow. With a well-defined and planned-out
network topology, an organization can more easily locate faults and fix
issues, improving its data transfer efficiency.

Network geometry can be defined as the physical topology and the


logical topology. Network topology diagrams are shown with devices
depicted as network nodes and the connections between them as lines.
The type of network topology differs depending on how the network
needs to be arranged.

Why is network topology important?


Network topology plays a major role in how a network functions.
Namely, the topology has a direct effect on network functionality.
Choosing the right topology can help increase performance, as a
properly chosen and maintained network topology increases energy
efficiency and data transfer rates.

A well-defined network topology makes it easier for network admins to


locate faults, troubleshoot issues and to allocate network resources.
Diagrams are an important reference point in helping to diagnose
network issues, as they can represent physical and logical layouts.

What are the types of network topologies?

Network topologies are categorized as either a physical network


topology or logical network topology. The physical topology of a
network is the physical layout of nodes and connections. Connections
include the lines in diagrams that connect nodes, such as Ethernet or
Digital Subscriber Line wires, fiber optics and microwaves. Logical
network topologies define how a network is set up, including which
nodes connect and how, as well as the pattern of data transfers.
This image shows different layouts of network topologies.

There are several types of topologies. For example, physical topologies


include the following:

● Bus network. In the bus network topology, every node is


connected in series along a single cable. This arrangement is
found today primarily in cable broadband distribution networks.
● Star network. In the star network topology, a central device
connects to all other nodes through a central hub. Switched
local area networks based on Ethernet switches and most wired
home and office networks have a physical star topology.
● Ring network. In the ring network topology, the nodes are
connected in a closed-loop configuration. Some rings pass data
in one direction only, while others are capable of transmission
in both directions. These bidirectional ring networks are more
resilient than bus networks since traffic can reach a node by
moving in either direction. Metro networks based on
Synchronous Optical Network technology are the primary
example of ring networks.
● Mesh network. The mesh network topology links nodes with
connections so that multiple paths between at least some
points of the network are available. A network is considered to
be fully meshed if all nodes are directly connected to all other
nodes and partially meshed if only some nodes have multiple
connections to others. Meshing multiple paths increases
resiliency but also increases cost. However, more space is
needed for dedicated links.
● Tree network. The tree network topology consists of one root
node, and all other nodes are connected in a hierarchy. The
topology itself is connected in a star configuration. Many larger
Ethernet switch networks, including data center networks, are
configured as trees.
● Hybrid network. The hybrid network topology is any
combination of two or more topologies. Hybrid topologies
typically provide exceptional flexibility, as they can
accommodate a number of setups. For example, different
departments in the same organization may opt for personalized
network topologies that are more adaptable to their network
needs.

A logical topology for a network refers to the relationship between


nodes and logical connections -- defining how data should transfer.

What is Bridge in Computer Networks?

1. A bridge in a computer network is a device that connects two or more


LANs or network segments, enabling them to communicate with each
other.
2. It operates at the data link layer of the OSI model in computer networks
and reads the source address of incoming data packets, forwarding
them only to their target destination instead of broadcasting them to all
connected segments. This helps reduce network congestion and
improve performance.

A Bridge in computer networks can also improve network security by breaking


up large LANs into smaller ones, reducing the risk of unauthorized access.
Additionally, bridges can establish backup paths across the network, ensuring
uninterrupted network connectivity in case of a failure.

Overall, bridges are valuable networking devices that can help optimize
network performance, enhance security, and ensure reliability.
Functions of Bridge in Computer Networks

Bridges have several functions in computer networks, including:

1. Bridges connect and enable communication between two different


networks at the data link layer in an OSI model.
2. Bridges can also extend a network’s physical size.
3. Bridges can also be used to connect a LAN segment in one location to
another LAN segment in another location via a synchronous modem
connection.
4. To increase performance, bridges are used to divide large, busy
networks into smaller, interconnected networks.
5. Bridges, such as hubs and repeaters, broadcast data to all nodes. Yet,
the MAC (media access control) address table is constantly being
updated in order to identify new segments.
6. Bridges can connect smaller virtual LANs (VLANs) to form bigger
VLANs.
7. A wireless bridge is used to connect wireless networks or networks with
wireless segments.

Working of Bridge in Computer Networks


A bridge in a computer network operates by inspecting the destination MAC
address of incoming data packets and either blocking or forwarding them
based on the destination address.

When a data frame arrives at the bridge, it reads the destination MAC address
and compares it with the address table it has created by monitoring the traffic
on the connected network segments. If the destination MAC address is
located in the table, the bridge forwards the data frame to the network
segment where the destination node is located. If the address is not found,
the bridge blocks the data frame and does not allow it to pass through.

Bridges accept all incoming data packets, amplify them, and then forward
them to the other side of the bridge. However, they only allow specific packets
that are addressed from one network node to another to pass through. This
filtering process helps to reduce network congestion and improve network
performance.

In order to determine which packets are sent from one LAN to another, the
bridge creates an address table that contains the MAC addresses of nodes on
each connected network segment. The address table is dynamically updated
as new nodes are added or removed from the network, or as the network
topology changes.

Overall, the working of a bridge in a computer network involves the inspection


and filtering of data packets based on their destination MAC address, and the
forwarding of approved packets to the appropriate network segment based on
the information stored in the bridge’s address table.
Types of Bridge in Computer Networks

There are three types of bridges in computer networks, which are as follows:

1. Transparent Bridge: Transparent bridges are hidden from other network


devices. This bridge does not reconfigure the network whenever a
station is added or removed. The transparent bridge’s key responsibility
is to either block or forward data based on the MAC address.
2. Source Route Bridge: A source route bridge routes data packets
according to the path given by the source device. The path information
is included in the data packet by the source device, and the packet is
forwarded by the source route bridge along the specified path. This type
of bridge is used in specialized network environments and is less
popular than transparent bridges.
3. Translation Bridge: A translation bridge is a device that translates
network protocols between different network segments. It can translate
data packets between network protocols, allowing network devices on
separate segments to communicate with one another. Translation
bridges are frequently used in networks that employ multiple protocols
or architectures.

Advantages of Bridge in Computer Network

Bridge in computer networks offer several advantages, including:


● Improved Network Performance: Bridges can segment the network into
smaller parts, reducing congestion and improving network performance.
● Address Learning: A bridge in computer network learns the MAC
addresses of devices connected to them and stores them in a table,
which allows them to forward data more efficiently.
● Isolation: A bridge can isolate network problems and prevent them from
affecting the entire network.
● Filtering: A Bridge in computer networks can filter traffic based on MAC
addresses, reducing unnecessary traffic and improving network
efficiency.
● Scalability: Bridges can be easily added to a network to connect
additional LANs, making them scalable.
● Cost-Effective: A Bridge in computer networks is typically less
expensive than routers or switches, making it a cost-effective option for
smaller networks.
● Easy to Install: A bridge in computer networks is relatively easy to install
and configure, which makes it a good option for small businesses or
home networks.

Disadvantages of Bridge in Computer Network

While bridge in computer networks offer several advantages, there are also
some disadvantages to consider, including

● Limited Range: A Bridge in computer networks have a limited range and


can only connect LANs that are physically close to each other.
● Broadcast Storms: If a bridge receives data with an unknown
destination MAC address, it will forward the data to all connected LANs,
which can cause a broadcast storm and degrade network performance.
● Security Risks: A Bridge in computer networks does not offer the same
level of security features as routers or switches, which may make it
more vulnerable to security threats.
● Limited Traffic Control: A Bridge in computer networks does not offer
the same level of traffic control as routers or switches, which may limit
its usefulness in some network configurations.
● Limited Functionality: A Bridge in computer networks is limited in terms
of functionality compared to routers or switches, which may not be
sufficient for more complex network requirements.

Uses of Bridge in Computer Networks

A Bridge in computer networks are used for several purposes, including:

● Connecting LANs: A bridge in computer networks is used to connect


two or more LANs and enable communication between them. This
allows devices on different LANs to communicate with each other.
● Segmenting Networks: Bridges can segment a network into smaller
parts, which improves network performance by reducing congestion and
increasing the overall speed of the network.
● Extending Wireless Networks: Bridges can be used to extend wireless
networks and improve coverage by connecting two or more access
points.
● Load Balancing: A bridge in computer networks can balance traffic
across multiple LANs, which improves network performance by
distributing the load.
● Isolating Network Problems: A bridge in computer networks can isolate
problems related to the network, making it easier to troubleshoot and
resolve issues.
● Connecting Remote Offices: A bridge in computer networks can be
used to connect remote offices and enable communication between
them, which is particularly useful for companies with multiple locations.

Bridge Protocols

Bridge protocols include spanning tree, source routing protocol, and source routing
transparent.
Spanning Tree Protocol (STP) Bridge

This is also known as adaptive or self-learning bridges and is defined in IEEE 802.1
standards. It has already been explained in the above section. Ideally, in bridged
network, the network tree of the bridge provides only one span (link) for each
LAN-to-LAN connection and therefore, no network with bridges can form a loop.
Sometimes, looping can occur.

A broadcast data
packet sent by the computer attached on segment 1can reach to all computers
attached on segment 2 and 3 without a connection between segment 1 and 3
.Sometimes, the bridge connection between segment 1and 3 or like is provided to give
the network more redundancy. Now, in this case the same broadcast packet sent by
the segment 1 will reach to segment 3 by two routes i.e. from segment 1 to 2 to 3 and
another by segment 1 to 3. In this manner the computers on segment 3 will receive
duplicate packets. In case of large networks some segments may receive many
packets and thus cause looping.
A loop, therefore, can cause a broadcast packet or a packet with an unknown
destination to circulate through it, thus rendering the network inoperable. This condition
is avoided by making some bridges not to forward frames. An algorithm known as
distributed spanning tree (DST) accomplishes this task. This algorithm decides which
bridge should forward the packets in the network. Under this scheme bridges exchange
a control message known as a hello message to select a single transmission route.
Remaining bridges maintain a standby position and provide alternate path in case of
the same bridge fails in the selected transmission path. Bridge connecting segment 1
and 3 will be active only if the bridge connecting segment 2 and 3 fails otherwise it acts
as a standby bridge for network. In other words, bridges that support the spanning tree
algorithm have the ability to automatically reconfigure themselves for alternate paths if
a network segment fails, thereby improving overall reliability.
IBM Source Routing Protocol (SRP) Bridge

These are programmed with specific routes for each packet based on considerations
such as the physical location of the nodes, and the number of bridges involved.
Source Routing Transparent (SRT)

It is defined in theIEEE802.1 standard. It is effectively a combination of STP and SRP.


The SRT router can connect LANs by either method, as programmed.
Classification of Bridges

These are classified into local and remote bridges:


1. Local bridges are ordinary bridges
● 2. Remote bridges are used to connect networks that are far from each
other. A WAN is generally provided between two bridges
Figure shows the local and remote bridge
connection.

Fixed Routing Spanning Tree Protocol


In a LAN, redundant links are added to improve the network availability of
LAN. But these redundant links may cause the frame to loop in the network for
an infinite time until some action is taken, e.g, some links are taken down. To
cope with the problem of frame looping, Spanning Tree Protocol (STP) comes
into play.

Need for Spanning Tree:

Consider the scenario below with 3 switches with one user attached to each
switch.

Arvind sends a broadcast frame to LAN and as nature of switch frame are send
out from other ports (Gi0/1 & Gi0/2) except receiving port (Fa0/3). Now, this
frame goes to SW2, SW2 also broadcast frame out of Gi0/2 and Fa0/2 ports.
SW1 receives frame in its Gi0/1 ports. SW1 also broadcast frame then this
frame goes to SW3 and frame broadcasting goes on. Remember that this frame
broadcast also occurs in other direction from SW3 out of Gi0/1 port. Above
discussed frame looping was from SW3’s Gi0/2 ports. You can imagine the
frame flooding in that small LAN. This forever looping of frames around LAN is
called Broadcast storm. This Looping of frames causes three problems as stated
below:
1. MAC table instability – Due to looping of frame around LAN,

MAC-Table of switch get changed frequently. Looping causes incorrect

MAC-table entries resulting in incorrect frame delivery.

2. Broadcast Storm – Repeated forwarding of frames around links in LAN

causes the inefficient use of links.

3. Multiple Frame Transmission – A very serious negative effect of

looping is that multiple copies of same frame are delivered to host.

This process left host with confusion.

How Spanning Tree Protocol Helps?

Spanning tree protocol prevent looping of frames around LAN by placing ports
of switch in either forwarding or blocking state. Interfaces (ports of switch)
which are in forwarding state act as normally but Interfaces in blocking state
doesn’t process any frame received except STP messages and other important
overheads. Blocking Interfaces doesn’t learn MAC addresses, don’t forward
frames and don’t process received frames. Now if we again consider the above
discussed scenario with SW3’s Gi0/2 interface in blocking state.
● Arvind sends the frame to SW3.

● SW3 forwards frame only to Gi0/1 port as Gi0/2 port is in blocking

state.

● Now SW1 receives frame and forward to Fa0/1 and Gi0/1 interfaces.

● SW2 receives frame and forward to Fa0/2 and Gi0/1 interfaces.

● SW3 will receive the frame on Gi0/2 interface but ignores the frame as

it is in blocking state.

In this way looping of frame around LAN can be prevented by using STP.

Simple Mail Transfer Protocol (SMTP)

SMTP (Simple Mail Transfer Protocol) protocol is the standard mechanism for "sending
and receiving the electronic mails via the internet". SMTP is a set of guidelines that
enables users to exchange information.

The actual mail transfer is carried out through the message transfer agent i.e. a system
should have the client MTA(Mail Transfer Agent) to send mail and it should have a
server MTA to receive the mail.
Thus, the SMTP protocol is the protocol that defines the MTA client and MTA server on
the internet. Most email clients, such as Apple Mail, Gmail, Outlook, etc rely on SMTP to
send or receive messages or emails from a sender to a recipient.

What is Simple Mail Transfer Protocol (SMTP)?


SMTP, which stands for, Simple Mail Transfer Protocol, is an email protocol that is used
to send and receive emails over the internet. It is a set of guidelines that are followed to
transmit electronic mail over the Internet. The main purpose of the SMTP is to set up
communication guidelines between the servers.

Basically, in SMTP the actual transfer of the mail is done through the message transfer
agent (MTA). Hence, to send the mail, the system must have the client MTA and
similarly, to receive the mail, the system must have the server MTA.

Using the SMTP protocol, a TCP connection to the SMTP server is opened and then the
client sends the email across the TCP connection. As soon as the server listens for the
TCP connection from any client the connection is established on port 25 and the
connection becomes successful hence the clients can send or receive the email
immediately.

Consider the below image to understand how the SMTP works.

Example
Consider two persons, Alex and Clark. Here, Alex has an account on yahoo with the
username, alex@yahoo(dot)com. Whereas, Clark has an account on google with the
username, clark@google(dot)com.

Now, Alex wants to send an email to the Clark to share some professional data. Below
are the steps that are done to send an email these explain the process of email delivery
from the sender to the receiver, here, Alex and Clark respectively.

1. Alex writes an email on his machine.


2. Alex, then writes the email address of Clark i.e. clark@google(dot)com, and
clicks on the button Send.
3. Alex's email client connects to his domain's SMTP server that pushes the mail.
Here, Alex's server plays the role of an SMTP client.
4. Now, Alex's mail server communicates with Google's mail server to deliver the
message to Clark (clark@google(dot)com).
5. After the SMTP handshake between the servers, the SMTP client sends Alex's
mail to Clark's mail server. Here, Clark's mail server will play the role of an SMTP
server.
6. Now, Clark's SMTP server scans the whole message and recognizes the user
name and the domain name.
7. At last, Clark's mail server receives the email, which is also stored in one of the
mail clients. And this mail can be fetched and read later through an email client
or an application such as Gmail, Outlook, etc.

Components of SMTP
There are four components in the SMTP:

● Mail User Agent (MUA)


● Mail Submission Agent (MSA)
● Mail Transfer Agent (MTA)
● Mail Delivery Agent (MDA)

Working of Simple Mail Transfer Protocol (SMTP)


Let's see how SMTP works and the best way to understand this is to go over the
process of sending emails over the internet which is also discussed in the example
above.
Here, let's see how the working of SMTP takes place behind the process of sending and
receiving mail.

● As shown in the image above, a sender drafts the mail and hits the send button.
Once an SMTP server is established, email clients can connect and communicate
with the server. As the sender has pressed the send button, this triggers the email
client to open an SMTP connection to the server to make a connection so that it
can send the emails.
● Now, the SMTP client uses various commands available in the SMTP to
communicate with the server and to transfer the data like the mail address of the
sender.
● Then the Mail Transfer Agent(MTA) ensures that both the mail addresses are
from the same email domain. If they are the same, it sends the email. But if not,
the server uses the DNS(Domain Name System) to identify the recipient's
domain, and then it'll send it to the right server.

Model of SMTP System


In the SMTP, the user deals with the User Agent(UA). And, to exchange the mail using
the TCP, MTA i.e. mail transfer agent is used.

The MTA is responsible for maintaining the small queue of emails so that it can
schedule the delivery of mail when the receiver is not available. Then, the MTA delivers
the mail to the mailbox of the recipient.

SMTP-client and SMTP-server


Let's take a closer look at the communication that happened in the above example
between Alex and Clark i.e. Alex's mail server and Clark's mail server. Do you remember
that Alex's mail server had to start a link or a channel with Clark's mail server to
communicate or send messages from the sender to the receiver?

Also, the main protocol to handle all the above-mentioned processes was the SMTP.
Now, as shown in the example above, Alex is sending the mail i.e. SMTP client (Alex's
mail server) sends the SMTP commands whereas the SMTP server (Clark's mail server)
responds to the commands. Commands like, HELO, MAIL, RCPT, etc. are the commands
which are discussed in the next section, are used in the SMTP protocol and the SMTP
server responds to these commands.
So, the SMTP client sends the commands to the SMTP server and the server responds
with some kind of numerical codes and at last, after the termination of the SMTP
session, the receiver receives the message in the email client like Outlook, Gmail, etc.

SMTP Commands
Let's look at a few commands of SMTP:

Comm Description
and

HELO This command is used for beginning the email-sending process


and is used to identify the user and full domain name. It is the
beginning of the conversation in which the server sends a HELO
command back with its domain name.

MAIL This command is used to initiate the message transfer and


identifies the originator of the mail. From this command, the
server resets everything and is ready to accept the email
address and after accepting, it'll reply with the 250 OK code.

RCPT This command identifies the recipient of the mail and again the
SMTP server responds with the same code.

DATA This command triggers the transfer of data between the client
and the server.
QUIT After the email has been sent, the client sends this command to
quit the server and if it is closed successfully, the server will
reply with a 221 code.

RSET To abort or cancel the mail transaction, this command is used.


This doesn't close the connection but it does reset everything
and removes all the previous data about the mail and the email
addresses.

Introduction to Electronic Mail

Electronic mail, commonly known as email, is a method of

exchanging messages over the internet. Here are the

basics of email:

1. An email address: This is a unique identifier for each


user, typically in the format of name@domain.com.
2. An email client: This is a software program used to
send, receive and manage emails, such as Gmail,
Outlook, or Apple Mail.
3. An email server: This is a computer system responsible
for storing and forwarding emails to their intended
recipients.

To send an email:

1. Compose a new message in your email client.


2. Enter the recipient’s email address in the “To” field.
3. Add a subject line to summarize the content of the
message.
4. Write the body of the message.
5. Attach any relevant files if needed.
6. Click “Send” to deliver the message to the recipient’s
email server.
7. Emails can also include features such as cc (carbon
copy) and bcc (blind carbon copy) to send copies of the
message to multiple recipients, and reply, reply all, and
forward options to manage the conversation.

Electronic Mail (e-mail) is one of most widely used services of

Internet. This service allows an Internet user to send a message

in formatted manner (mail) to the other Internet user in any part

of world. Message in mail not only contain text, but it also

contains images, audio and videos data. The person who is

sending mail is called sender and person who receives mail is


called recipient. It is just like postal mail service. Components of

E-Mail System : The basic components of an email system are :

User Agent (UA), Message Transfer Agent (MTA), Mail Box, and

Spool file. These are explained as following below.

1. User Agent (UA) : The UA is normally a program which


is used to send and receive mail. Sometimes, it is called
as mail reader. It accepts variety of commands for
composing, receiving and replying to messages as well
as for manipulation of the mailboxes.
2. Message Transfer Agent (MTA) : MTA is actually
responsible for transfer of mail from one system to
another. To send a mail, a system must have client MTA
and system MTA. It transfer mail to mailboxes of
recipients if they are connected in the same machine. It
delivers mail to peer MTA if destination mailbox is in
another machine. The delivery from one MTA to
another MTA is done by Simple Mail Transfer Protocol.

3. Mailbox : It is a file on local hard drive to collect mails.


Delivered mails are present in this file. The user can
read it delete it according to his/her requirement. To
use e-mail system each user must have a mailbox .
Access to mailbox is only to owner of mailbox.
4. Spool file : This file contains mails that are to be sent.
User agent appends outgoing mails in this file using
SMTP. MTA extracts pending mail from spool file for
their delivery. E-mail allows one name, an alias, to
represent several different e-mail addresses. It is
known as mailing list, Whenever user have to sent a
message, system checks recipient’s name against alias
database. If mailing list is present for defined alias,
separate messages, one for each entry in the list, must
be prepared and handed to MTA. If for defined alias,
there is no such mailing list is present, name itself
becomes naming address and a single message is
delivered to mail transfer entity.

Services provided by E-mail system :

● Composition – The composition refer to process that


creates messages and answers. For composition any
kind of text editor can be used.
● Transfer – Transfer means sending procedure of mail
i.e. from the sender to recipient.
● Reporting – Reporting refers to confirmation for
delivery of mail. It help user to check whether their mail
is delivered, lost or rejected.
● Displaying – It refers to present mail in form that is
understand by the user.
● Disposition – This step concern with recipient that
what will recipient do after receiving mail i.e save mail,
delete before reading or delete after reading.

Advantages Or Disadvantages:

Advantages of email:
1. Convenient and fast communication with individuals or
groups globally.
2. Easy to store and search for past messages.
3. Ability to send and receive attachments such as
documents, images, and videos.
4. Cost-effective compared to traditional mail and fax.
5. Available 24/7.

Disadvantages of email:

1. Risk of spam and phishing attacks.


2. Overwhelming amount of emails can lead to
information overload.
3. Can lead to decreased face-to-face communication and
loss of personal touch.
4. Potential for miscommunication due to lack of tone and
body language in written messages.
5. Technical issues, such as server outages, can disrupt
email service.
6. It is important to use email responsibly and effectively,
for example, by keeping the subject line clear and
concise, using proper etiquette, and protecting against
security threats.
Multipurpose Internet Mail Extension

(MIME) Protocol



Multipurpose Internet Mail Extension (MIME) is a standard that

was proposed by Bell Communications in 1991 in order to

expand the limited capabilities of email.

MIME is a kind of add-on or a supplementary protocol that allows

non-ASCII data to be sent through SMTP. It allows the users to

exchange different kinds of data files on the Internet: audio,

video, images, application programs as well.

Why do we need MIME?

Limitations of Simple Mail Transfer Protocol (SMTP):

1. SMTP has a very simple structure


2. Its simplicity however comes with a price as it only
sends messages in NVT 7-bit ASCII format.
3. It cannot be used for languages that do not support
7-bit ASCII format such as French, German, Russian,
Chinese and Japanese, etc. so it cannot be transmitted
using SMTP. So, in order to make SMTP more broad, we
use MIME.
4. It cannot be used to send binary files or video or audio
data.

Purpose and Functionality of MIME –

Growing demand for Email Messages as people also want to

express themselves in terms of Multimedia. So, MIME another

email application is introduced as it is not restricted to textual

data.

MIME transforms non-ASCII data at the sender side to NVT 7-bit

data and delivers it to the client SMTP. The message on the

receiver side is transferred back to the original data. As well as

we can send video and audio data using MIME as it transfers

them also in 7-bit ASCII data.

Features of MIME –

1. It is able to send multiple attachments with a single


message.
2. Unlimited message length.
3. Binary attachments (executables, images, audio, or
video files) may be divided if needed.
4. MIME provided support for varying content types and
multi-part messages.

Working of MIME –

Suppose a user wants to send an email through a user agent and


it is in a non-ASCII format so there is a MIME protocol that

converts it into 7-bit NVT ASCII format. The message is

transferred through the e-mail system to the other side in the

7-bit format now MIME protocol again converts it back into

non-ASCII code and now the user agent of the receiver side reads

it and then information is finally read by the receiver. MIME

header is basically inserted at the beginning of any e-mail

transfer.

MIME with SMTP and POP –

SMTP transfers the mail being a message transfer agent from

the sender’s side to the mailbox of the receiver side and stores it

and MIME header is added to the original header and provides

additional information. while POP being the message access

agent organizes the mails from the mail server to the receiver’s

computer. POP allows the user agent to connect with the

message transfer agent.

MIME Header:

It is added to the original e-mail header section to define

transformation. There are five headers that we add to the original

header:

1. MIME-Version – Defines the version of the MIME


protocol. It must have the parameter Value 1.0, which
indicates that message is formatted using MIME.
2. Content-Type – Type of data used in the body of the
message. They are of different types like text data
(plain, HTML), audio content, or video content.
3. Content-Type Encoding – It defines the method used
for encoding the message. Like 7-bit encoding, 8-bit
encoding, etc.
4. Content Id – It is used for uniquely identifying the
message.
5. Content description – It defines whether the body is
actually an image, video, or audio.

Advantages of MIME:

● It has the ability to transfer text, audio, and video files,


among other sorts of data, in a message.
● Additionally, it allows for the sending and receiving of
emails in a variety of languages, including Hindi, French,
Japanese, Chinese, and others.
● Additionally, it gives users the option to connect HTML
and CSS to email, enabling them to customise and
beautify email according to their preferences.
● Regardless of how long an email is, it can convey the
information inside.
● It gives each email a special ID.

Disadvantages:
● The receiving system’s interpretation of MIME media
types may not always be accurate, which might cause
issues with how the content is handled or displayed.
● Because they call for additional headers to be provided
along with the information, MIME media types can
increase the overhead associated with content
transmission. This might lead to larger transferred data
files and slower transfer rates.
● Consumers frequently lack a solid understanding of
MIME media types, and the use of several media types
can make it even more challenging for consumers to
comprehend the content being transferred.
● Some systems might not always support MIME media
types, which might cause issues with the transmission
of specific kinds of content.

You might also like