0% found this document useful (0 votes)
73 views

Network Layer

The document discusses routing algorithms used at the network layer. It covers shortest path routing which finds the shortest path between routers on a graph by using different metrics like number of hops, distance, or delay. It also discusses flooding which sends packets along every path and distance vector routing where routers periodically exchange routing tables to know the best paths. A key limitation of distance vector routing is the count to infinity problem where bad network news propagates slowly. The document finally introduces link state routing where each router discovers neighbors, measures link costs, and shares this information to compute shortest paths free of the count to infinity problem.

Uploaded by

shivang pandey
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views

Network Layer

The document discusses routing algorithms used at the network layer. It covers shortest path routing which finds the shortest path between routers on a graph by using different metrics like number of hops, distance, or delay. It also discusses flooding which sends packets along every path and distance vector routing where routers periodically exchange routing tables to know the best paths. A key limitation of distance vector routing is the count to infinity problem where bad network news propagates slowly. The document finally introduces link state routing where each router discovers neighbors, measures link costs, and shares this information to compute shortest paths free of the count to infinity problem.

Uploaded by

shivang pandey
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 134

The Network Layer

Routing Algorithms
Distinction between routing and forwarding
One can think of a router as having two
processes inside it:
One of them handles each packet as it
arrives, looking up the outgoing line to use for
it in the routing tables. This process is
forwarding
The other process is responsible for filling in
and updating the routing tables. That is where
the routing algorithm comes into play
Shortest Path Routing
The idea is to build a graph of the subnet,
with each node of the graph representing
a router and each arc of the graph
representing a communication line (often
called a link)
To choose a route between a given pair of
routers, the algorithm just finds the
shortest path between them on the graph
Shortest Path Routing

 One way of measuring path length is the number of


hops
 Using this metric, the paths ABC and ABE in above
Fig. are equally long
 Another metric is the geographic distance in
kilometers, in which case ABC is clearly much longer
than ABE
Shortest Path Routing

 However, many other metrics besides hops and physical


distance are also possible
 For example, each arc could be labeled with the mean
queueing and transmission delay for some standard test
packet as determined by hourly test runs
 With this graph labeling, the shortest path is the fastest path
rather than the path with the fewest arcs or kilometers
Shortest Path Routing

 In the general case, the labels on the arcs could be


computed as a function of the distance, bandwidth,
average traffic, communication cost, mean queue
length, measured delay, and other factors
 By changing the weighting function, the algorithm
would then compute the ''shortest'' path measured
according to any one of a number of criteria or to a
combination of criteria.
Shortest Path Routing

The first 5 steps used in computing the shortest path from A to D. The arrows
indicate the working node.
Flooding
• Flooding is a form of static isolated routing.
• It Does not select a specific route when a
router receives a packet, it sends a copy of
the packet out on each line (except the one
on which it arrived)
• To prevent packets from looping forever,
each router decrements a hop count
contained in the packet header.
• Whenever the hop count decrements to zero,
the router discards the packet.
Flooding
• In selective flooding, a router sends packets
out only on those lines in the general
direction of the destination. That is, don't
send packets out on lines that clearly lead in
the wrong direction.
• There is usually little point in sending a
westbound packet on an eastbound line
unless the topology is extremely peculiar
and the router is sure of this fact
Flooding
• In selective flooding, a router sends packets
out only on those lines in the general
direction of the destination. That is, don't
send packets out on lines that clearly lead in
the wrong direction.
• There is usually little point in sending a
westbound packet on an eastbound line
unless the topology is extremely peculiar
and the router is sure of this fact
• Flooding always chooses the shortest path
because it chooses every possible path in
parallel.
Distance Vector Routing
(Dynamic routing algorithms )
 Modern computer networks generally use
dynamic routing algorithms rather than the
static ones described above because static
algorithms do not take the current network
load into account
 Two dynamic algorithms :
 Distance vector routing
 Link state routing
Distance Vector Routing

Routers work together.


