0% found this document useful (0 votes)
2 views41 pages

Unit III Lecture Notes

The document provides an overview of transport layer protocols, focusing on their functions and services such as process-to-process communication, error control, and flow control. It discusses the differences between UDP and TCP, highlighting UDP's connectionless and unreliable nature versus TCP's reliable, connection-oriented service. Additionally, it explains the role of port numbers in facilitating communication between processes and outlines the encapsulation and decapsulation processes for both protocols.

Uploaded by

jerlin
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)
2 views41 pages

Unit III Lecture Notes

The document provides an overview of transport layer protocols, focusing on their functions and services such as process-to-process communication, error control, and flow control. It discusses the differences between UDP and TCP, highlighting UDP's connectionless and unreliable nature versus TCP's reliable, connection-oriented service. Additionally, it explains the role of port numbers in facilitating communication between processes and outlines the encapsulation and decapsulation processes for both protocols.

Uploaded by

jerlin
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

EC3401 – NETWORKS AND SECURITY

UNIT III – LECTURE NOTES

Lecture Topic CO PO
No.

19 Transport Layer Protocols C211.3 1,2

TRANSPORT LAYER FUNCTIONS / SERVICES


▪ The transport layer is located between the network layer and the application layer.
▪ The transport layer is responsible for providing services to the application layer; it receives
services from the network layer.
▪ The services that can be provided by the transport layer are
1. Process-to-Process Communication
2. Addressing : Port Numbers
3. Encapsulation and Decapsulation
4. Multiplexing and Demultiplexing
5. Flow Control
6. Error Control
7. Congestion Control

Process-to-Process Communication
▪ The Transport Layer is responsible for delivering data to the appropriate application process
on the host computers.
▪ This involves multiplexing of data from different application processes, i.e. forming data
packets, and adding source and destination port numbers in the header of each Transport
Layer data packet.
▪ Together with the source and destination IP address, the port numbers constitutes a network
socket, i.e. an identification address of the process-to-process communication.

Addressing: Port Numbers


▪ Ports are the essential ways to address multiple entities in the same location.
▪ Using port addressing it is possible to use more than one network-based application at the
same time.
▪ Three types of Port numbers are used :
✔ Well-known ports - These are permanent port numbers. They range between 0 to
[Link] port numbers are used by Server Process.
✔ Registered ports - The ports ranging from 1024 to 49,151 are not assigned or
controlled.
✔ Ephemeral ports (Dynamic Ports) – These are temporary port numbers. They range
between 49152–[Link] port numbers are used by Client Process.
Encapsulation and Decapsulation
▪ To send a message from one process to another, the transport-layer protocol encapsulates
and decapsulates messages.
▪ Encapsulation happens at the sender site. The transport layer receives the data and adds the
transport-layer header.
▪ Decapsulation happens at the receiver site. When the message arrives at the destination
transport layer, the header is dropped and the transport layer delivers the message to the
process running at the application layer.

Multiplexing and Demultiplexing


▪ Whenever an entity accepts items from more than one source, this is referred to
as multiplexing (many to one).
▪ Whenever an entity delivers items to more than one source, this is referred to
as demultiplexing (one to many).
▪ The transport layer at the source performs multiplexing
▪ The transport layer at the destination performs demultiplexing

Flow Control
▪ Flow Control is the process of managing the rate of data transmission between two nodes to
prevent a fast sender from overwhelming a slow receiver.
▪ It provides a mechanism for the receiver to control the transmission speed, so that the
receiving node is not overwhelmed with data from transmitting node.

Error Control
▪ Error control at the transport layer is responsible for
1. Detecting and discarding corrupted packets.
2. Keeping track of lost and discarded packets and resending them.
3. Recognizing duplicate packets and discarding them.
4. Buffering out-of-order packets until the missing packets arrive. ▪
Error Control involves Error Detection and Error Correction
Congestion Control
▪ Congestion in a network may occur if the load on the network (the number of packets sent
to the network) is greater than the capacity of the network (the number of packets a network
can handle).
▪ Congestion control refers to the mechanisms and techniques that control the congestion and
keep the load below the capacity.
▪ Congestion Control refers to techniques and mechanisms that can either prevent congestion,
before it happens, or remove congestion, after it has happened
▪ Congestion control mechanisms are divided into two categories,
1. Open loop - prevent the congestion before it happens.
2. Closed loop - remove the congestion after it happens.

2. PORT NUMBERS
• A transport-layer protocol usually has several responsibilities.
• One is to create a process-to-process communication.
• Processes are programs that run on hosts. It could be either server or client.
• A process on the local host, called a client, needs services from a process usually on the
remote host, called a server.
• Processes are assigned a unique 16-bit port number on that host.  Port numbers provide
end-to-end addresses at the transport layer  They also provide multiplexing and
demultiplexing at this layer.  The port numbers are integers between 0 and 65,535 .

ICANN (Internet Corporation for Assigned Names and Numbers) has divided the port numbers
into three ranges:
✔ Well-known ports ✔ Registered ✔ Ephemeral ports (Dynamic
Ports)

WELL-KNOWN PORTS
• These are permanent port numbers used by the servers.
• They range between 0 to 1023.
• This port number cannot be chosen randomly.
• These port numbers are universal port numbers for servers.
• Every client process knows the well-known port number of the corresponding server
process.
• For example, while the daytime client process, a well-known client program, can use an
ephemeral (temporary) port number, 52,000, to identify itself, the daytime server process
must use the well-known (permanent) port number 13.

EPHEMERAL PORTS (DYNAMIC PORTS)


• The client program defines itself with a port number, called the ephemeral port number.
• The word ephemeral means “short-lived” and is used because the life of a client is normally
short.
• An ephemeral port number is recommended to be greater than 1023.
• These port number ranges from 49,152 to 65,535 .
• They are neither controlled nor registered. They can be used as temporary or private port
numbers.

REGISTERED PORTS
• The ports ranging from 1024 to 49,151 are not assigned or controlled.

[Link] QUESTION PARTA/B/C YEAR PO BT


- - - - - -
Lecture Topic CO PO
No.

20 UDP and TCP Connection and State C211. 1,2,3


Transition Diagram 3

UDP and TCP Connection and State Transition Diagram

 Each protocol provides a different type of service and should be used appropriately.
UDP - UDP is an unreliable connectionless transport-layer protocol used for its simplicity and
efficiency in applications where error control can be provided by the application-layer process.

TCP - TCP is a reliable connection-oriented protocol that can be used in any application where
reliability is important.

SCTP - SCTP is a new transport-layer protocol designed to combine some features of UDP and
TCP in an effort to create a better protocol for multimedia communication.

USER DATAGRAM PROTOCOL (UDP)

• User Datagram Protocol (UDP) is a connectionless, unreliable transport protocol.


• UDP adds process-to-process communication to best-effort service provided by IP.
• UDP is a very simple protocol using a minimum of overhead.
• UDP is a simple demultiplexer, which allows multiple processes on each host to
communicate.
• UDP does not provide flow control , reliable or ordered delivery.
• UDP can be used to send small message where reliability is not expected.
• Sending a small message using UDP takes much less interaction between the sender and
receiver.
• UDP allow processes to indirectly identify each other using an abstract locator called port or
mailbox

UDP PORTS
• Processes (server/client) are identified by an abstract locator known as port.
• Server accepts message at well known port.
• Some well-known UDP ports are 7–Echo, 53–DNS, 111–RPC, 161–SNMP, etc.
• < port, host > pair is used as key for demultiplexing.
• Ports are implemented as a message queue.
• When a message arrives, UDP appends it to end of the queue.
• When queue is full, the message is discarded.
• When a message is read, it is removed from the queue.
• When an application process wants to receive a message, one is removed from the front of
the queue.
• If the queue is empty, the process blocks until a message becomes available.

UDP DATAGRAM (PACKET) FORMAT


• UDP packets are known as user datagrams .
• These user datagrams, have a fixed-size header of 8 bytes made of four fields, each of 2
bytes (16 bits).

Source Port Number


⮚ Port number used by process on source host with 16 bits long.
⮚ If the source host is client (sending request) then the port number is an temporary one
requested by the process and chosen by UDP.
⮚ If the source is server (sending response) then it is well known port number.
Destination Port Number
⮚ Port number used by process on Destination host with 16 bits long.
⮚ If the destination host is the server (a client sending request) then the port number is
a well known port number.
⮚ If the destination host is client (a server sending response) then port number is an
temporary one copied by server from the request packet.
Length
⮚ This field denotes the total length of the UDP Packet (Header plus data) ⮚ The total
length of any UDP datagram can be from 0 to 65,535 bytes.

Checksum
⮚ UDP computes its checksum over the UDP header, the contents of the message body,
and something called the pseudoheader.
⮚ The pseudoheader consists of three fields from the IP header—protocol number, source
IP address, destination IP address plus the UDP length field.
Data
⮚ Data field defines tha actual payload to be transmitted.
⮚ Its size is variable.

UDP SERVICES
Process-to-Process Communication
 UDP provides process-to-process communication using socket addresses, a combination of
IP addresses and port numbers.

Connectionless Services
• UDP provides a connectionless service.
• There is no connection establishment and no connection termination .
• Each user datagram sent by UDP is an independent datagram.
• There is no relationship between the different user datagrams even if they are  coming
from the same source process and going to the same destination program.
• The user datagrams are not numbered.
• Each user datagram can travel on a different path.

Flow Control
• UDP is a very simple protocol.
• There is no flow control, and hence no window mechanism.
• The receiver may overflow with incoming messages.
• The lack of flow control means that the process using UDP should provide for this service,
if needed.
Error Control
• There is no error control mechanism in UDP except for the checksum.
• This means that the sender does not know if a message has been lost or duplicated.
• When the receiver detects an error through the checksum, the user datagram is silently
discarded.
• The lack of error control means that the process using UDP should provide for this service,
if needed.

Checksum
• UDP checksum calculation includes three sections: a pseudoheader, the UDP header, and
the data coming from the application layer.
• The pseudoheader is the part of the header in which the user datagram is to be encapsulated
with some fields filled with 0s.

Optional Inclusion of Checksum


⮚ The sender of a UDP packet can choose not to calculate the checksum. ⮚ In
this case, the checksum field is filled with all 0s before being sent.
⮚ In the situation where the sender decides to calculate the checksum, but it
happens that the result is all 0s, the checksum is changed to all 1s before the
packet is sent.
⮚ In other words, the sender complements the sum two times.

Congestion Control
• Since UDP is a connectionless protocol, it does not provide congestion control.
• UDP assumes that the packets sent are small and sporadic(occasionally or at irregular
intervals) and cannot create congestion in the network.
• This assumption may or may not be true, when UDP is used for interactive real-time transfer
of audio and video.

Encapsulation and Decapsulation


 To send a message from one process to another, the UDP protocol encapsulates and
decapsulates messages.

Queuing
• In UDP, queues are associated with ports.
• At the client site, when a process starts, it requests a port number from the operating system.
• Some implementations create both an incoming and an outgoing queue associated with each
process.
• Other implementations create only an incoming queue associated with each process.

Multiplexing and Demultiplexing


• In a host running a transport protocol suite, there is only one UDP but possibly several
processes that may want to use the services of UDP.
• To handle this situation, UDP multiplexes and demultiplexes.
APPLICATIONS OF UDP
• UDP is used for management processes such as SNMP.
• UDP is used for route updating protocols such as RIP.
• UDP is a suitable transport protocol for multicasting. Multicasting capability is embedded in
the UDP software
• UDP is suitable for a process with internal flow and error control mechanisms such as
Trivial File Transfer Protocol (TFTP).
• UDP is suitable for a process that requires simple request-response communication with
little concern for flow and error control.
• UDP is normally used for interactive real-time applications that cannot tolerate uneven
delay between sections of a received message.

TRANSMISSION CONTROL PROTOCOL (TCP)

⮚ TCP is a reliable, connection-oriented, byte-stream protocol.


⮚ TCP guarantees the reliable, in-order delivery of a stream of bytes. It is a full-duplex
protocol, meaning that each TCP connection supports a pair of byte streams, one flowing in
each direction.
⮚ TCP includes a flow-control mechanism for each of these byte streams that allow the
receiver to limit how much data the sender can transmit at a given time.
⮚ TCP supports a demultiplexing mechanism that allows multiple application programs on
any given host to simultaneously carry on a conversation with their peers.
⮚ TCP also implements congestion-control mechanism. The idea of this mechanism is to
prevent sender from overloading the network.
⮚ Flow control is an end to end issue, whereas congestion control is concerned with how host
and network interact.

TCP SERVICES
Process-to-Process Communication
 TCP provides process-to-process communication using port numbers.
Stream Delivery Service
• TCP is a stream-oriented protocol.
• TCP allows the sending process to deliver data as a stream of bytes and allows the receiving
process to obtain data as a stream of bytes.
• TCP creates an environment in which the two processes seem to be connected by an
imaginary “tube” that carries their bytes across the Internet.
• The sending process produces (writes to) the stream and the receiving process consumes
(reads from) it.
Full-Duplex Communication
• TCP offers full-duplex service, where data can flow in both directions at the same time.
• Each TCP endpoint then has its own sending and receiving buffer, and segments move in
both directions.

Multiplexing and Demultiplexing


TCP performs multiplexing at the sender and demultiplexing at the receiver.

Connection-Oriented Service
• TCP is a connection-oriented protocol.
• A connection needs to be established for each pair of processes.
• When a process at site A wants to send to and receive data from another process at site B,
the following three phases occur:
1. The two TCP’s establish a logical connection between them.
2. Data are exchanged in both directions.
3. The connection is terminated.

Reliable Service
• TCP is a reliable transport protocol.
• It uses an acknowledgment mechanism to check the safe and sound arrival of data.

TCP SEGMENT
• A packet in TCP is called a segment.
• Data unit exchanged between TCP peers are called segments.
• A TCP segment encapsulates the data received from the application layer.
• The TCP segment is encapsulated in an IP datagram, which in turn is encapsulated in a
frame at the data-link layer.
• TCP is a byte-oriented protocol, which means that the sender writes bytes into a TCP
connection and the receiver reads bytes out of the TCP connection.
• TCP does not, itself, transmit individual bytes over the Internet.
• TCP on the source host buffers enough bytes from the sending process to fill a reasonably
sized packet and then sends this packet to its peer on the destination host.
• TCP on the destination host then empties the contents of the packet into a receive buffer,
and the receiving process reads from this buffer at its leisure.
• TCP connection supports byte streams flowing in both directions.
• The packets exchanged between TCP peers are called segments, since each one carries a
segment of the byte stream.

[Link] QUESTION PARTA/B/C YEAR PO BT

1. What are the advantages of UDP Part A April/May 1,2,3 1


over TCP? 2023
2. Compare the TCP header and UDP Part A April/May 1,2,4 4
header. List the fields in the TCP 2024
header that are missing from UDP
header. Give the reason for their
absence
3. Differentiate between Part A Nov/Dec 1,2,3 4
Connectionless and Connection 2023
Oriented services?
4 Discuss in detail about User Part B Nov/Dec 1,2,10 3
Datagram Protocol (UDP) with neat 2023
diagrams
Lecture Topic CO PO
No.

21 Congestion Control C211.3 1,2,3

Congestion Control

• Congestion occurs if load (number of packets sent) is greater than capacity of the network
(number of packets a network can handle).
• When load is less than network capacity, throughput increases proportionally.
• When load exceeds capacity, queues become full and the routers discard some packets and
throughput declines sharply.
• When too many packets are contending for the same link o The queue overflows o Packets
get dropped o Network is congested
• Network should provide a congestion control mechanism to deal with such a situation.
• TCP maintains a variable called CongestionWindow for each connection.
• TCP Congestion Control mechanisms are:
1. Additive Increase / Multiplicative Decrease (AIMD)
2. Slow Start
3. Fast Retransmit and Fast Recovery

Additive Increase / Multiplicative Decrease (AIMD)


• TCP source initializes CongestionWindow based on congestion level in the network.
• Source increases CongestionWindow when level of congestion goes down and decreases
the same when level of congestion goes up.
• TCP interprets timeouts as a sign of congestion and reduces the rate of transmission.
• On timeout, source reduces its CongestionWindow by half, i.e., multiplicative decrease. For
example, if CongestionWindow = 16 packets, after timeout it is 8.
• Value of CongestionWindow is never less than maximum segment size (MSS).
• When ACK arrives CongestionWindow is incremented marginally, i.e., additive increase.
Increment = MSS × (MSS/CongestionWindow)
CongestionWindow += Increment

• For example, when ACK arrives for 1 packet, 2 packets are sent. When ACK for both
packets arrive, 3 packets are sent and so on.
• CongestionWindow increases and decreases throughout lifetime of the connection.
When CongestionWindow is plotted as a function of time, a saw-tooth pattern results.

Slow Start
• Slow start is used to increase CongestionWindow exponentially from a cold start.
• Source TCP initializes CongestionWindow to one packet.
• TCP doubles the number of packets sent every RTT on successful transmission.
• When ACK arrives for first packet TCP adds 1 packet to CongestionWindow and sends two
packets.
• When two ACKs arrive, TCP increments CongestionWindow by 2 packets and sends four
packets and so on.

• Instead of sending entire permissible packets at once (bursty traffic), packets are sent in a
phased manner, i.e., slow start.
• Initially TCP has no idea about congestion, henceforth it
increases
CongestionWindow rapidly until there is a timeout. On timeout:
CongestionThreshold = CongestionWindow/ 2
CongestionWindow = 1

• Slow start is repeated until CongestionWindow reaches CongestionThreshold and thereafter


1 packet per RTT.

14
The congestion window trace will look like

Fast Retransmit And Fast Recovery


• TCP timeouts led to long periods of time during which the connection went dead while
waiting for a timer to expire.
• Fast retransmit is a heuristic approach that triggers retransmission of a dropped packet
sooner than the regular timeout mechanism. It does not replace regular timeouts.
• When a packet arrives out of order, receiving TCP resends the same acknowledgment
(duplicate ACK) it sent last time.
• When three duplicate ACK arrives at the sender, it infers that corresponding packet may be
lost due to congestion and retransmits that packet. This is called fast retransmit before
regular timeout.
• When packet loss is detected using fast retransmit, the slow start phase is replaced by
additive increase, multiplicative decrease method. This is known as fast recovery.
• Instead of setting CongestionWindow to one packet, this method uses the ACKs that are still
in pipe to clock the sending of packets.
• Slow start is only used at the beginning of a connection and after regular timeout. At other
times, it follows a pure AIMD pattern.

15
For example, packets 1 and 2 are received whereas packet 3 gets lost. o Receiver sends a
duplicate ACK for packet 2 when packet 4 arrives. o Sender receives 3 duplicate
ACKs after sending packet 6 retransmits packet 3. o When packet 3 is received,
receiver sends cumulative ACK up to packet 6.

• The congestion window trace will look like

[Link] QUESTION PARTA/B/C YEAR PO BT

1. Illustrate the basic concepts of Part B April/ 1,2,3 2


Congestion control and avoidance May 2023

2. Illustrate in detail about congestion Part B April/ 1,2,3 2


control and its avoidance techniques May 2024

16
3. Explain in detail about Congestion Part B Nov/Dec 1,2,3 2
Control and Congestion Avoidance 2023
techniques

Lecture Topic CO PO
No.

22 Congestion Avoidance C211.3 1,2,3

Congestion Avoidance

• Congestion avoidance mechanisms prevent congestion before it actually occurs.


