LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 06-14-2012, 12:46 AM   #1
hesisaboury
Member
 
Registered: Dec 2010
Location: iran
Posts: 165

Rep: Reputation: 0
TC Help...


Hello,
i have following config for tc but it does not work,

CEIL=20kbit
tc qdisc add dev eth0 root handle 1: htb default 15
tc class add dev eth0 parent 1: classid 1:1 htb rate ${CEIL} ceil ${CEIL}

tc class add dev eth0 parent 1:1 classid 1:10 htb rate 5kbit ceil 10kbit prio 1
tc class add dev eth0 parent 1:1 classid 1:12 htb rate 5kbit ceil ${CEIL} prio 2
tc class add dev eth0 parent 1:1 classid 1:15 htb rate 10kbit ceil ${CEIL} prio$

tc qdisc add dev eth0 parent 1:10 handle 120: sfq perturb 10
tc qdisc add dev eth0 parent 1:12 handle 130: sfq perturb 10
tc qdisc add dev eth0 parent 1:15 handle 150: sfq perturb 10

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 2 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 -t mangle -A PREROUTING -p tcp --dport 80 -j MARK --set-mark 0x2
iptables -t mangle -A PREROUTING -p tcp --sport 80 -j MARK --set-mark 0x2
iptables -t mangle -A PREROUTING -p tcp --sport 22 -j MARK --set-mark 0x1
iptables -t mangle -A PREROUTING -p tcp --dport 22 -j MARK --set-mark 0x1

i can see traffic using (iptables -t mangle -L -x -v -n)

any suggestion.....
Thanks.

Last edited by hesisaboury; 06-16-2012 at 12:32 AM.
 
Old 06-14-2012, 06:21 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 1,821

Rep: Reputation: Disabled
Perhaps it would be easier for someone to assist you if you included information about:

a) what you are trying to accomplish, and

b) what isn't working, and what (if anything) you've done to troubleshoot the issue

Also, you may want to put scripts, code etc. in [code] tags to preserve formatting.
 
Old 06-15-2012, 01:20 AM   #3
hesisaboury
Member
 
Registered: Dec 2010
Location: iran
Posts: 165

Original Poster
Rep: Reputation: 0
i have adsl 128k , now i want to prioritize my bandwidth for some protocols like ssh , http for example 5kb for ssh and 10kb for http and if possible ,dont borrow bandwidth from each other.
that was my scenario .
for testing i use Internet Download Manager and Winscp , by using IDM, download rate is bigger than what i set but with monitoring TC :
tc -s class show dev eth0
everything is OK and i thinks there is some thing wrong with TC

thanks.

Last edited by hesisaboury; 06-15-2012 at 07:54 AM.
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 11:18 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