Community discussions

MikroTik App
 
lermthya
just joined
Topic Author
Posts: 6
Joined: Tue May 12, 2020 12:19 pm

Load balancing between 2 wan on same network

Fri Mar 26, 2021 12:27 pm

Hello,

I have a fiber router which has 2 RJ45 outputs on the LAN.
This router allows a 1 Gbit/s connection on each RJ45 port.

I would therefore like to share the two 1 Gbit/s connections through my Mikrotik router. On the other hand, the 2 WAN IPs of my Mikotik must imperatively be on the same network.
Can someone help me with this setup.

Thank you in advance.

PS: Below is a drawing of my network

https://ibb.co/QPVqqWJ
 
pe1chl
Forum Guru
Forum Guru
Posts: 10195
Joined: Mon Jun 08, 2015 12:09 pm

Re: Load balancing between 2 wan on same network

Fri Mar 26, 2021 4:21 pm

Make a bonding interface and put the two ether interface in it. Use that as your WAN (put it in WAN interface list too).
 
lermthya
just joined
Topic Author
Posts: 6
Joined: Tue May 12, 2020 12:19 pm

Re: Load balancing between 2 wan on same network

Fri Mar 26, 2021 4:43 pm

Hello,

Thank for the reply but No.

If i make a channel bonding with the 2 wan interface i have finaly only 1 IP
If I made a bond for the WAN, I would ultimately have only one output IP and therefore only one 1 Gbits/s link instead of two 1 Gbit/s links

And my FAI don't accept bonding on the 2 network ports provided.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10195
Joined: Mon Jun 08, 2015 12:09 pm

Re: Load balancing between 2 wan on same network

Fri Mar 26, 2021 5:48 pm

In that case just treat it as a generic load balancing setup, there is enough info about that on the forum and in the wiki!
 
lermthya
just joined
Topic Author
Posts: 6
Joined: Tue May 12, 2020 12:19 pm

Re: Load balancing between 2 wan on same network

Fri Mar 26, 2021 6:05 pm

But my problem is that my 2 WAN is on the same network and have the same gateway.
If i create 2 WAN interfaces on the same network, my Mikrotik routeur say that my FAI gateway is only seen via one interface (the first) and not the second.
That's my problem.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19103
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Load balancing between 2 wan on same network

Fri Mar 26, 2021 6:32 pm

Yes, but are they static public WANIPs?
 
pe1chl
Forum Guru
Forum Guru
Posts: 10195
Joined: Mon Jun 08, 2015 12:09 pm

Re: Load balancing between 2 wan on same network

Fri Mar 26, 2021 6:47 pm

But my problem is that my 2 WAN is on the same network and have the same gateway.
If i create 2 WAN interfaces on the same network, my Mikrotik routeur say that my FAI gateway is only seen via one interface (the first) and not the second.
That's my problem.
No, your problem is that you did not make a failover/load balancing config yet. When you have done that, you have 2 routing tables and you should be able to overcome that difficulty.
Better of course is to tell your ISP to fix it. I.e. give you 2Gbit on a single IP and with bonding on the interfaces. Or allow you to put their fiber directly in your router using an SFP.
 
lermthya
just joined
Topic Author
Posts: 6
Joined: Tue May 12, 2020 12:19 pm

Re: Load balancing between 2 wan on same network

Fri Mar 26, 2021 7:07 pm

I do it. and i cant have 2 diferents networks on the 2 ports on my ISP router.

See my config below and the picture of my network
Please help me.

what is my mistake ?

https://ibb.co/QPVqqWJ
# mar/26/2021 18:03:49 by RouterOS 6.48.1
# software id = Z5FD-BKLW
#
# model = CCR1036-8G-2S+
# serial number = C6C80BF50C0D
/interface ethernet
set [ find default-name=ether1 ] name=ether1-WAN1
set [ find default-name=ether2 ] name=ether2-WAN2
set [ find default-name=ether3 ] name=ether3-WAN3
set [ find default-name=ether4 ] disabled=yes
set [ find default-name=ether5 ] name=ether5-LACP-LAN-Slave1
set [ find default-name=ether6 ] name=ether6-LACP-LAN-Slave2
set [ find default-name=ether7 ] mac-address=C4:AD:34:B6:05:06 name=\
    ether7-LACP-LAN-Slave3
set [ find default-name=ether8 ] mac-address=C4:AD:34:B6:05:06 name=\
    ether8-LACP-LAN-Slave4
set [ find default-name=sfp-sfpplus1 ] disabled=yes
set [ find default-name=sfp-sfpplus2 ] disabled=yes
/interface bonding
add mode=802.3ad name=Bond-LACP-LAN slaves="ether5-LACP-LAN-Slave1,ether6-LACP\
    -LAN-Slave2,ether7-LACP-LAN-Slave3,ether8-LACP-LAN-Slave4" \
    transmit-hash-policy=layer-2-and-3
/interface vlan
add arp=reply-only comment="VLAN Reseau Celdenn LAN Local" interface=\
    Bond-LACP-LAN name=vlan-LAN-100 vlan-id=100
add arp=reply-only comment="VLAN Reseau invite LAN Local" interface=\
    Bond-LACP-LAN name=vlan-invite-200 vlan-id=200
/interface list
add name=WAN
add name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip kid-control
add fri=0s-1d mon=0s-1d name=Nolwenn rate-limit=30M sat=0s-1d sun=0s-1d thu=\
    0s-1d tue=0s-1d wed=0s-1d
add fri=0s-1d mon=0s-1d name=Autres rate-limit=30M sat=0s-1d sun=0s-1d thu=\
    0s-1d tue=0s-1d wed=0s-1d
add fri=0s-1d mon=0s-1d name=Soko rate-limit=30M sat=0s-1d sun=0s-1d thu=\
    0s-1d tue=0s-1d wed=0s-1d
add fri=0s-1d mon=0s-1d name=Phil rate-limit=30M sat=0s-1d sun=0s-1d thu=\
    0s-1d tue=0s-1d wed=0s-1d
add fri=0s-1d mon=0s-1d name=Eric rate-limit=10M sat=0s-1d sun=0s-1d thu=\
    0s-1d tue=0s-1d wed=0s-1d
add fri=0s-1d mon=0s-1d name=No-Limits rate-limit=4096M sat=0s-1d sun=0s-1d \
    thu=0s-1d tue=0s-1d tur-fri=0s-1d tur-mon=0s-1d tur-sat=0s-1d tur-sun=\
    0s-1d tur-thu=0s-1d tur-tue=0s-1d tur-wed=0s-1d wed=0s-1d
add fri=0s-1d mon=0s-1d name=Minimum rate-limit=64k sat=0s-1d sun=0s-1d thu=\
    0s-1d tue=0s-1d wed=0s-1d
add fri=0s-1d mon=0s-1d name=Logan rate-limit=30M sat=0s-1d sun=0s-1d thu=\
    0s-1d tue=0s-1d wed=0s-1d
/ip pool
add name=pool_dhcp_lan ranges=192.168.0.150-192.168.0.199
add name=pool_dhcp_invite ranges=192.168.10.51-192.168.10.100
/ip dhcp-server
add address-pool=pool_dhcp_lan disabled=no interface=vlan-LAN-100 lease-time=\
    2h name=dhcp_LAN
add address-pool=pool_dhcp_invite disabled=no interface=vlan-invite-200 \
    lease-time=2h name=dhcp_invite
/queue tree
add comment="Priorisation paquets WOW (Haute priorite)" name=WOW_queue \
    packet-mark=WOW_mark parent=global priority=1
/user group
set full policy="local,telnet,ssh,ftp,reboot,read,write,policy,test,winbox,pas\
    sword,web,sniff,sensitive,api,romon,dude,tikapp"
/interface bridge port
add interface=ether4
add interface=ether5-LACP-LAN-Slave1
add interface=ether6-LACP-LAN-Slave2
add disabled=yes interface=sfp-sfpplus1
add disabled=yes interface=sfp-sfpplus2
add interface=ether3-WAN3
/ip neighbor discovery-settings
set discover-interface-list=!dynamic
/interface list member
add comment="Sortie vers routeur Fibre sur r\E9seau 192.168.1.0/24" \
    interface=ether1-WAN1 list=WAN
add comment="Sortie vers routeur cable sur r\E9seau 192.168.5.0/24" \
    interface=ether2-WAN2 list=WAN
add comment="VLAN local-100 sur agregation LACP 802.3ad des interfaces 5, 6, 7\
    \_et 8 sur r\E9seau 192.168.0.0/24" interface=vlan-LAN-100 list=LAN
add comment="VLAN invit\E9-200 sur agregation LACP 802.3ad des interfaces 5, 6\
    , 7 et 8 sur r\E9seau 192.168.10.0/24" interface=vlan-invite-200 list=LAN
add comment="Sortie 2 vers routeur Fibre sur r\E9seau 192.168.1.0/24" \
    interface=ether3-WAN3 list=LAN
add comment="Non utilise" interface=ether4 list=LAN
/ip address
add address=192.168.5.251/24 comment="Vers router SFR numericable" interface=\
    ether2-WAN2 network=192.168.5.0
add address=192.168.1.251/24 comment="Vers router SFR box 8 entr\E9e 1" \
    interface=ether1-WAN1 network=192.168.1.0
add address=192.168.0.251/24 comment=\
    "IP interface LAN local LACP 802.3ad TRUNK VLAN 100" interface=\
    vlan-LAN-100 network=192.168.0.0
add address=192.168.10.251/24 comment=\
    "IP interface LAN invite LACP 802.3ad TRUNK VLAN 200" interface=\
    vlan-invite-200 network=192.168.10.0
add address=192.168.1.252/24 comment="Vers router SFR box 8 entr\E9e 1" \
    interface=ether3-WAN3 network=192.168.1.0
/ip arp
add address=192.168.0.49 comment="Synology Bestiole" interface=vlan-LAN-100 \
    mac-address=00:11:32:7E:3E:75
add address=192.168.0.50 comment="Imprimante Brother" interface=vlan-LAN-100 \
    mac-address=30:05:5C:CF:48:C0
add address=192.168.0.183 comment="PC Portable Nolwenn: Kibrille WIFI" \
    interface=vlan-LAN-100 mac-address=3C:A0:67:A7:AF:D1
add address=192.168.0.184 comment="PC Portable Travail Phil" interface=\
    vlan-LAN-100 mac-address=D4:81:D7:C4:3D:A4
add address=192.168.0.172 comment="Galaxy A5 Phil" interface=vlan-LAN-100 \
    mac-address=94:B1:0A:FD:69:76
add address=192.168.0.186 comment="PC Nolwenn: Dren" interface=vlan-LAN-100 \
    mac-address=18:31:BF:B1:B5:DA
add address=192.168.0.173 comment="Caldenna RT Wifi" interface=vlan-LAN-100 \
    mac-address=58:EF:68:3E:53:26
add address=192.168.0.188 comment="PC Logan: Worgounator" interface=\
    vlan-LAN-100 mac-address=18:31:BF:B1:B5:D2
add address=192.168.0.176 comment="Mi A2 Phil" interface=vlan-LAN-100 \
    mac-address=48:2C:A0:68:D8:39
add address=192.168.0.169 comment="Honor Logan" interface=vlan-LAN-100 \
    mac-address=34:79:16:1F:2B:AA
add address=192.168.0.170 comment="PC Portable Travail Phil WIFI" interface=\
    vlan-LAN-100 mac-address=14:AB:C5:9D:82:0D
add address=192.168.0.175 comment="Google Home Mini Chambre Parents" \
    interface=vlan-LAN-100 mac-address=20:DF:B9:1D:4C:E2
add address=192.168.0.177 comment="Google Home Salon" interface=vlan-LAN-100 \
    mac-address=48:D6:D5:7C:C6:36
add address=192.168.0.178 comment="Mi A2 Nolwenn" interface=vlan-LAN-100 \
    mac-address=48:2C:A0:68:F4:61
add address=192.168.0.174 comment="Mi A2 Soko" interface=vlan-LAN-100 \
    mac-address=48:2C:A0:6E:AC:DB
add address=192.168.0.182 comment=PS4 interface=vlan-LAN-100 mac-address=\
    0C:FE:45:8A:EF:E0
add address=192.168.0.180 comment="PC Phil Cygnus-X1" interface=vlan-LAN-100 \
    mac-address=00:D8:61:9E:E2:53
add address=192.168.0.171 comment="PC Phil cygnusx1-WIFI" interface=\
    vlan-LAN-100 mac-address=38:00:25:42:5D:97
add address=192.168.0.179 comment="PC Soko Nightsong" interface=vlan-LAN-100 \
    mac-address=2C:F0:5D:1F:F8:AC
add address=192.168.0.168 comment="PC Soko Nightsong WIFI" interface=\
    vlan-LAN-100 mac-address=D8:3B:BF:66:3A:D7
add address=192.168.0.167 comment="PC LAPTOP Logan" interface=vlan-LAN-100 \
    mac-address=58:96:1D:F9:E4:D0
add address=192.168.0.166 comment="TV PHILIPS Salon" interface=vlan-LAN-100 \
    mac-address=68:07:0A:2E:4D:BF
add address=192.168.0.181 comment="PC Portable Nolwenn: Kibrille filaire" \
    interface=vlan-LAN-100 mac-address=A8:1E:84:6F:0F:C9
add address=192.168.0.101 comment="VM test 1 dsync" interface=vlan-LAN-100 \
    mac-address=08:00:27:72:72:78
add address=192.168.0.163 comment="PC Portable Nolwenn ASUS" interface=\
    vlan-LAN-100 mac-address=58:96:1D:F9:74:DC
add address=192.168.0.102 comment="VM test2 dsync" interface=vlan-LAN-100 \
    mac-address=08:00:27:51:0E:26
add address=192.168.0.103 comment="VM test 3 dsync" interface=vlan-LAN-100 \
    mac-address=08:00:27:1C:12:C2
add address=192.168.0.104 comment="VM test 4 dsync" interface=vlan-LAN-100 \
    mac-address=08:00:27:0A:9D:B0
add address=192.168.0.162 comment="TV Salon WIFI" interface=vlan-LAN-100 \
    mac-address=10:63:C8:13:84:B5
add address=192.168.0.165 comment="Samsung Galaxy A31 Phil travail" \
    interface=vlan-LAN-100 mac-address=1C:E6:1D:BB:E2:75
/ip dhcp-server lease
add address=192.168.0.178 client-id=1:48:2c:a0:68:f4:61 comment=\
    "Mi A2 Nolwenn" mac-address=48:2C:A0:68:F4:61 server=dhcp_LAN
add address=192.168.0.177 comment="Google Home Salon" mac-address=\
    48:D6:D5:7C:C6:36 server=dhcp_LAN
add address=192.168.0.175 comment="Google Home Mini Chambre Parents" \
    mac-address=20:DF:B9:1D:4C:E2 server=dhcp_LAN
add address=192.168.0.176 client-id=1:48:2c:a0:68:d8:39 comment="Mi A2 Phil" \
    mac-address=48:2C:A0:68:D8:39 server=dhcp_LAN
add address=192.168.0.188 client-id=1:18:31:bf:b1:b5:d2 comment=\
    "PC Logan: Worgounator" mac-address=18:31:BF:B1:B5:D2 server=dhcp_LAN
add address=192.168.0.173 client-id=1:58:ef:68:3e:53:26 comment=\
    "Caldenna RT Wifi" mac-address=58:EF:68:3E:53:26 server=dhcp_LAN
add address=192.168.0.172 client-id=1:94:b1:a:fd:69:76 comment=\
    "Galaxy A5 Phil" mac-address=94:B1:0A:FD:69:76 server=dhcp_LAN
add address=192.168.0.169 client-id=1:34:79:16:1f:2b:aa comment="Honor Logan" \
    mac-address=34:79:16:1F:2B:AA server=dhcp_LAN
add address=192.168.0.174 client-id=1:48:2c:a0:6e:ac:db comment="Mi A2 Soko" \
    mac-address=48:2C:A0:6E:AC:DB server=dhcp_LAN
add address=192.168.0.186 client-id=1:18:31:bf:b1:b5:da comment=\
    "PC Nolwenn: Dren" mac-address=18:31:BF:B1:B5:DA server=dhcp_LAN
add address=192.168.0.50 comment="Imprimante Brother" mac-address=\
    30:05:5C:CF:48:C0 server=dhcp_LAN
add address=192.168.0.170 client-id=1:14:ab:c5:9d:82:d comment=\
    "PC Portable Travail Phil WIFI" mac-address=14:AB:C5:9D:82:0D server=\
    dhcp_LAN
add address=192.168.0.184 client-id=1:d4:81:d7:c4:3d:a4 comment=\
    "PC Portable Travail Phil" mac-address=D4:81:D7:C4:3D:A4 server=dhcp_LAN
add address=192.168.0.183 client-id=1:3c:a0:67:a7:af:d1 comment=\
    "PC Portable Nolwenn: Kibrille WIFI" mac-address=3C:A0:67:A7:AF:D1 \
    server=dhcp_LAN
add address=192.168.0.49 comment="Synology Bestiole" mac-address=\
    00:11:32:7E:3E:75 server=dhcp_LAN
add address=192.168.0.182 comment=PS4 mac-address=0C:FE:45:8A:EF:E0 server=\
    dhcp_LAN
add address=192.168.0.171 client-id=1:38:0:25:42:5d:97 comment=\
    "PC Phil cygnusX1-WIFI" mac-address=38:00:25:42:5D:97 server=dhcp_LAN
add address=192.168.0.179 client-id=1:2c:f0:5d:1f:f8:ac comment=\
    "PC Soko Nightsong" mac-address=2C:F0:5D:1F:F8:AC server=dhcp_LAN
add address=192.168.0.168 client-id=1:d8:3b:bf:66:3a:d7 comment=\
    "PC Soko Nightsong WIFI" mac-address=D8:3B:BF:66:3A:D7 server=dhcp_LAN
add address=192.168.0.167 client-id=1:58:96:1d:f9:e4:d0 comment=\
    "Laptop ASUS Logan" mac-address=58:96:1D:F9:E4:D0 server=dhcp_LAN
add address=192.168.0.166 client-id=1:68:7:a:2e:4d:bf comment=\
    "TV Philips salon" mac-address=68:07:0A:2E:4D:BF server=dhcp_LAN
add address=192.168.0.181 comment="PC portable Nolwenn Kibrille filaire" \
    mac-address=A8:1E:84:6F:0F:C9 server=dhcp_LAN
add address=192.168.0.163 client-id=1:58:96:1d:f9:74:dc comment=\
    "PC Portable Nolwenn ASUS" mac-address=58:96:1D:F9:74:DC server=dhcp_LAN
add address=192.168.0.162 comment="TV Salon WIFI Celdenn" mac-address=\
    10:63:C8:13:84:B5 server=dhcp_LAN
add address=192.168.0.165 client-id=1:1c:e6:1d:bb:e2:75 comment=\
    "Samsung Galaxy A31 Phil travail" mac-address=1C:E6:1D:BB:E2:75 server=\
    dhcp_LAN
add address=192.168.0.180 client-id=1:0:d8:61:9e:e2:53 comment=\
    "PC Phil CYGNUS-X1" mac-address=00:D8:61:9E:E2:53 server=dhcp_LAN
/ip dhcp-server network
add address=192.168.0.0/24 comment="Serveur DHCP reseau LAN 192.168.0.0/24" \
    dns-server=192.168.0.251 gateway=192.168.0.251 netmask=24 ntp-server=\
    134.214.100.6
add address=192.168.10.0/24 comment=\
    "Serveur DHCP reseau invite 192.168.10.0/24" dns-server=192.168.0.251 \
    gateway=192.168.10.251 netmask=24 ntp-server=134.214.100.6
add address=192.168.20.0/24 comment="Serveur DHCP reseau Wifi" dns-server=\
    192.168.0.251 gateway=192.168.20.251 netmask=24 ntp-server=134.214.100.6
/ip dns
set allow-remote-requests=yes servers=\
    1.1.1.1,1.0.0.1,8.8.8.8,192.168.1.1,89.2.0.1,89.2.0.2,8.8.4.4
/ip dns static
add address=192.168.0.49 name=bestiole.celdenn.local
/ip firewall address-list
add address=192.168.0.184 comment="PC Portable Travail Phil" list=WAN1-List
add address=192.168.0.186 comment="DREN PC Nolwenn" list=WAN1-List
add address=192.168.0.188 comment="WORGOUNATOR PC Logan" list=WAN1-List
add address=192.168.0.49 comment="Synology Bestiole" list=WAN2-List
add address=192.168.0.50 comment="Imprimante Brother" list=WAN2-List
add address=192.168.0.182 comment=PS4 list=WAN2-List
add address=192.168.0.179 comment="PC Soko Nightsong" list=WAN1-List
add address=192.168.0.183 comment="PC Portable Nolwenn: Kibrille WIFI" list=\
    WAN1-List
add address=192.168.0.172 comment="Galaxy A5 Phil" list=WAN2-List
add address=192.168.0.173 comment="Caldenna RT Wifi" list=WAN2-List
add address=192.168.0.176 comment="Mi A2 Phil" list=WAN2-List
add address=192.168.0.169 comment="Honor Logan" list=WAN2-List
add address=192.168.0.170 comment="PC Portable Travail Phil WIFI" list=\
    WAN1-List
add address=192.168.0.175 comment="Google Home Mini Chambre Parents" list=\
    WAN2-List
add address=192.168.0.177 comment="Google Home Salon" list=WAN2-List
add address=192.168.0.178 comment="Mi A2 Nolwenn" list=WAN2-List
add address=192.168.0.174 comment="Mi A2 Soko" list=WAN2-List
add address=192.168.0.171 comment="PC Phil cygnusx1-WIFI" list=WAN1-List
add address=192.168.0.168 comment="PC Soko Nightsong WIFI" list=WAN1-List
add address=192.168.0.167 comment="PC Portable Logan ASUS" list=WAN1-List
add address=192.168.0.166 comment="TV PHILIPS Salon" list=WAN1-List
add address=192.168.0.181 comment="PC Portable Nolwenn: Kibrille filaire" \
    list=WAN1-List
add address=192.168.0.163 comment="PC Portable Nolwenn ASUS" list=WAN1-List
add address=192.168.0.162 comment="TV Salon WIFI" list=WAN2-List
add address=192.168.0.180 comment="PC Phil cygnusX1" list=WAN1-List
/ip firewall mangle
add action=accept chain=prerouting comment="Accepter le trafic entrant" \
    dst-address=192.168.1.0/24 in-interface=all-vlan
add action=accept chain=prerouting dst-address=192.168.5.0/24 in-interface=\
    all-vlan
add action=mark-connection chain=prerouting comment=\
    "Marquer les connexions entrantes" connection-mark=no-mark in-interface=\
    ether1-WAN1 new-connection-mark=WAN1_conn passthrough=yes
add action=mark-connection chain=prerouting connection-mark=no-mark \
    in-interface=ether2-WAN2 new-connection-mark=WAN2_conn passthrough=yes
add action=mark-connection chain=prerouting connection-mark=no-mark \
    in-interface=ether3-WAN3 new-connection-mark=WAN3_conn passthrough=yes
add action=mark-connection chain=prerouting comment=\
    "Bloc port WOW et BDO sur WAN1-1 FC" connection-mark=no-mark \
    dst-address-type=!local dst-port=\
    1119-1120,3724,4000,6112-6114,8884,8888,9991-9993 in-interface=all-vlan \
    new-connection-mark=WAN1_conn passthrough=yes protocol=tcp
add action=mark-connection chain=prerouting connection-mark=no-mark \
    dst-address-type=!local dst-port=\
    1119-1120,3724,4000,6112-6114,8884,8888,9991-9993 in-interface=all-vlan \
    new-connection-mark=WAN1_conn passthrough=yes protocol=udp
add action=mark-connection chain=prerouting comment=\
    "Liste WAN1-List sur WAN1" connection-mark=no-mark dst-address-type=\
    !local in-interface=all-vlan new-connection-mark=WAN1_conn passthrough=\
    yes src-address-list=WAN1-List
add action=mark-connection chain=prerouting comment=\
    "Liste WAN2-List sur WAN2" connection-mark=no-mark dst-address-type=\
    !local in-interface=all-vlan new-connection-mark=WAN2_conn passthrough=\
    yes src-address-list=WAN2-List
add action=mark-connection chain=prerouting comment=\
    "Liste WAN3-List sur WAN3" connection-mark=no-mark dst-address-type=\
    !local in-interface=all-vlan new-connection-mark=WAN3_conn passthrough=\
    yes src-address-list=WAN3-List
add action=mark-connection chain=prerouting comment=\
    "Reseau invite sur WAN2 Cable" connection-mark=no-mark dst-address-type=\
    !local in-interface=all-vlan new-connection-mark=WAN2_conn passthrough=\
    yes src-address=192.168.10.0/24
add action=mark-connection chain=prerouting comment=\
    "Tout le reste du trafic sur WAN2" connection-mark=no-mark \
    dst-address-type=!local in-interface=all-vlan new-connection-mark=\
    WAN2_conn passthrough=yes
add action=mark-routing chain=prerouting comment=\
    "Connexion WAN1_conn vers WAN1 FC" connection-mark=WAN1_conn \
    in-interface=all-vlan new-routing-mark=to_WAN1 passthrough=yes
add action=mark-routing chain=prerouting comment=\
    "Connexion WAN2_conn vers WAN2 cable" connection-mark=WAN2_conn \
    dst-address-type="" in-interface=all-vlan new-routing-mark=to_WAN2 \
    passthrough=yes
add action=mark-routing chain=prerouting comment=\
    "Connexion WAN3_conn vers WAN3 FC" connection-mark=WAN3_conn \
    in-interface=all-vlan new-routing-mark=to_WAN3 passthrough=yes
add action=mark-routing chain=output comment=\
    "Connexion WAN1_conn vers WAN1 FC" connection-mark=WAN1_conn \
    new-routing-mark=to_WAN1 passthrough=yes
add action=mark-routing chain=output comment=\
    "Connexion WAN2_conn vers WAN2 cable" connection-mark=WAN2_conn \
    new-routing-mark=to_WAN2 passthrough=yes
add action=mark-routing chain=output comment=\
    "Connexion WAN3_conn vers WAN3 fibre" connection-mark=WAN3_conn \
    new-routing-mark=to_WAN3 passthrough=yes
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1-WAN1
add action=masquerade chain=srcnat out-interface=ether2-WAN2
add action=masquerade chain=srcnat out-interface=ether3-WAN3
/ip kid-control device
add mac-address=3C:A0:67:A7:AF:D1 name=Kibrille-Wifi user=Nolwenn
add mac-address=58:EF:68:3E:53:26 name=Caldenna user=Autres
add mac-address=18:31:BF:B1:B5:D2 name=Worgounator user=Logan
add mac-address=34:79:16:1F:2B:AA name=Honor user=Logan
add mac-address=48:2C:A0:68:F4:61 name=Mi-A2-Nolwenn user=Nolwenn
add mac-address=48:2C:A0:6E:AC:DB name=Mi-A2-Soko user=Soko
add mac-address=48:D6:D5:7C:C6:36 name=Google-Home user=Autres
add mac-address=20:DF:B9:1D:4C:E2 name=Google-Home-Mini user=Autres
add mac-address=30:05:5C:CF:48:C0 name=Imp-Brother user=Autres
add mac-address=94:B1:0A:FD:69:76 name=Galaxy-A5 user=Phil
add mac-address=48:2C:A0:68:D8:39 name=Mi-A2-Phil user=Phil
add mac-address=00:11:32:7E:3E:75 name=Synology-Bestiole user=Autres
add mac-address=D4:81:D7:C4:3D:A4 name=MORLK756 user=Phil
add mac-address=14:AB:C5:9D:82:0D name=MORLK756-Wifi user=Phil
add mac-address=0C:FE:45:8A:EF:E0 name=PS4 user=Autres
add mac-address=30:07:4D:40:17:16 name="GSM Eric" user=Eric
add mac-address=D8:3B:BF:66:3A:D7 name=Nightsong-Wifi user=Soko
add mac-address=38:00:25:42:5D:97 name=CygnusX1-Wifi user=No-Limits
add mac-address=A8:1E:84:6F:0F:C9 name=kibrille-filaire user=Nolwenn
add mac-address=00:D8:61:9E:E2:53 name=Cygnus-X1 user=No-Limits
add mac-address=2C:F0:5D:1F:F8:AC name=Nightsong user=Soko
add mac-address=58:96:1D:F9:E4:D0 name="Laptop Asus Logan" user=Logan
add mac-address=68:07:0A:2E:4D:BF name="TV Philips Salon" user=Autres
add mac-address=58:96:1D:F9:74:DC name="Laptop ASUS Nolwenn" user=Nolwenn
add mac-address=18:31:BF:B1:B5:DA name=Dren user=Nolwenn
add mac-address=1C:E6:1D:BB:E2:75 name="Samsung Galaxy A31 Phil" user=Phil
/ip route
add check-gateway=ping distance=1 gateway=192.168.1.1 pref-src=192.168.1.251 \
    routing-mark=to_WAN1
add check-gateway=ping distance=1 gateway=192.168.5.1 routing-mark=to_WAN2
add distance=1 gateway=192.168.1.1 pref-src=192.168.1.252 routing-mark=\
    to_WAN3
add check-gateway=ping distance=1 gateway=192.168.1.1
add distance=1 gateway=192.168.5.1
/ip traffic-flow
set interfaces=ether1-WAN1
/lcd
set color-scheme=dark time-interval=hour
/lcd pin
set pin-number=1976
/system clock
set time-zone-name=Europe/Paris
/system console
set [ find ] disabled=yes
/system leds
set 1 disabled=yes
set 2 disabled=yes
set 3 disabled=yes
set 4 disabled=yes
/system note
set note="Bienvenue sur le r\E9seau Celdenn"
/system ntp client
set enabled=yes primary-ntp=134.214.100.6
 
ykleet
newbie
Posts: 29
Joined: Thu Oct 17, 2019 11:29 am

Re: Load balancing between 2 wan on same network

Sat Mar 27, 2021 7:32 pm

How abt per connection classifier?
 
pe1chl
Forum Guru
Forum Guru
Posts: 10195
Joined: Mon Jun 08, 2015 12:09 pm

Re: Load balancing between 2 wan on same network

Sat Mar 27, 2021 7:57 pm

Yes the standard load balancing/failover config shown on the forum should work.
It would be best to reset to defaults, make that work first, and then add all the other crud.
As it is now, it is too difficult to follow for casual readers on the forum to help.
 
DarkNate
Forum Veteran
Forum Veteran
Posts: 999
Joined: Fri Jun 26, 2020 4:37 pm

Re: Load balancing between 2 wan on same network

Tue Mar 30, 2021 7:32 am

Based on that diagram, I fail to understand why are you putting yourself in a double NAT situation instead of bridging the ONT device and the DSL modem to ensure the MikroTik has full control over the WAN interface?

Who is online

Users browsing this forum: mtkvvv and 49 guests