Oracle Solaris 11 配置网络

1.从自动网络配置模式转换为手动配置模式

   验证NCP

[html]  view plain copy
  1. netadm list  
[html]  view plain copy
  1. netadm enable -p ncp DefaultFixed  
2.确认DefaultFixed模式可用

[html]  view plain copy
  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.确认要配置的接口

[html]  view plain copy
  1. # dladm show-phys  
4.配置net0

[html]  view plain copy
  1. # ipadm create-ip net0  
  2. # ipadm create-addr -T static -a 192.168.56.200/24 net0/v4  
  3. # ipadm show-addr  
5.配置网关

[html]  view plain copy
  1. # route -p add default 12.34.56.1  
6.配置DNS

[html]  view plain copy
  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

[html]  view plain copy
  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.最关键一步验证

[html]  view plain copy
  1. root@solaris:~# ping google.com  
  2. google.com is alive  

通过这些步骤,solaris11终于可以上网了
  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值