said by connor79:
I went with the Cisco router RV110W which has 4 ports on it, and then PIAF Asterisk on a physical HP server. We were using a Cisco UC540 PBX for awhile and I liked how it made VLANs, putting the IP phones on 10.1.1.1 network and Data on 192.168.10.1 and then seemed to auto QoS to prioritize the voice VLAN. I am not that technical with VLAN's to know if it's necessary to do that on this system. Anyway, on LAN port 1 Asterisk is connected. LAN port 2 has one IP phone, and LAN port 3 has another. LAN port 4 has a printer. If I get more IP phones they'd connect to a switch on LAN port 2. Then devices like laptops, iPads etc all connect wirelessly, but sometimes over Ethernet plugged into the IP phone in case the wifi has issues etc. Then we use the built in VPN so from home we can use a soft phone if we happen to work from home once in awhile.
I've never used the RV110W, but it looks like a nice offering from Cisco. If you had a very large network, it would be nice to separate the voice and data into different VLANs, but might just complicate matters for such a small office. For instance, if you use a Cisco switch and IP phone, you can use AutoQoS to allow the switch to use CDP to place the phone in a voice VLAN and a computer that plugs into the phone into the data VLAN. However, for this to work, you'd need a Cisco switch that supports trunking on that port and a phone that supports CDP. Note, if there were lots of devices on the LAN that generated an undue amount of broadcast traffic, isolating the voice traffic into its own VLAN can help.
Bandwidth Management. This is where I assume the QoS I'd need would happen. Here is lets me enter 7000Kbps for my upload and 25000 for my download to match my actual DSL speeds. There's then a bandwidth priority page where I can select things on there. Right now I have all defaults, so for service Voice(SIP)TCP & UDP Port 5060-5061 I have Upstream High priority (the highest) and Downstream also High. I then have "All Traffic [all ports] on Normal priority for Upstream and Downstream. It doesn't let you make anything custom, it's all preselected ones, so like HTTPS, TFTP, FTP etc. Voice(SIP) above is the only one relating to Voice.
The default Voice(SIP) selection doesn't include the RTP ports, which is really what would be most important, so youll want to create a new service for that. On page 111 of the admin guide
, it mentions how to add a service.
To add a new service definition, click the Service Management button. You can define a new service to use for all firewall and QoS definitions. See Configuring Services Management.
To narrow down the range used by your Asterisk box, you can edit the rtp.conf file and modify the
Next there is QoS Port-based Settings. Here it refers to the 4 LAN ports on the router and I can set priority there from 1 (lowest) to 4 (highest). I set Port 1 which has the Asterisk PBX on it to 4 highest. This part confuses me, because I'm not sure how necessary this is. Also for the actual IP phones in the office, should I connect them to a switch and then put the switch on port 2 and also give it Highest priority, and then set the other 2 which would have printers etc set to say 2 the default? Where this confuses me is if someone plugs their laptop using Ethernet into the back of one of the IP phones, then I assume this would be useless since it's still all on the same port that has highest priority? And also in terms of WiFi I have no idea how that impacts priority on the ports?
Typically, congestion occurs on the WAN not the LAN, so the benefits of setting up QoS on the LAN aren't going to be that noticeable, but since you have the capability, it certainly can't hurt. It looks like you have three choices (Port, DSCP, and CoS). Since you may have non-VoIP traffic on the ports and CoS only works at layer 2 (within Ethernet frames), I'd go with the layer 3 DSCP option (IP frames).
Next it has CoS Settings. It says this is CoS to Traffic Forwarding Queue Mapping. I get confused with this, it says set port to CoS mode in the QoS Port Settings page. Then it has 2 columns, CoS Priority which has 7 at the top counting down to 0, and then drop downs beside them saying Traffic Forwarding Queue. Beside 7 it has "4 (highest). 6 and 5 have 3, 4 and 3 have 2, then 2 and 1 have "1 (lowest)" and 0 has 2. I have no idea what this is referring to.
I'd ignore this unless you want to use the Ethernet CoS markings.
Lastly there's DSCP Settings. It has a big table that comes up , with 4 columns:
DSCP / Binary / Decimal / Queue
The DSCP are things like AF23, CS3, AF31 etc. Then it has under binary things like 010110, 011000 etc, decimal is 22, 24, 26 etc and then last queue has drop downs with 1, 2, 3 or 4 selected on various ones. I've never seen this before or know what this means at all.
In your case, I'd only focus on what is typically used for Realtime packets, signaling and maybe video. For the VoIP RTP packets, you want to minimize the queuing delay, so using EF (Expedited Forwarding) is most common. Signally and video are typically marked with CS3 and CS4, respectively. This page explains all of the bits for IPP, TOS and DSCP: »www.bogpeople.com/networking/dscp.shtml
I'd assume most IP phones will allow setting the DSCP values or have defaults that map appropriately, but YMMV. For your Asterisk server, you can set these in your sip config. Here's what I have my PiAF box:
Note, those are really DSCP names, not TOS. You can run wireshark to see if the values in the IP headers got marked properly.
Again, since the LAN isn't typically an issue, I'd be more interested in how this router handles packets over the WAN for the VPN packets. Since the router itself is used for the VPN tunnel, I hope the protocols/ports are evaluated for QoS before the packets are encapsulated. This would be a issue if the tunnel terminated on a different device as all of the voice/data distinguishers would be hidden.
Also, for outbound queuing, it sure would be nice if they allowed the use of DSCP matching instead of just protocols/ports. I've not tried this with Tomato, but this link talks about using DSCP for QOS classifications.
A nice tool to test it out to see if it's all working as you expect is TTCP.: »www.pcausa.com/Utilities/pcattcp.htm