0% found this document useful (0 votes)
17 views30 pages

Endsem

Uploaded by

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

Endsem

Uploaded by

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

Q1) mention 3 types guided transmission media .

Give a detailed description about each of them

ANS) Twisted Pair Cable

What it is:
Twisted pair cable features pairs of copper wires that are insulated and twisted together. This design
helps cut down on interference from other signals. It’s widely used for sending both analog and
digital signals.

Types:
Unshielded Twisted Pair (UTP): This type doesn’t have extra shielding and is affordable, making it
ideal for everyday uses like Ethernet connections.

Shielded Twisted Pair (STP): Here, there’s an added metallic shield that offers better protection
against interference, but it comes at a higher price.

Pros:
Affordable and lightweight.

Simple to install and easy to take care of.

Works well with many protocols, including Ethernet and DSL.

Cons:
Can easily pick up interference in noisy areas.

Has limits on bandwidth and how far it can effectively transmit signals compared to other types of
cables.

Uses:
Local Area Networks (LANs).

Telephone connections.

Coaxial Cable
What it is:
Coaxial cable has a central conductor, usually made of copper, which is surrounded by insulation, a
metal shield, and another layer of protective insulation. This design makes it really good at resisting
interference and supports high-frequency signals.

Components:
Core Conductor: This part carries the data.

Dielectric Insulator: Keeps everything spaced out evenly.

Shielding: Protects against interference.

Outer Jacket: Provides physical protection.

Pros:
Offers a high capacity for bandwidth.

Very resistant to noise and other interferences.

Good for both analog and digital signals.

Cons:
Heavier and not as flexible as twisted pair cables.

Installation can be more expensive.

Uses:
Cable television networks.

Broadband internet connections.

Long-distance phone calls.

Optical Fiber Cable


What it is:
An optical Fiber cable transmits information using light signals through glass or plastic strands. It is
great for high bandwidth, long-distance data transfer, and is immune to interference from
electromagnetic sources.

Components:
Core: This is where the light travels.

Cladding: Surrounds the core, reflecting the light back in.

Buffer Coating: Offers protection from physical harm.

Types:
Single-Mode Fiber: Designed for long-distance and high-speed transmission using a single light path.

Multi-Mode Fiber: Allows multiple light paths, making it suitable for shorter distances.

Pros:
Can handle extremely high speeds when transmitting data.

Resistant to electrical and radio interference.

Can send data over long distances without losing much signal.

Cons:
Can be costly to install and maintain.

Delicate and needs to be handled with care.

Uses:
Internet backbone and wide-area networks (WANs).
High-speed connections in businesses.

Medical imaging and sensor applications.

Q2)What are the different kinds of computing network delays?

ANS) 1) Propagation Delay

 Definition: The time it takes for a signal to travel from the sender to the receiver across the
physical medium.

Factors:

 Distance between sender and receiver.

 Type of transmission medium (e.g., fiber optic, copper cable).

Example: A signal traveling 3000 km through a fiber optic cable (propagation speed
~200,000 km/s) will have a delay of about 15 ms.

2)Transmission Delay

 Definition: The time required to push all the bits of a packet onto the transmission medium.

Factors:

 Packet size.

 Bandwidth of the link.

Example: Transmitting a 1 MB packet over a 100 Mbps link would take approximately 0.08
seconds.

Processing Delay

 Definition: The time taken by a router or switch to process a packet header, check errors, and
determine the next hop.

 Factors:

o Router/switch processing speed.

o Packet complexity.

 Example: A high-performance router might have a processing delay of microseconds, while a


low-performance one could take milliseconds.

4. Queuing Delay
 Definition: The time a packet spends waiting in the queue of a router or switch before being
transmitted.

 Factors:

o Network congestion.

o Queue length.

o Priority of the packet (if QoS is applied).

 Example: During peak traffic, queuing delays can range from milliseconds to seconds.

5. Retransmission Delay

 Definition: The delay caused by the retransmission of packets that were lost or corrupted
during transmission.

 Factors:

o Network congestion.

o Quality of the transmission medium.

 Example: A packet lost due to network congestion in a TCP connection will trigger
retransmission, causing additional delay.

6. Serialization Delay

 Definition: The time taken to serialize a packet for transmission.

 Factors:

o Packet size.

o Line speed of the transmission medium.

 Example: Similar to transmission delay, serialization delay is significant for large packets over
low-speed links.

7. Jitter

 Definition: Variability in packet delays, often affecting real-time applications like VoIP or
video streaming.

 Factors:

o Variations in queuing, processing, and propagation delays.

 Example: A packet that should take 50 ms might take 70 ms due to queuing, causing jitter.

8. Server or Application Delay


 Definition: Delays introduced by the server or application processing a request or response.

 Factors:

o Server workload.

o Application efficiency.

 Example: A slow database query might add significant delay to a web application.

These delays can combine to affect the overall performance of a network, often referred to as the
End-to-End Delay:

End-to-End Delay=Propagation Delay+ Transmission Delay+ Processing Delay+ Queuing Delay

Q3)Find propagation delay if a packet is sent through an optical fiber and the distance
between source and destination is 10000km

ANS)

Q4)Find the transmission delay if the bandwidth is 20Mbps and the number of bytes in the packet
is 6000

ANS)
Q5)List all the seven layers of the OSI 7 layer model and describe each of the layer

ANS) 1. Physical Layer (Layer 1)

 Function: Deals with the physical connection between devices and the transmission of raw
binary data (0s and 1s) over the network medium.

 Key Responsibilities:

o Transmission and reception of data as electrical, optical, or radio signals.

o Definition of hardware specifications (e.g., cables, connectors, voltages).

o Bit synchronization and line coding.

 Examples: Ethernet cables, fiber optics, hubs, switches.

2. Data Link Layer (Layer 2)


 Function: Ensures reliable data transfer across the physical link by detecting and correcting
errors in transmitted frames.

 Key Responsibilities:

o Framing: Encapsulates data packets into frames.

o Error detection and correction (e.g., CRC).

o Flow control and access control (e.g., determining who can use the medium).

o Logical Link Control (LLC) and Media Access Control (MAC) sublayers.

 Examples: MAC addresses, switches, bridges.

3. Network Layer (Layer 3)

 Function: Handles routing, addressing, and delivery of data across multiple networks.

 Key Responsibilities:

o Logical addressing (e.g., IP addresses).

o Routing data packets between devices across different networks.

o Fragmentation and reassembly of packets.

 Examples: Routers, IPv4/IPv6, ICMP.

4. Transport Layer (Layer 4)

 Function: Provides reliable or unreliable delivery of data with error recovery and flow
control.

 Key Responsibilities:
o Segmentation and reassembly of data.

o End-to-end error detection and correction.

o Flow control to prevent congestion.

o Differentiates between TCP (reliable) and UDP (unreliable) transport.

 Examples: TCP, UDP.

5. Session Layer (Layer 5)

 Function: Manages sessions or connections between applications, ensuring


synchronization and orderly data exchange.

 Key Responsibilities:

o Establishment, maintenance, and termination of sessions.

o Session checkpoints and recovery.

o Dialog control (e.g., full-duplex or half-duplex communication).

 Examples: APIs, RPC (Remote Procedure Call).

6. Presentation Layer (Layer 6)

 Function: Translates, encrypts, and compresses data for the application layer.

 Key Responsibilities:

o Data translation (e.g., converting between different data formats).

o Data encryption and decryption (e.g., SSL/TLS).

o Data compression and decompression.

 Examples: SSL, JPEG, GIF, ASCII, EBCDIC.

7. Application Layer (Layer 7)

 Function: Provides interfaces and services directly to end-users for network


communication.

 Key Responsibilities:

o Enabling user interactions with network applications.

o Identifying communication partners and resource availability.

o Protocols for specific applications (e.g., HTTP for web browsing).

 Examples: HTTP, FTP, SMTP, DNS, SNMP.


Q6)What is congestion? Describe the TCP congestion control mechanism. Distinguish between
congestion control and flow control . How is flow control achieved?

ANS) Congestion occurs in a network when the demand for resources (e.g., bandwidth, buffer space)
exceeds the available capacity, leading to performance degradation such as increased delays, packet
loss, or throughput reduction. Congestion is typically caused by excessive traffic, slow links, or limited
buffer capacity in network devices like routers and switches.

TCP Congestion Control Mechanism

TCP employs a congestion control mechanism to maintain network stability and prevent
congestion collapse. The mechanism is based on the concept of congestion window (cwnd) and
involves the following four phases:

1. Slow Start

 Initially, TCP starts with a small congestion window (usually 1 Maximum Segment Size,
MSS).

 For every acknowledgment (ACK) received, the congestion window size increases
exponentially (doubles each round trip time, RTT).

 This continues until the congestion window reaches a threshold called the slow start
threshold (ssthresh).

2. Congestion Avoidance

 After reaching ssthresh\text{ssthresh}ssthresh, TCP switches to linear growth:

o Congestion window increases by 1 MSS for every RTT.

 This avoids overwhelming the network with too much traffic.

3. Congestion Detection and Recovery

 Congestion is detected when:

o A packet loss occurs (indicated by a timeout or duplicate ACKs).

 TCP reacts by:

o Reducing ssthresh\text{ssthresh}ssthresh to half the current congestion window


size.

o Resetting cwnd\text{cwnd}cwnd to 1 MSS (in case of timeout) or halving it (if


duplicate ACKs are received).

4. Fast Retransmit and Fast Recovery

 Upon receiving three duplicate ACKs (indicating likely packet loss):

o TCP retransmits the lost packet without waiting for a timeout (fast retransmit).

o Instead of entering slow start, it uses the fast recovery mechanism:

 cwnd\text{cwnd}cwnd is halved, and TCP enters congestion avoidance


mode directly.
Flow control ensures that the sender does not transmit more data than the receiver can process. In
TCP, this is achieved using a sliding window mechanism:

1. Receiver Advertised Window (rwnd):

o The receiver specifies the amount of buffer space it has available in the TCP
header.

o The sender adjusts its transmission rate to ensure it does not exceed rwnd.

2. Sliding Window Protocol:

o The sender maintains a window of unacknowledged packets.

o As ACKs are received, the window slides forward, allowing the sender to transmit
more data.

3. Zero Window Advertisement:


o If the receiver's buffer is full, it advertises a window size of zero, stopping the
sender from transmitting further data.
Q7)what are topologies ? Explain each topology with advantages & disadvantages and
comparison of topologies.

ANS) In networking, topology refers to the arrangement or layout of devices (nodes) and their
connections in a network. It describes the physical or logical structure of the network and influences
its performance, scalability, and fault tolerance.

Types of Topologies

1. Bus Topology

 Description: All devices are connected to a single central cable (the bus).

 Advantages:

o Easy to implement and extend.

o Cost-effective for small networks.

 Disadvantages:

o Single point of failure (if the bus fails, the entire network goes down).

o Limited bandwidth shared among all devices.


o Troubleshooting can be difficult.

 Example Use: Small office setups.

2. Star Topology

 Description: All devices are connected to a central device (hub or switch).

 Advantages:

o Easy to manage and troubleshoot (faults can be isolated easily).

o High performance due to dedicated connections to the hub/switch.

 Disadvantages:

o Central point of failure (hub or switch failure affects the entire network).

o Expensive due to cabling and the central device.

 Example Use: Modern LAN setups.

3. Ring Topology

 Description: Devices are connected in a circular fashion, with each device having two
neighbors.

 Advantages:

o Easier to identify faults due to predictable data flow.

o Equal access to the network (no collisions).

 Disadvantages:

o A single failure in the ring can disrupt the entire network.

o Adding or removing devices disrupts the network.

 Example Use: Token Ring networks.

4. Mesh Topology

 Description: Each device is connected to every other device directly.

 Advantages:

o High reliability and fault tolerance (multiple redundant paths).

o Excellent for networks requiring high data throughput and availability.

 Disadvantages:

o Expensive and complex to set up due to cabling and ports.


o Hard to scale for large networks.

 Example Use: WANs, military applications.

5. Tree Topology

 Description: A hierarchical structure combining characteristics of star and bus topologies.

 Advantages:

o Scalable (easier to add new nodes).

o Centralized control and troubleshooting.

 Disadvantages:

o Central point of failure for each branch.

o Expensive due to extensive cabling.

 Example Use: Corporate networks with layered architectures.

6. Hybrid Topology

 Description: A combination of two or more topologies (e.g., star-ring, star-bus).

 Advantages:

o Flexible and scalable.

o Can be designed to meet specific needs.

 Disadvantages:

o Complex to design and manage.

o High cost due to varied components.

 Example Use: Large enterprise networks.

Q8)what are the services providing by the network layer to the transport layer in the OSI model?
ANS) The Network Layer (Layer 3) in the OSI model provides essential services to the Transport
Layer (Layer 4) to facilitate end-to-end data communication. These services ensure that the
transport layer can deliver data reliably and efficiently between devices across a network.

Services Provided by the Network Layer

1. Logical Addressing

 Purpose: Provides unique network addresses (e.g., IP addresses) to identify devices in the
network.

 How It Helps: Ensures that the transport layer can send data to the correct destination
device, even across different networks.

2. Routing

 Purpose: Determines the optimal path for data packets to travel from the source to the
destination.

 How It Helps: Ensures efficient delivery of data across complex networks by avoiding
congestion and minimizing delays.

3. Packet Forwarding

 Purpose: Transmits packets through intermediate devices (e.g., routers) until they reach
