Community discussions

MikroTik App
 
Liiina
newbie
Topic Author
Posts: 26
Joined: Mon Apr 15, 2024 10:21 pm

tagged and untagged in one vlan table

Mon Aug 05, 2024 5:44 pm

Please tell me, a regular(uncontrolled) switch with several ports is connected to my Mikrotik in lan1, regular clients are connected to this switch, as well as clients that have VLAN 10 installed on their network cards, how can I get them all in one bridge on Mikrotik? When I install on mikrotik PVID 10 for ether1 and add tagged and untagged in one vlan table, I get an error that they cannot be at the same time.

/interface bridge
add name=bridge1 vlan-filtering=yes
/interface bridge port
add bridge=bridge1 interface=ether1 pvid=10
/interface bridge vlan
add bridge=bridge1 tagged=bridge1,ether1 untagged=ether1 vlan-ids=10
 
erlinden
Forum Guru
Forum Guru
Posts: 2876
Joined: Wed Jun 12, 2013 1:59 pm
Location: Netherlands

Re: tagged and untagged in one vlan table

Mon Aug 05, 2024 5:48 pm

The VLAN bible of Mikrotik:
viewtopic.php?t=143620

Thanks snippan for the addition. I just wanted to add it...
Last edited by erlinden on Mon Aug 05, 2024 5:57 pm, edited 2 times in total.
 
User avatar
spippan
Member
Member
Posts: 490
Joined: Wed Nov 12, 2014 1:00 pm

Re: tagged and untagged in one vlan table

Mon Aug 05, 2024 5:51 pm

ROS cannot handle a port with a tagged VLAN and also untagged in that same VLAN
e.g.:
eth1 is untagged 10 and also tagged VLAN 10 on that bridge:
05-08-2024.png

EDIT: (second part got lost on first post; sorry)

but you can set the PVID (untagged traffic) in the port menu itself for that port in the bridge setup:
(do not set the port "untagged" in "Bridge > VLANs" - as in the first screenshot)
05-08-2024-2.png
You do not have the required permissions to view the files attached to this post.
 
Liiina
newbie
Topic Author
Posts: 26
Joined: Mon Apr 15, 2024 10:21 pm

Re: tagged and untagged in one vlan table

Mon Aug 05, 2024 7:10 pm

it seems to me that you both never read my message :(

I have ether1 in Mikrotik where Vlan10 and Untag come, I need to combine all this into one bridge and add Mikrotik bridge1 itself

does this mean that I will not be able to do everything on one bridge? and I will need to do something like:

/interface bridge
add name=bridge1 vlan-filtering=yes
/interface bridge port
add bridge=bridge1 interface=ether1 pvid=11
/interface bridge vlan
add bridge=bridge1 tagged=ether1 vlan-ids=10
add bridge=bridge1 untagged=ether1 vlan-ids=11

/interface vlan
add interface=bridge1 name=vlan10 vlan-id=10
add interface=bridge1 name=vlan11 vlan-id=11

/interface bridge
add name=bridge2
/interface bridge port
add bridge=bridge2 interface=vlan10
add bridge=bridge2 interface=vlan11

right?
 
gigabyte091
Forum Guru
Forum Guru
Posts: 1565
Joined: Fri Dec 31, 2021 11:44 am
Location: Croatia

Re: tagged and untagged in one vlan table

Tue Aug 06, 2024 7:21 am

It seems to me that you didn't explained correctly. So you should provide your network diagram so people here can easily understand what are you need. Also with the information you provided they understood correctly, what you wanted to do is hybrid port where one VLAN is untagged and other VLANs are tagged but you can't tag and untag same VLAN, it just doesn't make any sense.

Write how many dumb switches do you have, draw a network diagram so we can see what do you want and to see what your network looks like. Then, and only then you can receive real help.

You said you have ether1 on Mikrotik where VLAN10 and untag come, from where ? Is this Mikrotik a switch ? Or is it a router ? By untagged do you mean VLAN11 ?

What I understood you need hybrid port with VLAN 11 untagged and VLAN 10 tagged ? And you have dumb switch downstream where you want your VLAN11 to be untagged and VLAN10 is passed out ? Is your dumb switch capable of passing tagged VLAN traffic ?
 
Liiiina
just joined
Posts: 2
Joined: Tue Aug 06, 2024 8:50 am

Re: tagged and untagged in one vlan table

Tue Aug 06, 2024 9:17 am

I would like to merge all devices into one network and create a dhcp server on mikrotik
You do not have the required permissions to view the files attached to this post.
 
gigabyte091
Forum Guru
Forum Guru
Posts: 1565
Joined: Fri Dec 31, 2021 11:44 am
Location: Croatia

Re: tagged and untagged in one vlan table

Tue Aug 06, 2024 4:06 pm

What model is your TP link switch ? Maybe it's better to use some managed switch, even some spare mikrotik router would be good for that.
 
Liiiina
just joined
Posts: 2
Joined: Tue Aug 06, 2024 8:50 am

Re: tagged and untagged in one vlan table

Tue Aug 06, 2024 4:26 pm

What model is your TP link switch ? Maybe it's better to use some managed switch, even some spare mikrotik router would be good for that.
building a network using 802.1Q and using unmanaged switches is the basic part, I'm sorry you don't understand it
I don't need to rework the network, this is just an example that the task displays for simplicity.

help me understand how to do this on mikrotik. is my example in post #4 viewtopic.php?p=1089807#p1089600 correct? i can use multiple bridges until the cpu is exhausted, right?
 
tdw
Forum Guru
Forum Guru
Posts: 2106
Joined: Sat May 05, 2018 11:55 am

Re: tagged and untagged in one vlan table

Tue Aug 06, 2024 4:52 pm

There are many pitfalls using multiple bridges, so best avoided.

Do you need a bridge? If your network is only connected to a single port you can simply add a vlan interface to that port:
/interface vlan
add interface=ether1 name=vlan10 vlan-id=10


then add different subnets to the two networks (ether1 and vlan10) plus any services, e.g. DHCP server, as required.
 
gigabyte091
Forum Guru
Forum Guru
Posts: 1565
Joined: Fri Dec 31, 2021 11:44 am
Location: Croatia

Re: tagged and untagged in one vlan table

Tue Aug 06, 2024 5:07 pm

Yes, yes you can, you are absolutely right. ROS is very flexible.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 22909
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: tagged and untagged in one vlan table

Tue Aug 06, 2024 8:55 pm

The problem is that there is no guarantee that the switch will pass both untagged and properly tagged traffic to the MIKROTIK over the hybrid port.

The way to setup your hybrid port is a legitimate question, however we have no control over what happens on the switch

/interface vlans
add interface=bridge name=vlan10-users vlan-ids=10
add interface=bridge name=vlan5-users vlan-ids=5

/interface bridge ports
add bridge=bridge interface=ether1 pvid=10

/interface bridge vlans
add bridge=bridge tagged=bridge untagged=ether1 vlan-ids=5 { This captures the clients coming in untagged from the switch }
add bridge=bridge tagged=bridge,ether1 vlan-ids=10 { This captures the vlan10 clients coming in from the the switch }

Now if you had other ports also handling this traffic on the mikrotik one would have to add it to the lines above as appropriate..