gunl

导航

 
solaris 配置网卡地址
2010-06-21 00:41

1. /etc/hostname.interface文件
其中interface代表接口类型,如/etc/hostname.eri0,eri代表接口类型,0为接口编号
另:可以为同一个网络接口分配不同的IP地址,对于一台主机内包含多个“虚拟域”,它们都需要自己的IP地址的情况,在这里我们只需为每个

所需的IP地址创建一个/etc/hostname:eriX:Y文件,其中的X代表物理设备接口,Y代表虚拟的接口编号

2. /etc/nodename文件
包含本地计算机的名字

3. /etc/defaultdomain文件
包含本地主机的域名

4. /etc/defaultrouter文件
包含主机的默认路由地址

5. /etc/hosts[/etc/inet/hosts]文件
包含主机名和主要网络接口的IP地址,还有系统所需要查找的其他网络地址

6. /etc/inet/netmasks
包含着主机的子网掩码

http://www.itqun.net/content-detail/107903.html

Solaris10网卡配置相关文件:
/etc/hostname.xxn:该文件用来定义网络接口,内容只有一项,或者是主机名,或者是与该网口关联的IPv4地址;
/etc/nodename:内容仅有一项,本地主机名;
/etc/inet/hosts:定义主机名和关联的IP地址(重启后,/etc/hosts文件内容与该文件一致);
一。给两块网卡配置同网段的两个地址
系统安装时配置了一个bge0网口,存在/etc/hostname.bge0文件,内容为主机名;
修改其内容为192.168.1.220;
配置第二块网卡bge1,ifconfig bge1 plumb/ifconfig bge1 up;
touch新建/etc/hostname.bge1,并vi内容为:192.168.1.221;
重启机器后,
# more /etc/hostname.bge0
192.168.1.220
# more /etc/hostname.bge1
192.168.1.221
# more /etc/inet/hosts
#
# Internet host table
#
::1     localhost
127.0.0.1       localhost
192.168.1.221   240-sol10       loghost
192.168.1.220   240-sol10       loghost
# more /etc/nodename
240-sol10
# more /etc/hosts
#
# Internet host table
#
::1     localhost
127.0.0.1       localhost
192.168.1.221   240-sol10       loghost
192.168.1.220   240-sol10       loghost
#
# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index
1
inet 127.0.0.1 netmask ff000000
bge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.220 netmask ffffff00 broadcast 192.168.1.255
ether 0:3:ba:53:97:35
bge1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 192.168.1.221 netmask ffffff00 broadcast 192.168.1.255
ether 0:3:ba:53:97:36
#

详细出处参考:http://www.itqun.net/content-detail/107903.html

posted on 2011-08-01 11:27  gunl  阅读(1013)  评论(0编辑  收藏  举报