Deprecated: Assigning the return value of new by reference is deprecated in /home/adeptit/public_html/unixsysadmin/wp-settings.php on line 399

Deprecated: Assigning the return value of new by reference is deprecated in /home/adeptit/public_html/unixsysadmin/wp-settings.php on line 414

Deprecated: Assigning the return value of new by reference is deprecated in /home/adeptit/public_html/unixsysadmin/wp-settings.php on line 421

Deprecated: Assigning the return value of new by reference is deprecated in /home/adeptit/public_html/unixsysadmin/wp-settings.php on line 456

Strict Standards: Declaration of Walker_Page::start_lvl() should be compatible with Walker::start_lvl(&$output) in /home/adeptit/public_html/unixsysadmin/wp-includes/classes.php on line 576

Strict Standards: Declaration of Walker_Page::end_lvl() should be compatible with Walker::end_lvl(&$output) in /home/adeptit/public_html/unixsysadmin/wp-includes/classes.php on line 576

Strict Standards: Declaration of Walker_Page::start_el() should be compatible with Walker::start_el(&$output) in /home/adeptit/public_html/unixsysadmin/wp-includes/classes.php on line 576

Strict Standards: Declaration of Walker_Page::end_el() should be compatible with Walker::end_el(&$output) in /home/adeptit/public_html/unixsysadmin/wp-includes/classes.php on line 576

Strict Standards: Declaration of Walker_PageDropdown::start_el() should be compatible with Walker::start_el(&$output) in /home/adeptit/public_html/unixsysadmin/wp-includes/classes.php on line 593

Strict Standards: Declaration of Walker_Category::start_lvl() should be compatible with Walker::start_lvl(&$output) in /home/adeptit/public_html/unixsysadmin/wp-includes/classes.php on line 687

Strict Standards: Declaration of Walker_Category::end_lvl() should be compatible with Walker::end_lvl(&$output) in /home/adeptit/public_html/unixsysadmin/wp-includes/classes.php on line 687

Strict Standards: Declaration of Walker_Category::start_el() should be compatible with Walker::start_el(&$output) in /home/adeptit/public_html/unixsysadmin/wp-includes/classes.php on line 687

Strict Standards: Declaration of Walker_Category::end_el() should be compatible with Walker::end_el(&$output) in /home/adeptit/public_html/unixsysadmin/wp-includes/classes.php on line 687

Strict Standards: Declaration of Walker_CategoryDropdown::start_el() should be compatible with Walker::start_el(&$output) in /home/adeptit/public_html/unixsysadmin/wp-includes/classes.php on line 710

Strict Standards: Redefining already defined constructor for class wpdb in /home/adeptit/public_html/unixsysadmin/wp-includes/wp-db.php on line 58

Deprecated: Assigning the return value of new by reference is deprecated in /home/adeptit/public_html/unixsysadmin/wp-includes/cache.php on line 99

Strict Standards: Redefining already defined constructor for class WP_Object_Cache in /home/adeptit/public_html/unixsysadmin/wp-includes/cache.php on line 404

Deprecated: Assigning the return value of new by reference is deprecated in /home/adeptit/public_html/unixsysadmin/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /home/adeptit/public_html/unixsysadmin/wp-includes/theme.php on line 576
UNIXSysAdmin.net » 2008 » July

Archive for July, 2008

Create a VNIC on Solaris Nevada (Solaris Express) Builds, and Use It for an Exclusive IP Stack in Zones

Thursday, July 17th, 2008

Given that I discovered quite a while ago that you can create vnic’s WITHOUT crossbow, in the early 80’s builds (b83+ appears to work), I decided today to try using the vnic’s for exclusive ip stacks in zones. The good news is, it works! The bad news is, besides already being unsupported (as this is Solaris Express), doing things like this is probably super, super unsupported.

So, lets do it.

Create a VNIC:

/usr/lib/vna <physicalAdapter> <fakeMacAddress>

You will get the vnic name returned as “vnic0″, then vnic1, and so on the more times you do this. Always use a different mac address of course, else, fail.

Create a new zone, and when configuring it, set the physical NIC to vnic0, and DO NOT set an address on it.

So, either type the commands below into zonecfg when creating a new zone:

# zonecfg -z <zoneName>
zonecfg:<zoneName>> set ip-type=exclusive
zonecfg:<zoneName>> add net
zonecfg:<zoneName>:net> set physical=vnic0
zonecfg:<zoneName>:net> end
zonecfg:<zoneName>> commit

OR remove the NIC config from an existing zone, and configure the new nic

zonecfg -z <zoneName> "remove net; set ip-type=exclusive; add net; set physical=vnic0; end"

Good to go - now boot the zone, and get on the zone console:

zlogin -C -e \# <zoneName>

Login as root, and then plumb the interface to verify it works:

ifconfig vnic0 plumb

And now, configure the zone like a regular Solaris 10 host, creating the /etc/hostname.vnic0 file, with a hostname in it, editing /etc/hosts, setting up /etc/resolv.conf, /etc/netmasks, /etc/defaultrouter and so on, and you should be good to go!

You may also wish to write a startup script that runs before the zones come up at boot, to avoid the zone boot failing. It will simply need to contain the /usr/lib/vna lines you used above to configure the vnic’s in the first place.