Multiple ports in a VLAN

HI all,

I am trying to learn how to configure Mikrotik router using GNS3. Trying to do a simple configuration here. I would like to configure the router as described below.

  • ether2 will be for trunk port (uplink to another router)
  • ether3 - VLAN30
  • ether4 - VLAN40

So here is print out configuration below.

/interface bridge
add name=bridge1
/interface vlan
add interface=ether2 name=vlan30 vlan-id=30
add interface=ether2 name=vlan40 vlan-id=40
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/interface bridge port
add bridge=bridge1 interface=ether2
add bridge=bridge1 interface=ether3
add bridge=bridge1 interface=ether4
/ip dhcp-client
add disabled=no interface=ether1

I tried to add these commands below, they did not work.

[admin@MikroTik] /interface vlan> add interface=ether3 name-vlan30 vlan-id=30
expected end of command (line 1 column 22)
[admin@MikroTik] /interface vlan> add interface=ether4 name=vlan40 vlan-id=40
failure: already have interface with such name

Can a VLAN have multiple ports?
If it can, what is the correct command to do it?


Thanks in advance for your help.

In the following, you’ve put “name-vlan30”, it should be “name=vlan30”. The terminal will make you aware of syntax errors as you enter commands, please pay attention to these. You can learn more here: https://help.mikrotik.com/docs/display/ROS/Command+Line+Interface


[admin@MikroTik] /interface vlan> add interface=ether3 name-vlan30 vlan-id=30
expected end of command (line 1 column 22)
[admin@MikroTik] /interface vlan> add interface=ether4 name=vlan40 vlan-id=40
failure: already have interface with such name

Regarding the second failure, the terminal is informing you that you have already created an interface called “vlan40”.

And the reason is that VLAN port membership is configured in a very different way. I suggest you to go through this very fine tutorial, it explains how to deal with VLANs in ROS.

Once you have hoisted in MKS, most excellent reference, and still have unresolved issues
Post entire config
/export hide-sensitive file=anynameyouwant