Configuring a Solaris 10 vlan

Setting up vlan tagging on an interface in solaris 10 is as simple as plumbing an interface.
Eg. to setup the e1000g0 interface for the vlan with id ‘2′, execute the following command.

# ifconfig e1000g2000 plumb

The interface name is the concatenation of the interface name + vlan id * 100 + interface id

e1000g0 vlan 2 = e1000g + 200 + 0 = e1000g2000

You’ll probably want to make this persistant across reboots as well, so you’ll need to create the /etc/hostname.if file

# echo "192.168.0.2" > /etc/hostname.e1000g2000