全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Connection Rate 是一个防火墙标记器 允许捕获在当前传输的连接速度 Connection Rate 原理 每个连接项目在 connection tracking 表中是双向通讯 每次得到相关的数据包到特定的项目 数据包的长度值 包括 IP 数据包头 被添加到 Connection bytes 值 换句话说 Connection bytes 包括两部分上行和下行 Connection Rate 计算连接的速度基于 connection bytes 的变化 Connection Rate 每秒会 被重新计算 且没有任何平均值 两个选项 connection bytes 和 connection rate 工作只能在 TCP 和 UDP 传输 你需要 指定协议激活这些选项 在 connection rate 您可以指定速度 和你想捕获范围 例如 这个规则是捕获当连接速度低于 100kbps 通过路由器的 TCP UDP 传输 ip firewall filter add action accept chain forward connection rate 0 100k protocol tcp add action accept chain forward connection rate 0 100k protocol udp 注意 Connection Rate 从 3 30 才能获得 这个选项是用于捕获传输密集的连接 传输优先级 Connection rate 能被使用在各种方式 通常的方式是使用队列树进行 HTB 的优先级控制 检 测并设置低优先级给 heavy connections 连接在一段时间内保持较快速率 例如 P2P HTTP FTP 下载 通过这样做 你可以区分所有其它传输的优先次序 通常包括 VOIP HTTP 浏览和在线游戏 connection rate 选项没有任何平均值 我们需要确定识别 heavy connections 的差额 如 果我们假设正常的 HTTP 浏览连接小于 500kB 4Mb 即 connection bytes 值 长度 VOIP 需要不 超过 200kbps 的流量 那么每次连接当超过 500kB 后 仍然有 200kbps 的流量将被认为是 heavy connections 对于 HTTP 浏览和 VOIP 可能有不同的 connection bytes 在你的网络环境中 所以请你在实 际操作时 这个实例仅做参考 下面实例让我们假设 我们有 6Mbps 上传和下载 per connection classifier PerConnectionClassifier ValuesToHash Denominator Remainder Remainder 0 4294967295 integer number Denominator 1 4294967295 integer number ValuesToHash src address dst address src port dst port ValuesToHash 实例脚本 ip firewall mangle add chain forward action mark connection connection mark heavy traffic conn new connection mark all conn add chain forward action mark connection connection bytes 500000 0 connection mark all conn connection rate 200k 100M new connection mark heavy traffic conn protocol tcp add chain forward action mark connection connection bytes 500000 0 connection mark all conn connection rate 200k 100M new connection mark heavy traffic conn protocol udp add chain forward action mark packet connection mark heavy traffic conn new packet mark heavy traffic passthrough no add chain forward action mark packet connection mark all conn new packet mark other traffic passthrough no queue tree add name upload parent public max limit 6M add name other upload parent upload limit at 4M max limit 6M packet mark other traffic priority 1 add name heavy upload parent upload limit at 2M max limit 6M packet mark heavy traffic priority 8 add name download parent local max limit 6M add name other download parent download limit at 4M max limit 6M packet mark other traffic priority 1 add name heavy download parent download limit at 2M max limit 6M packet mark heavy traffic priority 8 脚本说明 在 mangle 中 我们需要分离所有连接到 2 个组中 这样数据包标记从 2 个组取得 我们讨论 的客户的传输理论上大多标记在 forward 链表中 请记住 heavy 连接将有低的优先级 队列将打压 max limit heavy 连接将被限制速度 这样引起改变高优先级连接获取更多的带宽 当在一次产生 connection rate 将上升 并导致其改 变为较低优先级 为了避免这一点 我们必须确保 一旦发现 heavy 连接 剩下的标记在所有 时间仍然是 heavy 连接 Mangel 规则配置 ip firewall mangle add chain forward action mark connection connection mark heavy traffic conn new connection mark all conn 这个规则将确定 heavy 连接 连接将只剩下 heavy add chain forward action mark connection connection bytes 500000 0 connection mark all conn connection rate 200k 100M new connection mark heavy traffic conn protocol tcp add chain forward action mark connection connection bytes 500000 0 connection mark all conn connection rate 200k 100M new connection mark heavy traffic conn protocol udp 这两个规则将根据我们的标准标记所有 heavy 连接 每次连接在第一次超过 500KB 流量后 仍然保持 200kbps 以上速度被认为 heavy add chain forward action mark packet connection mark heavy traffic conn new packet mark heavy traffic passthrough no add chain forward action mark packet connection mark all conn new packet mark other traffic passthrough no 最后 2 条规则在 mangle 中将标记数据包传输从相应的连接中 队列配置 这个是一个简单的队列树被放到接口的 HTBThis is a simple queue tree that is placed on the Interface HTB 你的 ISP 连接的 wan 接口 lan 连接你的内网客户 如果你有多个 wan 接口或者多个 lan 你将需要标记上行和下行分离标记 queue tree add name upload parent public max limit 6M add name other upload parent upload limit at 4M max limit 6M packet mark other traffic priority 1 add name heavy upload parent upload limit at 2M max limit 6M packet mark heavy traffic priority 8 add name download parent local max limit 6M add name other do
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025-2026学年福建三明一中高二上10月月考生物试卷含答案
- 2026-2027学年上学期单元测试二年级数学真题卷
- 2025茶艺师茶文化全真模拟题及答案
- 聚天冬氨酸钠(PASP):绿色环保水处理助剂引领可持续发展新趋势
- 2025GMAT定量推理每日一练及答案
- 关于供应商合同续约的沟通函(4篇)
- 项目合作计划修改沟通函(6篇范文)
- 工业物联网平台实时数据可视化方案
- 社交平台产品经理长期跟进绩效分析表
- 客户投诉解决进度通报函4篇
- 2026年植物保护(植物病理学基础)试题及答案
- 中国融通笔试题及答案
- 2026重庆保税港区集团校园招聘20人笔试参考题库及答案解析
- 中国皮肤型红斑狼疮诊疗指南 2026 年版
- 2026年济南市检察院书记员考试题(附答案)
- 职业病危害现状评价任勇
- 医疗器械经营质量管理制度工作程序手册
- 2026年江苏省建筑三类安全员考试题库(含答案)
- 2026年交安c证考试题目及答案
- 2026年江苏省连云港市重点中学小升初英语考试真题及答案
- 雨课堂学堂在线学堂云《走进人工智能(人工智能概论)(陕西职业技术学院)》单元测试考核答案
评论
0/150
提交评论