Owners Manual
1 Create a bridge instance for the VLAN—br100 is the name of the bridge instance used to model the VLAN, and OpenSwitch OPX
does not derive the VLAN ID from the name.
$ brctl addbr br100
2 Add a tagged port to the VLAN to ensure that the Linux interface mapped to the port being added does not have an IP address.
$ ifconfig e101-001-0
e101-001-0 Link encap:Ethernet HWaddr 90:b1:1c:f4:9d:3c
inet addr:1.1.1.1 Bcast:1.1.1.255 Mask:255.255.255.0
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:2221 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 B) TX bytes:523446 (511.1 KiB)
If the interface already has an IP address, remove the IP address before continuing to the next step.
$ ip addr flush dev e101-001-0
3 Create a tagged virtual link—a Linux interface can only belong to a single bridge instance. To add the same interface to multiple VLAN
domains, create a separate Linux virtual link for each VLAN in which the port is a member. Create a virtual tagged link for the
e101-001-0 Linux interface in VLAN 100—the .100 sux in the Linux interface name indicates that the interface is VLAN tagged.
$ ip link add link e101-001-0 name e101-001-0.100 type vlan id 100
4 Add the tagged virtual link to the VLAN to add the newly created virtual link to the Linux bridge instance created in Step 1.
OpenSwitch OPX creates the VLAN and adds the physical port mapped to the e101-001-0 Linux interface as a tagged member of
the VLAN.
$ brctl addif br100 e101-001-0.100
5 Verify the VLAN conguration.
$ brctl show
bridge name bridge id STP enabled interfaces
br100 8000.90b11cf49d3c no e101-001-0.100
Add untagged member to VLAN
You can add a Linux interface directly to a Linux bridge without creating a separate VLAN-specic virtual link. Note that in the example the
interface does not have the .100 sux, which means the interface is an untagged VLAN member.
$ brctl addif br100 e101-002-0
A physical port can be an untagged member of only a single VLAN—a physical port can be added as a tagged member of multiple VLANs.
$ brctl show
bridge name bridge id STP enabled interfaces
br100 8000.90b11cf49d3c no e101-001-0.100
e101-002-0
Add port to multiple VLAN domains
To add the same port to a second VLAN, create another VLAN tagged virtual link on the e101-001-0 interface, then add the new virtual
link to the Linux bridge instance.
$ brctl addbr br200
$ ip link add link e101-001-0 name e101-001-0.200 type vlan id 200
$ brctl addif br200 e101-001-0.200
NOTE
: All interfaces in a bridge instance must be either untagged or have the same tagged VLAN ID—you cannot congure
e101-001-0.100 and e101-002-0.200 in the same Linux bridge instance.
$ brctl show
bridge name bridge id STP enabled interfaces
br100 8000.90b11cf49d3c no e101-001-0.100
e101-002-0
br200 8000.90b11cf49d3c no e101-001-0.200
Add Linux bond interface to VLAN domain
10
Layer 2 bridging










