Community discussions

MikroTik App
 
incagarcilaso
newbie
Topic Author
Posts: 38
Joined: Sun Dec 06, 2020 6:43 pm

Changing port vlan config

Sun Jan 24, 2021 7:12 pm

Hello.
I have found information on initial configurations using command line but not much on making changes on switches.
I need to change the configuration of an sfp port on a CRS326-24G-2S+ and would like to do this via the command line.
It is currently set up as a trunk port in a multiple VLAN configuration. I now need it as an access port for a single VLAN, since it is now connected to a server with a new 10G network card.
I can't work out the syntax to do this. Do I need to completely remove it from the bridge and start from scratch or can I use the "set" command to reconfigure it?
Below is the current VLAN config. I need to repurpose "sfp1" as an access port on VLAN 1015 and leave "sfp2" as the trunk port.
==============
interface bridge vlan print detail
Flags: X - disabled, D - dynamic
0 bridge=BR1 vlan-ids=22 tagged=sfp1,sfp2 untagged=ether2 current-tagged=sfp2 current-untagged=""

1 bridge=BR1 vlan-ids=1005 tagged=sfp1,sfp2 untagged=ether3,ether4,ether5,ether6,ether7,ether8 current-tagged=sfp2
current-untagged=ether3,ether4

2 bridge=BR1 vlan-ids=1030 tagged=sfp1,sfp2 untagged=ether9,ether10,ether11,ether12 current-tagged=sfp2
current-untagged=ether10,ether12

3 bridge=BR1 vlan-ids=1006 tagged=sfp1,sfp2 untagged=ether13,ether14,ether15,ether16,ether17,ether18 current-tagged=sfp2
current-untagged=ether14,ether18,ether13,ether16

4 bridge=BR1 vlan-ids=1015 tagged=BR1,sfp1,sfp2 untagged=ether19,ether20,ether21,ether22 current-tagged=BR1,sfp2,sfp1
current-untagged=""

5 D bridge=BR1 vlan-ids=1 tagged="" untagged="" current-tagged="" current-untagged=BR1
===========
I have tried to work out the syntax but cannot get it to work.
Thanks.
 
User avatar
StubArea51
Trainer
Trainer
Posts: 1739
Joined: Fri Aug 10, 2012 6:46 am
Location: stubarea51.net
Contact:

Re: Changing port vlan config

Sun Jan 24, 2021 7:22 pm

You don't need to remove it from the bridge, it can be set and changed. However, if spanning tree is running on the bridge and this is a prod network, be mindful of changes that can cause the STP topology to reconverge.
 
incagarcilaso
newbie
Topic Author
Posts: 38
Joined: Sun Dec 06, 2020 6:43 pm

Re: Changing port vlan config

Sun Jan 24, 2021 8:02 pm

You don't need to remove it from the bridge, it can be set and changed. However, if spanning tree is running on the bridge and this is a prod network, be mindful of changes that can cause the STP topology to reconverge.
Thanks for the reply. Yes it is a production environment. Good to know about RSTP.
I was looking for clues as to the exact syntax because when I try "/interface bridge vlan set vlan-ids=1015 [find interface=sfp1]" as a starting point I get no joy. As you can see from the printout it is currently set up as a trunk port with ingress filtering for tagged only and a member of all vlans. I need to change it to an untagged member of 1015 only.
Can anyone help with the exact syntax?
Do I need to re-write the whole VLAN table like this (removing sfp1 as tagged on all VLANS and making it an untagged member of 1005):
"/interface bridge vlan
set bridge=BR1 tagged=sfp2 untagged=ether2 vlan-ids=22
set bridge=BR1 tagged=sfp2 untagged=\
ether3,ether4,ether5,ether6,ether7,ether8,sfp1 vlan-ids=1005
set bridge=BR1 tagged=sfp2 untagged=\
ether9,ether10,ether11,ether12 vlan-ids=1030
set bridge=BR1 tagged=sfp2 untagged=\
ether13,ether14,ether15,ether16,ether17,ether18 vlan-ids=1006
set bridge=BR1 tagged=BR1,sfp2 untagged=\
ether19,ether20,ether21,ether22 vlan-ids=1015"
And then set sfp1 port as an access port:
"/interface bridge port
set bridge=BR1 frame-types=admit-only-untagged-and-priority-tagged \
ingress-filtering=yes interface=sfp1 pvid=1005"
Any help would be appreciated.
 
incagarcilaso
newbie
Topic Author
Posts: 38
Joined: Sun Dec 06, 2020 6:43 pm

Re: Changing port vlan config

Wed Jan 27, 2021 10:23 am

Can anyone help with this?
 
Zwe
just joined
Posts: 13
Joined: Thu Jan 11, 2018 11:19 am
Location: Myanmar,Mandalay
Contact:

Re: Changing port vlan config

Thu Jan 28, 2021 7:40 am

Hay i think you need to run ether channel and rstp first.
and there is my vlan config currently running in site.
Port base vlan in bridge.

/interface bridge
add name=Bridge vlan-filtering=yes
/interface ethernet
set [ find default-name=ether24 ] mac-address=CC:2D:E0:8F:EF:AC
/interface bonding
add mode=802.3ad name="EtherChannel Trunk" slaves=ether23,ether24 \
transmit-hash-policy=layer-2-and-3
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/interface bridge port
add bridge=Bridge interface=ether2 pvid=10
add bridge=Bridge interface="EtherChannel Trunk"
add bridge=Bridge interface=all
/interface bridge vlan
add bridge=Bridge tagged="EtherChannel Trunk" untagged=\
ether1,ether2,ether3,ether4,ether5,ether6,ether7,ether8 vlan-ids=10
add bridge=Bridge tagged="EtherChannel Trunk" untagged=\
ether9,ether10,ether11,ether12 vlan-ids=20
add bridge=Bridge tagged="EtherChannel Trunk" untagged=\
ether13,ether14,ether15,ether16 vlan-ids=30
add bridge=Bridge tagged="EtherChannel Trunk" untagged=\
ether17,ether18,ether19,ether20 vlan-ids=40
add bridge=Bridge tagged="EtherChannel Trunk" untagged=ether21,ether22 \
vlan-ids=50

Who is online

Users browsing this forum: No registered users and 124 guests