Oracle Solaris 11较之以前SUN的Solaris 10有很大的改变,现在把Solaris 11的IP配置转载如下,以供参考:
1.从自动网络配置模式转换为手动配置模式
验证NCP
1.netadm list
1.netadm enable -p ncp DefaultFixed
2.确认DefaultFixed模式可用
1.netadm list
2.netadm: DefaultFixed NCP is enabled;
3.automatic network management is not available.
4.netadm list' is only supported when automatic network management is active.
3.确认要配置的接口
1.# dladm show-phys
4.配置net0
1.# ipadm create-ip net0
2.# ipadm create-addr -T static -a 192.168.56.200/24 net0/v4
3.# ipadm show-addr
5.配置网关
1.# route -p add default 12.34.56.1
6.配置DNS
1.root@solaris:~# svccfg -s dns/client
2.svc:/network/dns/client> setprop config/nameserver = (8.8.8.8 8.8.4.4)
3.svc:/network/dns/client> listprop config
4.config application
5.config/value_authorization astring solaris.smf.value.name-service.dns.client
6.config/nameserver net_address 8.8.8.8 8.8.4.4
7.svc:/network/dns/client> exit
8.root@solaris:~#
9.root@solaris:~# svcadm refresh dns/client
10.root@solaris:~# svcadm restart dns/client
7.配置name-server
1.root@solaris:~# svccfg -s name-service/switch
2.svc:/system/name-service/switch> setprop config/host = "files dns"
3.svc:/system/name-service/switch> listprop config
4.config application
5.config/default astring files
6.config/value_authorization astring solaris.smf.value.name-service.switch
7.config/printer astring "user files"
8.config/host astring "files dns"
9.svc:/system/name-service/switch> exit
8.最关键一步验证
1.root@solaris:~# ping google.com
2.google.com is alive
转载于:https://blog.51cto.com/lujiesky/1150035