Solaris 11 配置IP地址

查看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 

root@solaris:~$ ping 10.90.6.93
10.90.6.93 is alive
下面是配置DNS

 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

配置name-server

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

 

转载于:https://www.cnblogs.com/Dev0ps/p/10140988.html

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值