Ubiquiti Edgerouter Devices

Base level configuration of a Ubiquiti Edgerouter device:  

  • eth0 is the connection to the internet.
  • eth1 is the local area network.
  • Downstream bandwidth is 5000 kbit.
  • Upstream bandwidth is 1000 kbit.
  • Guarantee:
    • 25% of the downstream bandwidth is SIP RTP.
    • 50% of the upstream bandwidth is SIP RTP.
    • 5% of the downstream bandwidth is SIP signaling.
    • 10% of the downstream bandwidth is SIP signaling.
  • Allow:
    • SIP RTP to use 100% of the upstream bandwidth.
    • SIP signaling to use up to 100% of the downstream bandwidth.
  • The phone tags RTP Audio with DSCP 46 (EF).
  • The phone tags SIP Signaling with DSCP 24 (CS3). If the phone tags SIP signaling with DSCP 26 (AF31), then change DSCP to 24 to DSCP 26 per the instructions below.

Adjust each of these figures as needed by changing them where they appear below.  

For example, if they have bridged eth1 and eth2 to br0, then change eth1 below to br0.

Action Steps:

Access the command line using PuTTY (for Windows) or a SSH client and then execute the following commands:

To get started:

configure
top

To set up DownStream QOS policy:

set traffic-policy shaper DownStream description "DownStream QoS policy"
set traffic-policy shaper DownStream bandwidth 51200kbit
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%
set traffic-policy shaper DownStream default ceiling 100%

To set up UpStream QOS policy:

set traffic-policy shaper UpStream description "UpStream QoS policy"
set traffic-policy shaper UpStream bandwidth 25600kbit
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%

The following steps will apply the policies to the interfaces:

set interfaces ethernet eth0 traffic-policy out UpStream
set interfaces ethernet eth1 traffic-policy out DownStream

Finally, commit, save, and exit:

commit
save
exit

Separately, SIP ALG must also be disabled:

configure
set system conntrack modules sip disable
commit
save
exit

Was this article helpful?
2 out of 2 found this helpful
Have more questions? Submit a request