MikroTik Router Board & Cisco 3560 – VLAN Configuration

MikroTik RB2011UiAS-2HnD-IN

Quick post as i have seen questions asked on the Mikrotik forums on this subject before.

The aim was to segregate devices on my LAN. This would confine the number of broadcast domains on my network and would allow me to better administrate my home network as predominantly all devices have been on the network.

My home network was broken into smaller LAN segments.


In this scenarios my Mikrotik Routerboard is acting as a PPPoE server as well as a DHCP server currently only issuing ip addresses in the range. Creating VLANs will enable us to isolate different networks by breaking them into smaller segments, each segment will belong to a different ip range issued from the DHCP server running on the MikroTik.

In this example following ports are used for

  • Mikrotik = eth8 = TRUNK PORT to CISCO 3560

Create VLAN interfaces

/interface vlan
add interface=LAN l2mtu=1594 name=VLAN_Lab vlan-id=2
add interface=LAN l2mtu=1594 name=VLAN_Homeautomation vlan-id=3

Assign IP addresses to VLAN interfaces

/ip address
add address= interface=VLAN_Lab network=
add address= interface=VLAN_Homeautomation network=

Create DCHP pool and associate with created VLAN interfaces

/ip dhcp-server
add address-pool=VLAN_lab-POOL disabled=no interface=VLAN_Lab lease-time=2h name=dhcp_lab
add address-pool=VLAN_homeautomation disabled=no interface=VLAN_Homeautomation lease-time=2h name=dhcp_homeautomation

Create DCHP pool and Gateways

/ip dhcp-server network
add address= dns-server= gateway=
add address= dns-server= gateway=

CISCO 3560 Configuration

Image result for cisco 3560

I have eth8 connected to fa0/1 on my cisco switch we need to configure a trunk on the switch.

Creating Trunk From Switch To Router

config t

interface fa0/1
description Trunk-to-Router
switchport trunk encapsulation dot1q
switchport mode trunk
spanning-tree portfast trunk

Create VLANS

vlan 2
name Home_Automation
vlan 3
name Lab_Devices

Assign switch ports to created VLANS

interface fa0/24
switchport mode access
switchport access vlan 2

interface fa0/12
switchport mode access
switchport access vlan 3

Ports can be extended in this example one port has been configured for each vlan

Save the configuration using Copy running-config startup-config


If you plug a device into fa0/12 an address in the range will be issued via the dhcp server, as seen below with my raspberry pi docker stack.

Leave a Reply

Your email address will not be published. Required fields are marked *