辰风云网络科技

Hi, 请登录

Routeros软路由V7 PCC负载均衡

仅限于相同宽带
脚本如下
#根据实际自行修改接口或IP地址
#创建标记
/routing table
/routing table add fib name=route1
/routing table add fib name=route2
#防火墙mangle设置
/ip firewall mangle
add chain=prerouting connection-mark=no-mark dst-address-type=!local action=mark-connection per-connection-classifier=both-addresses-and-ports:2/0 src-address=192.168.88.0/24 new-connection-mark=pcc1
add chain=prerouting action=mark-routing src-address=192.168.88.0/24 connection-mark=pcc1 new-routing-mark=route1
add chain=prerouting connection-mark=no-mark action=mark-connection in-interface=pppoe-out1 new-connection-mark=pcc1
add chain=output action=mark-routing connection-mark=pcc1 new-routing-mark=route1
add chain=prerouting connection-mark=no-mark dst-address-type=!local action=mark-connection per-connection-classifier=both-addresses-and-ports:2/1 src-address=192.168.88.0/24 new-connection-mark=pcc2
add chain=prerouting action=mark-routing src-address=192.168.88.0/24 connection-mark=pcc2 new-routing-mark=route2
add chain=prerouting connection-mark=no-mark action=mark-connection in-interface=pppoe-out2 new-connection-mark=pcc2
add chain=output action=mark-routing connection-mark=pcc2 new-routing-mark=route2
#路由表
/ip route
add gateway=pppoe-out1 routing-table=route1
add gateway=pppoe-out2 routing-table=route2


相关推荐

二维码
评论