tylertreat / comcast

Simulating shitty network connections so you can build better systems.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I couldn't setup the packet rules: %s exit status 2

god-pane opened this issue · comments

commented

root@ubuntu:~# comcast --device=eth0 --latency=250 --target-bw=1000 --packet-loss=10%
sudo tc qdisc show | grep "netem"
sudo tc qdisc add dev eth0 handle 10: root htb
I couldn't setup the packet rules: %s exit status 2

Can you run the commands manually?

sudo tc qdisc show | grep "netem"
sudo tc qdisc add dev eth0 handle 10: root htb
commented

root@ubuntu:~# tc qdisc add dev eth0 handle 10: root htb
RTNETLINK answers: File exists

I have a similiar problem on Arch.

comcast --device=enp2s0 --packet-loss=100% --target-addr=ip --target-proto=tcp --target-port=22

sudo tc qdisc show | grep "netem"
sudo tc qdisc add dev enp2s0 handle 10: root htb default 1
I couldn't setup the packet rules: exit status 2

sudo tc qdisc show | grep "netem"
sudo tc qdisc add dev enp2s0 handle 10: root htb

RTNETLINK answers: No such file or directory

With those parameters, these are the generated commands (you can get the raw command output if you use the --dry-run paramter)

sudo tc qdisc add dev eth0 handle 10: root htb default 1
sudo tc class add dev eth0 parent 10: classid 10:1 htb rate 1000000kbit
sudo tc class add dev eth0 parent 10: classid 10:10 htb rate 1000kbit
sudo tc qdisc add dev eth0 parent 10:10 handle 100: netem delay 250ms rate 1000k

Can you try to set those up and see which one it falls over with?

I updated comcast and comcast --device=enp2s0 --packet-loss=100% --target-addr=<ip> --target-proto=tcp --target-port=22 worked. Thanks.

Here sudo tc qdisc show | grep "netem" returns nothing.