Switch to manual network configuration:
# netadm enable –p ncp defaultfixed
Show physical network interfaces:
# dladm show-phys
Create interface with static IPv4 configuration:
# ipadm create-ip net0
# ipadm create-addr –T static –a local=10.9.8.7/24 net0/addr # ipadm show-addr
Create interface with DHCP configuration:
# ipadm create-ip net0
# ipadm create-addr –T dhcp net0/addr
Create interface with auto-generated IPv6 configuration:
# ipadm create-ip net0
# ipadm create-addr –T addrconf net0/addr
# ipadm show-if
# ipadm show-addr
# ipadm create-ip net3
# ipadm create-addr -T static -a 192.168.0.203/24 net3/v4
# ipadm down-addr net3/v4
# ipadm up-addr net3/v4
# ipadm delete-addr net3/v4
Configure default route:
# route –p add default 1.1.1.1
Activate DNS configuration:
# 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
Activate DNS configuration
(alternate approach by editing /etc/resolv.conf and /etc/nsswitch.conf and then importing these modifications into SMF)
# nscfg –f svc:/system/name-service/switch:default # nscfg –f svc:/network/dns/client:default
# svcadm refresh dns/client
NWAM!!!
Create a network configuration profile:
# netcfg create ncp datacenter
# netcfg
netcfg> select ncp datacenter
netcfg:ncp:datacenter> create ncu phys net0
Created ncu ‘net0’. Walking properties ...
ip-version (ipv4,ipv6) [ipv4|ipv6]> ipv4
ipv4-addsrc (dhcp) [dhcp|static]> static
ipv4-addr> 192.168.1.27
ipv4-default-route> 192.168.1.1
netcfg:ncp:datacenter:ncu:net0> end
Committed changes
netcfg:ncp:datacenter> exit
----
ipadm show-ifprop net0
ipadm set-ifprop -m ipv4 -p forwarding=off net0