Home > Database > Mysql Tutorial > body text

Solaris11配置静态IP

WBOY
Release: 2016-06-07 15:28:01
Original
1986 people have browsed it

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 
Copy after login

设置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
Copy after login

配置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
Copy after login
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
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!