- 1、本文档共3页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Solaris网络管理
路由和网关 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???1 Delete?a?route #route?delete?-net??? 3)缺省路由 文件:/etc/defaultrouter 描述:防止不必要的路由进程 适用于只有一个路由器通向其它网段 单一路由占用较小的路由表资源 4)查看路由 举例: #?netstat?-r Routing?Table: Destination Gateway Flags Ref Use Interface ----------- ---------- ----- --- --- --------- localhost localhost UH 0 2272 lo0 U 3 562 le0 U 3 562 le0 ????????????????二、网络地址和掩码 1)文件:/etc/erface 接口描述: 网卡型号 十兆网卡:le 百兆网卡:hme 2)文件:/etc/hosts 功能描述: 系统名与IP地址的映射 与/etc/erface?协同工作,配置本机网卡地址 举例: #?more?/etc/hosts localhost loghost xiaojg xiaojg 3)文件:/etc/netmasks 功能描述: 将网络的IP地址与网络地址联系一起,划分子网 如果是标准网段,则不需要配置 4)命令:ifconfig 举例: 检测网络端口状态 #ifconfig?-a 配置网络端口地址 #ifconfig?le0??netmask? 配置网络端口状态 #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
三、DNS 1)DNS客户端的配置 文件:etc/resolv.conf 举例: #?more?/etc/resolv.conf nameserver domainname 文件:/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?
文档评论(0)