How to merge 2 differents trunk + VLANs to one trunk?

Hi

I would like to know if it’s possible to join several VLANs from 2 differents switches to only one Bridge with another switch?

ex: switch 1 vlans 100 and 200
ex: switch 2 vlans 300 and 400

Check the photo, (all CRS354-48P)

and the output is one port with vlans 100-200-300-400, I have no problem with 2 bridges but first time I have this problem (vlans like " Y ")

Question : is it possible to do that or do you have a better solution

Thank you for your answer
Tec-18sept2023.jpg

I would use ethernet cabling.
Are you a network engineer or just happen to have all these switches at home?
Have you heard of a trunk port?

TL;DR Yes, IMO it’s possible.

However a VLAN specification for EVERY PORT on EVERY SWITCH is needed to write a complete solution.
Review this Block Diagram: https://i.mt.lv/cdn/product_files/CRS354-48G-4Splus2Qplus_200122.png
Review this RouterOS page: https://help.mikrotik.com/docs/display/ROS/CRS3xx%2C+CRS5xx%2C+CCR2116%2C+CCR2216+switch+chip+features

hi Conradpino

could you just explain your idea please, i try to figure the way

Thank you

No, a short explanation is not possible. The solution is Bridge VLAN Filtering.
Start reading here: https://help.mikrotik.com/docs/display/ROS/Bridging+and+Switching#BridgingandSwitching-BridgeVLANFiltering

hi ConradPino

ok I will do test again, I already tested with filtering without success,

I will check again :slight_smile:

Thank you for your answer

https://www.youtube.com/watch?v=YLtGQAQ8iS0

Getting the most out of this forum by normis, MikroTik Support

Hi,

I give you the full diagram of the network … will be more easy to understand

It’s a OSPF link between the main office and another office, everything is ok with the ospf link, we have 8 subnet (IP banks) and one trunk with 8 vlans (100 to 107) inside the router ccr2116, I configure the router with 1 bridge filtering and same bridge filtering configuration for each switch (of course + 100-107 + 500-501 everywhere).

The network is ok with trunk and OSPF no problem, the communication is ok between Main Office and other site.

Now I have add a new link (no choice) from a warehouse, the fiber link, a trunk with 2 vlans (500 - 501), I cant modify nothing inside the warehouse the link is a fiber link between warehouse and main office.

I have fiber trunk between router and all switch, with the new link from warehouse, now 2 trunks input and 1 output trunk from router ccr

I do a lot test … but I dont find the solution to merge 2 trunk with differents vlans id

I tried many bridge filtering without any luck, I missed something …

The question is simple, is it possible to merge 2 input trunk and distribute all the vlans every where inside the router and the switch with 1 trunk ???

Do you have any idea !

Thank you for your answer
2023-09-20_20h46_47.jpg

Suggested documentation answers questions posed but the experience to recognize them as such suggests appears absent and coming here can help fill that gap.
It’s not uncommon for users to share a problem and leave with working solution developed from a dialogue between original poster (OP) and forum community at large.

The diagram provided is a great start but while not complete, it is very close. Please address these points:

  • OSPF Link and Fiber Link are “trunk” ports i.e. all packets are VLAN tagged only.
  • What subnets and VLAN (tagged, untagged, or both, if any) appear on CCR2116 ports going to CRS354 switches?
  • What subnets and VLAN (tagged, untagged, or both, if any) appear on CRS354 ports going Main Office client devices?
  • MikroTik device management is critical but currently overlooked; specify a subnet, a VLAN, and IP address for every MikroTik device.

TL:DR network diagram is entity complete but missing Main Office (interior) subnet and VLAN information.
CCR2116 VLAN implementation appears to be within the scope of required solution.
CRS354 VLAN requirement (if any) can’t be determined with certainty so far.

OSPF operates over IP / layer 3, VLANs operate over ethernet /layer 2 - they are completely unrelated to each other. The block on the diagram “OSPF link with 8 subnet with1 Trunk inside of ccr2116 - 8 vlans id:100-107” makes absolutely no sense.

Hi

Short answer:

each subnet is reserved to a single vlan, ex: 10.0.0.x link to vlan 100, 10.0.1.x to vlan 101 …

I will post the config of router and main switch later

