How to config trunk, access and bridge?

  • 1
  • Question
  • Updated 1 year ago

I am not sure I am doing this right!!

lets say;

swp1-2  trunks for vlan100 and 200

swp3 is an access port vlan 100

swp4 is an access port vlan 200

How would the config look like? - I still don't get the concept of a bridge, also why I don't seem to need to create a swp1-2 'bridge-trunk <vlan>...'

here is my guess...  

auto bridge
iface bridge
bridge-vlan-aware yes bridge-ports glob swp3-4, swp1-2 bridge-vids 100 200
auto swp3 iface swp3 bridge-access 100
auto swp4 iface swp4 bridge-access 200
Photo of Windesson Almeida

Windesson Almeida

  • 342 Points 250 badge 2x thumb

Posted 1 year ago

  • 1
Photo of Jason Guy

Jason Guy, Employee

  • 1,562 Points 1k badge 2x thumb
Config is almost correct:
auto bridge
iface bridge
  bridge-vlan-aware yes
  bridge-ports glob swp1-4
  bridge-vids 100 200
The reason you don't have to define anything for swp1-2 is because the bridge-ports line enslaves the interfaces specified. When the interface stanza is not defined, but enslaved, it inherits the bridge-vids and bridge-pvid configuration, as well as any mstpctl configurations. All of these settings can be overridden on a per-interface basis. In fact, by defining swp3 and swp4 as bridge-access, you are simply overriding the trunk settings that would otherwise be inherited from the master device (the bridge interface). 

Does this make sense?