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已通:

1
2
3
4
5
6
7
8
9
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

1
2
3
4
5
6
7
8
9
10
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

1
2
3
4
5
6
7
8
9
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

 

posted @   西门运维  阅读(2274)  评论(0编辑  收藏  举报
编辑推荐:
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· AI与.NET技术实操系列(六):基于图像分类模型对图像进行分类
历史上的今天:
2017-12-19 H3c交换机配置端口镜像详情
点击右上角即可分享
微信分享提示