Welcome to Sysnet Board คู่มือ การใช้งานอุปกรณ์ Network. Please log in or sign up.
สมาชิกทั้งหมด
17,595
กระทู้ทั้งหมด
10,026
หัวข้อทั้งหมด
4,711

  • รบกวนดูให้หน่อย ติดตั้ง LoadBalance 1100 AH X แบบ 3 WAN (Static IP) to 1LAN
    เริ่มโดย lalang
    Read 8,049 times
0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

 

 
รบกวนสอบถามทีมงานsysnetcenterครับคือผมต้องการใช้แค่ 3 wan(static) 1 lan Wan1 CAT 10M และ wan2 TOT 30M wan3 TOT 30M โค๊ดด้านล่างนี้ถูกหรือเปล่าครับ

#|/ip address
/ip address add address=192.168.100.100/24 network=192.168.100.0 broadcast=192.168.100.255 interface=ether1
/ip address add address=192.168.150.100/24 network=192.168.150.0 broadcast=192.168.150.255 interface=ether2
/ip address add address=192.168.2000.100/24 network=192.168.200.0 broadcast=192.168.200.255 interface=ether3
/ip address add address=192.168.1.1/24 network=192.168.1.0 broadcast=192.168.1.255 interface=ether5 comment="default configuration"

#|/ip firewall mangle
/ip firewall mangle add chain=input in-interface=ether1 action=mark-connection new-connection-mark=ether1_conn
/ip firewall mangle add chain=input in-interface=ether2 action=mark-connection new-connection-mark=ether2_conn
/ip firewall mangle add chain=input in-interface=ether3 action=mark-connection new-connection-mark=ether3_conn

/ip firewall mangle add chain=output connection-mark=ether1_conn action=mark-routing new-routing-mark=to_ether1
/ip firewall mangle add chain=output connection-mark=ether2_conn action=mark-routing new-routing-mark=to_ether2
/ip firewall mangle add chain=output connection-mark=ether3_conn action=mark-routing new-routing-mark=to_ether3

/ip firewall mangle add chain=prerouting dst-address=192.168.100.0/24 action=accept in-interface=ether5
/ip firewall mangle add chain=prerouting dst-address=192.168.150.0/24 action=accept in-interface=ether5
/ip firewall mangle add chain=prerouting dst-address=192.168.200.0/24 action=accept in-interface=ether5

/ip firewall mangle add chain=prerouting dst-address-type=!local in-interface=ether5 per-connection-classifier=both-addresses-and-ports:8/0 action=mark-connection new-connection-mark=ether1_conn passthrough=yes
/ip firewall mangle add chain=prerouting dst-address-type=!local in-interface=ether5 per-connection-classifier=both-addresses-and-ports:8/1 action=mark-connection new-connection-mark=ether1_conn passthrough=yes
/ip firewall mangle add chain=prerouting dst-address-type=!local in-interface=ether5 per-connection-classifier=both-addresses-and-ports:8/2 action=mark-connection new-connection-mark=ether1_conn passthrough=yes
/ip firewall mangle add chain=prerouting dst-address-type=!local in-interface=ether5 per-connection-classifier=both-addresses-and-ports:8/3 action=mark-connection new-connection-mark=ether2_conn passthrough=yes
/ip firewall mangle add chain=prerouting dst-address-type=!local in-interface=ether5 per-connection-classifier=both-addresses-and-ports:8/4 action=mark-connection new-connection-mark=ether2_conn passthrough=yes
/ip firewall mangle add chain=prerouting dst-address-type=!local in-interface=ether5 per-connection-classifier=both-addresses-and-ports:8/5 action=mark-connection new-connection-mark=ether2_conn passthrough=yes
/ip firewall mangle add chain=prerouting dst-address-type=!local in-interface=ether5 per-connection-classifier=both-addresses-and-ports:8/6 action=mark-connection new-connection-mark=ether2_conn passthrough=yes
/ip firewall mangle add chain=prerouting dst-address-type=!local in-interface=ether5 per-connection-classifier=both-addresses-and-ports:8/7 action=mark-connection new-connection-mark=ether3_conn passthrough=yes
   
/ip firewall mangle add chain=prerouting connection-mark=ether1_conn in-interface=ether5 action=mark-routing new-routing-mark=to_ether1
/ip firewall mangle add chain=prerouting connection-mark=ether2_conn in-interface=ether5 action=mark-routing new-routing-mark=to_ether2
/ip firewall mangle add chain=prerouting connection-mark=ether3_conn in-interface=ether5 action=mark-routing new-routing-mark=to_ether3

#|/ip route
/ip route add dst-address=0.0.0.0/0 gateway=192.168.100.1 routing-mark=to_ether1 check-gateway=ping
/ip route add dst-address=0.0.0.0/0 gateway=192.168.150.1 routing-mark=to_ether2 check-gateway=ping
/ip route add dst-address=0.0.0.0/0 gateway=192.168.200.1 routing-mark=to_ether3 check-gateway=ping

/ip route add dst-address=0.0.0.0/0 gateway=192.168.100.1 distance=1 check-gateway=ping
/ip route add dst-address=0.0.0.0/0 gateway=192.168.150.1 distance=2 check-gateway=ping
/ip route add dst-address=0.0.0.0/0 gateway=192.168.200.1 distance=3 check-gateway=ping


#|/ip firewall nat
/ip firewall nat add chain=srcnat out-interface=ether1 action=masquerade
/ip firewall nat add chain=srcnat out-interface=ether2 action=masquerade
/ip firewall nat add chain=srcnat out-interface=ether3 action=masquerade

#| DHCP server is on switch, with address pool 192.168.1.40-192.168.1.70
/ip pool add name=default-dhcp ranges=192.168.1.40-192.168.1.70
/ip dhcp-server add name=default address-pool=default-dhcp interface=ether5 disabled=no
/ip dhcp-server network add address=192.168.1.0/24 gateway=192.168.1.1 dns-server=192.168.1.1 comment="default configuration"

#| DNS
/ip dns set allow-remote-requests=yes
/ip dns static add name=router address=8.8.8.8

#| Now Configure DNS server so users can resolve hostnames,
#| Ex.cache-size=5000KiB
#| DNS Google = 8.8.8.8,8.8.4.4
#| DNS CAT = 61.19.245.245,61.19.245.246
#| DNS TOT = 203.113.127.199,203.113.24.199
/ip dns set allow-remote-requests=yes cache-size=5000K max-udp-packet-size=512 servers=8.8.8.8,8.8.4.4




กรณี มี 4wan โดย CATwan1=10Mb และ TOTwan2=30Mb TOTwan3=30Mb CATwan4=40Mb
แล้วไม่ใส่ config ตามข้างบน เน็ตวิ่งออกเส้นไหน? และทดสอบความเร็วน่าจะเป็นยังงัยครับ เขียนโค๊ดต่อยังไง
-จำนวนลูป เยอะ หรือน้อยมีผลอะไรบ้างครับ

ขอบคุณพี่ๆทีมงานsysnetcenterทุกคนนะครับ

Test หรือยังครับ ผม่า test ดูก่อนครับ ได้ผลอย่างไรเเจ้งอีกทีครับ

 ;D พระเจ้าช่วยกล้วยทอด ท่านเอาไปทำอะไรมากขนาดนี้่ 3 wan ของผม2 wan ก็อิ่มอกอิ่มใจแล้ว ;D หุๆ