How to Upgrade from Solaris 10 to Solaris 11: Network Preparation

The aim of this series is to show the experienced Solaris system administrator how to transition from Solaris 10 to Solaris 11 immediately after initial installation of the operating system, as well as offering tips, tricks and insights into Solaris 11, which differs significantly from Solaris 10.

This article will cover the commands that will enable both servers to be networked and able to reach the internet.

I’m using two VMs with the same specification - 2GB RAM, 30GB VMDK, one configured for Solaris 11 and one configured for Solaris 10. I Esc-2 my way through the installs and end up with two VMs - one Solaris 10 and one Solaris 11. I set them both up with no special configuration with regards to networking, naming services, or DHCP. I did select IPv6 during the Solaris 10 installation to have that available should we need it.

I’m running these installs under VMware Fusion 5.0.2 on Mac OS X 10.8. Looking at the networking configuration for these under VMware shows me they are receiving DHCP as part of the following scope.

I will place the two VMs outside of this scope, with the following IP address allocation:

The first step will be logging into the respective servers and changing them from being DHCP-address workstations floating around the network to actual servers we can use to do stuff.

Solaris 10 from OOTB to Useful

Log into sol10lab using the Options → Command Line Login … option on the CDE login screen. Then hit enter and the root prompt will appear

Let’s see exactly what release we are using

So it’s Solaris 10, Update 10 – the latest and greatest at the time of writing. A bit more poking around before any configuration changes are made

Before I do any more poking around I really want to be doing it over an SSH connection to a stable and viable endpoint, so let’s get the network stuff sorted out. Personally, I don’t like the hostname hostname so that can go, and the proposed IP address of 17.16.18.69 can be applied to the interface we have discovered through the use of dladm show-link ise1000g0.

First, to ease my immediate pain:

Second, to erase future pain:

OK – now for the network. Set the nodename

Add an appropriate entry to /etc/hosts for the node

Add an entry to /etc/hostname.<interface> - we queried for the interface via dladm show-link above.

Remove the /etc/dhcp.<interface> file for the interface.

Add an a appropriate entry to /etc/netmasks

Set name service resolution configuration

Add the persistent default gateway

Copy the DNS-based NSS configuration into place.

Bounce the host …

Once it comes back – log back into the console. Just to check it works, ping something

Hurrah! Now we will quickly examine how the static route is stored, as even in Solaris 10 Update 10, we were not using /etc/defaultrouter or /etc/rc2.d/S99dodgy-route-hacks. It still would have worked, but it’s all built into the route c0mmand now via the -p option (for persistence) , and unbeknownst to many it was still in later releases of Solaris 10. I’ll also check routing under Solaris 11 to see if the same principles apply.

Looking at our routing table, we can see the default route

But we didn’t populate /etc/defaultrouter when setting up the box initially. Instead, route -p add was used to add a persistent route. We can prove the existence of this persistent route with route -p show

That routing information is stored in /etc/inet/static_routes

And you pretty much have your new machine on the network. Many more things to do, but we’re here to learn about Solaris 11. Let’s try the same tasks …

Solaris 11 from OOTB to Useful

I know the Solaris 11 box won’t let me, as I’ve read the documentation and root is now a role not a user account, but I’ll still see what it does.

You can see quite clearly that it isn’t pleased with your actions. So, I’ll log in with my user account that I created during the installation of Solaris 11 – toki.

And there we are. Let’s assume the root role and change the hostname.

Solaris 11 sees a lot more of the administrative change moving out of traditional configuration files and into SMF, which at first seemed a little over-engineered for my liking but I’ve found I’m now growing to like it now as it keeps a consistent administrative command composition and interface across Oracle’s products and Operating Systems. Additionally, it provides a single database to poll for system information, and also a single database in which to make changes to that configuration.

Let’s start by checking what is currently within SMF for the hostname of this server. The correct SMF service is svc:/system/identity:node so svccfg can be used to query it.

Use svccfg to change both the config/nodename and config/loopback astrings.

Confirm the results with a listprop config:

Now we must refresh the system/identity:node entry within SMF to make this changes have any effect. So …

The console will spit out

Next comes networking. Solaris 11 comes with support for automatic network configuration, but I’ll be configuring the network manually. In short, the Automatic network profile has to be disabled, and the Manual one enabled. A default OOTB Solaris 11 box booted and configured with reasonable defaults will have a network configuration profile setup something like this:

The DefaultFixed NCP is what we want. We can enable this -

- and then verify that this has been successful with another netadm list:

OK, you’ll also see that the ncu:phys and ncu:ip entries are gone so we have no network – yet.

A quick dladmshow-phys on the box will give us our link name.

ipadm will know nothing of this link at this point however:

The first thing to do is configure a virtual IP interface on top of our net0 interface found whilst poking around above. To do this, issue the following command:

You will now notice that a new virtual IP interface has been created, although it is still down and hasn’t been enabled.

If we add an address to that new interface, it will come online and all will be well.

And now we can ping our Solaris 10 host …

… and add our default route.

All that remains for this to be in the same state as its Solaris 10 cousin is the configuration of name services (/etc/resolv.conf and /etc/nsswitch.*, essentially).

First I will review the current configuration properties for the network/dns/client SMF service.

So, nothing is set up. Add a default domain; I’ll use example.com.

Then verify that it has indeed been updated:

Next a nameserver. There is one locally on my network so I’ll just use that, and a known Google freebie resolver.

And again verify the result:

A final piece of svccfg work required is for name service switch ordering.

Anyway – for now, you do this:

As always, verify:

If it looks good, write out the configuration:

That will write out the nsswitch.conf and resolv.conf files directly from the information you put into SMF. nscfg also has an import option, but I wanted to show the correct way – not the way that will become legacy as more and more config moves into SMF.

Your Solaris 11 box can now see Google:

This article should hopefully have someone who is very experienced at rolling out Solaris 10 servers up to speed on the basic changes required to get the same result using Solaris 11. It has only skimmed the surface of what the OS has to offer – and many more articles will be forthcoming – the next concentrating on ZFS administration.