Solaris 网络配置

来源:岁月联盟 编辑:zhu 时间:2008-03-09
Solaris 网络配置内容简介:主机名为sampdt,ip 10.1.1.1 1 /etc/hosts 主机名解析 # # Internet host table # 127.0.0.1 localhost 10.1.1.1 sampdt loghost 10.1.1.46 test.china.org 10.1.1.3 sidemo 2 /etc/hostmane.hme0 网络 接口名 sampdt 3 /etc/netma 主机名为sampdt,ip 10.1.1.1
  
  1 /etc/hosts 主机名解析
  #
  # Internet host table
  #
  127.0.0.1 localhost
  10.1.1.1 sampdt loghost
  10.1.1.46 test.china.org
  10.1.1.3 sidemo
  2 /etc/hostmane.hme0 网络接口名
  sampdt
  3 /etc/netmasks 网络掩码
  4 /etc/inetd.conf 服务项目定义
  5 /etc/defaultroot 设定路由
  6 /etc/nsswitch.files 设定名字搜索顺序
  7 /etc/defaultrouter 缺省路由
  
  做为DNS服务器
  建立/etc/named.boot
  named.boot格式:
  directory /etc/namedb
  cache . named.root
  primary 0.0.127.in-addr.arpa named.local
  primary domain name file
  
  
  远程访问命令
  1. rlogin 在远程机上注册
  格式 : rlogin hostname -l username
  2. rsh 在远程机上执行一个程序
  格式 : rsh hostname -l username order
  3. rcp 在远程系统之间拷贝文件
  格式 : rsh host:filename filename
  
  
  访问鉴别相关文件
  当rlogin,rsh,rcp命令时,有几个文件对网络安全是很重要的.
  /etc/passwd
  如远程系统的口令文件有本地用户的登记项,否则必须使用 [-l] 选项以指明不同用户,可支持root用户。
  $home/.rhosts
  rlogin,rsh,rcp首先检查用户主目录下的.rhosts文件,如主机及用户被列在文件中,则此用户为可信任主机,不需口令即可登录,如远程鉴
  别失败,则正常询问口令
  /etc/hosts.equiv
  作用与.rhosts 文件类似,文件中列出用户对于本机为可信任用户,不需口令即可登录(除超级用户)
  
  
  网络监控
  1.rusers 标识网络上注册用户
  格式:rusers -la
  2.rup 标识网络上主机
  命令格式:rup
  3.ping 检测主机连接状况
  命令格式:ping [hostname|IP address]
  4.spray ping命令格式为低层协议,spray使用高层协议
  命令格式:spray hostname
  5.netstat 显示与网络有关的各种数据结构
  命令格式:netstat -[r| i]n
  -r :显示路由信息 -i :显示接口信息
  6.ifconfig 显示网络接口
  命令格式:ifconfig -a
  其中 lo0: 本机自回馈接口 le0: 10M接口 hme0:100M接口 hme1:第二100M接口
  7.netstat 显示与网络有关的各种数据结构
  命令格式:netstat -[r| i]n -r :显示路由信息
  -i :显示接口信息
  8.route 路由设置
  命令格式:route [add|delete] 设置网络路由
  defaultrouter <-缺省静态路由
  9.arp 反响解析
  命令格式:arp -[a|s]

图片内容