• [^] # Re: Solution

    Posté par . En réponse au message Trafic Shaping par interface sur Woody. Évalué à 1.

    Merci ;)

    Je suis tombé aussi sur ce site, et voila ce que j'ai fait...


    # Initialisation
    tc qdisc add dev $INET_NET root handle 1: htb default 30
    tc class add dev $INET_NET parent 1: classid 1:1 htb rate 2mbit burst 15k

    tc class add dev $INET_NET parent 1:1 classid 1:10 htb rate 2mbit burst 15k
    tc class add dev $INET_NET parent 1:1 classid 1:20 htb rate 1mbit ceil 2mbit burst 15k
    tc class add dev $INET_NET parent 1:1 classid 1:30 htb rate 500kbit ceil 2mbit burst 15k

    tc qdisc add dev $INET_NET parent 1:10 handle 10: sfq perturb 10
    tc qdisc add dev $INET_NET parent 1:20 handle 20: sfq perturb 10
    tc qdisc add dev $INET_NET parent 1:30 handle 30: sfq perturb 10


    # Marquage des paquets
    tc -A PREROUTING -t mangle -i $LAN_IFACE -o $INET_IFACE -j MARK --set-mark 10
    tc -A PREROUTING -t mangle -i $DMZ_IFACE -o $INET_IFACE -j MARK --set-mark 10
    tc -A PREROUTING -t mangle -i $WLAN_IFACE -o $INET_IFACE -j MARK --set-mark 30

    # Gestion des flux
    tc filter add dev $INET_IFACE protocol ip parent 1:0 prio 10 handle 10 fw flowid 1:1
    tc filter add dev $INET_IFACE protocol ip parent 1:0 prio 10 handle 10 fw flowid 1:1
    tc filter add dev $INET_IFACE protocol ip parent 1:0 prio 30 handle 30 fw flowid 1:1



    Est ce la bonne démarche ?

    Peut faire mieux ?

    J'ai tout faux ? :;)