首页 > 数据库 > mysql教程 > Solaris11配置静态IP

Solaris11配置静态IP

WBOY
发布: 2016-06-07 15:28:01
原创
2024 人浏览过

Oracle Solaris11安装好默认是DHCP的,禁用DHCP。 netadm enable -p ncp DefaultFixed 设置net0(公网)、net1(私网)和网关 ipadm create-ip net0ipadm create-addr -T static -a 192.168.1.61/24 net0/v4staticroute -p add default 192.168.1.1ipadm create-

Oracle Solaris11安装好默认是DHCP的,禁用DHCP。

netadm enable -p ncp DefaultFixed 
登录后复制

设置net0(公网)、net1(私网)和网关

ipadm create-ip net0
ipadm create-addr -T static -a 192.168.1.61/24 net0/v4static
route -p add default 192.168.1.1
ipadm create-ip net1
ipadm create-addr -T static -a 172.168.1.61/24 net1/v4static
登录后复制

配置DNS

root@vzwc1:~# svccfg
svc:> select name-service/switch
svc:/system/name-service/switch> setprop config/host = astring: "files dns"
svc:/system/name-service/switch> setprop config/ipnodes = astring:  "files dns"
svc:/system/name-service/switch> select name-service/switch:default
svc:/system/name-service/switch:default> refresh
svc:/system/name-service/switch:default> validate
svc:/system/name-service/switch:default> exit
登录后复制
oracle@vzwc1:~/.ssh$ ifconfig -a                                                                                                                                                                                                    
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
net0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 192.168.1.61 netmask ffffff00 broadcast 192.168.1.255
net1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 172.168.1.61 netmask ffffff00 broadcast 172.168.1.255
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
        inet6 ::1/128 
net0: flags=20002000840<RUNNING,MULTICAST,IPv6> mtu 1500 index 2
        inet6 ::/0 
net1: flags=20002000840<RUNNING,MULTICAST,IPv6> mtu 1500 index 3
        inet6 ::/0 
oracle@vzwc1:~/.ssh$                                                                                                                                                                                                                
oracle@vzwc1:~/.ssh$                                                                                                                                                                                                                
oracle@vzwc1:~/.ssh$ ping -s www.baidu.com                                                                                                                                                                                          
PING www.baidu.com: 56 data bytes
64 bytes from 115.239.210.26: icmp_seq=0. time=11.186 ms
64 bytes from 115.239.210.26: icmp_seq=1. time=11.315 ms
64 bytes from 115.239.210.26: icmp_seq=2. time=10.247 ms
^C
----www.baidu.com PING Statistics----
3 packets transmitted, 3 packets received, 0% packet loss
round-trip (ms)  min/avg/max/stddev = 10.247/10.916/11.315/0.583
登录后复制
相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板