the destination.

 How It Helps: Allows data to traverse multiple networks and reach devices not directly
connected.

4. Fragmentation and Reassembly

 Purpose: Breaks down large data packets into smaller fragments that fit within the
Maximum Transmission Unit (MTU) of the underlying network.
 How It Helps: Ensures compatibility with different networks and reassembles the
fragments at the destination for proper delivery.

5. Error Handling

 Purpose: Detects and, in some cases, corrects errors in transmitted packets (e.g., using
checksum or parity bits).

 How It Helps: Improves the reliability of data transmission, ensuring that the transport
layer receives accurate data.
6. Quality of Service (QoS)

 Purpose: Prioritizes certain types of traffic (e.g., voice or video) over others to ensure
timely delivery.

 How It Helps: Provides guarantees for bandwidth, latency, and packet loss, supporting real-
time applications.

7. Connectionless and Connection-Oriented Communication

 Connectionless Service: Uses a datagram-based approach (e.g., IP), where packets are sent
independently without establishing a connection.

o Example Protocols: IPv4, IPv6.

 Connection-Oriented Service: Establishes a virtual circuit for reliable data delivery (e.g.,
X.25, MPLS).

o How It Helps: Supports the transport layer’s requirements for different


communication models.

8. Traffic Control

 Purpose: Manages network congestion by controlling the flow of packets.

 How It Helps: Prevents packet loss and delays, improving overall network performance.

Q9)Write a simple TCP Client-server application in python that prints a single message onto the
clients screen Program the client to be able to shut down the server given a password.

ANS)
Q10)What is routing? Describe two common routing algoithms.

ANS) Routing is the process of selecting a path for data to travel across a network from the source
to the destination. Routers are responsible for determining the best possible route for packets,
taking into consideration factors like network topology, traffic, bandwidth, and other constraints.
Routing is an essential part of ensuring efficient, reliable, and scalable data communication in
networks, particularly in large-scale networks like the Internet.

There are two main types of routing:

 Static Routing: Routes are manually configured and do not change unless manually
modified.

 Dynamic Routing: Routes are automatically updated based on the network's changing
conditions, like network failures or topology changes.

Two Common Routing Algorithms

1. Distance-Vector Routing Algorithm

Overview:

o In a Distance-Vector routing algorithm, each router maintains a table (or vector)


that lists the cost to reach every other router in the network. Each entry in the
table contains the destination network and the distance to that network, where
"distance" typically represents the number of hops (routers) between the source
and destination.

o The algorithm works by having each router periodically send its entire routing
table to its directly connected neighbors. Neighbors then update their own tables
based on this information.

Key Characteristics:

o Routing Tables: Each router maintains a table with the best known distance to each
destination network.
o Bellman-Ford Algorithm: Often used to compute the best routes based on the
distance vector.

o Periodic Updates: Each router shares its routing table with its neighbors
periodically, allowing for updates in case of changes in the network topology.

Advantages:

o Simple to implement.

o Requires only a limited amount of memory and processing power.

Disadvantages:

o Convergence can be slow (i.e., it may take time for all routers to learn about
changes in the network).

o Count-to-Infinity Problem: When a router loses its connection to a destination,


other routers may incorrectly increment the distance to that destination
indefinitely, leading to routing loops.

Example: RIP (Routing Information Protocol) is a well-known protocol that uses the Distance-
Vector algorithm.

Example Process:

o Router A knows that the best route to Network X is through Router B and has a
distance of 2 hops.

o Router B may advertise its own table, which might indicate that Network X is 3
hops away through Router C.

o Router A updates its table and chooses the better route (2 hops via Router B).

2. Link-State Routing Algorithm

Overview:

o In a Link-State routing algorithm, each router has a complete view of the network
topology. Every router independently discovers the network's topology by sending
out Link-State Advertisements (LSAs), which include information about the router's
directly connected links and their costs (e.g., bandwidth, delay).

o After collecting the LSAs from all routers, each router constructs a complete
topology of the network, allowing it to calculate the shortest path to each
destination using a Shortest Path First (SPF) algorithm like Dijkstra's Algorithm.

Key Characteristics:
o Link-State Advertisements (LSAs): Routers periodically broadcast information
about their links (e.g., link status and cost) to all other routers in the network.

o Network Topology: Each router has a complete picture of the entire network.
o Dijkstra’s Algorithm: Used to compute the shortest path tree from the router to all
other destinations in the network.

Advantages:

o Faster convergence compared to Distance-Vector algorithms.

o More scalable and less prone to routing loops.

o Provides more accurate and up-to-date network information since routers have
complete topology knowledge.

Disadvantages:

o Requires more memory and computational resources since each router needs to
store the entire network's topology.

o Flooding LSAs across the network can generate significant traffic.

Example: OSPF (Open Shortest Path First) is a popular protocol based on the Link-State algorithm.

Example Process:

o Router A sends LSAs to all routers in the network, detailing its link status.

o Router B and other routers receive these LSAs, update their network topology
maps, and use Dijkstra's algorithm to compute the best paths.

o Once the calculation is complete, each router can forward packets along the
shortest available path.
ANS) To compute the shortest paths using the Distance Vector Algorithm, we will iteratively update
the distance vectors for each node in the network until convergence. Below is a step-by-step process
for the given network.

Step 1: Initialization

 Each node initializes its distance vector such that:

o The distance to itself is 000.

o The distance to directly connected neighbors is the weight of the edge.

o The distance to all other nodes is initially set to ∞.

Let the nodes be A,B,C,D,E,F, and the weights are based on the diagram.
(a) HTTP (HyperText Transfer Protocol):

 Definition: HTTP is a protocol used for transferring hypertext (web pages) on the World
Wide Web.

 Functionality: It operates on a request-response model where a client (e.g., a web


browser) sends a request to a server, and the server responds with resources (e.g., HTML,
images).

 Port: It typically uses port 80.

 Versions: Common versions include HTTP/1.1, HTTP/2, and HTTP/3.

 Secure Version: HTTPS (HyperText Transfer Protocol Secure) uses encryption (via SSL/TLS)
for secure communication.

(b) FTP (File Transfer Protocol):


 Definition: FTP is a protocol used for transferring files between a client and a server over a
network.

 Functionality:

o Supports uploading and downloading files.


o Can be accessed via command-line or GUI-based FTP clients.

 Ports: Uses port 21 for control commands and port 20 for data transfer.

 Modes:

o Active Mode: The server initiates the data connection.

o Passive Mode: The client initiates the data connection.

 Secure Version: FTPS or SFTP are used for secure file transfers.

(c) Tunneling:

 Definition: Tunneling is a method of transmitting data securely across a public network by


encapsulating the data packets in another protocol.

 Functionality:

o Often used in VPNs (Virtual Private Networks) to provide secure communication.

o It allows incompatible protocols to work together by wrapping data in a


compatible protocol.

 Common Protocols: SSH (for secure tunnels), GRE, and IPsec.

 Usage: Frequently used for bypassing firewalls, accessing blocked content, and securing
data transmission.

(d) Network Security:

 Definition: Network security refers to practices, tools, and policies designed to protect a
network and its data from unauthorized access, attacks, or damage.

 Key Components:

o Firewalls: Monitor and control incoming and outgoing traffic.

o Encryption: Protects data during transmission.

o Antivirus/Antimalware: Prevents malicious software attacks.

o Access Control: Ensures only authorized users can access network resources.

 Threats: Includes phishing, ransomware, denial of service (DoS) attacks, and man-in-the-
middle attacks.

 Best Practices:

o Implementing multi-factor authentication (MFA).

o Regularly updating software and applying patches.

o Educating users on cybersecurity.


Q) Write short note on
a. linked technology
b. cellular communication

c. worldwide web
d. optical fibre
e. satellite communication
ANS) Here are brief notes on the given topics:

(a) Link Technologies:

 Definition: Link technologies refer to the methods and hardware used to establish
communication links between devices in a network.

 Types:

o Wired Technologies: Ethernet (LAN), DSL, and cable connections.

o Wireless Technologies: Wi-Fi, Bluetooth, Zigbee, and cellular networks.

 Functionality: They enable data transfer between devices using physical or wireless media.

 Examples: Fiber optics, coaxial cables, and radio waves.

(b) Cellular Communication:

 Definition: Cellular communication is a wireless communication technology that uses a


network of interconnected cells (base stations) to provide coverage over large areas.

 Generations:

o 1G: Analog voice communication.

o 2G: Digital voice (GSM, CDMA).

o 3G: Faster data speeds for internet.

o 4G: High-speed internet (LTE).

o 5G: Ultra-fast, low-latency communication for IoT and advanced applications.

 Applications: Mobile phones, IoT devices, and wireless broadband.

(c) World Wide Web (WWW):

 Definition: The WWW is a system of interlinked hypertext documents and resources


accessed via the internet using web browsers.

 Components:
o HTML: Used to structure web pages.

o HTTP/HTTPS: Protocols for transferring data.

o Web Servers: Store and serve web pages.

o Web Browsers: Software like Chrome or Firefox used to access web resources.

 Inventor: Sir Tim Berners-Lee (1989).

 Importance: Enables access to information, e-commerce, and online communication.

(d) Optical Fiber:

 Definition: Optical fiber is a technology that uses light to transmit data through thin
strands of glass or plastic.

 Advantages:

o High bandwidth and speed.

o Resistance to electromagnetic interference.

o Long-distance communication with low signal loss.

 Applications:

o Internet backbone.

o Telecommunication.

o Medical imaging and sensors.

 Types:

o Single-mode fibers: Used for long-distance communication.

o Multi-mode fibers: Used for short-distance communication.

(e) Satellite Communication:

 Definition: Satellite communication uses satellites in Earth's orbit to transmit and receive
data across long distances.

 Components:

o Ground Station: Sends and receives signals to/from the satellite.

o Satellite: Relays signals between ground stations or devices.

 Applications:

o Television broadcasting.

o Global positioning systems (GPS).

o Remote sensing and disaster management.


o Internet in remote areas.

 Advantages:

o Global coverage.

o Independent of terrestrial infrastructure.

Q) Differentiate and distinguish between the following pairs


a. persistent Vs Non persistent connection in HTTP
b. command channel Vs data channel in FTP
c. recursive and iterative queries in DNS

d. authoritative Vs root server for DNS


e. simple mail transfer protocol Vs mail access protocol
ANS) a) Persistent vs. Non-Persistent Connection in HTTP

 Persistent Connection (HTTP/1.1): The connection remains open after sending the
response, allowing multiple requests and responses to be sent over the same connection.
This reduces the overhead of establishing new connections.

 Non-Persistent Connection (HTTP/1.0): The connection is closed after a single request and
response. A new connection needs to be opened for each subsequent request, resulting in
additional overhead.

b) Command (or Control) Channel vs. Data Channel in FTP

 Command (Control) Channel: Used to send commands from the client to the FTP server,
such as login credentials or file actions (e.g., "put" or "get"). This channel remains open
during the FTP session.

 Data Channel: Used to transfer the actual files (data) between the client and server. This
channel is only opened when a file needs to be transferred and is closed after the transfer
completes.

c) Recursive vs. Iterative Queries in DNS

 Recursive Query: The DNS server queries other DNS servers on behalf of the client to
resolve the query. The client receives the final answer without needing to contact multiple
servers.

 Iterative Query: The DNS server responds with the best information it has, usually a
referral to another DNS server. The client must query the referred server and repeat this
process until it receives the final answer.

d) Authoritative vs. Root Server for DNS

 Authoritative Server: A DNS server that holds the actual DNS records (such as A, CNAME,
etc.) for a specific domain. It is responsible for answering queries about the domains it is
authoritative for.
 Root Server: A DNS server at the top of the DNS hierarchy. It helps direct queries to the
appropriate top-level domain (TLD) servers (e.g., .com, .org), but does not hold actual
domain-specific records.

e) Simple Mail Transfer Protocol (SMTP) vs. Mail Access Protocol

 SMTP (Simple Mail Transfer Protocol): A protocol used to send emails from the client to the
mail server and between mail servers. It only handles outgoing mail.

 Mail Access Protocol: Used by clients to retrieve emails from a mail server. Common mail
access protocols include IMAP (Internet Message Access Protocol) and POP3 (Post Office
Protocol). These handle incoming mail for users.

Q) Describe the three way handshake mechanism for connection establishment in TCP?

why does TCP have time out and he how is the time out interval determined

ANS)Three-Way Handshake in TCP

The three-way handshake is a process used to establish a TCP connection between a client and a
server. It ensures that both parties are ready to communicate and agree on initial sequence numbers
for the data exchange. The steps are:

1. SYN (Synchronize): The client sends a SYN packet to the server to initiate the connection. This
packet contains an initial sequence number (ISN) chosen by the client.
2. SYN-ACK (Synchronize-Acknowledge): The server responds with a SYN-ACK packet. This
packet acknowledges the client's SYN by sending the client's ISN plus 1, and it also includes
the server’s own ISN.

3. ACK (Acknowledge): The client sends an ACK packet back to the server, acknowledging the
server’s ISN by sending the server’s ISN plus 1. At this point, the connection is established,
and data transfer can begin.

Why Does TCP Have a Timeout?

TCP has a timeout to handle cases where packets are lost or delayed due to network issues. If a TCP
segment (e.g., SYN, SYN-ACK, ACK) is sent but not acknowledged within a certain timeframe, the
sender assumes that the packet was lost and retransmits it. The timeout ensures that the connection
can recover from temporary network issues without breaking completely.

How is the Timeout Interval Determined?

The timeout interval in TCP is dynamically calculated using the round-trip time (RTT). The RTT is the
time taken for a packet to go from the sender to the receiver and back. TCP estimates the RTT during
the communication and adjusts the timeout accordingly. The formula for the timeout interval
typically uses:

 EstimatedRTT: The average RTT, updated with each new measurement.

 Deviation of RTT (DevRTT): The variability in RTT measurements.

 Timeout Interval: Usually computed as: TimeoutInterval=EstimatedRTT+4×DevRTT

This allows TCP to adjust the timeout dynamically based on current network conditions, ensuring
that it neither waits too long nor times out too quickly.
Q) Distinguish between network assisted and end to end congestion control. discuss the causes
and approaches to congestion control in TCP

ANS) Distinction between Network-Assisted and End-to-End Congestion Control

1. Network-Assisted Congestion Control:

o In this approach, the network devices (like routers and switches) play an active role
in detecting and managing congestion.

o Routers can explicitly notify the sender or receiver about congestion using
mechanisms such as the Explicit Congestion Notification (ECN) bit or other forms of
congestion signaling.

o The sender adjusts its data transmission rate based on feedback from the network.

o Advantage: More accurate and timely feedback as the network actively monitors its
own state.

o Example: ECN (Explicit Congestion Notification) in IP networks.

2. End-to-End Congestion Control:

o In this approach, congestion control is managed entirely by the end systems (sender
and receiver) without any explicit feedback from the network.

o The sender infers congestion by observing packet loss, delays, or acknowledgments


(ACKs). If the sender detects packet loss (e.g., through timeouts or duplicate ACKs), it
assumes the network is congested and reduces its transmission rate.

o Advantage: Does not require any modification to the network infrastructure, which
makes it widely applicable across different networks.

o Example: TCP Congestion Control, which relies on packet loss as a sign of congestion.

Causes of Congestion in TCP

Congestion occurs when the network is overloaded with too much traffic, resulting in:

 Buffer overflow in routers, leading to packet drops.

 Increased packet queuing delays as routers struggle to process and forward packets quickly
enough.

 Resource contention, where multiple data flows compete for the same limited bandwidth.

Approaches to Congestion Control in TCP

TCP uses several mechanisms to control congestion, including:

1. Slow Start:

o When a new connection begins, TCP starts with a small congestion window (the
amount of data that can be sent before an acknowledgment is received). This
window increases exponentially with each successful acknowledgment, doubling the
sending rate.

o This helps probe the network capacity without overwhelming it at the start.
2. Congestion Avoidance:

o Once the congestion window reaches a threshold (ssthresh), the growth rate slows
down from exponential to linear, increasing the congestion window more cautiously.
This helps avoid overwhelming the network.

3. Fast Retransmit and Fast Recovery:

o When TCP detects packet loss through duplicate ACKs (before a timeout occurs), it
retransmits the lost segment immediately (Fast Retransmit).

o Fast Recovery adjusts the congestion window cautiously after packet loss, avoiding a
complete reset to slow start.

4. Additive Increase/Multiplicative Decrease (AIMD):

o In case of packet loss, TCP reduces the congestion window multiplicatively (by half)
to reduce traffic and prevent further congestion.

o After the reduction, TCP slowly increases the window linearly to test the network’s
capacity again.

Q) Describe intra-AS ROUTING. how is route selection done in BGP?

ANS) Intra-AS routing, or Interior Gateway Protocol (IGP) routing, refers to the routing within a single
Autonomous System (AS). An Autonomous System is a collection of IP networks and routers under
the control of a single organization, which presents a common routing policy to the internet. Intra-AS
routing protocols are responsible for determining how packets travel within the AS.

Common Intra-AS Routing Protocols

1. OSPF (Open Shortest Path First):

o OSPF is a link-state routing protocol. Each router in the AS has a complete view of
the network topology.

o Routers exchange link-state advertisements (LSAs) to build a map of the network,


which is used to calculate the shortest path using Dijkstra’s algorithm.

o OSPF supports hierarchical routing by dividing the network into areas to improve
scalability.

2. RIP (Routing Information Protocol):

o RIP is a distance-vector routing protocol that uses the hop count as a metric to select
the best route.

o Each router sends its routing table to its immediate neighbors, and routes are
updated based on the distance (hop count) to destination networks.

o RIP is simple but has limitations, such as a maximum hop count of 15, making it
unsuitable for large networks.

3. EIGRP (Enhanced Interior Gateway Routing Protocol):


o EIGRP is an advanced distance-vector protocol developed by Cisco. It uses a
combination of metrics like bandwidth, delay, load, and reliability to calculate the
best route.

o It is faster in convergence than RIP and scales better, making it more suitable for
medium to large networks.

Route Selection in BGP (Border Gateway Protocol)

BGP (Border Gateway Protocol) is used for routing between Autonomous Systems (ASes) on the
internet, making it an inter-AS routing protocol. It is responsible for determining the best routes
between ASes and is critical for ensuring efficient and reliable internet routing.

Route Selection Process in BGP

BGP does not use a simple metric like RIP or OSPF. Instead, it relies on several factors, known as BGP
attributes, to select the best route when multiple paths are available to the same destination. The
BGP route selection process follows a set of rules:

1. Highest Weight (Cisco-specific):

o The route with the highest weight is preferred. The weight is a local, router-specific
parameter that is not propagated to other routers.

2. Highest Local Preference (LOCAL_PREF):


o The route with the highest LOCAL_PREF attribute is preferred. This attribute is set
within an AS to indicate the preferred exit point for traffic going outside the AS. It is
used to control traffic flow within the AS.

3. Locally Originated Routes:

o Routes that were originated locally by the router (i.e., through a network statement
or redistribution) are preferred over those learned from other routers.

4. Shortest AS-PATH:
o The route with the shortest AS-PATH attribute is preferred. The AS-PATH lists the
ASes that the route has passed through. A shorter AS-PATH is typically preferred
because it indicates fewer intermediate ASes (hops) between the source and
destination.

5. Lowest Origin Type:

o Routes with the IGP origin are preferred over those with an EGP origin or incomplete
origin. The origin attribute indicates how the route was learned (IGP, EGP, or
incomplete).

6. Lowest Multi-Exit Discriminator (MED):

o The route with the lowest MED value is preferred. The MED is used by one AS to
suggest the preferred entry point into the AS from a neighboring AS when multiple
entry points are available.

7. eBGP over iBGP:


o Routes learned from external BGP (eBGP) neighbors are preferred over routes
learned from internal BGP (iBGP) neighbors. This is because eBGP routes come from
outside the AS, while iBGP routes are internal.

8. Lowest IGP Cost to BGP Next Hop:

o The route with the lowest IGP cost to reach the BGP next hop is preferred. This
ensures that the route that is easiest to reach within the AS is selected.

9. Oldest Route (for Route Stability):

o In some implementations, BGP may prefer the oldest route (i.e., the one that has
been in the routing table the longest) to provide stability, preventing route flapping.

10. Lowest Router ID:

 If all other attributes are the same, the route with the lowest BGP Router ID (a unique
identifier for the BGP router) is selected.

11. Lowest Peer IP Address:

 If the router IDs are the same, the route learned from the BGP peer with the lowest IP
address is selected as a tie-breaker.

Q)Write a short note on any two of the following

1)Virtual Private Networks


2)Tunneling
3)IP Security
4)CSMA/CD

ANS) a) Virtual Private Networks (VPNs)


A Virtual Private Network (VPN) enables secure and private communication over a public
network like the internet. It encrypts data to protect it from unauthorized access and
ensures user anonymity by hiding IP addresses. VPNs are commonly used for:
 Accessing restricted resources remotely.
 Protecting sensitive information.
 Bypassing geographical restrictions for internet services.

b) Tunneling
Tunneling is a technique for securely transmitting data by encapsulating one protocol within
another. This creates a secure "tunnel" that protects the data as it moves across a network.
 Purpose: Bypass firewalls, ensure confidentiality, and enable secure communication.
 Examples: Protocols like IPsec, PPTP, and GRE are commonly used for tunneling.
Tunneling is widely used in VPNs to enhance secure connectivity.

c) IP Security (IPsec)
IP Security (IPsec) is a suite of protocols used to secure internet communication by
authenticating and encrypting each IP packet in a data stream. It operates in two modes:

 Transport mode: Secures only the payload.


 Tunnel mode: Secures the entire packet.
IPsec ensures data integrity, confidentiality, and authentication and is commonly
used in VPNs for secure remote access.

d) CSMA/CD (Carrier Sense Multiple Access with Collision Detection)


CSMA/CD is a network protocol used in Ethernet to manage data transmission and prevent
collisions in a shared communication medium.
 How it works: Devices sense the channel before transmitting and stop transmission if
a collision is detected, retrying after a random backoff period.
 Purpose: Ensures efficient and collision-free communication in wired LANs.
This protocol has largely been replaced by newer technologies like switches and full-
duplex Ethernet.

You might also like