分类: SOLARIS
2013-05-04 05:49:36
Example 3-6 Changing the IP Address and Host Name
This example shows how to change a host's name, IP address of the primary
network interface, and subnet mask. The IP address for the primary network
interface net0 changes from 10.0.0.14 to
192.168.34.100.
# ipadm show-addr ADDROBJ TYPE STATE ADDR lo0/v4 static ok 127.0.0.1/8 net0/v4 static ok 10.0.0.14/24 # ipadm delete-addr net0/v4
# ipadm create-addr -a 192.168.34.100/24 net0
# hostname mynewhostname
# ipadm show-addr
ADDROBJ TYPE STATE ADDR lo0/v4 static ok 127.0.0.1/8 net0/v4 static ok 192.168.34.100/24 # hostname mynewhostname