Network 板


LINE

逐行解释,不知道要写到什麽时候,我还是直接贴我的设定,有兴趣的再去找document对照着看, 一般HTB+PCQ只需靠in-interface来分别判断封包是由内而外还是由外而内 但不知道是不是我设定pppoe的方式导致mangle总抓不到全部由内而外(上传)的封包,导致queue tree也变得很怪,会被突破限制, 後来试出使用src-address来抓出上传封包,终於都抓到了,且连静态IP & DHCP都一并解决了。 我的网路环境是20m光纤,RouterOS的版本是4.10,需注意的是3.x版queue type及queue tree有其他的bug无法使用以下的设定 也许官方并没考虑到pppoe这种类似虚拟网卡的装置要如何被归类,总之他无法由对内的网卡截取到 /ip firewall mangle chain=prerouting action=mark-packet new-packet-mark=first-priority-up passthrough=no dst-address=xxx.xxx.xxx.xxx chain=prerouting action=mark-packet new-packet-mark=first-priority-down passthrough=no src-address=xxx.xxx.xxx.xxx ;;; Qos_SYN-up chain=prerouting action=mark-packet new-packet-mark=first-priority-up passthrough=no tcp-flags=syn protocol=tcp src-address=192.168.0.0/16 packet-size=0-666 ;;; Qos_ACK-up chain=prerouting action=mark-packet new-packet-mark=first-priority-up passthrough=no tcp-flags=ack protocol=tcp src-address=192.168.0.0/16 packet-size=0-123 ;;; p2p-up chain=prerouting action=mark-packet new-packet-mark=p2p-up passthrough=no p2p=all-p2p src-address=192.168.0.0/16 ;;; small_packet-up chain=prerouting action=mark-packet new-packet-mark=small_packet-up passthrough=no p2p=!all-p2p src-address=192.168.0.0/16 packet-size=1-512 ;;; big_packet-up chain=prerouting action=mark-packet new-packet-mark=big_packet-up passthrough=no p2p=!all-p2p src-address=192.168.0.0/16 packet-size=512-1200 ;;; general-up chain=prerouting action=mark-packet new-packet-mark=general-up passthrough=no p2p=!all-p2p src-address=192.168.0.0/16 ;;; Qos_SYN-down chain=prerouting action=mark-packet new-packet-mark=first-priority-down passthrough=no tcp-flags=syn protocol=tcp in-interface=Hinet-Vdsl packet-size=0-666 ;;; Qos_ACK-down chain=prerouting action=mark-packet new-packet-mark=first-priority-down passthrough=no tcp-flags=ack protocol=tcp in-interface=Hinet-Vdsl packet-size=0-123 ;;; ICMP chain=prerouting action=mark-packet new-packet-mark=icmp_packet passthrough=no protocol=icmp ;;; p2p-down chain=prerouting action=mark-packet new-packet-mark=p2p-down passthrough=no p2p=all-p2p in-interface=Hinet-Vdsl ;;; small_packet-down chain=prerouting action=mark-packet new-packet-mark=small_packet-down passthrough=no p2p=!all-p2p in-interface=Hinet-Vdsl packet-size=1-512 ;;; big_packet-down chain=prerouting action=mark-packet new-packet-mark=big_packet-down passthrough=no p2p=!all-p2p in-interface=Hinet-Vdsl packet-size=512-1200 ;;; general-down chain=prerouting action=mark-packet new-packet-mark=general-down passthrough=no p2p=!all-p2p in-interface=Hinet-Vdsl 设定queue type,使用pcq作为伫列类型,pcq-rate对应到每个ip的最大速度 /queue type name="Gen_download" kind=pcq pcq-rate=13000000 pcq-limit=50 pcq-classifier=dst-address pcq-total-limit=1000 name="Gen_upload" kind=pcq pcq-rate=400000 pcq-limit=50 pcq-classifier=src-address pcq-total-limit=100 建立queue tree设定每个queue及sub-queue的优先权和该queue的最大频宽 /queue tree name="Download" parent=global-in limit-at=0 priority=8 max-limit=19M burst-limit=0 burst-threshold=0 burst-time=0s name="Upload" parent=global-in limit-at=0 priority=8 max-limit=1650k burst-limit=0 burst-threshold=0 burst-time=0s name="p2p_download" parent=Download packet-mark=p2p-down limit-at=0 queue=Gen_download priority=8 max-limit=15M burst-limit=0 burst-threshold=0 burst-time=0s name="p2p_upload" parent=Upload packet-mark=p2p-up limit-at=0 queue=Gen_upload priority=8 max-limit=1M burst-limit=0 burst-threshold=0 burst-time=0s name="first_prioity-up" parent=Upload packet-mark=first-priority-up limit-at=32k queue=default priority=1 max-limit=1M burst-limit=0 burst-threshold=0 burst-time=0s name="general_download" parent=Download packet-mark=general-down limit-at=0 queue=Gen_download priority=7 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s name="small_upload" parent=Upload packet-mark=small_packet-up limit-at=0 queue=default priority=5 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s name="big_upload" parent=Upload packet-mark=big_packet-up limit-at=0 queue=default priority=6 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s name="small_download" parent=Download packet-mark=small_packet-down limit-at=0 queue=Gen_download priority=5 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s name="big_download" parent=Download packet-mark=big_packet-down limit-at=0 queue=Gen_download priority=6 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s name="first_prioity-down" parent=Download packet-mark=first-priority-down limit-at=32k queue=Gen_download priority=1 max-limit=1M burst-limit=0 burst-threshold=0 burst-time=0s name="general-up" parent=Upload packet-mark=general-up limit-at=0 queue=Gen_upload priority=7 max-limit=1M burst-limit=0 burst-threshold=0 burst-time=0s name="icmp_download" parent=global-out packet-mark=icmp_packet limit-at=32k queue=Gen_download priority=1 max-limit=2M burst-limit=0 burst-threshold=0 burst-time=0s name="icmp_upload" parent=global-in packet-mark=icmp_packet limit-at=32k queue=default priority=1 max-limit=512k burst-limit=0 burst-threshold=0 burst-time=0s --



※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 122.116.219.48







like.gif 您可能会有兴趣的文章
icon.png[问题/行为] 猫晚上进房间会不会有憋尿问题
icon.pngRe: [闲聊] 选了错误的女孩成为魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一张
icon.png[心得] EMS高领长版毛衣.墨小楼MC1002
icon.png[分享] 丹龙隔热纸GE55+33+22
icon.png[问题] 清洗洗衣机
icon.png[寻物] 窗台下的空间
icon.png[闲聊] 双极の女神1 木魔爵
icon.png[售车] 新竹 1997 march 1297cc 白色 四门
icon.png[讨论] 能从照片感受到摄影者心情吗
icon.png[狂贺] 贺贺贺贺 贺!岛村卯月!总选举NO.1
icon.png[难过] 羡慕白皮肤的女生
icon.png阅读文章
icon.png[黑特]
icon.png[问题] SBK S1安装於安全帽位置
icon.png[分享] 旧woo100绝版开箱!!
icon.pngRe: [无言] 关於小包卫生纸
icon.png[开箱] E5-2683V3 RX480Strix 快睿C1 简单测试
icon.png[心得] 苍の海贼龙 地狱 执行者16PT
icon.png[售车] 1999年Virage iO 1.8EXi
icon.png[心得] 挑战33 LV10 狮子座pt solo
icon.png[闲聊] 手把手教你不被桶之新手主购教学
icon.png[分享] Civic Type R 量产版官方照无预警流出
icon.png[售车] Golf 4 2.0 银色 自排
icon.png[出售] Graco提篮汽座(有底座)2000元诚可议
icon.png[问题] 请问补牙材质掉了还能再补吗?(台中半年内
icon.png[问题] 44th 单曲 生写竟然都给重复的啊啊!
icon.png[心得] 华南红卡/icash 核卡
icon.png[问题] 拔牙矫正这样正常吗
icon.png[赠送] 老莫高业 初业 102年版
icon.png[情报] 三大行动支付 本季掀战火
icon.png[宝宝] 博客来Amos水蜡笔5/1特价五折
icon.pngRe: [心得] 新鲜人一些面试分享
icon.png[心得] 苍の海贼龙 地狱 麒麟25PT
icon.pngRe: [闲聊] (君の名は。雷慎入) 君名二创漫画翻译
icon.pngRe: [闲聊] OGN中场影片:失踪人口局 (英文字幕)
icon.png[问题] 台湾大哥大4G讯号差
icon.png[出售] [全国]全新千寻侘草LED灯, 水草

请输入看板名称,例如:Gossiping站内搜寻

TOP