1. Each router maintains a table (vector)
giving the best known distance to a
destination and the line to use for sending
there.
2. Tables are updated by exchanging
information with neighbors.
3. Each router knows the distance (cost) of
reaching its neighbors (e.g. send echo
requests).
Distance Vector Routing

• Router table maintained by a router is


indexed by and consisting one entry for,
each router in the subnet.
• This entry contains two parts :
– The preferred outgoing line to use for that
destination .
– Estimate of the time or distance to that
destination.
Distance Vector Routing
 Routers periodically exchange routing tables with
each of their neighbors.

 Upon receipt of an update, for each destination in


its table, a router:

– Compares the metric in its local table with the


metric in the neighbor's table plus the cost of
reaching that neighbor.

– if the path via the neighbor has a lower cost, the


router updates its local table to forward packets
to the neighbor.
Distance Vector Routing
Distance Vector Routing

26 41 18 37
Distance Vector Routing
(The Count to Infinity Problem)

• Distance vector routing has a serious drawback


in practice
• In particular, it reacts rapidly to good news, but
leisurely to bad news
• Consider a router whose best route to
destination X is large
• If on the next exchange neighbor A suddenly
reports a short delay to X, the router just
switches over to using the line to A to send traffic
to X. In one vector exchange, the good news is
processed.
Distance Vector Routing
(The Count to Infinity Problem)

Fig: Good news propagates fast

• Consider the five-node subnet, where the delay


metric is the number of hops
• Suppose A is down initially and all the other
routers know this. In other words, they have all
recorded the delay to A as infinity
Distance Vector Routing
(The Count to Infinity Problem)

Fig: Good news propagates fast


 When A comes up, the other routers learn about it via the vector
exchanges
 At the time of the first exchange, B learns that its left neighbor has
zero delay to A
 On the next exchange, C learns that B has a path of length 1 to A,
so it updates its routing table to indicate a path of length 2
 The good news is spreading at the rate of one hop per exchange
Distance Vector Routing
(The Count to Infinity Problem)

Fig: Bad news propagates Slow

• All the lines and routers are initially up


• Routers B, C, D, and E have distances to A of 1,
2, 3, and 4, respectively
• Suddenly A goes down, or alternatively, the line
between A and B is cut
Distance Vector Routing
(The Count to Infinity Problem)

Fig: Bad news propagates Slow

 At the first packet exchange, B does not hear anything from A.


Fortunately, C says: Do not worry; I have a path to A of length 2
 Little does B know that C's path runs through B itself
 B thinks it can reach A via C, with a path length of 3
 D and E do not update their entries for A on the first exchange
Distance Vector Routing
(The Count to Infinity Problem)

Fig: Bad news propagates Slow

 On the second exchange, C notices that each of


its neighbors claims to have a path to A of length
3
 It picks one of the them at random and makes its
new distance to A 4 and so on.
Distance Vector Routing
(The Count to Infinity Problem)

Fig: Bad news propagates Slow

 Gradually, all routers work their way up to


infinity, but the number of exchanges required
depends on the numerical value used for infinity
 This problem is known as the count-to-infinity
problem
Link State Routing
 Distance vector routing has two primary
problems caused its demise
 since the delay metric was queue length, it
did not take line bandwidth into account
when choosing routes
 the count-to-infinity problem
Link State Routing
Link State Routing
 The idea behind link state routing can
be stated as five parts. Each router
must do the following:
 Discover its neighbors and learn their network
addresses.
 Measure the delay or cost to each of its
neighbors.
 Construct a packet telling all it has just learned.
 Send this packet to all other routers.
 Compute the shortest path to every other router
Learn about the Neighbors

 A special hello packet is transmitted.


 The router on the other hand is expected to send back a reply telling
who it is.
 These names must be globally unique because when a distant router
later hears that three routers are all connected to F, it is essential that
it can determine whether or not all three mean the same F.
Learn about the Neighbors

• When two or more routers are connected by a LAN, the


situation is slightly more complicated
• One way to model the LAN is to consider it as a node
itself, as shown in Fig. (b).
• Here we have introduced a new, artificial node, N, to
which A, C, and F are connected
Measuring Line Cost
• The link state routing algorithm requires each
router to know, or at least have a reasonable
estimate, of the delay to each of its neighbors.
• The most direct wayside is required to send The
most direct way to determine this delay is to send
over the line a special ECHO packet that the other
side is required to send back immediately
• By measuring the round-trip time and dividing it by
two, the sending router can get a reasonable
estimate of the delay.
Measuring Line Cost
• An interesting issue is whether or not to take the
load into account when measuring the delay.
– To factor the load in, the round-trip timer must be
started when the ECHO packet is queued.
– To ignore the load, the timer should be started when the
ECHO packet reaches the front of the queue.
Measuring Line Cost
An argument against including the load in the delay calculation

 Consider the subnet of Fig, which is divided up into two parts, East and
West, connected by two lines, CF and EI.
 Suppose that most of the traffic between East and West is using line CF,
and as a result, this line is heavily loaded with long delays.
 Including queueing delay in the shortest path calculation will make EI
more attractive.
 After the new routing tables have been installed, most of the East-West
traffic will now go over EI, overloading this line.
 Consequently, in the next update, CF will appear to be the shortest path.
Measuring Line Cost
An argument against including the load in the delay calculation

• As a result, the routing tables may


oscillate wildly, leading to erratic routing
and many potential problems.
• If load is ignored and only bandwidth is
considered, this problem does not occur.
Alternatively, the load can be spread over
both lines, but this solution does not fully
utilize the best path.
Building Link State Packets
Once the information needed for the
exchange has been collected, the next
step is for each router to build a packet
containing all the data.
The packet starts with the identity of the
sender, followed by a sequence number
and age and a list of neighbors.
 For each neighbor, the delay to that
neighbor is given.
Building Link State Packets

 An example subnet is given in Fig. (a) with


delays shown in the lines.
 The corresponding link state packets for all six
routers are shown in Fig. (b)
Building Link State Packets
Building the link state packets is easy.
The hard part is determining when to build
them:
 One possibility is to build them periodically,
that is, at regular intervals.
Another possibility is when some significant
event occurs, such as a line or neighbor
going down or coming back up again, or
changing its properties appreciably.
Distributing the Link State Packets

Fig: The packet buffer for router B

The send flags mean that the packet must


be sent on the indicated line
The acknowledgement flags mean that it
must be acknowledged there
Distributing the Link State Packets

Fig: The packet buffer for router B

The link state packet from A arrives


directly, so it must be sent to C and F and
acknowledged to A
Similarly, the packet from F has to be
forwarded to A and C and acknowledged
to F
Distributing the Link State Packets

Fig: The packet buffer for router B

However, the situation with the third


packet, from E, is different. It arrived
twice, once via EAB and once via EFB
Consequently, it has to be sent only to C
but acknowledged to both A and F, as
indicated by the bits
Computing the New Routes
• Once a router has accumulated a full set
of link state packets
• Dijkstra's algorithm can be run locally to
construct the shortest path to all possible
destinations
Hierarchical Routing
Hierarchical Routing
Requirement:
Network size growth
• Routing table growth
• Send status--Consumes more bandwidth
• No longer feasible to give entry to every router
Limited Router memory
Limited CPU Speed
Hierarchical Routing

Fig: Hierarchical routing


Hierarchical Routing

Fig: Two Level Hierarchical routing


Broadcast Routing
• In some applications, hosts need to send
messages to many or all other hosts
• For example:
1) A service distributing weather reports
2) Stock market updates
3) Live radio programs
Broadcast Routing
 Various methods have been proposed for
doing Broadcasting:
 Send a distinct packet to each destination
 Flooding
 Multi-destination routing
 A spanning tree
 Reverse path forwarding
Network-Layer_Logical-Addressing
Links between two hosts
Communication at Network layer

