tuxman
Goto Top

Mikrotik Dual WAN PCC

Guten Tag.

Ich bastel mal wieder an mein Netzwerk rum.

Ich habe zwei Internetprovider.

1. ADSL 6000 Telekom mit Fritzbox.
2. Kabelanschluss Vodafone 50000 mit ArisBox. (lauft demnächst in bridge modus)

3.Mikrotik Hex 3


Ich habe mal bei google einige Anleitungen durchforstet.

Seite 1.

www.easysystem.al/mikrotik/mikrotik-dual-wan-load-balancing-pcc-method/

dort wird angegeben.
/ip firewall mangle
add chain=input in-interface=WAN1 action=mark-connection new-connection-mark=WAN1_conn
add chain=input in-interface=WAN2 action=mark-connection new-connection-mark=WAN2_conn
add chain=output connection-mark=WAN1_conn action=mark-routing new-routing-mark=to_WAN1
add chain=output connection-mark=WAN2_conn action=mark-routing new-routing-mark=to_WAN2


Seite 2.

mikrotik-4-wan-load-balance-pcc-complete-script-by-zaib

dort wird angegeben

/ip firewall mangle
add action=accept chain=prerouting in-interface=WAN1
add action=accept chain=prerouting in-interface=WAN2


also einmal mit

chain=input

und einmal mit

chain=prerouting


das habe ich bei mir angegeben.

/ip firewall mangle

add action=mark-connection chain=prerouting comment=WAN1-Telekom in-interface=ether1-Telekom new-connection-mark=WAN1_conn passthrough=yes

add action=mark-connection chain=input comment=WAN1-Telekom in-interface=ether1-Telekom new-connection-mark=WAN1_conn passthrough=no < das ist im moment an

add action=mark-connection chain=prerouting comment=WAN1-Vodafone in-interface=ether2-Vodafon new-connection-mark=WAN2_conn passthrough=yes

add action=mark-connection chain=input comment=WAN1-Vodafone in-interface=ether2-Vodafon new-connection-mark=WAN2_conn passthrough=no < das ist im moment an

einmal mit passthrough an beim prerouting
einmal mit passthrough aus beim input

also alles beides funktioniert.

also was ist nun richtig bzw besser.

habe mal im Anschluss meine komplette Conf dran gehängt.

# jan/12/2002 22:51:13 by RouterOS 6.46.6
# software id = 
#
# model = RouterBOARD 750G r3
# serial number = 

/ip firewall mangle
add action=mark-connection chain=prerouting comment=WAN1-Telekom in-interface=ether1-Telekom new-connection-mark=WAN1_conn passthrough=yes
add action=mark-connection chain=input comment=WAN1-Telekom disabled=yes in-interface=ether1-Telekom new-connection-mark=WAN1_conn passthrough=no     <<< dieses ist im moment disable
add action=mark-connection chain=prerouting comment=WAN1-Vodafone in-interface=ether2-Vodafon new-connection-mark=WAN2_conn passthrough=yes
add action=mark-connection chain=input comment=WAN1-Vodafone disabled=yes in-interface=ether2-Vodafon new-connection-mark=WAN2_conn passthrough=no   <<<< disable
add action=accept chain=prerouting in-interface=ether1-Telekom
add action=accept chain=prerouting in-interface=ether2-Vodafon
add action=mark-routing chain=output connection-mark=WAN1_conn new-routing-mark=to_WAN1 passthrough=no
add action=mark-routing chain=output connection-mark=WAN2_conn new-routing-mark=to_WAN2 passthrough=no
add action=mark-connection chain=prerouting comment="Amazone Ger\E4te--WAN1-Conn" dst-address-list=!local dst-address-type="" in-interface-list=lan new-connection-mark=WAN1_conn passthrough=no src-address-list=amazon  
add action=mark-connection chain=prerouting comment="GAST Ger\E4te--WAN1-Conn" dst-address=!192.168.30.0/24 dst-address-list=!local dst-address-type="" in-interface-list=lan new-connection-mark=WAN1_conn passthrough=no src-address=192.168.30.0/24  
add action=mark-connection chain=prerouting comment=PCC-WAN1-Conn dst-address-list=!local dst-address-type=!local in-interface-list=lan new-connection-mark=WAN1_conn passthrough=yes per-connection-classifier=both-addresses-and-ports:2/0
add action=mark-connection chain=prerouting comment=PCC-WAN2-Conn dst-address=!192.168.178.0/24 dst-address-list=!local dst-address-type=!local in-interface-list=lan new-connection-mark=WAN2_conn passthrough=yes per-connection-classifier=both-addresses-and-ports:2/1
add action=mark-routing chain=prerouting connection-mark=WAN1_conn dst-address-list=!local in-interface-list=lan new-routing-mark=to_WAN1 passthrough=no
add action=mark-routing chain=prerouting connection-mark=WAN2_conn dst-address-list=!local in-interface-list=lan new-routing-mark=to_WAN2 passthrough=no
add action=mark-connection chain=forward comment=pcq dst-address-list=local in-interface=ether1-Telekom new-connection-mark=con_wan1_down passthrough=yes
add action=mark-packet chain=forward connection-mark=con_wan1_down new-packet-mark=pk_wan1_down passthrough=yes
add action=mark-connection chain=forward dst-address-list=local in-interface=ether2-Vodafon new-connection-mark=con_wan2_down passthrough=yes
add action=mark-packet chain=forward connection-mark=con_wan2_down new-packet-mark=pk_wan2_down passthrough=yes
add action=mark-connection chain=forward connection-mark=WAN1_conn new-connection-mark=conn_wan1_upload out-interface=ether1-Telekom passthrough=yes src-address-list=local
add action=mark-packet chain=forward connection-mark=conn_wan1_upload new-packet-mark=pk_wan1_upload passthrough=yes
add action=mark-connection chain=forward connection-mark=WAN2_conn new-connection-mark=conn_wan2_upload out-interface=ether2-Vodafon passthrough=yes src-address-list=local
add action=mark-packet chain=forward connection-mark=conn_wan2_upload new-packet-mark=pk_wan2_upload passthrough=yes

dann möchte ich das ich die zweite Leitung besser auslaste.

da habe ich im Internet gefunden.

add 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=yes
add 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=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses-and-ports:2/2 action=mark-connection new-connection-mark=WAN2_conn passthrough=yes

das man dieses "per-connection-classifier=both-addresses-and-ports:2/2" einstellen sollte aber im Zähler passieren hier keinen Packete,Zähler bleibt bei null.

Zum Abschluss.

also das loadbalancing funktioniert bei prerouting und auch beim input.
Amazon Geräte laufen auch alle über wan1. so wie das Gästenetzwerk.

anbei mal ein bild.
mikrotik mangel

Content-Key: 569441

Url: https://administrator.de/contentid/569441

Printed on: April 24, 2024 at 20:04 o'clock