İçeriğe geç

Etiket: pcc

PCC Metodu ile İnternet Yük Dengeleme

Şayet iki servis sağlayıcı kullanıyorsanız, pcc metodu ile Mikrotik cihazlarınızda yük dengeleme yaparak yerel ağınızdaki istemcilere daha verimli bir bant genişliği sağlayabilirsiniz. Yukarıda bulunan örnek topoloji üzerinden gidersek: /ip addressadd address=192.168.88.1/24 network=192.168.88.0 broadcast=192.168.88.255 interface=Localadd address=192.168.10.2/24 network=192.168.10.0 broadcast=192.168.10.255 interface=WAN1add address=192.168.20.2/24 network=192.168.20.0 broadcast=192.168.20.255 interface=WAN2 Cihazı dns sunucusu olarak kullanalım: /ip dns set allow-remote-requests=yes cache-max-ttl=1w cache-size=5000KiB max-udp-packet-size=512 servers=8.8.4.4,8.8.8.8 Paketleri işaretlemek ve yönlendirmek için mangle kurallarına ihtiyacımız var. /ip firewall mangleadd chain=input in-interface=WAN1 action=mark-connection new-connection-mark=WAN1_connadd chain=input in-interface=WAN2 action=mark-connection new-connection-mark=WAN2_connadd chain=output connection-mark=WAN1_conn action=mark-routing new-routing-mark=to_WAN1add chain=output connection-mark=WAN2_conn action=mark-routing new-routing-mark=to_WAN2add chain=prerouting dst-address=192.168.10.0/24 action=accept in-interface=Localadd chain=prerouting dst-address=192.168.20.0/24 action=accept in-interface=Localadd chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses-and-ports:2/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yesadd chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses-and-ports:2/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yesadd chain=prerouting connection-mark=WAN1_conn in-interface=Local action=mark-routing new-routing-mark=to_WAN1add chain=prerouting connection-mark=WAN2_conn in-interface=Local action=mark-routing new-routing-mark=to_WAN2 Son olarak routing mark ile birlikte yeni route tanımlarını işledikten sonra ağımızı maskeleyelim. /ip routeadd dst-address=0.0.0.0/0 gateway=192.168.10.1 routing-mark=to_WAN1 check-gateway=pingadd dst-address=0.0.0.0/0 gateway=192.168.20.1 routing-mark=to_WAN2 check-gateway=pingadd dst-address=0.0.0.0/0 gateway=192.168.10.1 distance=1 check-gateway=pingadd dst-address=0.0.0.0/0 gateway=192.168.20.1 distance=2 check-gateway=ping/ip firewall natadd chain=srcnat out-interface=WAN1 action=masqueradeadd chain=srcnat out-interface=WAN2 action=masquerade Hepsi bu kadar. Örnekte iki internet devresi var. Ama ikiden fazla kullanılıp kuralları buna göre revize edebilirsiniz.