Solaris网络管理培训(第三章:路由和网关)

/etc/defaulrouter文件 配置缺省网关 防止不必要的路由进程 适用于只有一个路由器通向其它网段 单一路由占用较小的路由表资源 该文件保存了缺省路由得信息。系统安装时并没有该文件,是用户自己创建的。文件内容是缺省路由的地址。 #cat /etc/defaultrouter 172.16.255.254 优点: 占用资源少,只有一条路由条目。 /etc/gateways文件 路由表文件 net gateway metric dest. net 目标网段 router 下一跳路由器的地址 count 跳数 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 查看路由表 # 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 路由的网络接口

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus