summaryrefslogtreecommitdiff
path: root/doc/manual/en_US/dita/topics/addhostonlysolaris.dita
blob: c02ad46298e80d4c31125174e8c81e4b8b170418 (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?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 Oracle VM VirtualBox 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
      Oracle VM VirtualBox installer only updates these configuration files
      for the one "vboxnet0" interface it creates by default.
    </p>
  </body>
  
</topic>