bergman on 23 Dec 2008 10:47:55 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] regulating network traffic



In the message dated: Tue, 23 Dec 2008 10:32:34 PST,
The pithy ruminations from edmond rodriguez on 
<Re: [PLUG] regulating network traffic> were:
=> In terms of a router user interface, what exactly is meant by "outgoing port".    For example, i
=> f I run an http application on my machine, it may go into my router at port 1024, go out of the 
=> router at port 1030, and head for the destination machine (web server) to port 80.       Is the 
=> outgoing port (in terms of a router manual or the router's GUI user interface) 1024, 1030, or 80

It doesn't matter...most applications use "random" 
high-numbered (above 1024) ports for outgoing connections. You can configure 
some programs to use fixed outgoing ports (in which case, you'd know what they 
are). 

Most programs connect to network services that are listening on fixed ports. See
/etc/services.

This gets complicated when the network service uses a dynamically allocated
port, and informs the application which port to use during the initial protocol
exchange (like active mode ftp[1]) or when servers use rpc (portmapper) to
notify clients as to what port to use[2].

A full QoS implementation needs to use a combination connection tracking,
protocol typing, and [deep] packet inspection in order to handle a variable
range of ports. 

For this example, you can rely on the fixed range of destination ports
(6881-6999) used by bittorrent[3] in order to do traffic shaping.

Mark




[1] http://slacksite.com/other/ftp.html
[2] http://www.regatta.cmc.msu.ru/doc/usr/share/man/info/ru_RU/a_doc_lib/aixprggd/progcomc/rpc_portmap.htm
[3] http://www.dessent.net/btfaq/#ports
 
=> ?
=> 
=> 
=> 
=> 
=> 
=> ----- Original Message ----
=> > From: Jason Harlow <jharlow1@gmail.com>
=> > To: Philadelphia Linux User's Group Discussion List <plug@lists.phillylinux.org>
=> > Sent: Tuesday, December 23, 2008 11:01:15 AM
=> > Subject: Re: [PLUG] regulating network traffic
=> > 
=> > Some screenshots of some of the QoS stuff in Tomato...
=> > 
=> > http://www.polarcloud.com/img/ssqosc108.png
=> > http://www.polarcloud.com/img/ssqosg108.png
=> > 
=> > On Tue, Dec 23, 2008 at 10:59 AM, Jason Harlow wrote:
=> > > Your best value for money on QoS would probably be to buy a Linksys
=> > > WRT-54GL <--Note the "L", it's important.
=> > >
=> > > This is a cheap (you can probably find one sub-$50) router that you
=> > > can flash the firmware on.
=> > >
=> > > I use Tomato (http://www.polarcloud.com/tomato), but there are others
=> > > (DD-WRT, etc) available
=> > >
=> > > It has some nice QoS features. Basically you can classify all of your
=> > > traffic based on port ranges and even # of bytes transferred as Low,
=> > > medium, high, highest, etc
=> > >
=> > > Then you can set the max bandwidth used by everything and then the
=> > > percentage allowed per classification (i.e. high priority traffic can
=> > > use 100%, medium can use up to 80%, etc
=> > >
=> > > This doesn't quite do what you're looking for, but Tomato also
=> > > supports more complicated scripts (it's just a small linux kernel
=> > > running on the router), and there's a good script generator:
=> > >
=> > > http://bulfon.com/userx/wifi/WRT54Gx/generator/
=> > >
=> > > That will supposedly add the type of QoS you're looking for.
=> > >
=> > > On Mon, Dec 22, 2008 at 11:32 PM, Matthew Rosewarne
=> > > wrote:
=> > >> On Monday 22 December 2008, edmond rodriguez wrote:
=> > >>> So how?   Qos does not seem to solve this problem since my provider pretty
=> > >>> much compiles all the data coming in and I am hardly using the capacity of
=> > >>> my router.  I have a 768Kb service.
=> > >>>
=> > >>> How can one designate some kind of rule that says "bittorrent comes last
=> > >>> when ever anything else is getting done", but otherwise can use all the
=> > >>> bandwidth?
=> > >>>
=> > >>> From what I researched, it seems like the only way to make this happen is
=> > >>> to "throttle" the ports that bittorrent is using, or somehow throttle bit
=> > >>> torrent itself.
=> > >>>
=> > >>> The bittorrent application has a throttle in it, but it is static, not
=> > >>> dynamic.
=> > >>
=> > >> QOS can do exactly what you want.  However, the bottleneck is not at your
=> > >> machine but rather where your LAN meets your ISP.  Therefore the
=> > >> prioritisation must take place not on the individual machines, but on the
=> > >> router.
=> > >>
=> > >> The only consumer-grade router that I've had with the necessary QOS abilities
=> > >> is the one I got from Verizon for their FIOS service, but I'd expect there 
=> > are
=> > >> others on the market.
=> > >>
=> > >> Once you get QOS on the router, you can have it prioritise any traffic on the
=> > >> bitorrent ports lower than other traffic, so the torrents will only use
=> > >> bandwidth you aren't using for anything else.  Don't do throttling if you can
=> > >> avoid it, it's a just crude way to work around (but not fix) the problem.
=> > >>
=> > >> %!PS: Another fun use for QOS is to make yourself a good wireless neighbor.
=> > >> Disable WEP/WPA, isolate the wireless network from the wired network, and
=> > >> prioritise all wireless traffic lower than wired traffic (and also your
=> > >> wireless devices).  Now other people can use the free wifi, but they won't
=> > >> slow you down at all, since they'll only get whatever bandwidth you aren't
=> > >> using.
=> > >>
=> > >> ___________________________________________________________________________
=> > >> Philadelphia Linux Users Group         --        http://www.phillylinux.org
=> > >> Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
=> > >> General Discussion  --  http://lists.phillylinux.org/mailman/listinfo/plug
=> > >>
=> > >>
=> > >
=> > ___________________________________________________________________________
=> > Philadelphia Linux Users Group         --        http://www.phillylinux.org
=> > Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
=> > General Discussion  --  http://lists.phillylinux.org/mailman/listinfo/plug
=> 
=> ___________________________________________________________________________
=> Philadelphia Linux Users Group         --        http://www.phillylinux.org
=> Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
=> General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
=> 



___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug