1、PCC 负载均衡RouterOS 支持多线路的负载均衡,某小区为了节约费用,采用 40 条 2M 带宽的 AD 通过做汇聚实现高带宽的小区带宽,为解决接口问题采用一台 Cisco 的 48 口的交换机做 VLAN 接入 40 条 AD,让后通过VLAN 连接到 RouterOS 进行拨号,再做 PCC 负载均衡,网络拓扑图如下:外网接入的方法是在交换机和 RouterOS 路由器上划分 VLAN,然后在 ROS 对应的 VLAN 上做 PPPoE-CLIENT。简单脚本一步完成:for i from=1 to=40 do=/ip firewall mangle add chain=prerou
2、ting src-address-list=lan-add action=mark-connection new-connection-mark=(“conn“ . $i) per-connection-classifier=(“both-addresses:40/“ . ($i - 1) comment=$i/ip firewall mangle add chain=prerouting src-address-list=lan-add action=mark-routing new-routing-mark=(“net“ . $i) connection-mark=(“conn“ . $i):for i from=1 to=40 do=/ip routeadd disabled=no distance=1 dst-address=0.0.0.0/0 gateway=(“pppoe-out“ . $i) routing-mark=(“net“ . $i) scope=30 target-scope=10/ip routeadd disabled=no distance=1 dst-address=0.0.0.0/0 gateway=(“pppoe-out“ . $i) scope=30 target-scope=10