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

Reply
 
LinkBack Search this Thread
Old 06-11-2009, 04:06 PM   #1
CarLost
Member
 
Registered: Jun 2004
Location: Sentado en mi trasero en Chile
Distribution: ArchLinux
Posts: 45

Rep: Reputation: 16
CLASSYFY and MARK are not working on a normal Routing


Hi LQ people, please need your help related to a script.

I already try to LARC mailist, and try to subscript myself, without success.

I need to shape the bandwidth to a very large numbers of IPs in severals VLANs with normal routin (No Nat, and No Firewalling)
The traffic are not shaped....

I'm doing the next:
Make a base qdisc
Code:
tc qdisc add dev $iface root handle 1: htb
Then make a base class to send all national traffic
Code:
tc class add dev $iface parent 1: classid 1:1 htb rate 1gbit.
Next I iterate over a lists of nets to salve national traffic (disable for now, until all works)

Then I create a base class and qdisc per Range I mean ...
Code:
tc class add dev $iface parent 1:  classid 1:$clase htb rate 1gbit  # where $clase is 224 or 225... (C class address)
   tc qdisc add dev $iface parent 1:$clase handle $clase: htb
Next I iterate with every IP
Code:
tc class add dev $iface parent $clase: classid $clase:$n htb rate 256kbit
To be more clare.
If I get a IP 200.114.225.4
Code:
tc class add dev $iface parent 1:  classid 1:225 htb rate 1gbit  ### base
  tc qdisc add dev $iface parent 1:225 handle 225: htb  # to by more "nemotechnical"

  tc class add dev $iface parent 225: classid 225:4 htb rate 256kbit  ##  4 is for 225.'4'  another nemo

Then I try with CLASSIFY and didn't work
Then I try with MARK and don't work either -- whit this filter:
Code:
tc filter add dev $iface protocol ip parent $clase:$n prio 0 handle $clase$n fw flowid $clase:$n
I don't know really where is my error if any,

Can you please give me an idea why this are not working????

Thanks

PS: I'm sorry if my very poor english disturbing you in any way.

Last edited by CarLost; 06-11-2009 at 04:09 PM. Reason: formating ....
 
Old 06-11-2009, 05:05 PM   #2
grepmasterd
Member
 
Registered: Aug 2003
Location: Seattle
Distribution: ubuntu, lately
Posts: 181
Blog Entries: 1

Rep: Reputation: 35
you should verify this, but I think that tc only reads the mark. use netfilter (iptables) to set the mark.
 
Old 06-12-2009, 07:50 AM   #3
CarLost
Member
 
Registered: Jun 2004
Location: Sentado en mi trasero en Chile
Distribution: ArchLinux
Posts: 45

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by grepmasterd View Post
you should verify this, but I think that tc only reads the mark. use netfilter (iptables) to set the mark.
Thank for answer me

maybe I don't be clear enough

I already try both, the CLASSIFY and the MARK modules of iptables

the first one:
Code:
iptables -t mangle -A POSTROUTING -d $cut -j CLASSIFY --set-class $clase:$n
Whete $cut is the IP address

And the second:
Code:
iptables -t mangle -A FORWARD -d $cut -j MARK --set-mark $clase$n
Then I put the "tc filter ..."

Again thanks
 
Old 06-16-2009, 08:07 AM   #4
CarLost
Member
 
Registered: Jun 2004
Location: Sentado en mi trasero en Chile
Distribution: ArchLinux
Posts: 45

Original Poster
Rep: Reputation: 16
Up.....
 
Old 06-18-2009, 01:48 PM   #5
CarLost
Member
 
Registered: Jun 2004
Location: Sentado en mi trasero en Chile
Distribution: ArchLinux
Posts: 45

Original Poster
Rep: Reputation: 16


Last up untill give up.......
 
  


Reply

Tags
mark, tc


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Raid Drives Not Working On Normal Boot tehkaao Linux - Hardware 1 05-22-2007 06:12 PM
Hi. Apache not working under normal user. parsex Linux - Newbie 8 07-27-2006 03:06 PM
#!/script not working like normal skaarak Programming 8 06-01-2005 09:58 AM
normal FC3 grub restore not working! shishimo Fedora 4 03-30-2005 02:30 PM
Mozilla 'mark all read' shortcut in mail/news not working EdoardoC Linux - General 3 03-10-2004 02:46 AM


All times are GMT -5. The time now is 08:17 AM.

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
Open Source Consulting | Domain Registration