Community discussions

MikroTik App
 
davidreaton
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Thu Oct 02, 2014 12:21 am

Assign ethernet port to existing VLAN

Thu Feb 22, 2024 5:52 pm

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
You do not have the required permissions to view the files attached to this post.
 
gigabyte091
Forum Guru
Forum Guru
Posts: 1191
Joined: Fri Dec 31, 2021 11:44 am
Location: Croatia

Re: Assign ethernet port to existing VLAN

Fri Feb 23, 2024 6:00 am

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
 
holvoetn
Forum Guru
Forum Guru
Posts: 5474
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: Assign ethernet port to existing VLAN

Fri Feb 23, 2024 8:11 am

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.)
 
gigabyte091
Forum Guru
Forum Guru
Posts: 1191
Joined: Fri Dec 31, 2021 11:44 am
Location: Croatia

Re: Assign ethernet port to existing VLAN

Sat Feb 24, 2024 11:03 am

@holvoetn, but OP said that he was given CRS125 and want to configure it in ROS not SWOS.
 
holvoetn
Forum Guru
Forum Guru
Posts: 5474
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: Assign ethernet port to existing VLAN

Sat Feb 24, 2024 11:10 am

Then why did he post screenshot from swos ??
 
gigabyte091
Forum Guru
Forum Guru
Posts: 1191
Joined: Fri Dec 31, 2021 11:44 am
Location: Croatia

Re: Assign ethernet port to existing VLAN

Sat Feb 24, 2024 1:55 pm

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.
 
holvoetn
Forum Guru
Forum Guru
Posts: 5474
Joined: Tue Apr 13, 2021 2:14 am
Location: Belgium

Re: Assign ethernet port to existing VLAN

Sat Feb 24, 2024 1:57 pm

Configured wrong too then ...

I'll move it back if needed once we get more info.
 
davidreaton
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Thu Oct 02, 2014 12:21 am

Re: Assign ethernet port to existing VLAN

Sun Feb 25, 2024 1:40 am

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.
 
gigabyte091
Forum Guru
Forum Guru
Posts: 1191
Joined: Fri Dec 31, 2021 11:44 am
Location: Croatia

Re: Assign ethernet port to existing VLAN

Sun Feb 25, 2024 7:26 am

What port will be used as your trunk from RB4011 ? What VLAN would you like to use as your management ?
 
davidreaton
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Thu Oct 02, 2014 12:21 am

Re: Assign ethernet port to existing VLAN

Tue Feb 27, 2024 7:54 pm

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
 
gigabyte091
Forum Guru
Forum Guru
Posts: 1191
Joined: Fri Dec 31, 2021 11:44 am
Location: Croatia

Re: Assign ethernet port to existing VLAN

Tue Feb 27, 2024 8:44 pm

Don't ditch swOS, it's working really well and setting up VLANs is for eg much more easier on swOS than on RouterOS.
 
davidreaton
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 88
Joined: Thu Oct 02, 2014 12:21 am

Re: Assign ethernet port to existing VLAN

Tue Feb 27, 2024 9:28 pm

I'll second that comment. It IS easier on SWOS.

Who is online

Users browsing this forum: No registered users and 33 guests