Solved

Somewhat theoretical QoS question

Posted on 2012-04-05
4
458 Views
Last Modified: 2012-06-21
I'm trying to wrap my head around networking and setting up QoS. I think I figured out why it wasn't behaving the way I thought it would on my network and I fixed the problem, but I'm interested in knowing if the way I think it is working is the way it is ACTUALLY working.

Lets say, for argument sake because it is simple, that I was trying to provide high priority to basic web browsing (HTTP, port 80).

If I understand this right here's how the communication would unfold:
10.0.0.5:17623                   99.85.123.123:17623             google.ca:80
Computer-------------------------Router--------------------------Web Server

                               HTTP REQUEST (2-3kb)
port 17623>>>>>------------------------------------------->>>>>port 80

                               HTTP RESPONSE (1000-2000kb)
port 17623<<<<<-------------------------------------------<<<<<port 80


So basically:

Computer (10.0.0.5) connects to Google.ca
      Computer's port:  17682 (random)
      Google's port:  80

Computer uploads an HTTP request to Google
.....
Computer downloads the HTTP response from Google

Open in new window


So what just happened here was the computer UPLOADED data to Google on port 80. Then Google sent data to the computer (the computer DOWNLOADED that data). The downloaded packets were destined for the computer on a randomized local port that was used for that one session. The router opened a hole in its firewall and did the appropriate NAT translation to make this communication possible.

So two data streams are happening here:

1.    Data going outbound to Google on Port 80
2.    Data coming inbound to a computer on Port 17682

My router has the ability to specify "Priority-based" QoS by specifying:
        1. Port range and protocol (TCP or UDP)
        2. "Upstream" or "Downstream"
        3. "High", "Medium" or "Low" priority

This means if I wanted to prioritize the UPLOADING, I could create a rule:
        Port 80,     Upstream,  TCP,   High priority

But to prioritize the DOWNLOADING, it would be much more difficult. The port that is used is random every time.

This makes it quite difficult to do QoS optimization for downloads based on port-number alone. Right?

I was having issues where my QoS "prioritization" rules seemed to have no effect. In my case it was a VoIP PBX I was prioritizing but I ended up solving the issue by setting up IP-based prioritization instead (all traffic to one IP is prioritized over all other traffic), which appears to be working. I was wondering if this was the reason why.
0
Comment
Question by:Frosty555
  • 2
4 Comments
 
LVL 38

Expert Comment

by:Aaron Tomosky
ID: 37815075
I think the other way is only possible with layer 7 (think that's right) application layer traffic. So the router knows its a VoIP packet when it comes in and can tag it with a priority. I've done this with meraki gear once but mostly just use port based tagging for VoIP phones on their own switch port. So anything to that port gets tagged. I jus assumed it worked for the way back... Maybe not.
0
 
LVL 57

Accepted Solution

by:
giltjr earned 500 total points
ID: 37815724
Not knowing your router it is totally possible that it can tag based on the either the source or destination ports.  This is typically how it is done.  When the response, the source port is 80 (http), so you router should tag it.


However, you do realize that QoS settings are ignored within the public Internet.  So once the outbound traffic leaves your router there is no QoS.
0
 
LVL 31

Author Comment

by:Frosty555
ID: 37816629
My router is an RV042, it's "QoS" is pretty primitive, indeed it was only added in a recent firmware update. It does not support application layer QoS, the only options it has are:

"Interface" - WAN1, or WAN2 (it's a dual WAN router)
"Service" - A selection of TCP/UDP, and a Port Range. No mention of whether it is source or destination
"Direction" - Either "upstream" or "downstream"
"IP Range" - local network IP, not the remote network.
Minimum Rate - a Minimum guaranteed kbps
Maximum Rate - a Maximum guaranteed kbps, or "0" for unlimited
"Enabled" - a flag to enable or disable the rule.

I guess the problem here is that the router doesn't indicate source vs. destination port. So either it can tag packets as high priority based on:

1. The source port only (upstream = port 17683, downstream = port 80)
2. The destination port only (upstream = port 80, downstream = port 17683)
3. Try to pick one or the other intelligently based on the "Direction" that was specified
4. Both ports, prioritizing if either one of them matches.

I guess #4 makes the most sense but I have no idea if that is what the router is actually doing or not.

>However, you do realize that QoS settings are ignored within the public Internet.  So once the outbound traffic leaves your router there is no QoS.
I understand. This QoS is just for contention on the Internet by various devices on my local network (e.g. my VoIP server is trying to handle a call, but in the next room somebody is downloading a big file). In general my internet is good enough to handle VoIP on its own.
0
 
LVL 57

Expert Comment

by:giltjr
ID: 37816972
--> I guess #4 makes the most sense but I have no idea if that is what the router is actually doing or not.

Unless the programmer that wrote the code is, umm how do I say this kindly, not too bright, he is going to tag the packet based on either the src or dst port matching.  So if you setup tcp port 80, it will look at both src or dst port for a match.

I will have to read up on the RV042, I thought that its "QoS" was more bandwidth control, which based on your description above makes sense.  That is, it does not tag the IP frames with QoS priority, but just makes sure that if you set max. bandwidth that type of traffic never exceeds that bandwidth usage or if you set min. bandwidth, that type of traffic will always get at least that.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
VLAN question 7 46
Wireshark 7 55
gns3 with layer 3 switch 6 32
How to use a IP block on cisco 877 3 28
This tutorial will go through the steps required to write a script that will back up the configuration settings of a HP-ProCurve switch. You will need to get the following things to follow this tutorial: Telnet Scripting Tool e.g. TST10.exe …
The Cisco RV042 router is a popular small network interfacing device that is often used as an internet gateway. Network administrators need to get at the management interface to make settings, change passwords, etc. This access is generally done usi…
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now