unshaping telnet
Hi,
My guess is you could mark packets with netfilter and use fwmark as the filter parameter, you can mark packets not going to the linux box and then use that value as the handle in a fwmark filter.
The netfilter rules would be something like:
iptables -t mangle -I PREROUTING -s 10.0.0.2/32 -d ! $LINUX_BOX -j MARK --set-mark 1
iptables -t mangle -I PREROUTING -s 10.0.0.3/32 -d ! $LINUX_BOX -j MARK --set-mark 2Then the filter lines:
tc filter add dev eth1 protocol ip parent 1:0 prio 24 handle 1 fw classid 1:102 tc filter add dev eth1 protocol ip parent 1:0 prio 24 handle 2 fw classid 1:103
That'd be my first shot at it...
Cheers,
Rodrigo
Quoted 28 lines · Fabian Gervan
Hello
I have this setup, it work fine, but i can't telnet from any client to
the linux server without trafic shaping:
--cut--
tc qdisc add dev eth1 root handle 1: cbq bandwidth 10Mbit avpkt 1000
tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate 100Mbit allot 1514 weightc class add dev eth1 parent 1:1 classid 1:100 cbq bandwidth 100Mbit rate 64kbit allot 1514 weight 6Kbit prio 5 maxburst 12 avpkt 1000 bounded tc class add dev eth1 parent 1:100 classid 1:102 cbq bandwidth 100Mbit rate 32kbit allot 1514 weight 3Kbit prio 5 maxburst 6 avpkt 1000 borrow tc class add dev eth1 parent 1:100 classid 1:103 cbq bandwidth 100Mbit rate 32kbit allot 1514 weight 3Kbit prio 5 maxburst 6 avpkt 1000 borrow
tc qdisc add dev eth1 parent 1:102 sfq quantum 1514b perturb 15 tc qdisc add dev eth1 parent 1:103 sfq quantum 1514b perturb 15
tc filter add dev eth1 parent 1:0 protocol ip prio 25 u32 match ip dst 10.0.0.2/32 flowid 1:102
tc filter add dev eth1 parent 1:0 protocol ip prio 25 u32 match ip dst 10.0.0.3/32 flowid 1:103
--cut--
server (10.0.0.1)64kbit (bounded) 32kbit (borrow)- PC1 (10.0.0.2) 32kbit-(borrow)- PC2 (10.0.0.3)what I should add/change to make a telnet from pc1 or pc2 to server, without trafic shaping, or minimal shapping?
Quoted 7 lines
Regards, Fabian.
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/