From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ed Wildgoose Date: Mon, 10 Jan 2005 22:16:02 +0000 Subject: Re: [LARTC] wondershaper with ssh on a non-standard port Message-Id: <41E2FEA2.2090208@wildgooses.com> List-Id: References: <20050110194905.GM13970@queeg> In-Reply-To: <20050110194905.GM13970@queeg> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org Hi, >having read the docs and the wondershaper script itself, it occurred to >me that the documentation promises an immediate drop in interactive app >latency, specifically mentioning SSH as a big winner. >however, looking through the script i can't really tell just *how* >wondershaper figures out which port my SSH daemon is running on. > >so what i'd like to know is, if i'm running my sshd on, say, port 222, >do i need to make any changes to the wondershaper script, or will it >figure out the right number automagically (e.g. from /etc/services, >where SSH is already correctly assigned to port 222) ? >(conversely, does it 'need' to figure out this port number at all?) > > It's been a while since I looked through wondershaper, but the relevant lines are apparently these: # TOS Minimum Delay (ssh, NOT scp) in 1:10: tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \ match ip tos 0x10 0xff flowid 1:10 So it seems to be matching based on the "type of service" bits in the IP packet. I seem to remember that SSH actually sets the IP tos bits correctly? So it *should* work when ssh is on another port. I guess you need to either tweak the script (if you want a quick fix then just mark anything to/from port 222 as high priority), or else figure out why your packets aren't matching the required rule.... Good luck Ed W _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/