0% found this document useful (0 votes)
11 views130 pages

CN Network Layer19thjune 2019

Uploaded by

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

CN Network Layer19thjune 2019

Uploaded by

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

Computer Science and Engineering

TY BTech Trimester-VII

Disclaimer:
a. Information included in these slides came from multiple sources. We have tried our best
to cite the sources. Please refer to the references to learn about the sources, when
applicable.
b. The slides should be used only for preparing notes, academic purposes (e.g. in teaching
a class), and should not be used for commercial purposes.
Unit 2: NETWORK LAYER

• Network Layer Design Issues

• Switching Techniques

• Protocol: IPv4 and IPv6 addressing schemes

01/24/2025 Computer Network Unit II 2


Functionality of Network Layer
• Implements routing of frames (packets) through the network.
• Defines the most optimum path the packet should take from the
source to the destination.
• Defines logical addressing so that any endpoint can be identified.
• Handles congestion in the network.
• Facilitates interconnection between heterogeneous networks
(Internetworking).
• The network layer also defines how to fragment a packet into
smaller packets to accommodate different media
01/24/2025 Computer Network Unit II 3
Network Layer Design Issues
• Store-and-Forward Packet Switching
• Services Provided to the Transport Layer
• Implementation of Connectionless Service
• Implementation of Connection-Oriented Service
• Virtual-Circuit and Datagram Subnets

01/24/2025 Computer Network Unit II 4


Store-and-Forward Packet Switching
Environment of network layer protocols

01/24/2025 Computer Network Unit II 5


Implementation of Connectionless Service
Routing within a diagram subnet

01/24/2025 Computer Network Unit II 6


Implementation of Connection-Oriented Service
Routing within a virtual-circuit subnet

01/24/2025 Computer Network Unit II 7


Comparison of Virtual-Circuit and Datagram
Subnets

5-4

01/24/2025 Computer Network Unit II 8


Position of IPv4 in TCP/IP protocol suite

01/24/2025 Computer Network Unit II 9


Internet Protocol: IPv4

01/24/2025 Computer Network Unit II 10


IPv4 Datagram Format

• Version (VER): version of the IP protocol. Currently, the version


is 4.
• Header length (HLEN): the total length of the datagram header
in 4-byte words.
• Services: service type or differentiated services (not used now).
• Total length: total length (header plus data) of the datagram in
bytes.
– Total length of data = total length – header length

20.11
IPv4 Datagram Format

• Identification: used in fragmentation


• Flags: used in fragmentation
• Fragmentation offset: used in fragmentation
• Time to live: it is used to control the maximum number hops visited by
the datagram.
• Protocol: defines the higher-level protocol that uses the services of the
IPV4 layer.

20.12
IPv4 Datagram Format

• Checksum: 1’s compliment checksum


• Source address: is the IPv4 address of the source.
• Destination address: is the IPv4 address of the source.

20.13
Encapsulation of a small datagram in an Ethernet frame

One of the reason why “total length”


field is required.

01/24/2025 Computer Network Unit II 14


Protocol field and encapsulated data
Protocol values

01/24/2025 Computer Network Unit II 15


Example

An IPv4 packet has arrived with the first 8 bits as shown:


01000010
The receiver discards the packet. Why?

Solution
There is an error in this packet. The 4 leftmost bits (0100)
show the version, which is correct. The next 4 bits (0010)
show an invalid header length (2 × 4 = 8). The minimum
number of bytes in the header must be 20. The packet has
been corrupted in transmission.
01/24/2025 Computer Network Unit II 16
Maximum transfer unit (MTU)
MTUs for some networks

01/24/2025 Computer Network Unit II 17


Fields Related to Fragmentation

• Identification: identifies a datagram originating from the


source host. A combination of the identification and source
address must uniquely define a datagram as it leaves the
source node.
• Flags: see next slide.
• Fragmentation offset: is the offset of the data in the original
datagram measured in units of 8 bytes.

20.18
Figure 20.10 Flags (3 bits) used in fragmentation

• first bit: reserved (not used)


• second bit: = 1 requires the packet not to be fragmented
drops the packet if it is > MTU

• third bit: =1 more fragmented packets later


=0 the last fragmented packet

20.19
Figure 20.11 Fragmentation example

20.20
Internet Protocol: IPv4

5-54

01/24/2025 Computer Network Unit II 21


IP Addresses
IP address formats.

01/24/2025 Tanenbaum Chapter 5 Network 22


Classful Addressing
“Class A” Address:
• -The first bit of the first octet is always set to 0 (zero). Thus the first octet
ranges from 1 –127, i.e.
• -Class A addresses only include IP starting from 1.x.x.x to 126.x.x.x only.
The IP range 127.x.x.x is reserved for loopback IP addresses.
• -The default subnet mask for Class A IP address is 255.0.0.0 which
implies that Class A addressing can have 126 networks and 16777214
hosts .
• -Class A IP address format is thus:
• 0NNNNNNN.HHHHHHHH.HHHHHHHH.HHHHHHHH
01/24/2025 Computer Network Unit II 23
Classful Addressing

• “Class B” Address:
• -An IP address which belongs to class B has the first two bits in the first
octet set to 10, i.e.
• -Class B IP Addresses range from 128.0.x.x to 191.255.x.x. The default
subnet mask for Class B is 255.255.x.x.
• -Class B has 16384 (214) Network addresses and 65534 (216-2) Host
addresses.
• -Class B IP address format is thus:
• 10NNNNNN.NNNNNNNN.HHHHHHHH.HHHHHHHH
01/24/2025 Computer Network Unit II 24
Classful Addressing

• “Class C” Address:
• -The first octet of Class C IP address has its first 3 bits set to 110, that is:
• -Class C IP addresses range from 192.0.0.x to 223.255.255.x. The
default subnet mask for Class C is 255.255.255.x.
• -Class C gives 2097152 (221) Network addresses and 254 (28-2) Host
addresses.
• -Class C IP address format is thus:
• 110NNNNN.NNNNNNNN.NNNNNNNN.HHHHHHHH

01/24/2025 Computer Network Unit II 25


Classful Addressing

• “Class D” Address:
• -Very first four bits of the first octet in Class D IP addresses are set to 1110,
giving a range of:
• 11100000-11101111
• 224-239
• -Class D has IP address rage from 224.0.0.0 to 239.255.255.255.
• -Class D is reserved for Multicasting. In multicasting data is not destined for
a particular host, that is why there is no need to extract host address from
the IP address, and Class D does not have any subnet mask.
01/24/2025 Computer Network Unit II 26
Classful Addressing

• “Class E” Address:
• -This IP Class is reserved for experimental purposes only for R&D
or Study.
• 11110000-11111111
• 240-255
• -IP addresses in this class ranges from 240.0.0.0 to 255.255.255.254.
• -Like Class D, this class too is not equipped with any subnet mask.

01/24/2025 Computer Network Unit II 27


• Given the network address 17.0.0.0, find the class, the block,
and the range of the addresses.
• Solution
• The class is A because the first byte is between 0 and 127.
• The block has a netid of 17.
• The addresses range from 17.0.0.0 to 17.255.255.255.

01/24/2025 Computer Network Unit II 28


• Given the network address 132.21.0.0, find the class, the block,
and the range of the addresses.
• Solution
• The class is B because the first byte is between 128 and 191.
• The block has a netid of 132.21. The addresses range from
• 132.21.0.0 to 132.21.255.255.

01/24/2025 Computer Network Unit II 29


• Given the network address 220.34.76.0,find the class, the
block, and the range of the addresses.
• Solution
• The class is C because the first byte is between 192 and 223.
• The block has a netid of 220.34.76.
• The addresses range from 220.34.76.0 to 220.34.76.255.

01/24/2025 Computer Network Unit II 30


• A mask is a 32-bit binary number that gives the first
address in the block (the network address) when bitwise
ANDed with an address in the block.

And Operation

01/24/2025 Computer Network Unit II 31


-Default Masks used

-CIDR –Classless Inter Domain Routing

01/24/2025 Computer Network Unit II 32


• A block of addresses is granted to a small organization. We know that one
of the addresses is 205.16.37.39/28. What is the first address in the block?
• Solution
• The binary representation of the given address is
• 11001101 00010000 00100101 00100111
• Mask is 11111111 11111111 11111111 11110000
• If we set 32−28 rightmost bits to 0, we get
• 11001101 00010000 00100101 0010000
• or 205.16.37.32.

01/24/2025 Computer Network Unit II 33


• What is the network address if one of the addresses is
167.199.170.82/27?
• Solution
• The prefix length is 27,which means that we must keep the first
27bits as 1s and change the remaining bits(5)to0s.The 5 bits
affect only the last byte. The last byte is 01010010.Changing
the last 5 bits to 0s,we get 01000000 or 64.The network
address is 167.199.170.64/27.

01/24/2025 Computer Network Unit II 34


• A small organization is given a block with the beginning address
and the prefix length 205.16.37.24/29(in slash notation).What is
the range of the block?
• Solution
• The beginning address is 205.16.37.24.To find the last address we
keep the first 29 bits and change the last 3 bits to1s.
• Beginning:11001111 00010000 00100101 00011000
• Ending : 11001111 00010000 00100101 00011111
• There are only 8 addresses in this block.
01/24/2025 Computer Network Unit II 35
Special IP Addresses

01/24/2025 Computer Network Unit II 36


Internet Protocol: IPv6
Initial motivation:
– 32-bit address space soon to be completely allocated
Additional motivation:
– header format helps speed processing/forwarding
– header changes to facilitate QoS
IPv6 datagram format:
– Fixed length 40-byte header
– fragmentation not allowed

01/24/2025 Computer Network Unit II 37


IP Version 6 Goals
• Support billions of hosts
• Reduce routing table size
• Simplify protocol
• Better security
• Attention to type of service
• Aid multicasting
• Roaming host without changing address
• Allow future protocol evolution
• Permit coexistence of old, new protocols. . .
Internet Protocol: IPv6

• Priority: identify priority


among datagrams
• Flow Label: identify
datagrams in same ‘flow’
• Next Header: identify upper
layer protocol for data

01/24/2025 Computer Network Unit II 39


IPv6 Extension Headers

5-69

01/24/2025 Computer Network Unit II 40


IPv6 Extension Headers

Hop-by-hop extension header for large datagrams (jumbograms)

01/24/2025 Computer Network Unit II 41


IPv6 Extension Headers (Routing)

01/24/2025 Computer Network Unit II 42


Unit 2: NETWORK LAYER
• Sub netting
• Classless Inter-Domain Routing (CIDR)
• Network Address Translation (NAT)
• Internet Control Message Protocol (ICMP)

01/24/2025 Computer Network Unit II 43


Subnets
LAN: Campus network for various departments

01/24/2025 Computer Network Unit II 44


The number of networks and the number of hosts per class can
be derived by this formula:

• -When calculating hosts' IP addresses, 2 IP addresses are


decreased because they cannot be assigned to hosts, i.e. the
first IP of a network is network number and the last IP is
reserved for Broadcast IP.

01/24/2025 Computer Network Unit II 45


Subnets cont..
Class B network: 64 subnets

01/24/2025 Computer Network Unit II 46


Classful Addressing (Cntd.)

• A company is granted the site address 201.70.64.0 (class C).


The company needs six subnets. Design the subnets.
• Solution
• The number of 1s in the default mask is 24 (class C).

01/24/2025 Computer Network Unit II 47


• The company needs six subnets. This number 6 is not a power of 2.The
next number that is a power of 2 is 8(23).We need 3 more 1s in the sub
netmask. The total number of 1s in the subnet mask is 27(24+3).
• The total number of 0s is5(32-27).The mask is
• 11111111 11111111 11111111 11100000
• or
• 255.255.255.224
• The number of subnets is 8.
• The number of addresses in each subnet is2^5(5is the number of 0s)or32.

01/24/2025 Computer Network Unit II 48


01/24/2025 Computer Network Unit II 49
• An organization is granted the block 130.34.12.64/26.The
organization needs to have four subnets. What are the subnet
addresses and the range of addresses for each subnet?
• Solution
• The suffix length is 6.This means the total number of addresses
in the block is 64(26).If we create four subnets, each subnet
will have 16 addresses.

01/24/2025 Computer Network Unit II 50


• Let us first find the subnet prefix (subnetmask). We need four
subnets, which means we need to add two more 1s to the site
prefix. The subnet prefix is then/28.
• Subnet1:130.34.12.64/28 to 130.34.12.79/28.
• Subnet2:130.34.12.80/28 to 130.34.12.95/28.
• Subnet3:130.34.12.96/28 to 130.34.12.111/28.
• Subnet4:130.34.12.112/28 to1 30.34.12.127/28.

01/24/2025 Computer Network Unit II 51


CIDR – Classless InterDomain Routing
IP address assignments

5-59

01/24/2025 Computer Network Unit II 52


NAT – Network Address Translation
NAT: Placement and operation

01/24/2025 Computer Network Unit II 53


Addresses for private networks

01/24/2025 Computer Network Unit II 54


Addresses in a NAT

01/24/2025 Computer Network Unit II 55


Internet Control Message Protocols

•ICMP’s most common uses are


testing and troubleshooting.

•Two of the most well-known


utilities, PING and TRACEROUTE,
rely on ICMP to perform connectivity
tests and path discovery.

01/24/2025 Computer Network Unit II 56


Internet Control Message Protocols

The principal ICMP message types.


Routing Algorithm
Network Layer responsible for deciding on which output line to
transmit an incoming packet.
For virtual circuit subnets:
 routing decision is made ONLY at set up
Algorithm properties:
 correctness, simplicity, robustness, stability, fairness, optimality and
scalability

Computer Networks: Routing 58


Internetwork Routing
Routing Classification

Adaptive Routing Non-Adaptive Routing


based on current measurements routing computed in advance and off-line
of traffic and/or topology.

Computer Networks: Routing 59


Internetwork Routing
Adaptive Routing

Centralized Distributed Isolated

[IGP] [EGP]
Intradomain routing Interdomain routing
Interior [BGP,IDRP] Exterior
Gateway Protocols Gateway Protocols

Distance Vector routing Link State routing

[RIP] [OSPF,IS-IS,PNNI]

Computer Networks: Routing 60


Internetwork Routing
Non - Adaptive Routing

flooding Static Routing

Pure flooding Selective flooding

Computer Networks: Routing 61


Flooding
• Pure flooding :: every incoming packet to a node is sent out
on every outgoing line.
– Obvious adjustment – do not send out on arriving link (assuming
full-duplex links).
– The routing algorithm can use a hop counter (e.g., TTL) to
dampen the flooding.
– Selective flooding :: only send on those lines going
“approximately” in the right direction.

Computer Networks: Routing 62


 Shortest Path Search

Dijkstra’s Algorithm

1. Start with the local node (router): the root of the tree.
2. Assign a cost of 0 to this node and make it the first permanent node.
3. Examine each neighbour node of the node that was the last permanent node.
4. Assign a cumulative cost to each node and make it tentative.
5. Among the list of tentative nodes
a. Find the node with the smallest cumulative cost and make it permanent.
b. If a node can be reached from more than one direction
i. Select the direction with the shortest cumulative cost.
6. Repeat steps 3 to 5 until every node becomes permanent.
Dijkstra algorithm
Shortest Path Routing
Dijkstra’s Algorithm

What does it mean to be the shortest (or optimal) route?


Choices:
a. Minimize the number of hops along the path.
b. Minimize mean packet delay.
c. Maximize the network throughput.

Computer Networks: Routing 66


Dijkstra’s Algorithm Shortest Path Routing
The first 5 steps used in computing the shortest path from A to D.

The arrows indicate the working node.

01/24/2025 Tanenbaum Chapter 5 Network 67


The steps used in computing the shortest path from A to D.
The arrows indicate the working node – permanent label.
The cost can relates to delay

 Start search and


compare with
tentative label

 Mark permanent
when shortest node
found
 Once permanent
never changed
Tentative label change
 Tentative node can
always be search
and relabelled

The label on each node can be TENTATIVE or PERMANENT


Internetwork Routing
Adaptive Routing

Centralized Distributed Isolated

[IGP] [EGP]
Intradomain routing Interdomain routing
Interior [BGP,IDRP] Exterior
Gateway Protocols Gateway Protocols

Distance Vector routing Link State routing

[RIP] [OSPF,IS-IS,PNNI]

Computer Networks: Routing 76


Adaptive Routing
Basic functions:
1. Measurement of pertinent network data.
2. Forwarding of information to where the routing
computation will be done.
3. Compute the routing tables.
4. Convert the routing table information into a routing
decision and then dispatch the data packet.

Computer Networks: Routing 77


Distance Vector Routing

• Historically known as the old ARPANET routing algorithm {or


known as Bellman-Ford algorithm}.
Basic idea: each network node maintains a Distance Vector table
containing the distance between itself and ALL possible
destination nodes.
• Distances are based on a chosen metric and are computed using
information from the neighbors’ distance vectors.

Metric: usually hops or delay


Computer Networks: Routing 78
 Distance Vector Routing (DVR)
 3 keys to understand how this algorithm works:

• Sharing knowledge about the entire AS. Each router shares its knowledge
about the entire AS with neighbours. It sends whatever it has.

• Sharing only with immediate neighbours. Each router sends whatever


knowledge it has thru all its interface.

• Sharing at regular intervals. sends at fixed intervals, e.g. every 30 sec.

 Problems: Tedious comparing/updating process, slow response to infinite loop


problem, huge list to be maintained!!
Initialization of tables in distance vector routing (DVR)
Updating in distance vector routing example: C to A

From C From A

A to A via C: ACA = AC+ CA = 2+2


A to B via C: ACB = AC + CB = 2+4

A to D via C: ACD = AC + CD = 2 + ∞
A to E via C: ACE = AC + CE = 2+4

A to C via C: ACC = AC + CC = 2+0


Final Distance vector routing tables
Distance Vector Routing
Information kept by DV router
1. each router has an ID
2. associated with each link connected to a router, there is a link
cost (static or dynamic) the metric issue!
• Distance Vector Table Initialization
• Distance to itself = 0
• Distance to ALL other routers = infinity number

01/24/2025 Computer Network Unit II 83


Distance Vector Algorithm

1. Router transmits its distance vector to each of its neighbors.


2. Each router receives and saves the most recently received distance vector
from each of its neighbors.
3. A router recalculates its distance vector when:
a. It receives a distance vector from a neighbor containing different
information than before.
b. It discovers that a link to a neighbor has gone down (i.e., a topology
change).
The DV calculation is based on minimizing the cost to each destination.

Computer Networks: Routing 84


Figure 14.6 Two-node instability

TCP/IP Protocol Suite 85


• Count to ∞

01/24/2025 Computer Network Unit II 86


Distance Vector Routing

.(a) A subnet. (b) Input from A, I, H, K, and the new routing table for J.
Computer Networks: Routing 87
Link State Algorithm
Each router must do the following:
1. Discover its neighbors, learn their network address.
2. Measure the delay or cost to each of its neighbors.
3. Construct a packet telling all it has just learned.
4. Send this packet to all other routers.
5. Compute the shortest path to every other router.

01/24/2025 Computer Network Unit II 88


Learning about the Neighbors

(a) Nine routers and a LAN. (b) A graph model of (a).


01/24/2025 Tanenbaum Chapter 5 Network 89
Measuring Line Cost
A subnet in which the East and West parts are connected by two
lines.

01/24/2025 Tanenbaum Chapter 5 Network 90


Building Link State Packets

(a) A subnet. (b) The link state packets for this subnet.
01/24/2025 Tanenbaum Chapter 5 Network 91
Distributing the Link State Packets
The packet buffer for router B in the previous slide

01/24/2025 92
Routing Information Protocol (RIP)

• A simple intra domain protocol


• Straightforward implementation of Distance Vector Routing
• Each router advertises its distance vector every 30 seconds (or
whenever its routing table changes) to all of its neighbors
• RIP always uses 1 as link metric
• Maximum hop count is 15, with “16” equal to “”
• Routes are timeout (set to 16) after 3 minutes if they are not updated

Computer Networks: Routing 93


RIPv2
• RIPv2 is an extends RIPv1:
– Subnet masks are carried in the route information
– Authentication of routing messages
– Route information carries next-hop address
– Exploites IP multicasting

• Extensions of RIPv2 are carried in unused fields of RIPv1


messages
94
RIP Messages
• This is the operation of RIP in routed. Dedicated port for RIP
is UDP port 520.

• Two types of messages:


– Request messages
• used to ask neighboring nodes for an update
– Response messages
• contains an update
95
Routing with RIP
• Initialization: Send a request packet (command = 1, address family=0..0) on all
interfaces:
• RIPv1 uses broadcast if possible,
• RIPv2 uses multicast address 224.0.0.9, if possible
requesting routing tables from neighboring routers
• Request received: Routers that receive above request send their entire routing table
• Response received: Update the routing table

• Typically, there is a routing daemon (routed) that is an application layer process


that provides access to routing tables.
96
Routing with Rip Cont.
• Regular routing updates: Every 30 seconds, send all or part of
the routing tables to every neighbor in an response message
• Triggered Updates: Whenever the metric for a route change,
send entire routing table.
• If a router does not hear from its neighbor once every 180
seconds, the neighbor is deemed unreachable.
Security
• Issue: Sending bogus routing updates to a router
• RIPv1: No protection
• RIPv2: Simple authentication scheme
RIP Problems

• RIP takes a long time to stabilize


– Even for a small network, it takes several minutes until the routing
tables have settled after a change
• The maximum path in RIP is 15 hops

99
Open Shortest Path First(OSPF)

• Provides for authentication of routing messages.


– 8-byte password designed to avoid misconfiguration.
• Provides additional hierarchy
– Domains are partitioned into areas.
– This reduces the amount of information transmitted in packet.
• Provides load-balancing via multiple routes.

Computer Networks: Routing 100


Open Shortest Path First
(OSPF)

• OSPF runs on top of IP, i.e., an OSPF packet is transmitted with IP


data packet header.
• Uses Level 1 and Level 2 routers
• Has: backbone routers, area border routers, and AS boundary
routers

Computer Networks: Routing 101


OSPF—An Interior Gateway
Routing Protocol (1)

An autonomous system
OSPF—An Interior Gateway
Routing Protocol (2)

A graph representation of the previous slide.


OSPF—An Interior Gateway
Routing Protocol (3)

The relation between ASes, backbones, and areas in OSPF.


OSPF Terminology
Internal router :: a level 1 router.
Backbone router :: a level 2 router.
Area border router (ABR) :: a backbone router that attaches to
more than one area.
AS border router :: (an interdomain router), namely, a router that
attaches to routers from other ASs across AS boundaries.

Computer Networks: Routing 105


OSPF—An Interior Gateway
Routing Protocol (4)

The five types of OSPF messages


OSPF

The relation between ASes, backbones, and areas in OSPF.


Computer Networks: Routing 107
Border Gateway Protocol (BGP)
• The replacement for EGP is BGP. Current version is BGP-4.
• BGP assumes the Internet is an arbitrary interconnected set of AS’s.
• In interdomain routing the goal is to find ANY path to the intended
destination that is loop-free. The protocols are more concerned with
reachability than optimality.

Computer Networks: Routing 108


BGP—The Exterior Gateway
Routing Protocol (2)

Routing policies between four Autonomous Systems


BGP—The Exterior Gateway
Routing Protocol (3)

Propagation of BGP route advertisements


Congestion Control Algorithms
• General Principles of Congestion Control
• Congestion Prevention Policies
• Congestion Control in Virtual-Circuit Subnets
• Congestion Control in Datagram Subnets
• Load Shedding
• Jitter Control

01/24/2025 Tanenbaum Chapter 5 Network 111


Congestion Control

• Too many packets present in (a part of) the network causes packet delay
and loss that degrades performance. This situation is called congestion.
• Since congestion occurs within the network, it is the network layer that
directly experiences it and must ultimately determine what to do with
the excess packets.
• The network and transport layers share the responsibility for handling
congestion.
• Congestion at the network layer is related to two issues, throughput and
delay.
01/24/2025 Computer Network Unit II 112
Congestion

When too much traffic is offered, congestion sets in and performance degrades
01/24/2025
sharply.
Tanenbaum Chapter 5 Network 113
Congestion control refers to techniques and mechanisms that can either prevent
congestion before it happens or remove congestion after it has happened.
• -The difference between flow control and congestion control is that Flow control, in
contrast, relates to the traffic between a particular sender and a particular receiver.
• Its job is to make sure that a fast sender cannot continually transmit data faster than
the receiver is able to absorb it and Congestion control has to do with making sure
the network is able to carry the offered traffic.
• It is a global issue, involving the behavior of all the hosts and routers.
• We can divide congestion control mechanisms into two broad categories: open-loop
congestion control (prevention)and closed-loop congestion control (removal).

01/24/2025 Computer Network Unit II 114


Open-Loop Congestion Control:
• In open-loop congestion control, policies are applied to prevent congestion before it
happens.
• In these mechanisms, congestion control is handled by either the source or the destination.
• There is a brief list of policies that can prevent congestion.
• Retransmission Policy: Retransmission is sometimes unavoidable. If the sender feels that
a sent packet is lost or corrupted, the packet needs to be retransmitted.
• Retransmission in general may increase congestion in the network.
• However, a good retransmission policy can prevent congestion.
• The retransmission policy and the retransmission timers must be designed to optimize
efficiency and at the same time prevent congestion

01/24/2025 Computer Network Unit II 115


Open-Loop Congestion Control (Cntd.):
• Window Policy: The type of window at the sender may also affect congestion. The Selective Repeat
window is better than the Go-Back-N window for congestion control.
• In the Go-Back-N window, when the timer for a packet times out, several packets may be resent,
although some may have arrived safe and sound at the receiver.
• This duplication may make the congestion worse. The Selective Repeat window, on the other hand, tries
to send the specific packets that have been lost or corrupted.
• Acknowledgment Policy: The acknowledgment policy imposed by the receiver may also affect
congestion.
• If the receiver does not acknowledge every packet it receives, it may slow down the sender and help
prevent congestion.
• Several approaches are used in this case. A receiver may send an acknowledgment only if it has a
packet to be sent or a special timer expires. A receiver may decide to acknowledge only N packets at a
time. We need to know that the acknowledgments are also part of the load in a network. Sending fewer
acknowledgments means imposing less load
01/24/2025
on the network.
Computer Network Unit II 116
Open-Loop Congestion Control (Cntd.):
• Discarding Policy: A good discarding policy by the routers may prevent
congestion and at the same time may not harm the integrity of the transmission.
For example, in audio transmission, if the policy is to discard less sensitive
packets when congestion is likely to happen, the quality of sound is still
preserved and congestion is prevented or alleviated.
• Admission Policy: An admission policy, which is a quality-of-service
mechanism, can also prevent congestion in virtual-circuit networks. Switches in
a flow first check the resource requirement of a flow before admitting it to the
network. A router can deny establishing a virtual-circuit connection if there is
congestion in the network or if there is a possibility of future congestion
01/24/2025 Computer Network Unit II 117
Closed-Loop Congestion Control:
• Closed-loop congestion control mechanisms try to alleviate congestion after it happens.
• Several mechanisms have been used by different protocols. We describe a few of them here.
• Backpressure: The technique of backpressure refers to a congestion control mechanism in
which a congested node stops receiving data from the immediate upstream node or nodes.
This may cause the upstream node or no des to become congested, and they, in turn, reject
data from their upstream node or nodes, and so on.
• Backpressure is a node-to-node congestion control that starts with a node and propagates, in
the opposite direction of data flow, to the source.
• The backpressure technique can be applied only to virtual circuit networks, in which each
node knows the upstream node from which a flow of data is coming.
• Following figure shows the idea of backpressure.

01/24/2025 Computer Network Unit II 118


Closed-Loop Congestion Control (Cntd.):

Figure: Backpressure method for alleviating congestion

01/24/2025 Computer Network Unit II 119


Closed-Loop Congestion Control (Cntd.):

• A choke packet is a packet sent by a node to the source to


inform it of congestion.
• Note the difference in backpressure, the warning is from one
node to its upstream node, although the warning may
eventually reach the source station.
• In the choke-packet method, the warning is from the router,
which has encountered congestion, directly to the source
station. The intermediate nodes through which the packet has
travelled are not warned.
01/24/2025 Computer Network Unit II 120
Closed-Loop Congestion Control (Cntd.):
• Implicit Signalling:
• In implicit signalling, there is no communication between the congested node or nodes and the source.
The source guesses that there is congestionsomewhere in the network from other symptoms.
• For example, when a source sends several packets and there is no acknowledgment for a while, one
assumption is that the network is congested. The delay in receiving an acknowledgment is interpreted
as congestionin the network; the source should slow down. (Can be seen in TCP Congestion control)
• Explicit Signalling:
• The node that experiences congestion can explicitly send a signal to the source or destination.
• The explicit-signalling method, however, is different from the choke-packet method. In the choke-
packet method, a separate packet is used for this purpose; in the explicit-signallingmethod, the signal
is included in the packets that carry data.
• Explicit signalling can occur in either the forward or the backward direction. (Can be seen in ATM
network)

01/24/2025 Computer Network Unit II 121


General Principles of Congestion Control

1.Monitor the system .


– detect when and where congestion occurs.
2.Pass information to where action can be taken.
3.Adjust system operation to correct the problem.

01/24/2025 Tanenbaum Chapter 5 Network 122


Congestion Prevention Policies
Policies that affect congestion.
5-26

01/24/2025 Tanenbaum Chapter 5 Network 123


Congestion Control in Virtual-Circuit Subnets

(a) A congested subnet. (b) A redrawn subnet, eliminates


congestion and a virtual circuit from A to B.
01/24/2025 Tanenbaum Chapter 5 Network 124
Hop-by-Hop Choke
Packets

(a) A choke packet that affects only the


source.

(b) A choke packet that affects each


hop it passes through.
01/24/2025 Tanenbaum Chapter 5 Network 125
Jitter Control

01/24/2025
(a) High jitter. (b) Low jitter.
Tanenbaum Chapter 5 Network 126
TCP Congestion Control Algorithms

• The Leaky Bucket Algorithm

• The Token Bucket Algorithm

01/24/2025 Computer Network Unit II 127


The Leaky Bucket Algorithm

(a) A leaky bucket with water. (b) a leaky bucket with packets.
01/24/2025 Tanenbaum Chapter 5 Network 128
The Token Bucket Algorithm

5-34

01/24/2025 (a) Before.


Tanenbaum Chapter (b)
5 Network After. 129
Admission Control
An example of flow specification.

5-34

01/24/2025 Tanenbaum Chapter 5 Network 130


Packet Scheduling

(a) A router with five packets queued for line O.


(b) Finishing times for the five packets.
01/24/2025 Tanenbaum Chapter 5 Network 131
RSVP-The ReSerVation Protocol

(a) A network, (b) The multicast spanning tree for host 1.


(c) The multicast spanning tree forTanenbaum
01/24/2025
host 2. Chapter 5 Network 132
RSVP-The ReSerVation Protocol (2)

(a) Host 3 requests a channel to host 1. (b) Host 3 then requests a second channel, to
host 2. (c) Host 5 requests a channelTanenbaum
01/24/2025
to host 1.
Chapter 5 Network 133
Expedited Forwarding
Expedited packets experience a traffic-free network.

01/24/2025 Tanenbaum Chapter 5 Network 134


Assured Forwarding
A possible implementation of the data flow for assured
forwarding.

01/24/2025 Tanenbaum Chapter 5 Network 135


Label Switching and MPLS
Transmitting a TCP segment using IP, MPLS, and PPP.

01/24/2025 Tanenbaum Chapter 5 Network 136


What are the different classes of IP address? Explain the concept private IP addresses. Where and why the NAT is used?

What is routing? Explain the difference between link state routing and distance vector routing

Consider any class-B network with default subnet mask. How many actual hosts can be connected in that network?
Divide that network into 8 equal subnets?
What is the new subnet mask?
What is the starting address of the 4th Subnet?
What is the last address of the 4e Subnet?
How many hosts can be connected in each subnet? (Give all details).

Explain IP With header format

Write a shot Note on


Count to infinity problem
Flooding
Selective Flooding
NAT
Subnatting Prepared By, Aparna K 137
Difference between datagram and virtual circuit

Explain stepwise the procedure carried out by DHCP client and DHCP Server. Draw diagrams showing the above communication

Explain in details Adaptive and Non Adaptive Algorithms

For a any given class B network with default subnet mask, how many host can be accommodated I each network. How can you divide into 4 equals
subnet? How many hosts can be accommodated in each sub-network?

Explain in details IPV4 and IPV6(With Formate)

Difference between leaky bucket and token bucket algorithm

What are the Private IP range

Prepared By, Aparna K 138

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