A Switch Even a Penguin Can Love: QoS, User Management and More

QoS the Easy Way. Maybe.

Ethernet switches pass your bits through according to FIFO— first in, first out. For some services you want to give some bits priority and let them cut to the head of the line; for better VoIP call quality, streaming media, or anything that requires low latency. Historically Linux admins have had to struggle with some powerful but rather difficult tools: tc and iptables. There are some tc-based scripts such as CBQ-init and Wondershaper that make it easier. But having the right switch gives you all kinds of control without having to spend days in deep study. Though it may take some deep study just to figure out which checkboxes to use in your switch control panel; I haven’t seen one yet that comes with a decent manual. You’ll get a nice big manual, usually over a hundred pages, but they like to describe the switches and levers, rather than describing how to accomplish tasks.

On our example Netgear switch, refer again to Figure 1. You’ll use each port’s configuration page to set its default priority, from 0-7. These are from the IEEE 802.1pstandard, which is the LAN Layer 2 QoS/CoS (Quality of Service/Class of Service) Protocol for Traffic Prioritization. This only works on packets without priority tags; if they already have priority tags, the switch will use those. This table describes the different priorities:

111 7 Network Critical
110 6 Interactive Voice
101 5 Interactive Multimedia
100 4 Streaming Multimedia
011 3 Business Critical
010 2 Standard
001 1 Background
000 0 Best Effort

This is an extremely simple form of QoS, because everything that passes through the port is assigned the same queuing priority. You cannot assign different priorities to different services or protocols, but it’s not a bad deal for a small network. As you move up the price ladder, you get more flexibility and control, and can tailor your QoS for specific services and protocols.

802.1p is a LAN-only standard- the 802.1p priority tags are lost when LAN frames are converted for transmission over a WAN. WAN QoS is a Layer 3 function. Yes, sometimes knowing the OSI network layer model is actually useful, though I think the five-step versionmodels modern networking more accurately. WAN, which for most of us means Internet, QoS is a bit of a joke with IPv4 anyway, because v4 QoS is not implemented in any kind of standard way, so most routers ignore the QoS flag. If you need QoS over your own WAN or the Internet, talk to your service provider and see what they can do for you.

Just to add a spicy dollop of pointless confusion, the QoS menu on the Netgear control panel does not let you configure per-port QoS or anything useful like that, but rather it maps the 802.1p priority tags to the switch’s four internal hardware priority queues, which are High, Normal, Low, and Lowest. I can’t think of any reason to change the defaults, but it’s there if you want to.

Link Aggregation, or, Bundling Skinny Pipes to Make Fat Pipes

Link aggregation means bundling Ethernet links together to get more bandwidth, and for failover. Suppose you have a busy LAN server that’s so busy the choke point is the network, which not an uncommon scenario in this happy era of 3 gigabits-per-second SATA drives. You could install a two-port Ethernet adapter on it, which typically includes link aggregation and automatic failover, aggregate the corresponding two ports on your sleek smart switch, and voila! Twice the bandwidth instantly. Well, not exactly, because you’ll have all the usual networking overhead. But it’s an easy way to build fatter pipes, and you can scale up as you need. The Linux kernel supports bonding Ethernet interfaces, so you could also bond ordinary inexpensive single-port NICs.

First let’s look at how to aggregate switch ports. On the Netgear it’s a Fun Challenge because the Web interface hides the port numbers, as Figure 2 shows.

They are numbered 01-08 from the top down. Select whatever ports you want to aggregate, and then turn on LACP, which is the Link Aggregation Control Protocol. If you get mixed up, just delete it and start over.

Now you need to bond your corresponding Ethernet interfaces. These must all support the same speeds and type of duplexing, but they don’t have to be the same brands. I already wrote a detailed howto on this, and miraculously it’s still relevant and not outdated by some fancy new kernel release, so there you go. The cool part is if you purchase a smart switch that has 802.3ad support, which is virtually all of them, you won’t have to hassle with balance-albmode, but can do it the right way.

That wraps up our introduction to smart switches for the masses. Next week we’ll start in on how to set up VLANs, which are very cool but a bit mind-bending to configure the first time. But after you’ve done it once, you’ll never go back to boring, inflexible old physical subnetting.


Latest Articles

Follow Us On Social Media

Explore More