openindiana下配置静态IP
来源:互联网 发布:数据录入员靠谱吗 编辑:程序博客网 时间:2024/06/10 20:10
Introduction
OpenIndiana 151a is by default installed to use NWAM and DHCP dynamic IPs. In many situations it would be preferred to set up a static IP for the server, something which is difficult to do through nwam. There a few guides to use NWAM for Static IPs (examples: A, B, or C) but none seem straight forward.
GUI Way (easiest)
Using su, sudo or pfexec to acquire the required privileges:
Commands
# svcadm disable svc:/network/physical:nwam
# svcadm enable svc:/network/physical:default
# cp /etc/nsswitch.dns /etc/nsswitch.conf
# network-admin
network-admin
Connections
General
DNS
Hosts
This last command will open a window in gnome in which you can fill in the required values.
Console Way
Commands (Solaris 11 and OpenIndiana 151):
# ipadm create-addr -T static -a 1.2.3.4/24 e1000g0/v4static
#
route -p add default 1.2.3.254
# cp /etc/nsswitch.dns /etc/nsswitch.conf# vi /etc/hosts
# vi /etc/resolv.conf
Commands:
# svcadm disable svc:/network/physical:nwam
# svcadm enable svc:/network/physical:default
# cp /etc/nsswitch.dns /etc/nsswitch.conf
# vi /etc/hosts
# vi /etc/resolv.conf
# vi /etc/defaultrouter
# vi /etc/hostname.NIC
# svcadm restart svc:/network/physical:default
files
The following files need to be edited. Change the parts necessary, where oibox is the current computer name, example.net is the domain name (or workgroup).
# Internet host table
#
127.0
.
0.1
localhost.localdomain localhost.local localhost loghost oibox oibox.local oibox.localdomain oibox.example oibox.example.net
::
1
localhost.localdomain localhost.local localhost loghost oibox oibox.local oibox.localdomain oibox.example oibox.example.net
nameserver
8.8
.
8.8
nameserver
8.8
.
4.4
192.168
.
1.1
Note the file /etc/hostname._NIC_ will be something like /etc/hostname.bnx0 where the suffix is your physical NIC.
192.168
.
1.16
Potential Issues and Workarounds
Typically it is always a good ideas do all this work in a true console (direct keyboard plus screen or a BMC/iLOM/IMM device) as you may lose all networked connectivity to your system.
firewalls
The use of ipfilter (a firewall) can prevent the changes above from working. To check if ipfilter is active
# svcs ipfilter
The following command to disable ipfilter may solve issues in trying to get a static IP to work.
# svcadm disable ipfilter
alternate set of files changes
A more traditional set of changes (similar to what sys-unconfig would do), allowing the system to have multiple IP addresses with different hostnames on each of your physical interfaces. The below assumes you want the server to have Static IP: 192.168.1.16, hostname: oibox, a default route of 192.168.1.1, and to use google's DNS name servers of 8.8.8.8 and 8.8.4.4. This is what I do, it is different than the above "files" section, and is based on information at http://www.outside-the-box.com/?p=185
# Internet host table
#
::
1
oibox.local localhost loghost
127.0
.
0.1
oibox.local localhost loghost
192.168
.
1.16
oibox oibox.example.net
nameserver
8.8
.
8.8
nameserver
8.8
.
4.4
192.168
.
1.1
Note the file /etc/hostname._NIC_ will be something like /etc/hostname.bnx0 where the suffix bnx0, pcn0, nge0, etc. is your physical NIC identifier.
oibox
ssh keys
You may wish to generate a new set of ssh keys to do this you will need to remove the keys, the will be regenerated automatically on next system reboot.
# rm /etc/ssh/*key*
Other
This section needs to be merged with http://wiki.openindiana.org/oi/4.2+Network+management
以上转自 http://wiki.openindiana.org/oi/Static+IP
以上经本人测试通过
- openindiana下配置静态IP
- cenos下静态ip配置
- linux 下配置静态Ip
- Ubuntu下配置静态ip
- centeros下配置静态Ip
- ubuntu 下配置静态ip
- Ubuntu下配置静态IP
- ubuntu下配置静态IP
- Ubuntu下配置静态IP(转载)
- 虚拟机下ubuntu配置静态IP
- ubuntu12.04下 配置静态IP
- ubuntu下配置静态IP上网
- centos下静态ip的配置
- Ubuntu下静态IP地址的配置
- VMware下Ubuntu 14.04静态ip配置
- ubuntu14下配置静态ip地址
- RedHat下配置静态Ip问题
- Linux下静态IP的配置
- Http方法:Get请求与Post请求的区别
- Eclipse配置eclipse.ini
- 指针数组作函数参数
- 强制旋转iPhone界面
- JAVA开源项目
- openindiana下配置静态IP
- 清理web服务器缓存
- 在Visual Studio 2010[VC++]中使用ffmpeg类库
- Pydbg track api
- SVN trunk, branches and tags的使用方法
- 关于ip_free中的一些疑问
- 对于Nexus 7的合作 华硕和Google高层想说啥?
- sdma
- select函数