SlideShare a Scribd company logo
Router
• Routing is a three layer switch.
1. Direct Delivery
• Host-to-host
• Router-to-host
connecting devices part-2: Router  and  its uses
2. Indirect Delivery
• Through one or more routers.
connecting devices part-2: Router  and  its uses
Several alternatives possible:
a) Next-hop routing-Only holds the next hop
instead of full path
b) Network-specific routing- Only specify the
network address instead of every host
c) Host-specific routing-Destination host is
given in routing table.
d) Default routing- One entry for default.
Next Hop Routing
Network specific routing
Host specific addressing
Default Routing
Routing Table
1. Static
• Contains information inserted
manually.
• Does not change with time.
2. Dynamic
• Updated periodically depending on
network condition.
• Uses protocols like RIP, OSPF, BGP,
etc.
Congestion Control
Congestion is a situation in which too many packets
are present in (a part of) the subnet,
performance degrades.
Factors causing congestion:
• The input traffic rate exceeds the capacity of the
output lines.
• The routers are too slow to perform bookkeeping
tasks (queuing buffers, updating tables, etc.).
• The routers' buffer is too limited.
Perfect
Desirabl
e
Congest
ed
Packets
sent
P
a
c
k
et
s
d
el
iv
er
e
d
Max. carrying
capacity of subnet
When too much traffic is offered, congestion sets in and performance
degrades sharply.
Congestion control is different from flow control:
• Congestion is a global issue, involving the behavior of all
the hosts, all the routers, the store-and-forward processing
within the routers, etc.
• Flow control relates to the point-to-point traffic between a
given sender and a given receiver.
• A situation requiring flow control: a fiber optic network
with a capacity of 1000 gigabits/sec on which a
supercomputer was trying to transfer a file to a personal
computer at 1Gbps.
• A situation requiring congestion control: a store-and-
forward network with 1-Mbps lines and 1000 large
minicomputers, half of which were trying to transfer files at
100 kbps to the other half.
General principles of congestion control
Open loop solutions solve the problem by good design, in essence,
to make sure the problem does not occur in the first place.
• Tools include deciding when to accept new traffic, when to discard
packets and which ones, and how to schedule packets at various
points in the network.
• A common fact: they make decisions without regard to the current
state of the network.
• Closed loop solutions are based on the concept of a feedback loop,
which consists of the following three parts:
– Monitor the system to detect when and where congestion occurs.
– Pass this information to places where actions can be taken.
– Adjust system operation to correct the problem.
How to correct the congestion problem?
• Increase the resource:
– Using an additional line to temporarily increase the
bandwidth between certain points.
– Splitting traffic over multiple routes.
– Using spare (extra) routers.
• Decrease the load:
– denying service to some users,
– degrading service to some or all users, and
– having users schedule their demands in a more
predictable way.
Congestion prevention policies
• The open loop congestion control approach tries
to achieve the goal by using appropriate policies
at various levels.
Traffic shaping
• One of the main causes of congestion is that
traffic is often bursty. Another open loop method
is forcing the packets to be transmitted at a more
predictable rate. This method is widely used in
ATM networks and is called traffic shaping.
The leaky bucket algorithm
• Each host is connected to the network by an
interface containing a leaky bucket - a finite
internal queue.
• The outflow is at a constant rate when there is
any packet in the bucket, and zero when the
bucket is empty.
• If a packet arrives at the bucket when it is full,
the packet is discarded.
Host Computer
packets
Unregulated
flow
The bucket holds
packets
Regulated flow
Network
Interface
containing a
leaky bucket
The token bucket algorithm
• The leaky bucket algorithm enforces a rigid output pattern at the
average rate, no matter how bursty the traffic is.
• For many applications, it is better to allow the output to speed up
somewhat when large bursts arrive, so a more flexible algorithm is
needed, preferably on that never loses data.
• The bucket holds tokens, generated by a clock at the rate of one
token every sec.
• For a packet to be transmitted, it must capture and destroy one
token.
• The token bucket algorithm allows saving up to the maximum size
of the bucket, which means that bursts of up to packets can be sent
at the maximum speed (for a certain period of time).
Host
computer
- -
-
Host computer
The bucket
holds token
One
token
is
added
to the
bucket
every
sec.
Networks Networks
Difference between Leaky bucket and
Token bucket algorithms:
• The Token bucket algorithm provides a different kind of traffic shaping than
the Leaky bucket algorithm.
• Such as:
• The leaky bucket algorithm does not allow idle hosts to save up permission to
send large burst later. Where as token bucket algorithm does allow saving, up
to the maximum size of the bucket, n i.e. at a time n packets can send through
the hole.
• Token bucket algorithm throws away tokens when the bucket fills up but
never discards packets. Where as the leaky bucket algorithm discards packets
when the bucket fills up.
• In token bucket algorithm, regulating the host and router to stop sending
packets while bucket’s input still pouring in may result in lost data. To
implement this system, token bucket used one variable that counts token. The
counter is incremented by one every second and decremented by one whenever
a packet is sent. When the counter is zero, no packets may be sent. Where as in
leaky bucket algorithm, there is no scheme to do this.
Ad

More Related Content

Similar to connecting devices part-2: Router and its uses (20)

Routing Protocols
Routing ProtocolsRouting Protocols
Routing Protocols
Dr.Ashvini Chaudhari Bhongade
 
CN Module 5 part 2 2022.pdf
CN Module 5 part 2 2022.pdfCN Module 5 part 2 2022.pdf
CN Module 5 part 2 2022.pdf
MayankRaj687571
 
QoSintro.PPT
QoSintro.PPTQoSintro.PPT
QoSintro.PPT
payal445263
 
Module 2.pptx.............sdvsdcdssdfsdf
Module 2.pptx.............sdvsdcdssdfsdfModule 2.pptx.............sdvsdcdssdfsdf
Module 2.pptx.............sdvsdcdssdfsdf
Shivakrishnan18
 
RIPE 80: Buffers and Protocols
RIPE 80: Buffers and ProtocolsRIPE 80: Buffers and Protocols
RIPE 80: Buffers and Protocols
APNIC
 
RIPE 76: TCP and BBR
RIPE 76: TCP and BBRRIPE 76: TCP and BBR
RIPE 76: TCP and BBR
APNIC
 
lect10_interconnect.ppt
lect10_interconnect.pptlect10_interconnect.ppt
lect10_interconnect.ppt
p096309MuhammadIshaq
 
Traffic Characterization
Traffic CharacterizationTraffic Characterization
Traffic Characterization
Ismail Mukiibi
 
AusNOG 2019: TCP and BBR
AusNOG 2019: TCP and BBRAusNOG 2019: TCP and BBR
AusNOG 2019: TCP and BBR
APNIC
 
Congestion control
Congestion controlCongestion control
Congestion control
Principal,Guru Nanak Institute of Technology, Nagpur
 
unit 3 computer networks-switching,packet switching,internet protocol.
unit 3 computer networks-switching,packet switching,internet protocol.unit 3 computer networks-switching,packet switching,internet protocol.
unit 3 computer networks-switching,packet switching,internet protocol.
venigkrish89
 
High performance browser networking ch1,2,3
High performance browser networking ch1,2,3High performance browser networking ch1,2,3
High performance browser networking ch1,2,3
Seung-Bum Lee
 
Conjestion control
Conjestion controlConjestion control
Conjestion control
Barani Tharan
 
qos-f05 (2).ppt
qos-f05 (2).pptqos-f05 (2).ppt
qos-f05 (2).ppt
AshwiniKatkar3
 
qos-f05.pdf
qos-f05.pdfqos-f05.pdf
qos-f05.pdf
Tamer Nadeem
 
qos-f05.ppt
qos-f05.pptqos-f05.ppt
qos-f05.ppt
SahithiSahithiD
 
qos-f05 (3).ppt
qos-f05 (3).pptqos-f05 (3).ppt
qos-f05 (3).ppt
AshwiniKatkar3
 
Quality of service
Quality of serviceQuality of service
Quality of service
Ismail Mukiibi
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
ushabarad142
 
Transport layer
Transport layerTransport layer
Transport layer
arvind pandey
 

More from khushboos0911 (7)

High-level Data Link Control presentation
High-level Data Link Control presentationHigh-level Data Link Control presentation
High-level Data Link Control presentation
khushboos0911
 
Medium Access Control Protocols- detailed explanation
Medium Access Control Protocols- detailed explanationMedium Access Control Protocols- detailed explanation
Medium Access Control Protocols- detailed explanation
khushboos0911
 
introduction to connecting devices, advantages and disadvantages
introduction to connecting devices, advantages and disadvantagesintroduction to connecting devices, advantages and disadvantages
introduction to connecting devices, advantages and disadvantages
khushboos0911
 
WIDEBAND CODE DIVISION MULTIPLE ACEESS CHANNEL
WIDEBAND CODE DIVISION MULTIPLE ACEESS CHANNELWIDEBAND CODE DIVISION MULTIPLE ACEESS CHANNEL
WIDEBAND CODE DIVISION MULTIPLE ACEESS CHANNEL
khushboos0911
 
umts logical channels, it's type and description
umts logical channels, it's type and descriptionumts logical channels, it's type and description
umts logical channels, it's type and description
khushboos0911
 
UMTS_AIR_INTERFACE_SPECIFICATION_AND_VARIOUS_INTERFACESppt
UMTS_AIR_INTERFACE_SPECIFICATION_AND_VARIOUS_INTERFACESpptUMTS_AIR_INTERFACE_SPECIFICATION_AND_VARIOUS_INTERFACESppt
UMTS_AIR_INTERFACE_SPECIFICATION_AND_VARIOUS_INTERFACESppt
khushboos0911
 
UMTS security procedure: authentication and key procedure
UMTS security procedure: authentication and key procedureUMTS security procedure: authentication and key procedure
UMTS security procedure: authentication and key procedure
khushboos0911
 
High-level Data Link Control presentation
High-level Data Link Control presentationHigh-level Data Link Control presentation
High-level Data Link Control presentation
khushboos0911
 
Medium Access Control Protocols- detailed explanation
Medium Access Control Protocols- detailed explanationMedium Access Control Protocols- detailed explanation
Medium Access Control Protocols- detailed explanation
khushboos0911
 
introduction to connecting devices, advantages and disadvantages
introduction to connecting devices, advantages and disadvantagesintroduction to connecting devices, advantages and disadvantages
introduction to connecting devices, advantages and disadvantages
khushboos0911
 
WIDEBAND CODE DIVISION MULTIPLE ACEESS CHANNEL
WIDEBAND CODE DIVISION MULTIPLE ACEESS CHANNELWIDEBAND CODE DIVISION MULTIPLE ACEESS CHANNEL
WIDEBAND CODE DIVISION MULTIPLE ACEESS CHANNEL
khushboos0911
 
umts logical channels, it's type and description
umts logical channels, it's type and descriptionumts logical channels, it's type and description
umts logical channels, it's type and description
khushboos0911
 
UMTS_AIR_INTERFACE_SPECIFICATION_AND_VARIOUS_INTERFACESppt
UMTS_AIR_INTERFACE_SPECIFICATION_AND_VARIOUS_INTERFACESpptUMTS_AIR_INTERFACE_SPECIFICATION_AND_VARIOUS_INTERFACESppt
UMTS_AIR_INTERFACE_SPECIFICATION_AND_VARIOUS_INTERFACESppt
khushboos0911
 
UMTS security procedure: authentication and key procedure
UMTS security procedure: authentication and key procedureUMTS security procedure: authentication and key procedure
UMTS security procedure: authentication and key procedure
khushboos0911
 
Ad

Recently uploaded (20)

Lecture - 7 Canals of the topic of the civil engineering
Lecture - 7  Canals of the topic of the civil engineeringLecture - 7  Canals of the topic of the civil engineering
Lecture - 7 Canals of the topic of the civil engineering
MJawadkhan1
 
Water Industry Process Automation & Control Monthly May 2025
Water Industry Process Automation & Control Monthly May 2025Water Industry Process Automation & Control Monthly May 2025
Water Industry Process Automation & Control Monthly May 2025
Water Industry Process Automation & Control
 
Control Methods of Noise Pollutions.pptx
Control Methods of Noise Pollutions.pptxControl Methods of Noise Pollutions.pptx
Control Methods of Noise Pollutions.pptx
vvsasane
 
IPC-7711D-7721D_ EN 2023 TOC Rework, Modification and Repair of Electronic As...
IPC-7711D-7721D_ EN 2023 TOC Rework, Modification and Repair of Electronic As...IPC-7711D-7721D_ EN 2023 TOC Rework, Modification and Repair of Electronic As...
IPC-7711D-7721D_ EN 2023 TOC Rework, Modification and Repair of Electronic As...
ssuserd9338b
 
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning ModelsMode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Journal of Soft Computing in Civil Engineering
 
AI Chatbots & Software Development Teams
AI Chatbots & Software Development TeamsAI Chatbots & Software Development Teams
AI Chatbots & Software Development Teams
Joe Krall
 
Agents chapter of Artificial intelligence
Agents chapter of Artificial intelligenceAgents chapter of Artificial intelligence
Agents chapter of Artificial intelligence
DebdeepMukherjee9
 
David Boutry - Specializes In AWS, Microservices And Python
David Boutry - Specializes In AWS, Microservices And PythonDavid Boutry - Specializes In AWS, Microservices And Python
David Boutry - Specializes In AWS, Microservices And Python
David Boutry
 
Slide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptxSlide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptx
vvsasane
 
Jacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia - Excels In Optimizing Software ApplicationsJacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia
 
698642933-DdocfordownloadEEP-FAKE-PPT.pptx
698642933-DdocfordownloadEEP-FAKE-PPT.pptx698642933-DdocfordownloadEEP-FAKE-PPT.pptx
698642933-DdocfordownloadEEP-FAKE-PPT.pptx
speedcomcyber25
 
Modeling the Influence of Environmental Factors on Concrete Evaporation Rate
Modeling the Influence of Environmental Factors on Concrete Evaporation RateModeling the Influence of Environmental Factors on Concrete Evaporation Rate
Modeling the Influence of Environmental Factors on Concrete Evaporation Rate
Journal of Soft Computing in Civil Engineering
 
[PyCon US 2025] Scaling the Mountain_ A Framework for Tackling Large-Scale Te...
[PyCon US 2025] Scaling the Mountain_ A Framework for Tackling Large-Scale Te...[PyCon US 2025] Scaling the Mountain_ A Framework for Tackling Large-Scale Te...
[PyCon US 2025] Scaling the Mountain_ A Framework for Tackling Large-Scale Te...
Jimmy Lai
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
Dahua Smart Cityyyyyyyyyyyyyyyyyy2025.pdf
Dahua Smart Cityyyyyyyyyyyyyyyyyy2025.pdfDahua Smart Cityyyyyyyyyyyyyyyyyy2025.pdf
Dahua Smart Cityyyyyyyyyyyyyyyyyy2025.pdf
PawachMetharattanara
 
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdfLittle Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
gori42199
 
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Journal of Soft Computing in Civil Engineering
 
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFTDeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
Kyohei Ito
 
Working with USDOT UTCs: From Conception to Implementation
Working with USDOT UTCs: From Conception to ImplementationWorking with USDOT UTCs: From Conception to Implementation
Working with USDOT UTCs: From Conception to Implementation
Alabama Transportation Assistance Program
 
