Linuxstream量控制中的入口过滤:将stream量redirect到IFB设备

我有一个openwrt路由器,我想形成传入的stream量,以分类为我的家庭networking中的某个IP地址的所有stream量作为低优先级。 为了这个目的,我想redirect到eth1接口,连接到DSL调制解调器的所有stream量到IFB设备,在那里我将进行整形。 这些是我的系统的细节:

Linux OpenWrt 2.6.32.27 #7 Fri Jul 15 02:43:34 CEST 2011 mips GNU/Linux 

这里是我正在使用的最后一条指令失败的脚本:

 # Variable definition ETH=eth1 IFB=ifb1 IP_LP="192.168.1.22/32" DL_RATE="900kbps" HP_RATE="890kbps" LP_RATE="10kbps" TC="tc" # Configuring the ifbX interface insmod ifb insmod sch_htb insmod sch_ingress ifconfig $IFB up # Adding the HTB scheduler to the ingress interface $TC qdisc add dev $IFB root handle 1: htb default 11 # Set the maximum bandwidth that each priority class can get, and the maximum borrowing they can do $TC class add dev $IFB parent 1:1 classid 1:10 htb rate $LP_RATE ceil $DL_RATE $TC class add dev $IFB parent 1:1 classid 1:11 htb rate $HP_RATE ceil $DL_RATE # Redirect all ingress traffic arriving at $ETH to $IFB $TC qdisc del dev $ETH ingress 2>/dev/null $TC qdisc add dev $ETH ingress $TC filter add dev $ETH parent ffff: protocol ip prio 1 u32 \ match u32 0 0 flowid 1:1 \ action mirred egress redirect dev $IFB 

最后的指令失败:

 Action 4 device ifb1 ifindex 9 RTNETLINK answers: No such file or directory We have an error talking to the kernel 

有谁知道我做错了什么?

试试flowid 1:10flowid 1:11 。 过滤的重点是select发送数据包的类别,所以不要发送给父节点!