These instructions assume:

•eth0 is your connection to the internet.

•eth1 is your local area network.

•Downstream bandwidth is 5000kbit.

•Upstream bandwidth is 1000kbit.

•You want to guaranty 25% of your downstream bandwidth to SIP RTP.

•You want to guaranty 50% of your upstream bandwidth to SIP RTP.

•You want to allow SIP RTP to use up to 100% of your upstream bandwidth.

•You want to guaranty 5% of your downstream bandwidth to SIP Signalling.

•You want to guaranty 10% of your downstream bandwidth to SIP Signalling.

•You want to allow SIP Signalling to use up to 100% of your downstream bandwidth.

•Your PBX or phone tags RTP Audio with DSCP 46 (EF).

•Your PBX or phone tags SIP Signalling with DSCP 24 (CS3).  If your PBX or phone tags SIP signalling with DSCP 26 (AF31), then change dscp 24 to dscp 26 in the instructions below.

•You can adjust each of these figures as needed by changing them where they appear below.  For example, if you have bridged eth1 and eth2 to br0, then change eth1 below to br0.

Access the command line using PuTTY (for Windows) or your favorite SSH client and execute the following commands.  You can omit any command beginning with #, as those are comments intended only to explain what the commands below the comment does:

configure

top

# Set-up the details of the DownStream Policy

set traffic-policy shaper DownStream description “DownStream QoS policy”

set traffic-policy shaper DownStream bandwidth 5000kbit

set traffic-policy shaper DownStream class 10 description “RTP”

set traffic-policy shaper DownStream class 10 bandwidth 25%

set traffic-policy shaper DownStream class 10 ceiling 100%

set traffic-policy shaper DownStream class 10 match VOIP-RTP ip dscp 46

set traffic-policy shaper DownStream class 20 description “SIP”

set traffic-policy shaper DownStream class 20 bandwidth 5%

set traffic-policy shaper DownStream class 20 ceiling 100%

set traffic-policy shaper DownStream class 20 match VOIP-SIP ip dscp 24

set traffic-policy shaper DownStream default bandwidth 70%s

set traffic-policy shaper DownStream default ceiling 100%

 

#  Set-up the details of the UpStream Policy

set traffic-policy shaper UpStream description “UpStream QoS policy”

set traffic-policy shaper UpStream bandwidth 1000kbit

set traffic-policy shaper UpStream class 10 description “RTP”

set traffic-policy shaper UpStream class 10 bandwidth 50%

set traffic-policy shaper UpStream class 10 ceiling 100%

set traffic-policy shaper UpStream class 10 match VOIP-RTP ip dscp 46

set traffic-policy shaper UpStream class 20 description “SIP”

set traffic-policy shaper UpStream class 20 bandwidth 10%

set traffic-policy shaper UpStream class 20 ceiling 100%

set traffic-policy shaper UpStream class 20 match VOIP-SIP ip dscp 24

set traffic-policy shaper UpStream default bandwidth 40%

set traffic-policy shaper UpStream default ceiling 100%

# Apply the policies to the interfaces

set interfaces ethernet eth1 traffic-policy out DownStream

set interfaces ethernet eth0 traffic-policy out UpStream

# Commit, Save, and Exit

commit

save

Leave a Reply