Oracle Solaris 11.x IPv4 Network Configuration
Two options for configuring the network in Solaris 11: Manual and Automatic.
Automatic: “Reactive Network Configuration” formerly known as NWAM (Network Auto-Magic)
Manual Configuration: dladm and ipadm
Reactive Network Configuration
Reactive Network Configuration is mainly use in desktops, whereas the fixed network configuration is used on servers. If Solaris is installed using the Live Media installer, the network is automatically configured using the reactive network configuration. In the Text Installer, you are given an option of selecting either an automatic or manual network configuration.
How to Diable Reactive Network Configuration:
# netadm enable -p ncp DefaultFixed
How to Enable Reactive Network Configuration:
# netadm enable -p ncp Automatic
Manual Network Configuration
dladm – data link administration
ipadm – IP interface administration
netadm – NCP (Network Configuration Profile) administration
netcfg – NCP/NCU (Network Configuration Units) location administration
NCPs are made up of NCU.
ipadm is used to administer the network IP interfaces, list of common subcommands:
# ipadm create-ip – Create an IP interface.
# ipadm delete-ip – Deletes an IP interface.
# ipadm show-if – Shows network interfaces configuration information.
# ipadm create-addr – Creates a static IPv4 or IPv6 address on the interface.
# ipadm delete-addr – Deletes all addresses on the specified interface.
# ipadm show-add – Shows address information.
ipadm replaces ifconfig, ifconfig is still available but is deprecated.
Before proceeding with the manual method of configuring the network, ensure the system is using the manual network, use netadm command to check:
# netadm list
TYPE PROFILE STATE
ncp Automatic online
ncu:phys net0 online
ncu:ip net0 online
ncp DefaultFixed disabled
loc NoNet offline
loc Automatic online
loc DefaultFixed offline
From the output above, the Automatic profile state is online, the system is using the automatic network configuration option.
To change the network configuration option to manual, type the command below:
# netadm enable -p ncp DefaultFixed
Enabling ncp 'DefaultFixed'
Verify that the DefaultFixed profile is online and Automatic profile is disabled.
# netadm list
TYPE PROFILE STATE
ncp Automatic disabled
ncp DefaultFixed online
loc NoNet offline
loc Automatic offline
loc DefaultFixed offline
Identify the Physical Network Interface:
# dladm show-link
LINK CLASS MTU STATE OVER
net0 phys 1500 up --
net1 phys 1500 up --
Network Data-Link names starts with net0, net1, net2 …
Class can be phys, vlan, bridge, aggr …
To show the device name, run: dladm show-phys
# dladm show-phys
LINK MEDIA STATE SPEED DUPLEX DEVICE
net0 Ethernet up 1000 full e1000g0
net1 Ethernet up 1000 full e1000g1
e1000g0 is a device name for one of Intel’s NIC.
To show the NIC MAC Addresses:
# dladm show-linkprop -p mac-address
Example of Manual Configuration of net1 IP Address to:
192.168.12.13/255.255.255.0
1. Verify that the DefaultFixed profile is online (netadm list).
2. Use ipadm create-addr
Options:
-T specifies the Type: static or dhcp
-a specifies the IP address
# ipadm create-addr -T static -a 192.168.12.13/24 net1/v4
3. Verify the IP address of net1:
# ipadm show-addr net1
Other Command Examples:
How to Configure net0 as DHCP:
# ipadm create-addr -T dhcp net0/v4
How to Bring Down an IP Interface:
# ipadm down-addr e1000g0/v4
How to Bring Up an IP Interface:
# ipadm up-addr e1000g0/v4
How to Delete an IP Interface:
# ipadm delete-ip e1000g0/v4