netem packet loss for packets destined to the same machine

1

I am using a command like

sudo tc qdisc add dev eno1 root netem loss 10%

to delay all the outgoing packets over the interface eno1, but this won't work if the packets are destined for the same system. May be becuase (I think) the packets don't reach the interface, but is delivered much before that.

So, I want something that can delay the packets that are destined to the same system. (source IP is same as destination IP).

Haris

Posted 2016-06-15T19:47:46.850

Reputation: 127

Answers

2

You should just be able to change the target device to the loopback interface.

sudo tc qdisc add dev lo root netem loss 10%

Mark Riddell

Posted 2016-06-15T19:47:46.850

Reputation: 652