Creating Guest Network using VLAN Mikrotik

To create a separate guest wifi network in your Mikrotik Router using VLAN, use the following method:

#Create the VLAN bridge

/interface bridge
add name=bridge-guest

/interface wireless security-profiles
add authentication-types=wpa-psk,wpa2-psk eap-methods="" \
management-protection=allowed mode=dynamic-keys name=guest \
supplicant-identity="" wpa-pre-shared-key=passwd wpa2-pre-shared-key=passwd

#Add Setup Virtual AP on the wireless interface

/interface wireless
set [ find default-name=wlan1 ] antenna-gain=0 band=2ghz-b/g/n channel-width=\
20/40mhz-Ce country=australia disabled=no distance=indoors frequency=auto \
frequency-mode=manual-txpower mode=ap-bridge security-profile=profile1 ssid=\
HOME-NETWORK wireless-protocol=802.11
add disabled=no keepalive-frames=disabled \
master-interface=wlan1 multicast-buffering=disabled name=guest-wifi \
security-profile=guest ssid=Guests vlan-id=100 vlan-mode=use-tag \
wds-cost-range=0 wds-default-cost=0 wps-mode=disabled

#Create VLan Interface

/interface vlan
add interface=guest-wifi name=vlan100 vlan-id=100

#Add Interfaces to the bridge, ie VLAN and Virtual AP

/interface bridge port
add bridge=bridge-guest interface=guest-wifi
add bridge=bridge-guest interface=vlan100


#IP addressing

/ip address
add address=10.10.10.1/24 interface=bridge-guest network=10.10.10.0

/ip pool
add name=dhcp_pool4 ranges=10.10.10.20-10.10.10.254
/ip dhcp-server
add address-pool=dhcp_pool4 disabled=no interface=bridge-guest name=guest-dhcp

/ip dhcp-server network
add address=10.10.10.0/24 dns-server=1.1.1.1 gateway=10.10.10.1