0% found this document useful (0 votes)
7 views35 pages

Data Communication Components & Protocols

The document outlines key components of data communication, including the roles of sender, receiver, and message, as well as criteria for evaluating transmission media. It explains the services provided by the data link and transport layers, differentiates between TCP and UDP, and discusses the purpose of the World Wide Web and electronic mail. Additionally, it provides a detailed explanation of the TCP/IP protocol suite, its layers, and functions, along with a brief overview of the OSI model.

Uploaded by

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

Data Communication Components & Protocols

The document outlines key components of data communication, including the roles of sender, receiver, and message, as well as criteria for evaluating transmission media. It explains the services provided by the data link and transport layers, differentiates between TCP and UDP, and discusses the purpose of the World Wide Web and electronic mail. Additionally, it provides a detailed explanation of the TCP/IP protocol suite, its layers, and functions, along with a brief overview of the OSI model.

Uploaded by

Gujjula Devi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

PART-A

1(a). List out components of data communication?

A) The essential components of data communication are:


Message: Information (data) to be communicated (e.g.,
text, numbers, pictures, video) Sender: The device that
sends the data message (e.g., computer, video camera)
Receiver: The device that receives the message (e.g., a
computer, workstation, television).

1(b). What are the criteria used to evaluate


transmission medium?
A) In wired media, medium characteristics are more
important whereas, in wireless media, signal
characteristics are more important. Different transmission
media have different properties such as bandwidth,
delay, cost and ease of installation and
maintenance.

1(c). Outline the services provided by the Data link


layer?
A) Data link layer mainly deals with framing, error control
and flow control.

1(d).what is flow control and error control?


A) Flow control is meant only for the transmission of data
from sender to receiver. Error control is meant for the
transmission of error free data from sender to receiver.
 For Flow control there are two approaches: Feedback-
based Flow Control and Rate-based Flow Control.

1(e) .what is the need for Fragmentation?


A) Fragmentation is necessary because different networks
have different maximum transmission unit (MTU) sizes,
which determine the maximum size of data packets that
can be transmitted over the network.
1(f).Demonstrate the need for sub netting?
A) Organizations use a subnet to subdivide large
networks into smaller, more efficient sub networks.
One goal of a subnet is to split a large network into a
grouping of smaller, interconnected networks to help
minimize traffic. This way, traffic doesn't have to flow
through unnecessary routes, increasing network speeds.

1(g).Discover the services provided by Transport layer


protocol?
A) All transport layer protocols provide
multiplexing/Demultiplexing service. It also provides
other services such as reliable data transfer, bandwidth
guarantees, and delay guarantees. Each of the
applications in the application layer has the ability to send
a message by using TCP or UDP.

1(h).Differentiate between TCP and UDP?


A)
Factor TCP UDP
Connection Requires an established No connection is
type connection before needed to start and
transmitting data end a data transfer
Data Can sequence data Cannot sequence or
sequence (send in a specific order) arrange data
No data
Data
Can retransmit data if retransmitting. Lost
retransmiss
packets fail to arrive data can’t be
ion
retrieved
Delivery is not
Delivery Delivery is guaranteed
guaranteed
Fast, but at risk of
Slow, but complete data
Speed incomplete data
delivery
delivery
1(i).What is the purpose of WWW?
A) The purpose of the WWW is to enable the sharing and
accessing of information on the internet. It provides a
platform for individuals, organizations, and businesses to
publish, retrieve, and interact with a wide range of content,
including text, images, videos, and applications.

1(j).Explain about Electronic Mail?

A) Electronic mail, commonly shortened to “email,” is a


communication method that uses electronic devices
to deliver messages across computer networks.
"Email" refers to both the delivery system and individual
messages that are sent and received.

PART-B

2. Explain in detail about TCP/IP protocol suit with neat


diagram?
A)

 The TCP/IP model was developed prior to the OSI model.


 The TCP/IP model is not exactly similar to the OSI model.
 The TCP/IP model consists of four layers: the application
layer, transport layer, Internet layer, network Access
layer . 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.
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:
o ARP request: When a sender wants to know the
physical address of the device, it broadcasts the ARP
request to the network.
o 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 send
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:
o ICMP Test: ICMP Test is used to test whether the
destination is reachable or not.
o 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)


