fbpx

PCC DE BALANCEAMENTO DE CARGA IGUAL WAN

PCC DE BALANCEAMENTO DE CARGA IGUAL WAN

Regras do balance pcc para mikrotik , nesses script sao 2 links , edite e use conforme necessidade.

/interface ethernet
set [ find default-name=ether1 ] name=ether1
set [ find default-name=ether2 ] name=ether2
set [ find default-name=ether3 ] name=ether3
set [ find default-name=ether4 ] name= ether4
set [ find default-name=ether5 ] name=ether5
/system note set note=”Server Configuration By (www.itlearnweb.com)” show-at-login=yes
/ip address
add address=192.168. 1.10/24 interface=ether1
add address=192.168.2.10/24 interface=ether2
add address=192.168.10.1/24 interface=ether5
/ip dns
set allow-remote-requests=yes cache-size=5000KiB max-udp-packet- size=2048 servidores=192.168.1.1,192.168.2.1
/ip firewall mangle
add chain=entrada in-interface=ether1 action=marcar conexão new-connection-mark=WAN1_con
add chain=entrada in-interface=ether2 action=marcar conexão new-connection-mark=WAN2_con
add action=marcar-roteamento chain= saída connection-mark=WAN1_con new-routing-mark=to_WAN1
add action=mark-routing chain=saída connection-mark=WAN2_con new-routing-mark=to_WAN2
add chain=pré-roteamento dst-address=192.168.1.0/24 na interface =ether5
add chain=pré-roteamento dst-address=192.168.2.0/24 in-interface=ether5
add action=mark-connection chain=pré-roteamento dst-address-type=!local hotspot=auth in-interface=ether5 new-connection-mark =WAN1_con per-connection-classifier=ambos-endereços-e-portas:2/0
add action=mark-connection chain=prerouting dst-address-type=!local hotspot=auth in-interface=ether5 new-connection-mark=WAN2_con per-connection-classifier=both-addresses-and-ports:2/1
add action=mark-routing chain=pré-roteamento connection-mark=WAN1_con in-interface=ether5 new-routing-mark=to_WAN1
add action=mark-routing chain=pré-roteamento connection-mark=WAN2_con in-interface=ether5 new-routing-mark= to_WAN2
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1
add action=masquerade chain=srcnat out-interface=ether2
/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

Deixe uma resposta

0