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

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

Solaris网络管理(原创)

发布: 2007-6-08 22:43 | 作者: seanhe | 来源: | 查看: 41次 | 进入软件测试论坛讨论

领测软件测试网
一、路由和网关
1)通过文件增加
文件:/etc/gateways
格式:<dest. net> <gateway> <netmasks> metric <count>
描述:添加路由表记录
     dest. net 目标网段
     gateway 下一跳路由器的地址
     count 跳数

2)route命令
命令格式:route add|delete [host|net] destination [gateway 
举例:
Add a route
#route add  -net 10.50.3.0 10.168.1.1 1
Delete a route
#route delete -net  10.50.2.0 10.168.1.2
3)缺省路由
文件:/etc/defaultrouter
描述:防止不必要的路由进程
适用于只有一个路由器通向其它网段
单一路由占用较小的路由表资源
4)查看路由
举例:
# netstat -r
Routing Table:
Destination Gateway Flags Ref Use Interface
----------- ---------- ----- --- --- ---------
localhost localhost UH 0 2272 lo0
202.96.0.0 192.168.12.1 U 3 562 le0
10.103.0.0 192.168.12.2 U 3 562 le0

                二、网络地址和掩码
1)文件:/etc/hostname.interface
接口描述:
网卡型号
十兆网卡:le
百兆网卡:hme
2)文件:/etc/hosts
功能描述:
系统名与IP地址的映射
与/etc/hostname.interface 协同工作,配置本机网卡地址
举例:
# more /etc/hosts
127.0.0.1 localhost loghost
10.12.255.1 xiaojg
10.13.255.1 xiaojg
3)文件:/etc/netmasks
功能描述:
将网络的IP地址与网络地址联系一起,划分子网
如果是标准网段,则不需要配置
4)命令:ifconfig
举例:
检测网络端口状态
#ifconfig -a
配置网络端口地址
#ifconfig le0 10.16.25.1 netmask 255.255.255.0
配置网络端口状态
#ifconfig le0 up/down
配置网络端口是否可用
#ifconfig le0 plumb/unplumb
5)文件:/etc/services
功能描述:
网络服务协议的端口号
网络协议的服务类型
举例:
#more /etc/inet/services
ftp-data 20/tcp
ftp 21/tcp
telnet 23/tcp
smtp 25/tcp mail
sunrpc 111/udp rpcbind
sunrpc 111/tcp rpcbind
6)文件:/etc/inetd.conf
功能:管理系统的各种服务
格式:
<service_name>  <socket_type>  <proto>  <flags>  <user>  <server_pathname>  <args>
举例:
# cat /etc/inet/inetd.conf
ftp stream tcp nowait root /usr/sbin/in.ftpd in.ftpd
telnet stream tcp nowait root /usr/sbin/in.telnetd in.telnetd
login stream tcp nowait root /usr/sbin/in.rlogind in.rlogind
talk dgram udp wait root /usr/sbin/in.talkd in.talkd

 race 回复于:2003-10-30 11:32:19
怎么没有DNS部分的内容?

 snowwin 回复于:2003-10-30 11:29:57
good,3q~~

 nanaskylead 回复于:2003-10-30 11:32:00
虽说很简单,但是还是化了心思整理的。支持原创,顶一个!!

 youzhipiao 回复于:2003-10-30 11:55:53
相应斑竹的号召,增加DNS的内容
               三、DNS
1)DNS客户端的配置
文件:etc/resolv.conf
举例:
# more /etc/resolv.conf
nameserver 192.16.25.3
domainname xiaojg.com.cn
文件:/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:     xiaojg
group:      xiaojg
# You must also set up the /etc/resolv.conf file for DNS name
# server lookup.  See resolv.conf(4).
hosts:      xiaojg dns
ipnodes:    xiaojg

命令:nslookup
描述:
用于查询DNS服务器
用于验证客户端的设置
用于下载DNS数据库
举例:
# nslookup
Default Server:  ns.zjhzptt.net.cn
Address:  202.96.96.68

> www.sun.com
Server:  ns.shptt.net.cn
Address:  202.96.96.68

Non-authoritative answer:
Name:    www.sun.com
Address:  192.18.97.241

 zhaosi 回复于:2003-10-30 12:57:28
DNS服务器的配置也加上嘛,顶一下。

 missing-cn 回复于:2003-10-30 12:57:31
[quote:19972f885f="youzhipiao"]相应斑竹的号召,增加DNS的内容
               三、DNS
1)DNS客户端的配置
文件:etc/resolv.conf
举例:
# more /etc/resolv.conf
nameserver 192.16.25.3
domainname xiaojg.com.cn
文件:/etc/nsswitch..........[/quote:19972f885f]
"用于下载DNS数据库 "
请教nslookup是如何下载的?

 may8000 回复于:2003-11-04 12:20:49


延伸阅读

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


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

软件测试 | 领测国际ISTQBISTQB官网TMMiTMMi认证国际软件测试工程师认证领测软件测试网