Vlan tagged host connect

Userlevel 1

When studying vlan tagged example



But I have some confuse there?

Example: I need connect the host with tagged vlan 100

According to the material. It looks two methods there:

----- Method 1 -----
auto swp1
iface swp1

auto swp1.100
iface swp1.100

----- Method 2 -----
auto bridge  iface bridge    bridge-vlan-aware yes    bridge-ports swp1     bridge-vids 100    bridge-pvid 1    auto swp1  iface swp1     bridge-vids 200     bridge-pvid 1     mstpctl-bpduguard yes     mstpctl-portadminedge yes


Does which method in above should be current?


3 replies

Userlevel 1

If the objective is for a host connected on swp1 to be able to send and receive packets tagged with vlan 100, and for the switch to put these packets into a bridge (which can then be switched to other ports, or routed via a routed SVI) then the best approach is to create a bridge.

You can do this via NCLU or manually editing the /etc/network/interfaces file. If using a vlan-aware bridge, see the examples over here: https://docs.cumulusnetworks.com/display/DOCS/VLAN-aware+Bridge+Mode+for+Large-scale+Layer+2+Environ...

Userlevel 1

Thanks for comment, that looks method 2 will be fit to my case.

But why it will have method 1 available? What's its advantage?


Userlevel 1
machiasiaweb wrote:


Thanks for comment, that looks method 2 will be fit to my case.

But why it will have met...

Method 1 would help create .1q subinterfaces, such as swp1.100, and swp2.100, which can be used in configuration of a traditional bridge, such as "br-VLAN100" in the example below:

On the vlan tagging chapter, see the advance example on how a .1q subinterface of a physical interface (swp1.100) or a bond interface (bond2.100) can be added to a traditional bridge: