Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error under ubuntu 18.04 #11

Open
estebantoribio opened this issue Oct 18, 2020 · 2 comments
Open

Error under ubuntu 18.04 #11

estebantoribio opened this issue Oct 18, 2020 · 2 comments

Comments

@estebantoribio
Copy link

estebantoribio commented Oct 18, 2020

Hi @urbenlegend , I would like to have some help from you. I'm trying to use your tool for a final project.
After running the following command:
sudo python netimpair.py -n ens33 netem --delay 200

Error: Cannot delete qdisc with handle of zero.
Including the following for network impairment:
tc filter add dev ens33 protocol ip parent 1:0 prio 3 u32 match ip src 0/0 flowid 1:3
tc filter add dev ens33 protocol ipv6 parent 1:0 prio 4 u32 match ip6 src ::/0 flowid 1:3

Excluding the following from network impairment:
tc filter add dev ens33 protocol ip parent 1:0 prio 1 u32 match ip dport 22 0xffff flowid 1:2
tc filter add dev ens33 protocol ip parent 1:0 prio 1 u32 match ip sport 22 0xffff flowid 1:2
tc filter add dev ens33 protocol ipv6 parent 1:0 prio 2 u32 match ip6 dport 22 0xffff flowid 1:2
tc filter add dev ens33 protocol ipv6 parent 1:0 prio 2 u32 match ip6 sport 22 0xffff flowid 1:2

Network impairment starting. Press Ctrl-C to restore normal behavior and quit.

Setting network impairment:
tc qdisc change dev ens33 parent 1:3 handle 30: netem loss 0% 0% duplicate 0% delay 200ms 0ms 0% reorder 0% 0%
Illegal "loss percent"
Traceback (most recent call last):
File "netimpair.py", line 295, in main
args.toggle)
File "netimpair.py", line 185, in netem
self._check_call(impair_cmd)
File "netimpair.py", line 58, in _check_call
subprocess.check_call(shlex.split(command))
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['tc', 'qdisc', 'change', 'dev', 'ens33', 'parent', '1:3', 'handle', '30:', 'netem', 'loss', '0%', '0%', 'duplicate', '0%', 'delay', '200ms', '0ms', '0%', 'reorder', '0%', '0%']' returned non-zero exit status 1
Network impairment teardown complete.

@urbenlegend
Copy link
Owner

Okay, I just installed Ubuntu 20.04. I'll look into it when I have time.

@zemaree
Copy link

zemaree commented May 4, 2021

Hi, i have the same issue. look like that with ratio is working and the issue is only when I try to use a netem command.

Would be great if you can take a look and fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants