3 vlans and 3 wans how to?

Hi,

I have a RB-751G with 3 VLANS (ID 1, 10 and 20).
I allso have 3 WAN addresses
I likt tahat each VLAN can go to his gateway to internet.

VLAN 1 IP 192.9.201.1/24 (gateway 192.9.201.254)
VLAN 10 IP 192.9.210/24 (Gateway 192.9.210.254)
VLAN 20 IP 192.9.220/24 (Gateway 192.9.220.254)

How ot configure this?

You could use mangle to mark routing on external traffic from those VLANs then have corresponding routing table entries specifying the gateway to be used by each routing mark.

Thanks for the quick repley.
I'm quit new at mikrotik and it's OS.
So how to do this?

This is my config

Set system identity

/system identity set name=mt-sw01

Add bridges

/interface bridge add name=BR-LAN disabled=no
/interface bridge add name=BR-GAST disabled=no
/interface bridge add name=BR-MOBILE disabled=no
/interface bridge add name=BR-TRUNK disabled=no

add vlan's

/interface vlan add name=VLAN-TNW.LOCAL vlan-id=1 interface=BR-TRUNK disabled=no
/interface vlan add name=VLAN-GAST vlan-id=10 interface=BR-TRUNK disabled=no
/interface vlan add name=VLAN-MOBILE vlan-id=20 interface=BR-TRUNK disabled=no

Turn on WLAN

/interface wireless enable wlan1

Hide SSID wlan1 (mikrotik)

/interface wireless set wlan1 hide-ssid=yes

Set wireless mode

/interface wireless set mode=ap-bridge wlan1 band=2ghz-b/g/n ht-txchains=0,1 ht-rxchains=0,1

Add a security profile

/interface wireless security-profile add name=TNW.LOCAL authentication-type=wpa2-psk unicast-ciphers=aes-ccm group-ciphers=aes-ccm wpa2-pre-shared-key="TNW.LOCAL_Wireless_Access" mode=dynamic-keys
/interface wireless security-profile add name=GAST authentication-type=wpa2-psk unicast-ciphers=aes-ccm group-ciphers=aes-ccm wpa2-pre-shared-key="GASTaccess" mode=dynamic-keys
/interface wireless security-profile add name=MOBILE authentication-type=wpa2-psk unicast-ciphers=aes-ccm group-ciphers=aes-ccm wpa2-pre-shared-key="MOBILE_Access_4y" mode=dynamic-keys

Set wireless channel

/interface wireless set wlan1 channel-width=20/40mhz-ht-above

Set wirless protocol

/interface wireless set wlan1 wireless-protocol=any

Add virtual-ap

/interface wireless add master-interface=wlan1 ssid=TNW.LOCAL security-profile=TNW.LOCAL name=VAP-TNW.LOCAL disabled=no
/interface wireless add master-interface=wlan1 ssid=GAST security-profile=GAST name=VAP-GAST disabled=no
/interface wireless add master-interface=wlan1 ssid=MOBILE security-profile=MOBILE name=VAP-MOBILE disabled=no

Add ports to Bridge

Bridge BR-LAN

/interface bridge port add interface=ether2 bridge=BR-LAN disabled=no
/interface bridge port add interface=ether4 bridge=BR-LAN disabled=no
/interface bridge port add interface=VAP-TNW.LOCAL bridge=BR-LAN disabled=no
/interface bridge port add interface=VLAN-TNW.LOCAL bridge=BR-LAN disabled=no

BR-GAST

/interface bridge port add interface=VLAN-GAST bridge=BR-GAST disabled=no
/interface bridge port add interface=VAP-GAST bridge=BR-GAST disabled=no

BR-MOBILE

/interface bridge port add interface=VLAN-MOBILE bridge=BR-MOBILE disabled=no
/interface bridge port add interface=VAP-MOBILE bridge=BR-MOBILE disabled=no

BR-TRUNK

/interface bridge port add interface=ether1 bridge=BR-TRUNK disabled=no
/interface bridge port add interface=ether3 bridge=BR-TRUNK disabled=no
/interface bridge port add interface=ether5 bridge=BR-TRUNK disabled=no

IP toewijzen aan BR-LAN

/ip address add address=192.9.201.243/24 interface=BR-LAN

IP toewijzen aan BR-GAST

/ip address add address=192.9.210.1/24 interface=BR-GAST

IP toewijzen aan BR-MOBILE

/ip address add address=192.9.220.1/24 interface=BR-MOBILE

Set Ether speed 1GB/s

/interface ethernet set ether1 speed=1Gbps
/interface ethernet set ether2 speed=1Gbps
/interface ethernet set ether3 speed=1Gbps
/interface ethernet set ether4 speed=1Gbps
/interface ethernet set ether5 speed=1Gbps

Enable firewall between bridges

#/ip firewall address-list add list=local-networks address=192.9.201.0/24 disabled=no
#/ip firewall address-list add list=local-networks address=192.9.202.0/24 disabled=no
#/ip firewall address-list add list=local-networks address=192.9.203.0/24 disabled=no
#/ip firewall filter add chain=forward src-address-list=local-networks dst-address-list=local-networks action=drop

Add default Gateway

/ip route add gateway=192.9.201.254

Add NAT

#/ip firewall nat add chain=srcnat action=masquerade out-interface=ether1

Add NTP server

/system ntp client set primary-ntp=192.9.201.5 mode=unicast enabled=yes

Enable Graphs

/tool graphing interface add interface=BR-LAN
/tool graphing interface add interface=BR-GAST
/tool graphing interface add interface=BR-MOBILE
/tool graphing interface add interface=BR-TRUNK