Oracle Solaris 11.3 Network Administration Cheatsheet

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Oracle Solaris 11.

3 Network Administration Cheatsheet


This cheatsheet includes examples of common network administration commands. For complete details, see the dladm(1M),
ipadm(1M), and route(1M) man pages.

Note - Some of the following commands include parameters and values that are provided as examples only.

Commonly Used Network Administration Commands

Action Command
Administering 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
Administering Datalinks
Display all the datalinks (physical and virtual) on a system. # dladm show-link
Display all the physical datalinks on a system. # dladm show-phys
Display all the properties for all the datalinks on a system. # dladm show-linkprop
Display all 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 -p mtu net0
Administering IP Interfaces and Addresses
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 for an IP address object name (net3/v4) 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 persistent default route by specifying a name. # route -p add 9.9.9.9 3.3.3.9 -name route1
persistent: route add 9.9.9.9 3.3.3.9 -name route1
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
Set a system's domain name. # domainname name-of-domain
Administering Naming Services
Configure DNS for 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
# svcadm enable dns/client

E60380, July 2017


Oracle Solaris 11.3 Network Administration Cheatsheet

Commonly Used IP Administration Commands

Action Command
Administering TCP
Display TCP protocol properties. # ipadm show-prop tcp
Assign values to protocol properties. # ipadm set-prop [-t] -p property=value[,...] protocol
Remove one value from a set of values for a given property. # ipadm set-prop -p property-=value2
Reset a specific protocol property to its default value. # ipadm reset-prop -p property protocol
Enable packet forwarding for all IPv4 traffic on a system. # ipadm set-prop -p forwarding=on ipv4
Enable packet forwarding for all IPv6 traffic on a system. # ipadm set-prop -p forwarding=on ipv6
Display the lowest port number for a non-privileged port. # ipadm show-prop -p smallest-nonpriv-port tcp
Add a port to the extra privileged ports. # ipadm set-prop -p extra-priv-ports+=3001 tcp
Remove a privileged port. # ipadm set-prop -p extra-priv-ports-=4045 tcp
Display the ECN property. # ipadm show-prop -p ecn tcp
Add an algorithm for congestion control in the TCP protocol. # ipadm set-prop -p cong-enabled+=algorithm tcp
Remove an algorithm for congestion control in the TCP protocol. # ipadm set-prop -p cong-enabled-=algorithm tcp
Replace the default algorithm for congestion control in the TCP protocol. # ipadm set-prop -p cong-default=algorithm tcp
Display the algorithm currently used by UDP sockets. # ipadm show-prop -p reuseport-lbalg udp
Set the value of the TCP receive buffer size. # ipadm set-prop -p recv-buf=value tcp
Display information about IP interfaces in a system. # ipadm show-if
Display information about IP interfaces and addresses in a system. # ipadm show-addr
Administering IPMP Interfaces
Create an IPMP interface. # ipadm create-ipmp ipmp-interface
Create an underlying IP interface that can be added to the IPMP interface. # ipadm create-ip under-interface
Add the underlying IP interfaces to the IPMP interface. # ipadm add-ipmp -i under-interface1 [-i under-interface2
...] ipmp-interface
Set DHCP to manage and configure the data address for the IPMP interface. # ipadm create-addr -T dhcp ipmp-interface
Set DHCP to manage the test addresses of the underlying interfaces in an IPMP # ipadm create-addr -T dhcp under-interface
group for probe-based failure detection.
Set one of the underlying interface as a standby interface. # ipadm set-ifprop -p standby=on -m ip under-interface
Remove the data address from an IP interface. # ipadm delete-addr addrobj
Remove one or more interfaces from an IPMP group. # ipadm remove-ipmp -i under-interface[ -i under-interface
...] ipmp-interface
Display the list of data addresses. # ipadm show-addr ipmp-interface
Display the list of test addresses. # ipadm show-addr
Move an interface to a different IPMP group. # ipadm add-ipmp -i under-interface ipmp-interface
Remove the IP interfaces from an IPMP group. # ipadm add-ipmp -i under-interface ipmp-interface
Remove an IPMP interface. # ipadm delete-ipmp ipmp-interface
Administering IP Tunnel Interfaces
Create an IP interface over an IP tunnel. # ipadm create-ip tunnel-interface
Assign local and remote IP addresses to a tunnel interface. # ipadm create-addr [-t] -a
local=address,remote=address interface
Unplumb the IP interface that is configured over the tunnel. # ipadm delete-ip tunnel-link

E60380, July 2017


Oracle Solaris 11.3 Network Administration Cheatsheet

Commonly Used Datalink Administration Commands

Component Action Syntax Example


Administering Virtual Networks
VNIC Create dladm create-vnic [-t] [-f] -l link [-R root-dir] # dladm create-vnic -l net0 vnic1
[-m value | auto | {factory [-n slot-identifier]} |
{vrrp -A {inet | inet6} -V vrid} | {random [-r # dladm create-vnic -l net0 -m factory -n 1 hello0
prefix]}] [-v vlan-id[,pvlan-svid[,pvlan-type]]] [-P
where -n specifies the a factory MAC address slot to be used.
pkey] [-p prop=value[,...]] vnic-link
# dladm create-vnic -m vrrp -V 21 -A inet6 -l net0
vnic0
where -A specifies the address family and -V specifies the virtual router
ID (VRID) for assigning a virtual MAC address to the VRRP VNIC.
Display dladm show-vnic [–P | {–z zone[,..]}] [[–p] –o # dladm show-vnic
field[,..]] [–l link] [vnic-link]
Modify dladm modify-vnic [–t] [–R root-dir] –l link] [– # dladm modify-vnic -l net1 -m 2:8:20:00:01:02 vnic0
m value | auto | {factory [–n slot-identifier]} |
{vrrp –A {inet | inet6} –V vrid} | {random [–r where -m specifies the VNIC's MAC address based on the specified
prefix]}] [–v vlan-id] {vnic-link,[vnic-link ,...] | value or keyword.
–L source-link}
# dladm modify-vnic -l net1 -L net0
where -l specifies the datalink to which the VNICs need to be moved
and -L specifies the source datalink.
Delete dladm delete-vnic [-t] [-R root-dir] vnic-link # dladm delete-vnic vnic0
VLAN VNIC Create dladm create-vnic -v vlan-id -l link vnic-link # dladm create-vnic -v 101 -l net0 vnic1
Modify dladm modify-vnic -v vlan-id -L source-link # dladm modify-vnic -v 123 -L net0
PVLAN Create dladm create-vnic -v vlan-id,pvlan-svid,pvlan-type # dladm create-vnic -v 4,110,community -l net1 vnic2
VNIC -l link vnic-link
VF VNIC Create dladm create-vnic -p iov=value -l link vfvnic-link # dladm create-vnic -p iov=on -l net0 vfvnic1
IPoIB VNIC Create dladm create-vnic -l link -P pkey vnic-link # dladm create-vnic -l net4 -P 0xffff ipoib_vnic0
Etherstub Create dladm create-etherstub [–t] [–R root-dir] # dladm create-etherstub etherstub0
etherstub
Display dladm show-etherstub [–Z] [–z zone[,...]] # dladm show-etherstub
[etherstub ]
Delete dladm delete-etherstub [– t] [–R root-dir] # dladm delete-etherstub etherstub0
etherstub
VXLAN Create dladm create-vxlan [–t] [–R root-dir] –p # dladm create-vxlan -p addr=10.10.11.1,vni=10 vxlan1
vni=vxlan id,addr=ip_address [,prop=value[,...] ]
vxlan-link
Display dladm show-vxlan [–P] [[–p] –o field[,...]] # dladm show-vxlan
[vxlan-link]
Delete dladm delete-vxlan [-t] [-R root-dir] vxlan-link # dladm delete-vxlan vxlan1
Administering Aggregations
Trunk Create dladm create-aggr [-t] [ -R root-dir] -m mode] # dladm create-aggr -m trunk -L LACP-mode -l net0 -l
aggregation [-P policy] [ -L lacpmode] [-T time] [-u address] net1 aggr0
-l link1 [ -l link2...] aggr-link
Add links dladm add-aggr -l link1 [-l link2...] aggr-link # dladm add-aggr -l net3 aggr0
Remove a dladm remove-aggr -l link aggr-link # dladm remove-aggr -l net3 aggr0
link
Modify dladm modify-aggr [–t] [–R root-dir] [–m mode] # dladm modify-aggr -L active -T short aggr0
[–P policy] [–L lacpmode] [–T time] [–u address]
aggr-link

E60380, July 2017


