tc filter del 将所有filter删除的原因及解决…
> How can I delete an existing filter? Is it possible?
You must at least provide the following:
dev
parent (qdisc or class)
prio
kind (filter type)
handle
The kernel will then lookup the device, find the qdisc or class
according to your parent, lookup the filter ops according to the kind
and prio and then calls get() in the filter to look it up. The get() is
dependant on the filter type and thus deleting may vary from filter to
filter.
handle == 0 will destroy the whole filter tree
example 1: (destroying the whole tree)
# tc filter add dev eth0 parent 10:0 prio 10 protocol all u32 match \
ip tos 1 0 flowid 10:12
# tc filter list dev eth0 parent 10:0
filter protocol all pref 10 u32
filter protocol all pref 10 u32 fh 800: ht divisor 1
filter protocol all pref 10 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 10:12
match 00000000/00000000 at 0
# tc filter del dev eth0 parent 10:0 prio 10 u32
# tc filter list dev eth0 parent 10:0
#
example 2: (destroying a single filter)
# tc filter add dev eth0 parent 10:0 prio 10 protocol all u32 match \
ip tos 1 0 flowid 10:12
# tc filter add dev eth0 parent 10:0 prio 10 protocol all u32 match \
ip tos 1 0 flowid 10:12
# tc filter list dev eth0 parent 10:0
filter protocol all pref 10 u32
filter protocol all pref 10 u32 fh 800: ht divisor 1
filter protocol all pref 10 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 10:12
match 00000000/00000000 at 0
filter protocol all pref 10 u32 fh 800::801 order 2049 key ht 800 bkt 0 flowid 10:12
match 00000000/00000000 at 0
# tc filter del dev eth0 parent 10:0 prio 10 handle 800::801 u32
# tc filter list dev eth0 parent 10:0
filter protocol all pref 10 u32
filter protocol all pref 10 u32 fh 800: ht divisor 1
filter protocol all pref 10 u32 fh 800::800 order 2048 key ht 800 bkt 0
flowid 10:12
match 00000000/00000000 at 0
#
rule of thumb:
- deleting a filter with handle NOT specified deletes whole filter tree
- deleting a filter with handle specified deletes only the filter with
the given handle
(说明,其实在这里也可以使用prio来区分,只是如果我有很多的规则的话,使用这个好像不太合适,因此还是使用handle来得好些。)
This does not apply to all filters though.
- · 看电影经常遇到的简单口语
- · 构建系统的第一步
- · 微软“强”夺Vista商标权
- · 赶快打上WinXP SP2!
- · rsh in Solaris useful
- · Linux厂商竞相走开源之路
- · freebsd ports 使用举例:安装 mysql
- · 如何解决xmanager不能登陆linux的问题
- · 学会使用Regsvr32命令
- · 微软将在R2中支持Unix
- · 再谈如何在镜像卷中换坏硬盘
- · 测试:你属于哪一类型人才?
- · [zt]如何查看Solaris系统信息
- · 如何利用ftp自动下载文件-转
- · 微软再发Win2000最终补丁
- · flash游戏与AS速成(下)
- · flash游戏与AS速成(上)
- · WinRAR和Nero6的另类用法
- · 妙用FlashGet的[导入列表]功能
- · 万里长征第一步练习盲打
- · 轻松搞定英文阅读
- · 让你的WindowsXP更漂亮些
- · 把好东东提取出来
- · 当Winamp遇到迷你歌词
- · ASTON,让Windows更漂亮
- · AnnotisMail给你的邮件美容
- · 时间为我而转动
- · 神奇的立体画
- · 动静之间,随意转换
- · 代理服务器CCProxy的应用
- · 磁盘整理易如反掌
- · 自制计算机引导光盘
- · 学用SecondCopy2000
- · 硬盘数据修复软件EasyRecovery使用教程
- · 图解NortonGhost
- · 硬盘低级格式化探密
- · 图解DM的基本使用
- · 硬盘分区图解步步通(2)
