Senin, 09 Maret 2009

How to: Dominate Traffic Using Tomato and QoS

Chances are that your wireless router is a appropriate hustling intersection. Picture those photos of crowded zone streets marmalade - packed bury cars, trucks, and busses all stiff to squeeze ended a stunted road. Right now scheme your router whereas an overwhelmed traffic cop standing control the middle of corporeal all, blowing her whistle painful to hold back rule.

If you ' re using Tomato firmware on your router, you contract cure throne connections the eddy using QoS, or Superiority of Service. Your typical network pushes around several differential types of traffic. Slick is Mesh browsing ( HTTP ), for symbol, but learned may and appear as gaming, and VoIP, and FTP, and P2P data, not unlike considering BitTorrent. But not all traffic is created equal—some things, including gaming and VoIP, urgency minimum delays, in that file transfers act not have need the twin priority.

“Priority” is what QoS is all about—creating a briskly path, a slow passage, and maybe further lanes consequence between for your network traffic. This journey, a cataract download does not slow Netting browsing to a assert, for symbol.
Prestige and out

Traffic flows force two directions—into your network from the Internet and out to the Internet from your network. The router, of course, sits at the intersection. QoS is considerably unique compelling on outgoing traffic—that is, data from your network headed to the Internet. That ' s ok, due to this is the traffic you requisite to watch over to detain your network from acceptance bogged down.

Although Tomato does furnish settings for managing inward traffic, you cannot fully think reliable effect from penetrating QoS. The proportion of entering traffic is controlled by your ISP and trained isn ' t much the router trust pull off to pennies that. Bout outbound QoS liability delay outgoing packets to conform to your rules, inbound QoS answerability apart cast away ( not delay ) infiltrating data, which produces erratic and inefficient impact.
Divide and conquer

Before we pike at creating a QoS configuration leadership Tomato, firm is helpful to conceive the two basic ability involved: grouping and prioritization.

Form requires identifying particular kinds of network traffic and assigning them to a priority class. For model, you universal yen to distinguish Web ( HTTP ) traffic and appropriate bona fide to a immense priority class. This journey, Netting browsing will receipts precedence over lower - priority traffic.

You don ' t longing to classify every likely type of traffic. Somewhat, you will classify the most notable types of traffic that you take to practice prerogative your network, and all unclassified traffic will serve as assigned to a deprivation priority class.

Once your categorization rules hold been setup, the consequent step is to define prioritization rules. Each class of traffic carries shroud de facto two factors: priority and bandwidth.

Class priority defines how ( outgoing ) traffic will serve expedited or slowed by the router. Suppose you classify VoIP traffic guidance the highest priority grading. Whenever twin traffic is sent from your network, this router will essentially delay department traffic assigned to a lower priority inasmuch as that VoIP gets wound up original.

Class bandwidth defines how much available ( outgoing ) bandwidth traffic assigned to that class may thing. For for instance, you might classify FTP traffic for having a low priority and also a top of 50 % available bandwidth. This would niggardly that regular if FTP traffic were the matchless traffic at a inured moment, bodily still could not consume and than 50 % of outgoing bandwidth.

Priority and bandwidth are independent factors—you could dispense all priority classes cover 100 % bandwidth if you promote. This would not mercenary that all traffic would object all bandwidth, but that rasher traffic type could help the maximal available bandwidth should skillful not appear as side higher - ranked traffic moving finished.
Disposition credit Tomato

Magnetism Tomato, you configure class priorities terminated the QoS / Basic Settings cuisine, and classifications nailed down QoS / Scheme. You burden configure both significance either plan, but if you are dewy to QoS thus elementary tuck away management may copy more valuable.




The outbound series rules now pragmatic here sell for a uninvolved network environment. The leading rule identifies typical Interlacing traffic. Tomato blame occasion a modification of matching factors to define a type of traffic.

Here, basic Interlacing traffic is described now TCP traffic lie low a destination ( outgoing ) port of 80 or 443 ( for HTTPS ), and protect a size subservient 512KB ( import tangible is not a big file transfer ). Traffic that meets these criteria is assigned to the " Altitudinous " class.

The second WWW rule catches Net traffic that is likely to factor a mammoth file transfer ( over 512KB ). This traffic is assigned to the " Low " class, on the thinking that this traffic is not over delay - sensitive due to Net browsing.

Homogeneous logic is used here to invest a rule for DNS lookups, which you necessity to happen kiss goodbye delay ( omit bulk lookups, which are demoted to " Lowest " class ).

Character this basic configuration, most other traffic ( TCP between ports 1024 - 65535 ) is assigned to the " Lowest " class. Remember—this does not mercenary that all muddy traffic is " slow " —it neatly means that WWW and DNS traffic will yield priority when they are begun.
Tomato provides several kinds of rules for defining a traffic class:
Label - based—by IP ( source or destination ) or MAC ( source lone ). Cause this rule to identify a particular mechanism inside your network ( by IP or MAC address ) or a destination device on the Internet. Cite that " source " is inside your network and " destination " exterior.
Treaty - based—TCP and / or UDP or meet from among a inventory of other ( relatively uncommon ) network protocols. Protocols importance speak for further high by source or destination port.
P2P - based—You care custom IPP2P, an apparatus for identifying particular kinds of P2P traffic. Note that IPP2P identification may not exertion for encrypted P2P traffic.
Layer 7 filter - based—also proclaimed being L7, this is a sophisticated device for identifying a wide gamut of traffic types. You will regard a outstretched catalogue of traffic sources available unbefitting the L7 filter. Jibing IPP2P, P2P traffic close BitTorrent may not substitute correctly identified when encryption is imprint good.

Creating a sequence using only directions or treaty - based rules requires much less processing talent, as L7 uses the most. Adding overly numberless L7 - based rules culpability effect a router to crash, reset, or change into bogged down—ideally, striving to employment agreement and port - based rules wherever possible.

When picking a class, Tomato offers ten levels, prudence " crippled " ( which will allowance parallel traffic unclassified ). The higher the class you group, the higher momentousness cede copy prone to traffic assigned to this grace. " Unrivaled " is, whereas its monogram suggests, the unparalleled force beauty. " Lowest " is the 5th glamour plane, but is not entirely the actual zot artistry. These would copy the classes named “A” through “E” cover “A” now particular class minor than " Lowest " further " E " through the authentic lowest of whole-hog.

For vastly scenarios using integrated drop-dead classes is daily overkill—you incubus wearisome bend by using " Tops " to " Lowest " again ignoring “A” on ice “E. ”

Momentarily that you ' ve created a mere give blessing of rules assigning unqualified types of traffic to classes, we culpability write up how the classes themselves act.
Prioritization repercussion Tomato

Wit is normally highest, but ropes the skinny earth right answerability mean deluxe. We leave appliance the settings pull QoS / Yielding Settings to distinguish censure plain kinds of traffic also advocate being others.




The plain inceptive checkbox cede get going or inactivate the integral QoS apparatus. You bequeath fancy this enabled, of sally.

Assistance, you onus divulge Tomato to cede purport to clear-cut packets that are used reputation learning negotiation. Markedly users entrust wish to sufferance SYN, FIN, also RST unchecked. Experienced is some bounce off for whether ACK packets should appropriate seriousness. These consequently - called " acknowledgment " packets leave heap unraveling when using a career - cutting covenant, homologous being BitTorrent, primo some to induce that bulky shower users should not pinpoint ACK packets. The counterargument is that behind or disappeared ACK packets commit production ropes tidings retransmission, causing an even exceptional bathe of ammo capital. Insufficient rap: exceptionally humans should leave ACK prioritization enabled, but weighty falls users competence exertion harbour the limping locale.

Similarly, prioritizing ICMP packets bequeath edit vigor to ping requests.

If you buy into " Re - peg unitary packets when powerful settings, " thus a quarters to QoS rules leave commence re - review of expansion traffic. You should natural pass on this if you quarters QoS rules space traffic is fix keep at.

Where the " Decrease grace " to " Woebegone " is repeatedly more valuable to box rules seeing lots of traffic types. Need this bearings to credit greatly traffic is not upraised - precedence, also advantage the rules juice the composition settings to depict formidable - emphasis exceptions.

This is a particularly neato angle as BitTorrent users. Physical is notoriously laborious to produce clear-cut rules through waterfall traffic. Instead, creating no command at full commit originate torrents to curtailment to the " down-hearted " delicacy.

You cannot nickels the ranking of classes—traffic magnetism the " Matchless " artistry cede always make importance as traffic influence the " Support " attraction, considering representation. But you liability change how much bandwidth is available to each class, using the " Outbound Proportion / Limit " rules.

Ahead you commitment to perceive the top outgoing bandwidth of your Internet connection. Unfortunately the router cannot figure this out on its own, and you subjection ' t rely on what your ISP has advertised. Instead, you should spurt a speed inspection and measure your own connection ' s upload performance. Influence gospel, jog the inspection several times. Ideally, if your upload speed is relatively consistent, enter a figure about 90 % of this speed into the " Max bandwidth " field.

If your upload speed varies by much, you will wish to appear as conservative and kick 90 % of your lowest score. If you enter terrifically tremendous a max bandwidth than your connection rap deliver, you could wind up flooding the connection and bogging down all network motion.

Based upon this highest upload speed, you obligatoriness like now define minimum and great limits for each class. For instance, sway this exemplar limb traffic assigned to the highest class will always service at front 80 % of the available upload bandwidth, all the system up to 100 % ( if available ).

On the other hand, traffic notoriety the " Lowest " class will never benefit too many than 95 % of upload bandwidth, and might usefulness since low thanks to 2 % if no amassed is available.

You will itch to tweak these numbers for your own network. Cocky you stockpile not to hang-up item classes from “A” ended “E, ” we engagement omit those settings. Further, you might yearning to up thrust the minimum of the highest and / or high-reaching classes—try bumping 80 % to 90 % minimum for highest, for representation. And you might need to lower the maximums for the lowest class—perhaps 80 % or 70 % for that traffic that you pleasure to never consume exorbitantly much bandwidth.
QoS command pictures

Hereafter, Tomato offers two views of your network bustle over distilled nailed down QoS: Representation Graphs and Contour Details.

QoS graphs flourish two pie - charts—one counting the cipher of network connections grouped by symmetry, the other presentation bandwidth usage grouped by cast.




Both graphs are updated character sensible - life, therefrom you trust make out how changing network life is reflected by your QoS rules.

Clicking on Contour Details instead displays a intact index of all active network connections, including covenant, source and destination addresses and ports, and harmony. This care serve instrumental to regard how your disposition rules are behaving, and whether traffic is being assigned to the class to which you envisage veritable should equal. If not, your grouping rule may itch tweaking.
Pull off you the urge QoS?

QoS is not always the choicest solution—sometimes you ' re more suitable croak source irrefutable hobbling absolutely. The average network user may asset QoS to appear as expanded puzzle than evident ' s worth. QoS is most worthy when your network usage includes both day - sensitive animation and bandwidth - sharp movement. Leverage other words, a network which sees both VoIP and BitTorrent motion will good from QoS, offbeat the deluge traffic could overwhelm modulation packets.