|
|
|
Switch network configuration modes (enable or disable an NCP or a
Location profile). |
Enable automatic configuration: netadm enable -p ncp AutomaticEnable a user-defined NCP: netadm enable -p ncp ncp-name Enable a
Location profile (for setting system-wide network configuration): netadm enable -p loc loc-name |
Enable manual configuration: netadm enable -p ncp DefaultFixed
|
List the active network profile on the system. |
netadm list |
Running netadm list results in an
error message that says automatic network management is not available and that netadm list
is only supported when automatic network management is active. Or, use the svcprop -p netcfg/active_ncp physical:default
command to determine the current configuration mode. |
Configure link properties. |
netcfg "create ncp ncp-name; create ncu phys ncu-name; set
property=value” |
dladm set-linkprop -p property= value link |
Configure IP interfaces. |
netcfg "create ncp ncp-name; create ncu ip ncu-name; set property=value” |
ipadm create-ip
interface |
Configure IP addresses. |
Static IP: netcfg "select ncp ncp-name; select ncu ip ncu-name; set ipv4–addrsrc=static; set ipv4–addr = 1.1.1.1./24"DHCP: netcfg "create ncp ncp-name; create ncu ip
ncu-name; set ipv4–addrsrc=dhcp" |
IPv4 or IPv6 static address: ipadm create-addr -T static -a IP-address address-objectIPv4 DHCP address: ipadm create-addr -T dhcp
address-object Auto-generated IPv6 address based on a system's MAC address: ipadm create-addr -T addrconf address-object |
Modify existing network
configuration. |
Link properties: netcfg "select ncp ncp-name; select ncu phys ncu-name; set property= value” IP interface: netcfg "select ncp ncp-name; select ncu ip ncu-name;
set property=value” |
dladm set-linkprop -p property datalinkipadm set-prop [-t] -p prop=value[,...] protocol ipadm set-addrprop [-t] —p prop=value[,...] addrobj ipadm set-ifprop -p property=value interface ipadm set-prop -p property=value
protocol ipadm set-addrprop -p value addrobj |
Configure or modify naming services (NIS and DNS). |
DNS from DHCP:
netcfg "create loc loc-name ; set dns-nameservice-configsrc=dhcp"Manual DNS: netcfg "create loc loc-name; set dns-nameservice-configsr=static; set dns-nameservice-servers=1.1.1.1; set dns-nameservice-search=foo.com" For an existing Location,
use netcfg "select..." |
Set parameters for naming services: svccfg and svcadm |
Configure LDAP. |
Only LDAP anonymous
mode works when in automatic mode. To use an LDAP proxy or LDAP
self-modes, enable the DefaultFixed NCP. |
ldapclient or SMF commands to select LDAP. |
Configure default
route. |
netcfg "select ncp ncp-name; select ncu ip ncu-name; set ipv4–default-route=1.1.1.1" |
Set default route: route -p add default routerIP-addressSet any static route:
route -p add -net nIP-address -gateway gIP-address |
Configure a system's host name (also sometimes referred to
as a system's nodename). |
svccfg -s sets the config/nodename property of the svc:system/identity:node SMF service
to the desired name. Refresh and restart the service for the changes to
take affect. |
When the Automatic NCP is enabled on a system, the SMF
service property is only set if the DHCP server does not provide a
value for the nodename/hostname option (DHCP standard option code 12). See nodename(4) |
Import naming
service configuration. |
Configured in the Locations profile. |
/usr/sbin/nscfg import -f FMRInsccfg exports existing legacy files into the
SMF repository. |
Unconfigure and reconfigure a system (including all network configuration). |
Unconfigure an Oracle Solaris
instance: sysconfig unconfigure systemReconfigure an Oracle Solaris instance: sysconfig configure system |