solaris网络管理基础培训( 二 )


user 表示调用服务的用户名 。
server_pathname 表示inetd在响应相关服务请求时必须调用的 服务程序的完整路径名 。
Args 该域包括服务的程序所使用的命令行参数 。即以程序名开 始 , 然后跟随用户设置的参数 。

第三章 路由和网关

1. /etc/defaulrouter文件

配置缺省网关
防止不必要的路由进程
适用于只有一个路由器通向其它网段
单一路由占用较小的路由表资源

该文件保存了缺省路由得信息 。系统安装时并没有该文件 , 是用户自己创建的 。文件内容是缺省路由的地址 。
#cat /etc/defaultrouter
172.16.255.254

优点:
占用资源少 , 只有一条路由条目 。

2. /etc/gateways文件

路由表文件
net gateway metric
dest. net 目标网段
router 下一跳路由器的地址
count 跳数

3. route命令

route add|delete [host|net] destination [gateway ]
Add a route
#route add net 128.50.3.0 192.168.1.1 1
Delete a route
#route delete net 128.50.2.0 192.168.12.2

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
#
Destination 目标网络或主机
Gateway 转发数据包的主机
Flags 这条路由的状态 , 这个参数有这样几个选项:
U 端口处于激活状态(up)
H 目标是个主机 , 而不是网段

Ref 同一个网络接口地址拥有的路由条目数量
Use 通过这条路由的包数量 , 对于localhost来说 , 这个数字代表 所有接收的包数量
Interface 路由的网络接口

第四章 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

3. nslookup命令

用于查询DNS服务器
用于验证客户端的设置
用于下载DNS数据库

# nslookup
Default Server: ns.zjhzptt.net.cn
Address: 202.96.96.68

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

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

>
启动时 , nslookup缺省地以本地服务器为目标 。响应中包括目标服务器的名字和地址 。
>是提示符 , 这意味着可以开始发送名字服务询问或配置 。

请大家好好学习 , 在为新人指点 , 我们一起努力

推荐阅读