|
|
|
Switch network configuration modes (enable or disable
an NCP or a Location profile). |
Enable the Automatic NCP: netadm enable -p ncp AutomaticEnable any reactive NCP:
netadm enable -p ncp ncp-name Enable a Location: netadm enable -p loc loc-name |
Enable the DefaultFixed NCP: netadm enable -p ncp DefaultFixed |
List
the status of all network profiles on a system. |
netadm list |
netadm list |
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 |
Set the netmask property. |
View the netmask property: ipadm show-addr |
|
Modify existing network configuration. |
Configure link properties: netcfg "select ncp ncp-name;
select ncu phys ncu-name; set property= value” Configure an IP interface: netcfg "select ncp ncp-name; select ncu ip ncu-name; set property=value” |
dladm set-linkprop -p property= value
linkipadm 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 -m
protocol interface ipadm set-addrprop -p property=value addrobj |
Configure or modify naming services (NIS and DNS). |
Configure DNS from DHCP:
netcfg "create loc loc-name ; set dns-nameservice-configsrc=dhcp"Manually configure 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: netcfg "select..." |
Set parameters for naming services: svccfg and svcadm |
Configure LDAP. |
Only LDAP anonymous
mode works when in reactive mode. To use an LDAP proxy or LDAP
self-modes, enable the DefaultFixed NCP. |
ldapclient or SMF commands to select LDAP. |
Configure default
route. |
For any reactive NCP: netcfg "select ncp ncp-name; select ncu ip ncu-name; set ipv4–default-route=1.1.1.1"Persistently set a default
route: route -p add default routerIP-address |
Persistently set a default route: route -p add default routerIP-addressSet any persistent route:
route -p add -net nIP-address -gateway gIP-address |
Display default route. |
netstat -rn displays all of the active routes
currently in use by the kernel, regardless of how the route was
configured For any reactive NCP configured with a single, per-interface default route: netcfg "select ncp ncp-name;
select ncu ip ncu-name; get ipv4–default-route" route -p show displays all of the static routes that are
associated with the currently active NCP, if it was added with the route
-p add command |
netstat -rn displays all of the active routes currently in use
by the kernel, regardless of how the route was configured route -p show
displays all of the static routes that are associated with the currently active
NCP, if it was added with the route -p add command |
Configure host name
(nodename). |
When the Automatic NCP is enabled, 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) |
Oracle Solaris 11: svccfg -s sets the config/nodename
property of the svc:system/identity:node SMF service to the desired name. Oracle Solaris 11.1: Use the
hostname command. See hostname(1). |
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 |