查看ip
ipadm show-addr
删除IP地址
ipadm delete-addr net0/v4
配置IP地址
ipadm create-addr –T static –a local=10.90.2.X/24 net0/v4
网关:
临时网关
route -p add default 10.90.2.254
永久生效网关:
#vi /etc/defaultrouter 添加网关地址
10.90.2.254
测试ip已通:
root@solaris:~$ ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 net0: flags=100001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,PHYSRUNNING> mtu 1500 index 2 inet 10.90.6.114 netmask ffffff00 broadcast 10.90.6.255 lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1 inet6 ::1/128 net0: flags=120002000840<RUNNING,MULTICAST,IPv6,PHYSRUNNING> mtu 1500 index 2 inet6 ::/0