Tags:
create new tag
, view all tags
QOS for Newbies

QOS for Newbies: Introduction

(with focus on the Ubiquity EdgeRouter X)

This page is definitely not ready for prime time!

Introduction: What this page is about

I had some problems and found some anomalies in the way my LAN and its connection to the Internet (via Earthlink) was working with a Westell 6100 modem (acting as both DSL modem and router) and an Ethernet switch.

I did some research and asked some questions on the debian-users list--I didn't find or get an explanation for the anomalies, but I did get a suggestion that I try using a separate router with the modem acting only as a modem (i.e., in "bridge" mode). One of the suggestions was to try a Ubiquity EdgeRouter.

I looked into it and bought an EdgeRouter X despite at least some controversy as to whether Ubiquity (ubnt.com) fully complies with the various free and open source licenses on the software which comprises their software system. (I will get back to and dig deeper into that again later.)

The EdgeRouter is a small box with 5 Ethernet ports, a Debian 6 operating system, and something they call the VyattaOS running on top of that.

So, I paid about $50 and received the ER X and went to work on installing it. It wasn't that long ago (a month), but I don't clearly remember how much trouble I had getting started, but there didn't seem to be much helpful documentation. I eventually learned that I could make a satisfactory initial installation by using one of their wizards accessible via their GUI.

(Aside: Ubiquity does have quite a bit of online documentation and a user community. If you go to look for information on the EdgeRouter X in the user community, you want the section on EdgeMax.)

Then I wanted to address the problems on my LAN that drove me to buy the ER X, which had to do with handling the limited bandwidth available on the Earthlink DSL connection to best advantage--there are two VOIP telephone devices (ObiHai) on the LAN, and, depending on what else was going on on the LAN, the voice quality was terrible, with lots of dropouts. Also, I share the connection with my son, and too often, one or the other of us was doing something that used a lot of bandwidth and limited what the other one of us could do (or, at least, how quickly).

QOS is the general name for technologies that help deal with those problems, so now I was off on a quest to (1) learn about QOS including the various strategies available for the ER X, and (2) learn how to configure the ER X to implement the chosen strategies.

That is what these pages are about.

See:

Contents

Why these pages (re: QOS) are (so) slow to develop

Well, to start with the obvious, I'm older, slower, lazier. I'd also like to get closer to a finished readable project, so maybe I'm spending more time agonizing (well, at least considering) how to write things so they are clearer and easier to read, and sometimes writing partial drafts offline. Also doing research, as QOS is pretty much new to me.

In doing that research, as in many other endeavors, people tend to develop language specific to their needs / usage, often in acronym form, and it is not always easy to find the underlying meaning of those terms as would be useful for a newbie.

My goals for these pages on QOS

This may (probably will) become more than one page, eventually. If so, this will be (in TWiki terms) the parent page to those other pages, and those other pages will be easily accessible from this page.

  • To explain what QOS can do for a LAN in very simple terms with very simple exammples, even if not 100% accurate in all the details
  • To explain, in very simple terms, how (typical approaches) to QOS work
  • To explain some of the rather confusing terminiology, e.g., why you (on your LAN, using a device like a router) can directly control QOS in the upload direction (from your LAN to your ISP / WAN) by controlling transmission from that router to your ISP / WAN, but you can only indirectly control QOS in the download direction (from your ISP / WAN to your LAN) by controlling transmission from that router to your LAN. (A router on your network cannot directly control how packets are transmitted from anywhere else to it--only how it transmits packets to anywhere else.)
  • To eventually shift the focus from QOS in general to QOS on the EdgeRouter X from Ubiquity (because that is what I bought, and want to configure to meet my needs)
    • To mention, discuss, and then explain how the various individual strategies available in the ER-X work
    • To discuss how to combine strategies to meet various goals
    • To list my goals for QOS
      • reserve full bandwidth for VOIP
      • (aside: maybe try to reduce that bandwidth by using different CODECs in my VOIP (ObiHai) devices)
      • share the available bandwidth fairly equally between my son and myself, guaranteeing each of us 50% (less any VOIP bandwidth in use), but allowing each of us to use up to 100% if the other is not using it
      • possibly (more like a future thing), consider trying to further prioritize bandwidth use, maybe giving higher priority to load browser pages (or similar--Okular / pdf pages) for immediate viewing, and lower priority to downloads of files, including videos possibly being queued for realtime viewing after being fully downloaded (to avoid stuttering and such)
    • To cover the syntax necessary to implement the necessary commands from the CLI (and maybe from the GUI, although I'm pretty sure not all is possible from the GUI)
    • To cover other exceptional situations related (maybe only) to the ERs, e.g.,
      • If you are using the ERs built in switch, you can't (iiuc) implement a QOS strategy on the interfaces (e.g., eth1 thru eth4) that use that switch--instead, you have to implement that strategy on the switch
      • ???

Maybe some of the explanations about different strategies will use examples similar to the simple example of the lines waiting to get into a popular nightclub.

Why QOS is important for VOIP (and other time sensitive services)

Telephone calls made over the Internet are transmitted as packets of digital information that may carry something between 1/100th and 1/30th of a second worth of sound. If packets are missing, late, or delivered out of order, that much sound is missing. In a busy network, if all packets are treated the same, your phone call may sound very bad because someone else is watching a video, or downloading a file, or lots of people are browsing web pages, sending or checking their emails, and similar.

So, in general, QOS strategies revolve around giving higher priority, and better chance of delivery on time, to packets of information that are (based on some criteria of judgement) judged to be more important.

When VOIP data is being carried on a network, it is generally more important than many other types of data being carried on the network.

A simple example of QOS like action in the real world

A common way to treat different packets of data differently based on some criteria of priority is to put the packets in queues. Think of it this way--imagine that there is a long line of people waiting in line (i.e., a queue) to get into a popular nightclub, with a doorman at the door. Now along comes a VIP of some sort. He doesn't (usually) get in that long line / queue--instead the doorman ushers him right into the club (assuming there is space--that is, that the number of people already in the club is less than that allowed by the fire codes).

Possibly there are a lot of VIPs, so they might even have their own line / queue, separate from the queue for everyone else. So, newly arriving VIPs would get in that queue, but it would be a much faster moving queue, waiting only for the VIPs ahead of him to get into the club.

Now there could be variations on this--just to make some up, there could be super-VIPs that go in even before the ordinary VIPs.

Maybe in the interests of some sort of fairness, maybe they'd let one person in the "ordinary" queue to enter after some number of VIPs enter.

If no VIPs are present, people from the "ordinary" queue could enter as space is available in the night club. If space is not available, even VIPs or super-VIPs would have to wait for space to become available.

If there were different types of "ordinary people" somehow--maybe people from in town and people from out of town, there could be separate lines for each, and in the interests of fairness, maybe people would be admitted from those two lines alternately (e.g., like a 50 / 50 split of in town and out of town people, or maybe there are separate queues for men and women, and maybe a one man (only) is admitted only after three women are admitted (thus a 25 / 75 split of men and women).

Well, consider the people to be packets and now you understand how most QOS works. There may be other strategies that I haven't mentioned here, that I don't even understand yet. I expect to learn about those available on the ER X and discuss them later.

For the sake of completeness, I should have mentioned that what I've described here is one of two very general types of QOS, known as DiffServ.

The other type is known as , and to give an example somewhat like the nightclub example, it involves advance reservations. The doorman is told to expect a certain person or group of persons and hold open a spot or spots. Likewise, assuming those persons might want to drink something, the barman must be told to reserve spots at the bar, and similarly, somehow, spaces must be reserved at tables or on the dance floor. Overall, this type of QOS is in disfavor, among other things it is more complicated--plans must be made in advance. In contrast, with DiffServ, each packet is treated appropriately (which could include discarding it) based on the content of the packet and rules that apply (in some sense) to all packets. (E.g., all VOIP packets go into the VOIP queue--no one has to know in advance how many VOIP packets are coming or anything similar.)

Layout and content of my LAN

For background, it may be helpful to know what is on my LAN and how it is laid out.

My son and I share the LAN and the Internet connection.

Our ISP is Earthlink, and now that we have the ER-X, a Westell 6100 DSL modem in bridge mode feeds the ER-X (on eth0). Eth1 has an Ethernet cable that leads to my desk, eth4 has an Ethernet cable that leads to my son's desk.

At my desk, the Ethernet cable goes into an Ethernet switch, and then connects to two desktops, one running Debian Wheezy, and the other running Debian Jessie. The switch also connects to an Obi100 and a telephone, which allows me to make VOIP phone calls, and a WiFi device that I turn on occasionally if I need to do something with my cellphone.

At his desk, the Ethernet cable goes into an Ethernet switch, and then connects to a desktop and a laptop. The switch also connects to an Obi200 and a telephone. A (longer) Ethernet cable goes from the Ethernet switch to another room which has a WiFi device--when he watches TV, he uses his tablet or cellphone via WiFi.

Some terminology

bridge
Several slightly different meanings depending on the context

modem in bridge mode

$ bridge outputs of router:

$ interface:

$ ifb:

$ imq<n>:

[Ethernet] switch

$ pppoe<n>:

RED (or WRED)

virtual
virtual means <later>, but there are several terms that begin with the word virtual that should be distinguished, even though they all have some relevance to the general subject of routers and QOS:

VLAN (Virtual LAN)

virtual machine

VPN (Virtual Private Network)

Contributors

  • () RandyKramer - 2017-03-17
  • If you edit this page: add your name here; move this to the next line; and if you've used a comment marker (your initials in parenthesis), include it before your WikiName.

Revision Comment

%SECTION{last_revision}%

  • %DATE%

Page Ratings

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2017-03-20 - RandyKramer
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by PerlCopyright 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding WikiLearn? WebBottomBar">Send feedback
See TWiki's New Look