Greetings, this is my first message to the list. In a testbed I am
creating, I need to set different delays for packets going to different
addresses on a single box. Because netem is only for classless qdiscs, I
am not able to combine it with filtering, so I am forced to have
multiple interfaces, one for each desired delay. However, I'm seeing
something very troubling. FWIW, this is under Debian on a VM.
I use the following two commands:
# tc qdisc add dev enp0s18 root netem delay 200ms
# tc qdisc add dev enp0s8 root netem delay 1200ms
Then:
# tc qdisc list
qdisc noqueue 0: dev lo root refcnt 2
qdisc pfifo_fast 0: dev enp0s3 root refcnt 2 bands 3 priomap 1 2 2 2 1
2 0 0 1 1 1 1 1 1 1 1
qdisc netem 8002: dev enp0s8 root refcnt 2 limit 1000 delay 1.2s
qdisc pfifo_fast 0: dev enp0s9 root refcnt 2 bands 3 priomap 1 2 2 2 1
2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: dev enp0s10 root refcnt 2 bands 3 priomap 1 2 2 2 1
2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: dev enp0s16 root refcnt 2 bands 3 priomap 1 2 2 2 1
2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: dev enp0s17 root refcnt 2 bands 3 priomap 1 2 2 2 1
2 0 0 1 1 1 1 1 1 1 1
qdisc netem 8001: dev enp0s18 root refcnt 2 limit 1000 delay 200.0ms
qdisc pfifo_fast 0: dev enp0s19 root refcnt 2 bands 3 priomap 1 2 2 2 1
2 0 0 1 1 1 1 1 1 1 1
However, now pinging addresses on *any* interface on the box gets a
1200ms delay. That is, pinging addresses on enp0s18 gets the same delay
as was given to enp0s8, but even weirder, pinging addresses on enp0s9
get the 1200ms delay as well.
Is this expected? Is it preventable? All clues are appreciated.
--Paul Hoffman