0% found this document useful (0 votes)
14 views104 pages

SUMMER 2022: Q.5 (A) What Is UDP? Define Remote Procedure Call in Detail. 07

Uploaded by

24mca015
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)
14 views104 pages

SUMMER 2022: Q.5 (A) What Is UDP? Define Remote Procedure Call in Detail. 07

Uploaded by

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

Q:5

SUMMER 2022
Q.5 (a) What is UDP? Define Remote procedure call in
detail. 07
UDP stands for User Datagram Protocol, a connectionless communication protocol
used in computer networks. It's an alternative to TCP (Transmission Control
Protocol) and is often used for real-time applications where speed is more
important than reliability, such as video streaming, online gaming, and VoIP.
Definition:
UDP is a connectionless transport layer protocol in the TCP/IP model used to
send data without establishing a connection between the sender and receiver.
Key Features:
 No connection setup needed.
 Faster than TCP (no overhead for acknowledgments or handshakes).
 No guarantee of delivery, order, or duplication protection.
 Often used in real-time applications like video streaming, online games, or
VoIP (e.g., Skype, Zoom).
Example Applications:
DNS, DHCP, TFTP, online multiplayer games.
Remote Procedure Call (RPC)
Definition:
A Remote Procedure Call (RPC) allows a program to execute a function on another
computer (server) as if it were a local function call.
Remote Procedure Call (RPC) is a powerful technique for
constructing distributed, client-server based applications. It is based on
extending the conventional local procedure calling so that the called procedure
does not exist in the same address space as the calling procedure. The two
processes may be on the same system, or they may be on different systems with a
network connecting them.
What is Remote Procedure Call (RPC)?
Remote Procedure Call (RPC) is a type of technology used in computing to enable
a program to request a service from software located on another computer in a
network without needing to understand the network's details. RPC abstracts the
complexities of the network by allowing the developer to think in terms of function
calls rather than network details, facilitating the process of making a piece of
software distributed across different systems.
RPC works by allowing one program (a client) to directly call procedures
(functions) on another machine (the server). The client makes a procedure call that
appears to be local but is run on a remote machine. When an RPC is made, the
calling arguments are packaged and transmitted across the network to the server.
The server unpacks the arguments, performs the desired procedure, and sends the
results back to the client.
Working of a RPC
1. A client invokes a client stub procedure, passing parameters in the usual way.
The client stub resides within the client's own address space.
2. The client stub marshalls(pack) the parameters into a message. Marshalling
includes converting the representation of the parameters into a standard format,
and copying each parameter into the message.
3. The client stub passes the message to the transport layer, which sends it to the
remote server machine. On the server, the transport layer passes the message to a
server stub, which demarshalls(unpack) the parameters and calls the desired
server routine using the regular procedure call mechanism.
4. When the server procedure completes, it returns to the server stub (e.g., via a
normal procedure call return), which marshalls the return values into a message.
5. The server stub then hands the message to the transport layer. The transport layer
sends the result message back to the client transport layer, which hands the
message back to the client stub.
6. The client stub demarshalls the return parameters and execution returns to the
caller.
How to Make a Remote Procedure Call?

The calling environment is suspended, procedure parameters are transferred across


the network to the environment where the procedure is to execute, and the
procedure is executed there. When the procedure finishes and produces its results,
its results are transferred back to the calling environment, where execution resumes
as if returning from a regular procedure call.
Note : RPC is especially well suited for client-server (e.g. query-response)
interaction in which the flow of control alternates between the caller and callee.
Conceptually, the client and server do not both execute at the same time. Instead,
the thread of execution jumps from the caller to the callee and then back again.
Types of RPC
 Callback RPC: Callback RPC allows processes to act as both clients and
servers. It helps with remote processing of interactive applications. The
server gets a handle to the client, and the client waits during the callback.
This type of RPC manages callback deadlocks and enables peer-to-peer
communication between processes.
 Broadcast RPC: In Broadcast RPC, a client's request is sent to all servers
on the network that can handle it. This type of RPC lets you specify that a
client's message should be broadcast. You can set up special broadcast ports.
Broadcast RPC helps reduce the load on the network.
 Batch-mode RPC: Batch-mode RPC collects multiple RPC requests on the
client side and sends them to the server in one batch. This reduces the
overhead of sending many separate requests. Batch-mode RPC works best
for applications that don't need to make calls very often. It requires a reliable
way to send data.
What Does RPC do?
RPC stands for Remote Procedure Call. It lets a program on one computer use code
on another computer as if it were on the same computer. When a program with
RPC is made ready to run, it includes a helper part called a stub. This stub acts like
the remote code. When the program runs and tries to use the remote code, the stub
gets this request. It then sends it to another helper program on the same computer.
The first time this happens, the helper program asks a special computer where to
find the remote code.
The helper program then sends a message over the internet to the other computer,
asking it to run the remote code. The other computer also has helper programs that
work with the remote code. When the remote code is done, it sends the results back
the same way. This whole process makes it seem like the remote code is running on
the local computer, even though it's actually running somewhere else.
Issues of the RPC
RPC Runtime: RPC run-time system is a library of routines and a set of services
that handle the network communications that underlie the RPC mechanism. In the
course of an RPC call, client-side and server-side run-time systems' code handle
binding, establish communications over an appropriate protocol, pass call data
between the client and server, and handle communications errors.
Stub: The function of the stub is to provide transparency to the programmer-
written application code. On the client side, the stub handles the interface between
the client's local procedure call and the run-time system, marshalling and
unmarshalling data, invoking the RPC run-time protocol, and if requested, carrying
out some of the binding steps.
On the server side, the stub provides a similar interface between the run-time
system and the local manager procedures that are executed by the server.
Binding: The most flexible solution is to use dynamic binding and find the server
at run time when the RPC is first made. The first time the client stub is invoked, it
contacts a name server to determine the transport address at which the server
resides. Binding consists of two parts
 Naming: A Server having a service to offer exports an interface for it.
Exporting an interface registers it with the system so that clients can use it.
 Locating: A Client must import an (exported) interface before
communication can begin.
The call semantics associated with RPC
 Retry Request Message: Whether to retry sending a request message when
a server has failed or the receiver didn't receive the message.
 Duplicate Filtering: Remove the duplicate server requests.
 Retransmission of Results: To resend lost messages without re-executing
the operations at the server side.
Advantages
 Easy Communication: RPC lets clients talk to servers using normal
procedure calls in high-level programming languages. This makes it simple
for programmers to work with.
 Hidden Complexity: RPC hides the details of how messages are sent
between computers. This means programmers don't need to worry about the
underlying network communication.
 Flexibility: RPC can be used in both local and distributed environments.
This makes it versatile for different types of applications.
Disadvantages
 Limited Parameter Passing: RPC can only pass parameters by value. It
can't pass pointers, which limits what can be sent between computers.
 Slower Than Local Calls: Remote procedure calls take longer than local
procedure calls because they involve network communication.
 Vulnerable to Failures: RPC depends on network connections, other
machines, and separate processes. This makes it more likely to fail than local
procedure calls.
RPC vs REST
RPC and REST are two ways to make computer programs talk to each other over
the internet. They're different, but both are useful. RPC is good for some things,
and REST is good for others. Some companies need RPC, while others prefer
REST. Sometimes, developers use both RPC and REST in the same project, but not
in the same part of the program. RPC is an old idea, but new versions like gRPC
and DRPC are making it popular again. Developers are still using and improving
these new types of RPC.
It's hard to say which one is better - RPC or REST. They're both good when used
the right way. The best choice depends on what you're trying to do with your
program.
Conclusion
Remote Procedure Call (RPC) in operating systems allows programs to run
functions on other computers as if they were on the same machine. It simplifies
building distributed programs by hiding the complexities of network
communication. RPC works by having the operating system handle the details of
sending requests and receiving responses between computers.

(b) Write the answer in brief.


1. Explain store and forward packet switching. 04
Definition:
Store-and-Forward is a packet switching technique used in networks
where each network device (like a switch or router) receives the entire
data packet, stores it temporarily, checks it for errors using
techniques like CRC, and forwards it only if it’s valid.
Switching is a technique to transmit data between networks using
switches that connect multiple LANs. Switches forward data packets
based on MAC addresses, efficiently using bandwidth and reducing
collisions. The three main types are:
 Circuit Switching: Dedicated path for the entire connection, used
in traditional telephony.
 Message Switching: Entire messages are stored and forwarded,
allowing flexible use but with potential delays.
 Packet Switching: Data is broken into packets sent independently
and reassembled at the destination, used in modern networks like
the Internet.
Working Process:
1. The entire frame is received by the switch/router.
2. It is stored in buffer memory.
3. Error checking is done using CRC (Cyclic Redundancy Check).
4. If errors are found, the packet is discarded; otherwise, it is
forwarded.
The step-by-step process (receive → store → check →
forward/discard) is explained accurately.

Key Features:
 Reliable: Ensures only error-free packets are sent forward.
 Slower (High Latency): Because the full packet must be received
before forwarding.
 Used in: Telecommunication networks and high-integrity data
transfers.

Advantages:
 Error detection before forwarding.
 Prevents network congestion by discarding corrupted packets.

Disadvantages:
 Increased latency due to full packet storage and checking.

📍 Example:
Imagine sending a letter from Ahmedabad to Delhi via courier hubs. The
letter stops at Mumbai, gets verified, and is then sent to Jaipur, and
finally to Delhi. Each stop is like a router using store-and-forward.
Switching Methods
 Cut-through Switching: Forwards packets as soon as the
destination address is read, ensuring low latency but no error
checking.
 Store-and-Forward Switching: Receives the entire frame, checks
for errors, and then forwards it, ensuring reliable transmission with
higher latency.
What is Store-and-Forward Switching?
Store-and-forward switching is a method of switching data packets by
the switching device that receives the data frame and then checks for
errors before forwarding the packets. It supports the efficient
transmission of non-corrupted frames. It is generally used in
telecommunication networks.
In store-and-forward switching, the switching device waits to receive the
entire frame and then stores the frame in the buffer memory. Then the
frame is checked for errors by using CRC(Cyclic Redundancy Check) if
the error is found then the packet is discarded else it is forwarded to the
next device.

Store and Forward Switching


What is Cut-through Switching?
Cut-through switching is a method of switching data packets by the
switching device that forwards the packets as soon as the destination
address is available without waiting for the rest of the data to arrive. It
supports low latency and high-speed transmission and requires less
storage space. It is used in fiber channel transmission, SCSI traffic
transmission, etc.
In cut−through switching, data transmission starts as soon as the
destination address field arrives at the switching device. Then the device
performs a lookup operation to check whether the destination address is
valid or not. If the address is found valid and the link to the destination
is available then the switching device starts to transmit the packets to the
destination without waiting for the rest of the frame to arrive.

Cut through Switching


🔚 Conclusion:
Store-and-forward switching ensures error-free data transmission at the
cost of slightly increased delay, making it suitable for reliable and
critical communication systems.

2. Define term TSAP and NSAP. 03


TSAP (Transport Service Access Point)
 Definition: TSAP is a point where the Transport Layer offers its services
to the Session Layer (or directly to the Application Layer, depending on the
OSI model implementation).
 Purpose: It identifies a specific connection endpoint at the transport layer
for communication.
 Think of it as: An address (like a port number) used to access transport
services.

NSAP (Network Service Access Point)


 Definition: NSAP is a point where the Network Layer offers its services to
the Transport Layer.
 Purpose: It identifies a specific endpoint in the network layer to provide
services to upper layers.
 Think of it as: A logical address that uniquely identifies a device or host in
a network.

In Short:
Term Layer it connects to Acts like
TSAP Between Transport ↔ Session Port number / endpoint
NSAP Between Network ↔ Transport Network address
🌐 Example Scenario:
You're using an app like WhatsApp on your phone to send a message.

📶 Layer-wise Explanation with TSAP and NSAP:


[Application Layer] ← You typing a message

[Transport Layer] ← Uses TSAP (e.g., port 443 for HTTPS)

[Network Layer] ← Uses NSAP (e.g., IP address of the WhatsApp server)

[Data Link + Physical Layer]← Actual data transmission over internet

📌 Real-Life Analogy:
 TSAP = Like an apartment number in a building (specifies which app or
service on a device).
 NSAP = Like the building's address (specifies which device in a network).

✅ Example Values:
Concept Example
TSAP Port number 443 (HTTPS)
NSAP IP address 192.168.1.5

OR
Q.5 (a) Explain DNS in detail. 07
Domain Name System (DNS)

The Domain Name System (DNS) translates human-readable domain


names (e.g., www.google.com) into machine-readable IP addresses (e.g.,
142.250.190.14), 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 https://www.geeksforgeeks.org 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 geeksforgeeks.org.
 Authoritative nameserver knows the exact IP address for
geeksforgeeks.org 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), .or
g(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
geeksforgeeks.org then we have to type

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 www.example.com) into its
corresponding IP address (like 192.0.2.1), 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.

(b) Explain IP version 4 in detail.


What is IPv4?
IP stands for Internet Protocol version v4 stands for Version Four (IPv4), is the
most widely used system for identifying devices on a network. It uses a set of four
numbers, separated by periods (like 192.168.0.1), to give each device a unique
address. This address helps data find its way from one device to another over the
internet.
IPv4 was the primary version brought into action for production within the
ARPANET in 1983. IP version four addresses are 32-bit integers which will be
expressed in decimal notation. Example- 192.0.2.126 could be an IPv4 address.
What is an IP Address?
An IP address (Internet Protocol address) is a unique identifier assigned to each
device connected to a network that uses the Internet Protocol for communication. It
serves two main purposes:
 Identification: It uniquely identifies a device on a network.
 Location Addressing: It indicates where a device is located within a
network, making data routing possible.
Understanding IPv4 Addressing
An IPv4 address consists of series of four eight-bit binary numbers which are
separated by decimal point. Although any numbering system can be used to
represent a unique 32- bit number, most commonly you see IP address expressed in
dot decimal notation. Some of the examples are :

Site Dot-decimal Binary

Twitter.com 104.244.42.129 01101000.11110100.00101010.10000001

Reddit.com 151.101.65.140 10010111.01100101.01000001.10001100

Linkedin.co
108.174.10.10 01101100.10101110.00001010.00001010
m

IPv4 Address Format


An IPv4 address consists of 32 bit (binary digit), grouped into four section of
known as octets or bytes. Each octet has 8 bits and this bits can be represented
only in 0 or 1 form, and when they grouped together, they form a binary number.
Since each octet has 8 bits, it can represent 256 numbers ranging from o to 255.
These four octets are represented as decimal numbers, separated by periods known
as dotted decimal notation. For example IPv4 address 185.107.80.231 consists of
four octets.
Binary Representation
IPv4 is basically converted into binary form by computer although these are
usually seen in decimal form for human readability. Each octet is converted into 8
bit binary number . For instance 185.107.80.231 in binary looks like:
 185: 10111001
 107: 01101011
 80: 01010000
 231: 11100111
So 185.107.80.231 in binary is: 10111001.01101011.01010000.11100111

IPv4 Address Format


Parts of IPv4
IPv4 addresses consist of three parts:
 Network Part: The network part indicates the distinctive variety that's
appointed to the network. The network part conjointly identifies the category
of the network that's assigned.
 Host Part: The host part uniquely identifies the machine on your network.
This part of the IPv4 address is assigned to every host.
For each host on the network, the network part is the same, however, the
host half must vary.
 Subnet Number: This is the non obligatory part of IPv4. Local networks
that have massive numbers of hosts are divided into subnets
and subnet numbers are appointed to that.
Types of IPv4 Addressing
IPv4 basically supports three different types of addressing modes:
 Unicast Addressing Mode: This addressing mode is used to specify single
sender and single receiver. Example: Accessing a website.
 Broadcast Addressing Mode: This addressing mode is used to send
messages to all devices in a network. Example: sending a message in local
network to all the devices.
 Multicast Addressing Mode: This addressing mode is typically used within
a local network or across networks and sends messages to a group of
devices. Example: Streaming audio to multiple devices at once.
Characteristics of IPv4
 IPv4 could be a 32-bit IP Address.
 IPv4 could be a numeric address, and its bits are separated by a dot.
 The number of header fields is twelve and the length of the header field is
twenty.
 It has Unicast, broadcast, and multicast-style addresses.
 IPv4 supports VLSM (Virtual Length Subnet Mask).
 IPv4 uses the Post Address Resolution Protocol to map to the MAC address.
 RIP may be a routing protocol supported by the routed daemon.
 Networks ought to be designed either manually or with DHCP.
 Packet fragmentation permits from routers and causes host.
Advantages of IPv4
 IPv4 security permits encryption to keep up privacy and security.
 IPV4 network allocation is significant and presently has quite 85000
practical routers.
 It becomes easy to attach multiple devices across an outsized network while
not NAT.
 This is a model of communication so provides quality service also as
economical knowledge transfer.
 IPV4 addresses are redefined and permit flawless encoding.
 IPv4 has high System Management prices and it's labor-intensive, complex,
slow & prone to errors.
 Routing is scalable and economical as a result of addressing its collective
more effectively.
 Data communication across the network becomes a lot of specific in
multicast organizations.
Limitations of IPv4
 IP relies on network layer addresses to identify end-points on the network,
and each network has a unique IP address.
 The world's supply of unique IP addresses is dwindling, and they might
eventually run out theoretically.
 If there are multiple hosts, we need the IP addresses of the next class.
 Complex host and routing configuration, non-hierarchical addressing,
difficult to re-numbering addresses, large routing tables, non-trivial
implementations in providing security, QoS (Quality of Service), mobility,
and multi-homing, multicasting, etc. are the big limitations of IPv4 so that's
why IPv6 came into the picture.
Conclusion
In conclusion, IPv4 is a widely used system for identifying devices on a network
with unique addresses made up of four numbers. It plays a crucial role in enabling
devices to communicate over the internet by directing data to the correct
destinations. Despite its limitations, IPv4 has been fundamental to the growth and
operation of the internet.

SUMMER-2023
Q.5(a) Explain HTTP in detail.
HTTP Full Form - Hypertext Transfer Protocol
HTTP is the primary method through which web browsers and servers
communicate to share information on the internet. It was invented by Tim Berners-
Lee. HyperText refers to text that is specially coded using a standard coding
language called HyperText Markup Language (HTML). HTTP/2 is the updated
version of HTTP, while HTTP/3 is the latest version, which was published in 2022.
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). 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.
 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., www.facebook.com ). 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 can 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 pairs
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 Verbs. In spite of being presentin 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 the HTTP Response, some of them are
listed below.
 HTTP Status Code
 HTTP Headers
 HTTP Body
HTTP Response
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 the 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 an 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 als, theo
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,t 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,r 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.Thee stateless HTTP
protocol, 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, network congestion is less.
 Since handshaking is done at the initial connection stage, 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.
Conclusion
In summary, HTTP stands for "Hypertext Transfer Protocol" and is essential for
web communication. It enables your browser to request and receive information
from websites, making online browsing possible. HTTP is the basic method used
by web browsers and servers to communicate and share information on the
internet, making it possible for us to browse and interact with websites.
(b) Explain DNS in brief.(repeat)
OR
(a) Discuss IPV4 in brief and compare IPV4 and IPV6.
Difference Between IPv4 and IPv6
In the digital world, where billions of devices connect and communicate, Internet
Protocol (IP) Addresses play a crucial role. These addresses are what allow
devices to identify and locate each other on a network.
To know all about IP Addresses - refer to What is an IP Address?
Currently, there are two primary versions of Internet Protocol in use: IPv4 and
IPv6. Each version has distinct characteristics, capabilities, and was developed to
meet the specific needs of the internet's growth. IPv4 was the first to be widely
implemented, laying the groundwork for early network communications.
However, as the internet grew and more devices started connecting online, the
limitations of IPv4 became clear, leading to the creation of IPv6. This newer
version was designed to address the shortcomings of its predecessor and to future-
proof the network against an ever-increasing demand for more addresses and
improved network efficiency.
Let’s explore their differences, why both are still in use, and the advantages each
offers.
Table of Content
 What is IPv4?
 What is IPv6?
 Difference Between IPv4 and IPv6
 Benefits of IPv6 over IPv4
 Why IPv4 is Still in Use?
