tylertreat / comcast

Simulating shitty network connections so you can build better systems.
Apache License 2.0
10.31k stars 384 forks source link

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

Open god-pane opened 8 years ago

god-pane commented 8 years ago

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

tylertreat commented 8 years ago

Can you run the commands manually?

sudo tc qdisc show | grep "netem"
sudo tc qdisc add dev eth0 handle 10: root htb
god-pane commented 8 years ago

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

bbigras commented 8 years ago

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
ghost commented 7 years ago

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?

bbigras commented 7 years ago

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

DanielRuf commented 5 years ago

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