Endsem
Endsem
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.
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.
Pros:
Offers a high capacity for bandwidth.
Cons:
Heavier and not as flexible as twisted pair cables.
Uses:
Cable television networks.
Components:
Core: This is where the light travels.
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.
Can send data over long distances without losing much signal.
Cons:
Can be costly to install and maintain.
Uses:
Internet backbone and wide-area networks (WANs).
High-speed connections in businesses.
Definition: The time it takes for a signal to travel from the sender to the receiver across the
physical medium.
Factors:
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.
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 Packet complexity.
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.
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.
Example: A packet lost due to network congestion in a TCP connection will trigger
retransmission, causing additional delay.
6. Serialization Delay
Factors:
o Packet size.
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:
Example: A packet that should take 50 ms might take 70 ms due to queuing, causing jitter.
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:
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
Function: Deals with the physical connection between devices and the transmission of raw
binary data (0s and 1s) over the network medium.
Key Responsibilities:
Key Responsibilities:
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.
Function: Handles routing, addressing, and delivery of data across multiple networks.
Key Responsibilities:
Function: Provides reliable or unreliable delivery of data with error recovery and flow
control.
Key Responsibilities:
o Segmentation and reassembly of data.
Key Responsibilities:
Function: Translates, encrypts, and compresses data for the application layer.
Key Responsibilities:
Key Responsibilities:
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 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
o TCP retransmits the lost packet without waiting for a timeout (fast retransmit).
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.
o As ACKs are received, the window slides forward, allowing the sender to transmit
more data.
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:
Disadvantages:
o Single point of failure (if the bus fails, the entire network goes down).
2. Star Topology
Advantages:
Disadvantages:
o Central point of failure (hub or switch failure affects the entire network).
3. Ring Topology
Description: Devices are connected in a circular fashion, with each device having two
neighbors.
Advantages:
Disadvantages:
4. Mesh Topology
Advantages:
Disadvantages:
5. Tree Topology
Advantages:
Disadvantages:
6. Hybrid Topology
Advantages:
Disadvantages:
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.
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.
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.
Connectionless Service: Uses a datagram-based approach (e.g., IP), where packets are sent
independently without establishing a connection.
Connection-Oriented Service: Establishes a virtual circuit for reliable data delivery (e.g.,
X.25, MPLS).
8. Traffic Control
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.
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.
Overview:
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.
Disadvantages:
o Convergence can be slow (i.e., it may take time for all routers to learn about
changes in the network).
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).
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 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.
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
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.
Secure Version: HTTPS (HyperText Transfer Protocol Secure) uses encryption (via SSL/TLS)
for secure communication.
Functionality:
Ports: Uses port 21 for control commands and port 20 for data transfer.
Modes:
Secure Version: FTPS or SFTP are used for secure file transfers.
(c) Tunneling:
Functionality:
Usage: Frequently used for bypassing firewalls, accessing blocked content, and securing
data transmission.
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 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:
c. worldwide web
d. optical fibre
e. satellite communication
ANS) Here are brief notes on the given topics:
Definition: Link technologies refer to the methods and hardware used to establish
communication links between devices in a network.
Types:
Functionality: They enable data transfer between devices using physical or wireless media.
Generations:
Components:
o HTML: Used to structure web pages.
o Web Browsers: Software like Chrome or Firefox used to access web resources.
Definition: Optical fiber is a technology that uses light to transmit data through thin
strands of glass or plastic.
Advantages:
Applications:
o Internet backbone.
o Telecommunication.
Types:
Definition: Satellite communication uses satellites in Earth's orbit to transmit and receive
data across long distances.
Components:
Applications:
o Television broadcasting.
Advantages:
o Global coverage.
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.
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.
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.
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.
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
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.
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.
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:
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
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 In this approach, congestion control is managed entirely by the end systems (sender
and receiver) without any explicit feedback from the network.
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.
Congestion occurs when the network is overloaded with too much traffic, resulting in:
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.
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.
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.
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.
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.
o OSPF is a link-state routing protocol. Each router in the AS has a complete view of
the network topology.
o OSPF supports hierarchical routing by dividing the network into areas to improve
scalability.
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.
o It is faster in convergence than RIP and scales better, making it more suitable for
medium to large networks.
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.
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:
o The route with the highest weight is preferred. The weight is a local, router-specific
parameter that is not propagated to other routers.
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.
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).
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.
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.
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.
If all other attributes are the same, the route with the lowest BGP Router ID (a unique
identifier for the BGP router) is selected.
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.
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: