Community discussions

MikroTik App
 
PatricF
just joined
Topic Author
Posts: 24
Joined: Tue May 17, 2011 10:59 am

VLAN on all interfaces

Mon Jun 05, 2017 8:21 am

Hi,

Is there an easy way to create a VLAN on every interface instead of specifying every single interface?
I need to create a couple of VLANs and some of them need to be available on all interfaces. Do I manually have to add ever interface to every VLAN in this case or is there a setting that will allow all interfaces?

Thanks,
-Patric
 
idlemind
Forum Guru
Forum Guru
Posts: 1146
Joined: Fri Mar 24, 2017 11:15 pm
Location: USA

Re: VLAN on all interfaces

Mon Jun 05, 2017 9:41 am

If you're doing software based bridging then it's fairly straightforward. Create a bridge interface and add all the Ethernet interfaces you want as bridge ports. Then create a VLAN interface. Specify the bridge as the interface argument.
interface bridge add name=br1 disabled=no protocol-mode=rstp

interface bridge port add bridge=br1 interface=ether2
interface bridge port add bridge=br1 interface=ether3
interface bridge port add bridge=br1 interface=ether4

interface vlan add name=br1-vlan21 vlan-id=21 interface=br1
interface vlan add name=br1-vlan22 vlan-id=22 interface=br1
This results in VLANs 21 and 22 being tagged out to ether2, 3, and 4.

Who is online

Users browsing this forum: joegoldman and 61 guests