0% found this document useful (0 votes)
4 views12 pages

CN Unit3

The document discusses various design issues of the Network layer, including packet switching, services to the transport layer, and connection-oriented vs connectionless services. It also covers hierarchical routing algorithms, shortest-path routing algorithms like Dijkstra's, and congestion control mechanisms in TCP. Additionally, it explains the IPv4 header structure, packet fragmentation, and the distance vector routing algorithm with an example.

Uploaded by

bhavanivodnala01
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)
4 views12 pages

CN Unit3

The document discusses various design issues of the Network layer, including packet switching, services to the transport layer, and connection-oriented vs connectionless services. It also covers hierarchical routing algorithms, shortest-path routing algorithms like Dijkstra's, and congestion control mechanisms in TCP. Additionally, it explains the IPv4 header structure, packet fragmentation, and the distance vector routing algorithm with an example.

Uploaded by

bhavanivodnala01
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/ 12

1c)List the design issues of Network layer? Explain in detail.

Ans)

1. Store-and-Forward Packet Switching

• Definition: Packets are received, stored, and verified by routers before being forwarded
to the next hop.
• Advantages: Allows error checking and packet buffering; useful for congestion handling.
• Disadvantages: Introduces delays (latency) and may cause queuing in case of congestion.

2. Services Provided to the Transport Layer

• Packet Routing: Network layer decides the path for data to travel.
• Addressing: Provides logical addresses (e.g., IP addresses) for devices.
• Error Handling: Detects basic errors (e.g., unreachable host).
• Congestion Control: Assists in managing traffic to avoid overload.
• Fragmentation: Breaks large packets into smaller ones for efficient transmission.

3. Implementation of Connectionless Service

• No Setup: Data is sent without establishing a prior connection (e.g., UDP).


• Unreliable: Packets are sent independently, and delivery is not guaranteed.
• Advantages: Low overhead, flexibility, and faster transmission.
• Disadvantages: No guarantees for packet order, delivery, or error correction.

4. Implementation of Connection-Oriented Service

• Connection Setup: A path is established before data is sent (e.g., TCP).


• Reliable: Ensures packets arrive in order, and retransmits lost packets.
• Advantages: Reliable, error-free transmission.
• Disadvantages: Higher overhead due to connection setup/teardown and state
management.

5. Comparison of Virtual-Circuit and Datagram Networks

• Virtual-Circuit Networks:Connection-oriented (requires setup and teardown).


• Packets follow the same path; reliable and ordered delivery.
• Higher overhead, less flexible, and less scalable.
• Examples: ATM, MPLS.
• Datagram Networks:Connectionless (no setup, each packet is routed
independently).Packets cantake different paths; unreliable and unordered
delivery.Lower overhead, more flexible, and more scalable.
• Example: IP (Internet Protocol).
1d)Explain about Hierarchical Routing algorithm.
Ans)

• Hierarchical routing is the procedure of arranging routers in a hierarchical manner.As networks


grow in size, the router routing tables grow proportionally.
• The routers are divided into regions.
• Each router has complete details about how to route packets to destinations within its own
region, but has no information about routers in other regions.
• When different networks are interconnected, it is natural to regard each one as a separate
region to free the routers in one network from having to know the topological structure of the
other ones.
• For huge networks, a two-level hierarchy may be insufficient:
• It may be necessary to group the regions into clusters, the clusters into zones, the zones into
groups, and so on

2c)Explain the shortest-path routing algorithm.

Ans)
• Dijkstra’s Shortest Path Algorithm which was developed by Dutch computer scientist Edsger W.
Dijkstra in 1956.
• Dijkstra’s algorithm is a popular algorithms for solving many single-source shortest path
problems having non-negative edge weight in the graphs i.e., it is to find the shortest distance
between two vertices on a graph.
• Finds shortest paths from given source nodes to all other nodes.
• The aim is to find the optimal paths between the network nodes so that routing cost is
minimized.
Example:

Consider the following graph:

mathematica

Copy code

A --5--> B

| |

1 2

| |

v v

C --1--> D --4--> E

Source node: A

Edges:

