PCC Load Balancing Generator

হোম » টুলস » স্ক্রিপ্টসমূহ » বিস্তারিত
⚡ MikroTik Multi-WAN Balancing

PCC Load Balancing Generator (RouterOS v6 & v7)

একাধিক আইএসপি বা WAN লাইনের ব্যান্ডউইথ সুষমভাবে বণ্টন ও অটো ফেইলওভারের জন্য সম্পূর্ণ কনফিগারেশন তৈরি করুন।

WAN ইন্টারফেস ও গেটওয়ে সেটিংস

ইন্টারফেস নাম
WAN IP / Subnet
ISP Gateway IP
ব্যান্ডউইথ অনুপাত (Weight)
ইন্টারফেস নাম
WAN IP / Subnet
ISP Gateway IP
ব্যান্ডউইথ অনুপাত (Weight)

জেনারেট হওয়া MikroTik স্ক্রিপ্ট (Generated Script)

নিচের সম্পূর্ণ কোডটি কপি করে MikroTik WinBox এর New Terminal এ পেস্ট করুন।

mikrotik_pcc_loadbalance_v7.rsc
# =============================================================
# ISP SECTOR - MikroTik Multi-WAN PCC Load Balancing Generator
# RouterOS Version: V7
# Generated at: 2026-09-12 03:33:13
# =============================================================

# --- 1. IP Address Assignment ---
/ip address add address=10.10.1.2/30 interface=ether1-WAN1 comment="WAN1"
/ip address add address=10.10.2.2/30 interface=ether2-WAN2 comment="WAN2"

# --- 2. Fast Resilient DNS ---
/ip dns set allow-remote-requests=yes servers=8.8.8.8,1.1.1.1,8.8.4.4

# --- 3. Source NAT (Masquerade) ---
/ip firewall nat add chain=srcnat out-interface=ether1-WAN1 action=masquerade comment="NAT_WAN1"
/ip firewall nat add chain=srcnat out-interface=ether2-WAN2 action=masquerade comment="NAT_WAN2"

# --- 4. Firewall Mangles (PCC Connection Classifier) ---
# Accept Local Traffic (Bypass balance for local inter-subnet)
/ip firewall mangle add chain=prerouting dst-address=192.168.88.0/24 action=accept comment="ACCEPT_LOCAL"

/ip firewall mangle add chain=prerouting in-interface=ether1-WAN1 connection-state=new action=mark-connection new-connection-mark=WAN1_conn passthrough=yes comment="WAN1_IN"
/ip firewall mangle add chain=prerouting in-interface=ether2-WAN2 connection-state=new action=mark-connection new-connection-mark=WAN2_conn passthrough=yes comment="WAN2_IN"

/ip firewall mangle add chain=prerouting in-interface=bridge1 connection-state=new dst-address-type=!local per-connection-classifier=both-addresses-and-ports:2/0 action=mark-connection new-connection-mark=WAN1_conn passthrough=yes comment="PCC_DIV_0_TO_WAN1"
/ip firewall mangle add chain=prerouting in-interface=bridge1 connection-state=new dst-address-type=!local per-connection-classifier=both-addresses-and-ports:2/1 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes comment="PCC_DIV_1_TO_WAN2"

/ip firewall mangle add chain=prerouting in-interface=bridge1 connection-mark=WAN1_conn action=mark-routing new-routing-mark=to_WAN1 passthrough=yes comment="ROUTE_TO_WAN1"
/ip firewall mangle add chain=output connection-mark=WAN1_conn action=mark-routing new-routing-mark=to_WAN1 passthrough=yes
/ip firewall mangle add chain=prerouting in-interface=bridge1 connection-mark=WAN2_conn action=mark-routing new-routing-mark=to_WAN2 passthrough=yes comment="ROUTE_TO_WAN2"
/ip firewall mangle add chain=output connection-mark=WAN2_conn action=mark-routing new-routing-mark=to_WAN2 passthrough=yes

# --- 5. Routing Tables & Failover Routes ---
# RouterOS v7 Routing Tables creation
/routing table add name=to_WAN1 fib
/routing table add name=to_WAN2 fib

/ip route add dst-address=0.0.0.0/0 gateway=10.10.1.1 routing-table=to_WAN1 check-gateway=ping distance=1 comment="PCC_ROUTE_WAN1"
/ip route add dst-address=0.0.0.0/0 gateway=10.10.2.1 routing-table=to_WAN2 check-gateway=ping distance=1 comment="PCC_ROUTE_WAN2"

# Main Failover Routes (Distance 1, 2, 3...)
/ip route add dst-address=0.0.0.0/0 gateway=10.10.1.1 check-gateway=ping distance=1 comment="MAIN_FALLBACK_WAN1"
/ip route add dst-address=0.0.0.0/0 gateway=10.10.2.1 check-gateway=ping distance=2 comment="MAIN_FALLBACK_WAN2"

# =============================================================
# Done! Copy & Paste this directly into MikroTik WinBox Terminal
# =============================================================
Ready for RouterOS V7 Lines: 47 | UTF-8

স্ক্রিপ্টের বিবরণ ও নির্দেশাবলী

Generates MikroTik Dual-WAN to 8-WAN PCC Load Balancing & Failover scripts to copy-paste into Winbox terminal.

ডাউনলোড এক্সেস সক্রিয়

আপনার অ্যাকাউন্ট থেকে এই স্ক্রিপ্ট ফাইলটি সফলভাবে অ্যাক্সেস করা যাচ্ছে।