the design is not very important, just imagine how to merge 2 differents trunk to one with all vlans,
Thank you

Q: OSPF Link and Fiber Link are “trunk” ports i.e. all packets are VLAN tagged only.
A: tagged only without vlan 1 (reject)

Q:What subnets and VLAN (tagged, untagged, or both, if any) appear on CCR2116 ports going to CRS354 switches?
A:
10.207.0.x = vlan100
10.207.1.x = vlan101
10.230.0.x = vlan 500
10.230.0.x = vlan 501
vlans are tagged for communication between site, OSPF assigned IP to subnet for each vlan

Q: What subnets and VLAN (tagged, untagged, or both, if any) appear on CRS354 ports going Main Office client devices?
A:
vlan 101 untagged for pc
other vlans are tagged for special equipements

Q: MikroTik device management is critical but currently overlooked; specify a subnet, a VLAN, and IP address for every MikroTik device.
A: vlan 100 and 500 reserved for mgmt

Q: TL:DR network diagram is entity complete but missing Main Office (interior) subnet and VLAN information.
CCR2116 VLAN implementation appears to be within the scope of required solution.
CRS354 VLAN requirement (if any) can’t be determined with certainty so far.
A: all switch are vlan101 is untagged and all others vlans are tagged special equipements

Hope the info help you

you can imagine the same setup with just 3 switch or router, 2 inputs trunks with vlans tagged to merge to 1 trunk with all vlans as output

Thank you


setup for the switch model CRS354-48P-4S+2Q+ (main switch)

# model = CRS354-48P-4S+2Q+
/interface bridge
add admin-mac=48:A9:8A:DC:3C:08 auto-mac=no frame-types=\
    admit-only-vlan-tagged name=bridge protocol-mode=none vlan-filtering=yes
/interface ethernet
set [ find default-name=qsfpplus1-1 ] disabled=yes
set [ find default-name=qsfpplus1-2 ] disabled=yes
set [ find default-name=qsfpplus1-3 ] disabled=yes
set [ find default-name=qsfpplus1-4 ] disabled=yes
set [ find default-name=qsfpplus2-1 ] disabled=yes
set [ find default-name=qsfpplus2-2 ] disabled=yes
set [ find default-name=qsfpplus2-3 ] disabled=yes
set [ find default-name=qsfpplus2-4 ] disabled=yes
/interface vlan
add interface=bridge name=vlan3 vlan-id=3
add interface=bridge name=vlan5 vlan-id=5
add interface=bridge name=vlan100 vlan-id=100
add interface=bridge name=vlan101 vlan-id=101
add interface=bridge name=vlan102 vlan-id=102
add interface=bridge name=vlan103 vlan-id=103
add interface=bridge name=vlan104 vlan-id=104
add interface=bridge name=vlan105 vlan-id=105
add interface=bridge name=vlan106 vlan-id=106
add interface=bridge name=vlan107 vlan-id=107
add interface=bridge name=vlan500 vlan-id=500
add interface=bridge name=vlan501 vlan-id=501
add interface=bridge name=vlan502 vlan-id=502
add interface=bridge name=vlan503 vlan-id=503
add interface=bridge name=vlan504 vlan-id=504
add interface=bridge name=vlan505 vlan-id=505
add interface=bridge name=vlan506 vlan-id=506
add interface=bridge name=vlan507 vlan-id=507
/interface bonding
add min-links=1 mode=802.3ad name=2_Go_2e_Salle_Informatique slaves=\
    ether45,ether46
add mode=802.3ad name=2_Go_Tissus slaves=ether47,ether48
add min-links=1 mode=802.3ad name=20_Go_Toilettes slaves=\
    sfp-sfpplus3,sfp-sfpplus4

/interface bridge port
add bridge=bridge interface=ether1 pvid=100
add bridge=bridge interface=ether2 pvid=101
add bridge=bridge interface=ether3 pvid=101
add bridge=bridge interface=ether4 pvid=101
add bridge=bridge interface=ether5 pvid=101
add bridge=bridge interface=ether6 pvid=101
add bridge=bridge interface=ether7 pvid=101
add bridge=bridge interface=ether8 pvid=101
add bridge=bridge interface=ether9 pvid=101
add bridge=bridge interface=ether10 pvid=101
add bridge=bridge interface=ether11 pvid=101
add bridge=bridge interface=ether12 pvid=101
add bridge=bridge interface=ether13 pvid=101
add bridge=bridge interface=ether15 pvid=101
add bridge=bridge interface=ether16 pvid=101
add bridge=bridge interface=ether17 pvid=101
add bridge=bridge interface=ether18 pvid=101
add bridge=bridge interface=ether19 pvid=101
add bridge=bridge interface=ether20 pvid=101
add bridge=bridge interface=ether21 pvid=101
add bridge=bridge interface=ether22 pvid=101
add bridge=bridge interface=ether23 pvid=101
add bridge=bridge interface=ether24 pvid=101
add bridge=bridge interface=ether25 pvid=101
add bridge=bridge interface=ether26 pvid=101
add bridge=bridge interface=ether27 pvid=101
add bridge=bridge interface=ether28 pvid=101
add bridge=bridge interface=ether29 pvid=101
add bridge=bridge interface=ether30 pvid=101
add bridge=bridge interface=ether31 pvid=101
add bridge=bridge interface=ether32 pvid=101
add bridge=bridge interface=ether33 pvid=101
add bridge=bridge interface=ether34 pvid=101
add bridge=bridge interface=ether35 pvid=101
add bridge=bridge interface=ether36 pvid=101
add bridge=bridge interface=ether37 pvid=101
add bridge=bridge interface=ether38 pvid=101
add bridge=bridge interface=ether39 pvid=101
add bridge=bridge interface=ether40 pvid=101
add bridge=bridge interface=ether41 pvid=101
add bridge=bridge interface=ether42 pvid=101
add bridge=bridge interface=ether43 pvid=101
add bridge=bridge interface=ether44 pvid=101
add bridge=bridge comment="Direction Routeur CCR2116" ingress-filtering=no \
    interface=sfp-sfpplus1
add bridge=bridge comment="Direction 2e Switch 48 Ports" interface=\
    sfp-sfpplus2
add bridge=bridge comment=2_Go_2e_Salle_Informatique interface=\
    2_Go_2e_Salle_Informatique
add bridge=bridge comment="20 GoToilettes" interface=20_Go_Toilettes
add bridge=bridge comment=2_Go_Tissus interface=2_Go_Tissus
add bridge=bridge interface=ether14 pvid=101
add bridge=bridge comment="Mgmt Port vlan 100" interface=ether49 pvid=100
/ip neighbor discovery-settings
set discover-interface-list=all
/interface bridge vlan
add bridge=bridge tagged="bridge,sfp-sfpplus1,sfp-sfpplus2,2_Go_2e_Salle_Infor\
    matique,20_Go_Toilettes,2_Go_Tissus" untagged="ether1,ether2,ether3,ether4\
    ,ether5,ether6,ether7,ether8,ether9,ether10,ether11,ether12,ether13,ether1\
    4,ether15,ether16,ether17,ether18,ether19,ether20,ether21,ether22,ether23,\
    ether24,ether25,ether26,ether27,ether28,ether29,ether30,ether31,ether32,et\
    her33,ether34,ether35,ether36,ether37,ether38,ether39,ether40,ether41,ethe\
    r42,ether43,ether44" vlan-ids=101
add bridge=bridge tagged="bridge,sfp-sfpplus1,sfp-sfpplus2,2_Go_2e_Salle_Infor\
    matique,20_Go_Toilettes,2_Go_Tissus,ether1,ether2,ether3,ether4,ether5,eth\
    er6,ether7,ether8,ether9,ether10,ether11,ether12,ether13,ether14,ether15,e\
    ther16,ether17,ether18,ether19,ether20,ether21,ether22,ether23,ether24,eth\
    er25,ether26,ether27,ether28,ether29,ether30,ether31,ether32,ether33,ether\
    34,ether35,ether36,ether37,ether38,ether39,ether40,ether41,ether42,ether43\
    ,ether44" vlan-ids=3
add bridge=bridge tagged="bridge,sfp-sfpplus1,sfp-sfpplus2,2_Go_2e_Salle_Infor\
    matique,20_Go_Toilettes,2_Go_Tissus" vlan-ids=5
add bridge=bridge tagged="bridge,sfp-sfpplus1,sfp-sfpplus2,2_Go_2e_Salle_Infor\
    matique,20_Go_Toilettes,2_Go_Tissus" vlan-ids=100
add bridge=bridge tagged="bridge,sfp-sfpplus1,sfp-sfpplus2,2_Go_2e_Salle_Infor\
    matique,20_Go_Toilettes,2_Go_Tissus" vlan-ids=102
add bridge=bridge tagged="bridge,sfp-sfpplus1,sfp-sfpplus2,2_Go_2e_Salle_Infor\
    matique,20_Go_Toilettes,2_Go_Tissus,ether1,ether2,ether3,ether4,ether5,eth\
    er6,ether7,ether8,ether9,ether10,ether11,ether12,ether13,ether14,ether15,e\
    ther16,ether17,ether18,ether19,ether20,ether21,ether22,ether23,ether24,eth\
    er25,ether26,ether27,ether28,ether29,ether30,ether31,ether32,ether33,ether\
    34,ether35,ether36,ether37,ether38,ether39,ether40,ether41,ether42,ether43\
    ,ether44" vlan-ids=103
add bridge=bridge tagged="bridge,sfp-sfpplus1,sfp-sfpplus2,2_Go_2e_Salle_Infor\
    matique,20_Go_Toilettes,2_Go_Tissus" vlan-ids=104
add bridge=bridge tagged="bridge,sfp-sfpplus1,sfp-sfpplus2,2_Go_2e_Salle_Infor\
    matique,20_Go_Toilettes,2_Go_Tissus" vlan-ids=105
add bridge=bridge tagged="bridge,sfp-sfpplus1,sfp-sfpplus2,2_Go_2e_Salle_Infor\
    matique,20_Go_Toilettes,2_Go_Tissus" vlan-ids=106
add bridge=bridge tagged="bridge,sfp-sfpplus1,sfp-sfpplus2,2_Go_2e_Salle_Infor\
    matique,20_Go_Toilettes,2_Go_Tissus" vlan-ids=107
add bridge=bridge tagged="bridge,sfp-sfpplus1,sfp-sfpplus2,2_Go_2e_Salle_Infor\
    matique,20_Go_Toilettes,2_Go_Tissus" vlan-ids=500
/ip address
add address=10.207.1.11/24 interface=vlan101 network=10.207.1.0
add address=10.207.0.11/24 interface=vlan100 network=10.207.0.0
add address=10.207.2.11/24 interface=vlan102 network=10.207.2.0
add address=10.207.3.11/24 interface=vlan103 network=10.207.3.0
add address=10.207.4.11/24 interface=vlan104 network=10.207.4.0
add address=10.207.5.11/24 interface=vlan105 network=10.207.5.0
add address=10.207.6.11/24 interface=vlan106 network=10.207.6.0
add address=10.207.7.11/24 interface=vlan107 network=10.207.7.0
add address=10.230.0.11/24 interface=vlan500 network=10.230.0.0
add address=10.230.1.11/24 interface=vlan501 network=10.230.1.0
add address=10.230.2.11/24 interface=vlan502 network=10.230.2.0
add address=10.230.3.11/24 interface=vlan503 network=10.230.3.0
add address=10.230.4.11/24 interface=vlan504 network=10.230.4.0
add address=10.230.5.11/24 interface=vlan505 network=10.230.5.0
add address=10.230.6.11/24 interface=vlan506 network=10.230.6.0
add address=10.230.7.11/24 interface=vlan507 network=10.230.7.0
add address=192.168.99.11/24 interface=bridge network=192.168.99.0
/ip service
set telnet disabled=yes
set ftp disabled=yes
/snmp
set contact=Tec enabled=yes location="Switch 1"
/system identity
set name=Tec-Switch1-48P
/system logging
set 0 topics=info,debug,dhcp
/system routerboard settings
set boot-os=router-os enter-setup-on=delete-key

setup for the switch model CCR2116

# model = CCR2116-12G-4S+
/interface bridge
add frame-types=admit-only-vlan-tagged name=bridge_Office protocol-mode=none \
    vlan-filtering=yes
add name=bridge_warehouse protocol-mode=none
/interface ethernet
set [ find default-name=sfp-sfpplus2 ] disabled=yes
set [ find default-name=sfp-sfpplus3 ] disabled=yes
set [ find default-name=sfp-sfpplus4 ] disabled=yes
/interface vlan
add interface=bridge_Office name=vlan3 vlan-id=3
add interface=bridge_Office name=vlan5 vlan-id=5
add interface=bridge_Office name=vlan100 vlan-id=100
add interface=bridge_Office name=vlan101 vlan-id=101
add interface=bridge_Office name=vlan102 vlan-id=102
add interface=bridge_Office name=vlan103 vlan-id=103
add interface=bridge_Office name=vlan104 vlan-id=104
add interface=bridge_Office name=vlan105 vlan-id=105
add interface=bridge_Office name=vlan106 vlan-id=106
add interface=bridge_Office name=vlan107 vlan-id=107
add interface=bridge_warehouse name=vlan500 vlan-id=500
add interface=bridge_warehouse name=vlan501 vlan-id=501
add interface=bridge_warehouse name=vlan502 vlan-id=502
add interface=bridge_warehouse name=vlan503 vlan-id=503
add interface=bridge_warehouse name=vlan504 vlan-id=504
add interface=bridge_warehouse name=vlan505 vlan-id=505
add interface=bridge_warehouse name=vlan506 vlan-id=506
add interface=bridge_warehouse name=vlan507 vlan-id=507
/ip pool
add name=dhcp_pool0 ranges=10.207.0.25-10.207.0.254
add name=dhcp_pool1 ranges=10.207.1.25-10.207.1.254
add name=dhcp_pool2 ranges=192.168.99.25-192.168.99.254
add name=dhcp_pool3 ranges=10.207.3.25-10.207.3.254
add name=dhcp_pool4 ranges=192.168.78.25-192.168.78.254
/ip dhcp-server
add address-pool=dhcp_pool0 interface=vlan100 name=dhcp1
add address-pool=dhcp_pool1 interface=vlan101 name=dhcp2
add address-pool=dhcp_pool2 interface=bridge_Office name=dhcp3
add address-pool=dhcp_pool3 interface=vlan103 name=dhcp4
add address-pool=dhcp_pool4 interface=vlan3 name=dhcp5
/interface bridge port
add bridge=bridge_Office interface=ether1
add bridge=bridge_Office interface=ether2
add bridge=bridge_Office interface=ether3 pvid=101
add bridge=bridge_Office interface=ether4
add bridge=bridge_Office interface=ether5
add bridge=bridge_Office interface=ether6
add bridge=bridge_Office interface=ether7 pvid=100
add bridge=bridge_Office interface=ether8
add bridge=bridge_Office interface=ether13 pvid=100
add bridge=bridge_Office interface=sfp-sfpplus1
add bridge=bridge_Office interface=ether9 pvid=101
add bridge=bridge_warehouse interface=ether10
/ip neighbor discovery-settings
set discover-interface-list=all
/interface bridge vlan
add bridge=bridge_Office tagged=bridge_Office,sfp-sfpplus1 vlan-ids=3
add bridge=bridge_Office tagged=bridge_Office,sfp-sfpplus1 vlan-ids=5
add bridge=bridge_Office tagged=bridge_Office,sfp-sfpplus1 untagged=ether7 \
    vlan-ids=100
add bridge=bridge_Office tagged=bridge_Office,sfp-sfpplus1 untagged=ether9 \
    vlan-ids=101
add bridge=bridge_Office tagged=bridge_Office,sfp-sfpplus1 vlan-ids=102
add bridge=bridge_Office tagged=bridge_Office,sfp-sfpplus1 vlan-ids=103
add bridge=bridge_Office tagged=bridge_Office,sfp-sfpplus1 vlan-ids=104
add bridge=bridge_Office tagged=bridge_Office,sfp-sfpplus1 vlan-ids=105
add bridge=bridge_Office tagged=bridge_Office,sfp-sfpplus1 vlan-ids=106
add bridge=bridge_Office tagged=bridge_Office,sfp-sfpplus1 vlan-ids=107
add bridge=bridge_Office tagged=bridge_Office,sfp-sfpplus1 vlan-ids=500
/ip address
add address=192.168.99.1/24 interface=bridge_Office network=192.168.99.0
add address=10.207.0.1/24 interface=vlan100 network=10.207.0.0
add address=10.207.1.1/24 interface=vlan101 network=10.207.1.0
add address=10.207.2.1/24 interface=vlan102 network=10.207.2.0
add address=10.207.3.1/24 interface=vlan103 network=10.207.3.0
add address=10.207.4.1/24 interface=vlan104 network=10.207.4.0
add address=10.207.5.1/24 interface=vlan105 network=10.207.5.0
add address=10.207.6.1/24 interface=vlan106 network=10.207.6.0
add address=10.207.7.1/24 interface=vlan107 network=10.207.7.0
add address=10.230.0.1/24 interface=vlan500 network=10.230.0.0
add address=10.230.1.1/24 interface=vlan501 network=10.230.1.0
add address=10.230.2.1/24 interface=vlan502 network=10.230.2.0
add address=10.230.3.1/24 interface=vlan503 network=10.230.3.0
add address=10.230.4.1/24 interface=vlan504 network=10.230.4.0
add address=10.230.5.1/24 interface=vlan505 network=10.230.5.0
add address=10.230.6.1/24 interface=vlan506 network=10.230.6.0
add address=10.230.7.1/24 interface=vlan507 network=10.230.7.0
add address=192.168.78.1/24 interface=vlan3 network=192.168.78.0
/ip dhcp-server network
add address=10.207.0.0/24 dns-server=8.8.8.8 gateway=10.207.0.1
add address=10.207.1.0/24 dns-server=8.8.8.8 gateway=10.207.1.1
add address=10.207.3.0/24 dns-server=8.8.8.8 gateway=10.207.3.1
add address=192.168.78.0/24 dns-server=8.8.8.8 gateway=192.168.78.1
add address=192.168.99.0/24 dns-server=8.8.8.8 gateway=192.168.99.1
/system identity
set name=main

Use one bridge on the CCR2116, not two separate ones, and configure the /interface bridge vlan membership accordingly on the two trunks.

You do not need /interface vlan and /ip address entries for every single VLAN on switches, these are only required for access to the switch itself so for a single management VLAN is usually sufficient.

The mention of OSPF seems irrelevant as there is none configured.

Technically correct.

One broadcast domain (switch or VLAN) per subnet is a common use pattern and apparently applicable here.

Any Layer 3 routing design must encompass for the Layer 2 broadcast domain partitioning.

General agreement but I suggest holding off on big changes until requirements are completely known.

A routing specification is absent and VLAN interfaces may be useful for Layer 3 routing.

Let’s consider OSPF a useful link name and a possible future feature addition.

Hi

For OSPF nothing special between ISP and us and other site, the setup with multiple subnet is essential for us, and working fine.

The warehouse is a very old site with old systems, now I have to add this warehouse to the main site to control the new equipment, users send job from main site to warehouse, thats why I have the new problem with another trunk. No money to upgrade, maybe in 2 years, still working no upgrade.

The warehouse was always stand alone, now I have to communicate with fiber link, I have 2 bridge because I did some tests to find a solution with layer 2.

You do not need /interface vlan and /ip address entries for every single VLAN on switches, these are only required for access to the switch itself so for a single management VLAN is usually sufficient.

I know that, but lets say for monitoring

Thank you

the default route is push by other OSPF site for internet

/routing id
add disabled=no id=10.15.15.13 name=id-1 select-dynamic-id=only-vrf
/routing ospf instance
add disabled=no name=ospf-instance-1 redistribute=connected router-id=id-1
/routing ospf area
add disabled=no instance=ospf-instance-1 name=Backbone
/routing ospf interface-template
add area=Backbone disabled=no networks=\
    10.15.15.13/30,10.207.0.0/21,172.31.2.0/19,10.0.4.0/24

@maxspeed this is a classic XY Problem I have better uses for my time.
Disabling Spanning Tree Protocol is an issue; VLAN aware MSTP is best choice.
Parting thought: Layer2 misconfiguration § Bridges on a single switch chip

Hi

I will have to do modification inside the warehouse and put new equipements, good reason to ask for upgrade

Thank you for your time, much appreciated