Telegram- 👇 😉
-
. WIKIMERIONET
Merion Mertics , ,

CRM

5

WAN- , , , , MikroTik - Load Balancing . , WAN- , NAT .

 load balancing  WAN  Mikrotik

, MikroTik, - ether1 ether2 , ether3. NAT WAN . :

IP-:

/ip address
add address=1.1.1.199/24 interface=ether1 comment="Tars"
add address=2.2.2.199/24 interface=ether2 comment="Meeline"
add address=192.168.1.1/24 interface=ether3 comment="LAN Gateway"

:

/ip route
add dst-address=0.0.0.0/0 check-gateway=ping gateway=1.1.1.1,2.2.2.1

NAT WAN :

/ip firewall nat
add action=masquerade chain=srcnat comment="Tars" out-interface=ether1
add action=masquerade chain=srcnat comment="Meeline" out-interface=ether2

, . , . , , , , - , .


Mangle

WAN- , WAN , WAN-, , , VPN-based . WAN . , WAN . :

/ip firewall mangle
add action=mark-connection chain=input comment="Tars Input" in-interface=ether1 new-connection-mark="Tars Input"
add action=mark-connection chain=input comment="Meeline Input" in-interface=ether2 new-connection-mark="Meeline Input"

.

. , WAN- .

add action=mark-routing chain=output comment="Tars Output" connection-mark="Tars Input" new-routing-mark="Out Tars"
add action=mark-routing chain=output comment="Meeline Output" connection-mark="Meeline Input" new-routing-mark="Meeline Telecom"

, , . , WAN-.


LAN

Mangle - , , . , - , MikroTik. ether3 (LAN-), . WAN- .

LAN- :

add action=mark-routing chain=prerouting comment="LAN load balancing 2-0" \
    dst-address-type=!local in-interface=ether3 new-routing-mark=\
    "Out Tars" passthrough=yes per-connection-classifier=\
    both-addresses-and-ports:2/0
add action=mark-routing chain=prerouting comment="LAN load balancing 2-1" \
    dst-address-type=!local in-interface=ether3 new-routing-mark=\
    "Out Meeline" passthrough=yes per-connection-classifier=\
    both-addresses-and-ports:2/1
, .

.

WAN- . LAN, , , , .

/ip route
add distance=1 gateway=1.1.1.1 routing-mark="Out Tars"
add distance=1 gateway=2.2.2.1 routing-mark="Out Meeline"
. .

, , . , .


, :

  1. WAN
  2. WAN- 2 - .

, WAN-.