Oracle Solaris 11.3 Network Administration Cheatsheet
Component Action Syntax Example
Display dladm show-aggr [–PLxZSCv] [[–p] –o field[,...]] # dladm show-aggr
[–z zone[,...]] [aggr-link]
Delete dladm delete-aggr [-t] [-R root-dir] aggr-link # dladm delete-aggr aggr0
DLMP Create dladm create-aggr -m dlmp -l link1 [-l link2...] # dladm create-aggr -m dlmp -l net0 -l net1 -l net2
aggregation aggr-link aggr0
Configure dladm set-linkprop -p probe-ip=+ aggr # dladm set-linkprop -p probe-ip=+ aggr1
probe-
based failure dladm set-linkprop -p probe-ip=[source[,...]]
detection +[target[,...]] aggr
Administering VLANs
VLAN Create dladm create-vlan [-ft] [-R root-dir] -l ether-link # dladm create-vlan -l net0 -v 123 tech0
-v vid[,pvlan-svid[,pvlan-type]] [vlan-link]
Display dladm show-vlan [–PZ] [[–p] –o field[,...]] [–z # dladm show-vlan
zone[,...]] [vlan-link ]
Modify dladm modify-vlan [–t] [–R root-dir] [–l ether- # dladm modify-vlan -v 123 web1
link] [–v vid[,pvlan-svid[,pvlan-type]] [–f]] {vlan-
link,[vlan-link,...] | –L source-ether-link} # dladm modify-vlan -l net1 -L net4
# dladm modify-vlan -l net3 vlan1,vlan2,vlan3
Delete dladm delete-vlan vlan-link # dladm delete-vlan vlan1
PVLAN Create dladm create-vlan -v vlan-id,pvlan-svid,[pvlan- # dladm create-vlan -v 3,100,isolated -l net0 vlan1
type] [vlan-link]
# dladm create-vlan -v 3,100 -l net0 vlan1
Modify dladm modify-vlan [–t] [–R root-dir] –v vid,pvlan- # dladm modify-vlan -v 15,103,community vlan1
svid[,pvlan-type] vlan-link
Administering Bridges
Bridge Create dladm create-bridge [ –P protect] [–R root-dir] # dladm create-bridge -P stp -d 12 -l net0 -l net1
[ –p priority] [ –m max-age] [ –h hello-time] [ – brooklyn
d forward-delay] [ –f force-protocol] [–l link...]
bridge-name
Add links dladm add-bridge [-R root-dir] -l link [-l # dladm add-bridge -l net2 brooklyn
link...]bridge-name
Modify dladm modify-bridge [ –P protect] [–R root-dir] # dladm modify-bridge -P stp brooklyn
[ –p priority] [ –m max-age] [ –h hello-time] [ –d
forward-delay] [ –f force-protocol] [–l link...]
Display dladm show-bridge [–flt] [–s [–i interval]] [[–p] # dladm show-bridge
–o field,...] [bridge-name]
Remove links dladm remove-bridge [–R root-dir] –l link [– l # dladm remove-bridge -l net0 -l net1 -l net2 charles
link...] bridge-name
Delete Bridge dladm delete-bridge [–R root-dir] bridge-name # dladm delete-bridge coronado
Setting Link Properties
Link Set dladm set-linkprop [–t] [–R root-dir] –p # dladm set-linkprop -p bwshare=40 vnic1
Properties prop=value[,...] link
# dladm set-linkprop -p iov=on net0
Reset dladm reset-linkprop [–t] [–R root-dir] [–p # dladm reset-linkprop -p stp_priority brooklyn
prop,...] link
# dladm reset-linkprop -p protection vnic0
Display dladm show-linkprop [–HPZ] [[–c] –o field[,...]] # dladm show-linkprop -p etsbw-lcl,etsbw-rmt,etsbw-
[– p prop[,...]] [–z zone[,...]] [link] lcl-advice vnic1
Administering Physical Links
Physical links Display dladm show-phys [-PZ] [-Lmv] [[-p] -o # dladm show-phys -m net0
field[,...]] [-H] [-z zone[,...]] [[-D [dcb-
feature]] [-lr]] [-G] [phys-link] where -m specifies the list of factory MAC addresses, their slot
identifiers, and their availability.

# dladm show-phys -o LINK,VFS-INUSE

E60380, July 2017


Oracle Solaris 11.3 Network Administration Cheatsheet
Component Action Syntax Example
Delete dladm delete-phys phys-link # dladm delete-phys mgmt0

Copyright © 2015, 2017, Oracle and/or its affiliates. All rights reserved.
Copyright © 2015, 2017, Oracle et/ou ses affiliés. Tous droits réservés.

E60380, July 2017

You might also like