• Is host to host (computer to computer)


• Usually computers communicate through internet
• This needs a global addressing scheme
– Logical Addressing
– or IP address in TCP/IP protocol suite
– IPv4 and IPv6
IPv4 (IP version 4)
• An IPv4 address is 32 bits long
• IPv4 addresses are unique
and universal
• The address space of IPv4 is
232 or 4,294,967,296
IPv4 Notations
• Binary
• Dotted-decimal notation

Base 256 : IP Addresses


Classful Addressing
• IPv4 addressing, at its inception, used the
concept of classes
• In classful addressing, the address space
is divided into five classes:
– A, B, C, D, and E
Finding the classes in binary and
dotted-decimal notation

Netid
Hostid
Netid and Hostid concept does not apply to clases D and E
Drawback: Classful addressing
• In Class A, block is too large
– most of addresses were wasted and were not
in use
• Block in Class B is also too large
• Block of Class C is probably too small for
many organizations
• Class D: multicast ---- The internet authorities wrongly
predicted a need for 268, 435, 456 groups. This never happened
• Class E: were reserved for future use -----only few were used
Classless Addressing
• No classes, but addresses are still granted
in blocks
• Restriction:
– The addresses in a block must be contiguous
– The number of addresses in a block must be
a power of 2 (1,2,4,8 ,……)
– The first address must be evenly divisible by
the number of addresses
Example: 01

• The above figure shows a block of addresses,


in both binary and dotted-decimal notation,
granted to a small business that needs 16
addresses
Example: 01 Contd…

• We can see that the restrictions are applied to this


block
– The addresses are contiguous
– The number of addresses is a power of 2  (16 = 24 )
– and the first address is divisible by 16
• The first address, when converted to a decimal number, is
3,440,387,360, which when divided by 16 results in 215,024,210
MASKING
• In IPv4 addressing, a block of
addresses can be defined as:
– x.y.z.t /n
• in which x.y.z.t defines one of the addresses
and the /n defines the mask
– The address and the /n notation
completely define the whole block
• the first address
• the last address
• and the number of addresses
MASKING Contd…..
• The first address in the block can be found by setting the
rightmost
32 − n bits to 0s

• The last address in the block can be found by setting the


rightmost
32 − n bits to 1s

• The number of addresses in the block can be found by


using the formula
232−n
Example-02
• A block of addresses is granted to a small
organization. We know that one of the
addresses is 205.16.37.39/28. What are
the first address, last address and number
of addresses in the block?
Example-02 Contd….
• The first address:
– The binary representation of the given
address (205.16.37.39 )is
• 11001101 00010000 00100101 00100111
– If we set 32−28 rightmost bits to 0, we get
• 11001101 00010000 00100101 00100000
or
205.16.37.32.
Example-02 Contd….
• The last address:
– The binary representation of the given
address (205.16.37.39 )is
• 11001101 00010000 00100101 00100111
– If we set 32−28 rightmost bits to 1, we get
• 11001101 00010000 00100101 0010000
or
205.16.37.47
Example-02 Contd….
• The number of addresses:
– 232−28 = 16
Another solution of Example-02
• The first address can be found by ANDing
the given addresses with the mask. ANDing
here is done bit by bit. The result of ANDing 2
bits is 1 if both bits are 1s; the result is 0
otherwise.
Another solution of Example-02
• The last address can be found by ORing the given
addresses with the complement of the mask. ORing
here is done bit by bit. The result of ORing 2 bits is 0
if both bits are 0s; the result is 1 otherwise. The
complement of a number is found by changing each
1 to 0 and each 0 to 1
Another solution of Example-02
• The last address can be found by ORing the given
addresses with the complement of the mask. ORing
here is done bit by bit. The result of ORing 2 bits is 0
if both bits are 0s; the result is 1 otherwise. The
complement of a number is found by changing each
1 to 0 and each 0 to 1
Another solution of Example-02
• The number of addresses can be found by
complementing the mask, interpreting it as a
decimal number, and adding 1 to it
Network Address
Three level Hierarchy: Subnetting
Network Address
Three level Hierarchy: Subnetting
Example -03
• An ISP is granted a block of addresses starting with
190.100.0.0/16 (65,536 addresses). The ISP needs to
distribute these addresses to three groups of
customers as follows:
a) The first group has 64 customers; each needs 256
addresses.
b) The second group has 128 customers; each needs 128
addresses.
c) The third group has 128 customers; each needs 64
addresses.
Design the subblocks and find out how many
addresses are still available after these allocations.
Address allocation and distribution
by an ISP
Network Address Translation (NAT)
• NAT enables a user to have a large set of
addresses internally
• and one address, or small set of addresses
externally