What is IPv4?
IPv4, or Internet Protocol version 4, is the original addressing system of the
Internet, introduced in 1983. It uses a 32-bit address scheme, which theoretically
allows for over 4 billion unique addresses (2^32). IPv4 addresses are typically
displayed in decimal format, divided into four octets separated by dots. For
example, 192.168.1.1 is a common IPv4 address you might find in a home
network.
IPv4 Address Format
IPv4 Address Format is a 32-bit Address that comprises binary digits separated by
a dot (.).

IPv4 Address Format


Characteristics of IPv4
 32-bit address length: Allows for approximately 4.3 billion unique
addresses.
 Dot-decimal notation: IP addresses are written in a format of four decimal
numbers separated by dots, such as 192.168.1.1.
 Packet structure: Includes a header and payload; the header contains
information essential for routing and delivery.
 Checksum fields: Uses checksums in the header for error-checking the
header integrity.
 Fragmentation: Allows packets to be fragmented at routers along the route
if the packet size exceeds the maximum transmission unit (MTU).
 Address Resolution Protocol (ARP): Used for mapping IP network
addresses to the hardware addresses used by a data link protocol.
 Manual and DHCP configuration: Supports both manual configuration of
IP addresses and dynamic configuration through DHCP (Dynamic Host
Configuration Protocol).
 Limited address space: The main limitation which has led to the
development of IPv6 to cater to more devices.
 Network Address Translation (NAT): Used to allow multiple devices on a
private network to share a single public IP address.
 Security: Lacks inherent security features, requiring additional protocols
such as IPSec for secure communications.
Drawbacks of IPv4
 Limited Address Space : IPv4 has a limited number of addresses, which is
not enough for the growing number of devices connecting to the internet.
 Complex Configuration : IPv4 often requires manual configuration or
DHCP to assign addresses, which can be time-consuming and prone to
errors.
 Less Efficient Routing : The IPv4 header is more complex, which can slow
down data processing and routing.
 Security Issues : IPv4 does not have built-in security features, making it
more vulnerable to attacks unless extra security measures are added.
 Limited Support for Quality of Service (QoS) : IPv4 has limited
capabilities for prioritizing certain types of data, which can affect the
performance of real-time applications like video streaming and VoIP.
 Fragmentation : IPv4 allows routers to fragment packets, which can lead to
inefficiencies and increased chances of data being lost or corrupted.
 Broadcasting Overhead : IPv4 uses broadcasting to communicate with
multiple devices on a network, which can create unnecessary network traffic
and reduce performance.
What is IPv6?
Another most common version of the Internet Protocol currently is IPv6. The well-
known IPv6 protocol is being used and deployed more often, especially in mobile
phone markets. IPv6 was designed by the Internet Engineering Task Force (IETF)
in December 1998 with the purpose of superseding IPv4 due to the global
exponentially growing internet of users.
IPv6 stands for Internet Protocol version 6. IPv6 is the new version of Internet
Protocol, which is way better than IPv4 in terms of complexity and efficiency. IPv6
is written as a group of 8 hexadecimal numbers separated by colon (:). It can be
written as 128 bits of 0s and 1s.
IPv6 Address Format
IPv6 Address Format is a 128-bit IP Address, which is written in a group of 8
hexadecimal numbers separated by colon (:).

IPv6 Address Format


To switch from IPv4 to IPv6, there are several strategies:
 Dual Stacking : Devices can use both IPv4 and IPv6 at the same time. This
way, they can talk to networks and devices using either version.
 Tunneling : This method allows IPv6 users to send data through an IPv4
network to reach other IPv6 users. Think of it as creating a "tunnel" for IPv6
traffic through the older IPv4 system.
 Network Address Translation (NAT) : NAT helps devices using different
versions of IP addresses (IPv4 and IPv6) to communicate with each other by
translating the addresses so they understand each other.
Characteristics of IPv6
 IPv6 uses 128-bit addresses, offering a much larger address space than
IPv4's 32-bit system.
 IPv6 addresses use a combination of numbers and letters separated by
colons, allowing for more unique addresses.
 The IPv6 header has fewer fields, making it more efficient for routers to
process.
 IPv6 supports Unicast, Multicast, and Anycast, but no Broadcast, reducing
network traffic.
 IPv6 allows flexible subnetting (VLSM) to divide networks based on
specific needs.
 IPv6 uses Neighbor Discovery for MAC address resolution instead of ARP.
 IPv6 uses advanced routing protocols like OSPFv3 and RIPng for better
address handling.
 IPv6 devices can self-assign IP addresses using SLAAC, or use DHCPv6 for
more control.
 IPv6 handles fragmentation at the sender side, not by routers, improving
speed.
Difference Between IPv4 and IPv6

IPv4 IPv6

IPv4 has a 32-bit address


IPv6 has a 128-bit address length
length
IPv4 IPv6

It Supports Manual
It supports Auto and renumbering address
and DHCP address
configuration
configuration

In IPv4 end to end,


In IPv6 end-to-end, connection integrity is
connection integrity is
Achievable
Unachievable

It can generate The address space of IPv6 is quite large it can


4.29x10 9 address space produce 3.4x10 38 address space

The Security feature is IPSEC is an inbuilt security feature in the IPv6


dependent on the application protocol

Address representation of Address representation of IPv6 is in


IPv4 is in decimal hexadecimal

Fragmentation performed by
In IPv6 fragmentation is performed only by the
Sender and forwarding
sender
routers

In IPv4 Packet flow In IPv6 packet flow identification are Available


identification is not available and uses the flow label field in the header

In IPv4 checksum field is


In IPv6 checksum field is not available
available
IPv4 IPv6

It has a broadcast Message In IPv6 multicast and anycast message


Transmission Scheme transmission scheme is available

In IPv4 Encryption and


In IPv6 Encryption and Authentication are
Authentication facility not
provided
provided

IPv4 has a header of 20-60


IPv6 has a header of 40 bytes fixed
bytes.

IPv4 can be converted to


Not all IPv6 can be converted to IPv4
IPv6

IPv4 consists of 4 fields


IPv6 consists of 8 fields, which are separated by
which are separated by
a colon (:)
addresses dot (.)

IPv4's IP addresses are


divided into five different
IPv6 does not have any classes of the IP address.
classes. Class A , Class B,
Class C, Class D , Class E.

IPv4 supports
VLSM( Variable Length IPv6 does not support VLSM.
subnet mask ).

Example of IPv4: Example of IPv6:


IPv4 IPv6

66.94.29.13 2001:0000:3238:DFE1:0063:0000:0000:FEFB

Same diff with features:-


Feature IPv4 IPv6
IPv4 has a 32-bit
Address Length IPv6 has a 128-bit address length
address length
It supports
Address Manual and It supports Auto and renumbering address
Configuration DHCP address configuration
configuration
In IPv4 end to
Connection end, connection In IPv6 end-to-end, connection integrity is
Integrity integrity is Achievable
Unachievable
It can generate
The address space of IPv6 is quite large it can
Address Space 4.29x10⁹ address
produce 3.4x10³⁸ address space
space
The Security
feature is IPSEC is an inbuilt security feature in the IPv6
Security
dependent on the protocol
application
Address
Address Address representation of IPv6 is in
representation of
Representation hexadecimal
IPv4 is in decimal
Fragmentation Fragmentation In IPv6 fragmentation is performed only by the
performed by sender
Sender and
Feature IPv4 IPv6
forwarding
routers
In IPv4 Packet
Packet Flow flow In IPv6 packet flow identification are Available
Identification identification is and uses the flow label field in the header
not available
In IPv4 checksum
Checksum In IPv6 checksum field is not available
field is available
It has a broadcast
Message
Message In IPv6 multicast and anycast message
Transmission
Transmission transmission scheme is available
Scheme
Scheme
In IPv4
Encryption and
Encryption & In IPv6 Encryption and Authentication are
Authentication
Authentication provided
facility not
provided
IPv4 has a header
Header Size IPv6 has a header of 40 bytes fixed
of 20-60 bytes.
IPv4 can be
Compatibility Not all IPv6 can be converted to IPv4
converted to IPv6
IPv4 consists of 4
Address fields which are IPv6 consists of 8 fields, which are separated by
Format separated by a colon (:)
addresses dot (.)
Address IPv4's IP IPv6 does not have any classes of the IP
Classes addresses are address.
divided into five
different classes.
Feature IPv4 IPv6
Class A , Class B,
Class C, Class D ,
Class E.
IPv4 supports
VLSM (Variable
Subnetting IPv6 does not support VLSM
Length Subnet
Mask)
Example of IPv4: Example of IPv6:
Example
66.94.29.13 2001:0000:3238:DFE1:0063:0000:0000:FEFB
Benefits of IPv6 over IPv4
The recent Version of IP IPv6 has a greater advantage over IPv4. Here are some of
the mentioned benefits:
 Larger Address Space: IPv6 has a greater address space than IPv4, which
is required for expanding the IP Connected Devices. IPv6 has 128 bit IP
Address rather and IPv4 has a 32-bit Address.
 Improved Security: IPv6 has some improved security which is built in with
it. IPv6 offers security like Data Authentication, Data Encryption, etc. Here,
an Internet Connection is more Secure.
 Simplified Header Format: As compared to IPv4, IPv6 has a simpler and
more effective header Structure, which is more cost-effective and also
increases the speed of Internet Connection.
 Prioritize: IPv6 contains stronger and more reliable support for QoS
features, which helps in increasing traffic over websites and increases audio
and video quality on pages.
 Improved Support for Mobile Devices: IPv6 has increased and better
support for Mobile Devices. It helps in making quick connections over other
Mobile Devices and in a safer way than IPv4.
Why IPv4 is Still in Use?
1. Infrastructure Compatibility Many systems and devices are built for IPv4
and require significant updates to support IPv6, including routers, switches,
and computers.
2. Cost of Transition - Switching to IPv6 can be expensive and complex,
involving hardware updates, software upgrades, and training for personnel.
3. Lack of Immediate Need - Techniques like NAT (Network Address
Translation) help extend the life of IPv4 by allowing multiple devices to
share a single public IP address, reducing the urgency to switch to IPv6.
4. Coexistence Strategies - Technologies that allow IPv4 and IPv6 to run
simultaneously make it easier for organizations to adopt IPv6 gradually
while maintaining their existing IPv4 systems.
5. Slow Global Adoption - The adoption of IPv6 varies significantly around
the world, which necessitates the continued support of IPv4 for global
connectivity.
6. Lack of Visible Benefits - Many users and organizations don't see
immediate improvements with IPv6 if they don't face an IP address shortage,
reducing the incentive to upgrade.
Conclusion
The shift from IPv4 to IPv6 is more than just an expansion of address space; it
represents a necessary evolution in internet architecture to accommodate future
growth and innovation. Understanding these differences helps not only in
appreciating how the internet works but also in foreseeing how technology will
continue to evolve to meet the needs of an increasingly connected world.
(b) What is domain resource record? Explain DNS
resource record types.
Records in DNS
DNS (Domain Name System) allows us to interact with devices on the Internet
without having to remember long strings of numbers. Each computer on the
Internet has its own unique address, known as an IP address, just like every home
has a unique address for sending direct mail. 104.26.10.228 is an IP address
consisting of four sets of numbers extending from 0 to 255 separated by a period.
It's not easy having to remember this complicated collection of numbers every time
we want to access a website, which is where DNS comes in
handy. geeksforgeeks.org can be remembered instead of 104.26.10.228.

Domain Hierarchy:

TLD (Top-Level Domain)


TLD (Top-Level Domain) is the rightmost part of a domain name. The TLD for
geeksforgeeks.com is ".com". TLDs are divided into two categories: gTLDs
(generic top-level domains) and ccTLDs (country code top-level domains).
Historically, the purpose of a common top-level domain (gTLD) was to inform
users of the purpose of the domain name; For example, a.com would be for
business purposes, .org for organization, .edu for education, and .gov for the
government. And a country code top-level domain (ccTLD) was used for
geographic purposes, such as .ca for Canadian sites, .co.uk for UK sites, and so on.
As a result of the high demand, many new gTLDs have emerged,
including.online,.club,.website,.biz, and many others.
SLD(Second-Level Domain)
The .org component of geeksforgeeks.org is the top-level domain, while
geeksforgeeks is the second-level domain. Second-level domains can only contain
a-z 0-9 and hyphens and are limited to 63 characters and TLDs when registering a
domain name (may not start or end with hyphens or contain consecutive hyphens).
Subdomain
A period is used to separate a subdomain from a second-level domain. For
example, the admin part is a subdomain named admin.geeksforgeeks.org. A
subdomain name, like a second-level domain, is restricted to 63 characters and can
only contain the letters a-z, 0-9, and hyphens (cannot begin or end with hyphens or
consecutive hyphens).To create longer names, we can use multiple subdomains
separated by periods, such as mailer.servers.geeksforgeeks.org. However, the
maximum length should not exceed 253 characters. We can create as many
subdomains as we want for our domain name.
DNS Record Types
However, DNS is not just for websites, and there are many other types of DNS
records as well. We'll go through some of the most common ones we're likely to
encounter.
 A Record - For example, 104.26.10.228 is an IPv4 address that these entries
resolve to.
 AAAA Record - For example, 2506:4700:20::681a:bc6 resolves to an IPv6
address.
 CNAME Record - For example, the subdomain name of Geeksforgeeks's
online shop is marketing.geeksforgeeks.org, which gives a CNAME record
of marketing.shopify.com. To determine the IP address, another DNS request
will be sent to marketing.shopify.com.
 MX Record - These records point to the servers that handle the email for the
domain we are looking for. For example, the MX record response for
geeksforgeeks.com would look like alt1.aspmx.l.google.com. There is also a
priority sign on these documents. It instructs the client in which order to try
the servers. This is useful when the primary server fails and the email needs
to be sent to a backup server.
 TXT Record - TXT records are text fields that can be used to store any text-
based data. TXT records can be used for a variety of things, but one of the
most common is to identify the server that has the authorization to send an
email on behalf of the domain (this can help in the fight against spam and
fake email). is). They can also be used to verify domain ownership when
registering for third-party services.
When we make a DNS request, what happens?
 When we request a domain name, our computer first checks its local cache
to see if we have recently visited the address. If we haven't, our computer
will send a request to our recursive DNS server.
 Our ISP will typically provide we with a recursive DNS server, but we can
also use our own. A local cache of recently discovered domain names is also
kept on this server. If a local result is discovered, it is returned to our
computer and our request is completed (this is common for popular and
highly requested services such as Google, Facebook, Twitter). If the request
cannot be met locally, a journey begins with the Internet's root DNS server
to locate the appropriate response.
 Root servers act as the DNS backbone of the Internet, leading we to the
appropriate top-level domain servers based on our request. For example, if
we request www.geeksforgeeks.org, the root server will recognize the .org
top-level domain and direct we to the appropriate TLD server for .org
addresses.
 The TLD server keeps track of where to look for authoritative servers that
respond to DNS requests. Authoritative servers are sometimes referred to as
domain nameservers. kip.ns.cloudflare.com and uma.ns.cloudflare.com, for
example, are name servers for geeksforgeeks.org. Multiple nameservers for
one domain name are often used as backups in case they go down.
 An authoritative DNS server is the server that stores the DNS records for a
domain name and where any modifications are made to the DNS records for
that domain name. The DNS record is then transmitted to the recursive DNS
server, where a local copy is cached for future queries and later sent back to
the originating client making the request based on the record type.

SUMMER-2024
Q.5 (a) Explain bit-map protocol. 07
Bit map protocol is called collision free Protocol. In bitmap protocol, each
contention period consists of exactly N slots. If any station has to send a frame,
then it transmits a 1 bit in the respective slot.
Almost all collisions can be avoided in CSMA/CD but they can still occur during
the contention period. The collision during the contention period adversely affects
the system performance, this happens when the cable is long and length of packet
are short. This problem becomes serious as fiber optics network came into use.
Here we shall discuss some protocols that resolve the collision during the
contention period.
 Bit-map Protocol
 Binary Countdown
 Limited Contention Protocols
 The Adaptive Tree Walk Protocol
Pure and slotted Aloha, CSMA and CSMA/CD are Contention based Protocols:
 Try-if collide-Retry
 No guarantee of performance
 What happen if the network load is high?
Collision Free Protocols:
 Pay constant overhead to achieve performance guarantee
 Good when network load is high
1. Bit-map Protocol:
Bit map protocol is collision free Protocol. In bitmap protocol method, each
contention period consists of exactly N slots. If any station has to send frame, then
it transmits a 1 bit in the corresponding slot. For example, if station 2 has a frame
to send, it transmits a 1 bit to the 2nd slot.
In general, Station 1 Announce the fact that it has a frame questions by inserting a
1 bit into slot 1. In this way, each station has complete knowledge of which station
wishes to transmit. There will never be any collisions because everyone agrees on
who goes next. Protocols like this in which the desire to transmit is broadcasting
for the actual transmission are called Reservation Protocols.
Bit Map Protocol fig (1.1)
For analyzing the performance of this protocol, We will measure time in units of
the contention bits slot, with a data frame consisting of d time units. Under low
load conditions, the bitmap will simply be repeated over and over, for lack of data
frames. All the stations have something to send all the time at high load, the N bit
contention period is prorated over N frames, yielding an overhead of only 1 bit per
frame.
Generally, high numbered stations have to wait for half a scan before starting to
transmit low numbered stations have to wait for half a scan(N/2 bit slots) before
starting to transmit, low numbered stations have to wait on an average 1.5 N slots.

2. Binary Countdown:
Binary countdown protocol is used to overcome the overhead 1 bit per binary
station. In binary countdown, binary station addresses are used. A station wanting
to use the channel broadcast its address as binary bit string starting with the high
order bit. All addresses are assumed of the same length. Here, we will see the
example to illustrate the working of the binary countdown.
In this method, different station addresses are read together who decide the priority
of transmitting. If these stations 0001, 1001, 1100, 1011 all are trying to seize the
channel for transmission. All the station at first broadcast their most significant
address bit that is 0, 1, 1, 1 respectively. The most significant bits are read together.
Station 0001 see the 1 MSB in another station address and knows that a higher
numbered station is competing for the channel, so it gives up for the current round.
Other three stations 1001, 1100, 1011 continue. The next station at which next bit
is 1 is at station 1100, so station 1011 and 1001 give up because there 2nd bit is 0.
Then station 1100 starts transmitting a frame, after which another bidding cycle
starts.

Binary Countdown fig (1.2)


3. Limited Contention Protocols:
 Collision based protocols (pure and slotted ALOHA, CSMA/CD) are good
when the network load is low.
 Collision free protocols (bitmap, binary Countdown) are good when load is
high.
 How about combining their advantages :
1. Behave like the ALOHA scheme under light load
2. Behave like the bitmap scheme under heavy load.
4. Adaptive Tree Walk Protocol:
 partition the group of station and limit the contention for each slot.
 Under light load, everyone can try for each slot like aloha
 Under heavy load, only a group can try for each slot
 How do we do it :
1. treat every stations as the leaf of a binary tree
2. first slot (after successful transmission), all stations
can try to get the slot(under the root node).
3. If no conflict, fine.
4. Else, in case of conflict, only nodes under a subtree get to try for the next
one. (depth first search)

Adaptive Tree Walk Protocol fig (1.3)


Slot-0 : C*, E*, F*, H* (all nodes under node 0 can try which are going to send),
conflict
Slot-1 : C* (all nodes under node 1 can try}, C sends
Slot-2 : E*, F*, H*(all nodes under node 2 can try}, conflict
Slot-3 : E*, F* (all nodes under node 5 can try to send), conflict
Slot-4 : E* (all nodes under E can try), E sends
Slot-5 : F* (all nodes under F can try), F sends
Slot-6 : H* (all nodes under node 6 can try to send), H sends.

(b) Explain simple mail transfer protocol. 07


Simple Mail Transfer Protocol (SMTP) is an application layer protocol used for
exchanging email messages between servers. It is essential in the email
communication process and operates at the application layer of the TCP/IP stack.
To send an email, the client opens a TCP connection to the SMTP server. The
server, which is always listening on port 25, initiates the connection as soon as it
detects a client. Once the TCP connection is established, the client sends the email
across the connection.

SMTP
Types of SMTP Protocol
The SMTP model supports two types of email delivery methods: end-to-
end and store-and-forward.
 End-to-end delivery is used between organizations. In this method, the
email is sent directly from the sender's SMTP client to the recipient's SMTP
server without passing through intermediate servers.
 Store-and-forward is used within organizations that have TCP/IP and
SMTP-based networks. In this method, the email may pass through several
intermediate servers (Message Transfer Agents, or MTAs) before reaching
the recipient.
With end-to-end delivery, the SMTP client waits until the email is successfully
copied to the recipient's SMTP server before sending it. This is different from
the store-and-forward method, where the email might stop at multiple
intermediate servers before reaching its destination. In store-and-forward systems,
the sender is notified as soon as the email reaches the first server, not the final
destination.

SMTP
Before diving deeper into the Model of SMTP System, it's important to understand
how SMTP is leveraged by service providers like SMTP.com in the real-world
scenario.
SMTP.com is a platform that caters to all your transaction, email relay and email
delivery needs at a very affordable price. With decades of experience, SMTP.com
is regarded as the most trusted sender in the industry by ISPs. SMTP.com had been
trusted by over 100,000 customers over the years. SMTP.com is extremely intuitive
and easy to set up. It can be integrated seamlessly into your current business
system. If you need to migrate from another provider, SMTP.com make it
effortless.
Features
 Dedicated IP
 Email API: Integrating SMTP.com with your business can be easy with the
email API feature. They have complete API documentation on their website
that can help you integrate your business in just 5 minutes.
 24x7 Customer Support: The round-the-clock support is one of the best
features of SMTP.com. Support is available both on the website and also for
paid customers. 24x7, all human support is available for all customers across
all plans. No third party is involved and solutions are provided fast for easy
implementation. Online chat support is also available for those who are
looking for more information about SMTP.com
 High Volume Sending Solutions: This newly launched feature is great for
those businesses who want to send more than 250 million emails a month.
Customized quotations and solutions are available.
 Reputation Defender: This is an add-on feature that helps clean up your
email lists. It doesn’t need any integration but actively monitors your lists
and provides a report.
Pricing
SMTP.com offers affordable delivery services and caters to all kinds of businesses.
Their plans range from $25 to $500 and above. The best part about this platform is
that all the features are available in all the plans. The prices change only based on
the volume of emails sent monthly. Even with the lowest price pack, users can get
access to 24x7 customer support and all the SMTP tools. The Reputation Defender
for list cleaning is an add-on feature available for all users.
Model of SMTP System

SMTP Model
In the SMTP model user deals with the user agent (UA), for example, Microsoft
Outlook, Netscape, Mozilla, etc. To exchange the mail using TCP, MTA is used.
The user sending the mail doesn't have to deal with MTA as it is the responsibility
of the system admin to set up a local MTA. The MTA maintains a small queue of
mail so that it can schedule repeat delivery of mail in case the receiver is not
available. The MTA delivers the mail to the mailboxes and the information can
later be downloaded by the user agents.
Components of SMTP
 Mail User Agent (MUA): It is a computer application that helps you in
sending and retrieving mail. It is responsible for creating email messages for
transfer to the mail transfer agent(MTA).
 Mail Submission Agent (MSA): It is a computer program that receives mail
from a Mail User Agent(MUA) and interacts with the Mail Transfer
Agent(MTA) for the transfer of the mail.
 Mail Transfer Agent (MTA): It is software that has the work to transfer
mail from one system to another with the help of SMTP.
 Mail Delivery Agent (MDA): A mail Delivery agent or Local Delivery
Agent is basically a system that helps in the delivery of mail to the local
system.
How does SMTP Work?

SMTP
1. Sending Email:
 When a user wants to send an email, they use a User Agent (UA), like
Outlook or Gmail.
 The email is handed over to the MTA, which is responsible for transferring
the email to the recipient’s mail server.
2. SMTP Client and Server:
 Sender-SMTP (Client): The email sender’s MTA initiates the connection to
the recipient’s MTA (Receiver-SMTP).
 Receiver-SMTP (Server): The receiving MTA listens for incoming
connections and receives the email from the sender-SMTP.
 This communication happens over TCP port 25.
3. Relays and Gateways:
 Relays: In some cases, the email may pass through several intermediate
MTAs before reaching the destination server. These MTAs act as relays.
 Gateways: If the sending and receiving systems use different email
protocols (e.g., SMTP and non-SMTP), an email gateway can convert the
email to the appropriate format for delivery.
4. Email Delivery:
 The sender’s MTA sends the email to the receiver’s MTA, either directly or
through relays.
 The MTA uses the SMTP protocol to transfer the message. Once it’s
delivered to the destination MTA, the email is placed in the recipient’s
mailbox.
 The recipient’s User Agent (UA) can then download the email.
SMTP Envelope
Purpose
 The SMTP envelope contains information that guides email
delivery between servers.
 It is distinct from the email headers and body and is not visible to the email
recipient.
Contents of the SMTP Envelope
 Sender Address: Specifies where the email originates.
 Recipient Addresses: Indicates where the email should be delivered.
 Routing Information: Helps servers determine the path for email delivery.
Comparison to Regular Mail
 Think of the SMTP envelope as the address on a physical envelope for
regular mail.
 Just like an envelope guides postal delivery, the SMTP envelope directs
email servers on where to send the email.
SMTP Commands

S.No. Keywor Command form Description Usage

It provides
the
HELO<SP><domain><CRL identification
1. HELO Mandatory
F> of the sender
i.e. the host
name.

It specifies
MAIL<SP>FROM :
2. MAIL the originator Mandatory
<reverse-path><CRLF>
of the mail.

It specifies
RCPT<SP>TO : <forward-
3. RCPT the recipient Mandatory
path><CRLF>
of mail.
S.No. Keywor Command form Description Usage

It specifies
4. DATA DATA<CRLF> the beginning Mandatory
of the mail.

It closes the
5. QUIT QUIT<CRLF> TCP Mandatory
connection.

It aborts the
current mail
transaction Highly
6. RSET RSET<CRLF> but the TCP recommende
connection d
remains
open.

It is use to
Highly
VRFY<SP><string><CRLF confirm or
7. VRFY recommende
> verify the
d
user name.

Highly
8. NOOP NOOP<CRLF> No operation recommende
d

9. TURN TURN<CRLF> It reverses Seldom used


the role of
sender and
S.No. Keywor Command form Description Usage

receiver.

It specifies
the mailing
10. EXPN EXPN<SP><string><CRLF> Seldom used
list to be
expanded.

It send some
specific
11. HELP HELP<SP><string><CRLF> documentatio Seldom used
n to the
system.

It send mail
SEND<SP>FROM :
12. SEND to the Seldom used
<reverse-path><CRLF>
terminal.

It send mail
to the
SOML<SP>FROM : terminal if
13. SOML Seldom used
<reverse-path><CRLF> possible;
otherwise to
mailbox.

It send mail
SAML<SP>FROM : to the
14. SAML Seldom used
<reverse-path><CRLF> terminal and
mailbox.
SMTP Ports
 Port 587: This is the most commonly used port for secure SMTP
submission using TLS (Transport Layer Security). It is recommended for
client-to-server communication, as it ensures the security of the email
transmission.
 Port 465: Previously used for secure SMTP (SMTPS), this port is no
longer considered an official standard and is generally not recommended
anymore. Many email providers have moved away from port 465 in favor of
port 587.
 Port 25: This port is traditionally used for SMTP relay between mail
servers, not for email submission from clients. It is often blocked by ISPs for
outgoing mail due to its frequent use for spam and malicious activities.
 Port 2525: Although not an official SMTP port, it is sometimes used as an
alternative for SMTP submission, especially in cases where port 25 is
blocked or restricted. Many email providers support this port as an
alternative for secure communication.
Difference Between SMTP and Extended SMTP

SMTP Extended SMTP

Users were not verified in SMTP as a


In Extended SMTP, authentication of
result of massive-scale scam emails
the sender is done.
being sent.

We cannot attach a Multimedia file


We can directly attach Multimedia FIle
in SMTP directly without the help of
in ESMTP.
MMIE.

We cannot reduce the size of the We can reduce the size of the email in
email in SMTP. Extended SMTP.
SMTP Extended SMTP

The main identification feature for


SMTP clients open transmission with ESMTP clients is to open a transmission
the command HELO. with the command EHLO (Extended
HELLO).

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.
Disadvantages of SMTP
 SMTP's common port can be blocked by several firewalls.
 SMTP security is a bigger problem.
 Its simplicity restricts how useful it can be.
 Just 7-bit ASCII characters can be used.
 If a message is longer than a certain length, SMTP servers may reject the
entire message.
 Delivering your message will typically involve additional back-and-forth
processing between servers, which will delay sending and raise the
likelihood that it won't be sent.
SMTP vs POP vs IMAP
SMTP POP IMAP

Stands for Internet


Stands for Simple mail transfer Stands for Post
Message Access
protocol Office Protocol.
Protocol.

Used for retrieving Used for retrieving


Used for sending mail.
mail. mail.

it is push protocol. it is pull protocol. it is pull protocol.

It work between sender’s mail It work between


It works between
server to receiver’s mail server receiver and
receiver and receiver’s
and sender and sender’s mail receiver’s mail
mail server.
server. server.

It download all the It store all mail on


It does not store mail on server it mail when it server and download
just send the mail. connected to when it get request to
internet. download.

Works on TCP port Works on TCP port


Works on TCP port number 25.
number 110. number 143.

Connection Connection oriented


Connection oriented protocol.
oriented protocol. protocol.

It has persistence TCP It has persistence It has persistence TCP


connection. TCP connection. connection.
SMTP POP IMAP

Stateless protocol. Stateful protocol. Stateful protocol.

It is in band
It is in band protocol. It is in band protocol.
protocol.

Used at receiver
Not used at receiver side. Used at receiver side.
side.

OR
Q.5 (a) Explain bit stuffing with appropriate
example.07
Bit stuffing is a technique used in computer networks to ensure data is transmitted
correctly. The data link layer is responsible for framing, which is the division of a
stream of bits from the network layer into manageable units (called frames).
Frames could be of fixed size or variable size. In variable-size framing, we need a
way to define the end of the frame and the beginning of the next frame. A Bit
stuffing is the insertion of non-information bits into data. Note that stuffed bits
should not be confused with overhead bits. Overhead bits are non-data bits that
are necessary for transmission (usually as part of headers, checksums, etc.).
What is Bit Stuffing?
Bit stuffing is a method used in data communication to avoid confusion between
data and special control signals (like start or end markers). When a specific
sequence of bits appears in the data an extra bit is added to break the pattern. This
prevents the receiver from mistaking the data for control information. Once the
data is received the extra bit is removed restoring the original message. This
technique helps ensure accurate data transmission.
What is Byte Stuffing?
Byte stuffing is the same as bit stuffing the only difference is that instead of a
single bit, one byte of data is added to the message to avoid confusion between
data and special control signals. This ensures accurate message transmission
without misinterpreting the data.
How Bit Stuffing Work?
Below are the working of bit stuffing in computer network:
 Sender Side: While sending data if the sender detects a sequence of bits that
matches a special control pattern like five consecutive 1s it inserts an extra
bit usually a 0 into the data stream to break the sequence.
 Receiver Side: The receiver gets the data and removes the extra stuffed bit
whenever it detects a specific bit pattern. This restores the data to its original
form.

Example of bit stuffing


Bit sequence: 110101111101011111101011111110 (without bit stuffing)
Bit sequence: 110101111100101111101010111110110 (with bit stuffing)

After 5 consecutive 1-bits, a 0-bit is stuffed. Stuffed bits are marked bold.
Applications of Bit Stuffing
1. Synchronize several channels before multiplexing.
2. Rate-match two single channels to each other.
3. Run length limited coding.
Run length limited coding : To limit the number of consecutive bits of the same
value(i.e., binary value) in the data to be transmitted. A bit of the opposite value is
inserted after the maximum allowed number of consecutive bits.
Bit stuffing technique does not ensure that the sent data is intact at the receiver side
(i.e., not corrupted by transmission errors). It is merely a way to ensure that the
transmission starts and ends at the correct places.
Advantages of Bit Stuffing
 Data Integrity: Bit stuffing helps ensure that the data is transmitted
accurately without confusion between data and control signals. This prevents
errors in message interpretation.
 Error Prevention: By adding extra bits bit stuffing reduces the chances of
misidentifying special bit patterns which can lead to data loss or corruption.
 Flexible Data Handling: Bit stuffing allows networks to handle various
data types without needing complex encoding schemes making the
transmission process simpler.
 Compatibility: It works well with existing communication protocols
allowing for easy integration into systems that use bit-oriented protocols.
 Easy Decoding: The technique is straightforward for receivers to implement
as they simply need to look for the stuffed bits and remove them during data
processing.
Disadvantages of Bit Stuffing
 Increased Data Size: Bit stuffing adds extra bits to the data stream which
increases the overall size of the transmitted data leading to a slight increase
in bandwidth usage.
 More Processing: Both the sender and receiver need to process the data for
bit stuffing and removal which can add complexity to the communication
system.
 Reduced Efficiency: In situations where many bits are stuffed the overhead
can reduce the overall efficiency of the data transmission.
 Limited to Specific Protocols: Bit stuffing is primarily used in bit-oriented
protocols and may not be suitable for all types of communication systems.
 Latency: The added processing and extra bits might introduce
small delays in data transmission especially in systems where speed is
critical.
Conclusion
In conclusion, bit stuffing is an essential technique in computer networks that helps
maintain data integrity during transmission. By adding extra bits to avoid
confusion with special control sequences it ensures that the receiver accurately
interprets the message. This method enhances the reliability of data communication
making it easier to manage and understand the information being sent across
networks.

(b) Explain distance vector routing algorithm. 07


Distance Vector Routing (DVR) Protocol is a method used by routers to find the
best path for data to travel across a network. Each router keeps a table that shows
the shortest distance to every other router, based on the number of hops (or steps)
needed to reach them. Routers share this information with their neighbors,
allowing them to update their tables and find the most efficient routes. This
protocol helps ensure that data moves quickly and smoothly through the network.
What is the Distance Vector Routing Algorithm?
The protocol requires that a router inform its neighbors of topology changes
periodically. Historically known as the old ARPANET routing algorithm (or known
as the Bellman-Ford algorithm).
Bellman-Ford Basics
Each router maintains a Distance Vector table containing the distance between
itself and All possible destination nodes. Distances, based on a chosen metric, are
computed using information from the neighbors' distance vectors.
Information kept by DV router:

 Each router has an ID


 Associated with each link connected to a router,
there is a link cost (static or dynamic).
 Intermediate hops

Distance Vector Table Initialization:


 Distance to itself = 0
 Distance to ALL other routers = infinity number.
covers these protocols extensively.
How Distance Vector Algorithm works?
 Arouter transmits its distance vector to each of its neighbors in a routing
packet.
 Each router receives and saves the most recently received distance vector
from each of its neighbors.
 A router recalculates its distance vector when:
o It receives a distance vector from a neighbor containing different
information than before.
o It discovers that a link to a neighbor has gone down.
The DV calculation is based on minimizing the cost to each destination
Dx(y) = Estimate of least cost from x to y
C(x,v) = Node x knows cost to each neighbor v
Dx = [Dx(y): y ? N ] = Node x maintains distance vector
Node x also maintains its neighbors' distance vectors
– For each neighbor v, x maintains Dv = [Dv(y): y ? N ]
Note:
 From time-to-time, each node sends its own distance vector estimate to
neighbors.
 When a node x receives new DV estimate from any neighbor v, it saves v’s
distance vector and it updates its own DV using B-F equation:
Dx(y) = min { C(x,v) + Dv(y), Dx(y) } for each node y ? N
Example :
Consider 3-routers X, Y and Z as shown in figure. Each router have their routing
table. Every routing table will contain distance to the destination nodes.

Consider router X , X will share it routing table to neighbors and neighbors will
share it routing table to it to X and distance from node X to destination will be
calculated using bellmen- ford equation.
Dx(y) = min { C(x,v) + Dv(y)} for each node y ? N
As we can see that distance will be less going from X to Z when Y is intermediate
node(hop) so it will be update in routing table X.

Similarly for Z also -

Finally the routing table for all -


Applications of Distance Vector Routing Algorithm
The Distance Vector Routing Algorithm has several uses:
 Computer Networking : It helps route data packets in networks.
 Telephone Systems : It's used in some telephone switching systems.
 Military Applications : It has been used to route missiles.
Advantages of Distance Vector routing
 Shortest Path : Distance Vector Routing finds the shortest path for data to
travel in a network.
 Usage : It is used in local, metropolitan, and wide-area networks.
 Easy Implementation : The method is simple to set up and doesn't require
many resources.
Disadvantages of Distance Vector Routing Algorithm
 It is slower to converge than link state.
 It is at risk from the count-to-infinity problem.
 It creates more traffic than link state since a hop count change must be
propagated to all routers and processed on each router. Hop count updates
take place on a periodic basis, even if there are no changes in thenetwork
topology , so bandwidth -wasting broadcasts still occur.
 For larger networks, distance vector routing results in larger routing tables
than link state since each router must know about all other routers. This can
also lead to congestion onWAN links.

Applications:
Used in early Internet protocols (e.g., RIP), telephone networks, and military
routing systems.

Conclusion:
Distance Vector Routing is a foundational algorithm that enables routers to find the
shortest path by sharing route information with neighbors. Though simple and
widely used, it has limitations that have led to the development of more advanced
routing protocols.

WINTER-2022
Q.5 (a) Explain infrastructure mode and Ad-hoc mode
in 802.11 networks. 07
Infrastructure Mode
 Definition:
Infrastructure mode is the most common Wi-Fi setup where wireless devices
communicate with each other through a central device called an Access
Point (AP) or wireless router.
 How it works:
o Wireless clients (laptops, smartphones, etc.) connect to the AP.
o The AP manages network traffic, coordinates communication, and
connects wireless clients to the wired network (like the internet).
o The AP acts as a bridge between wireless devices and the wired LAN.
 Use cases:
o Home Wi-Fi networks with a wireless router.
o Enterprise networks with multiple APs providing seamless coverage.
o When you want centralized management, security controls, and
internet access.
 Advantages:
o Better scalability — many clients can connect through one AP.
o Supports roaming between APs.
o Easier to manage and secure.
o Provides internet or LAN connectivity.

Ad-Hoc Mode (also called Independent Basic Service Set, IBSS)


 Definition:
Ad-hoc mode is a decentralized wireless network mode where devices
communicate directly with each other without any AP or central device.
 How it works:
o Each wireless device connects directly to other devices.
o Devices create a peer-to-peer network.
o There is no infrastructure; devices self-organize and communicate
directly.
 Use cases:
o Temporary or small networks where no AP is available.
o File sharing between laptops without internet or router.
o Emergency or on-the-fly networking.
 Advantages:
o Simple and quick to set up.
o No need for infrastructure or AP.
o Useful in isolated environments or small groups.
 Disadvantages:
o Limited range and number of devices.
o No centralized control, so harder to secure.
o No connection to wired networks or the internet unless one device
shares it manually.

Summary Table
Feature Infrastructure Mode Ad-Hoc Mode
Central device Access Point (AP) None (peer-to-peer)
Network structure Star topology Mesh (peer-to-peer)
Connectivity Through AP to wired network Direct device-to-device
Scalability Supports many devices Limited devices
Management Centralized via AP Decentralized
Feature Infrastructure Mode Ad-Hoc Mode

Use case Home/enterprise Wi-Fi networks Temporary, small networks

(b) Draw architecture of WWW and Explain HTTP


query and response. 07
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 abd.com server, the browser follows the
hyperlink by sending a message to the abd.com 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 abd.com, the browser follows the
hyperlink by sending a message to the abd.com 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 Internet is used to connect a


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

Internet used protocols such


WWW used protocols such as HTTP
as TCP/IP

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

It is a service contained inside an There is a entire infrastructure


infrastructure. in 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.
Explanation of HTTP Query (Request) and Response
HTTP Requests
HTTP Requests are the message sent by the client to request data from the server
or to perform some actions. Different HTTP requests are:
 GET: GET request is used to read/retrieve data from a web server. GET
returns an HTTP status code of 200 (OK) if the data is successfully retrieved
from the server.
 POST: POST request is used to send data (file, form data, etc.) to the server.
On successful creation, it returns an HTTP status code of 201.
 PUT: A PUT request is used to modify the data on the server. It replaces the
entire content at a particular location with data that is passed in the body
payload. If there are no resources that match the request, it will generate one.
 PATCH: PATCH is similar to PUT request, but the only difference is, it
modifies a part of the data. It will only replace the content that you want to
update.
 DELETE: A DELETE request is used to delete the data on the server at a
specified location.
Now, let's understand all of these request methods by example. We have set up a
small application that includes a NodeJS server and MongoDB database. NodeJS
server will handle all the requests and return back an appropriate response.
Project Setup and Modules Installation
Step 1: To start a NodeJS application, create a folder called RestAPI and run the
following command.
npm init -y
Step 2: Using the following command, install the required npm packages.
npm install express body-parser mongoose
Step 3: In your project directory, create a file called index.js.
Project Structure:
Our project directory should now look like this.
1. HTTP Request (Query)
When you enter a URL in your browser or click a link:
 The browser sends an HTTP request to the web server hosting the website.
 This request contains:
o Request line: Method (GET, POST, etc.), URL path, HTTP version
e.g., GET /index.html HTTP/1.1
o Headers: Metadata like User-Agent, Accept types, Host, Cookies, etc.
o Optional body: Data sent to server (usually with POST or PUT)
Example HTTP Request (GET):
GET /index.html HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0
Accept: text/html

2. HTTP Response
The web server processes the request and sends back an HTTP response:
 This response contains:
o Status line: HTTP version, status code, and status message
e.g., HTTP/1.1 200 OK
o Headers: Metadata like Content-Type, Content-Length, Set-Cookie,
etc.
o Body: The actual content requested (HTML, JSON, image, etc.)
Example HTTP Response:
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 1256

<html>
<head><title>Example</title></head>
<body>
<h1>Welcome to Example</h1>
</body>
</html>

Summary of HTTP Interaction:


1. Browser sends HTTP Request to server.
2. Server receives request, processes it.
3. Server sends back HTTP Response with requested content or an error.
4. Browser renders content or handles the error accordingly.

OR
(a) Describe Utopian Simplex Protocol. 07
We will consider a protocol that is simply because it does not worry about the
possibility of anything going wrong. Data are transmitted in one direction only.
Both transmitting and receiving network layers are always ready. Processing time
can be ignored. Infinite buffer space is available. This thoroughly unrealistic
protocol, which we will nickname "Utopia", is simply to show the basic structure
on which we will build. Its implementation is shown below.
Utopian simplex Protocol: There is one direction of data transmission only from
sender to receiver. Here we assume the communication channel to be error-free and
the receiver will infinitely quickly process the input. The sender pumps out the data
onto the line as fast as it can.
typedef enum {frame_arrival} event_type;

#include"protocol.h"

void sender1(void)
{
frame s; /* buffer for an outbound frame */
packet buffer; /* buffer for an outbound packet */
while(true)
{
from_network_layer(&buffer); /* go get something to send */
s.info=buffer; /* copy it into s for transmission */
to_physical_layer(&s); /* send it on its way */
}
}

void receiver1(void)
{
frame r;
event_type event; /* filled in by wait, but not used here */
while(true)
{
wait_for_event(&event); /* only possibility is frame_arrival */
from_physical_layer(&r); /* go get the inbound frame */
to_network_layer(&r.info); /* pass the data to the network layer */
}
}
This protocol has two different procedures, a sender and a receiver. MAX_SEQ is
not needed because no sequence numbers or acknowledgements are used. The only
event type possible is frame_arrival (i.e. the arrival of an undamaged frame). The
sender pumps out the data in an infinite while loop as fast as it can. The loop body
consists of three actions and they are -
 Fetch a packet from the network layer,
 Construct an outbound frame using the variable s,
 Send the frame on its way.
Other fields have to do with error and flow control and there are no errors or flow
control restrictions here so only the info field is used here. The receiver is equally
simple. The procedure wait_for_event returns when the frame arrives and the event
is set to frame_arrival. The newly arrived frame from the hardware buffer is
removed by the call from_physical_layer and put in the variable r, so that receiver
can get it. The data link layer settles back to wait for the next frame when the data
portion is passed on to the network layer, suspending itself until the frame arrives.
It does not handle either flow control or error correction therefore it is unrealistic.
Properties of Utopian Simplex Protocol:
 The design of Utopian Simplex Protocol is based on 2 procedures i.e. Sender
and Receiver.
 Both Sender and Receiver run in the data link layer but the sender runs in the
data link layer of the source machine while Receiver runs in datalink layer of
the destination machine.
 It is designed for Uni-directional data transmission.
 Sender and receiver are always ready for data processing.
 Both of them have infinite buffer space available.
 The communication links never losses any data frames.
 It is considered as unrealistic as it does not handle flow control or error
correction.
 The protocol assumes that the communication channel is dedicated to the
sender and receiver, and no other device can interfere with the transmission.
 The sender and receiver have the same clock rate, so there is no need for any
synchronization mechanism between them.
 The protocol assumes that the data frames are of fixed size and known to
both sender and receiver.
 There is no need for any addressing mechanism, as the receiver is assumed
to be the only device connected to the channel.
 The protocol does not support retransmission of lost or corrupted frames, as
it assumes that the communication channel never loses any data.
 There is no provision for multiplexing or demultiplexing of data streams, as
the channel is dedicated to a single sender-receiver pair.
 The protocol does not provide any mechanism for detecting errors in the
received data frames, as it assumes that the communication channel is error-
free.
 The protocol is designed for simple, one-way communication scenarios, and
is not suitable for complex, bi-directional data transfers.
(b) What is domain resource record? Explain DNS
resource record types. 07(Repeat)
–WINTER-2023
Q.5 (a) Describe Bluetooth architecture. 07
What is Bluetooth?
Bluetooth is used for short-range wireless voice and data communication. It is a
Wireless Personal Area Network (WPAN) technology and is used for data
communications over smaller distances. This generation changed into being
invented via Ericson in 1994. It operates within the unlicensed, business, scientific,
and clinical (ISM) bands from 2.4 GHz to 2.485 GHz.
Bluetooth stages up to 10 meters. Depending upon the version, it presents
information up to at least 1 Mbps or 3 Mbps. The spreading method that it uses is
FHSS (Frequency-hopping unfold spectrum). A Bluetooth network is called a
piconet and a group of interconnected piconets is called a scatter net.
Bluetooth
Bluetooth is a wireless technology that lets devices like phones, tablets, and
headphones connect to each other and share information without needing cables.
Bluetooth simply follows the principle of transmitting and receiving data
using radio waves. It can be paired with the other device which has also Bluetooth
but it should be within the estimated communication range to connect. When two
devices start to share data, they form a network called piconet which can further
accommodate more than five devices.
Key Features of Bluetooth
 The transmission capacity of Bluetooth is 720 kbps.
 Bluetooth is a wireless technology.
 Bluetooth is a Low-cost and short-distance radio communications standard.
 Bluetooth is robust and flexible.
 The basic architecture unit of Bluetooth is a piconet.
Architecture of Bluetooth
The architecture of Bluetooth defines two types of networks:
Piconet
Piconet is a type of Bluetooth network that contains one primary node called the
master node and seven active secondary nodes called slave nodes. Thus, we can
say that there is a total of 8 active nodes which are present at a distance of 10
meters. The communication between the primary and secondary nodes can be one-
to-one or one-to-many. Possible communication is only between the master and
slave; Slave-slave communication is not possible. It also has 255 parked nodes,
these are secondary nodes and cannot take participation in communication unless it
gets converted to the active state.

Scatternet
It is formed by using various piconets. A slave that is present in one piconet can act
as master or we can say primary in another piconet. This kind of node can receive a
message from a master in one piconet and deliver the message to its slave in the
other piconet where it is acting as a master. This type of node is referred to as a
bridge node. A station cannot be mastered in two piconets.

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 sublayer in LANs. It performs the
connection establishment within a piconet, addressing, packet format, timing
and power control.
 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.
Bluetooth Protocol Stack
Types of Bluetooth
Various types of Bluetooth are available in the market nowadays. Let us look at
them.
 In-Car Headset: One can make calls from the car speaker system without
the use of mobile phones.
 Stereo Headset: To listen to music in car or in music players at home.
 Webcam: One can link the camera with the help of Bluetooth with their
laptop or phone.
 Bluetooth-Equipped Printer: The printer can be used when connected via
Bluetooth with mobile phone or laptop.
 Bluetooth Global Positioning System (GPS): To use Global Positioning
System (GPS) in cars, one can connect their phone with car system via
Bluetooth to fetch the directions of the address.
Applications of Bluetooth
 It can be used in wireless headsets, wireless PANs, and LANs.
 It can connect a digital camera wireless to a mobile phone.
 It can transfer data in terms of videos, songs, photographs, or files from one
cell phone to another cell phone or computer.
 It is used in the sectors of Medical healthcare, sports and fitness, Military.
Advantages
 It is a low-cost and easy-to-use device.
 It can also penetrate through walls.
 It creates an Ad-hoc connection immediately without any wires.
 It is used for voice and data transfer.
Disadvantages
 It can be hacked and hence, less secure.
 It has a slow data transfer rate of 3 Mbps.
 Bluetooth communication does not support routing.
Conclusion
In summary, Bluetooth is a wireless technology that allows devices to connect and
communicate with each other over short distances. It is commonly used for things
like connecting headphones, keyboards, and transferring files between devices.

(b) What are the different approaches for controlling


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

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

Policies adopted by open loop congestion control -

1. Retransmission Policy :
It is the policy in which retransmission of the packets are taken care of. If
the sender feels that a sent packet is lost or corrupted, the packet needs to be
retransmitted. This transmission may increase the congestion in the network.
To prevent congestion, retransmission timers must be designed to prevent
congestion and also able to optimize efficiency.
2. Window Policy :
The type of window at the sender's side may also affect the congestion.
Several packets in the Go-back-n window are re-sent, although some packets
may be received successfully at the receiver side. This duplication may
increase the congestion in the network and make it worse.
Therefore, Selective repeat window should be adopted as it sends the
specific packet that may have been lost.
3. Discarding Policy :
A good discarding policy adopted by the routers is that the routers may
prevent congestion and at the same time partially discard the corrupted or
less sensitive packages and also be able to maintain the quality of a message.
In case of audio file transmission, routers can discard less sensitive packets
to prevent congestion and also maintain the quality of the audio file.
4. Acknowledgment Policy :
Since acknowledgements are also the part of the load in the network, the
acknowledgment policy imposed by the receiver may also affect congestion.
Several approaches can be used to prevent congestion related to
acknowledgment.
The receiver should send acknowledgement for N packets rather than
sending acknowledgement for a single packet. The receiver should send an
acknowledgment only if it has to send a packet or a timer expires.
5. Admission Policy :
In admission policy a mechanism should be used to prevent congestion.
Switches in a flow should first check the resource requirement of a network
flow before transmitting it further. If there is a chance of a congestion or
there is a congestion in the network, router should deny establishing a virtual
network connection to prevent further congestion.
Closed Loop Congestion Control

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

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

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

2. Choke Packet Technique :


Choke packet technique is applicable to both virtual networks as well as datagram
subnets. A choke packet is a packet sent by a node to the source to inform it of
congestion. Each router monitors its resources and the utilization at each of its
output lines. Whenever the resource utilization exceeds the threshold value which
is set by the administrator, the router directly sends a choke packet to the source
giving it a feedback to reduce the traffic. The intermediate nodes through which the
packets has traveled are not warned about congestion.
3. Implicit Signaling :
In implicit signaling, there is no communication between the congested nodes and
the source. The source guesses that there is congestion in a network. For example
when sender sends several packets and there is no acknowledgment for a while,
one assumption is that there is a congestion.

4. Explicit Signaling :
In explicit signaling, if a node experiences congestion it can explicitly send a
packet to the source or destination to inform about congestion. The difference
between choke packet and explicit signaling is that the signal is included in the
packets that carry data rather than creating a different packet as in case of choke
packet technique.
Explicit signaling can occur in either forward or backward direction.
 Forward Signaling : In forward signaling, a signal is sent in the direction of
the congestion. The destination is warned about congestion. The receiver in
this case adopt policies to prevent further congestion.
 Backward Signaling : In backward signaling, a signal is sent in the
opposite direction of the congestion. The source is warned about congestion
and it needs to slow down.
TCP Special Techniques
 Slow Start – Start slow, then speed up.
 AIMD – Add speed slowly, drop speed quickly when jammed.
 Fast Retransmit/Recovery – Fix lost packets quickly.

📶 Network Layer Methods


 Routers manage queues:
o Drop Tail – Drop packets when full.
o RED – Random drops early to warn congestion.
OR
Q.5 (a) Describe Distance Vector routing with count-
to-infinity problem. 07
The main issue with Distance Vector Routing (DVR) protocols is Routing Loops
since Bellman-Ford Algorithm cannot prevent loops. This routing loop in the DVR
network causes the Count to Infinity Problem. Routing loops usually occur when
an interface goes down or two routers send updates at the same time.

Counting to infinity problem:

So in this example, the Bellman-Ford algorithm will converge for each router, they
will have entries for each other. B will know that it can get to C at a cost of 1, and
A will know that it can get to C via B at a cost of 2.

If the link between B and C is disconnected, then B will know that it can no longer
get to C via that link and will remove it from its table. Before it can send any
updates it's possible that it will receive an update from A which will be advertising
that it can get to C at a cost of 2. B can get to A at a cost of 1, so it will update a
route to C via A at a cost of 3. A will then receive updates from B later and update
its cost to 4. They will then go on feeding each other bad information toward
infinity which is called as Count to Infinity problem.
Solution for Count to Infinity problem:-
Route Poisoning:
When a route fails, distance vector protocols spread the bad news about a route
failure by poisoning the route. Route poisoning refers to the practice of advertising
a route, but with a special metric value called Infinity. Routers consider routes
advertised with an infinite metric to have failed. Each distance vector routing
protocol uses the concept of an actual metric value that represents infinity. RIP
defines infinity as 16. The main disadvantage of poison reverse is that it can
significantly increase the size of routing announcements in certain fairly common
network topologies.

Split horizon:
If the link between B and C goes down, and B had received a route from A, B
could end up using that route via A. A would send the packet right back to B,
creating a loop. But according to the Split horizon Rule, Node A does not advertise
its route for C (namely A to B to C) back to B. On the surface, this seems
redundant since B will never route via node A because the route costs more than
the direct route from B to C.
Consider the following network topology showing Split horizon-
 In addition to these, we can also use split horizon with route poisoning were
above both techniques will be used combined to achieve efficiency and less
increase the size of routing announcements.
 Split horizon with Poison reverse technique is used by Routing Information
Protocol (RIP) to reduce routing loops. Additionally, Holddown timers can
be used to avoid the formation of loops. The hold-down timer immediately
starts when the router is informed that the attached link is down. Till this
time, the router ignores all updates of the down route unless it receives an
update from the router of that downed link. During the timer, If the downlink
is reachable again, the routing table can be updated.

(b) Write a note on IPV4. 07(Repeat)


–WINTER-2024
Q.5 (a) Explain E-mail Architecture and Service. 07
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 [email protected].
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.

(b) Explain TSAPs, NSAPs, and transport


connections. 07(repeat)
3. Transport Connection
 This is the logical connection between two TSAPs (i.e., between two apps
on different computers).
 It ensures reliable data transfer, flow control, error checking, etc.
 Managed by Transport Layer protocols like TCP.
Example:
Think of it like a phone call between two specific rooms in two different houses —
not just any call, but one with proper signaling, error correction, and timing.

Quick Analogy:
Concept Analogy OSI Layer
NSAP Address of a house Network Layer
TSAP Room number in the house Transport Layer
Transport Conn. Phone call between two rooms Logical connection (L4)

OR
Q.5 (a) Compare Virtual-Circuit and Datagram
Networks. 07
Difference Between Virtual Circuits and Datagram Networks
Virtual Circuit
Criteria Networks Datagram Networks

Prior to data
transmission, a
Connection No connection setup is
connection is established
Establishment required.
between sender and
receiver.

Routing decisions are


Routing decisions are
made once during
made independently for
connection setup and
Routing each packet and can
remain fixed throughout
vary based on network
the duration of the
conditions.
connection.

Uses explicit flow Uses implicit flow


control, where the control, where the
sender adjusts its rate of sender assumes a certain
Flow Control
transmission based on level of available
feedback from the bandwidth and sends
receiver. packets accordingly.

Uses network-assisted
Uses end-to-end
congestion control,
congestion control,
where routers monitor
where the sender adjusts
Congestion Control network conditions and
its rate of transmission
may drop packets or
based on feedback from
send congestion signals
the network.
to the sender.
Virtual Circuit
Criteria Networks Datagram Networks

Provides reliable
Provides unreliable
delivery of packets by
delivery of packets and
Error Control detecting and
does not guarantee
retransmitting lost or
delivery or correctness.
corrupted packets.

Requires less overhead Requires more overhead


per packet because per packet because each
connection setup and packet contains
Overhead state maintenance are information about its
done only once. destination address and
other routing
information.

Example Protocol ATM, Frame Relay IP (Internet Protocol)

Conclusion
 Another term for virtual circuits is connection-oriented switching. Virtual
circuit switching establishes a predetermined path before a message is sent.
 The path in virtual circuits is called a virtual circuit because it seems to the
user to be a dedicated physical circuit.
 In datagram networks, sometimes referred to as packet-switching
technology, each packet—also known as a datagram—is regarded as an
autonomous entity. The switch uses the destination information included in
each packet to guide the packet to its intended location.
 Reserving resources is not necessary in Datagram Networks since there isn't
a specific channel for connection sessions. Packets now have a header
containing all of the data intended for the destination.
 Datagram networks use first-come, first-serve (FCFS) scheduling to manage
resource distribution.

(b) Explain Name Servers. 07


✅ Definition:
A Name Server is a part of the Domain Name System (DNS) responsible for
translating domain names into IP addresses.

✅ Detailed Explanation:
 Computers communicate over the internet using IP addresses (e.g.,
192.168.1.1).
 Humans use domain names (e.g., example.com) because they are easier to
remember.
 The Name Server is a server that helps resolve (convert) a domain name
into its corresponding IP address.

✅ How It Works:
1. A user enters a domain name in the browser.
2. The request is sent to a recursive resolver (usually provided by the ISP).
3. The resolver queries:
o Root name servers → tell which TLD server to contact.
o TLD (Top-Level Domain) name servers → e.g., for .com, .org.
o Authoritative name server → stores the actual IP address for the
domain.
4. The IP address is returned to the user's browser.
5. The browser connects to the server using the IP address to load the website.
✅ Types of Name Servers:
Type Role
Root Name Server Points to the TLD name servers (.com, .org, etc.)
Points to the authoritative name servers of specific
TLD Name Server
domain names
Authoritative Name Holds actual DNS records like A, AAAA, MX for a
Server domain

✅ Important Terms:
 DNS – Domain Name System, the protocol that uses name servers.
 IP Address – Unique address of a device on the internet.
 Domain Name – Human-readable name mapped to an IP.

✅ Example:
For www.google.com:
1. The resolver asks the root name server → gets .com TLD server.
2. Asks .com TLD server → gets Google's authoritative name server.
3. Asks the authoritative server → gets IP address like 142.250.195.36.
4. Browser uses this IP to open the site.

You might also like