Personal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.pptPersonal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.ppt
ganjangbegu579
 
Lecture - 7 Canals of the topic of the civil engineering
Lecture - 7  Canals of the topic of the civil engineeringLecture - 7  Canals of the topic of the civil engineering
Lecture - 7 Canals of the topic of the civil engineering
MJawadkhan1
 
Control Methods of Noise Pollutions.pptx
Control Methods of Noise Pollutions.pptxControl Methods of Noise Pollutions.pptx
Control Methods of Noise Pollutions.pptx
vvsasane
 
IPC-7711D-7721D_ EN 2023 TOC Rework, Modification and Repair of Electronic As...
IPC-7711D-7721D_ EN 2023 TOC Rework, Modification and Repair of Electronic As...IPC-7711D-7721D_ EN 2023 TOC Rework, Modification and Repair of Electronic As...
IPC-7711D-7721D_ EN 2023 TOC Rework, Modification and Repair of Electronic As...
ssuserd9338b
 
AI Chatbots & Software Development Teams
AI Chatbots & Software Development TeamsAI Chatbots & Software Development Teams
AI Chatbots & Software Development Teams
Joe Krall
 
Agents chapter of Artificial intelligence
Agents chapter of Artificial intelligenceAgents chapter of Artificial intelligence
Agents chapter of Artificial intelligence
DebdeepMukherjee9
 
David Boutry - Specializes In AWS, Microservices And Python
David Boutry - Specializes In AWS, Microservices And PythonDavid Boutry - Specializes In AWS, Microservices And Python
David Boutry - Specializes In AWS, Microservices And Python
David Boutry
 
Slide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptxSlide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptx
vvsasane
 
Jacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia - Excels In Optimizing Software ApplicationsJacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia
 
698642933-DdocfordownloadEEP-FAKE-PPT.pptx
698642933-DdocfordownloadEEP-FAKE-PPT.pptx698642933-DdocfordownloadEEP-FAKE-PPT.pptx
698642933-DdocfordownloadEEP-FAKE-PPT.pptx
speedcomcyber25
 
[PyCon US 2025] Scaling the Mountain_ A Framework for Tackling Large-Scale Te...
[PyCon US 2025] Scaling the Mountain_ A Framework for Tackling Large-Scale Te...[PyCon US 2025] Scaling the Mountain_ A Framework for Tackling Large-Scale Te...
[PyCon US 2025] Scaling the Mountain_ A Framework for Tackling Large-Scale Te...
Jimmy Lai
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
Dahua Smart Cityyyyyyyyyyyyyyyyyy2025.pdf
Dahua Smart Cityyyyyyyyyyyyyyyyyy2025.pdfDahua Smart Cityyyyyyyyyyyyyyyyyy2025.pdf
Dahua Smart Cityyyyyyyyyyyyyyyyyy2025.pdf
PawachMetharattanara
 
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdfLittle Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
gori42199
 
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFTDeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
Kyohei Ito
 
Personal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.pptPersonal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.ppt
ganjangbegu579
 
Ad

connecting devices part-2: Router and its uses

  • 1. Router • Routing is a three layer switch. 1. Direct Delivery • Host-to-host • Router-to-host
  • 3. 2. Indirect Delivery • Through one or more routers.
  • 5. Several alternatives possible: a) Next-hop routing-Only holds the next hop instead of full path b) Network-specific routing- Only specify the network address instead of every host c) Host-specific routing-Destination host is given in routing table. d) Default routing- One entry for default.
  • 10. Routing Table 1. Static • Contains information inserted manually. • Does not change with time. 2. Dynamic • Updated periodically depending on network condition. • Uses protocols like RIP, OSPF, BGP, etc.
  • 11. Congestion Control Congestion is a situation in which too many packets are present in (a part of) the subnet, performance degrades. Factors causing congestion: • The input traffic rate exceeds the capacity of the output lines. • The routers are too slow to perform bookkeeping tasks (queuing buffers, updating tables, etc.). • The routers' buffer is too limited.
  • 12. Perfect Desirabl e Congest ed Packets sent P a c k et s d el iv er e d Max. carrying capacity of subnet When too much traffic is offered, congestion sets in and performance degrades sharply.
  • 13. Congestion control is different from flow control: • Congestion is a global issue, involving the behavior of all the hosts, all the routers, the store-and-forward processing within the routers, etc. • Flow control relates to the point-to-point traffic between a given sender and a given receiver. • A situation requiring flow control: a fiber optic network with a capacity of 1000 gigabits/sec on which a supercomputer was trying to transfer a file to a personal computer at 1Gbps. • A situation requiring congestion control: a store-and- forward network with 1-Mbps lines and 1000 large minicomputers, half of which were trying to transfer files at 100 kbps to the other half.
  • 14. General principles of congestion control Open loop solutions solve the problem by good design, in essence, to make sure the problem does not occur in the first place. • Tools include deciding when to accept new traffic, when to discard packets and which ones, and how to schedule packets at various points in the network. • A common fact: they make decisions without regard to the current state of the network. • Closed loop solutions are based on the concept of a feedback loop, which consists of the following three parts: – Monitor the system to detect when and where congestion occurs. – Pass this information to places where actions can be taken. – Adjust system operation to correct the problem.
  • 15. How to correct the congestion problem? • Increase the resource: – Using an additional line to temporarily increase the bandwidth between certain points. – Splitting traffic over multiple routes. – Using spare (extra) routers. • Decrease the load: – denying service to some users, – degrading service to some or all users, and – having users schedule their demands in a more predictable way.
  • 16. Congestion prevention policies • The open loop congestion control approach tries to achieve the goal by using appropriate policies at various levels. Traffic shaping • One of the main causes of congestion is that traffic is often bursty. Another open loop method is forcing the packets to be transmitted at a more predictable rate. This method is widely used in ATM networks and is called traffic shaping.
  • 17. The leaky bucket algorithm • Each host is connected to the network by an interface containing a leaky bucket - a finite internal queue. • The outflow is at a constant rate when there is any packet in the bucket, and zero when the bucket is empty. • If a packet arrives at the bucket when it is full, the packet is discarded.
  • 18. Host Computer packets Unregulated flow The bucket holds packets Regulated flow Network Interface containing a leaky bucket
  • 19. The token bucket algorithm • The leaky bucket algorithm enforces a rigid output pattern at the average rate, no matter how bursty the traffic is. • For many applications, it is better to allow the output to speed up somewhat when large bursts arrive, so a more flexible algorithm is needed, preferably on that never loses data. • The bucket holds tokens, generated by a clock at the rate of one token every sec. • For a packet to be transmitted, it must capture and destroy one token. • The token bucket algorithm allows saving up to the maximum size of the bucket, which means that bursts of up to packets can be sent at the maximum speed (for a certain period of time).
  • 20. Host computer - - - Host computer The bucket holds token One token is added to the bucket every sec. Networks Networks
  • 21. Difference between Leaky bucket and Token bucket algorithms: • The Token bucket algorithm provides a different kind of traffic shaping than the Leaky bucket algorithm. • Such as: • The leaky bucket algorithm does not allow idle hosts to save up permission to send large burst later. Where as token bucket algorithm does allow saving, up to the maximum size of the bucket, n i.e. at a time n packets can send through the hole. • Token bucket algorithm throws away tokens when the bucket fills up but never discards packets. Where as the leaky bucket algorithm discards packets when the bucket fills up. • In token bucket algorithm, regulating the host and router to stop sending packets while bucket’s input still pouring in may result in lost data. To implement this system, token bucket used one variable that counts token. The counter is incremented by one every second and decremented by one whenever a packet is sent. When the counter is zero, no packets may be sent. Where as in leaky bucket algorithm, there is no scheme to do this.
  翻译: