1
Router Board Mikrotik / Load Balance Static IP (Load Balance Failover ) รวมเน็ต 2 เส้น
« กระทู้ล่าสุด โดย admin เมื่อ พฤษภาคม 31, 2015, 04:45:05 am »ลูกค้าท่านใดสนใจให้เราบริการตั้งค่า เรามีจำหน่ายพร้อมอุปกรณ์ Mikrotik และ Ubiquiti ติดต่อ 088-3006118,084-7273742
line: prathai3g / melodycats
ขอบคุณผู้ใช้บริการ
ประทายสามจี
+++อธิบาย+++
Internet Wan1(eth1)=192.168.1.1
Internet Wan2(eth2)=192.168.2.1
Local ปล่อย DHCP (eth3)= 192.168.100.50-192.168.100.200
----------------------------------------------------------
*** copy Script ไปวางใน Terminal Winbox ****
/interface ethernet
set [ find default-name=ether1 ] name=INTERNET_WAN1
set [ find default-name=ether2 ] name=INTERNET_WAN2
set [ find default-name=ether3 ] name=LAN_Local
set [ find default-name=ether4 ] name=ether4
set [ find default-name=ether5 ] name=ether5
/ip pool
add name=default-dhcp ranges=192.168.100.50-192.168.100.200
/ip dhcp-server
add address-pool=default-dhcp disabled=no interface=LAN_Local name=default
/ip address
add address=192.168.100.1/24 interface=LAN_Local network=192.168.100.0
add address=192.168.1.2/24 interface=INTERNET_WAN1 network=192.168.1.0
add address=192.168.2.2/24 interface=INTERNET_WAN2 network=192.168.2.0
/ip dhcp-client
add default-route-distance=0 dhcp-options=hostname,clientid interface=\
INTERNET_WAN1
/ip dhcp-server network
add address=192.168.100.0/24 comment="default configuration" dns-server=\
192.168.100.1 gateway=192.168.100.1
/ip dns
set allow-remote-requests=yes cache-size=5000000KiB max-udp-packet-size=512 \
servers=8.8.8.8,8.8.4.4
/ip firewall mangle
add action=mark-connection chain=input in-interface=INTERNET_WAN1 \
new-connection-mark=WAN1_conn
add action=mark-connection chain=input in-interface=INTERNET_WAN2 \
new-connection-mark=WAN2_conn
add action=mark-routing chain=output connection-mark=WAN1_conn \
new-routing-mark=to_WAN1
add action=mark-routing chain=output connection-mark=WAN2_conn \
new-routing-mark=to_WAN2
add chain=prerouting dst-address=192.168.1.0/24 in-interface=LAN_Local
add chain=prerouting dst-address=192.168.2.0/24 in-interface=LAN_Local
add action=mark-connection chain=prerouting dst-address-type=!local \
in-interface=LAN_Local new-connection-mark=WAN1_conn \
per-connection-classifier=both-addresses-and-ports:2/0
add action=mark-connection chain=prerouting dst-address-type=!local \
in-interface=LAN_Local new-connection-mark=WAN2_conn \
per-connection-classifier=both-addresses-and-ports:2/1
add action=mark-routing chain=prerouting connection-mark=WAN1_conn \
in-interface=LAN_Local new-routing-mark=to_WAN1
add action=mark-routing chain=prerouting connection-mark=WAN2_conn \
in-interface=LAN_Local new-routing-mark=to_WAN2
/ip firewall nat
add action=masquerade chain=srcnat out-interface=INTERNET_WAN1
add action=masquerade chain=srcnat out-interface=INTERNET_WAN2
/ip route
add check-gateway=ping distance=1 gateway=192.168.1.1 routing-mark=to_WAN1
add check-gateway=ping distance=1 gateway=192.168.2.1 routing-mark=to_WAN2
add check-gateway=ping distance=1 gateway=192.168.1.1
add check-gateway=ping distance=2 gateway=192.168.2.1
/system clock
set time-zone-name=Asia/Bangkok
line: prathai3g / melodycats
ขอบคุณผู้ใช้บริการ
ประทายสามจี
+++อธิบาย+++
Internet Wan1(eth1)=192.168.1.1
Internet Wan2(eth2)=192.168.2.1
Local ปล่อย DHCP (eth3)= 192.168.100.50-192.168.100.200
----------------------------------------------------------
*** copy Script ไปวางใน Terminal Winbox ****
/interface ethernet
set [ find default-name=ether1 ] name=INTERNET_WAN1
set [ find default-name=ether2 ] name=INTERNET_WAN2
set [ find default-name=ether3 ] name=LAN_Local
set [ find default-name=ether4 ] name=ether4
set [ find default-name=ether5 ] name=ether5
/ip pool
add name=default-dhcp ranges=192.168.100.50-192.168.100.200
/ip dhcp-server
add address-pool=default-dhcp disabled=no interface=LAN_Local name=default
/ip address
add address=192.168.100.1/24 interface=LAN_Local network=192.168.100.0
add address=192.168.1.2/24 interface=INTERNET_WAN1 network=192.168.1.0
add address=192.168.2.2/24 interface=INTERNET_WAN2 network=192.168.2.0
/ip dhcp-client
add default-route-distance=0 dhcp-options=hostname,clientid interface=\
INTERNET_WAN1
/ip dhcp-server network
add address=192.168.100.0/24 comment="default configuration" dns-server=\
192.168.100.1 gateway=192.168.100.1
/ip dns
set allow-remote-requests=yes cache-size=5000000KiB max-udp-packet-size=512 \
servers=8.8.8.8,8.8.4.4
/ip firewall mangle
add action=mark-connection chain=input in-interface=INTERNET_WAN1 \
new-connection-mark=WAN1_conn
add action=mark-connection chain=input in-interface=INTERNET_WAN2 \
new-connection-mark=WAN2_conn
add action=mark-routing chain=output connection-mark=WAN1_conn \
new-routing-mark=to_WAN1
add action=mark-routing chain=output connection-mark=WAN2_conn \
new-routing-mark=to_WAN2
add chain=prerouting dst-address=192.168.1.0/24 in-interface=LAN_Local
add chain=prerouting dst-address=192.168.2.0/24 in-interface=LAN_Local
add action=mark-connection chain=prerouting dst-address-type=!local \
in-interface=LAN_Local new-connection-mark=WAN1_conn \
per-connection-classifier=both-addresses-and-ports:2/0
add action=mark-connection chain=prerouting dst-address-type=!local \
in-interface=LAN_Local new-connection-mark=WAN2_conn \
per-connection-classifier=both-addresses-and-ports:2/1
add action=mark-routing chain=prerouting connection-mark=WAN1_conn \
in-interface=LAN_Local new-routing-mark=to_WAN1
add action=mark-routing chain=prerouting connection-mark=WAN2_conn \
in-interface=LAN_Local new-routing-mark=to_WAN2
/ip firewall nat
add action=masquerade chain=srcnat out-interface=INTERNET_WAN1
add action=masquerade chain=srcnat out-interface=INTERNET_WAN2
/ip route
add check-gateway=ping distance=1 gateway=192.168.1.1 routing-mark=to_WAN1
add check-gateway=ping distance=1 gateway=192.168.2.1 routing-mark=to_WAN2
add check-gateway=ping distance=1 gateway=192.168.1.1
add check-gateway=ping distance=2 gateway=192.168.2.1
/system clock
set time-zone-name=Asia/Bangkok