Addresses for private networks reserved by internet authorities


A NAT implementation
Addresses in a NAT
NAT address translation
An Example: ISP and NAT

100,000 dialup Customers


IPv6
• An IPv6 address is 128 bits long

• IPv6 address in binary and hexadecimal


colon notation:
Abbreviated IPv6 addresses
Assignment
1. An organization is granted the block
211.17.180.0/24. The administrator wants to
creat 32 subnets
1. Find the subnet mask
2. Find the first and last addresses of Subnet-01 and
Subnet -32
2. Find the shortest form of the following
addresses:
1. FE80:0000:0000:0000:0000:0000:0000:0123
2. FEC0:0000:0000:0000:0000:0000:0000:0123
Transition strategies from IPv4 to
IPv6
Dual Stack

• A station must run IPv4 and IPv6 simultaneously until all


the Internet uses IPv6.
• Which version supposed to be used to send a packet will
be decided by DNS.
Tunneling

• Two computers using IPv6 want to communicate


• And the packet must pass through a region that
uses IPv4.
Header Translation

• The sender wants to use IPv6 but receiver does


not understand IPV6
• In this case, tunneling will not work. Therefore
the header of the IPv6 packet is converted to an
IPv4 header.
Transport Layer
• Process-to-Process Delivery
• The Internet model has three protocols at
transport layer:
– UDP
– TCP
– SCTP
Process-to-Process Data Delivery
Addressing
• Node to node : MAC Address
• Host to Host : IP Address
• Process To Process : Port Address
IP addresses versus port numbers
Socket address

• Process to process delivery needs two


identifiers, IP address and the port number, at
each end to make a connection.
• The combination of IP address and the port
number is called a socket address
Multiplexing and demultiplexing
Connectionless Vs Connection
oriented
• UDP : Connectionless & unreliable
• TCP and SCTP : Connection oriented &
Reliable
– Reliable: implementation of flow and error
control at transport layer.
– This means slow and more complex service.
USER DATAGRAM PROTOCOL
(UDP)
• Very simple protocol using a minimum of
overhead.
• Connectionless and unreliable
• Can be use for small message where reliability
is not require
UDP Operation
• Connectionless services
• No flow and error control
– No window mechanism
UDP Operation Contd…..
• Queuing in UDP:
– When a message arrive and the incoming queue don’t exit or
full…… then UDP discard the user datagram
– And asks the ICMP protocol to send a port not reachable
message to sending process.
UDP Operation Contd…..
• Use of UDP:
– Suitable for simple request-response communication
with little concern for flow and error control
– Suitable for multicasting
– Used for management processes such as SNMP
– Used for routing updating protocols
TRANSMISSION CONTROL
PROTOCOL (TCP)

• TCP is a connection-oriented and reliable


transport protocol
– It adds connection-oriented and reliability
features to the services of IP
TCP contd….
• Stream delivery services
– Data as a stream of bytes
– By creating an environment in which two processes
seem to be connected by an imaginary tube….
TCP contd….
• Sending and receiving Buffers
TCP contd….
• TCP Segments
TCP contd….
• Full Duplex Services
• Connection Oriented service
– The two TCPs establish a connection betn
them
– Data are exchanged in both directions
– The connection is terminated
• Reliable Service
– TCP uses an Ack mechanism to check the
safe and sound arrival of data
Control field
TCP contd….
• A TCP Connection
– Connection establishment using three-way
handshaking
TCP contd….
• A TCP Connection
– Data transfer
TCP contd….
• A TCP Connection
– Connection
termination
A TCP normal Operation
A Lost segment
A Fast Retransmission
• This scenario is
same as Lost
segment except
that the RTO
(retransmission
Time out) value is
higher.
STREAM CONTROL TRANSMISSION
PROTOCOL (SCTP)

• UDP is a message oriented, connectionless, and


unreliable protocol

• TCP is a byte oriented, connection-oriented and reliable


protocol

• SCTP is a message oriented, connection-oriented and


reliable protocol

• combines the best features of UDP and TCP


SCTP Applications
SCTP Additional Features

• Multiple stream concept


SCTP Additional Features

• Multihoming
Congestion Control Algorithms
When too many packets are present in a
part of the subnet, performance degrades.
This situation is called Congestion
Queues in a router

• Congestion
– Arrival rate > Packet processing Rate
– Departure rate < Packet processing Rate
Packet delay and throughput as functions of load
Congestion Control Algorithms
Congestion Control Algorithms

 However, as traffic increases too far, the routers


are no longer able to cope and they begin losing
packets.
 This tends to make matters worse. At very high
trafffic, performance collapses completely and
almost no packets are delivered
Congestion Control Algorithms
 Congestion can be brought on by several factors:
 insufficient memory
 If all of a sudden, streams of packets begin arriving on three or
four input lines and all need the same output line, a queue will
build up. If there is insufficient memory to hold all of them,
packets will be lost

 Adding more memory may help up to a point. if routers have an


infinite amount of memory, congestion gets worse, not better,
because by the time packets get to the front of the queue, they
have already timed out (repeatedly) and duplicates have been
sent. All these packets will be dutifully forwarded to the next
router, increasing the load all the way to the destination
Congestion Control Algorithms
Congestion can be brought on by several
factors:
Slow processors
If the routers' CPUs are slow at performing
the bookkeeping tasks required of them
(queueing buffers, updating tables, etc.),
queues can build up, even though there is
excess line capacity
Difference between congestion
Control and Flow control

?
Difference between congestion
Control and Flow control
 Congestion control:
 Makes sure the subnet is able to carry the offered traffic
 It is a global issue, involving the behavior of all the hosts, all the
routers, the store-and-forwarding processing within the routers,
and all the other factors that tend to diminish the carrying
capacity of the subnet
 Flow control:
 Relates to the point-to-point traffic
 Its job is to make sure that a fast sender cannot continually
transmit data faster than the receiver is able to absorb it
 Flow control frequently involves some direct feedback from the
receiver to the sender to tell the sender how things are doing at
the other end
General Principles of Congestion
Control
Can be viewed from a control theory point
of view
This approach leads to dividing all
solutions into two groups:
Open loop
Closed loop
General Principles of Congestion Control
(Open loop systems)
These systems are designed to minimize
congestion in the first place, rather than
letting it happen and reacting after the fact
Tools for doing open-loop control include
deciding when to accept new traffic,
deciding when to discard packets and
which ones, and making scheduling
decisions at various points in the network
General Principles of Congestion Control
(Close loop systems)
 Closed loop solutions are based on the
concept of a feedback loop
 This approach has three parts when
applied to congestion control:
1) Monitor the system to detect when and where
congestion occurs
2) Pass this information to places where action can
be taken
3) Adjust system operation to correct the problem
General Principles of Congestion Control
(Close Loop systems)
Monitoring the system: A variety of metrics can be
used to monitor the subnet for congestion.
Chief among these are:
1) the percentage of all packets discarded for lack of buffer
space
2) the average queue lengths
3) the number of packets that time out and are retransmitted
4) the average packet delay
5) the standard deviation of packet delay
In all cases, rising numbers indicate growing
congestion.
General Principles of Congestion Control
(Close Loop systems)
 The Feedback Loop: To transfer the
information about the congestion from the
point where it is detected to the point where
something can be done about it
1) One way is for the router detecting the congestion to send
a packet to the traffic source or sources, announcing the
problem
2) Other possibility is to send a bit or field reserved in every
packet for routers to fill in whenever congestion gets above
some threshold level
3) Third approach is to have hosts or routers periodically send
probe packets out to explicitly ask about congestion. This
information can then be used to route traffic around
problem areas
General Principles of Congestion Control
(Close Loop systems)
Adjust system operation :
 Two possible solutions:
1) Increase the resources
2) Decrease the load
Congestion Prevention Policies
(Open Loop Systems)
 They try to achieve their goal by using appropriate
policies at various levels
Congestion Prevention Policies
(Open Loop Systems)
 The retransmission policy is concerned with how fast
a sender times out and what it transmits upon
timeout
 A jumpy sender that times out quickly and retransmits all
outstanding packets using go back n will put a heavier load on
the system than will a leisurely sender that uses selective
repeat
 Buffering policy :If receivers routinely discard all out-
of-order packets, these packets will have to be
transmitted again later, creating extra load
 If receivers routinely discard all out-of-order packets, these
packets will have to be transmitted again later, creating
extra load
Congestion Prevention Policies
(Open Loop Systems)
 Acknowledgement policy : If each packet is
acknowledged immediately, the
acknowledgement packets generate extra
traffic. However, if acknowledgements are
saved up to piggyback onto reverse traffic,
extra timeouts and retransmissions may
result
 A tight flow control scheme (e.g., a small window)
reduces the data rate and thus helps fight
congestion
Congestion Prevention Policies
(Open Loop Systems)
 At the network layer, the choice between using
virtual circuits and using datagrams affects
congestion since many congestion control
algorithms work only with virtual-circuit subnets
 Packet queueing and service policy relates to
whether routers have one queue per input line, one
queue per output line, or both
 Discard policy is the rule telling which packet is
dropped when there is no space. A good policy can
help alleviate congestion and a bad one can make it
worse.
Congestion Prevention Policies
(Open Loop Systems)
 A good routing algorithm can help avoid
congestion by spreading the traffic over all
the lines, whereas a bad one can send too
much traffic over already congested lines
 Packet lifetime management deals with how
long a packet may live before being
discarded
 If it is too long, lost packets may clog up the works
for a long time, but if it is too short, packets may
sometimes time out before reaching their
destination, thus inducing retransmissions
Congestion Control in Virtual-
Circuit Subnets
 One technique that is widely used to keep
congestion that has already started from
getting worse is admission control
The idea is simple: once congestion has been
signaled, no more virtual circuits are set up until the
problem has gone away
Congestion Control in Virtual
Circuit Subnets
 An alternative approach is to allow new virtual
circuits but carefully route all new virtual circuits
around problem areas

(a) A congested subnet. (b) A redrawn subnet that eliminates the


congestion
Congestion Control in Datagram Subnets
(The Warning Bit)
 Routers signaled the warning state by setting a
special bit in the packet's header
 When the packet arrived at its destination, the
transport entity copied the bit into the next
acknowledgement sent back to the source
 The source then cut back on traffic
 As long as the router was in the warning state, it
continued to set the warning bit, which meant that
the source continued to get acknowledgements
with it set
 The source monitored the fraction of
acknowledgements with the bit set and adjusted its
transmission rate accordingly
Congestion Control in Datagram Subnets
(Choke Packets )

 In this approach, the router sends a choke


packet back to the source host
 When the source host gets the choke packet, it
is required to reduce the traffic sent to the
specified destination by X percent
Congestion Control in Datagram Subnets
(Hop-by-Hop Choke Packets )

Fig:(a) A choke packet that


affects only the source. (b) A
choke packet that affects each
hop it passes through

You might also like