Load balancing with VLAN enable

Guys,

I have miktrotik router and working fine and use in my load balancing. i’m planning to add another line with 10 MB down and 10 UP called ISP4. (see image below).

my question is, can we enable VLAN in my load balancing router / setup while the router provide load balancing for my client. ISP1, SIP2, and ISP3 will be use for residential customer and ISP4 will be use for business customer so i was thinking if this scenario is possible. or if you have suggestion please let me know.

Thanks
vlan.jpg

yes, you can. VLAN interfaces just like wired interface from view of firewalling.

thanks and i forgot to mention. No VLAN in ISP1, ISP2 and ISP3 only ISP4 will have VLAN enable. so all ISP1, ISP2 and ISP3 is my default gateway for my residential customer.

Thanks

Guys,

I’m trying to setup VLAN as show in the picture but i’m not sure if VLAN is working because there is no TX/RX traffic in miktrotik router for VLAN interface. VLAN ID for WAN1 is 100 and VLAN ID for WAN2 is 101.

what is wrong with this setup.

Router config:
/ip address
add address=192.168.88.10/24 interface=WAN1
add address=10.10.10.56/24 interface=WAN2
add address=192.168.21.1/24 interface=Local

/ip dns
set allow-remote-requests=yes cache-size=5000KiB max-udp-packet-size=2048 servers=8.8.8.8,8.8.4.4

/ 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 action=mark-routing chain=output connection-mark=WAN1_conn new-routing-mark=to_WAN1
add action=mark-routing chain=output connection-mark=WAN2_conn new-routing-mark=to_WAN2

add chain=prerouting dst-address=192.168.88.0/24 in-interface=Local
add chain=prerouting dst-address=10.10.10.0/24 in-interface=Local


add action=mark-connection chain=prerouting dst-address-type=!local in-interface=Local new-connection-mark=WAN1_conn per-connection-classifier=both-addresses-and-ports:3/0
add action=mark-connection chain=prerouting dst-address-type=!local in-interface=Local new-connection-mark=WAN2_conn per-connection-classifier=both-addresses-and-ports:3/1

add action=mark-routing chain=prerouting connection-mark=WAN1_conn in-interface=Local new-routing-mark=to_WAN1
add action=mark-routing chain=prerouting connection-mark=WAN2_conn in-interface=Local new-routing-mark=to_WAN2

/ip firewall nat
add action=masquerade chain=srcnat out-interface=WAN1
add action=masquerade chain=srcnat out-interface=WAN2


/ip route
add check-gateway=ping distance=1 gateway=192.168.88.1 routing-mark=to_WAN1
add check-gateway=ping distance=1 gateway=10.10.10.254 routing-mark=to_WAN2

add check-gateway=ping distance=1 gateway=192.168.88.1
add check-gateway=ping distance=2 gateway=10.10.10.254
VLAN.JPG

Nanflexal:

Since IP addresses are assigned to WAN interface (physical interface) and not to VLAN, why do you expect so see any traffic on VLAN ?

Hello,

i’m not sure if VLAN is working because i didn’t see TX and RX traffic on VLAN.

WAN1 VLAN ID is 100 and WAN2 VLAN ID is 101, I just want to know if my VLAN is working because even without VLAN tag in CPE radio both WAN serve traffic to my request.

what i what t do is, if no VLAN ID / VLAN TAG use in Loco M2, my desktop will have no internet access but even without VLAN i still have internet access and this is my problem so i was trying to figure out how to do this.

Example:

WAN1 & WAN2, VLAN ID 2 - VIP
WAN3 & WAN4 VLAN ID 4 - for Businesses
WAN5 & WAN6 NO VLAN - for Residential

I need this setup because i have limited bandwidth. please help guys. this is my first VLAN in miktrotik. if you have other way to accomplish this scenario please advice


Thanks in advance

Please describe which IP address bound to what interfaces. Than double check it yourself before bumping on submit. Maybe you found that NO address bound to any VLAN interface.

thank you for your reply.

here is the interface and IP for WAN. I just need to figure out if VLAN in my 6 WAN link can be use in this scenario.


/ip address
add address=192.168.1.10/24 interface=WAN1
add address=192.168.2.10/24 interface=WAN2
add address=192.168.3.10/24 interface=WAN3
add address=192.168.4.10/24 interface=WAN4
add address=192.168.5.10/24 interface=WAN5
add address=192.168.6.10/24 interface=WAN6
add address=10.10.10.254/24 interface=Local

WAN1 & WAN2, VLAN ID 2 - VIP
WAN3 & WAN4 VLAN ID 4 - for Businesses
WAN5 & WAN6 NO VLAN - for Residential

is this possible?

I’m not creating VLAN for LAN. I’m asking if VLAN in WAN interface is possible, if yes, how can we achieve this.

Regards,
Alex