solaris11 ip地址配置

 

本文转载:http://wodexinlihua1.blog.163.com/blog/static/12396810820129993613817/

1.首先的确定solaris为手动配置模式

#netadm list

可以看出是手动还是自动,如果是自动,切换到手动。

#netadm enable -p ncp DefaultFixed

#netadm list

如果出现

netadm: DefaultFixed NCP is enabled;  
 automatic network management is not available.  
 netadm list' is only supported when automatic network management is active.

说明是手动状态。

创建net0

#ipadm create-ip net0

查看ip:

# ipadm show-addr

我的显示

net0/v4  192.168.1.250

如果想更改可以使用

#ipadm delete-addr net0/v4

命令删除,

#ipadm create-addr -T static -a 192.168.1.200/24 net0/v4

更改ip

如果想设置网关可以使用命令

#route -p add default 192.168.1.1

删除网关

#route delete default 192.168.1.1

 

 

 

 

本文转自:http://blog.csdn.net/dongxuebin/article/details/7793359

solaris11的ip配置找了好久,都没有什么用,基本上全是挂羊头卖狗肉的东西,打着solaris11的标题,讲solaris10的配置,百度了一个上午全是lolaris10的,各个写的很简单,搞的我都羞愧了,恶心着接着看,看到最后就知道这帮混蛋肯定没有成功,后来只能求助翻墙(伟大的绿色长城),最后在google里找到了Rachmat Febrianto大神的blog,终于成功了,下面讲解下我配置的过程。

不多说了我们开始吧

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

验证NCP

  1. netadm list
netadm list
  1. netadm enable -p ncp DefaultFixed
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.
 netadm list
 netadm: DefaultFixed NCP is enabled;
 automatic network management is not available.
 netadm list' is only supported when automatic network management is active.
3.确认要配置的接口

  1. # dladm show-phys
 # 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
 # ipadm create-ip net0
 # ipadm create-addr -T static -a 192.168.56.200/24 net0/v4
 # ipadm show-addr
5.配置网关

  1. # route -p add default 12.34.56.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
 root@solaris:~# svccfg -s dns/client
 svc:/network/dns/client> setprop config/nameserver = (8.8.8.8 8.8.4.4)
 svc:/network/dns/client> listprop config
 config                      application
 config/value_authorization astring     solaris.smf.value.name-service.dns.client
 config/nameserver          net_address 8.8.8.8 8.8.4.4
 svc:/network/dns/client> exit
 root@solaris:~#
 root@solaris:~# svcadm refresh dns/client
 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
 root@solaris:~# svccfg -s name-service/switch
 svc:/system/name-service/switch> setprop config/host = "files dns"
 svc:/system/name-service/switch> listprop config
 config                      application
 config/default             astring     files
 config/value_authorization astring     solaris.smf.value.name-service.switch
 config/printer             astring     "user files"
 config/host                astring     "files dns"
 svc:/system/name-service/switch> exit

8.最关键一步验证

  1. root@solaris:~# ping google.com
  2. google.com is alive
 root@solaris:~# ping google.com
 google.com is alive

通过这些步骤,solaris11终于可以上网了, 大笑 大笑 大笑 大笑 大笑 大笑 大笑 大笑 大笑 大笑 大笑

顺便说一句:感谢制作翻墙软件的各个大侠们。

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值