新手求助,这种情况该佮设置。
WLan: 两个出口IP:219.150.232.19 掩码:248网关:18另外一个是: IP 202.102.71.20 掩码:252网关:21DNS:4.4.4.48.8.8.8
内网分为:192.168.0.254/24 192.168.1.254/24 192.168.2.254/24 192.168.3.254/24 等四个Vlan。 网关都是254 ,4.254 这个Vlan是 动态分配 DHCP。其固定IP。已有DHCP服务器是 192.168.0. 1
ROS 版本是V5.4 ,三个网卡: E1,E2,E3
请问,该如何配置,做到均衡负载。应该如何配置,详细配置。就是小白,很多不知道。
请大侠指点
WLAN是啥? /interface ethernet set [ find default-name=ether1 ] name=LAN
/interface ethernet set [ find default-name=ether2 ] name=WAN1
/interface ethernet set [ find default-name=ether3 ] name=WAN2
/ip address add address=192.168.0.254/24 interface=LAN
/ip address add address=192.168.1.254/24 interface=LAN
/ip address add address=192.168.2.254/24 interface=LAN
/ip address add address=192.168.3.254/24 interface=LAN
/ip address add address=219.150.232.19/29 interface=WAN1
/ip address add address=202.102.71.20/30 interface=WAN2
/ip dns set allow-remote-requests=yes cache-size=5000KiB max-udp-packet-size=512 servers=8.8.8.8,8.8.4.4
/ip route add check-gateway=ping comment=WAN1_to distance=1 gateway=219.150.232.18 routing-mark=to_wan1
/ip route add check-gateway=ping comment=WAN2_to distance=1 gateway=202.102.71.21 routing-mark=to_wan2
/ip route add check-gateway=ping comment=WAN1-MAIN distance=2 gateway=219.150.232.18
/ip route add check-gateway=ping comment=WAN2-MAIN distance=3 gateway=202.102.71.21
/ip firewall address-list add address=192.168.0.0/24 list=lan_address
/ip firewall address-list add address=192.168.0.0/24 list=lan_address
/ip firewall address-list add address=192.168.0.0/24 list=lan_address
/ip firewall nat add action=masquerade chain=srcnat out-interface=WAN1 src-address-list=lan_address
/ip firewall nat add action=masquerade chain=srcnat out-interface=WAN2 src-address-list=lan_address
/ip firewall nat add action=masquerade chain=srcnat out-interface=WAN3 src-address-list=lan_address
/ip firewall mangle add action=mark-connection chain=prerouting in-interface=WAN1 new-connection-mark=wan1_conn
/ip firewall mangle add action=mark-connection chain=prerouting in-interface=WAN2 new-connection-mark=wan2_conn
/ip firewall mangle add action=mark-routing chain=output connection-mark=wan1_conn new-routing-mark=to_wan1 passthrough=no
/ip firewall mangle add action=mark-routing chain=prerouting connection-mark=wan1_conn new-routing-mark=to_wan1 passthrough=no src-address-list=lan_address
/ip firewall mangle add action=mark-routing chain=output connection-mark=wan2_conn new-routing-mark=to_wan2 passthrough=no
/ip firewall mangle add action=mark-routing chain=prerouting connection-mark=wan2_conn new-routing-mark=to_wan2 passthrough=no src-address-list=lan_address
/ip firewall mangle add action=mark-routing chain=output new-routing-mark=to_wan1 out-interface=WAN1 passthrough=no
/ip firewall mangle add action=mark-routing chain=output new-routing-mark=to_wan2 out-interface=WAN2 passthrough=no
/ip firewall mangle add action=mark-routing chain=prerouting new-routing-mark=to_wan1 passthrough=no per-connection-classifier=src-address-and-port:2/0 src-address-list=lan_address
/ip firewall mangle add action=mark-routing chain=prerouting new-routing-mark=to_wan2 passthrough=no per-connection-classifier=src-address-and-port:2/1 src-address-list=lan_address
我来看下,只是看看,这帖子供测试 要求里说:内网分为:192.168.0.254/24 192.168.1.254/24 192.168.2.254/24 192.168.3.254/24 等四个Vlan
echochio 的办法lan没有分vlan,可行吗? xuxi3201 发表于 2016-7-26 12:44
要求里说:内网分为:192.168.0.254/24 192.168.1.254/24 192.168.2.254/24 192.168.3.254/24 等四个Vlan
...
負載均衡不要想的太難,它只是用機率或比例的方式將您的"連線要求"分配到不同的指定出口(out-interface).
所以重點從不在"來源"是vlan 或是lan ,
而是到達目的(遠端伺服器)時,用機率非配不同的通道(pppoe1,或是pppoe2,或者是其它).
讓封包不全往固定的out-interface塞,就這樣!
页:
[1]