Comments (8)
Please let me confirm your suggestion especially the latter part.
changing the logic of --change option.
Does it means to change the logic as follows?
Before (current behavior)
- Already exist a shaping rule -> Changing the rule parameter
- NOT exist a shaping rule -> Exit with error
After
- Already exist a shaping rule -> Changing the rule parameter (no change)
- NOT exist a shaping rule -> Add a new rule
from tcconfig.
@dastergon
Thank you for your confirmation.
It sure seems to be one of the common usages.
I would implement the feature in the next release.
from tcconfig.
@dastergon
Sorry to bother you.
I believe the problem fixed at tcconfig 0.16.1
.
Could you try this version?
# tcdel -d ens33 -a
# tcset --direction outgoing --dst-network 192.168.122.202 --delay 12milliseconds --rate 1Gbps --device ens33 --change
# tcset --direction incoming --dst-network 192.168.122.202 --delay 12milliseconds --device ens33 --rate 1Gbps --change
# tcset --direction outgoing --dst-network 192.168.122.203 --delay 12milliseconds --rate 1Gbps --device ens33 --change
# tcset --direction incoming --dst-network 192.168.122.203 --delay 12milliseconds --device ens33 --rate 1Gbps --change
# tcshow -d ens33
{
"ens33": {
"outgoing": {
"dst-network=192.168.122.202/32, protocol=ip": {
"filter_id": "800::800",
"delay": "12.0ms",
"rate": "1G"
},
"dst-network=192.168.122.203/32, protocol=ip": {
"filter_id": "800::801",
"delay": "12.0ms",
"rate": "1G"
}
},
"incoming": {
"dst-network=192.168.122.202/32, protocol=ip": {
"filter_id": "800::800",
"delay": "12.0ms",
"rate": "1G"
},
"dst-network=192.168.122.203/32, protocol=ip": {
"filter_id": "800::801",
"delay": "12.0ms",
"rate": "1G"
}
}
}
}
from tcconfig.
@thombashi exactly! Add a new rule but do not affect existing rules(i.e., --overwrite
behavior).
from tcconfig.
@dastergon
I have changed the --change
option behavior as described in the above comment.
Please try tcconfig 0.16.0
.
# tcshow -d ens33
{
"ens33": {
"outgoing": {},
"incoming": {}
}
}
# tcset -d ens33 --delay 10ms --change
# tcshow -d ens33
{
"ens33": {
"outgoing": {
"protocol=ip": {
"filter_id": "800::800",
"delay": "10.0ms",
"rate": "1G"
}
},
"incoming": {}
}
}
from tcconfig.
I have an issue when I try to create multiple entries with the --change
option.
How to reproduce
tcset --direction outgoing --dst-network 192.168.122.202 --delay 12milliseconds --rate 10Gbps --device ens3 --change
tcset --direction incoming --dst-network 192.168.122.202 --delay 12milliseconds --device ens3 --rate 10Gbps --change
The commands work as expected:
tcshow -d ens3
{
"ens3": {
"outgoing": {
"dst-network=192.168.122.202/32, protocol=ip": {
"delay": "12.0ms",
"rate": "10G",
"filter_id": "800::800"
}
},
"incoming": {
"dst-network=192.168.122.202/32, protocol=ip": {
"delay": "12.0ms",
"rate": "10G",
"filter_id": "800::800"
}
}
}
}
But when I try to add a new entry for a different network:
tcset --direction outgoing --dst-network 192.168.122.203 --delay 12milliseconds --rate 10Gbps --device ens3 --change; tcset --direction incoming --dst-network 192.168.122.203 --delay 12milliseconds --device ens3 --rate 10Gbps --change;
I get the following error:
[NOTICE] tcconfig: failed to 'tc qdisc add': qdisc already exists (dev ens3, handle=1602:, algo=htb). try to execute with: (a) --overwrite option if you want to overwrite the existing rule. (b) --add option if you want to add a new rule in addition to the existing rules. (c) --change option if you want to change the existing rule parameter.
[NOTICE] tcconfig: failed to add ip link: ip link already exists. try to execute with: (a) --overwrite option if you want to overwrite the existing rule. (b) --add option if you want to add a new rule in addition to the existing rules. (c) --change option if you want to change the existing rule parameter.
[NOTICE] tcconfig: failed to 'tc qdisc add': ingress qdisc already exists. try to execute with: (a) --overwrite option if you want to overwrite the existing rule. (b) --add option if you want to add a new rule in addition to the existing rules. (c) --change option if you want to change the existing rule parameter.
[NOTICE] tcconfig: failed to 'tc qdisc add': qdisc already exists (dev ifb5634, handle=1602:, algo=htb). try to execute with: (a) --overwrite option if you want to overwrite the existing rule. (b) --add option if you want to add a new rule in addition to the existing rules. (c) --change option if you want to change the existing rule parameter.
from tcconfig.
@thombashi It works now! Thanks!
from tcconfig.
@dastergon
Thank you for confirming.
I will close the issue then.
from tcconfig.
Related Issues (20)
- Add a command line option to exclude network management traffic from impairment (dhcp, icmp and arp traffic)
- Limit outgoing speed HOT 1
- How to implement different network routes to different interfaces HOT 2
- Crash in tcshow Filter Parsing HOT 3
- Distinguish upload and download HOT 3
- 'Exclusivity flag on, cannot modify.' error when adding multiple --network rules
- Can tcconfig can be run on python virtualenvironment?
- Delete shaping rule using ID and Network not working
- ValueError: Level 'QUIET' does not exist HOT 1
- Can't change rate incoming with tcset HOT 5
- SQLLite Error
- Documentation for tcset "--direction incoming" appears to be incorrect (?)
- Add support for setting "limit" parameter
- when use --dirction incoming , Error reporting “modprobe: FATAL: Module ifb not found in directory /lib/modules/5.15.0-72-generic” HOT 3
- Limit based on source ip
- /usr/sbin/tc filter show dev lxc6a7cb0103198 to add the direction(ingress/egress)
- Doesn't work with busybox HOT 1
- SimpleSQLite >= 1.5.0 breaks tcconfig HOT 2
- Dummy .deb package inside tcconfig_0.28.0_jammy_amd64.deb HOT 1
- How to properly slow down traffic on Raspberry? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tcconfig.