Oracle Blog

A closer look at using Oracle Solaris

Wednesday May 25, 2011

Solaris 11 introduces a new command for administering IP interfaces - ipadm. ipadm is an upgrade over the venerable ifconfig and unlike ifconfig, changes made with ipadmpersist across reboots. There's no longer a need to fuddle with configuration files.

ifconfig hasn't gone away, but I've been trying to wean myself off of it in favor of the new ipadm command.

An initial look at the usage command for ipadm shows a much cleaner interface that introduces a subcommand:

However, one thing that initially tripped me up in my usage of ipadm was the introduction of the addrobj. An addrobj
is just a user supplied name for an address configured on a network
interface that can later be used to reference that address. It's comprised of 2 parts, the network interface on which the
address is configured and a string of your liking, separated by a
slash. Generally the string you select would describe the address
(v4dhcp, v6static, etc.):

addrobj = <network interface>/<any string>

So, for example:

addrobj = e1000g0/v4static

This addrobj is then used to reference the address. The ipadm subcommands that work with an an addrobj all have "addr" in their name. Likewise, the ipadm subcommands that work with an interface all have "if" in their name.

Typically, the two most common things I do with ifconfig are to configure addresses on my interfaces and list those addresses. Here are the ifconfig commands I use and their ipadm equivalents.

Note, if you plan on using ipadm to configure your network interfaces, disable network/nwam and enable network/physical:default:

New School

This is the command that has taken me the longest to get used to
because there appears to be so much going on here. The ifconfig command doesn't have the option flags (-T and -a in my example) - which makes the usage cleaner. For example, ifconfig infers I want a static address because I've passed it an IP address. The ipadm command is also longer than ifconfig because we're now assigning our address a name (e1000g1/v4static).

List My Interfaces

Old School

To see what IP addresses I have configured on my network interfaces I traditionally used: