- 网络基本配置文件
- /etc/hosts 主机名解析。 The format of each line is:
IP-address official-host-name nicknames... (eg:
192.9.1.20 gaia # John Smith) - /etc/hostname.bge0 网络接口名
t1000 可以通过创建hostname.bge0:1,构造第二网络接口 - /etc/netmasks
网络掩码
# The netmasks file associates Internet Protocol (IP) address
# masks with IP network numbers.
# network-number netmask
#
192.168.1.1 255.255.255.0 - /etc/resolv.conf 域名解析
nameserver 211.151.88.20
nameserver 211.151.94.26
nameserver 202.106.196.115 - cat /etc/inetd.conf 服务项目定义
100235/1 tli rpc/ticotsord wait root /usr/lib/fs/cachefs/cachefsd cachefsd"
- 远程访问命令
- ssh --OpenSSH secure shell client (remote login program)
命令格式:ssh user@remote.hostname.com - scp --secure copy (remote file copy program)

命令格式:scp localfile user@remote.hostname.com:./file
- 网络监控
- ping 检测主机连接状况
命令格式:/usr/sbin/ping host [ip] - ifconfig 显示更改网络接口
命令格式:
/usr/sbin/ifconfig -a
/usr/sbin/ifconfig -a
lo0: flags=2001000849mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
bge0: flags=1000843mtu 1500 index 2
inet 192.168.1.11 netmask ffffff00 broadcast 192.168.1.255
其中,lo0:本机自回馈接口 ; bge0:第一个1G网络接口 - traceroute 跟踪网络路由
命令格式:/usr/sbin/traceroute www.google.com - netstat 显示与网络有关的数据
命令格式:netstat -[a|i|o|r] - rusers 网络上注册用户
命令格式:rusers -la - rup 网络上的主机
命令格式:rup - route 路由设置
命令格式:route [add|delete]设置网络路由。/etc/defaultroute --缺省静态路由 - arp 反向解析 /usr/sbin/arp
Usage: arp hostname
arp -a [-n]
arp -d hostname
arp -s hostname ether_addr [temp] [pub] [trail]
arp -f filename
arp -a 显示当前的IP-MAC对应表 - nfsstat 查看NFS状态
-s server
-c client
没有评论:
发表评论