• These mechanisms predict when congestion is about to happen and then to reduce the rate at
which hosts send data just before packets start being discarded.

• TCP creates loss of packets in order to determine bandwidth of the connection.


• Routers help the end nodes by intimating when congestion is likely to occur.
• Congestion-avoidance mechanisms are: o DEC bit - Destination Experiencing Congestion
Bit o RED - Random Early Detection

Dec Bit - Destination Experiencing Congestion Bit


⮚ The first mechanism developed for use on the Digital Network Architecture (DNA).

⮚ The idea is to evenly split the responsibility for congestion control between the routers and
the end nodes.

⮚ Each router monitors the load it is experiencing and explicitly notifies the end nodes when
congestion is about to occur.

⮚ This notification is implemented by setting a binary congestion bit in the packets that flow
through the router; hence the name DECbit.

17
⮚ The destination host then copies this congestion bit into the ACK it sends back to the source.

⮚ The Source checks how many ACK has DEC bit set for previous window packets.

⮚ If less than 50% of ACK have DEC bit set, then source increases its congestion window by 1 packet

⮚ Otherwise, decreases the congestion window by 87.5%.

⮚ Finally, the source adjusts its sending rate so as to avoid congestion.

⮚ Increase by 1, decrease by 0.875 rule was based on AIMD for stabilization.

⮚ A single congestion bit is added to the packet header.

⮚ Using a queue length of 1 as the trigger for setting the congestion bit.

⮚ A router sets this bit in a packet if its average queue length is greater than or equal to 1 at the time the
packet arrives.

Computing average queue length at a router using DEC bit

⮚ Average queue length is measured over a time interval that includes the
last busy + last idle cycle + current busy cycle.
⮚ It calculates the average queue length by dividing the curve area with time interval.

Red - Random Early Detection


⮚ The second mechanism of congestion avoidance is called as Random Early Detection (RED).
⮚ Each router is programmed to monitor its own queue length, and when it detects that there is congestion,
it notifies the source to adjust its congestion window.

⮚ RED differs from the DEC bit scheme by two ways:


a. In DECbit, explicit notification about congestion is sent to source, whereas RED implicitly
notifies the source by dropping a few packets.
b. DECbit may lead to tail drop policy, whereas RED drops packet based on drop probability in a
random manner. Drop each arriving packet with some drop probability whenever the queue
length exceeds some drop level. This idea is called early random drop.

Computation of average queue length using RED

⮚ AvgLen = (1 − Weight) × AvgLen + Weight × SampleLen


where 0 < Weight < 1 and
SampleLen – is the length of the queue when a
sample measurement is made.

⮚ The queue length is measured every time a new packet arrives at the gateway.

⮚ RED has two queue length thresholds that trigger certain activity: MinThreshold and MaxThreshold

⮚ When a packet arrives at a gateway it compares Avglen with these two values according to the
following rules.

S.N QUESTION PARTA/B/C YEAR PO BT


o
1 Illustrate the basic concepts of Part B April/May 1,2,3 2
Congestion control and avoidance 2023
2 Illustrate the basic concepts of Part B April/May 1,2,3 2
Congestion control and avoidance 2023
3 Explain in detail about Congestion Part B Nov/Dec 1,2,3 2
Control and Congestion Avoidance 2023
techniques
Lectur Topic CO PO
e No.

23 QoS C211.3 1,2

QoS
Quality of Service (QoS) is an important concept, particularly when working with multimedia applications.
Multimedia applications, such as video conferencing, streaming services, and VoIP (Voice over IP), require
certain bandwidth, latency, jitter, and packet loss parameters. QoS methods help ensure that these
requirements are satisfied, allowing for seamless and reliable communication.

What is Quality of Service?

Quality-of-service (QoS) refers to traffic control mechanisms that seek to differentiate performance based on
application or network-operator requirements or provide predictable or guaranteed performance to
applications, sessions, or traffic aggregates. The basic phenomenon for QoS is in terms of packet delay and
losses of various kinds.
QoS Specification
 Delay
 Delay Variation(Jitter)
 Throughput
 Error Rate
Types of Quality of Service
 Stateless Solutions – Routers maintain no fine-grained state about traffic, one positive factor of it is that
it is scalable and robust. But it has weak services as there is no guarantee about the kind of delay or
performance in a particular application which we have to encounter.
 Stateful Solutions – Routers maintain a per-flow state as flow is very important in providing the Quality-
of-Service i.e. providing powerful services such as guaranteed services and high resource utilization,
providing protection, and is much less scalable and robust.
QoS Parameters
 Packet loss: This occurs when network connections get congested, and routers and switches begin losing
packets.
 Jitter: This is the result of network congestion, time drift, and routing changes. Too much jitter can
reduce the quality of voice and video communication.
 Latency: This is how long it takes a packet to travel from its source to its destination. The latency should
be as near to zero as possible.
 Bandwidth: This is a network communications link’s ability to transmit the majority of data from one
place to another in a specific amount of time.
 Mean opinion score: This is a metric for rating voice quality that uses a five-point scale, with five
representing the highest quality.
How does QoS Work?
Quality of Service (QoS) ensures the performance of critical applications within limited network capacity.
 Packet Marking: QoS marks packets to identify their service types. For example, it distinguishes
between voice, video, and data traffic.
 Virtual Queues: Routers create separate virtual queues for each application based on priority. Critical
apps get reserved bandwidth.
 Handling Allocation: QoS assigns the order in which packets are processed, ensuring
appropriate bandwidth for each application
Benefits of QoS
 Improved Performance for Critical Applications
 Enhanced User Experience
 Efficient Bandwidth Utilization
 Increased Network Reliability
 Compliance with Service Level Agreements (SLAs)
 Reduced Network Costs
 Improved Security
 Better Scalability
Why is QoS Important?
 Video and audio conferencing require a bounded delay and loss rate.
 Video and audio streaming requires a bounded packet loss rate, it may not be so sensitive to delay.
 Time-critical applications (real-time control) in which bounded delay is considered to be an important
factor.
 Valuable applications should provide better services than less valuable applications.
Implementing QoS
 Planning: The organization should develop an awareness of each department’s service needs and
requirements, select an appropriate model, and build stakeholder support.
 Design: The organization should then keep track of all key software and hardware changes and modify
the chosen QoS model to the characteristics of its network infrastructure.
 Testing: The organization should test QoS settings and policies in a secure, controlled testing
environment where faults can be identified.
 Deployment: Policies should be implemented in phases. An organization can choose to deploy rules by
network segment or by QoS function (what each policy performs).
 Monitoring and analyzing: Policies should be modified to increase performance based on performance
data.
Models to Implement QoS
1. Integrated Services(IntServ)
 An architecture for providing QoS guarantees in IP networks for individual application sessions.
 Relies on resource reservation, and routers need to maintain state information of allocated resources and
respond to new call setup requests.
 Network decides whether to admit or deny a new call setup request.
2. IntServ QoS Components
 Resource reservation: call setup signaling, traffic, QoS declaration, per-element admission control.
 QoS-sensitive scheduling e.g WFQ queue discipline.
 QoS-sensitive routing algorithm(QSPF)
 QoS-sensitive packet discard strategy.
3. RSVP-Internet Signaling
It creates and maintains distributed reservation state, initiated by the receiver and scales for multicast, which
needs to be refreshed otherwise reservation times out as it is in soft state. Latest paths were discovered
through “PATH” messages (forward direction) and used by RESV messages (reserve direction).
4. Call Admission
 Session must first declare it’s QoS requirement and characterize the traffic it will send through the
network.
 R-specification: defines the QoS being requested, i.e. what kind of bound we want on the delay, what
kind of packet loss is acceptable, etc.
 T-specification: defines the traffic characteristics like bustiness in the traffic.
 A signaling protocol is needed to carry the R-spec and T-spec to the routers where reservation is required.
 Routers will admit calls based on their R-spec, T-spec and based on the current resource allocated at the
routers to other calls.
5. Diff-Serv
Differentiated Service is a stateful solution in which each flow doesn’t mean a different state. It provides
reduced state services i.e. maintaining state only for larger granular flows rather than end-to-end flows tries to
achieve the best of both worlds. Intended to address the following difficulties with IntServ and RSVP:
 Flexible Service Models: IntServ has only two classes, want to provide more qualitative service classes:
want to provide ‘relative’ service distinction.
 Simpler signaling: Many applications and users may only want to specify a more qualitative notion of
service.
QoS Tools
 Traffic Classification and Marking
 Traffic Shaping and Policing
 Queue Management and Scheduling
 Resource Reservation
 Congestion Management

[Link] QUESTION PARTA/B/C YEAR PO BT

1. What are the techniques to improve Part A April/May 1 2


QoS? 2023

Lectur Topic CO PO
e No.

24 Application Layer Paradigms C211.3 1,2

APPLICATION LAYER PARADIGMS

The layer where all the applications are found is called Application [Link] traditional paradigm
is called the client-server paradigm. In this paradigm, the service provider is an application
program, called the server process; it runs continuously, waiting for another application program,
called the client process, to make a connection through the Internet and ask for service.
Normally few server processes are available that can provide a specific type of service, but there
are many clients that request service from any of these server [Link] server process must be
running all the time; the client process is started when the client needs to receive service.
For example, a telephone directory center in any area can be a server; a subscriber that calls and
asks for a specific telephone number can be thought of as a client.
The directory center must be ready and available all the time; the subscriber can call the center for
a short period when the service is needed. Figure5.1.1 shows an example of a client-server
communication in which three clients communicate with one server to receive the services provided
by this server.

Peer-to-Peer paradigm
In this paradigm, there is no need for a server process to be running all the time and waiting for
the client processes to [Link] responsibility is shared between peers. A computer connected

to the Internet can provide service at one time and receive service at another time. A computer can
even provide and receive services at the same [Link] 5.1.2 shows an example of
communication in this paradigm.

Fig5.1.2: Peer to peer paradigm.


Communication by phone is a peer-to-peer activity; no party needs to wait for the other party to
[Link] peer-to-peer paradigm can be used in a situation, when some computers connected to the
Internet have something to share with each [Link] example, if an Internet user has a file available
to share with other Internet users, there is no need for the file holder to become a server and run a
server process all the time waiting for other users to connect and to get the file.
Client-Server Programming
In a client-server paradigm, communication at the application layer is between two running
application programs called processes: a client and a server. A client is a running program that
initializes the communication by sending a request; a server is another application program that
waits for a request from a [Link] server handles the request received from a client, prepares a
result, and sends the result back to the client. The lifetime of a server is infinite: it should be started and
run forever, waiting for the clients. The lifetime of a client is finite. It sends a finite number of requests to

the corresponding server, receives the responses, and stops

Application Programming Interface

If we need a process to be able to communicate with another process, we need a new set of
instructions to tell the lowest four layers of the TCP/IP suite to open the connection, send and
receive data from the other end, and close the connection.A set of instructions of this type is called
as an application programming interface (API).An interface in programming is a set of instructions
between two entities. In this case, one of the entities is the process at the application layer and the
other is the operating system that encapsulates the first four layers of the TCP/IP protocol suite.
A computer manufacturer build the first four layers of the suite in the operating system and include
an API. Here, the processes running at the application layer are able to communicate with the
operating system when sending and receiving messages through the Internet.
Several APIs have been designed for communication. Three are common: socket interface,
Transport Layer Interface (TLI), and STREAM.
Socket Interface
Socket interface started in the early 1980s at UC Berkeley as part of a UNIX environment.
The socket interface is a set of instructions that provide communication between the application
layer and the operating system. It is a set of instructions that can be used by a process to
communicate with another process. For example, in most computer languages, like C, C++, or Java,
we have several instructions that can read and write data to other sources and sinks such as a
keyboard (a source), a monitor (a sink), or a file (source and sink). Figure 5.1.3 shows the socket
format.

[Link] QUESTION PARTA/B/C YEAR PO BT

- - - - - -

Lecture Topic CO PO
No.

25 Client – Server Programming C211.3 1,2,3

The Client-server model is a distributed application structure that partitions tasks or workloads
between the providers of a resource or service, called servers, and service requesters called clients. In the
client-server architecture, when the client computer sends a request for data to the server through the internet,
the server accepts the requested process and delivers the data packets requested back to the client. Clients do
not share any of their resources. Examples of the Client-Server Model are Email, World Wide Web, etc.
How Does the Client-Server Model Work?
In this article, we are going to take a dive into the Client-Server model and have a look at how
the Internet works via, web browsers. This article will help us have a solid WEB foundation and help us
easily work with WEB technologies.
 Client: When we say the word Client, it means to talk of a person or an organization using a particular
service. Similarly in the digital world, a Client is a computer (Host) i.e. capable of receiving information
or using a particular service from the service providers (Servers).
 Servers: Similarly, when we talk about the word Servers, It means a person or medium that serves
something. Similarly in this digital world, a Server is a remote computer that provides information (data)
or access to particular services.
So, it is the Client requesting something and the Server serving it as long as it is in the database.

How the Browser Interacts With the Servers?


There are a few steps to follow to interacts with the servers of a client.
 User enters the URL(Uniform Resource Locator) of the website or file. The Browser then requests
the DNS(DOMAIN NAME SYSTEM) Server.
 DNS Server lookup for the address of the WEB Server.
 The DNS Server responds with the IP address of the WEB Server.
 The Browser sends over an HTTP/HTTPS request to the WEB Server’s IP (provided by the DNS
server).
 The Server sends over the necessary files for the website.
 The Browser then renders the files and the website is displayed. This rendering is done with the help
of DOM (Document Object Model) interpreter, CSS interpreter, and JS Engine collectively known as
the JIT or (Just in Time) Compilers.

Client Server Request and Response

Advantages of Client-Server Model


 Centralized system with all data in a single place.
 Cost efficient requires less maintenance cost and Data recovery is possible.
 The capacity of the Client and Servers can be changed separately.
Disadvantages of Client-Server Model
 Clients are prone to viruses, Trojans, and worms if present in the Server or uploaded into the Server.
 Servers are prone to Denial of Service (DOS ) attacks.
 Data packets may be spoofed or modified during transmission.
 Phishing or capturing login credentials or other useful information of the user are common
and MITM(Man in the Middle) attacks are common.

[Link] QUESTION PARTA/B/C YEAR PO BT

1. Explain in detail about Client Server Part B April/May 1,3 2


Programming 2023
Lecture Topic CO PO
No.

26 Domain Name System – World Wide C211.3 1,3


Web

Domain Name System (DNS)




The Domain Name System (DNS) translates human-readable domain names (e.g., [Link]) into
machine-readable IP addresses (e.g., [Link]), enabling internet communication
 It enables computers to locate and communicate with each other on the internet.
 Functions as a hierarchical, distributed database.
 Queries pass through multiple levels:
o Root server
o Top-Level Domain (TLD) server
o Authoritative server (stores the specific IP address).
 Ensures seamless website access using easy-to-remember names instead of numerical IP addresses.
How DNS Works

How Does DNS Work?


 When we type a website like [Link] in our browser, our computer tries to find the
IP address.
 First, it checks the local cache (our browser, operating system, or router) to see if it already knows the IP
address.
 If the local cache doesn’t have the IP, the query is sent to a DNS resolver to find it.
 DNS resolver may check host files (used for specific manual mappings), but usually, it moves on.
 Resolver sends the query to a Root DNS server, which doesn’t know the exact IP address but points to the
TLD server (e.g., .org server for this example).
 TLD server then directs the resolver to the authoritative nameserver for [Link].
 Authoritative nameserver knows the exact IP address for [Link] and sends it back to the
resolver.
 Resolver passes the IP address to our computer.
 Our computer uses the IP address to connect to the real server where the website is hosted.
 The website loads in our browser.
For more, we can refer to Working of DNS Server .

Structure of DNS
It is very difficult to find out the IP address associated with a website because there are millions of websites and
with all those websites we should be able to generate the IP address immediately, there should not be a lot of
delays for that to happen organization of the database is very important.
Root DNS Server

 DNS Record: Domain name, IP address what is the validity? what is the time to live? and all the
information related to that domain name. These records are stored in a tree-like structure.
 Namespace: Set of possible names, flat or hierarchical. The naming system maintains a collection of
bindings of names to values – given a name, a resolution mechanism returns the corresponding value.
 Name Server: It is an implementation of the resolution mechanism.
DNS = Name service in Internet – A zone is an administrative unit, and a domain is a subtree.
Types of Domain
There are various kinds of domains:
 Generic Domains: .com(commercial), .edu(educational), .mil(military), .org(nonprofit
organization), .net(similar to commercial) all these are generic domains.
 Country Domain: .in (India) .us .uk
 Inverse Domain: if we want to know what is the domain name of the website. IP to domain name mapping.
So DNS can provide both the mapping for example to find the IP addresses of [Link] then we
have to type
nslookup [Link]

Types of DNS
Domain Name Server
The client machine sends a request to the local name server, which, if the root does not find the address in its
database, sends a request to the root name server, which in turn, will route the query to a top-level domain
(TLD) or authoritative name server. The root name server can also contain some hostName to IP address
mappings. The Top-level domain (TLD) server always knows who the authoritative name server is. So finally
the IP address is returned to the local name server which in turn returns the IP address to the host.

Domain Name Server

DNS Lookup
DNS Lookup, also called DNS Resolution, is the process of translating a human-readable domain name (like
[Link]) into its corresponding IP address (like [Link]), which computers use to locate and
communicate with each other on the internet. It allows users to access websites easily using names instead of
remembering numeric IP addresses.
 DNS Lookup starts when a user types a domain name into their browser.
 The query goes through a series of servers: the DNS resolver, Root server, TLD server, and authoritative
server.
 Each server plays a role in finding the correct IP address for the domain.
 Once the IP address is found, the browser connects to the website’s server and loads the page.
DNS Resolver
DNS Resolver is simply called a DNS Client and has the functionality for initiating the process of DNS Lookup
which is also called DNS Resolution. By using the DNS Resolver, applications can easily access different
websites and services present on the Internet by using domain names that are very much friendly to the user and
that also resolves the problem of remembering IP Address.
Types of DNS Queries
There are basically three types of DNS Queries that occur in DNS Lookup. These are stated below.
 Recursive Query: In this query, if the resolver is unable to find the record, in that case, DNS client wants
the DNS Server will respond to the client in any way like with the requested source record or an error
message.
 Iterative Query: Iterative Query is the query in which DNS Client wants the best answer possible from the
DNS Server.
 Non-Recursive Query: Non-Recursive Query is the query that occurs when a DNS Resolver queries a DNS
Server for some record that has access to it because of the record that exists in its cache.
DNS Caching
DNS Caching can be simply termed as the process used by DNS Resolvers for storing the previously resolved
information of DNS that contains domain names, and IP Addresses for some time. The main principle of DNS
Caching is to speed up the process of future DNS lookup and also help in reducing the overall time of DNS
Resolution.
 Speeds Up Access: It stores previous website lookups, so your device can quickly load frequently visited
sites without asking the network for the IP address each time.
 Reduces Internet Traffic: This storage cuts down on the number of requests sent across the internet,
helping reduce overall network congestion.
 Enhances User Experience: With faster loading times for websites and less waiting, browsing the internet
becomes a smoother, more enjoyable experience.

World Wide Web (WWW)

WWW stands for World Wide Web and is commonly known as the Web. The
WWW was started by CERN in 1989. WWW is defined as the collection of
different websites around the world, containing different information shared
via local servers(or computers).
Web pages are linked together using hyperlinks which are HTML-formatted
and, also referred to as hypertext, these are the fundamental units of the
Internet and are accessed through Hypertext Transfer Protocol(HTTP). Such
digital connections, or links, allow users to easily access desired information by
connecting relevant pieces of information. The benefit of hypertext is it allows
you to pick a word or phrase from the text and click on other sites that have
more information about it. This data may be presented in text, picture, audio,
or video formats on the internet.

History of the WWW


It is a project created, by Tim Berner Lee in 1989, for researchers to work
together effectively at CERN. It is an organization, named the World Wide Web
Consortium (W3C), which was developed for further development of the web.
This organization is directed by Tim Berner’s Lee, aka the father of the web.
CERN, where Tim Berners worked, is a community of more than 1700
researchers from more than 100 countries. These researchers spend a little
time on CERN and the rest of the time they work at their colleges and national
research facilities in their home country, so there was a requirement for solid
communication so that they can exchange data.

System Architecture
From the user’s point of view, the web consists of a vast, worldwide connection
of documents or web pages. Each page may contain links to other pages
anywhere in the world. The pages can be retrieved and viewed by using
browsers of which internet explorer, Netscape Navigator, Google Chrome, etc
are the popular ones. The browser fetches the page requested interprets the
text and formatting commands on it, and displays the page, properly
formatted, on the screen.
The basic model of how the web works are shown in the figure below. Here the
browser is displaying a web page on the client machine. When the user clicks
on a line of text that is linked to a page on the [Link] server, the browser
follows the hyperlink by sending a message to the [Link] server asking it for
the page.

Here the browser displays a web page on the client machine when the user
clicks on a line of text that is linked to a page on [Link], the browser follows
the hyperlink by sending a message to the [Link] server asking for the
page.

Working of WWW
A Web browser is used to access web pages. Web browsers can be defined as
programs which display text, data, pictures, animation and video on the
Internet. Hyperlinked resources on the World Wide Web can be accessed using
software interfaces provided by Web browsers. Initially, Web browsers were
used only for surfing the Web but now they have become more universal.
The below diagram indicates how the Web operates just like client-server
architecture of the internet. When users request web pages or other
information, then the web browser of your system request to the server for the
information and then the web server provide requested services to web
browser back and finally the requested service is utilized by the user who
made the request.
World Wide Web

Web browsers can be used for several tasks including conducting searches,
mailing, transferring files, and much more. Some of the commonly used
browsers are Internet Explorer, Opera Mini, and Google Chrome.

Features of WWW
 WWW is open source.
 It is a distributed system spread across various websites.
 It is a Hypertext Information System.
 It is Cross-Platform.
 Uses Web Browsers to provide a single interface for many services.
 Dynamic, Interactive and Evolving.

Components of the Web


There are 3 components of the web:
 Uniform Resource Locator (URL): URL serves as a system for resources
on the web.
 Hyper Text Transfer Protocol (HTTP): HTTP specifies communication of
browser and server.
 Hyper Text Markup Language (HTML): HTML defines the structure,
organisation and content of a web page.

Difference Between WWW and Internet


WWW Internet

It is originated in 1989. It is originated in 1960.

WWW is an interconnected network of websites and Internet is used to connect a computer


WWW Internet

documents that can be accessed via the Internet. with other computer .

WWW used protocols such as HTTP Internet used protocols such as TCP/IP

It is based on software. It is based on hardware.

There is a entire infrastructure in


It is a service contained inside an infrastructure.
internet.

Web Browser Evolution and the Growth of the World Wide Web
In the early 1990s, Tim Berners-Lee and his team created a basic text web
browser. It was the release of the more user-friendly Mosaic browser in 1993
that really sparked widespread interest in the World Wide Web (WWW). Mosaic
had a clickable interface similar to what people were already familiar with on
personal computers, which made it easier for everyone to use the internet.
Mosaic was developed by Marc Andreessen and others in the United States.
They later made Netscape Navigator, which became the most popular browser
in 1994. Microsoft’s Internet Explorer took over in 1995 and held the top spot
for many years. Mozilla Firefox came out in 2004, followed by Google Chrome
in 2008, both challenging IE’s dominance. In 2015, Microsoft replaced Internet
Explorer with Microsoft Edge.

Challenges of the World Wide Web


 Privacy Concerns: Personal data is often collected and misused.
 Security Risks: Vulnerable to hacking, phishing, and malware.
 Digital Divide: Unequal access to the internet globally.
 Misinformation: Spread of fake news and unreliable content.
 Cyberbullying: Online harassment and abuse.
 Addiction: Overuse of the web leading to reduced productivity.
 Dependence: Heavy reliance on the web for daily activities.
 Copyright Issues: Unauthorized sharing of copyrighted material.
 Environmental Impact: High energy consumption of servers and data
centers.
 Complexity of Regulation: Difficult to enforce laws across countries.
[Link] QUESTION PARTA/B/C YEAR PO BT

1 Why do we need a DNS system when we Part A April/May 1 2


can directly use an IP address? 2024,
Nov/Dec
2023
2 Exemplify in detail about Domain Name Part B April/May 1,2 2
System 2024
3 Describe in depth about WWW and Part B April/May 1,2 2
HTTP protocols 2024

Lecture Topic CO PO
No.

27 HTTP, Electronic Mail. C211.3 1,2,3

HTTP Full Form – Hypertext Transfer Protocol



HTTP stands for HyperText Transfer Protocol. It is the main way web browsers and servers
communicate to share information on the internet. Tim Berner invents it. HyperText is the type of text that is
specially coded with the help of some standard coding language called HyperText Markup Language
(HTML). HTTP/2 is the new version of HTTP. HTTP/3 is the latest version of HTTP, which is published in
2022.
When you visit a website, HTTP helps your browser request and receive the data needed to display the web
pages you see. It is a fundamental part of how the internet works, making it possible for us to browse and
interact with websites. In this article, we are going to discuss the Full form of HTTP along with its working,
advantages, and disadvantages.
What is the Full Form of HTTP?
HTTP stands for “Hypertext Transfer Protocol.” It is a set of rules for sharing data on the World Wide
Web (WWW). HTTP helps web browsers and servers communicate, allowing people to access and share
information over the internet.
Key Points
 Basic Structure: HTTP forms the foundation of the web, enabling data communication and file sharing.
 Web Browsing: Most websites use HTTP, so when you click on a link or download a file, HTTP is at work.
 Client-Server Model: HTTP works on a request-response system. Your browser (client) asks for
information, and the website’s server responds with the data.
 Application Layer Protocol: HTTP operates within the Internet Protocol Suite, managing how data is
transmitted and received.
What is HyperText?
The protocol used to transfer hypertext between two computers is known as HyperText Transfer Protocol.
HTTP provides a standard between a web browser and a web server to establish communication. It is a set of
rules for transferring data from one computer to another. Data such as text, images, and other multimedia files
are shared on the World Wide Web. Whenever a web user opens their web browser, the user indirectly uses
HTTP. It is an application protocol that is used for distributed, collaborative, hypermedia information systems.
Working of HTTP [HyperText Transfer Protocol]
First of all, whenever we want to open any website we first open a web browser after that we will type the URL
of that website (e.g., [Link] ). This URL is now sent to the Domain Name Server (DNS). Then
DNS first checks records for this URL in their database, and then DNS will return the IP address to the web
browser corresponding to this URL. Now the browser is able to send requests to the actual server.
After the server sends data to the client, the connection will be closed. If we want something else from the
server we should have to re-establish the connection between the client and the server.
Working off HTTPs

What is an HTTP Request?


HTTP request is simply termed as the information or data that is needed by Internet browsers for loading a
website. This is simply known as HTTP Request.
There is some common information that is generally present in all HTTP requests. These are mentioned below.
 HTTP Version
 URL
 HTTP Method
 HTTP Request Headers
 HTTP Body
HTTP Request Headers
HTTP Request Headers generally store information in the form of key-value and must be present in each HTTP
Request. The use of this Request Header is to provide core information about the client’s information, etc.
HTTP Request Body
HTTP Request Body simply contains the information that has to be transferred. HTTP Request has the
information or data to be sent to these browsers.
HTTP Method
HTTP Methods are simply HTTP Verb. In spite of being present so many HTTP Methods, the most common
HTTP Methods are HTTP GET and HTTP POST. These two are generally used in HTTP cases. In HTTP GET,
the information is received in the form of a website.
What is HTTP Response?
HTTP Response is simply the answer to what a Server gets when the request is raised. There are various things
contained in HTTP Response, some of them are listed below.
 HTTP Status Code
 HTTP Headers
 HTTP Body

HTTP Response Headers


HTTP Response headers are simply like an HTTP Request where it has that work to send some important files
and data to the HTTP Response Body.
HTTP Response Body
HTTP Responses are the responses that are received successfully upon the request. Generally, it comes under
the requests generated by the web. In most cases, the request is to transfer the HTML data into a webpage.
What is an HTTP Status Code?
HTTP Status Codes are the 3-digit codes that tell the message or simply tell us about the HTTP Request
whether it has been completed or not. There are simply 5 types of status codes.
 Informational
 Successful
 Re-directional
 Client-Error
 Server-Error
History of HTTP
Tim Berners Lee and his team at CERN get credit for inventing original HTTP and associated technologies.
 HTTP version 0.9: This was the first version of HTTP which was introduced in 1991.
 HTTP version 1.0: In 1996, RFC 1945 (Request For Comments) was introduced in HTTP version 1.0.
 HTTP version 1.1: In January 1997, RFC 2068 was introduced in HTTP version 1.1. Improvements and
updates to the HTTP version 1.1 standard were released under RFC 2616 in June 1999.
 HTTP version 2.0: The HTTP version 2.0 specification was published as RFC 7540 on May 14, 2015.
 HTTP version 3.0: HTTP version 3.0 is based on the previous RFC draft. It is renamed as Hyper-Text
Transfer Protocol QUIC which is a transport layer network protocol developed by Google.
Characteristics of HTTP
HTTP is IP based communication protocol that is used to deliver data from server to client or vice-versa.
 The server processes a request, which is raised by the client, and also server and client know each other only
during the current bid and response period.
 Any type of content can be exchanged as long as the server and client are compatible with it.
 Once data is exchanged, servers and clients are no longer connected.
 It is a request and response protocol based on client and server requirements.
 It is a connection-less protocol because after the connection is closed, the server does not remember
anything about the client and the client does not remember anything about the server.
 It is a stateless protocol because both client and server do not expect anything from each other but they are
still able to communicate.
Cookies in HTTP
An HTTP cookie (web cookie, browser cookie) is a little piece of data that a server transmits to a user’s web
browser. When making subsequent queries, the browser may keep the cookie and transmit it back to the same
server. An HTTP cookie is typically used, for example, to maintain a user’s login state, and to determine
whether two requests originate from the same browser. For the stateless HTTP protocol, it retains stateful
information.
HTTP status code
Three-digit codes known as HTTP status codes are most frequently used to show if an HTTP request has been
fulfilled successfully. The five blocks below represent the breakdown of status codes:
 1x Informative
 2xx Achievement
 3xx Reorientation
 4xx Client Mistake
 5xx Error on the Server
Different numbers between 00 and 99 are denoted by the “xx”. Status codes that begin with “2” denote a
successful outcome. For instance, the most typical answers sent after a client requests a webpage have a status
code of “200 OK,” which denotes that the request was successfully fulfilled.
Can DDoS attacks be launched over HTTP?
Remember that because HTTP is a “stateless” protocol, every command executed over it operates
independently of every other operation. Each HTTP request opened and terminated a TCP connection according
to the original specification. Multiple HTTP requests can now flow over a persistent TCP connection in HTTP
1.1 and later versions of the protocol, which improves resource use. Large-scale HTTP requests are regarded as
application layer or layer 7 attacks in the context of DoS or DDoS attacks, and they can be used to mount an
attack on a target device.
Advantages of HTTP
 Memory usage and CPU usage are low because of fewer simultaneous connections.
 Since there are few TCP connections hence network congestion is less.
 Since handshaking is done at the initial connection stage, then latency is reduced because there is no further
need for handshaking for subsequent requests.
 The error can be reported without closing the connection.
 HTTP allows HTTP pipe-lining of requests or responses.
Disadvantages of HTTP
 HTTP requires high power to establish communication and transfer data.
 HTTP is less secure because it does not use any encryption method like HTTPS and uses TLS to encrypt
regular HTTP requests and responses.
 HTTP is not optimized for cellular phones and it is too gabby.
 HTTP does not offer a genuine exchange of data because it is less secure.
 The client does not close the connection until it receives complete data from the server; hence, the server
needs to wait for data completion and cannot be available for other clients during this time.

Electronic Mail

Introduction:
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@[Link].
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

[Link] QUESTION PARTA/B/C YEAR PO BT

1 Describe in depth about WWW and PART B April/May 1,3 2


HTTP protocols 2024
2 Describe about HTTP architecture and its PART B Nov/Dec 1,2 2
functionality 2023

You might also like