CN Module 3 Important Topics
CN Module 3 Important Topics
Connected devices in packet switched network still need to decide how to route the packets to
final destination
This is how the routing of packets take place, We use a forwarding table
A forwarding table consists of destination address and output interface
This table gets updated based on the best routing possible
Example: If a packet of desination A reached the router, it will be sent to interface 1
Example
Djikstras Algorithm
Single source shortest path algorithm
It means only one source is given
Shortest path from that source to all the nodes
Static routing
Doesnt make decision based on topology and network traffic
Algorithm
Example
We have 3 routers
Based on this new information, it finds theres a shorter distance X->Y->Z which is 3
At the end we get
When there are too many packets in a subnet, performance degrades, This is called
congestion
There are 2 types of mechanisms
open-loop congestion control (prevention)
closed-loop congestion control (removal)
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
Example retransmission policy used by TCP is designed to prevent or alleviate congestion
Window policy
Acknowledgement policy
Discarding policy
Admission policy
Choke Packet
Implicit signalling
Explicit Signalling
Node that experiences congestion, explicitly sends the signal to source or destination
Unlike choke packet where a seperate packet is sent, here the signal is included in the
packets that carry the data
There are 2 types of signalling
Forward signalling
Bit can be set in the packet moving in the direction of congestion
It uses policies like slowing down acknowledgments to fix the congestion
Backward signalling
Bit can be set in the packet moving against the direction of congestion
It can warn the source about the congestion
Priority Queuing
Mechanism to control the amount and the rate of the traffic sent to the network
The 2 techniques to shape traffic are
Leaky Bucket
If a bucket has a small hole at the bottom, the water leaks from the bucket at a constant
rate as long as there is water in the bucket.
The rate at which the water leaks does not depend on the rate at which the water is input
to the bucket unless the bucket is empty
The input rate can vary, but the output rate remains constant
Here, for 2 seconds, data is sent at 12 Mbps
Total Mb sent is 12 x 2 = 24 Mb
After waiting for 5 seconds
2 Mbps for 3 seconds
2 x 3 = 6 Mb
Total we have 30 Mb
This same thing we can distribute at 3Mbps across 10 seconds
So each second 3 Mb is sent
for 10 seconds its 10x3 = 30 Mb
A FIFO queue holds the packets. If the traffic consists of fixed-size packets, the process
removes a fixed number of packets from the queue at each tick of the clock.
If the traffic consists of variable-length packets, the fixed output rate must be based on the
number of bytes or bits.
A leaky bucket algorithm shapes bursty traffic into fixed-rate traffic by averaging the
data rate. It may drop the packets if the bucket is full.
Token Bucket
Resource reservation
Resources such as
Buffer
Bandwidth
CPU time
If these resources are reserved beforehand the quality of service can be improved
Admission control