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>
|
---|
9 | By default Oracle VM VirtualBox provides you with one host-only network
|
---|
10 | interface. Adding more host-only network interfaces on Oracle
|
---|
11 | Solaris hosts requires manual configuration. Here is how to add
|
---|
12 | another host-only network interface.
|
---|
13 | </p>
|
---|
14 | <p>
|
---|
15 | Begin by stopping all running VMs. Then, unplumb the existing
|
---|
16 | "vboxnet0" interface by execute the following command as root:
|
---|
17 | </p>
|
---|
18 | <pre xml:space="preserve"># ifconfig vboxnet0 unplumb</pre>
|
---|
19 | <p>
|
---|
20 | If you have several vboxnet interfaces, you will need to unplumb
|
---|
21 | all of them. Once all vboxnet interfaces are unplumbed, remove the
|
---|
22 | driver by executing the following command as root:
|
---|
23 | </p>
|
---|
24 | <pre xml:space="preserve"># rem_drv vboxnet</pre>
|
---|
25 | <p>
|
---|
26 | Edit the file
|
---|
27 | <filepath>/platform/i86pc/kernel/drv/vboxnet.conf</filepath> and
|
---|
28 | add a line for the new interface we want to add as shown below:
|
---|
29 | </p>
|
---|
30 | <pre xml:space="preserve">name="vboxnet" parent="pseudo" instance=1;
|
---|
31 | name="vboxnet" parent="pseudo" instance=2;</pre>
|
---|
32 | <p>
|
---|
33 | Add as many of these lines as required with each line having a
|
---|
34 | unique instance number.
|
---|
35 | </p>
|
---|
36 | <p>
|
---|
37 | Next, reload the vboxnet driver by executing the following command
|
---|
38 | as root:
|
---|
39 | </p>
|
---|
40 | <pre xml:space="preserve"># add_drv vboxnet</pre>
|
---|
41 | <p>
|
---|
42 | On Oracle Solaris 11.1 and newer hosts you may want to rename the
|
---|
43 | default vanity interface name. To check what name has been
|
---|
44 | assigned, execute:
|
---|
45 | </p>
|
---|
46 | <pre xml:space="preserve">$ dladm show-phys
|
---|
47 | LINK MEDIA STATE SPEED DUPLEX DEVICE
|
---|
48 | net0 Ethernet up 100 full e1000g0
|
---|
49 | net2 Ethernet up 1000 full vboxnet1
|
---|
50 | net1 Ethernet up 1000 full vboxnet0</pre>
|
---|
51 | <p>
|
---|
52 | In the above example, we can rename "net2" to "vboxnet1" before
|
---|
53 | proceeding to plumb the interface. This can be done by executing
|
---|
54 | as root:
|
---|
55 | </p>
|
---|
56 | <pre xml:space="preserve"># dladm rename-link net2 vboxnet1</pre>
|
---|
57 | <p>
|
---|
58 | Now plumb all the interfaces using <userinput>ifconfig
|
---|
59 | vboxnet<varname>X</varname> plumb</userinput>, where
|
---|
60 | <varname>X</varname> would be 1 in this case. Once the
|
---|
61 | interface is plumbed, it may be configured like any other network
|
---|
62 | interface. Refer to the <userinput>ifconfig</userinput> documentation
|
---|
63 | for further details.
|
---|
64 | </p>
|
---|
65 | <p>
|
---|
66 | To make the settings for the newly added interfaces persistent
|
---|
67 | across reboots, you will need to edit the files
|
---|
68 | <filepath>/etc/inet/netmasks</filepath>, and if you are using NWAM
|
---|
69 | <filepath>/etc/nwam/llp</filepath> and add the appropriate entries
|
---|
70 | to set the netmask and static IP for each of those interfaces. The
|
---|
71 | Oracle VM VirtualBox installer only updates these configuration files
|
---|
72 | for the one "vboxnet0" interface it creates by default.
|
---|
73 | </p>
|
---|
74 | </body>
|
---|
75 |
|
---|
76 | </topic>
|
---|