LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Closed Thread
 
Search this Thread
Old 06-16-2012, 03:57 AM   #1
hesisaboury
Member
 
Registered: Dec 2010
Location: iran
Posts: 167

Rep: Reputation: 0
Strange TC behaviour


hello,
i'm using this config for traffic shaping
CEIL=50kbit
tc qdisc add dev eth0 root handle 1: htb default 15
tc class add dev eth0 parent 1: classid 1:1 htb rate 50kbit ceil 50kbit

tc class add dev eth0 parent 1:1 classid 1:10 htb rate 30kbit ceil 30kbit prio 1
tc class add dev eth0 parent 1:1 classid 1:12 htb rate 10kbit ceil 10kbit prio 2
tc class add dev eth0 parent 1:1 classid 1:15 htb rate 10kbit ceil ${CEIL} prio 4
tc filter add dev eth0 parent 1:0 protocol ip prio 1 handle 1 fw flowid 1:10
tc filter add dev eth0 parent 1:0 protocol ip prio 1 handle 2 fw flowid 1:12
tc filter add dev eth0 parent 1:0 protocol ip prio 6 handle 6 fw flowid 1:15

=====iptables
iptables -t mangle -A POSTROUTING -o eth0 -p tcp --sport 80 -j MARK --set-mark 2
iptables -t mangle -A POSTROUTING -o eth0 -p tcp --dport 80 -j MARK --set-mark 2
iptables -t mangle -A POSTROUTING -o eth0 -p tcp --sport 22 -j MARK --set-mark 1
iptables -t mangle -A POSTROUTING -o eth0 -p tcp --dport 22 -j MARK --set-mark 1

i just wanted to filter download and specify a dedicated bandwidth for ssh, now users can download with higher speed than i specified but by using this command (tc -s class show dev eth0) everything is ok (rate is less than what i set) ..... i want to knowe what is wrong with this code..

thanks..
 
Old 06-16-2012, 05:48 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,264
Blog Entries: 54

Rep: Reputation: 2841Reputation: 2841Reputation: 2841Reputation: 2841Reputation: 2841Reputation: 2841Reputation: 2841Reputation: 2841Reputation: 2841Reputation: 2841Reputation: 2841
You have marked your newly-created thread as [SOLVED] even if it is not. I suggest that if you do not understand a feature that you do not use it.

You also managed to create three threads (this, this and this one) on the same subject and in two of our forums. It shows you have not read the LQ Rules, it is respectless and it is a waste of your and our time. I strongly suggest you do not do that again and remain patient.
 
1 members found this post helpful.
Old 06-17-2012, 02:20 AM   #3
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange g++ behaviour? james_b Programming 8 11-17-2011 08:22 AM
ps -ef strange behaviour ?? lionking_x Linux - Newbie 1 11-28-2007 05:22 PM
strange behaviour marsques Slackware 11 02-15-2006 06:05 PM
Strange behaviour Anmol Suse/Novell 2 10-27-2005 11:05 PM
Strange Behaviour mikeyt_3333 Linux - General 4 08-06-2001 03:07 PM


All times are GMT -5. The time now is 10:58 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration