<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic xml:lang="en-us" id="addhostonlysolaris">
  <title>Configuring Multiple Host-Only Network Interfaces on Oracle Solaris
      Hosts</title>
  
  <body>
    <p>By default <ph conkeyref="vbox-conkeyref-phrases/product-name"/> provides you with one host-only network
      interface. Adding more host-only network interfaces on Oracle Solaris hosts requires manual configuration. Here is
      how to add another host-only network interface. </p>
    <p>Begin by stopping all running VMs. Then, unplumb the existing "vboxnet0" interface by execute the following
      command as root: </p>
    <pre xml:space="preserve"># ifconfig vboxnet0 unplumb</pre>
    <p>If you have several vboxnet interfaces, you will need to unplumb all of them. Once all vboxnet interfaces are
      unplumbed, remove the driver by executing the following command as root: </p>
    <pre xml:space="preserve"># rem_drv vboxnet</pre>
    <p>Edit the file <filepath>/platform/i86pc/kernel/drv/vboxnet.conf</filepath> and add a line for the new interface
      we want to add as shown below: </p>
    <pre xml:space="preserve">name="vboxnet" parent="pseudo" instance=1;
name="vboxnet" parent="pseudo" instance=2;</pre>
    <p>Add as many of these lines as required with each line having a unique instance number. </p>
    <p>Next, reload the vboxnet driver by executing the following command as root: </p>
    <pre xml:space="preserve"># add_drv vboxnet</pre>
    <p>On Oracle Solaris 11.1 and newer hosts you may want to rename the default vanity interface name. To check what
      name has been assigned, execute: </p>
    <pre xml:space="preserve">$ dladm show-phys
LINK              MEDIA                STATE      SPEED  DUPLEX    DEVICE
net0              Ethernet             up         100    full      e1000g0
net2              Ethernet             up         1000   full      vboxnet1
net1              Ethernet             up         1000   full      vboxnet0</pre>
    <p>
      In the above example, we can rename "net2" to "vboxnet1" before
      proceeding to plumb the interface. This can be done by executing
      as root:
    </p>
    <pre xml:space="preserve"># dladm rename-link net2 vboxnet1</pre>
    <p>Now plumb all the interfaces using <userinput>ifconfig vboxnet<varname>X</varname> plumb</userinput>, where
        <varname>X</varname> would be 1 in this case. Once the interface is plumbed, it may be configured like any other
      network interface. Refer to the <userinput>ifconfig</userinput> documentation for further details. </p>
    <p>To make the settings for the newly added interfaces persistent across reboots, you will need to edit the files
        <filepath>/etc/inet/netmasks</filepath>, and if you are using NWAM <filepath>/etc/nwam/llp</filepath> and add
      the appropriate entries to set the netmask and static IP for each of those interfaces. The <ph
        conkeyref="vbox-conkeyref-phrases/product-name"/> installer only updates these configuration files for the one
      "vboxnet0" interface it creates by default. </p>
  </body>
  
</topic>
