0% found this document useful (0 votes)
614 views2 pages

Vyatta To Control Bandwidth

The Vyatta router uses traffic shaping policies to control bandwidth usage on its two interfaces, applying an upload limit of 1Mbps and a download limit of 2Mbps. Advanced configuration examples are also provided to apply different policies to wireless and Ethernet interfaces, reserving 60% of bandwidth for priority services and limiting other traffic to 20%.

Uploaded by

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

Vyatta To Control Bandwidth

The Vyatta router uses traffic shaping policies to control bandwidth usage on its two interfaces, applying an upload limit of 1Mbps and a download limit of 2Mbps. Advanced configuration examples are also provided to apply different policies to wireless and Ethernet interfaces, reserving 60% of bandwidth for priority services and limiting other traffic to 20%.

Uploaded by

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

VYATTA TO CONTROL BANDWIDTH

---------------------------------monitor interfaces ethernet eth0 flow

Vyatta router has two interfaces: eth0 LAN, and eth1 WAN interface
set bandwidth for upload traffic at 1Mbits/sec and download traffic at 2Mbits/se
c
$ configure
[you are entering Vyatta's CLI]
$ set traffic-policy shaper UPLOAD-POLICY
$ set traffic?policy shaper UPLOAD-POLICY bandwidth 1Mbit
$ set traffic?policy shaper UPLOAD-POLICY default bandwidth 50%
$ set traffic?policy shaper UPLOAD-POLICY default ceiling 100%
$ set traffic?policy shaper UPLOAD-POLICY default burst 15k
$ set traffic?policy shaper UPLOAD-POLICY default queue-type fair-queue
$ set interfaces ethernet eth1 traffic?policy out UPLOAD-POLICY
$ set traffic-policy shaper DOWNLOAD-POLICY
$ set traffic?policy shaper DOWNLOAD-POLICY bandwidth 2Mbit
$ set traffic?policy shaper DOWNLOAD-POLICY default bandwidth 50%
$ set traffic?policy shaper DOWNLOAD-POLICY default ceiling 100%
$ set traffic?policy shaper DOWNLOAD-POLICY default burst 15k
$ set traffic?policy shaper DOWNLOAD-POLICY default queue-type fair-queue
$ set interfaces ethernet eth0 traffic?policy out DOWNLOAD-POLICY
$ commit
$ save
$ exit
Later if you want to change your bandwidth rate limit on Vyatta, you can simply
do:
$ configure
$ set traffic-policy shaper DOWNLOAD-POLICY bandwidth 8Mbit
$ set traffic-policy shaper UPLOAD-POLICY bandwidth 4Mbit
$ commit
$ save
$ exit

ADVANCED EXAMPLE
-----------------i've 2 network. One is wireless and one is LAN line
scope
lan line limit traffic 15mbit used http https dns pop3 minimum 60% other minimum
20%
wiless limit 5mbit used http https dns pop3 minimum 60% other minimum 20%
here is sample config
set
set
set
set
set
set

traffic-policy
traffic-policy
traffic-policy
traffic-policy
traffic-policy
traffic-policy

shaper
shaper
shaper
shaper
shaper
shaper

5m
5m
5m
5m
5m
5m

bandwidth '5120kbit'
class 2 bandwidth '60%'
class 2 ceiling 100%
class 2 match dns ip protocol 'udp'
class 2 match dns ip source port '53'
class 2 match http ip protocol 'tcp'

set
set
set
set
set
set
set
set
set

traffic-policy
traffic-policy
traffic-policy
traffic-policy
traffic-policy
traffic-policy
traffic-policy
traffic-policy
traffic-policy

shaper
shaper
shaper
shaper
shaper
shaper
shaper
shaper
shaper

5m
5m
5m
5m
5m
5m
5m
5m
5m

set traffic-policy
set traffic-policy
set traffic-policy
set traffic-policy
set traffic-policy
set traffic-policy
set traffic-policy
set traffic-policy
set traffic-policy
set traffic-policy
set traffic-policy
set traffic-policy
set traffic-policy
set traffic-policy
set traffic-policy
commit

shaper
shaper
shaper
shaper
shaper
shaper
shaper
shaper
shaper
shaper
shaper
shaper
shaper
shaper
shaper

15m
15m
15m
15m
15m
15m
15m
15m
15m
15m
15m
15m
15m
15m
15m

class 2
class 2
class 2
class 2
class 2
class 2
default
default
default

match http ip source port '80'


match https ip protocol 'tcp'
match https ip source port '443'
match pop3 ip protocol 'tcp'
match pop3 ip source port '110'
queue-type 'fair-queue'
bandwidth '20%'
ceiling 100%
queue-type 'fair-queue'

bandwidth '15mbit'
class 2 bandwidth '60%'
class 2 ceiling 100%
class 2 match dns ip protocol 'udp'
class 2 match dns ip source port '53'
class 2 match http ip protocol 'tcp'
class 2 match http ip source port '80'
class 2 match pop3 ip protocol 'tcp'
class 2 match pop3 ip source port '110'
class 2 match https ip protocol 'tcp'
class 2 match https ip source port '443'
class 2 queue-type 'fair-queue'
default bandwidth '20%'
default ceiling 100%
default queue-type 'fair-queue'

set interfaces ethernet eth0 traffic-policy out '15m'


set interfaces wireless wlan0 traffic-policy out '5m'
commit

You might also like