"dladm" also allows to define VLAN trunking and VLAN usage with OpenSolaris.
You may assign specific VLANs to xVM virtual domains/machines (DomU) as well as use them in Dom0 or in your bare OpenSolaris using zones or not.
The physical interface (e1000g0) will act as the native vlan interface in this example, producing packets without a 802.1q vlan tag.
Defining VLANs with dladm is simple:
You may assign specific VLANs to xVM virtual domains/machines (DomU) as well as use them in Dom0 or in your bare OpenSolaris using zones or not.
The physical interface (e1000g0) will act as the native vlan interface in this example, producing packets without a 802.1q vlan tag.
Defining VLANs with dladm is simple:
To define a vlan to be trunked over a physical link use this command (example):
# dladm create-vlan -l e1000g0 -v 3 mynet0Packets originating from virtual interface mynet0 will be passed to the outside by the physical interface e1000g0 with vlan tag 3.
Example:
# ifconfig mynet0 plumb
# ifconfig mynet0 10.1.0.1 netmask 0xffffff00 broadcast 10.1.0.255 up
# ping 10.1.0.2(in another window:)
# snoop -r -d e1000g0
VLAN#3: 10.1.0.1 -> (broadcast) ARP C Who is 10.1.0.2, 10.1.0.2 ?
VLAN#3: 10.1.0.1 -> (broadcast) ARP C Who is 10.1.0.2, 10.1.0.2 ?
VLAN#3: 10.1.0.1 -> (broadcast) ARP C Who is 10.1.0.2, 10.1.0.2 ?The "xvm_19" interface was created by Sun xVM after starting a DomU.
To define a virtual machine to be connected to vlan 3 via e1000g0, just use this virt-install command:
# virt-install [.... your options ...] --network="vlanid=3,bridge=e1000g0"The other interfaces were defined like this in the graphical example above:
# dladm create-vlan -l e1000g0 -v 22 mynet1
# dladm create-vlan -l e1000g0 -v 42 mynet2They will all show up in
# dladm show-linkNote:
You may NOT assign a vlan interface to a bridge nor to an etherstub. All virtual/vlan interfaces in the same vlan connected to the same physical interface are in the same broadcast domain - like if they were connected to a switch.

Leave a comment