Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Aug 2004 13:22:42 -0400
From:      Chuck Swiger <cswiger@mac.com>
To:        i18rabbit@hotpop.com
Cc:        freebsd-questions <questions@freebsd.org>
Subject:   Re: protocol priority
Message-ID:  <41336262.2040709@mac.com>
In-Reply-To: <200408300422.i7U4MZ3O006666@en26.ai1.anchorage.mtaonline.net>
References:  <200408300422.i7U4MZ3O006666@en26.ai1.anchorage.mtaonline.net>

next in thread | previous in thread | raw e-mail | index | archive | help
i18rabbit@hotpop.com wrote:
> with FreeBSD 4.10 functioning as a 'ppp -nat' LAN server,
> is there anyway to prioritize the processing of protocols?
> 
> for example, i am grabbing nntp data, and i want it at a much
> lower priority than http data - when i use my browser, i want
> to see a 90/10 ratio of http/nntp packets in tcpdump on the
> LAN server.  i never heard of this being done, but it would
> be nice.  running 'nice' on a client doesn't seem to change
> anything so far as this goes.

ppp has some internal support for priortizing traffic, but if you want to get 
really fancy, consider setting up dummynet(4) over the tun0 interface ppp is 
binding to.  The ppp traffic management is handled by:

          set urgent [tcp|udp|none] [[+|-]port] ...
              This command controls the ports that ppp prioritizes when trans-
              mitting data.  The default priority TCP ports are ports 21 (ftp
              control), 22 (ssh), 23 (telnet), 513 (login), 514 (shell), 543
              (klogin) and 544 (kshell).  There are no priority UDP ports by
              default.  See services(5) for details.

              If neither ``tcp'' or ``udp'' are specified, ``tcp'' is assumed.

              If no ports are given, the priority port lists are cleared
              (although if ``tcp'' or ``udp'' is specified, only that list is
              cleared).  If the first port argument is prefixed with a plus
              (``+'') or a minus (``-''), the current list is adjusted, other-
              wise the list is reassigned.  ports prefixed with a plus or not
              prefixed at all are added to the list and ports prefixed with a
              minus are removed from the list.


...consider something like the following rules:

  set urgent udp +53
  set urgent tcp +53
  set urgent tcp +80

-- 
-Chuck



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41336262.2040709>