您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 管理学资料 > 实训5.4 静态路由的配置与管理
实训5.4静态路由的配置与管理.实训目的了解生成路由表的方法熟练掌握静态路由和缺省路由的设置初步掌握路由测试命令的使用实训环境F0/1F0/0S0/0(DCE)S0/1F0/0198.8.15.0net193.10.18.0net195.16.13.0net202.7.20.0netRouter_ARouter_B实训环境路由器的配置参数路由器名E0或F0/0E1或F0/1S0或S0/0S1或S0/1特权密码仿真终端密码Router_A193.10.18.1/24198.8.15.1/24195.16.13.2/24studentnetworkRouter_B202.7.20.1/24195.16.13.1/24studentnetwork实训要求根据实训环境及实训环境的配置参数配置中的路由器,并配置静态路由,使得本实训环境中的所有主机通过静态路由能彼此通信路由器的相关配置配置路由器的名称在路由器A上所做的参考步骤:Router#configterminal//进入全局配置模式Router(config)#//全局配置模式提示符Router(config)#hostnameRouter_A//配置路由器A的主机名为Router_ARouter_A(config)#//全局配置模式提示符在路由器B上所做的参考步骤:Router#configterminal//进入全局配置模式Router(config)#//全局配置模式提示符Router(config)#hostnameRouter_B//配置路由器A的主机名为Router_BRouter_B(config)#//全局配置模式提示符配置路由器A的各种密码Router_A(config)#enablesecretstudent//设置enablesecret密码为studentRouter_A(config)#linevty04//进入线路配置模式,对虚拟终端会话0到4配置Router_A(config-line)#//线路配置模式Router_A(config-line)#login//设置登录参数Router_A(config-line)#passwordnetwork//设置VTY登录密码为networkRouter_A(config-line)#exit//返回到上一级模式(全局配置模式)Router_A(config)#//全局配置模式提示符配置路由器B的各种密码Router_B(config)#enablesecretstudent//设置enablesecret密码为netRouter_B(config)#linevty04//进入线路配置模式,对虚拟终端会话0到4配置Router_B(config-line)#//线路配置模式Router_B(config-line)#login//设置登录参数Router_B(config-line)#passwordnetwork//设置VTY登录密码为networkRouter_B(config-line)#exit//返回到上一级模式(全局配置模式)Router_B(config)#//全局配置模式提示符配置路由器A的各接口Router_A(config)#interfacef0/0//进入f0/0接口配置模式Router_A(config-if)#//f0/0接口配置模式提示符Router_A(config-if)#ipaddress193.10.18.1255.255.255.0//配置f0/0接口的IP地址为193.10.18.1,子网掩码为255.255.255.0Router_A(config-if)#noshutdown//激活f0/0接口Router_A(config-if)#interfacef0/1//进入f0/0接口配置模式Router_A(config-if)#ipaddress198.8.15.1255.255.255.0//配置f0/1接口的IP地址为198.8.15.1,子网掩码为255.255.255.0配置路由器A的各接口(续)Router_A(config-if)#noshutdown//激活f0/1接口Router_A(config-if)#interfaces0/0//进入s0/0接口配置模式Router_A(config-if)#ipaddress195.16.13.2255.255.255.0//配置s0/0接口的IP地址为195.16.13.2,子网掩码为255.255.255.0Router_A(config-if)#clockrate56000//配置时钟点频率为56000Router_A(config-if)#noshutdown//激活s0/0接口配置路由器B的各接口Router_B(config)#interfacef0/0//进入f0/0接口配置模式Router_B(config-if)#//f0/0接口配置模式提示符Router_B(config-if)#ipaddress202.7.20.1255.255.255.0//配置f0/0接口的IP地址为202.7.20.1,子网掩码为255.255.255.0Router_B(config-if)#noshutdown//激活f0/0接口Router_B(config-if)#interfaces0/1//进入s0/1接口配置模式Router_B(config-if)#ipaddress195.16.13.1255.255.255.0//配置s0/1接口的IP地址为195.16.13.1,子网掩码为255.255.255.0Router_B(config-if)#noshutdown//激活s0/1接口清空路由表并进行静态路由的配置清空路由表Router_A#//特权模式提示符Router_A#showiproute//查看路由表的内容Router_A#cleariproute//清空路由表Router_A#showrunning-config//查看正在运行的配置文件内容Router_A#configterminal//进入全局配置模式Router_A(config)#//全局配置模式提示符Router_A(config)#norouterrip//删除RIP协议动态路由配置Router_A(config)#noiproute202.7.20.0255.255.255.0195.16.13.1//删除到目的网198.8.15.0/24的静态路由在路由器A上配置静态路由Router_A#//特权模式提示符Router_A#configterminal//进入全局配置模式Router_A(config)#//全局配置模式提示符Router_A(config)#iproute202.7.20.0255.255.255.0195.16.13.1//配置到目的网198.8.15.0/24的静态路由Router_A(config)#exit//返回到特权模式Router_A#showiproute//查看路由表中的内容在路由器B上配置静态路由Router_B#//特权模式提示符Router_B#configterminal//进入全局配置模式Router_B(config)#//全局配置模式提示符Router_B(config)#iproute193.10.18.0255.255.255.0195.16.13.2//配置到目的网193.10.18.0/24的静态路由Router_B(config)#iproute198.8.15.0255.255.255.0195.16.13.2//配置到目的网198.8.15.0/24的静态路由Router_B(config)#exit//返回到特权模式Router_B#showiproute//查看路由表中的内容测试主机连通性在网络198.8.15.0、网络193.10.15.0、网络202.7.20.0上都选一台PC主机,参照实训6.2进行主机的网络配置(设置其IP地址、子网掩码、缺省网关,注意:IP的网络号必须与缺省网关的网络号相同,缺省网关为与网络物理相连的路由器的接口的IP地址),并在确保PC机能与缺省相关的连通性的前题下,用PING命令检查彼此间的连通性。若能相互通信则表明静态路由设置正确。
本文标题:实训5.4 静态路由的配置与管理
链接地址:https://www.777doc.com/doc-3351798 .html