Skip to contentSkip to conversation

wondershaper and dmzs

LARTC seph 3 participants 3 messages Mar 30, 2007

lore
Share & tools
lore

seph

author
#0 lore raw
Quoted 5 lines · Bruno Wolff III
Quoted 3 lines

Can I do this with tc, or is the entire interface shaped? It seems like I might be able to create a more explicate filter, but I'm having trouble getting it to work.

You can filter on the destination ip address.

Yes, I'd found that. And I can successfully right filters that match my dmz, and send things into the bulk bucket (1:30 in wondershaper), but I can't figure out how to not get them limited.

I think I need to use a filter to send them to the root, or to a non-existent class. But I tried both of those, and neither seemed to work.

Presumably something in the rest of my filter line is wrong, but I haven't found much in the docs. I've been playing around with something like:

  tc filter add dev eth0 parent 1:  protocol all prio 1 u32 \
    match ip dst 1.2.3.4/32 flowid 1:1

for various flowids, and haven't found anything that works.

seph
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#1 lore raw
Quoted 11 lines · seph
Quoted 5 lines · Bruno Wolff III
Quoted 3 lines

Can I do this with tc, or is the entire interface shaped? It seems like I might be able to create a more explicate filter, but I'm having trouble getting it to work.

You can filter on the destination ip address.

Yes, I'd found that. And I can successfully right filters that match my dmz, and send things into the bulk bucket (1:30 in wondershaper), but I can't figure out how to not get them limited.

That doesn't sound right. I haven't looked at the commands generated by word shaper, but it seems like you should have a new bucket for your unlimited traffic. 'bulk' suggests a bucket that has low priority, not no limit.

You might have to filter the traffic a level higher. If the qdisc you are filtering already has some total limit, making a new class below it, won't escape that.

Quoted 3 lines

I think I need to use a filter to send them to the root, or to a non-existent class. But I tried both of those, and neither seemed to work.

I don't believe you can do that.
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#2 lore raw
In reply to seph
Quoted 15 lines · seph
Quoted 4 lines · Bruno Wolff III
Quoted 3 lines

Can I do this with tc, or is the entire interface shaped? It seems like I might be able to create a more explicate filter, but I'm having trouble getting it to work.

You can filter on the destination ip address.

Yes, I'd found that. And I can successfully right filters that match my dmz, and send things into the bulk bucket (1:30 in wondershaper), but I can't figure out how to not get them limited.

I think I need to use a filter to send them to the root, or to a non-existent class. But I tried both of those, and neither seemed to work.

Quoted 8 lines

Presumably something in the rest of my filter line is wrong, but I haven't found much in the docs. I've been playing around with something like:

  tc filter add dev eth0 parent 1:  protocol all prio 1 u32 \
    match ip dst 1.2.3.4/32 flowid 1:1

for various flowids, and haven't found anything that works.

Which wondershaper - From memory htb one is flawed in two ways -

The rates add up to more that parents rate.

It uses htb default (OK the example is on ppp so it doesn't matter if you shape on ppp) but if you have it on eth it is not nice as arp will end up there.

Try changing default 30 to default 0 (or just don't specify default) either way htb will then let unclassified traffic through unshaped.

You will need a new filter with highest prio to catch unclassified IP traffic something like -

...... protocol ip prio 99 u32 match u32 0 0 flowid 1:30

I would also change all to ip in your filter that classifies the traffic to be exempted to a nonexisting flowid.

There may well be a more elegant way to do the filtering, but that should work.

Andy.
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc