| To: | lartc@mailman.ds9a.nl |
|---|---|
| Subject: | [LARTC] Please Help: applying multiple different delays with netem |
| From: | "Gabriel Somlo" <gsomlo@gmail.com> |
| Date: | Thu, 29 Mar 2007 22:49:45 -0400 |
| Delivered-to: | sp-com-lists@consult.net |
| Delivered-to: | lartc-list@securepoint.com |
| Delivered-to: | lartc@outpost.ds9a.nl |
| Dkim-signature: | a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=bMl/9FtVpEzVXNvdnNoB3J3idaQ2kKQUbncai/KaEw6TvQ80cUBCF6Rsmv7yx+5K/o2+qgs2cnjkcjisPCwiSq3N41ydjVlzAiNhf+HHbAdlk+OhepfWYGRz5N+/wIgxDU+EzBJmeexiqWDnCxVaEyvMDR2fLZ4NREUbmSER+Aw= |
| Domainkey-signature: | a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=BQ+JWMlgsrGhqwqAaQCbuLqlmHjnObYE15Ur617LaShRs2JOjFVzOFJEMsSgpJVcfun0zpHcbleKS1UINDU0ne/IXYtV1VOxCTfuYJnXW79+c9DQqkJLBm8aahp/Ck9J9lQmqCJEMPS5GX3Kq4zw6FGnmylap/CXJ0lyiCG0Fj0= |
| List-archive: | <http://mailman.ds9a.nl/pipermail/lartc> |
| List-help: | <mailto:lartc-request@mailman.ds9a.nl?subject=help> |
| List-id: | "Mailinglist of the Linux Advanced Routing & Traffic Control project" <lartc.mailman.ds9a.nl> |
| List-post: | <mailto:lartc@mailman.ds9a.nl> |
| List-subscribe: | <http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc>, <mailto:lartc-request@mailman.ds9a.nl?subject=subscribe> |
| List-unsubscribe: | <http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc>, <mailto:lartc-request@mailman.ds9a.nl?subject=unsubscribe> |
| Sender: | lartc-bounces@mailman.ds9a.nl |
I'm trying to use tc and netem to delay packets from several different
machines as they exit via eth0. Assume two source IPs, 10.0.0.122 and
10.0.0.133. I'd like to delay packets from the first one by 200ms, and
packets from the second one by 300 ms. Any other traffic should be sent
out normally. Here's what I tried:
# make three classes, 1:1, 1:2, and 1:3:
tc qdisc add dev eth0 root handle 1: prio
# attach netem with 200ms delay to priority 2 hook:
tc qdisc add dev eth0 parent 1:2 handle 20: netem delay 200ms
# attach netem with 300ms delay to priority 3 hook:
tc qdisc add dev eth0 parent 1:3 handle 30: netem delay 300ms
# classify packets from .122 as priority 2:
tc filter add dev eth0 protocol ip parent 1:0 prio 2 u32 \
match ip src 10.0.0.122/32 flowid 10:2
# classify packets from .133 as priority 3:
tc filter add dev eth0 protocol ip parent 1:0 prio 3 u32 \
match ip src 10.0.0.133/32 flowid 10:3
This works, except unclassified traffic (e.g., from another machine
10.0.0.111) will ALWAYS be delayed by 200 ms (same as traffic
matched to priority 2).
How do I make unmatched traffic go through normally ? Do I need to
attach a qdisc to priority 1, or is there an assumed default qdisc
already there ? Is there something magic about priority 2, and do I
need to understand and modify the priomap to fix this? Would this way
of doing things generalize for more classes with different delays
applied to them ?
This is the first time I've dealt with this, and I'm somewhat shocked
and awed :) Any help is much appreciated !
Thanks,
Gabriel
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [LARTC] Problem attaching htb class to a htb qdisc, Andy Furniss |
|---|---|
| Next by Date: | TC Protocols was RE: [LARTC] RE: IFB setup was no subject, Leigh Sharpe |
| Previous by Thread: | [LARTC] wondershaper and dmzs, seph |
| Next by Thread: | Re: [LARTC] Please Help: applying multiple different delays with netem, Andy Furniss |
| Indexes: | [Date] [Thread] [Top] [All Lists] |