Oare nu e bine ce-am facut? am 2 placi de retea eth0 catre LAN cu 192.168.1.0/24 eth2 catre net 212.x.x.x am un user in reteaua locala cu ipo 192.168.1.z caruia ii corespunde MAC address'ul vv:vv:vv:vv:vv:vv !
am facut urm scriptuletz: tc class show dev eth0 tc qdisc add dev eth0 root handle 1: htb default 99 r2q 2 tc class add dev eth0 parent 1:0 classid 1:1 htb rate 2mbit burst 6k tc class add dev eth0 parent 1:1 classid 1:81 htb rate 16kbit ceil 16kbit tc class add dev eth0 parent 1:1 classid 1:99 htb rate 16kbit ceil 2mbit burst 6k tc qdisc add dev eth0 parent 1:99 handle 99: sfq perturb 10 tc filter add dev eth0 protocol ip parent 1:0 prio 1 handle 0x81 fw flowid 1:81 si am marcat pachetele care vin cu MAC sursa specificat mai sus: iptables -t mangle -A PREROUTING -p tcp -m mac --mac-source VV:VV:VV:VV:VV -j MARK --set-mark 0x81 rezultatu este urmatoru: class htb 1:99 parent 1:1 leaf 99: prio 0 quantum 1024 rate 16Kbit ceil 2Mbit burst 6Kb/8 mpu 0b cburst 4Kb/8 mpu 0b level 0 Sent 24021824 bytes 18083 pkts (dropped 0, overlimits 0) rate 314868bps 237pps lended: 109 borrowed: 17974 giants: 0 tokens: -433 ctokens: 4 class htb 1:1 root rate 2Mbit ceil 2Mbit burst 5631b/8 mpu 0b cburst 4Kb/8 mpu 0b level 7 Sent 24021824 bytes 18083 pkts (dropped 0, overlimits 0) rate 321148bps 242pps lended: 17974 borrowed: 0 giants: 0 tokens: 7 ctokens: 4 class htb 1:81 parent 1:1 prio 0 quantum 1024 rate 16Kbit ceil 16Kbit burst 1615b/8 mpu 0b cburst 1615b/8 mpu 0b level 0 Sent 0 bytes 0 pkts (dropped 0, overlimits 0) lended: 0 borrowed: 0 giants: 0 tokens: 404 ctokens: 404 prin calsa 1:81 nu trece nici mcar 1 bit!!! Are careva idee de ce?
