LinuxQuestions.org
Help answer threads with 0 replies.
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


Reply
  Search this Thread
Old 05-03-2004, 11:56 AM   #1
FlyingMoose
LQ Newbie
 
Registered: Mar 2003
Posts: 19

Rep: Reputation: 0
Need help with tc


Ok here's my situation:

I have a server on a 768kbit (upload) DSL line. I have two IP addresses, on eth0 and eth0:0.

One IP has hobby sites, and the other IP has business sites. If the bandwidth starts to get saturated, I want the business sites to always take prirority over the hobby sites, so that the business sites won't slow down.

This is what I have so far:

tc qdisc add dev eth0 root handle 1: cbq bandwidth 10Mbit cell 8 avpkt 1000 mpu 64 rate 700kbit

tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 10Mbit avpkt 1000 prio 1 bounded isolated allot 1514 weight 1 maxburst 21 rate 10MBit
tc class add dev eth0 parent 1:0 classid 1:2 cbq bandwidth 10Mbit avpkt 1000 prio 2 bounded isolated allot 1514 weight 1 maxburst 21 rate 10MBit

tc filter add dev eth0 parent 1:0 protocol ip prio 5 handle 1: u32 divisor 2

tc filter add dev eth0 parent 1:0 prio 5 u32 match ip src x.x.x.1 flowid 1:1
tc filter add dev eth0 parent 1:0 prio 5 u32 match ip src x.x.x.2 flowid 1:2


What this should do is first throttle the data to 700kbit, since if I don't then the delay will be in the DSL modem buffer and not the tc buffer. Then, I want to prioritize all of the traffic going out through one IP before the other one.

These commands run fine, but they don't seem to change anything at all, not even throttle the overall rate. I can throttle the bandwidth to the connection itself with:

tc qdisc add dev eth0 root tbf rate 700kbit latency 50ms burst 1540

I may be totally barking up the wrong tree, and there may be a much easier way to accomplish this. I've never even heard of tc before today. If so, please let me know.

Thanks.
 
Old 05-03-2004, 08:05 PM   #2
FlyingMoose
LQ Newbie
 
Registered: Mar 2003
Posts: 19

Original Poster
Rep: Reputation: 0
Documentation

Does anyone at least know of some good documentation for tc that doesn't suck?
 
  


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



LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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