Skip to content

Commit dc515ae

Browse files
committed
Rename tc-gen.sh to tc-gen
1 parent 06eaebf commit dc515ae

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,37 @@ policing on linux. It tries to use best practices whenever possible while still
44
being generic and easy to use. The script is using HTB with fq_codel to do
55
the heavy lifting.
66

7-
Run tc-gen.sh without parameters to see more details.
7+
Run tc-gen without parameters to see more details.
88

99
## Examples of common use
1010
Shape egress to 25 mbit/s
1111

12-
tc-gen.sh -i eth0 -u 25
12+
tc-gen -i eth0 -u 25
1313
Shape egress to 5 mbit/s and ingress to 10 mbit/s using IFB-interface
1414

15-
tc-gen.sh -i eth0 -u 5 -d 10 -f ifb0
15+
tc-gen -i eth0 -u 5 -d 10 -f ifb0
1616
Shape egress to 1500 kbit/s and police ingress to 20 mbit/s
1717

18-
tc-gen.sh -i eth0 -u 1500k -d 20M
18+
tc-gen -i eth0 -u 1500k -d 20M
1919
Display current configuration
2020

21-
tc-gen.sh -i eth0
21+
tc-gen -i eth0
2222
Remove configuration
2323

24-
tc-gen.sh -i eth0 -x
24+
tc-gen -i eth0 -x
2525

2626
## /etc/network/interfaces examples
2727
# Simple DHCP WAN config
2828
allow-auto eth1
2929
iface eth1 inet dhcp
30-
post-up /usr/local/bin/tc-gen.sh -i ${IFACE} -u 10 -d 100 -f ifb0
30+
post-up /usr/local/bin/tc-gen -i ${IFACE} -u 10 -d 100 -f ifb0
3131

3232
# More advanced example with an additional tc filter exclude for
3333
# UDP-encapsulated IPsec ESP-traffic to avoid double counting IPsec data on
3434
# ingress
3535
allow-auto bond0.12
3636
iface bond0.12 inet dhcp
37-
post-up /usr/local/bin/tc-gen.sh -i ${IFACE} -u 10 -d 100 -f ifb0
37+
post-up /usr/local/bin/tc-gen -i ${IFACE} -u 10 -d 100 -f ifb0
3838
post-up /sbin/tc filter add dev ${IFACE} parent ffff: protocol ip prio 1 u32 match ip protocol 17 0xff match ip dport 4500 0xffff action pass
3939

4040
# Example with egress shaping on gre-tunnel
@@ -46,4 +46,4 @@ Remove configuration
4646
endpoint 10.1.2.2
4747
mode gre
4848
mtu 1400
49-
post-up /usr/local/bin/tc-gen.sh -i ${IFACE} -u 25
49+
post-up /usr/local/bin/tc-gen -i ${IFACE} -u 25

src/tc-gen.sh renamed to src/tc-gen

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33

4-
VERSION="1.1.6"
4+
VERSION="1.2.0"
55
TC=$(command -v tc)
66
ETHTOOL=$(command -v ethtool)
77
IP=$(command -v ip)
@@ -22,7 +22,7 @@ set -o errtrace -o pipefail
2222

2323
print_usage () {
2424
cat << EOF
25-
tc-gen.sh -i IF_NAME [OPTIONS]
25+
tc-gen -i IF_NAME [OPTIONS]
2626
2727
-i IF_NAME
2828
If this is the only option, the current filter, qdisc and class
@@ -66,19 +66,19 @@ OPTIONS
6666
6767
EXAMPLES OF COMMON USE
6868
Shape egress to 25 mbit/s
69-
tc-gen.sh -i eth0 -u 25
69+
tc-gen -i eth0 -u 25
7070
7171
Shape egress to 5 mbit/s and ingress to 10 mbit/s using IFB-interface
72-
tc-gen.sh -i eth0 -u 5 -d 10 -f ifb0
72+
tc-gen -i eth0 -u 5 -d 10 -f ifb0
7373
7474
Shape egress to 1500 kbit/s and police ingress to 20 mbit/s
75-
tc-gen.sh -i eth0 -u 1500k -d 20M
75+
tc-gen -i eth0 -u 1500k -d 20M
7676
7777
Display current configuration
78-
tc-gen.sh -i eth0
78+
tc-gen -i eth0
7979
8080
Remove configuration
81-
tc-gen.sh -i eth0 -x
81+
tc-gen -i eth0 -x
8282
8383
Always use ingress shaping vs policing if you want the best results. An
8484
additional bonus is that GRO normally can be left on when not using
@@ -125,7 +125,7 @@ EOF
125125
}
126126

127127
print_version () {
128-
echo "tc-gen.sh v${VERSION}"
128+
echo "tc-gen v${VERSION}"
129129
}
130130

131131
get_htb_quantum () {

0 commit comments

Comments
 (0)