A → B = 5, A → C = 1

B → C = 2, B → D = 3

C→D=1

D→E=4

Steps for Dijkstra's Algorithm:

• Initialization:
➢ Set distances: A = 0, B = ∞, C = ∞, D = ∞, E = ∞
➢ Unvisited nodes: A, B, C, D, E
• Visit A (nearest unvisited node with distance 0):
➢ Update distances:
➢ A→B=0+5=5→B=5
➢ A→C=0+1=1→C=1
➢ Distances: A = 0, B = 5, C = 1, D = ∞, E = ∞
➢ Mark A as visited.
• Visit C (nearest unvisited node with distance 1):
➢ Update distances:
➢ C → B = 1 + 2 = 3 → B = 3 (updated from 5)
➢ C→D=1+1=2→D=2
➢ Distances: A = 0, B = 3, C = 1, D = 2, E = ∞
➢ Mark C as visited.
• Visit D (nearest unvisited node with distance 2):
➢ Update distances:
➢ D→E=2+4=6→E=6
➢ Distances: A = 0, B = 3, C = 1, D = 2, E = 6
➢ Mark D as visited.
• Visit B (nearest unvisited node with distance 3):
➢ No updates needed since the current distances to neighbors (C, D) are already
minimal.
➢ Distances: A = 0, B = 3, C = 1, D = 2, E = 6
➢ Mark B as visited.
• Visit E (nearest unvisited node with distance 6):
➢ No updates needed, as there are no neighbors left to explore.
➢ Distances: A = 0, B = 3, C = 1, D = 2, E = 6
➢ Mark E as visited.

Final Shortest Distances from A:

A → A: 0

A → B: 3

A → C: 1

A → D: 2

A → E: 6

2d)The major problem with distance vector algorithm is‘count to infinity’.


Explain how exchange of complete path from router to destination instead of
delay, helps insolving count to infinity problem.

Ans)
• The "count to infinity" problem in Distance Vector routing occurs when routers incrementally
increase the distance to a destination after a link failure, slowly propagating this change across
the network. This leads to routers endlessly updating their routing tables, creating delays in
network convergence.
• How Exchanging Complete Path Information Solves the Problem:
• Path Information Instead of Distance: Instead of just sending the distance to a destination,
routers send the next hop or full path to reach a destination. This helps routers know the exact
route to take.
• Faster Loop Detection: When routers share the full path, they can detect routing loops early. If a
loop is detected (e.g., a router sees itself in the path), it can immediately adjust its routing table,
avoiding endless distance increments.
• No Incremental Counting: Exchanging full path information allows routers to quickly adapt to
changes, bypassing the slow "counting to infinity" process, speeding up convergence.

Key Benefits:

• Faster Convergence: Routers converge to the correct path faster.


• Prevents Loops: Helps detect and break loops quickly.
• More Efficient: Reduces the overhead of incrementing distances and avoids routing
delays.
• In short, exchanging complete path information helps routers make quicker, more
accurate routing decisions, preventing the count to infinity issue and speeding up
recovery from network changes.

3c)Explain the General principles of Congestion Control.

Ans)
• Network provisioning
o Sometimes resources can be added dynamically when there is serious congestion.
o More often, links and routers that are regularly heavily utilized are upgraded at the
earliest opportunity happens on a time scale of months, driven by long-term traffic
trends.
• Traffic-aware routing
o To make the most of the existing network capacity, routes can be tailored to traffic
patterns that change during the day as network users wake and sleep in different time
zones.
o Splitting traffic across multiple paths is also helpful
• Admission control
o Sometimes it is not possible to increase capacity.
o New connections can be refused if they would cause the network to become congested.
• Traffic throttling
o Routers can monitor the average load, queueing delay, or packet loss. In all cases, rising
numbers indicate growing congestion.
• Load shedding
o When all else fails, the network is forced to discard packets that it cannot deliver.
o A good policy for choosing which packets to discard can help to prevent congestion
collapse

3d)Explain Congestion Control in TCP.

Ans)
Congestion Control in TCP is a mechanism to manage the amount of data sent into the network,
preventing congestion and packet loss. It dynamically adjusts the sender's transmission rate based on
network conditions. The key components are:

1. Slow Start:

The congestion window starts small (1 or 2 MSS) and grows exponentially with each acknowledgment
received, doubling the window size each round-trip time (RTT).

This continues until the congestion window reaches a threshold called ssthresh.

2. Congestion Avoidance:

After reaching ssthresh, TCP switches to Congestion Avoidance, where the window grows linearly (by 1
MSS per RTT) to avoid overwhelming the network.

3. Fast Retransmit:

If packet loss is detected (usually via 3 duplicate ACKs), TCP retransmits the lost packet immediately
without waiting for a timeout.

4. Fast Recovery:

After retransmitting, TCP reduces the congestion window by half and enters Fast Recovery, continuing
transmission with a reduced window, avoiding a full restart.

5. Timeout Recovery:

If a timeout occurs (e.g., no ACK received), TCP reduces the congestion window drastically (to 1 MSS) and
re-enters Slow Start.

Key Mechanism: AIMD (Additive Increase, Multiplicative Decrease):

• Additive Increase: In Congestion Avoidance, the congestion window increases slowly (additively)
to probe available bandwidth.
• Multiplicative Decrease: On detecting congestion (via packet loss or timeouts), the congestion
window is halved, reducing the transmission rate to alleviate congestion.
• This dynamic adjustment of the congestion window allows TCP to prevent network overload and
ensure fair and efficient use of the network.

4c)Explain the IPV4 header.

Ans)
IPv4 Header: Short Explanation

The IPv4 header carries essential information for routing and delivering packets across the internet.
Here's a brief overview of its key fields:

1. Version (4 bits): Specifies the IP version. For IPv4, it's always 4.


2. Header Length (4 bits): The length of the header in 32-bit words.
3. Type of Service (8 bits): Specifies priority and QoS parameters (e.g., delay, throughput,
reliability).
4. Total Length (16 bits): The entire size of the datagram (header + data), up to 65,535
bytes.
5. Identification (16 bits): Unique identifier for the datagram, used for fragmentation.
6. Flags (3 bits): Controls fragmentation:
a. DF: Don't Fragment
b. MF: More Fragments (set for all fragments except the last)
7. Fragment Offset (13 bits): Indicates the position of a fragment in the original datagram.
8. Time to Live (TTL) (8 bits): Limits the number of hops a packet can make to prevent
loops.
9. Protocol (8 bits): Identifies the protocol in the data (e.g., TCP = 6, UDP = 17).
10. Header Checksum (16 bits): Ensures the integrity of the header.
11. Source Address (32 bits): The sender's IP address.
12. Destination Address (32 bits): The receiver's IP address.
13. Options (Variable): Optional field for additional settings (e.g., routing, security).
14. Padding (Variable): Adds null bytes to make the header length a multiple of 32 bits.

Each field helps routers and hosts handle packet delivery, fragmentation, and integrity across the
network.
4d)packet fragmentation

Ans)

➢ Every packet based network has an MTU (Maximum Transmission Unit) size. The MTU is the size
of the largest packet that network can transmit.
• Fragmentation: when the size of datagram is greater than maximum size of data that can
be held in a frame i.e., its Maximum Transmission Unit. The network layer divides the
datagram received from the transport layer into fragments so that data flow is not
disrupted.
• Packets larger than the allowable MTU must be divided into smaller packets or
fragments to enable them to traverse the network.
➢ These limits have various causes, among them :
1. .Hardware (e.g., the size of an Ethernet frame).
2. .Operating system (e.g., all buffers are 512 bytes).
3. .Protocols (e.g., the number of bits in the packet length field).
4. .Compliance with some (inter)national standard.
5. .Desire to reduce error-induced retransmissions to some level.
6. .Desire to prevent one packet from occupying the channel too long.
➢ IP fragmentation is an Internet Protocol (IP) process that breaks packets into smaller pieces
(fragments), so that the resulting pieces can pass through a link with a smaller maximum
transmission unit (MTU) than the original packet size. The fragments are reassembled by the
receiving host.
5c)Define Routing. Explain Distance Vector Routing Algorithm with an example.

Ans)

➢ Routing is the process of forwarding the packets from source to the destination but the best
route to send the packets is determined by the routing algorithm.
➢ The routing algorithm is that part of the network layer software responsible for deciding which
output line an incoming packet should be transmitted on.

➢ A distance-vector protocol calculates the distance and direction of the vector of the next hop
from the information obtained by the neighboring router.
➢ Distance vector routing protocol also called as Bellman-Ford algorithm or Ford Fulkerson
algorithm used to calculate a path.
➢ Historically known as the old ARPANET routing algorithm {or known as Bellman Ford (BF)
algorithm}.
➢ Key points of distance vector routing protocol:
• Network Information: Every node in the network have information about its
neighboring node. Each node in the network is designed to share information
with all the nodes in the network.
• Routing Pattern: In DVR the data shared by the nodes are transmitted only to
that node that is linked directly to one or more nodes in the network.
• Data sharing: The nodes share the information with the neighboring node from
time to time as there is a change in network topology.
➢ Consider the following simple network:
Copy code

A --1--> B

| |

3 2

| |

v v

C --1--> D

Step 1: Initialization

Router A’s table: [A=0, B=1, C=3, D=∞]

Router B’s table: [A=1, B=0, C=∞, D=2]

Router C’s table: [A=3, B=∞, C=0, D=1]

Router D’s table: [A=∞, B=2, C=1, D=0]

Step 2: Exchange Distance Vectors

A sends its table [A=0, B=1, C=3, D=∞] to B and C.

B sends its table [A=1, B=0, C=∞, D=2] to A and D.

C sends its table [A=3, B=∞, C=0, D=1] to A and D.

D sends its table [A=∞, B=2, C=1, D=0] to B and C.

Step 3: Update Tables

After receiving updated vectors:

A updates its table for C: [A=0, B=1, C=3, D=∞] (no change).

B updates its table for C: [A=1, B=0, C=3, D=2] (via D).

C updates its table for A: [A=4, B=∞, C=0, D=1] (via B).

D updates its table for A: [A=4, B=2, C=1, D=0].

Step 4: Repeat

The routers continue exchanging and updating their tables until all distances converge to the shortest
paths.

Final Distance Vectors:


A's table: [A=0, B=1, C=3, D=5]

B's table: [A=1, B=0, C=3, D=2]

C's table: [A=3, B=3, C=0, D=1]

D's table: [A=5, B=2, C=1, D=0]

6c)Qos in network layer

Ans)

➢ Quality of service (QoS) is the use of mechanisms or technologies that work on a network to
control traffic and ensure the performance of critical applications with limited network capacity.
➢ It enables organizations to adjust their overall network traffic by prioritizing specific high
performance applications.
➢ Quality of service (QoS) is a set of technologies that work on a network to guarantee its ability to
dependably run high-priority applications and traffic under limited network capacity. QoS
technologies accomplish this by providing differentiated handling and capacity allocation to
specific flows in network traffic. This enables the network administrator to assign the order in
which packets are handled and the amount of bandwidth afforded to that application or traffic
flow.
➢ A stream of packets from a source to a destination is called a flow.
• A flow might be all the packets of a connection in a connection-oriented
network, or all
• the packets sent from one process to another process in a connectionless
network.
• The needs of each flow can be characterized by four primary parameters:
• Reliability, delay, jitter and Bandwidth.
• Together, these determine the QoS (Quality of Service) the flow requires.
➢ Flow Characteristics

• Reliability: Reliability is a characteristic that a flow needs.

• Delay: Source-to-destination delay is another flow characteristic.

•Jitter: Jitter is the variation in delay for packets belonging to the same flow.

• Bandwidth: Different applications need different bandwidths.

➢ Quality of Service (QoS) is an internetworking issue that has been discussed more
than defined.

Four issues must be addressed to ensure quality of service:

i. What applications need from the network


ii. How to regulate the traffic that enters the network. iii. How to reserve
resources at routers to guarantee performance.
iii. Whether the network can safely accept more traffic

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy