Tuesday, September 1, 2020

Mikrotik Vlan Configuration Step by Step

In this tutorial, we are going to discuss about “Vlan Configuration” on Mikrotik router. And then we will discuss, how to route traffic between those vlans or inter-vlan routing. Here, we will create Vlan-100 and Vlan-200 to work with this lab. Let's start:-

First we will create a separate bridge interface for each vlan.  And then, we will associate one physical interface with those bridge interface as a bridge port so that, those physical interface can act as a default gateway for that vlan.

Go to “Bridge” menu and create two bridge interface. Here, we are creating two bridge interface because our vlan quantity is two. One bridge interface is for vlan-100 and another one is for vlan-200.


Here, we have named the bridge interface as like as our vlan number. This is completely optional. Anything you can be named.


After creating the interface, this will be look liked:-


Now we will associate one physical interface with each of those bridge interface. If you have required, you can associate one or more physical interface with one bridge interface. Then, these physical interface will be called “Bridge Port”.

To associate bridge port, go to “ports” tab and click add (+) sign.


In this lesson, we will going to associate "ether-8" with Bridge_Vlan-100 and "ether-9" with Bridge_Vlan-200. After creating the vlan-id 100 and vlan-id 200 and assigning them those bridge interface (Bridge_Vlan-100 and Bridge_Vlan-200) respectively, then all hosts connected to "ether-8" will be considered as vlan-100 member and all hosts connected to "ether-9" will be considered as vlan-200 members.


After completing the task, this will be look like:-


Now, we have to create the vlan interface or vlan-id. To create vlan, go to “Interface” menu and select “VLAN” tab. Click “add” or (+) sign.


Now, write your vlan name, ID and select your parent interface. This vlan ID will be assigned with that parent interface. Means, that interface will be treated under this vlan. In our case, the parent interface will be “Bridge_Vlan-100” for vlan-100 and and interface “Bridge_vlan-200” for vlan-200. Just like the below:-


Vlan name is optional. It can be anything. No need to match with vlan-id. For Vlan-200, this will be:-


 After completing the task, this will be as like:-


From now on, all hosts connected to “ether-8” under the vlan-100 and all hosts connected to “ether-9”, under the vlan-200.

Now we have to configure the IP address for the default gateway for those vlan members. Otherwise, the member of the vlan-100 can’t communicate with the member of the vlan-200. We will have to assign IP addresses to our bridge interfaces. Our bridge interfaces will perform inter-vlan routing process. In this lesson, we are going to use “192.168.1.1/24” as our interface “Bridge_vlan-100” address and “172.16.1.1/24” as our interface “Bridge_Vlan-200” address. Here the IP address “192.168.1.1” perform as a default gateway for vlan-100 members and the IP address “172.16.1.1” perform as a default gateway for vlan-200 members. 

To assign IP addresses, we will go to “IP” section from menu and then we will select “address” section from sub-menu. The IP address for the interface Bridge_Vlan-100 is:-
 


And for the interface “Bridge_Vlan-200” is:-


Everything is done. Now assign the default gateway address to all vlan members.  Configure your all hosts computer for the default gateway as their gateway address. The both vlan can communicate with each others. 

No comments:

Post a Comment