Page 1 of 1

Assign ethernet port to existing VLAN

Posted: Thu Feb 22, 2024 5:52 pm
by davidreaton
Currently I have several VLAns configured on my RB4011, and they work perfectly. My IOT network is on VLAN 30. Downstream I have a CSS326 switch. My IOT home assistant is on a Raspberry Pi plugged into port 23 on the CSS switch. I assigned port 23 to VLAN 30 under the VLAN tab (see attachment), and I can access the Home assistant R Pi properly. This is the only change I made to the switch.

I've just been given an CRS125, and I want to do the same thing in RouterOS - simply assign port 23 to VLAN 30. Looking at the tutorials and videos, I (a) changed port 23 PVID to 30, and b) set the Bridge to do VLAN filtering. No combination of a or b things allows access to my IOT controller on port 23. I'm missing something simple, I guess. CRS config attached.

Help, as always, is appreciated.

Regards,
Dave

Re: Assign ethernet port to existing VLAN

Posted: Fri Feb 23, 2024 6:00 am
by gigabyte091
What port is your trunk ? I can't see any trunk ports that would carry your VLANs from RB4011.

Study this on how to configure VLANs on CRS1xx series of switches:

https://help.mikrotik.com/docs/pages/vi ... 03841835

Re: Assign ethernet port to existing VLAN

Posted: Fri Feb 23, 2024 8:11 am
by holvoetn
SWOS-question, so moved there.

Set port 23 to Optional, only untagged and VLAN ID 30.

BUT ... as @gigabyte091 already points out, where is the feeding trunk port ? (Strict, only tagged, base PVID leave to 1. You also need to correctly define it in VLANs tab, the one to the right of the screen you showed.)

Re: Assign ethernet port to existing VLAN

Posted: Sat Feb 24, 2024 11:03 am
by gigabyte091
@holvoetn, but OP said that he was given CRS125 and want to configure it in ROS not SWOS.

Re: Assign ethernet port to existing VLAN

Posted: Sat Feb 24, 2024 11:10 am
by holvoetn
Then why did he post screenshot from swos ??

Re: Assign ethernet port to existing VLAN

Posted: Sat Feb 24, 2024 1:55 pm
by gigabyte091
He wants to recreate configuration from CSS326 on his new CRS125 and ROS. So i believe screenshot is here just as an information on how CSS is configured.

Re: Assign ethernet port to existing VLAN

Posted: Sat Feb 24, 2024 1:57 pm
by holvoetn
Configured wrong too then ...

I'll move it back if needed once we get more info.

Re: Assign ethernet port to existing VLAN

Posted: Sun Feb 25, 2024 1:40 am
by davidreaton
Thanks for your suggestions and comments. I posted the SWOS config to show how easy it was to do in SWOS. In ROS, much less straightforward. I'll study the ROS VLAN topics. I don't want to create VLANS on the CRS125, just get a specific port to join an existing VLAN. I'll continue to try to figure this out. Thanks again to all.

Re: Assign ethernet port to existing VLAN

Posted: Sun Feb 25, 2024 7:26 am
by gigabyte091
What port will be used as your trunk from RB4011 ? What VLAN would you like to use as your management ?

Re: Assign ethernet port to existing VLAN

Posted: Tue Feb 27, 2024 7:54 pm
by davidreaton
Working now. Here's my update:

1) I studied the link provided by gigabyte091. This was helpful and led to 'port based VLAN on CRS125 examples'
https://wiki.mikrotik.com/wiki/Manual:C ... Based_VLAN

2) The information here has to be entered from the command line. You cannot access ethernet / switch / ingress-vlan-translation from WinBox.

3) This all worked, and I could access the device VLAN30 device plugged into this router port.

3) If you enter the last step 'unknown/invalid VLAN filtering', You lose access to the trunk port (ether2 in the example). This was a clearly a stupid moment for me, and won't be my last!

Thanks to all for your help! After this, I went back to the CSS326 to understand better what I did there. I found a port based VLAN example in the WiKi.
https://wiki.mikrotik.com/wiki/SWOS/CSS326-VLAN-Example

Here's what I found:

1) Initially, starting with all switch defaults, and working at the VLAN tab, I set the default to VLAN 30. That's all I did and it did work. I could access the device on VLAN30.

2) following steps 2 and 3 in the example, I populated the VLAN table, and set the VLAN mode as instructed. This did not work. Couldn't access the device on VLAN 30.

3) I tried just using step 2, identifying the VLAN memberships for the VLAN and trunk port. This did not work.

There's likely more to switch OS that I need to study, But frankly, now that I can do port based VLAN in RouterOS, I think I'm done. I'll sell the CSS326 on eBay.

Thanks for all the help, and minimal snarkiness.

Regards,
Dave

Re: Assign ethernet port to existing VLAN

Posted: Tue Feb 27, 2024 8:44 pm
by gigabyte091
Don't ditch swOS, it's working really well and setting up VLANs is for eg much more easier on swOS than on RouterOS.

Re: Assign ethernet port to existing VLAN

Posted: Tue Feb 27, 2024 9:28 pm
by davidreaton
I'll second that comment. It IS easier on SWOS.