U32_1="tc filter add dev eth0 protocol ip parent 2:0 prio 1 u32" $U32_1 match ip src 202.104.56.55/32 flowid 2:10 $U32_1 match ip src 192.168.4.0/24 flowid 2:10 $U32_1 match ip src 192.168.25.0/24 flowid 2:10
U32_2="tc filter add dev eth0 protocol ip parent 2:0 prio 2 u32" $U32_2 match ip dst 192.168.1.99/32 flowid 2:20 $U32_2 match ip dst 192.168.1.202/32 flowid 2:20
tc filter add dev eth0 protocol ip parent 2:0 prio 3 u32 match ip dst 192.168.1.0/24 flowid 2:30
echo "" echo "" echo "qos rule on eth0 start ...........ok!" echo "" echo "" fi
#################### Qos rule on ppp0 for upload ########################
U32="tc filter add dev ppp0 protocol ip parent 1:0 prio 1 u32" tc filter add dev ppp0 protocol ip parent 1:0 prio 1 u32 match ip dst 202.104.56.55/32 flowid 1:10 tc filter add dev ppp0 protocol ip parent 1:0 prio 1 u32 match ip dst 192.168.4.0/24 flowid 1:10 tc filter add dev ppp0 protocol ip parent 1:0 prio 1 u32 match ip dst 192.168.25.0/24 flowid 1:10 tc filter add dev ppp0 protocol ip parent 1:0 prio 1 u32 match ip protocol 50 0xff flowid 1:10 tc filter add dev ppp0 protocol ip parent 1:0 prio 1 u32 match ip protocol 51 0xff flowid 1:10
tc filter add dev ppp0 parent 1:0 protocol ip prio 2 handle 1 fw classid 1:20
#tc filter add dev ppp0 parent 1:0 protocol ip prio 3 handle 2 fw classid 1:30
echo "" echo "" echo "qos rule on ppp0 start ...........ok!" echo "" echo "" fi
}
stop(){
if [ "$LAN_IFACE" != "" ];then $TC qdisc del dev $LAN_IFACE root fi if [ "$INET_IFACE" != "" ];then $TC qdisc del dev $INET_IFACE root fi