SlideShare une entreprise Scribd logo
1  sur  22
Group members:
Aqsa Imtiaz
Zainab Tariq
Shaheer Ali
Huda Naseer
1
TOPIC:
LEAKY BUCKET ALGORITHM
2
Outlines:
 Congestion
 Traffic Shaping
 Introduction
 Algorithm Example
 Uses
 Advantages & Disadvantages
3
Congestion
Internet can be considered as a Queue of packets, where
transmitting nodes are constantly adding packets and some of
them (receiving nodes) are removing packets from the queue.
Consider a situation where too many packets are present in this
queue, such that constantly transmitting nodes are pouring
packets at a higher rate than receiving nodes are removing
them.
This degrades the performance, and such a situation is termed
as Congestion.
4
Traffic Shaping
It is about regulating average rate of data flow.
It is a method of congestion control by providing shape to data
flow before entering the packet into the network.
At connection set-up time, the sender and carrier negotiate a
traffic pattern (shape)
There are two types of Traffic shaping algorithm :-
1. Leaky Bucket Algorithm.
2. Token Bucket Algorithm
5
Introduction:
Conceptually, each host connected to the network has an
interface containing a "leaky bucket” (a queue)
To send a packet into the network, it must be possible to put
more water into the bucket.
If a packet arrives when the bucket is full, the packet must
either be queued until enough water leaks out to hold it or be
discarded.
This technique was proposed by Turner (1986) and is called
the leaky bucket algorithm.
6
Allow one packet per clock tick.
It is implemented as a single-server queue with constant service
time.
If the bucket (buffer) overflows then packets are discarded.
In this algorithm the input rate can vary but the output rate
remains constant.
This algorithm converts bursty traffic into fixed rate traffic by
averaging the data rate
Cont’d:
7
Figure:
(a) A leaky bucket with water. (b) a leaky bucket with packets.
8
Algorithm
Step - 1 : Initialize the counter to ‘n’ at every tick of clock.
Step - 2 : If n is greater than the size of packet in the
front of queue send the packet into the network and
decrement the counter by size of packet. Repeat the
step until n is less than the size of packet.
Step - 3 : Reset the counter and go to Step - 1.
9
10
Example
Let n = 1000
Packet =.
Since n > front of Queue i.e. n>200
Therefore, n= 1000-200 = 800
Packet size of 200 is sent to the network
200 700 500 450 400 200
11
Packet =
Now Again n > front of queue i.e. n > 400
Therefore, n= 800-400 = 400
Packet size of 400 is sent to the network
12
Packet =
Since n < front of queue .
There fore, the procedure is stop.
And we initialize n = 1000 on another tick of clock.
This procedure is repeated until all the packets is sent to the network.
Explanation
 When the packets are all the same size (e.g., ATM
cells), this algorithm can be used as described.
 when variable-sized packets are being used, it is
often better to allow a fixed number of bytes per
tick, rather than just one packet.
 if the rule is 1024 bytes per tick, a single 1024-
byte packet can be admitted on a tick, two 512-
byte packets, four 256-byte packets, and so on.
13
Leaky bucket model
To understand the leaky bucket model, consider a
bucket with a small hole at the bottom. Three
parameters define the bucket:
The capacity (B)
The rate at which water flows out of the bucket (R)
The initial fullness of the bucket (F)
14
15
Leaky bucket model
If water is poured into the bucket at exactly rate R,
the bucket will remain at F, because the input rate
equals the output rate.
If the input rate increases while R remains constant,
the bucket accumulates water.
If the input rate is larger than R for a sustained
period, eventually the bucket overflows.
16
Leaky bucket model
However, the input rate can vary around R without
overflowing the bucket, as long as the average input rate does
not exceed the capacity of the bucket.
The larger the capacity, the more the input rate can vary within
a given window of time.
Real life applications are Digital Media.
17
Parameters
The leaky bucket algorithm uses two parameters to control
traffic flow:
Burst rate: The rate at which cells are allowed to accumulate
in the bucket, expressed in cells per second.
Average rate: The average number of cells per second that
"leak" from the hole in the bottom of the bucket and enter the
network.
For example, if the average burst rate is 10 cells per second, a
burst of 10 seconds allows 100 cells to accumulate in the
bucket.
18
Uses:
The leaky bucket algorithm is used in packet switched computer networks
and telecommunications networks.
The leaky bucket as a queue can only be used in shaping traffic with no
delay in the output.
It may be used within the network, as part of bandwidth management, but
is more appropriate to traffic shaping in the network.
A technique used in ATM networks that applies a sustained cell flow rate
to bursty traffic.
Leaky bucket algorithm is used as the mechanism of the UPC(Usage
Parameter Control) in the network.
19
Advantages:
Token independent
Packets are transmitted continuously.
It sends the packet at constant rate
Input rate can differ but output rate will be constant.
20
Disadvantages
It does not save token.
If bucket is full packet or data is discarded.
LB sends packets at an average rate.
21
Thank You
22

Contenu connexe

Tendances

Network Layer,Computer Networks
Network Layer,Computer NetworksNetwork Layer,Computer Networks
Network Layer,Computer Networksguesta81d4b
 
Leaky bucket algorithm
Leaky bucket algorithmLeaky bucket algorithm
Leaky bucket algorithmUmesh Gupta
 
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSComputer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSDr. SELVAGANESAN S
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithmBushra M
 
QOS (Quality of Services) - Computer Networks
 QOS (Quality of Services) - Computer Networks QOS (Quality of Services) - Computer Networks
QOS (Quality of Services) - Computer NetworksIIIT Manipur
 
switching techniques in data communication and networking
switching techniques in data communication and networkingswitching techniques in data communication and networking
switching techniques in data communication and networkingHarshita Yadav
 
Selective repeat protocol
Selective repeat protocolSelective repeat protocol
Selective repeat protocolManusha Dilan
 
data-link layer protocols
data-link layer protocols  data-link layer protocols
data-link layer protocols BE Smârt
 
Error Detection And Correction
Error Detection And CorrectionError Detection And Correction
Error Detection And CorrectionRenu Kewalramani
 

Tendances (20)

Network Layer,Computer Networks
Network Layer,Computer NetworksNetwork Layer,Computer Networks
Network Layer,Computer Networks
 
Leaky bucket algorithm
Leaky bucket algorithmLeaky bucket algorithm
Leaky bucket algorithm
 
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESSComputer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
 
Transport layer
Transport layer Transport layer
Transport layer
 
Transportlayer tanenbaum
Transportlayer tanenbaumTransportlayer tanenbaum
Transportlayer tanenbaum
 
go back n protocol
go back n protocolgo back n protocol
go back n protocol
 
Congestion control
Congestion controlCongestion control
Congestion control
 
Routing algorithm
Routing algorithmRouting algorithm
Routing algorithm
 
Quality of Service
Quality of ServiceQuality of Service
Quality of Service
 
QOS (Quality of Services) - Computer Networks
 QOS (Quality of Services) - Computer Networks QOS (Quality of Services) - Computer Networks
QOS (Quality of Services) - Computer Networks
 
switching techniques in data communication and networking
switching techniques in data communication and networkingswitching techniques in data communication and networking
switching techniques in data communication and networking
 
Selective repeat protocol
Selective repeat protocolSelective repeat protocol
Selective repeat protocol
 
GO BACK N PROTOCOL
GO BACK N PROTOCOLGO BACK N PROTOCOL
GO BACK N PROTOCOL
 
The medium access sublayer
 The medium  access sublayer The medium  access sublayer
The medium access sublayer
 
data-link layer protocols
data-link layer protocols  data-link layer protocols
data-link layer protocols
 
Issues in Data Link Layer
Issues in Data Link LayerIssues in Data Link Layer
Issues in Data Link Layer
 
Layered Architecture
Layered ArchitectureLayered Architecture
Layered Architecture
 
Ethernet
EthernetEthernet
Ethernet
 
Lan technologies
Lan technologiesLan technologies
Lan technologies
 
Error Detection And Correction
Error Detection And CorrectionError Detection And Correction
Error Detection And Correction
 

En vedette

Congetion Control.pptx
Congetion Control.pptxCongetion Control.pptx
Congetion Control.pptxNaveen Dubey
 
Dijkstra & flooding ppt(Routing algorithm)
Dijkstra & flooding ppt(Routing algorithm)Dijkstra & flooding ppt(Routing algorithm)
Dijkstra & flooding ppt(Routing algorithm)Anshul gour
 
Congestion avoidance in TCP
Congestion avoidance in TCPCongestion avoidance in TCP
Congestion avoidance in TCPselvakumar_b1985
 
Tcp Congestion Avoidance
Tcp Congestion AvoidanceTcp Congestion Avoidance
Tcp Congestion AvoidanceRam Dutt Shukla
 
Congestion on computer network
Congestion on computer networkCongestion on computer network
Congestion on computer networkDisi Dc
 
Cs105 l15-bucket radix
Cs105 l15-bucket radixCs105 l15-bucket radix
Cs105 l15-bucket radixGopi Saiteja
 
Tcp congestion control
Tcp congestion controlTcp congestion control
Tcp congestion controlAbdo sayed
 
Congestion control
Congestion controlCongestion control
Congestion controlNithin Raj
 
Requirement Analysis & Specification sharbani bhattacharya
Requirement Analysis & Specification sharbani bhattacharyaRequirement Analysis & Specification sharbani bhattacharya
Requirement Analysis & Specification sharbani bhattacharyaSharbani Bhattacharya
 
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-...
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-...Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-...
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-...Vishal Sharma, Ph.D.
 
Congestion Control in Computer Networks - ATM and TCP
Congestion Control in Computer Networks - ATM and TCPCongestion Control in Computer Networks - ATM and TCP
Congestion Control in Computer Networks - ATM and TCPAttila Balazs
 
Congestion Control in Networks
Congestion Control in NetworksCongestion Control in Networks
Congestion Control in Networksrapatil
 
Ethernet OAM evolution
Ethernet OAM evolutionEthernet OAM evolution
Ethernet OAM evolutionNir Cohen
 
Hash Techniques in Cryptography
Hash Techniques in CryptographyHash Techniques in Cryptography
Hash Techniques in CryptographyBasudev Saha
 
Congestion control
Congestion controlCongestion control
Congestion controlAbhay Pai
 

En vedette (20)

Congetion Control.pptx
Congetion Control.pptxCongetion Control.pptx
Congetion Control.pptx
 
Congestion Control
Congestion ControlCongestion Control
Congestion Control
 
Dijkstra & flooding ppt(Routing algorithm)
Dijkstra & flooding ppt(Routing algorithm)Dijkstra & flooding ppt(Routing algorithm)
Dijkstra & flooding ppt(Routing algorithm)
 
Congestion avoidance in TCP
Congestion avoidance in TCPCongestion avoidance in TCP
Congestion avoidance in TCP
 
Tcp Congestion Avoidance
Tcp Congestion AvoidanceTcp Congestion Avoidance
Tcp Congestion Avoidance
 
Congestion on computer network
Congestion on computer networkCongestion on computer network
Congestion on computer network
 
Leakybucketalgorithm
LeakybucketalgorithmLeakybucketalgorithm
Leakybucketalgorithm
 
Cs105 l15-bucket radix
Cs105 l15-bucket radixCs105 l15-bucket radix
Cs105 l15-bucket radix
 
Tcp congestion control
Tcp congestion controlTcp congestion control
Tcp congestion control
 
Congestion control
Congestion controlCongestion control
Congestion control
 
Requirement Analysis & Specification sharbani bhattacharya
Requirement Analysis & Specification sharbani bhattacharyaRequirement Analysis & Specification sharbani bhattacharya
Requirement Analysis & Specification sharbani bhattacharya
 
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-...
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-...Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-...
Internet Routing Protocols: Fundamental Concepts of Distance-Vector and Link-...
 
Congestion Control in Computer Networks - ATM and TCP
Congestion Control in Computer Networks - ATM and TCPCongestion Control in Computer Networks - ATM and TCP
Congestion Control in Computer Networks - ATM and TCP
 
Congestion Control in Networks
Congestion Control in NetworksCongestion Control in Networks
Congestion Control in Networks
 
Stop And Wait ARQ
Stop And Wait ARQStop And Wait ARQ
Stop And Wait ARQ
 
Ethernet OAM evolution
Ethernet OAM evolutionEthernet OAM evolution
Ethernet OAM evolution
 
Radix Sort
Radix SortRadix Sort
Radix Sort
 
Hash Techniques in Cryptography
Hash Techniques in CryptographyHash Techniques in Cryptography
Hash Techniques in Cryptography
 
Go Back N ARQ
Go  Back N ARQGo  Back N ARQ
Go Back N ARQ
 
Congestion control
Congestion controlCongestion control
Congestion control
 

Similaire à Leaky bucket A

Congestion control algorithms.pptx
Congestion control algorithms.pptxCongestion control algorithms.pptx
Congestion control algorithms.pptxujjwalmatoliya
 
congestion ujjwal matoliya.pptx
congestion ujjwal matoliya.pptxcongestion ujjwal matoliya.pptx
congestion ujjwal matoliya.pptxujjwalmatoliya
 
Congestion control 1
Congestion control 1Congestion control 1
Congestion control 1Aman Jaiswal
 
Wormhole switching : Notes
Wormhole switching : NotesWormhole switching : Notes
Wormhole switching : NotesSubhajit Sahu
 
ENHANCEMENT OF TCP FAIRNESS IN IEEE 802.11 NETWORKS
ENHANCEMENT OF TCP FAIRNESS IN IEEE 802.11 NETWORKSENHANCEMENT OF TCP FAIRNESS IN IEEE 802.11 NETWORKS
ENHANCEMENT OF TCP FAIRNESS IN IEEE 802.11 NETWORKScscpconf
 
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.pdfMayankRaj687571
 
Unit 2 data link control
Unit 2 data link controlUnit 2 data link control
Unit 2 data link controlVishal kakade
 
2014 IEEE JAVA NETWORKING PROJECT Receiver based flow control for networks in...
2014 IEEE JAVA NETWORKING PROJECT Receiver based flow control for networks in...2014 IEEE JAVA NETWORKING PROJECT Receiver based flow control for networks in...
2014 IEEE JAVA NETWORKING PROJECT Receiver based flow control for networks in...IEEEFINALSEMSTUDENTSPROJECTS
 
IEEE 2014 JAVA NETWORKING PROJECTS Receiver based flow control for networks i...
IEEE 2014 JAVA NETWORKING PROJECTS Receiver based flow control for networks i...IEEE 2014 JAVA NETWORKING PROJECTS Receiver based flow control for networks i...
IEEE 2014 JAVA NETWORKING PROJECTS Receiver based flow control for networks i...IEEEGLOBALSOFTSTUDENTPROJECTS
 
Computer Networks Module 2.pdf
Computer Networks Module 2.pdfComputer Networks Module 2.pdf
Computer Networks Module 2.pdfShanthalaKV
 
tcp-wireless-tutorial.ppt
tcp-wireless-tutorial.ppttcp-wireless-tutorial.ppt
tcp-wireless-tutorial.pptRadwan Mahmoud
 
Multihop Routing In Camera Sensor Networks
Multihop Routing In Camera Sensor NetworksMultihop Routing In Camera Sensor Networks
Multihop Routing In Camera Sensor NetworksChuka Okoye
 
Multihop Routing In Camera Sensor Networks
Multihop Routing In Camera Sensor NetworksMultihop Routing In Camera Sensor Networks
Multihop Routing In Camera Sensor NetworksChuka Okoye
 

Similaire à Leaky bucket A (20)

Conjestion control
Conjestion controlConjestion control
Conjestion control
 
Congestion control algorithms.pptx
Congestion control algorithms.pptxCongestion control algorithms.pptx
Congestion control algorithms.pptx
 
congestion ujjwal matoliya.pptx
congestion ujjwal matoliya.pptxcongestion ujjwal matoliya.pptx
congestion ujjwal matoliya.pptx
 
Congestion control 1
Congestion control 1Congestion control 1
Congestion control 1
 
Congestion Control
Congestion ControlCongestion Control
Congestion Control
 
Wormhole switching : Notes
Wormhole switching : NotesWormhole switching : Notes
Wormhole switching : Notes
 
ENHANCEMENT OF TCP FAIRNESS IN IEEE 802.11 NETWORKS
ENHANCEMENT OF TCP FAIRNESS IN IEEE 802.11 NETWORKSENHANCEMENT OF TCP FAIRNESS IN IEEE 802.11 NETWORKS
ENHANCEMENT OF TCP FAIRNESS IN IEEE 802.11 NETWORKS
 
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
 
Nigga.pdf
Nigga.pdfNigga.pdf
Nigga.pdf
 
Unit 2 data link control
Unit 2 data link controlUnit 2 data link control
Unit 2 data link control
 
2014 IEEE JAVA NETWORKING PROJECT Receiver based flow control for networks in...
2014 IEEE JAVA NETWORKING PROJECT Receiver based flow control for networks in...2014 IEEE JAVA NETWORKING PROJECT Receiver based flow control for networks in...
2014 IEEE JAVA NETWORKING PROJECT Receiver based flow control for networks in...
 
IEEE 2014 JAVA NETWORKING PROJECTS Receiver based flow control for networks i...
IEEE 2014 JAVA NETWORKING PROJECTS Receiver based flow control for networks i...IEEE 2014 JAVA NETWORKING PROJECTS Receiver based flow control for networks i...
IEEE 2014 JAVA NETWORKING PROJECTS Receiver based flow control for networks i...
 
A018120105
A018120105A018120105
A018120105
 
Computer Networks Module 2.pdf
Computer Networks Module 2.pdfComputer Networks Module 2.pdf
Computer Networks Module 2.pdf
 
G028033037
G028033037G028033037
G028033037
 
8 Packet Switching
8 Packet Switching8 Packet Switching
8 Packet Switching
 
tcp-wireless-tutorial.ppt
tcp-wireless-tutorial.ppttcp-wireless-tutorial.ppt
tcp-wireless-tutorial.ppt
 
Multihop Routing In Camera Sensor Networks
Multihop Routing In Camera Sensor NetworksMultihop Routing In Camera Sensor Networks
Multihop Routing In Camera Sensor Networks
 
Multihop Routing In Camera Sensor Networks
Multihop Routing In Camera Sensor NetworksMultihop Routing In Camera Sensor Networks
Multihop Routing In Camera Sensor Networks
 
9_Network.ppt
9_Network.ppt9_Network.ppt
9_Network.ppt
 

Dernier

How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptshraddhaparab530
 
Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEaurabinda banchhor
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
Presentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxPresentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxRosabel UA
 

Dernier (20)

How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
 
Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSE
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Presentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxPresentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptx
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 

Leaky bucket A

  • 1. Group members: Aqsa Imtiaz Zainab Tariq Shaheer Ali Huda Naseer 1
  • 3. Outlines:  Congestion  Traffic Shaping  Introduction  Algorithm Example  Uses  Advantages & Disadvantages 3
  • 4. Congestion Internet can be considered as a Queue of packets, where transmitting nodes are constantly adding packets and some of them (receiving nodes) are removing packets from the queue. Consider a situation where too many packets are present in this queue, such that constantly transmitting nodes are pouring packets at a higher rate than receiving nodes are removing them. This degrades the performance, and such a situation is termed as Congestion. 4
  • 5. Traffic Shaping It is about regulating average rate of data flow. It is a method of congestion control by providing shape to data flow before entering the packet into the network. At connection set-up time, the sender and carrier negotiate a traffic pattern (shape) There are two types of Traffic shaping algorithm :- 1. Leaky Bucket Algorithm. 2. Token Bucket Algorithm 5
  • 6. Introduction: Conceptually, each host connected to the network has an interface containing a "leaky bucket” (a queue) To send a packet into the network, it must be possible to put more water into the bucket. If a packet arrives when the bucket is full, the packet must either be queued until enough water leaks out to hold it or be discarded. This technique was proposed by Turner (1986) and is called the leaky bucket algorithm. 6
  • 7. Allow one packet per clock tick. It is implemented as a single-server queue with constant service time. If the bucket (buffer) overflows then packets are discarded. In this algorithm the input rate can vary but the output rate remains constant. This algorithm converts bursty traffic into fixed rate traffic by averaging the data rate Cont’d: 7
  • 8. Figure: (a) A leaky bucket with water. (b) a leaky bucket with packets. 8
  • 9. Algorithm Step - 1 : Initialize the counter to ‘n’ at every tick of clock. Step - 2 : If n is greater than the size of packet in the front of queue send the packet into the network and decrement the counter by size of packet. Repeat the step until n is less than the size of packet. Step - 3 : Reset the counter and go to Step - 1. 9
  • 10. 10 Example Let n = 1000 Packet =. Since n > front of Queue i.e. n>200 Therefore, n= 1000-200 = 800 Packet size of 200 is sent to the network 200 700 500 450 400 200
  • 11. 11 Packet = Now Again n > front of queue i.e. n > 400 Therefore, n= 800-400 = 400 Packet size of 400 is sent to the network
  • 12. 12 Packet = Since n < front of queue . There fore, the procedure is stop. And we initialize n = 1000 on another tick of clock. This procedure is repeated until all the packets is sent to the network.
  • 13. Explanation  When the packets are all the same size (e.g., ATM cells), this algorithm can be used as described.  when variable-sized packets are being used, it is often better to allow a fixed number of bytes per tick, rather than just one packet.  if the rule is 1024 bytes per tick, a single 1024- byte packet can be admitted on a tick, two 512- byte packets, four 256-byte packets, and so on. 13
  • 14. Leaky bucket model To understand the leaky bucket model, consider a bucket with a small hole at the bottom. Three parameters define the bucket: The capacity (B) The rate at which water flows out of the bucket (R) The initial fullness of the bucket (F) 14
  • 15. 15
  • 16. Leaky bucket model If water is poured into the bucket at exactly rate R, the bucket will remain at F, because the input rate equals the output rate. If the input rate increases while R remains constant, the bucket accumulates water. If the input rate is larger than R for a sustained period, eventually the bucket overflows. 16
  • 17. Leaky bucket model However, the input rate can vary around R without overflowing the bucket, as long as the average input rate does not exceed the capacity of the bucket. The larger the capacity, the more the input rate can vary within a given window of time. Real life applications are Digital Media. 17
  • 18. Parameters The leaky bucket algorithm uses two parameters to control traffic flow: Burst rate: The rate at which cells are allowed to accumulate in the bucket, expressed in cells per second. Average rate: The average number of cells per second that "leak" from the hole in the bottom of the bucket and enter the network. For example, if the average burst rate is 10 cells per second, a burst of 10 seconds allows 100 cells to accumulate in the bucket. 18
  • 19. Uses: The leaky bucket algorithm is used in packet switched computer networks and telecommunications networks. The leaky bucket as a queue can only be used in shaping traffic with no delay in the output. It may be used within the network, as part of bandwidth management, but is more appropriate to traffic shaping in the network. A technique used in ATM networks that applies a sustained cell flow rate to bursty traffic. Leaky bucket algorithm is used as the mechanism of the UPC(Usage Parameter Control) in the network. 19
  • 20. Advantages: Token independent Packets are transmitted continuously. It sends the packet at constant rate Input rate can differ but output rate will be constant. 20
  • 21. Disadvantages It does not save token. If bucket is full packet or data is discarded. LB sends packets at an average rate. 21