• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: 小 中 大 | 推荐给好友 上一篇 | 下一篇

在vmware的solaris9.0配置上网备忘...

发布: 2007-7-04 12:06 | 作者: admin | 来源:  网友评论 | 查看: 25次 | 进入软件测试论坛讨论

领测软件测试网 javascript:window.open(this.src);" style="CURSOR: pointer" onload="return imgzoom(this,550)">

环境公司局域网,  代理服务器:168.160.1.3

                         host:168.160.2.51

                         saloris:168.160.2.49  模式: 桥接。

#ifconfig -a

lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICADT< IPv4>mtu 8282 index 1

inet 127.0.0.1 netmask ff000000

pcn0:flags=1000843<UP,BROADCAST,RUNNING<MULTICAST<IPv4 >mtu 1600 index 2

inet 168.160.2.51 netmask ffff0000 boadcast 168.160.255.255

ether 0:c:29:ec:e7:3a

参考网友帖子:(非常感谢)

solaris网络配置
内容:
--------------------------------------------------------------------------------

(1)设置网络地址和子网掩码
1. /etc/hostname.interface
/etc/hostname.interface 文件给网卡进行命名,Interface是网卡的型号,有le、hme等。le是十兆网卡,hme为百兆网卡等等。后面跟一个数字,第一个十兆网卡为le0,第二个为le1;第二个百兆网卡为hme0,第二个为hme1等等。文件的内容是这块网卡的名字,如Sunrise、Sunny。
#more /etc/hostname.le0
Sunrise
# more /etc/hostname.hme0
Sunny
2. /etc/hosts文件
/etc/hosts文件将网卡名与IP地址进行了映射,与/etc/hostname.interface 协同工作,配置本机网卡地址的IP地址。
# more /etc/hosts
127.0.0.1 localhost loghost
172.16.255.1 Sunrise
172.18.255.1 Sunny
系统名不是主机名,主机名是唯一的,要更改主机名,用命令:hostname。
有了/etc/hostname.interface和/etc/hosts两个文件,系统就知道如何配置网卡了,如第一个百兆网卡的名字是Sunny,其对应的地址是172.18.255.1。
3. /etc/netmasks文件
将网络的IP地址与网络地址联系一起,划分子网。如果是处于标准网段,则不需要配置
标准网段:
A类网:0-127(127用于本地地址) 掩码:255..0.0.0
B类网:128-191 掩码:255.255.0.0
C类网:192-223 掩码:255.255.255.0
D类网:224-254(用于多址广播)

要配一个B类地址:172.16.255.1掩码为:255.255.255.0,则在/etc/netmasks文件中写:
172.16.255.0 255.255.255.0
4. ifconfig命令
检测网络端口状态
#ifconfig -a
配置网络端口地址
#ifconfig le0 172.16.255.1 netmask 255.255.255.0
配置网络端口状态
#ifconfig le0 up/down
配置网络端口是否可用
#ifconfig le0 plumb/unplumb
5. ping命令
检测网络状态
测试网络速度
(2)路由和网关
1. /etc/defaulrouter文件
/etc/defaulrouter文件配置系统的缺省路由,防止不必要的路由进程,适用于只有一个路由器通向其它网段的网络。系统安装时并没有该文件,是用户自己创建的。文件内容是缺省路由的地址。
#cat /etc/defaultrouter
172.16.255.254
优点:
占用资源少,只有一条路由条目。
(3)DNS客户端的设置
1. /etc/resolv.conf文件
记录DNS服务器的地址和域名
关键字:
domainname
nameserver
# more /etc/resolv.conf
nameserver 172.16.255.3
domainname sunrise.com.cn

2. /etc/nsswitch.conf文件

记录主机名的搜索顺序等信息
# more /etc/nsswitch.conf
#
# /etc/nsswitch.dns:
#
# An example file that could be copied over to /etc/nsswitch.conf; it uses
# DNS for hosts lookups, otherwise it does not use any other naming service.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.

passwd: files
group: files
# You must also set up the /etc/resolv.conf file for DNS name
# server lookup. See resolv.conf(4).
hosts: files dns
ipnodes: files
…
…

将这个文件的hosts记录配置成hosts: files dns
匿名网友 评论于 2005年07月26日00时07分
标题:参考来自:
内容:http://bbs.chinaunix.net/forum/viewtopic.php?t=582524&show_type=

延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:[email protected] 电话:010-51297073

软件测试 | 领测国际 | ISTQB | ISTQB官网 | TMMi | TMMi认证 | 国际软件测试工程师认证 | 领测软件测试网