Commonly Used Solaris 11 Network Administration Commands
This cheatsheet provides the basic command syntax to use for some common network administration tasks in Solaris 11. For more details about all of the available options and arguments for each command, see the dladm(1M)
, ipadm(1M)
, and route(1M)
man pages.
Action | Command |
---|---|
Profiles | |
List all of the network profiles on a system. | netadm list |
Switch to the fixed mode by enabling the DefaultFixed profile. | netadm enable -p ncp DefaultFixed |
Datalinks | |
Display all of the datalinks (physical and virtual) on a system. | dladm show-link |
Display all of the physical datalinks on a system. | dladm show-phys |
Display all of the properties for all of the datalinks on a system. | dladm show-linkprop |
Display all of the properties for a specific datalink on a system. | dladm show-linkprop net0 |
Display a specific property for a specific datalink on a system. | dladm show-linkprop mtu net0 |
Display general information about a system's IP interfaces. | ipadm |
Display a system's IP interfaces and addresses. | ipadm show-addr |
Create an IP interface and then configure a static IPv4 address for that interface. | ipadm create-ip net0 ipadm create-addr -a 10.9.8.7/24 net0/addr |
Obtain an IP address from a DHCP server. | ipadm create-ip net0 ipadm create-addr -T dhcp net0/addr |
Create an auto-generated IPv6 address. | ipadm create-ip net0 ipadm create-addr -T addrconf net0/addr |
Change the netmask property for an IP address object name to 8. | ipadm set-addrprop -p prefixlen=8 net3/v4 |
Configure a persistent default route for a system. | route -p add default 192.168.1.1 |
Configure a static route for a system. | route -p add -net 192.168.3.0 -gateway 192.168.1.1 |
Configure a system's host name. | hostname hostname Use the -t option to specify a temporary host name. |
Set a system's domain name. | domainname name-of-domain Use the -t option to specify a temporary host name. |
Naming Services | |
Configure DNS on a system | svccfg -s dns/client setprop config/ nameserver=net_address: 192.168.1.1 svccfg -s dns/client setprop config/domain = astring: "myhost.org" svccfg -s name-service/switch setprop config/host = astring: "files dns" svcadm refresh name-service/switch svcadm refresh dns/client |
NOTE: Some of the following commands include specific parameters and values that are provided as examples only. The parameters that you specify will most likely vary from those that are used in this quick reference.