dladm: VLANs with OpenSolaris (and Sun xVM)

| | Comments (0) | TrackBacks (0)
dladm-vlan.png
"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:


To define a vlan to be trunked over a physical link use this command (example):

# dladm create-vlan -l e1000g0 -v 3 mynet0

Packets 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 mynet2


They will all show up in

# dladm show-link

Note:
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.


0 TrackBacks

Listed below are links to blogs that reference this entry: dladm: VLANs with OpenSolaris (and Sun xVM).

TrackBack URL for this entry: http://southbrain.com/mt/mt-tb.cgi/144

Leave a comment

June 2010

Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30      

About

This blog is owned by:

Pascal Gienger
Kanzleistr. 14
78462 Konstanz
Phone +49 7531 584298
Fax +49 7531 584298-9

Phone USA 1-678-791-4182

YouTube Channel: pascalgienger