3 Internetleitungen in einem einzigen Netzwerk

3 Internetleitungen in einem einzigen Netzwerk

ich werde drei Internetleitungen in einem einzigen Netzwerk zusammenführen.
Ich verwende einen Mikrotik RB750-Router, den ich folgendermaßen konfiguriert habe:

/ip firewall mangle
add chain=input in-interface=WAN2 action=mark-connection new-connection-mark=WAN2_conn
add chain=input in-interface=WAN3 action=mark-connection new-connection-mark=WAN3_conn
add chain=input in-interface=WAN4 action=mark-connection new-connection-mark=WAN4_conn
add chain=input in-interface=WAN5 action=mark-connection new-connection-mark=WAN5_conn

add chain=output connection-mark=WAN2_conn action=mark-routing new-routing-mark=to_WAN2
add chain=output connection-mark=WAN3_conn action=mark-routing new-routing-mark=to_WAN3
add chain=output connection-mark=WAN4_conn action=mark-routing new-routing-mark=to_WAN4
add chain=output connection-mark=WAN5_conn action=mark-routing new-routing-mark=to_WAN5

add chain=prerouting dst-address=192.168.2.0/24 action=accept in-interface=bridge1
add chain=prerouting dst-address=192.168.3.0/24 action=accept in-interface=bridge1
add chain=prerouting dst-address=192.168.4.0/24 action=accept in-interface=bridge1
add chain=prerouting dst-address=192.168.5.0/24 action=accept in-interface=bridge1

add chain=prerouting dst-address-type=!local in-interface=bridge1 per-connection-classifier=both-addresses-and-ports:4/0 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes 
add chain=prerouting dst-address-type=!local in-interface=bridge1 per-connection-classifier=both-addresses-and-ports:4/1 action=mark-connection new-connection-mark=WAN3_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=bridge1 per-connection-classifier=both-addresses-and-ports:4/2 action=mark-connection new-connection-mark=WAN4_conn passthrough=yes 
add chain=prerouting dst-address-type=!local in-interface=bridge1 per-connection-classifier=both-addresses-and-ports:4/3 action=mark-connection new-connection-mark=WAN5_conn passthrough=yes

add chain=prerouting connection-mark=WAN2_conn in-interface=bridge1 action=mark-routing new-routing-mark=to_WAN2
add chain=prerouting connection-mark=WAN3_conn in-interface=bridge1 action=mark-routing new-routing-mark=to_WAN3
add chain=prerouting connection-mark=WAN4_conn in-interface=bridge1 action=mark-routing new-routing-mark=to_WAN4
add chain=prerouting connection-mark=WAN5_conn in-interface=bridge1 action=mark-routing new-routing-mark=to_WAN5

/ip route
add dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-mark=to_WAN2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.3.1 routing-mark=to_WAN3 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.4.1 routing-mark=to_WAN4 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.5.1 routing-mark=to_WAN5 check-gateway=ping

add dst-address=0.0.0.0/0 gateway=192.168.2.1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.3.1 distance=2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.4.1 distance=2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.5.1 distance=2 check-gateway=ping

/ip firewall nat
add chain=srcnat out-interface=WAN2 action=masquerade
add chain=srcnat out-interface=WAN3 action=masquerade
add chain=srcnat out-interface=WAN4 action=masquerade
add chain=srcnat out-interface=WAN5 action=masquerade  

Hinweis: Der Router hat 5 physische Ports (WAN1, WAN2, WAN3, WAN4, WAN5) und 1 Wireless-Port. WAN1 und Wireless-Port sind über Bridge1Bridge1 (WAN1 oder Wireless) miteinander verbunden und alle Knoten im Netzwerk sind mit Bridge1 (WAN1 oder Wireless) verbunden. Jetzt gibt es kein Problem mit der Internetverbindung und alles funktioniert einwandfrei. Wenn jedoch ein Knoten in diesem Netzwerk eine Website besuchen möchte (z. B. google.com), wird die Anfrage von allen Internetleitungen an google.com gesendet! Daher senden wir für jeden Knoten zwei weitere Anfragen an eine einzelne Website!
Ich möchte diese Internetleitungen zwischen Netzwerkknoten aufteilen, z. B. verwendet jeder IP-Bereich eine bestimmte Internetleitung, wie folgt:

192.168.1.1 - 192.168.1.64: Use first Internet line 
192.168.1.65 - 192.168.1.128: Use second Internet line 
192.168.1.129 - 192.168.1.254: Use third Internet line   

ist das möglich? kannst du mir helfen?

Antwort1

Sie versuchen, PCC (Per Connection Classifier) ​​zu verwenden, fordern jedoch einen Lastenausgleich basierend auf dem Quell-IP-Adressbereich.

Entfernen Sie die folgenden Regeln aus Ihrer Konfiguration:

add chain=prerouting dst-address-type=!local in-interface=bridge1 per-connection-classifier=both-addresses-and-ports:4/0 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes 
add chain=prerouting dst-address-type=!local in-interface=bridge1 per-connection-classifier=both-addresses-and-ports:4/1 action=mark-connection new-connection-mark=WAN3_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=bridge1 per-connection-classifier=both-addresses-and-ports:4/2 action=mark-connection new-connection-mark=WAN4_conn passthrough=yes 
add chain=prerouting dst-address-type=!local in-interface=bridge1 per-connection-classifier=both-addresses-and-ports:4/3 action=mark-connection new-connection-mark=WAN5_conn passthrough=yes

add chain=prerouting connection-mark=WAN2_conn in-interface=bridge1 action=mark-routing new-routing-mark=to_WAN2
add chain=prerouting connection-mark=WAN3_conn in-interface=bridge1 action=mark-routing new-routing-mark=to_WAN3
add chain=prerouting connection-mark=WAN4_conn in-interface=bridge1 action=mark-routing new-routing-mark=to_WAN4
add chain=prerouting connection-mark=WAN5_conn in-interface=bridge1 action=mark-routing new-routing-mark=to_WAN5

Und fügen Sie Folgendes hinzu:

add chain=prerouting src-address=192.168.1.0/26 in-interface=bridge1 dst-address=!192.168.1.0/24 action=mark-routing disabled=no new-routing-mark=to_WAN2 passthrough=no 
add chain=prerouting src-address=192.168.1.64/26 in-interface=bridge1 dst-address=!192.168.1.0/24 action=mark-routing disabled=no new-routing-mark=to_WAN3 passthrough=no 
add chain=prerouting src-address=192.168.1.128/25 in-interface=bridge1 dst-address=!192.168.1.0/24 action=mark-routing disabled=no new-routing-mark=to_WAN4 passthrough=no 

Es ist nicht erforderlich, die Verbindungen zu markieren und anschließend eine Routenmarkierung vorzunehmen. Sie können die Routenmarkierung direkt auf Grundlage des Quelladressbereichs vornehmen.

verwandte Informationen