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