o It provides connectionless service and end-to-end
delivery of transmission.
o It is an unreliable protocol as it discovers the errors
but not specify the error.
o User Datagram Protocol discovers the error, and ICMP
protocol reports the error to the sender that user
datagram has been damaged.
o 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.
o 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)


o It provides a full transport layer services to
applications.
o It creates a virtual circuit between the sender and
receiver, and it is active for the duration of the
transmission.
o 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.
o 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.
o 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.

3. a)write short notes on


(i) Framing.
(ii) Multiplexing and Demultiplexing.

A) (i) Framing: Framing is a point-to-point connection


between two computers or devices consisting of a
wire in which data is transmitted as a stream of bits.
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. Ethernet, token
ring, frame relay, and other data link layer
technologies have their own frame structures.

The process of dividing the data into frames and


reassembling it is transparent to the user and is
handled by the data link layer. Framing is an
important aspect of data link layer protocol design
because it allows the transmission of data to be
organized and controlled, ensuring that the data is
delivered accurately and efficiently.

(ii) Multiplexing and Demultiplexing.

 Multiplexing: Multiplexing is the process of collecting


data from different application processes running on the
sender's end and then enveloping that gathered data with
the header and then transmitting the whole to the
receiver. The main purpose of multiplexing is to choose
one of the n input lines and transmit it to the output.
 Demultiplexing: Working of Demultiplexing is just the
reverse of the multiplexing process and Demultiplexing
delivers the segment received from the receiver to the
correct process of the application layer.

b) Interpret the major functions performed by the layers


of the ISO-OSI model?

A) The Open Systems Interconnection (OSI) model


describes seven layers that computer systems use to
communicate over a network. It was the first
standard model for network communications,
adopted by all major computer and
telecommunication companies in the early [Link]
modern Internet is not based on OSI, but on the
simpler TCP/IP model. However, the OSI 7-layer
model is still widely used, as it helps visualize and
communicate how networks operate, and helps
isolate and troubleshoot networking problems.

OSI was introduced in 1983 by representatives of the


major computer and telecom companies, and was adopted by
ISO as an international standard in 1984.

The OSI 7 Layers


1. Physical Layer

The physical layer is responsible for the physical cable or


wireless connection between network nodes. It defines the
connector, the electrical cable or wireless technology
connecting the devices, and is responsible for transmission of
the raw data, which is simply a series of 0s and 1s, while taking
care of bit rate control.

2. Data Link Layer

The data link layer establishes and terminates a connection


between two physically-connected nodes on a network. It
breaks up packets into frames and sends them from source to
destination. This layer is composed of two parts—Logical Link
Control (LLC), which identifies network protocols, performs
error checking and synchronizes frames, and Media Access
Control (MAC) which uses MAC addresses to connect devices
and define permissions to transmit and receive data.
3. Network Layer

The network layer has two main functions. One is breaking up


segments into network packets, and reassembling the packets
on the receiving end. The other is routing packets by
discovering the best path across a physical network. The
network layer uses network addresses (typically Internet
Protocol addresses) to route packets to a destination node.

4. Transport Layer

The transport layer takes data transferred in the session layer


and breaks it into “segments” on the transmitting end. It is
responsible for reassembling the segments on the receiving
end, turning it back into data that can be used by the session
layer. The transport layer carries out flow control, sending data
at a rate that matches the connection speed of the receiving
device, and error control, checking if data was received
incorrectly and if not, requesting it again.

5. Session Layer

The session layer creates communication channels, called


sessions, between devices. It is responsible for opening
sessions, ensuring they remain open and functional while data
is being transferred, and closing them when communication
ends. The session layer can also set checkpoints during a data
transfer—if the session is interrupted, devices can resume data
transfer from the last checkpoint.

6. Presentation Layer

The presentation layer prepares data for the application layer.


It defines how two devices should encode, encrypt, and
compress data so it is received correctly on the other end. The
presentation layer takes any data transmitted by the
application layer and prepares it for transmission over the
session layer.
7. Application Layer

The application layer is used by end-user software such as web


browsers and email clients. It provides protocols that allow
software to send and receive information and present
meaningful data to users. A few examples of application layer
protocols are the Hypertext Transfer Protocol (HTTP), File
Transfer Protocol (FTP), Post Office Protocol (POP), Simple Mail
Transfer Protocol (SMTP), and Domain Name System (DNS).

4.(a)Explain the IEEE 802.11 standard and its


significance in wireless networking ?

A) IEEE 802.11 is one such wireless standard, developed by


the Institute of Electrical and Electronics Engineers (IEEE). This
standard is often referred to simply as “802.11”, “network
standard” or “wifi protocol”.

The term “802.11” refers to a family of specifications


developed by the IEEE for wireless LAN technology. These
specifications define the physical layer (PHY) and media access
control (MAC) layer protocols used in wireless communication.

The different 802.11 standards

Here’s a brief overview of some of the key 802.11 standards:


802.11
The original 802.11 standard, released in 1997, laid the
foundation for wireless networking, delivering a maximum
bandwidth of 2 Mbps and operating in the 2.4 GHz frequency
band.
802.11a
This was the first major revision to the original standard,
providing a maximum speed of 54 Mbps on the 5 GHz band.
802.11b
Operates in the 2.4 GHz band and offers a maximum speed of
11 Mbps.
802.11g
Merges the best of 802.11a and b, offering speeds up to 54
Mbps in the 2.4 GHz band.

802.11n (Wi-Fi 4)
Introduced MIMO (Multiple Input Multiple Output) technology,
which significantly increased the speed and range. It operates
on both 2.4 GHz and 5 GHz bands.
802.11ac (Wifi 5)
Also known as “Gigabit Wi-Fi,” it offers improved speeds,
especially on the 5 GHz band.
802.11ax (Wi-Fi 6)
The latest standard that promises even better performance,
improved efficiency, and support for more devices.
To understand these variations better, one can refer to a wifi
standards chart that illustrates the differences in speed,
frequency, and range.
The future of 802.11 standards and wireless
communication
Understanding 802.11 IEEE wireless LAN standards are
crucial to comprehend the capabilities of our wireless networks.
As wifi technology continues to evolve, we can expect the
introduction of more standards that will further enhance our
wireless communication experience. These standards will
continue to govern how our devices connect to the internet,
thereby shaping the future of wireless communication.

4(b) what is the purpose of data link layer switching?


How does it differ from network layer routing?

A) Switching in data link layer is done by network devices


called bridges.
Bridges

A data link layer bridge connects multiple LANs (local area


networks) together to form a larger LAN. This process of
aggregating networks is called network bridging. A bridge
connects the different components so that they appear as parts
of a single network. The following diagram shows connection by
a bridge −

Switching by Bridges

When a data frame arrives at a particular port of a bridge,


the bridge examines the frame’s data link address, or more
specifically, the MAC address. If the destination address as well
as the required switching is valid, the bridge sends the frame to
the destined port. Otherwise, the frame is discarded.

The bridge is not responsible for end to end data transfer.


It is concerned with transmitting the data frame from one hop
to the next. Hence, they do not examine the payload field of
the frame. Due to this, they can help in switching any kind of
packets from the network layer above.

Bridges also connect virtual LANs (VLANs) to make a larger


VLAN.

If any segment of the bridged network is wireless, a wireless


bridge is used to perform the switching.

There are three main ways for bridging −


 simple bridging
 multi-port bridging
 learning or transparent bridging

Network layer Routing

 Routing is the process of path selection in any network. A


computer network is made of many machines, called
nodes, and paths or links that connect those nodes.
Communication between two nodes in an interconnected
network can take place through many different paths.
Routing is the process of selecting the best path using
some predetermined rules.

 Routing creates efficiency in network communication.


Network communication failures result in long wait times
for website pages to load for users. It can also cause
website servers to crash because they can't handle a large
number of users. Routing helps minimize network failure
by managing data traffic so that a network can use as
much of its capacity as possible without creating
congestion.

5.(a) What is Bluetooth, and how is it used for short-


range wireless communications?

A) Bluetooth technology allows devices to communicate with


each other without cables or wires. Bluetooth relies on short-
range radio frequency, and any device that incorporates the
technology can communicate as long as it is within the required
distance.
The technology is often used to allow two different types
of devices to communicate with each other. It is an electronics
"standard," which means that manufacturers that want to
include this feature have to incorporate specific requirements
into their electronic devices. These specifications ensure that
the devices can recognize and interact with other devices that
use Bluetooth technology.
Bluetooth is a standard protocol for short-range radio
communications between many different types of devices,
including mobile phones, computers, entertainment systems
and other electronics.

5(b) Explain the Bluetooth protocol stack and its


different layers?

A) Bluetooth Protocol Stack

 Radio (RF) Layer: It specifies the details of the air


interface, including frequency, the use of frequency
hopping and transmit power. It performs
modulation/demodulation of the data into RF signals. It
defines the physical characteristics of Bluetooth
transceivers. It defines two types of physical links:
connection-less and connection-oriented.

 Baseband Link Layer: The baseband is the digital


engine of a Bluetooth system and is equivalent to the MAC
sub layer in LANs.

 Link Manager Protocol Layer: It performs the


management of the already established links which
includes authentication and encryption processes. It is
responsible for creating the links, monitoring their health,
and terminating them gracefully upon command or
failure.

 Logical Link Control and Adaption (L2CAP) Protocol


Layer: It is also known as the heart of the Bluetooth
protocol stack. It allows the communication between
upper and lower layers of the Bluetooth protocol stack. It
packages the data packets received from upper layers into
the form expected by lower layers. It also performs
segmentation and multiplexing.
 Service Discovery Protocol (SDP) Layer: It is short for
Service Discovery Protocol. It allows discovering the
services available on another Bluetooth-enabled device.

 RF Comm Layer: It is a cabal replacement protocol. It is


short for Radio Frontend Component. It provides a serial
interface with WAP and OBEX. It also provides emulation
of serial ports over the logical link control and adaption
protocol(L2CAP). The protocol is based on the ETSI
standard TS 07.10.

 OBEX: It is short for Object Exchange. It is a


communication protocol to exchange objects between 2
devices.

 WAP: It is short for Wireless Access Protocol. It is used for


internet access.

 TCS: It is short for Telephony Control Protocol. It provides


telephony service. The basic function of this layer is call
control (setup & release) and group management for the
gateway serving multiple devices.

 Application Layer: It enables the user to interact with


the application.

6. Explain Static Routing Algorithms?

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

Types of Non–Adaptive Routing Algorithms

Flooding

When a packet needs to be sent to a destination computer, the


source computer will send the packet to all of its neighbours.
The neighbours will then send the packet to all of their
neighbours, and so on. This process is known as flooding.

Random walks

One of the most popular routing algorithms is the random walk


algorithm. As its name suggests, this algorithm works by
randomly selecting a path for data to travel. While this might
sound like a recipe for disaster, it actually works quite well in
practice.

The random walk algorithm is simple to implement and is very


robust. It is also quite efficient, able to find paths quickly, even
in large networks.

7(a).Describe in detail about reliable flooding?

A) Flooding is a non-adaptive routing technique following this


simple method: when a data packet arrives at a router, it is
sent to all the outgoing links except the one it has arrived on.

Advantages of Flooding

 It is very simple to setup and implement, since a router


may know only its neighbours.
 It is extremely robust. Even in case of malfunctioning of a
large number routers, the packets find a way to reach the
destination.
 All nodes which are directly or indirectly connected are
visited. So, there are no chances for any node to be left
out. This is a main criteria in case of broadcast messages.
 The shortest path is always chosen by flooding.

reliable flooding

In computer networks, flooding is an easy and


straightforward routing technique in which the source
or node sends packets over each of the outgoing links.
Flooding is a very simple routing algorithm that sends all the
packets arriving via each outgoing link.

7(b)Explain Link State packet in detail?

A) Link State Packet (LSP) is a packet of information


generated by a network router in a link state routing protocol
that lists the router's neighbors. Link state packets can be
further defined as special datagram’s that determine the
names of and the cost or distance to any neighbouring routers
and associated networks.
They are used to efficiently determine what the new
neighbour is, if a link failure occurs, and the cost of changing a
link if the need arises. LSPs are queued for transmission, and
must time out at about the same time. They must be
acknowledged, and can be distributed throughout the network,
but cannot use the routing database

Developing Link State Packets

When Information needed for exchange is collected, a


router then builds a packet containing all the data. The packet
starts with the identity of the sender, followed by a sequence
number and age, and a list of neighbours. For each neighbour,
the delay to that neighbour is given.
Building a link state packet is usually easy, the complex
part is determining when to build them. One way to reduce this
problem is to build them periodically, that is, at regular
intervals, or when some significant event occurs, such as a line
or neighbour going down or coming back up again, or changing
its properties appreciatively.

8(a) Can you explain why we need four or three


segments for connection termination in TCP?
A) TCP is one of the most common protocols that ensure
end-to-end delivery. It guarantees the security and integrity of
the data being transmitted. It always establishes a secure
connection between the sender and receiver. The transmitter is
the server, and the receiver is known as the client. We can
also say that the data transmission occurs between the server
and client. Hence, TCP is used in most of the high-level
protocols, such as FTP (File Transfer Protocol), HTTP (Hyper
Text Transfer Protocol), and SMTP (Simple Mai Transfer
Protocol).
TCP (Transmission Control Protocol) is a transmission
protocol that ensures data transmission in an ordered and
secure manner. It sends and receives the data packets in the
same order. TCP is a four-layer protocol compared to OSI
(Open System Interconnection Model), which is a seven-layer
transmission process. It is recommended to transmit data from
high-level protocols due to its integrity and security between
the server and client.

TCP Connection (A 3-way handshake)

Handshake refers to the process to establish connection


between the client and server. Handshake is simply defined as
the process to establish a communication link. To transmit a
packet, TCP needs a three way handshake before it starts
sending data. The reliable communication in TCP is termed as
PAR (Positive Acknowledgement Re-transmission).

When a sender sends the data to the receiver, it requires


a positive acknowledgement from the receiver confirming the
arrival of data. If the acknowledgement has not reached the
sender, it needs to resend that data. The positive
acknowledgement from the receiver establishes a successful
connection.

Here, the server is the server and client is the receiver.


The above diagram shows 3 steps for successful connection. A
3-way handshake is commonly known as SYN-SYN-ACK and
requires both the client and server response to exchange the
data. SYN means synchronize Sequence Number and ACK
means acknowledgment. Each step is a type of handshake
between the sender and the receiver.

The diagram of a successful TCP connection showing the three


handshakes is shown below:

The three handshakes are discussed in the below steps:

Step 1: SYN

SYN is a segment sent by the client to the server. It acts as a


connection request between the client and server. It informs
the server that the client wants to establish a connection.
Synchronizing sequence numbers also helps synchronize
sequence numbers sent between any two devices, where the
same SYN segment asks for the sequence number with the
connection request.

Step 2: SYN-ACK

It is an SYN-ACK segment or an SYN + ACK segment sent by the


server. The ACK segment informs the client that the server has
received the connection request and it is ready to build the
connection. The SYN segment informs the sequence number
with which the server is ready to start with the segments.

Step 3: ACK

ACK (Acknowledgment) is the last step before establishing a


successful TCP connection between the client and server. The
ACK segment is sent by the client as the response of the
received ACK and SN from the server. It results in the
establishment of a reliable data connection.

After these three steps, the client and server are ready for the
data communication process. TCP connection and termination
are full-duplex, which means that the data can travel in both
the directions simultaneously.

TCP Termination (A 4-way handshake)

Any device establishes a connection before proceeding with the


termination. TCP requires 3-way handshake to establish a
connection between the client and server before sending the
data. Similarly, to terminate or stop the data transmission, it
requires a 4-way handshake. The segments required for TCP
termination are similar to the segments to build a TCP
connection (ACK and SYN) except the FIN segment. The FIN
segment specifies a termination request sent by one device to
the other.
The client is the data transmitter and the server is a receiver in
a data transmission process between the sender and receiver.
Consider the below TCP termination diagram that shows the
exchange of segments between the client and server.

The diagram of a successful TCP termination showing the four


handshakes is shown below:

TCP termination process with the help of six steps that includes
the sent requests and the waiting states. The steps are as
follows:

Step 1: FIN

FIN refers to the termination request sent by the client to the


server. The first FIN termination request is sent by the client to
the server. It depicts the start of the termination process
between the client and server.

Step 2: FIN_ACK_WAIT

The client waits for the ACK of the FIN termination request from
the server. It is a waiting state for the client.
Step 3: ACK

The server sends the ACK (Acknowledgement) segment when it


receives the FIN termination request. It depicts that the server
is ready to close and terminate the connection.

Step 4: FIN _WAIT_2

The client waits for the FIN segment from the server. It is a type
of approved signal sent by the server that shows that the
server is ready to terminate the connection.

Step 5: FIN

The FIN segment is now sent by the server to the client. It is a


confirmation signal that the server sends to the client. It
depicts the successful approval for the termination.

Step 6: ACK

The client now sends the ACK (Acknowledgement) segment to


the server that it has received the FIN signal, which is a signal
from the server to terminate the connection. As soon as the
server receives the ACK segment, it terminates the connection.

8(b) Assess the justification for having variable field


lengths for the fields in the TCP header?

A) So, minimum length of TCP header = 5 x 4 bytes = 20


bytes. The size of the 6th row representing the Options field
vary. The size of Options field can go up to 40 bytes. So,
maximum length of TCP header = 20 bytes + 40 bytes = 60
bytes.
9) Explain the various fields of TCP header and the
working of the TCP protocol?

A) TCP stands for Transmission Control Protocol. It is a


transport layer protocol that facilitates the transmission of
packets from source to destination. It is a connection-oriented
protocol that means it establishes the connection prior to the
communication that occurs between the computing devices in a
network. This protocol is used with an IP protocol, so together,
they are referred to as a TCP/IP.

Working of TCP

In TCP, the connection is established by using three-way


handshaking. The client sends the segment with its sequence
number. The server, in return, sends its segment with its own
sequence number as well as the acknowledgement sequence,
which is one more than the client sequence number. When the
client receives the acknowledgment of its segment, then it
sends the acknowledgment to the server. In this way, the
connection is established between the client and the server.

Advantages of TCP

 It provides a connection-oriented reliable service, which


means that it guarantees the delivery of data packets. If
the data packet is lost across the network, then the TCP
will resend the lost packets.
 It provides a flow control mechanism using a sliding
window protocol.
 It provides error detection by using checksum and error
control by using Go Back or ARP protocol.

TCP Header Format


 Source port: It defines the port of the application, which
is sending the data. So, this field contains the source port
address, which is 16 bits.
 Destination port: It defines the port of the application on
the receiving side. So, this field contains the destination
port address, which is 16 bits.
 Sequence number: This field contains the sequence
number of data bytes in a particular session.
 Acknowledgment number: When the ACK flag is set,
then this contains the next sequence number of the data
byte and works as an acknowledgment for the previous
data received. For example, if the receiver receives the
segment number 'x', then it responds 'x+1' as an
acknowledgment number.
 HLEN: It specifies the length of the header indicated by
the 4-byte words in the header. The size of the header lies
between 20 and 60 bytes. Therefore, the value of this field
would lie between 5 and 15.
 Reserved: It is a 4-bit field reserved for future use, and
by default, all are set to zero.
 Flags
There are six control bits or flags:
1. URG: It represents an urgent pointer. If it is set, then
the data is processed urgently.
2. ACK: If the ACK is set to 0, then it means that the
data packet does not contain an acknowledgment.
3. PSH: If this field is set, then it requests the receiving
device to push the data to the receiving application
without buffering it.
4. RST: If it is set, then it requests to restart a
connection.
5. SYN: It is used to establish a connection between the
hosts.
6. FIN: It is used to release a connection, and no further
data exchange will happen.

 Window size
It is a 16-bit field. It contains the size of data that the
receiver can accept. This field is used for the flow control
between the sender and receiver and also determines the
amount of buffer allocated by the receiver for a segment.
The value of this field is determined by the receiver.
 Checksum
It is a 16-bit field. This field is optional in UDP, but in the
case of TCP/IP, this field is mandatory.
 Urgent pointer
It is a pointer that points to the urgent data byte if the
URG flag is set to 1. It defines a value that will be added to
the sequence number to get the sequence number of the
last urgent byte.
 Options
It provides additional options. The optional field is
represented in 32-bits. If this field contains the data less
than 32-bit, then padding is required to obtain the
remaining bits.
10) A student attaches a laptop to campus network and
request/receives a web page from [Link]
compose your view on the of sequence of operations
carried out with the help of different protocols used in
application,transport,network and link layers ?

A) When a student connects a laptop to the campus network,


several protocols are used to establish the internet connection
and display the requested web page to the student. The major
the protocols involved in this process is given below:

1. Link-Layer Protocols:

Ethernet is the most common link-layer protocol used in


local area networks. Using ethernet, devices within the campus
network can be connected with the physical and data link
layers. The student uses an Ethernet to connect his computer
with the campus network.

2. Network Layer Protocol:

Internet Protocol is responsible for identifying the IP address


and routing packets via the network. The student's computer
assigns a unique IP address to itself using IP and can exchange
information with other devices on the same network.

3. Transport Layer Protocol:

Transmission Control Protocol is a reliable transport layer


protocol that establishes a connection between the student's
computer and the web server that hosts the requested
webpage.

4. Application Layer Protocols:

Hypertext Transfer Protocol is used at application layer that


helps in retrieving web pages from web servers. When the
student enters "[Link]" in their web browser, it
initiates an HTTP request to the Google web server.

Translates domain name "[Link]" into its associated


IP addresses using Domain Naming System.

Once the IP address of the web server is achieved, the


computer can establish a connection with the web server using
the IP address and a specific port using TCP. Student’s
computer can now send HTTP requests and receive HTTP
responses.

To ensure secure communication between computer and


server, SSL/TSL should be enforced that encrypts the data
shared between the student's computer and the web server.

Once the TCP connection is done, the student's computer sends


an HTTP request to the web server, specifying the webpage it
wants to retrieve. The web server processes the request and
sends an HTTP response back to the computer. The response
includes the requested web page content or an error code to
indicate the failure of the request.

11. Interpret and assess how SMTP protocol is used in E-


mail?

A) SMTP is an application layer protocol. The client who wants


to send the mail opens a TCP connection to the SMTP server
and then sends the mail across the connection. The SMTP
server is an always-on listening mode. As soon as it listens for a
TCP connection from any client, the SMTP process initiates a
connection through port 25. After successfully establishing a
TCP connection the client process sends the mail instantly.

SMTP Protocol

The SMTP model is of two types:


 End-to-End Method

 Store-and-Forward Method

The end-to-end model is used to communicate between


different organizations whereas the store and forward method
is used within an organization. An SMTP client who wants to
send the mail will contact the destination’s host SMTP directly,
to send the mail to the destination. The SMTP server will keep
the mail to itself until it is successfully copied to the receiver’s
SMTP.
The client SMTP is the one that initiates the session so let us
call it the client-SMTP and the server SMTP is the one that
responds to the session request so let us call it receiver-SMTP.
The client-SMTP will start the session and the receiver SMTP will
respond to the request.

Working of SMTP

 Communication between the sender and the


receiver: The sender’s user agent prepares the message
and sends it to the MTA. The MTA’s responsibility is to
transfer the mail across the network to the receiver’s MTA.
To send mail, a system must have a client MTA, and to
receive mail, a system must have a server MTA.

 Sending Emails: Mail is sent by a series of request and


response messages between the client and the server.
The message which is sent across consists of a header and
a body. A null line is used to terminate the mail header
and everything after the null line is considered the body of
the message, which is a sequence of ASCII characters. The
message body contains the actual information read by the
receipt.

 Receiving Emails: The user agent on the server-side


checks the mailboxes at a particular time of intervals. If
any information is received, it informs the user about the
mail. When the user tries to read the mail it displays a list
of emails with a short description of each mail in the
mailbox. By selecting any of the mail users can view its
contents on the terminal.

Advantages of SMTP

 If necessary, the users can have a dedicated server.


 It allows for bulk mailing.
 Low cost and wide coverage area.
 Offer choices for email tracking.
 Reliable and prompt email delivery.

You might also like