Skip to contentSkip to conversation

cbq.init for one port on a subnet

LARTC Srikanth W 1 participant 2 messages Feb 5, 2003 – Feb 6, 2003

lore
Share & tools
lore

Srikanth W

author
#0 lore raw

Sub:[LARTC] cbq init for one port on a subnet

Hello,

We use cbq.init to limit bandwidth. It works great on a per-user basis. Now I'd like to limit traffic from a netblock to the Internet on port 6699.

Network is 192.168.0.160 mask 255.255.255.224
eth0 is the gateway
eth1 connects the netblock in question

Is this the proper syntax;

DEVICE=eth0,10Mbit,1Mbit
RATE0Kbit
WEIGHTKbit
PRIO=5
RULEf99 192.168.0.160/27,

Thanks!

Scott

Hi! Scott,

Your Config. file s'd be

DEVICE=eth0,10Mbit,1Mbit
RATE0Kbit
WEIGHTKbit
PRIO=5
RULE2.168.0.160/27:6699

like this & try.

Good Luck.

Srikanth.

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

author
#1 lore raw

Hi!

I've tried with the config. file

DEVICE=eth0,10Mbit,1Mbit
RATE0Kbit
WEIGHTKbit
PRIO=5
RULE2.168.0.160/27:6699

only,
It's works fine for me,
Find the stats for the same hereunder,

# ./cbq.init-v0.7.1 start
192.168.0.160/27:6699:   match ip dst 192.168.0.160/27 match ip dport 6699 
0xffff
# ./cbq.init-v0.7.1 stats
### eth0: queueing disciplines

qdisc tbf 5: rate 100Kbit burst 10Kb lat 488.3ms
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)

qdisc cbq 1: rate 10Mbit (bounded,isolated) prio no-transmit Sent 1924 bytes 28 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 624 undertime 0

### eth0: traffic classes

class cbq 1: root rate 10Mbit (bounded,isolated) prio no-transmit
Sent 1924 bytes 28 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 624 undertime 0
class cbq 1:5 parent 1: leaf 5: rate 100Kbit (bounded) prio 5
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 1.79878e+06 undertime 0

### eth0: filtering rules

filter parent 1: protocol ip pref 100 u32
filter parent 1: protocol ip pref 100 u32 fh 800: ht divisor 1 filter parent 1: protocol ip pref 100 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:5
match c0a800a0/ffffffe0 at 16
match 00001a2b/0000ffff at 20

reg,
Srikanth.

Quoted 15 lines · you

Hi, Thanks for the quick reply. I tried that and got an error message
when I started cbq.
-----------------------------
What is "ff"?
Usage: ... u32 [ match SELECTOR ... ] [ link HTID ] [ classid CLASSID ]
[ police POLICE_SPEC ] [ offset OFFSET_SPEC ] [ ht HTID ] [ hashkey HASHKEY_SPEC ]
[ sample SAMPLE ]
or u32 divisor DIVISOR

Where: SELECTOR := SAMPLE SAMPLE ...
SAMPLE := { ip | ip6 | udp | tcp | icmp | u{32|16|8} } SAMPLE_ARGS FILTERID := X:Y:Z
------------------------------

Quoted 46 lines

If you can help me I'd really appreciate it.

Thanks again,

Scott

Quoted 40 lines

Sub:[LARTC] cbq init for one port on a subnet

Hello,

We use cbq.init to limit bandwidth. It works great on a per-user basis. Now I'd like to limit traffic from a netblock to the Internet on port 6699.

Network is 192.168.0.160 mask 255.255.255.224
eth0 is the gateway
eth1 connects the netblock in question

Is this the proper syntax;

DEVICE=eth0,10Mbit,1Mbit
RATE0Kbit
WEIGHTKbit
PRIO=5
RULEf99 192.168.0.160/27,

Thanks!

Scott

Hi! Scott,

Your Config. file s'd be

DEVICE=eth0,10Mbit,1Mbit
RATE0Kbit
WEIGHTKbit
PRIO=5
RULE2.168.0.160/27:6699

like this & try.

Good Luck.

Srikanth.

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/