Configuring Network for Solaris 11 in Virtual Box

Rajind Ruparathna
3 min readSep 22, 2016

--

Hi all, recently I tried Solaris for some tasks at work. Installing Solaris on VirtualBox was not so difficult and there were quite a few resources in the internet. I used the following. http://thegeekdiary.com/installing-oracle-solaris-11-in-virtualbox/

However for configuring the network it was not the same. So here I will note down a few things which I believe might be useful when configuring network for Solaris 11 in Virtual Box.

In Solaris 11 configuring network is not editing few files, unlike in most other operating systems. There are a set of commands we can to create those configurations for us.

We will go through configuring NAT, HostOnly and Bridged Adaptors. First we have to go to Setting for the Solaris VM in VirtualBox and from there to the Network Tab.
Even though eventually we will add three network adaptors, I suggest we start by enabling only one adaptor as it might be hard to figure out which is which inside Solaris one we enable several network adaptors at once and try to configure them inside Solaris.

Configuring Bridge Adaptor

So to start with let’s turn on BridgedAdaptor. Make sure you press OK and save the changes. Now start up the VM and log-in.

Solaris 11 has this concept of “Network Configuration Profiles (ncp)”. There is

1. Automatic — Uses DHCP to obtain network configuration (IP address, router and DNS) from any of the connected ethernet interfaces. Do not support hot swapping of interfaces and IPMP.

2. Manual (DefaultFixed NCP) — interfaces needs to be manually configured using dladm and ipadm commands. Also called as DefaultFixed NCP. Supports hot swapping of interfaces and IPMP.

We want to use Manual profile. You can get a list of these by “netadm list” (network administration) command.

In the about output we can see “Automatic” is disabled and “DefaultFixed” is online. This is because I have already enabled it when installing Solaris. So if you don’t have DefaultFixed online run following commands.

netadm disable -p ncp Automatic netadm enable -p ncp DefaultFixed

Now let’s run “dladm” (data link administration) command. You will see something similar to following.

Now we have to create IP configuration and for that we use “ipadm” (IP administration) command.

ipadm create-ip net0

Here net0 is the name I have given for IP configuration. You can use the LINK name you got as the output of “dladm” command.

To configure the configuration we created. Following command can be used.

ipadm create-addr -T static -a local=192.168.1.190/24 net0/v4

-T specifies either static, dhcp or addrconf (for IPv6) types of addresses. -a specifies address

v4 is used to denote IP v4 but it can be any random string used to identify the interface.

Call To Action

  • Clap. Appreciate and let others find this article.
  • Comment. Share your views on this article.
  • Follow me. Rajind Ruparathna to receive updates on articles like this.
  • Keep in touch. LinkedIn, Twitter

Originally published at notebookbft.wordpress.com on September 22, 2016.

--

--