Shaping inbound ok, outbound wrong

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, I´m shaping traffic using htb on both interfaces, I noticed that shaping
download traffic is workinggreat but shaping upload traffic is not working
at all (no sent packets, no dropped, no overlimits)I have eth0 facing the
backbone and eth1 facing the LAN. Thanks for your help.These are the
commands I run:tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1 htb default 10 r2q 5

tc qdisc del dev eth1 root
tc qdisc add dev eth1 root handle 1 htb default 10 r2q 5

tc class add dev eth0 parent 1: classid 1:2 htb rate 3Mbit

tc class add dev eth0 parent 1:2 classid 1:100 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth0 parent 1:100 handle 100 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.15 classid 1:100

tc class add dev eth0 parent 1:2 classid 1:101 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth0 parent 1:101 handle 101 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.16 classid 1:101

tc class add dev eth0 parent 1:2 classid 1:102 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth0 parent 1:102 handle 102 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.17 classid 1:102

tc class add dev eth0 parent 1:2 classid 1:103 htb rate 256Kbit ceil 256Kbit
tc qdisc add dev eth0 parent 1:103 handle 103 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.18 classid 1:103

tc class add dev eth0 parent 1:2 classid 1:104 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth0 parent 1:104 handle 104 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.22 classid 1:104

tc class add dev eth0 parent 1:2 classid 1:105 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth0 parent 1:105 handle 105 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.21 classid 1:105

tc class add dev eth0 parent 1:2 classid 1:106 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth0 parent 1:106 handle 106 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.19 classid 1:106

tc class add dev eth0 parent 1:2 classid 1:107 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth0 parent 1:107 handle 107 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.23 classid 1:107

tc class add dev eth0 parent 1:2 classid 1:108 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth0 parent 1:108 handle 108 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.24 classid 1:108

tc class add dev eth0 parent 1:2 classid 1:2211 htb rate 64Kbit ceil 64Kbit
tc qdisc add dev eth0 parent 1:2211 handle 2211 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.220 classid 1:2211

tc class add dev eth0 parent 1:2 classid 1:2212 htb rate 128Kbit ceil
128Kbit
tc qdisc add dev eth0 parent 1:2212 handle 2212 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.225 classid 1:2212

tc class add dev eth0 parent 1:2 classid 1:53 htb rate 256Kbit ceil 256Kbit
tc qdisc add dev eth0 parent 1:53 handle 53 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.4 classid 1:53

tc class add dev eth0 parent 1:2 classid 1:54 htb rate 256Kbit ceil 256Kbit
tc qdisc add dev eth0 parent 1:54 handle 54 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.100 classid 1:54

tc class add dev eth0 parent 1:2 classid 1:55 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth0 parent 1:55 handle 55 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
10.10.100.4 classid 1:55

tc class add dev eth0 parent 1:2 classid 1:56 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth0 parent 1:56 handle 56 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
192.168.50.13 classid 1:56

tc class add dev eth0 parent 1:2 classid 1:58 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth0 parent 1:58 handle 58 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.27 classid 1:58

tc class add dev eth0 parent 1:2 classid 1:60 htb rate 256Kbit ceil 256Kbit
tc qdisc add dev eth0 parent 1:60 handle 60 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.26 classid 1:60

tc class add dev eth0 parent 1:2 classid 1:82 htb rate 64Kbit ceil 64Kbit
tc qdisc add dev eth0 parent 1:82 handle 82 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.6 classid 1:82

tc class add dev eth0 parent 1:2 classid 1:84 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth0 parent 1:84 handle 84 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.25 classid 1:84

tc class add dev eth0 parent 1:2 classid 1:85 htb rate 384Kbit ceil 384Kbit
tc qdisc add dev eth0 parent 1:85 handle 85 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.1 classid 1:85

tc class add dev eth0 parent 1:2 classid 1:86 htb rate 384Kbit ceil 384Kbit
tc qdisc add dev eth0 parent 1:86 handle 86 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.2 classid 1:86

tc class add dev eth0 parent 1:2 classid 1:88 htb rate 64Kbit ceil 64Kbit
tc qdisc add dev eth0 parent 1:88 handle 88 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.5 classid 1:88

tc class add dev eth0 parent 1:2 classid 1:89 htb rate 1024Kbit ceil
1024Kbit
tc qdisc add dev eth0 parent 1:89 handle 89 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.3 classid 1:89

tc class add dev eth0 parent 1:2 classid 1:90 htb rate 256Kbit ceil 256Kbit
tc qdisc add dev eth0 parent 1:90 handle 90 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.7 classid 1:90

tc class add dev eth0 parent 1:2 classid 1:91 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth0 parent 1:91 handle 91 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.8 classid 1:91

tc class add dev eth0 parent 1:2 classid 1:92 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth0 parent 1:92 handle 92 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.20 classid 1:92

tc class add dev eth0 parent 1:2 classid 1:93 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth0 parent 1:93 handle 93 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.10 classid 1:93

tc class add dev eth0 parent 1:2 classid 1:94 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth0 parent 1:94 handle 94 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.9 classid 1:94

tc class add dev eth0 parent 1:2 classid 1:95 htb rate 64Kbit ceil 64Kbit
tc qdisc add dev eth0 parent 1:95 handle 95 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.210 classid 1:95

tc class add dev eth0 parent 1:2 classid 1:96 htb rate 256Kbit ceil 256Kbit
tc qdisc add dev eth0 parent 1:96 handle 96 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.11 classid 1:96

tc class add dev eth0 parent 1:2 classid 1:97 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth0 parent 1:97 handle 97 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.12 classid 1:97

tc class add dev eth0 parent 1:2 classid 1:98 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth0 parent 1:98 handle 98 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.13 classid 1:98

tc class add dev eth0 parent 1:2 classid 1:99 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth0 parent 1:99 handle 99 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.14 classid 1:99

tc class add dev eth1 parent 1: classid 1:2 htb rate 3Mbit

tc class add dev eth1 parent 1:2 classid 1:2254 htb rate 64Kbit ceil 64Kbit
tc qdisc add dev eth1 parent 1:2254 handle 2254 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.220 classid 1:2254

tc class add dev eth1 parent 1:2 classid 1:2255 htb rate 128Kbit ceil
128Kbit
tc qdisc add dev eth1 parent 1:2255 handle 2255 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.225 classid 1:2255

tc class add dev eth1 parent 1:2 classid 1:53 htb rate 256Kbit ceil 256Kbit
tc qdisc add dev eth1 parent 1:53 handle 53 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.4 classid 1:53

tc class add dev eth1 parent 1:2 classid 1:54 htb rate 256Kbit ceil 256Kbit
tc qdisc add dev eth1 parent 1:54 handle 54 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.100 classid 1:54

tc class add dev eth1 parent 1:2 classid 1:55 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth1 parent 1:55 handle 55 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
10.10.100.4 classid 1:55

tc class add dev eth1 parent 1:2 classid 1:56 htb rate 64Kbit ceil 64Kbit
tc qdisc add dev eth1 parent 1:56 handle 56 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
192.168.50.13 classid 1:56

tc class add dev eth1 parent 1:2 classid 1:58 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth1 parent 1:58 handle 58 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.27 classid 1:58

tc class add dev eth1 parent 1:2 classid 1:60 htb rate 256Kbit ceil 256Kbit
tc qdisc add dev eth1 parent 1:60 handle 60 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.26 classid 1:60

tc class add dev eth1 parent 1:2 classid 1:60 htb rate 64Kbit ceil 64Kbit
tc qdisc add dev eth1 parent 1:60 handle 60 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.6 classid 1:60

tc class add dev eth1 parent 1:2 classid 1:62 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth1 parent 1:62 handle 62 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.25 classid 1:62

tc class add dev eth1 parent 1:2 classid 1:63 htb rate 384Kbit ceil 384Kbit
tc qdisc add dev eth1 parent 1:63 handle 63 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.1 classid 1:63

tc class add dev eth1 parent 1:2 classid 1:64 htb rate 384Kbit ceil 384Kbit
tc qdisc add dev eth1 parent 1:64 handle 64 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.2 classid 1:64

tc class add dev eth1 parent 1:2 classid 1:66 htb rate 64Kbit ceil 64Kbit
tc qdisc add dev eth1 parent 1:66 handle 66 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.5 classid 1:66

tc class add dev eth1 parent 1:2 classid 1:67 htb rate 1024Kbit ceil
1024Kbit
tc qdisc add dev eth1 parent 1:67 handle 67 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.3 classid 1:67

tc class add dev eth1 parent 1:2 classid 1:68 htb rate 256Kbit ceil 256Kbit
tc qdisc add dev eth1 parent 1:68 handle 68 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.7 classid 1:68

tc class add dev eth1 parent 1:2 classid 1:69 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth1 parent 1:69 handle 69 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.8 classid 1:69

tc class add dev eth1 parent 1:2 classid 1:70 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth1 parent 1:70 handle 70 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.20 classid 1:70

tc class add dev eth1 parent 1:2 classid 1:71 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth1 parent 1:71 handle 71 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.10 classid 1:71

tc class add dev eth1 parent 1:2 classid 1:72 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth1 parent 1:72 handle 72 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.9 classid 1:72

tc class add dev eth1 parent 1:2 classid 1:73 htb rate 64Kbit ceil 64Kbit
tc qdisc add dev eth1 parent 1:73 handle 73 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.210 classid 1:73

tc class add dev eth1 parent 1:2 classid 1:74 htb rate 256Kbit ceil 256Kbit
tc qdisc add dev eth1 parent 1:74 handle 74 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.11 classid 1:74

tc class add dev eth1 parent 1:2 classid 1:75 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth1 parent 1:75 handle 75 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.12 classid 1:75

tc class add dev eth1 parent 1:2 classid 1:76 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth1 parent 1:76 handle 76 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.13 classid 1:76

tc class add dev eth1 parent 1:2 classid 1:77 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth1 parent 1:77 handle 77 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.14 classid 1:77

tc class add dev eth1 parent 1:2 classid 1:78 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth1 parent 1:78 handle 78 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.15 classid 1:78

tc class add dev eth1 parent 1:2 classid 1:79 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth1 parent 1:79 handle 79 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.16 classid 1:79

tc class add dev eth1 parent 1:2 classid 1:80 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth1 parent 1:80 handle 80 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.17 classid 1:80

tc class add dev eth1 parent 1:2 classid 1:81 htb rate 256Kbit ceil 256Kbit
tc qdisc add dev eth1 parent 1:81 handle 81 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.18 classid 1:81

tc class add dev eth1 parent 1:2 classid 1:82 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth1 parent 1:82 handle 82 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.22 classid 1:82

tc class add dev eth1 parent 1:2 classid 1:83 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth1 parent 1:83 handle 83 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.21 classid 1:83

tc class add dev eth1 parent 1:2 classid 1:84 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth1 parent 1:84 handle 84 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.19 classid 1:84

tc class add dev eth1 parent 1:2 classid 1:85 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth1 parent 1:85 handle 85 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.23 classid 1:85

tc class add dev eth1 parent 1:2 classid 1:86 htb rate 128Kbit ceil 128Kbit
tc qdisc add dev eth1 parent 1:86 handle 86 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
200.43.134.24 classid 1:86


_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux