找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 10849|回复: 1

[其它] 请教双线加小包优先

[复制链接]
发表于 2016-4-22 10:30:00 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

×
本帖最后由 xuxi3201 于 2016-4-22 10:31 编辑

去年改了双线,
ma0422.png

上个月弄了个小包优先。
mb0422.png
基本正常。
四个网卡,2个wan,2个lan
192.168.33.0/24走PPPOE-1
192.168.99.0/24走PPPOE-2

现在,我在防火墙里测试:
add action=log chain=forward  log=yes out-interface=PPPOE-1 src-address=192.168.99.0/24log里看见很多记录。意思就是lan2的有很多数据走PPPOE-1
请高手分析一下, 我怎么让lan2 全部走PPPOE-2
routeros
发表于 2016-5-1 01:51:27 | 显示全部楼层
本帖最后由 cspm333 于 2016-5-1 12:12 编辑

/interface pppoe-client
add allow=pap interface=Wan1 max-mru=1492 max-mtu=1492 name=pppoe-out1 password=aaaa user=11111
add allow=pap interface=Wan2 max-mru=1492 max-mtu=1492 name=pppoe-out2 password=bbbb user=22222

/ip firewall address-list
add list=Lan address=192.168.33.0/24
add list=Lan address=192.168.99.0/24

/ip firewall mangle
#遇標記時例外的情況
add action=accept chain=prerouting src-address-list=Lan dst-address-list=Lan
add action=accept chain=prerouting src-address-list=Lan dst-address-type=local
add action=accept chain=output dst-address-list=Lan

#從PPPoE進入的封包,要從原PPPoE路線返回
add action=mark-connection chain=prerouting in-interface=pppoe-out1 new-connection-mark=pppoe1_conn passthrough=yes
add action=mark-connection chain=prerouting in-interface=pppoe-out2 new-connection-mark=pppoe2_conn passthrough=yes

add action=mark-routing chain=output connection-mark=pppoe1_conn new-routing-mark=to_pppoe1 passthrough=no
add action=mark-routing chain=output connection-mark=pppoe2_conn new-routing-mark=to_pppoe2 passthrough=no

add action=mark-routing chain=prerouting connection-mark=pppoe1_conn new-routing-mark=to_pppoe1 \
  src-address-list=Lan passthrough=no
add action=mark-routing chain=prerouting connection-mark=pppoe2_conn new-routing-mark=to_pppoe2 \
  src-address-list=Lan passthrough=no

#搭配的Lan與PPPoE
add action=mark-routing chain=prerouting new-routing-mark=to_pppoe1 src-address=192.168.33.0/24 passthrough=no
add action=mark-routing chain=prerouting new-routing-mark=to_pppoe2 src-address=192.168.99.0/24 passthrough=no

#標記從PPPoE進入,packet size大於512的封包
add action=mark-packet chain=forward in-interface=pppoe-out1 packet-size=!0-512 \
  new-packet-mark=pppoe1_big_packets passthrough=yes
add action=mark-packet chain=forward in-interface=pppoe-out2 packet-size=!0-512 \
  new-packet-mark=pppoe2_big_packets passthrough=yes

/ip firewall nat
add action=masquerade chain=srcnat out-interface=pppoe-out1
add action=masquerade chain=srcnat out-interface=pppoe-out2

/ip route
#策略路由
add  dst-address=0.0.0.0/0 gateway=pppoe-out1 routing-mark=to_pppoe1 distance=4
add  dst-address=0.0.0.0/0 gateway=pppoe-out2 routing-mark=to_pppoe2 distance=4
#預設路由
add  dst-address=0.0.0.0/0 gateway=pppoe-out1 distance=5

/queue tree
#將大封包從原本可用的頻寬60M限制為52M後,剩餘的8M自然是小封包的保證頻寬(小封包優先)
add max-limit=52M name="PPPoE1_big_packets_limit" packet-mark=pppoe1_big_packets parent=global queue=default
add max-limit=52M name="PPPoE2_big_packets_limit" packet-mark=pppoe2_big_packets parent=global queue=default


routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-12-22 17:08 , Processed in 0.070047 second(s), 7 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表