LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Closed Thread
  Search this Thread
Old 01-10-2012, 04:25 AM   #1
tsumaru
LQ Newbie
 
Registered: Jan 2012
Distribution: Ubuntu
Posts: 18

Rep: Reputation: Disabled
tc question


Hi,

I am trying to set up a VPN using SSH tunnels. I have the tunnels created correctly and i can see each end fine.

My problem is that when the link becomes even slightly saturated pings down the tunnel go stupudly high (in the realm of 6-8 seconds)...

Whilst the link is activated if i try and ping something that doesnt go via the ssh tunnel pings are a more modest 80-150ms rather than the usual of 25ms.

I Have been trying to use tc and iptables to enforce a QOS setup and i have had partial success:

Code:
tc qdisc add dev tun0 root handle 1: prio 
tc qdisc add dev tun0 parent 1:1 handle 10: sfq
tc qdisc add dev tun0 parent 1:2 handle 20: sfq
tc qdisc add dev tun0 parent 1:3 handle 30: sfq
The above qdiscs with iptables (Keep in mind this setup is for testing, its no way prudiction ready!)

Code:
iptables -A POSTROUTING -t mangle -o tun0 -p icmp -m icmp --icmp-type 8 -j CLASSIFY --set-class 1:1
iptables -A POSTROUTING -t mangle -o tun0 -p tcp -m tcp -j CLASSIFY --set-class 1:3
The following does indeed classify packets correctly and they do pass through the correct qdiscs in tc however pings are still comparably high compared to not going via the ssh tunnel (at worst in the region of 2-3 seconds)

I realize that SSH Tunnels themselves have overheads but i wouldnt have thought that it would affect ping times so much.

I do also have tc and iptables set up almost identical to this on the other side but instead of icmp type 8 it has icmp type 0 (responses) in the highest priority class...


Can anyone make any suggestions as to what might be wrong here and how i can go about resolving it? My goal would be to have traffic in 1:1 take absolute priority over everything else - keeping latencies as low as possible. (I will be using the three classes, but as i said, this was just set up for testing purposes).

The ssh tunnel is going via an ADSL link with rx of ~440KB/s and tx of ~80KB/s to a server in a Datacentre with 100MBit connection.

Many thanks

Last edited by tsumaru; 01-10-2012 at 04:28 AM.
 
Old 01-11-2012, 01:07 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

Please don't post your question on multiple forums, that will only confuse you and us on to where the conversation is taking place. Reported since it's a duplicate of this one. Stick to the other thread please.

Kind regards,

Eric
 
Old 01-11-2012, 04:27 AM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
basic html question - download link to files on my webpage question Davno Linux - Server 5 12-25-2009 07:24 AM
linux distro question & mysql install question natalie.aloi Linux - Newbie 5 07-19-2009 08:28 PM
Question, Apples Contribution to Open Source + MacOs file structure question Higgy3k Other *NIX 5 07-25-2005 04:23 AM
Not your regular GRUB question - just a short question for a fried MBR!! ziphem Linux - General 3 01-31-2005 01:51 PM
login prompt question & kde scheme question JustinCoyan Slackware 2 06-09-2004 02:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration